@dcl/ecs 7.22.3-23911510253.commit-490338c → 7.22.3-24081083817.commit-714809b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/components/extended/ParticleSystem.d.ts +24 -0
  2. package/dist/components/extended/ParticleSystem.js +23 -0
  3. package/dist/components/generated/ParticleSystem.gen.d.ts +1 -0
  4. package/dist/components/generated/ParticleSystem.gen.js +25 -0
  5. package/dist/components/generated/component-names.gen.js +1 -0
  6. package/dist/components/generated/global.gen.d.ts +2 -0
  7. package/dist/components/generated/global.gen.js +1 -0
  8. package/dist/components/generated/index.gen.d.ts +4 -0
  9. package/dist/components/generated/index.gen.js +5 -0
  10. package/dist/components/generated/pb/decentraland/common/colors.gen.d.ts +15 -0
  11. package/dist/components/generated/pb/decentraland/common/colors.gen.js +47 -0
  12. package/dist/components/generated/pb/decentraland/common/floats.gen.d.ts +16 -0
  13. package/dist/components/generated/pb/decentraland/common/floats.gen.js +50 -0
  14. package/dist/components/generated/pb/decentraland/sdk/components/particle_system.gen.d.ts +228 -0
  15. package/dist/components/generated/pb/decentraland/sdk/components/particle_system.gen.js +679 -0
  16. package/dist/components/generated/types.gen.d.ts +2 -0
  17. package/dist/components/generated/types.gen.js +3 -0
  18. package/dist/components/index.d.ts +2 -0
  19. package/dist/components/index.js +3 -0
  20. package/dist/components/types.d.ts +1 -0
  21. package/dist/index.d.ts +2 -1
  22. package/dist/index.js +2 -0
  23. package/dist-cjs/components/extended/ParticleSystem.d.ts +24 -0
  24. package/dist-cjs/components/extended/ParticleSystem.js +28 -0
  25. package/dist-cjs/components/generated/ParticleSystem.gen.d.ts +1 -0
  26. package/dist-cjs/components/generated/ParticleSystem.gen.js +28 -0
  27. package/dist-cjs/components/generated/component-names.gen.js +1 -0
  28. package/dist-cjs/components/generated/global.gen.d.ts +2 -0
  29. package/dist-cjs/components/generated/global.gen.js +3 -1
  30. package/dist-cjs/components/generated/index.gen.d.ts +4 -0
  31. package/dist-cjs/components/generated/index.gen.js +8 -2
  32. package/dist-cjs/components/generated/pb/decentraland/common/colors.gen.d.ts +15 -0
  33. package/dist-cjs/components/generated/pb/decentraland/common/colors.gen.js +48 -1
  34. package/dist-cjs/components/generated/pb/decentraland/common/floats.gen.d.ts +16 -0
  35. package/dist-cjs/components/generated/pb/decentraland/common/floats.gen.js +56 -0
  36. package/dist-cjs/components/generated/pb/decentraland/sdk/components/particle_system.gen.d.ts +228 -0
  37. package/dist-cjs/components/generated/pb/decentraland/sdk/components/particle_system.gen.js +685 -0
  38. package/dist-cjs/components/generated/types.gen.d.ts +2 -0
  39. package/dist-cjs/components/generated/types.gen.js +5 -0
  40. package/dist-cjs/components/index.d.ts +2 -0
  41. package/dist-cjs/components/index.js +5 -1
  42. package/dist-cjs/components/types.d.ts +1 -0
  43. package/dist-cjs/index.d.ts +2 -1
  44. package/dist-cjs/index.js +3 -1
  45. package/package.json +2 -2
@@ -0,0 +1,24 @@
1
+ import { IEngine, LastWriteWinElementSetComponentDefinition } from '../../engine';
2
+ import { PBParticleSystem, PBParticleSystem_BlendMode, PBParticleSystem_PlaybackState, PBParticleSystem_Point, PBParticleSystem_Sphere, PBParticleSystem_Cone, PBParticleSystem_Box } from '../generated/index.gen';
3
+ export { PBParticleSystem_BlendMode as ParticleSystemBlendMode, PBParticleSystem_PlaybackState as ParticleSystemPlaybackState };
4
+ /**
5
+ * @public
6
+ */
7
+ export interface ParticleSystemHelper {
8
+ /** Emit from a single point */
9
+ Point: (point?: PBParticleSystem_Point) => PBParticleSystem['shape'];
10
+ /** Emit from the surface or volume of a sphere */
11
+ Sphere: (sphere?: PBParticleSystem_Sphere) => PBParticleSystem['shape'];
12
+ /** Emit from the base of a cone, projecting outward */
13
+ Cone: (cone?: PBParticleSystem_Cone) => PBParticleSystem['shape'];
14
+ /** Emit from the surface or volume of a box */
15
+ Box: (box?: PBParticleSystem_Box) => PBParticleSystem['shape'];
16
+ }
17
+ /**
18
+ * @public
19
+ */
20
+ export interface ParticleSystemComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBParticleSystem> {
21
+ /** Helpers for constructing emitter shapes */
22
+ Shape: ParticleSystemHelper;
23
+ }
24
+ export declare function defineParticleSystemComponent(engine: Pick<IEngine, 'defineComponentFromSchema'>): ParticleSystemComponentDefinitionExtended;
@@ -0,0 +1,23 @@
1
+ import { ParticleSystem, PBParticleSystem_BlendMode, PBParticleSystem_PlaybackState } from '../generated/index.gen';
2
+ export { PBParticleSystem_BlendMode as ParticleSystemBlendMode, PBParticleSystem_PlaybackState as ParticleSystemPlaybackState };
3
+ const ParticleSystemShapeHelper = {
4
+ Point(point = {}) {
5
+ return { $case: 'point', point };
6
+ },
7
+ Sphere(sphere = {}) {
8
+ return { $case: 'sphere', sphere };
9
+ },
10
+ Cone(cone = {}) {
11
+ return { $case: 'cone', cone };
12
+ },
13
+ Box(box = {}) {
14
+ return { $case: 'box', box };
15
+ }
16
+ };
17
+ export function defineParticleSystemComponent(engine) {
18
+ const theComponent = ParticleSystem(engine);
19
+ return {
20
+ ...theComponent,
21
+ Shape: ParticleSystemShapeHelper
22
+ };
23
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ import { PBParticleSystem } from './pb/decentraland/sdk/components/particle_system.gen';
2
+ /**
3
+ * @internal
4
+ */
5
+ export const ParticleSystemSchema = {
6
+ COMPONENT_ID: 1217,
7
+ serialize(value, builder) {
8
+ const writer = PBParticleSystem.encode(value);
9
+ const buffer = new Uint8Array(writer.finish(), 0, writer.len);
10
+ builder.writeBuffer(buffer, false);
11
+ },
12
+ deserialize(reader) {
13
+ return PBParticleSystem.decode(reader.buffer(), reader.remainingBytes());
14
+ },
15
+ create() {
16
+ // TODO: this is a hack.
17
+ return PBParticleSystem.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBParticleSystem"
24
+ }
25
+ };
@@ -30,6 +30,7 @@ export const coreComponentMappings = {
30
30
  "core::MeshCollider": 1019,
31
31
  "core::MeshRenderer": 1018,
32
32
  "core::NftShape": 1040,
33
+ "core::ParticleSystem": 1217,
33
34
  "core::PhysicsCombinedForce": 1216,
34
35
  "core::PhysicsCombinedImpulse": 1215,
35
36
  "core::PlayerIdentityData": 1089,
@@ -22,6 +22,7 @@ import { PBInputModifier } from './pb/decentraland/sdk/components/input_modifier
22
22
  import { PBLightSource } from './pb/decentraland/sdk/components/light_source.gen';
23
23
  import { PBMainCamera } from './pb/decentraland/sdk/components/main_camera.gen';
24
24
  import { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';
25
+ import { PBParticleSystem } from './pb/decentraland/sdk/components/particle_system.gen';
25
26
  import { PBPhysicsCombinedForce } from './pb/decentraland/sdk/components/physics_combined_force.gen';
26
27
  import { PBPhysicsCombinedImpulse } from './pb/decentraland/sdk/components/physics_combined_impulse.gen';
27
28
  import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_identity_data.gen';
@@ -72,6 +73,7 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
72
73
  /** @public */ export declare const LightSource: LastWriteWinElementSetComponentDefinition<PBLightSource>;
73
74
  /** @public */ export declare const MainCamera: LastWriteWinElementSetComponentDefinition<PBMainCamera>;
74
75
  /** @public */ export declare const NftShape: LastWriteWinElementSetComponentDefinition<PBNftShape>;
76
+ /** @public */ export declare const ParticleSystem: LastWriteWinElementSetComponentDefinition<PBParticleSystem>;
75
77
  /** @public */ export declare const PhysicsCombinedForce: LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedForce>;
76
78
  /** @public */ export declare const PhysicsCombinedImpulse: LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedImpulse>;
77
79
  /** @public */ export declare const PlayerIdentityData: LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>;
@@ -23,6 +23,7 @@ export * from './index.gen';
23
23
  /** @public */ export const LightSource = /* @__PURE__ */ components.LightSource(engine);
24
24
  /** @public */ export const MainCamera = /* @__PURE__ */ components.MainCamera(engine);
25
25
  /** @public */ export const NftShape = /* @__PURE__ */ components.NftShape(engine);
26
+ /** @public */ export const ParticleSystem = /* @__PURE__ */ components.ParticleSystem(engine);
26
27
  /** @public */ export const PhysicsCombinedForce = /* @__PURE__ */ components.PhysicsCombinedForce(engine);
27
28
  /** @public */ export const PhysicsCombinedImpulse = /* @__PURE__ */ components.PhysicsCombinedImpulse(engine);
28
29
  /** @public */ export const PlayerIdentityData = /* @__PURE__ */ components.PlayerIdentityData(engine);
@@ -26,6 +26,7 @@ import { PBMaterial } from './pb/decentraland/sdk/components/material.gen';
26
26
  import { PBMeshCollider } from './pb/decentraland/sdk/components/mesh_collider.gen';
27
27
  import { PBMeshRenderer } from './pb/decentraland/sdk/components/mesh_renderer.gen';
28
28
  import { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';
29
+ import { PBParticleSystem } from './pb/decentraland/sdk/components/particle_system.gen';
29
30
  import { PBPhysicsCombinedForce } from './pb/decentraland/sdk/components/physics_combined_force.gen';
30
31
  import { PBPhysicsCombinedImpulse } from './pb/decentraland/sdk/components/physics_combined_impulse.gen';
31
32
  import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_identity_data.gen';
@@ -81,6 +82,7 @@ export * from './pb/decentraland/sdk/components/material.gen';
81
82
  export * from './pb/decentraland/sdk/components/mesh_collider.gen';
82
83
  export * from './pb/decentraland/sdk/components/mesh_renderer.gen';
83
84
  export * from './pb/decentraland/sdk/components/nft_shape.gen';
85
+ export * from './pb/decentraland/sdk/components/particle_system.gen';
84
86
  export * from './pb/decentraland/sdk/components/physics_combined_force.gen';
85
87
  export * from './pb/decentraland/sdk/components/physics_combined_impulse.gen';
86
88
  export * from './pb/decentraland/sdk/components/player_identity_data.gen';
@@ -138,6 +140,7 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
138
140
  /** @public */ export declare const MeshCollider: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
139
141
  /** @public */ export declare const MeshRenderer: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
140
142
  /** @public */ export declare const NftShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
143
+ /** @public */ export declare const ParticleSystem: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBParticleSystem>>;
141
144
  /** @public */ export declare const PhysicsCombinedForce: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedForce>>;
142
145
  /** @public */ export declare const PhysicsCombinedImpulse: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedImpulse>>;
143
146
  /** @public */ export declare const PlayerIdentityData: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>>;
@@ -195,6 +198,7 @@ export declare const componentDefinitionByName: {
195
198
  "core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
196
199
  "core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
197
200
  "core::NftShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
201
+ "core::ParticleSystem": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBParticleSystem>>;
198
202
  "core::PhysicsCombinedForce": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedForce>>;
199
203
  "core::PhysicsCombinedImpulse": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedImpulse>>;
200
204
  "core::PlayerIdentityData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>>;
@@ -24,6 +24,7 @@ import { MaterialSchema } from './Material.gen';
24
24
  import { MeshColliderSchema } from './MeshCollider.gen';
25
25
  import { MeshRendererSchema } from './MeshRenderer.gen';
26
26
  import { NftShapeSchema } from './NftShape.gen';
27
+ import { ParticleSystemSchema } from './ParticleSystem.gen';
27
28
  import { PhysicsCombinedForceSchema } from './PhysicsCombinedForce.gen';
28
29
  import { PhysicsCombinedImpulseSchema } from './PhysicsCombinedImpulse.gen';
29
30
  import { PlayerIdentityDataSchema } from './PlayerIdentityData.gen';
@@ -79,6 +80,7 @@ export * from './pb/decentraland/sdk/components/material.gen';
79
80
  export * from './pb/decentraland/sdk/components/mesh_collider.gen';
80
81
  export * from './pb/decentraland/sdk/components/mesh_renderer.gen';
81
82
  export * from './pb/decentraland/sdk/components/nft_shape.gen';
83
+ export * from './pb/decentraland/sdk/components/particle_system.gen';
82
84
  export * from './pb/decentraland/sdk/components/physics_combined_force.gen';
83
85
  export * from './pb/decentraland/sdk/components/physics_combined_impulse.gen';
84
86
  export * from './pb/decentraland/sdk/components/player_identity_data.gen';
@@ -166,6 +168,8 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
166
168
  /* @__PURE__ */ engine.defineComponentFromSchema("core::MeshRenderer", MeshRendererSchema);
167
169
  /** @public */ export const NftShape = engine =>
168
170
  /* @__PURE__ */ engine.defineComponentFromSchema("core::NftShape", NftShapeSchema);
171
+ /** @public */ export const ParticleSystem = engine =>
172
+ /* @__PURE__ */ engine.defineComponentFromSchema("core::ParticleSystem", ParticleSystemSchema);
169
173
  /** @public */ export const PhysicsCombinedForce = engine =>
170
174
  /* @__PURE__ */ engine.defineComponentFromSchema("core::PhysicsCombinedForce", PhysicsCombinedForceSchema);
171
175
  /** @public */ export const PhysicsCombinedImpulse = engine =>
@@ -258,6 +262,7 @@ export const componentDefinitionByName = /* @__PURE__ */ {
258
262
  "core::MeshCollider": MeshCollider,
259
263
  "core::MeshRenderer": MeshRenderer,
260
264
  "core::NftShape": NftShape,
265
+ "core::ParticleSystem": ParticleSystem,
261
266
  "core::PhysicsCombinedForce": PhysicsCombinedForce,
262
267
  "core::PhysicsCombinedImpulse": PhysicsCombinedImpulse,
263
268
  "core::PlayerIdentityData": PlayerIdentityData,
@@ -16,6 +16,14 @@ export interface Color4 {
16
16
  b: number;
17
17
  a: number;
18
18
  }
19
+ /** A range of Color4 values. Randomized or lerped between start and end. */
20
+ /**
21
+ * @public
22
+ */
23
+ export interface ColorRange {
24
+ start: Color4 | undefined;
25
+ end: Color4 | undefined;
26
+ }
19
27
  /**
20
28
  * @public
21
29
  */
@@ -30,3 +38,10 @@ export declare namespace Color4 {
30
38
  function encode(message: Color4, writer?: _m0.Writer): _m0.Writer;
31
39
  function decode(input: _m0.Reader | Uint8Array, length?: number): Color4;
32
40
  }
41
+ /**
42
+ * @public
43
+ */
44
+ export declare namespace ColorRange {
45
+ function encode(message: ColorRange, writer?: _m0.Writer): _m0.Writer;
46
+ function decode(input: _m0.Reader | Uint8Array, length?: number): ColorRange;
47
+ }
@@ -122,3 +122,50 @@ export var Color4;
122
122
  }
123
123
  Color4.decode = decode;
124
124
  })(Color4 || (Color4 = {}));
125
+ function createBaseColorRange() {
126
+ return { start: undefined, end: undefined };
127
+ }
128
+ /**
129
+ * @public
130
+ */
131
+ export var ColorRange;
132
+ (function (ColorRange) {
133
+ function encode(message, writer = _m0.Writer.create()) {
134
+ if (message.start !== undefined) {
135
+ Color4.encode(message.start, writer.uint32(10).fork()).ldelim();
136
+ }
137
+ if (message.end !== undefined) {
138
+ Color4.encode(message.end, writer.uint32(18).fork()).ldelim();
139
+ }
140
+ return writer;
141
+ }
142
+ ColorRange.encode = encode;
143
+ function decode(input, length) {
144
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
145
+ let end = length === undefined ? reader.len : reader.pos + length;
146
+ const message = createBaseColorRange();
147
+ while (reader.pos < end) {
148
+ const tag = reader.uint32();
149
+ switch (tag >>> 3) {
150
+ case 1:
151
+ if (tag !== 10) {
152
+ break;
153
+ }
154
+ message.start = Color4.decode(reader, reader.uint32());
155
+ continue;
156
+ case 2:
157
+ if (tag !== 18) {
158
+ break;
159
+ }
160
+ message.end = Color4.decode(reader, reader.uint32());
161
+ continue;
162
+ }
163
+ if ((tag & 7) === 4 || tag === 0) {
164
+ break;
165
+ }
166
+ reader.skipType(tag & 7);
167
+ }
168
+ return message;
169
+ }
170
+ ColorRange.decode = decode;
171
+ })(ColorRange || (ColorRange = {}));
@@ -0,0 +1,16 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ /** A range of float values. Randomized or lerped between start and end. */
3
+ /**
4
+ * @public
5
+ */
6
+ export interface FloatRange {
7
+ start: number;
8
+ end: number;
9
+ }
10
+ /**
11
+ * @public
12
+ */
13
+ export declare namespace FloatRange {
14
+ function encode(message: FloatRange, writer?: _m0.Writer): _m0.Writer;
15
+ function decode(input: _m0.Reader | Uint8Array, length?: number): FloatRange;
16
+ }
@@ -0,0 +1,50 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+ const protobufPackageSarasa = "decentraland.common";
4
+ function createBaseFloatRange() {
5
+ return { start: 0, end: 0 };
6
+ }
7
+ /**
8
+ * @public
9
+ */
10
+ export var FloatRange;
11
+ (function (FloatRange) {
12
+ function encode(message, writer = _m0.Writer.create()) {
13
+ if (message.start !== 0) {
14
+ writer.uint32(13).float(message.start);
15
+ }
16
+ if (message.end !== 0) {
17
+ writer.uint32(21).float(message.end);
18
+ }
19
+ return writer;
20
+ }
21
+ FloatRange.encode = encode;
22
+ function decode(input, length) {
23
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
24
+ let end = length === undefined ? reader.len : reader.pos + length;
25
+ const message = createBaseFloatRange();
26
+ while (reader.pos < end) {
27
+ const tag = reader.uint32();
28
+ switch (tag >>> 3) {
29
+ case 1:
30
+ if (tag !== 13) {
31
+ break;
32
+ }
33
+ message.start = reader.float();
34
+ continue;
35
+ case 2:
36
+ if (tag !== 21) {
37
+ break;
38
+ }
39
+ message.end = reader.float();
40
+ continue;
41
+ }
42
+ if ((tag & 7) === 4 || tag === 0) {
43
+ break;
44
+ }
45
+ reader.skipType(tag & 7);
46
+ }
47
+ return message;
48
+ }
49
+ FloatRange.decode = decode;
50
+ })(FloatRange || (FloatRange = {}));
@@ -0,0 +1,228 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ import { ColorRange } from "../../common/colors.gen";
3
+ import { FloatRange } from "../../common/floats.gen";
4
+ import { Texture } from "../../common/texture.gen";
5
+ import { Quaternion, Vector3 } from "../../common/vectors.gen";
6
+ /**
7
+ * @public
8
+ */
9
+ export interface PBParticleSystem {
10
+ /** --- Emission --- */
11
+ active?: boolean | undefined;
12
+ /** default = 10. Particles emitted per second. */
13
+ rate?: number | undefined;
14
+ /** default = 1000. Maximum number of live particles. */
15
+ maxParticles?: number | undefined;
16
+ /** default = 5. Particle lifetime in seconds. */
17
+ lifetime?: number | undefined;
18
+ /** --- Motion --- */
19
+ gravity?: number | undefined;
20
+ /** Constant force vector applied to each particle (world space). */
21
+ additionalForce?: Vector3 | undefined;
22
+ /** --- Size --- */
23
+ initialSize?: FloatRange | undefined;
24
+ /** default = {1, 1}. Particle size lerped from start to end over its lifetime. */
25
+ sizeOverTime?: FloatRange | undefined;
26
+ /** --- Rotation --- */
27
+ initialRotation?: Quaternion | undefined;
28
+ /** default = identity (0,0,0,1). Per-axis angular velocity as quaternion; converted to Euler XYZ. */
29
+ rotationOverTime?: Quaternion | undefined;
30
+ /** default = false. Particles orient along their velocity direction. */
31
+ faceTravelDirection?: boolean | undefined;
32
+ /** --- Color --- */
33
+ initialColor?: ColorRange | undefined;
34
+ /** default = {white, white}. Particle color lerped from start to end over its lifetime. */
35
+ colorOverTime?: ColorRange | undefined;
36
+ /** --- Velocity --- */
37
+ initialVelocitySpeed?: FloatRange | undefined;
38
+ /** --- Rendering --- */
39
+ texture?: Texture | undefined;
40
+ /** default = PSB_ALPHA */
41
+ blendMode?: PBParticleSystem_BlendMode | undefined;
42
+ /** default = true */
43
+ billboard?: boolean | undefined;
44
+ /** --- Sprite Sheet Animation --- */
45
+ spriteSheet?: PBParticleSystem_SpriteSheetAnimation | undefined;
46
+ shape?: {
47
+ $case: "point";
48
+ point: PBParticleSystem_Point;
49
+ } | {
50
+ $case: "sphere";
51
+ sphere: PBParticleSystem_Sphere;
52
+ } | {
53
+ $case: "cone";
54
+ cone: PBParticleSystem_Cone;
55
+ } | {
56
+ $case: "box";
57
+ box: PBParticleSystem_Box;
58
+ } | undefined;
59
+ /** --- Simulation --- */
60
+ loop?: boolean | undefined;
61
+ /** default = false. Start as if already simulated for one full loop cycle. Requires loop = true. */
62
+ prewarm?: boolean | undefined;
63
+ /** default = PSS_LOCAL. Controls whether particles simulate in local or world space. */
64
+ simulationSpace?: PBParticleSystem_SimulationSpace | undefined;
65
+ /** --- Limit Velocity Over Lifetime --- */
66
+ limitVelocity?: PBParticleSystem_LimitVelocity | undefined;
67
+ /** --- Playback --- */
68
+ playbackState?: PBParticleSystem_PlaybackState | undefined;
69
+ /** --- Emission Bursts --- */
70
+ bursts: PBParticleSystem_Burst[];
71
+ }
72
+ /**
73
+ * @public
74
+ */
75
+ export declare const enum PBParticleSystem_BlendMode {
76
+ /** PSB_ALPHA - Standard alpha transparency. */
77
+ PSB_ALPHA = 0,
78
+ /** PSB_ADD - Additive blending (brightens underlying pixels). */
79
+ PSB_ADD = 1,
80
+ /** PSB_MULTIPLY - Multiply blending (darkens underlying pixels). */
81
+ PSB_MULTIPLY = 2
82
+ }
83
+ /**
84
+ * @public
85
+ */
86
+ export declare const enum PBParticleSystem_PlaybackState {
87
+ /** PS_PLAYING - Particle system is emitting and simulating. */
88
+ PS_PLAYING = 0,
89
+ /** PS_PAUSED - Simulation is frozen; no new particles are emitted. */
90
+ PS_PAUSED = 1,
91
+ /** PS_STOPPED - Simulation stopped and existing particles cleared. */
92
+ PS_STOPPED = 2
93
+ }
94
+ /**
95
+ * @public
96
+ */
97
+ export declare const enum PBParticleSystem_SimulationSpace {
98
+ /** PSS_LOCAL - Particles move with the entity transform. */
99
+ PSS_LOCAL = 0,
100
+ /** PSS_WORLD - Particles stay in world position after emission. */
101
+ PSS_WORLD = 1
102
+ }
103
+ /** Sprite sheet (texture atlas) animation settings. */
104
+ /**
105
+ * @public
106
+ */
107
+ export interface PBParticleSystem_SpriteSheetAnimation {
108
+ /** Number of columns in the sprite sheet. */
109
+ tilesX: number;
110
+ /** Number of rows in the sprite sheet. */
111
+ tilesY: number;
112
+ /** default = 30. Playback speed in frames per second. */
113
+ framesPerSecond?: number | undefined;
114
+ }
115
+ /** Clamps particle speed over lifetime. */
116
+ /**
117
+ * @public
118
+ */
119
+ export interface PBParticleSystem_LimitVelocity {
120
+ /** Maximum particle speed (m/s). */
121
+ speed: number;
122
+ /** default = 1. Fraction (0–1) of excess velocity removed per frame. 1 = hard clamp. */
123
+ dampen?: number | undefined;
124
+ }
125
+ /** Emitter spawns particles from a single point. */
126
+ /**
127
+ * @public
128
+ */
129
+ export interface PBParticleSystem_Point {
130
+ }
131
+ /** Emitter spawns particles from the surface or volume of a sphere. */
132
+ /**
133
+ * @public
134
+ */
135
+ export interface PBParticleSystem_Sphere {
136
+ /** default = 1 */
137
+ radius?: number | undefined;
138
+ }
139
+ /** Emitter spawns particles from the base of a cone and projects them outward. */
140
+ /**
141
+ * @public
142
+ */
143
+ export interface PBParticleSystem_Cone {
144
+ /** default = 25. Half-angle of the cone in degrees. */
145
+ angle?: number | undefined;
146
+ /** default = 1. Base radius in meters. */
147
+ radius?: number | undefined;
148
+ }
149
+ /** Emitter spawns particles from the surface or volume of a box. */
150
+ /**
151
+ * @public
152
+ */
153
+ export interface PBParticleSystem_Box {
154
+ /** default = {1, 1, 1} */
155
+ size?: Vector3 | undefined;
156
+ }
157
+ /** Emission burst configuration. */
158
+ /**
159
+ * @public
160
+ */
161
+ export interface PBParticleSystem_Burst {
162
+ /** Seconds from start of cycle. */
163
+ time: number;
164
+ /** Particles to emit. */
165
+ count: number;
166
+ /** default = 1. Repeat count (0 = infinite). */
167
+ cycles?: number | undefined;
168
+ /** default = 0.01. Seconds between cycles. */
169
+ interval?: number | undefined;
170
+ /** default = 1.0. Emission chance [0,1]. */
171
+ probability?: number | undefined;
172
+ }
173
+ /**
174
+ * @public
175
+ */
176
+ export declare namespace PBParticleSystem {
177
+ function encode(message: PBParticleSystem, writer?: _m0.Writer): _m0.Writer;
178
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem;
179
+ }
180
+ /**
181
+ * @public
182
+ */
183
+ export declare namespace PBParticleSystem_SpriteSheetAnimation {
184
+ function encode(message: PBParticleSystem_SpriteSheetAnimation, writer?: _m0.Writer): _m0.Writer;
185
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_SpriteSheetAnimation;
186
+ }
187
+ /**
188
+ * @public
189
+ */
190
+ export declare namespace PBParticleSystem_LimitVelocity {
191
+ function encode(message: PBParticleSystem_LimitVelocity, writer?: _m0.Writer): _m0.Writer;
192
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_LimitVelocity;
193
+ }
194
+ /**
195
+ * @public
196
+ */
197
+ export declare namespace PBParticleSystem_Point {
198
+ function encode(_: PBParticleSystem_Point, writer?: _m0.Writer): _m0.Writer;
199
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Point;
200
+ }
201
+ /**
202
+ * @public
203
+ */
204
+ export declare namespace PBParticleSystem_Sphere {
205
+ function encode(message: PBParticleSystem_Sphere, writer?: _m0.Writer): _m0.Writer;
206
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Sphere;
207
+ }
208
+ /**
209
+ * @public
210
+ */
211
+ export declare namespace PBParticleSystem_Cone {
212
+ function encode(message: PBParticleSystem_Cone, writer?: _m0.Writer): _m0.Writer;
213
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Cone;
214
+ }
215
+ /**
216
+ * @public
217
+ */
218
+ export declare namespace PBParticleSystem_Box {
219
+ function encode(message: PBParticleSystem_Box, writer?: _m0.Writer): _m0.Writer;
220
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Box;
221
+ }
222
+ /**
223
+ * @public
224
+ */
225
+ export declare namespace PBParticleSystem_Burst {
226
+ function encode(message: PBParticleSystem_Burst, writer?: _m0.Writer): _m0.Writer;
227
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBParticleSystem_Burst;
228
+ }