@truelab/truengine 2.2.0 → 4.0.0-rc.0

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 (148) hide show
  1. package/dist/browserAll-chunk.js +7 -0
  2. package/dist/libs/particles.js +1812 -0
  3. package/dist/libs/pixi.js +740 -197
  4. package/dist/pixi-chunk.js +48946 -17692
  5. package/dist/truengine.js +19208 -15445
  6. package/dist/types/libs/particles.d.ts +2 -0
  7. package/dist/types/src/classes/assets.class.d.ts.map +1 -1
  8. package/dist/types/src/classes/bitmap.text.class.d.ts +8 -3
  9. package/dist/types/src/classes/bitmap.text.class.d.ts.map +1 -1
  10. package/dist/types/src/classes/container.class.d.ts +6 -0
  11. package/dist/types/src/classes/container.class.d.ts.map +1 -1
  12. package/dist/types/src/classes/engine.class.d.ts +6 -0
  13. package/dist/types/src/classes/engine.class.d.ts.map +1 -1
  14. package/dist/types/src/classes/loaders.class.d.ts +19 -2
  15. package/dist/types/src/classes/loaders.class.d.ts.map +1 -1
  16. package/dist/types/src/classes/sequence.class.d.ts.map +1 -1
  17. package/dist/types/src/classes/spine.assets.class.d.ts +16 -1
  18. package/dist/types/src/classes/spine.assets.class.d.ts.map +1 -1
  19. package/dist/types/src/classes/tile.class.d.ts.map +1 -1
  20. package/dist/types/src/components/abstract.component.d.ts +2 -2
  21. package/dist/types/src/components/abstract.component.d.ts.map +1 -1
  22. package/dist/types/src/components/bigwin.component.d.ts.map +1 -1
  23. package/dist/types/src/components/blackout.component.d.ts +4 -4
  24. package/dist/types/src/components/blackout.component.d.ts.map +1 -1
  25. package/dist/types/src/components/button.component.d.ts +4 -4
  26. package/dist/types/src/components/button.component.d.ts.map +1 -1
  27. package/dist/types/src/components/button.text.component.d.ts.map +1 -1
  28. package/dist/types/src/components/cheat.component.d.ts +36 -6
  29. package/dist/types/src/components/cheat.component.d.ts.map +1 -1
  30. package/dist/types/src/components/cheat.store.d.ts +40 -0
  31. package/dist/types/src/components/cheat.store.d.ts.map +1 -0
  32. package/dist/types/src/components/fpsmeter.component.d.ts +44 -0
  33. package/dist/types/src/components/fpsmeter.component.d.ts.map +1 -0
  34. package/dist/types/src/components/link.component.d.ts +4 -4
  35. package/dist/types/src/components/link.component.d.ts.map +1 -1
  36. package/dist/types/src/components/particles.component.d.ts +1 -1
  37. package/dist/types/src/components/particles.component.d.ts.map +1 -1
  38. package/dist/types/src/components/retrigger.component.d.ts.map +1 -1
  39. package/dist/types/src/components/slideshow/slides.reel.component.d.ts +4 -4
  40. package/dist/types/src/components/slideshow/slides.reel.component.d.ts.map +1 -1
  41. package/dist/types/src/components/slot/hints/hints.component.d.ts.map +1 -1
  42. package/dist/types/src/components/slot/lines/lines.static.component.d.ts +3 -3
  43. package/dist/types/src/components/slot/lines/lines.static.component.d.ts.map +1 -1
  44. package/dist/types/src/components/slot/payout/payout.base.component.d.ts +2 -2
  45. package/dist/types/src/components/slot/payout/payout.base.component.d.ts.map +1 -1
  46. package/dist/types/src/components/slot/reel.component.d.ts +1 -1
  47. package/dist/types/src/components/slot/reel.component.d.ts.map +1 -1
  48. package/dist/types/src/components/slot/slot.cheats.d.ts +45 -20
  49. package/dist/types/src/components/slot/slot.cheats.d.ts.map +1 -1
  50. package/dist/types/src/components/slot/slot.component.d.ts +9 -1
  51. package/dist/types/src/components/slot/slot.component.d.ts.map +1 -1
  52. package/dist/types/src/components/slot/slot.config.d.ts.map +1 -1
  53. package/dist/types/src/components/slot/symbol/symbol.component.d.ts +1 -1
  54. package/dist/types/src/components/slot/symbol/symbol.component.d.ts.map +1 -1
  55. package/dist/types/src/components/switch.component.d.ts +1 -1
  56. package/dist/types/src/components/switch.component.d.ts.map +1 -1
  57. package/dist/types/src/components/text.component.d.ts +2 -2
  58. package/dist/types/src/components/text.component.d.ts.map +1 -1
  59. package/dist/types/src/extends/events.types.d.ts +7 -1
  60. package/dist/types/src/extends/events.types.d.ts.map +1 -1
  61. package/dist/types/src/extends/interfaces.d.ts +3 -2
  62. package/dist/types/src/extends/interfaces.d.ts.map +1 -1
  63. package/dist/types/src/extends/short.types.d.ts +2 -2
  64. package/dist/types/src/extends/short.types.d.ts.map +1 -1
  65. package/dist/types/src/extends/struct.types.d.ts +2 -2
  66. package/dist/types/src/extends/struct.types.d.ts.map +1 -1
  67. package/dist/types/src/functions/convert/textstyle.func.d.ts +15 -0
  68. package/dist/types/src/functions/convert/textstyle.func.d.ts.map +1 -0
  69. package/dist/types/src/functions/debug/container.func.d.ts.map +1 -1
  70. package/dist/types/src/functions/debug/line.func.d.ts.map +1 -1
  71. package/dist/types/src/functions/demotexture.func.d.ts.map +1 -1
  72. package/dist/types/src/functions/draw/canvasExtract.func.d.ts +6 -6
  73. package/dist/types/src/functions/draw/canvasExtract.func.d.ts.map +1 -1
  74. package/dist/types/src/functions/draw/radialGradient.func.d.ts +2 -2
  75. package/dist/types/src/functions/draw/radialGradient.func.d.ts.map +1 -1
  76. package/dist/types/src/functions/draw/rect.func.d.ts.map +1 -1
  77. package/dist/types/src/functions/is.funcs.d.ts +5 -0
  78. package/dist/types/src/functions/is.funcs.d.ts.map +1 -1
  79. package/dist/types/src/functions/object/deepMerge.d.ts +3 -1
  80. package/dist/types/src/functions/object/deepMerge.d.ts.map +1 -1
  81. package/dist/types/src/index.d.ts +3 -0
  82. package/dist/types/src/index.d.ts.map +1 -1
  83. package/dist/types/src/libs/particles/ContainerParticle.d.ts +123 -0
  84. package/dist/types/src/libs/particles/ContainerParticle.d.ts.map +1 -0
  85. package/dist/types/src/libs/particles/Emitter.d.ts +303 -0
  86. package/dist/types/src/libs/particles/Emitter.d.ts.map +1 -0
  87. package/dist/types/src/libs/particles/EmitterConfig.d.ts +228 -0
  88. package/dist/types/src/libs/particles/EmitterConfig.d.ts.map +1 -0
  89. package/dist/types/src/libs/particles/Particle.d.ts +70 -0
  90. package/dist/types/src/libs/particles/Particle.d.ts.map +1 -0
  91. package/dist/types/src/libs/particles/ParticleUtils.d.ts +95 -0
  92. package/dist/types/src/libs/particles/ParticleUtils.d.ts.map +1 -0
  93. package/dist/types/src/libs/particles/PropertyList.d.ts +40 -0
  94. package/dist/types/src/libs/particles/PropertyList.d.ts.map +1 -0
  95. package/dist/types/src/libs/particles/PropertyNode.d.ts +74 -0
  96. package/dist/types/src/libs/particles/PropertyNode.d.ts.map +1 -0
  97. package/dist/types/src/libs/particles/behaviors/AccelerationMovement.d.ts +62 -0
  98. package/dist/types/src/libs/particles/behaviors/AccelerationMovement.d.ts.map +1 -0
  99. package/dist/types/src/libs/particles/behaviors/Alpha.d.ts +60 -0
  100. package/dist/types/src/libs/particles/behaviors/Alpha.d.ts.map +1 -0
  101. package/dist/types/src/libs/particles/behaviors/AnimatedTexture.d.ts +111 -0
  102. package/dist/types/src/libs/particles/behaviors/AnimatedTexture.d.ts.map +1 -0
  103. package/dist/types/src/libs/particles/behaviors/Behaviors.d.ts +71 -0
  104. package/dist/types/src/libs/particles/behaviors/Behaviors.d.ts.map +1 -0
  105. package/dist/types/src/libs/particles/behaviors/BlendMode.d.ts +31 -0
  106. package/dist/types/src/libs/particles/behaviors/BlendMode.d.ts.map +1 -0
  107. package/dist/types/src/libs/particles/behaviors/BurstSpawn.d.ts +43 -0
  108. package/dist/types/src/libs/particles/behaviors/BurstSpawn.d.ts.map +1 -0
  109. package/dist/types/src/libs/particles/behaviors/Color.d.ts +60 -0
  110. package/dist/types/src/libs/particles/behaviors/Color.d.ts.map +1 -0
  111. package/dist/types/src/libs/particles/behaviors/OrderedTexture.d.ts +33 -0
  112. package/dist/types/src/libs/particles/behaviors/OrderedTexture.d.ts.map +1 -0
  113. package/dist/types/src/libs/particles/behaviors/PathMovement.d.ts +68 -0
  114. package/dist/types/src/libs/particles/behaviors/PathMovement.d.ts.map +1 -0
  115. package/dist/types/src/libs/particles/behaviors/PointSpawn.d.ts +21 -0
  116. package/dist/types/src/libs/particles/behaviors/PointSpawn.d.ts.map +1 -0
  117. package/dist/types/src/libs/particles/behaviors/RandomTexture.d.ts +32 -0
  118. package/dist/types/src/libs/particles/behaviors/RandomTexture.d.ts.map +1 -0
  119. package/dist/types/src/libs/particles/behaviors/Rotation.d.ts +114 -0
  120. package/dist/types/src/libs/particles/behaviors/Rotation.d.ts.map +1 -0
  121. package/dist/types/src/libs/particles/behaviors/Scale.d.ts +74 -0
  122. package/dist/types/src/libs/particles/behaviors/Scale.d.ts.map +1 -0
  123. package/dist/types/src/libs/particles/behaviors/ShapeSpawn.d.ts +58 -0
  124. package/dist/types/src/libs/particles/behaviors/ShapeSpawn.d.ts.map +1 -0
  125. package/dist/types/src/libs/particles/behaviors/SingleTexture.d.ts +32 -0
  126. package/dist/types/src/libs/particles/behaviors/SingleTexture.d.ts.map +1 -0
  127. package/dist/types/src/libs/particles/behaviors/SpeedMovement.d.ts +76 -0
  128. package/dist/types/src/libs/particles/behaviors/SpeedMovement.d.ts.map +1 -0
  129. package/dist/types/src/libs/particles/behaviors/editor/Types.d.ts +104 -0
  130. package/dist/types/src/libs/particles/behaviors/editor/Types.d.ts.map +1 -0
  131. package/dist/types/src/libs/particles/behaviors/index.d.ts +21 -0
  132. package/dist/types/src/libs/particles/behaviors/index.d.ts.map +1 -0
  133. package/dist/types/src/libs/particles/behaviors/shapes/PolygonalChain.d.ts +57 -0
  134. package/dist/types/src/libs/particles/behaviors/shapes/PolygonalChain.d.ts.map +1 -0
  135. package/dist/types/src/libs/particles/behaviors/shapes/Rectangle.d.ts +59 -0
  136. package/dist/types/src/libs/particles/behaviors/shapes/Rectangle.d.ts.map +1 -0
  137. package/dist/types/src/libs/particles/behaviors/shapes/SpawnShape.d.ts +32 -0
  138. package/dist/types/src/libs/particles/behaviors/shapes/SpawnShape.d.ts.map +1 -0
  139. package/dist/types/src/libs/particles/behaviors/shapes/Torus.d.ts +71 -0
  140. package/dist/types/src/libs/particles/behaviors/shapes/Torus.d.ts.map +1 -0
  141. package/dist/types/src/libs/particles/behaviors/shapes/index.d.ts +5 -0
  142. package/dist/types/src/libs/particles/behaviors/shapes/index.d.ts.map +1 -0
  143. package/dist/types/src/libs/particles/index.d.ts +9 -0
  144. package/dist/types/src/libs/particles/index.d.ts.map +1 -0
  145. package/dist/types/src/scenes/masked.scene.d.ts.map +1 -1
  146. package/dist/types/vite.config.d.ts.map +1 -1
  147. package/dist/webworkerAll-chunk.js +3 -0
  148. package/package.json +11 -8
@@ -0,0 +1,74 @@
1
+ import { Particle } from '../Particle';
2
+ import { ValueList } from '../PropertyNode';
3
+ import { BehaviorOrder, IEmitterBehavior } from './Behaviors';
4
+ import { BehaviorEditorConfig } from './editor/Types';
5
+ /**
6
+ * A Scale behavior that applies an interpolated or stepped list of values to the particle's x & y scale.
7
+ *
8
+ * Example config:
9
+ * ```javascript
10
+ * {
11
+ * type: 'scale',
12
+ * config: {
13
+ * scale: {
14
+ * list: [{value: 0, time: 0}, {value: 1, time: 0.25}, {value: 0, time: 1}],
15
+ * isStepped: true
16
+ * },
17
+ * minMult: 0.5
18
+ * }
19
+ * }
20
+ * ```
21
+ */
22
+ export declare class ScaleBehavior implements IEmitterBehavior {
23
+ static type: string;
24
+ static editorConfig: BehaviorEditorConfig;
25
+ order: BehaviorOrder;
26
+ private list;
27
+ private minMult;
28
+ constructor(config: {
29
+ /**
30
+ * Scale of the particles, with a minimum value of 0
31
+ */
32
+ scale: ValueList<number>;
33
+ /**
34
+ * A value between minimum scale multipler and 1 is randomly
35
+ * generated and multiplied with each scale value to provide the actual scale for each particle.
36
+ */
37
+ minMult: number;
38
+ });
39
+ initParticles(first: Particle): void;
40
+ updateParticle(particle: Particle): void;
41
+ }
42
+ /**
43
+ * A Scale behavior that applies a randomly picked value to the particle's x & y scale at initialization.
44
+ *
45
+ * Example config:
46
+ * ```javascript
47
+ * {
48
+ * type: 'scaleStatic',
49
+ * config: {
50
+ * min: 0.25,
51
+ * max: 0.75,
52
+ * }
53
+ * }
54
+ * ```
55
+ */
56
+ export declare class StaticScaleBehavior implements IEmitterBehavior {
57
+ static type: string;
58
+ static editorConfig: BehaviorEditorConfig;
59
+ order: BehaviorOrder;
60
+ private min;
61
+ private max;
62
+ constructor(config: {
63
+ /**
64
+ * Minimum scale of the particles, with a minimum value of 0
65
+ */
66
+ min: number;
67
+ /**
68
+ * Maximum scale of the particles, with a minimum value of 0
69
+ */
70
+ max: number;
71
+ });
72
+ initParticles(first: Particle): void;
73
+ }
74
+ //# sourceMappingURL=Scale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scale.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/particles/behaviors/Scale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EAAgB,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAErD;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,aAAc,YAAW,gBAAgB;IAClD,OAAc,IAAI,SAAU;IAC5B,OAAc,YAAY,EAAE,oBAAoB,CAAO;IAEhD,KAAK,gBAAuB;IACnC,OAAO,CAAC,IAAI,CAAsB;IAClC,OAAO,CAAC,OAAO,CAAQ;gBACX,MAAM,EAAE;QAChB;;WAEG;QACH,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;QACxB;;;WAGG;QACH,OAAO,EAAE,MAAM,CAAA;KAClB;IAMD,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAapC,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAG3C;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,mBAAoB,YAAW,gBAAgB;IACxD,OAAc,IAAI,SAAgB;IAClC,OAAc,YAAY,EAAE,oBAAoB,CAAO;IAEhD,KAAK,gBAAuB;IACnC,OAAO,CAAC,GAAG,CAAQ;IACnB,OAAO,CAAC,GAAG,CAAQ;gBACP,MAAM,EAAE;QAChB;;WAEG;QACH,GAAG,EAAE,MAAM,CAAA;QACX;;WAEG;QACH,GAAG,EAAE,MAAM,CAAA;KACd;IAKD,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;CAWvC"}
@@ -0,0 +1,58 @@
1
+ import { Particle } from '../Particle';
2
+ import { BehaviorOrder, IEmitterBehavior } from './Behaviors';
3
+ import { BehaviorEditorConfig } from './editor/Types';
4
+ import { SpawnShapeClass } from './shapes/SpawnShape';
5
+ /**
6
+ * A Spawn behavior that places (and optionally rotates) particles according to a
7
+ * specified shape. Additional shapes can be registered with {@link registerShape | SpawnShape.registerShape()}.
8
+ * Additional shapes must implement the {@link SpawnShape} interface, and their class must match the
9
+ * {@link SpawnShapeClass} interface.
10
+ * Shapes included by default are:
11
+ * * {@link Rectangle}
12
+ * * {@link Torus}
13
+ * * {@link PolygonalChain}
14
+ *
15
+ * Example config:
16
+ * ```javascript
17
+ * {
18
+ * type: 'spawnShape',
19
+ * config: {
20
+ * type: 'rect',
21
+ * data: {
22
+ * x: 0,
23
+ * y: 0,
24
+ * width: 20,
25
+ * height: 300,
26
+ * }
27
+ * }
28
+ * }
29
+ * ```
30
+ */
31
+ export declare class ShapeSpawnBehavior implements IEmitterBehavior {
32
+ static type: string;
33
+ static editorConfig: BehaviorEditorConfig;
34
+ /**
35
+ * Dictionary of all registered shape classes.
36
+ */
37
+ private static shapes;
38
+ /**
39
+ * Registers a shape to be used by the ShapeSpawn behavior.
40
+ * @param constructor The shape class constructor to use, with a static `type` property to reference it by.
41
+ * @param typeOverride An optional type override, primarily for registering a shape under multiple names.
42
+ */
43
+ static registerShape(constructor: SpawnShapeClass, typeOverride?: string): void;
44
+ order: BehaviorOrder;
45
+ private shape;
46
+ constructor(config: {
47
+ /**
48
+ * Type of the shape to spawn
49
+ */
50
+ type: string;
51
+ /**
52
+ * Configuration data for the spawn shape.
53
+ */
54
+ data: any;
55
+ });
56
+ initParticles(first: Particle): void;
57
+ }
58
+ //# sourceMappingURL=ShapeSpawn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShapeSpawn.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/particles/behaviors/ShapeSpawn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAGrD,OAAO,EAAc,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAGjE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,kBAAmB,YAAW,gBAAgB;IACvD,OAAc,IAAI,SAAe;IACjC,OAAc,YAAY,EAAE,oBAAoB,CAAO;IAEvD;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,MAAM,CAAsC;IAE3D;;;;OAIG;WACW,aAAa,CAAC,WAAW,EAAE,eAAe,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI;IAItF,KAAK,gBAAsB;IAC3B,OAAO,CAAC,KAAK,CAAY;gBAEb,MAAM,EAAE;QAChB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAA;QACZ;;WAEG;QACH,IAAI,EAAE,GAAG,CAAA;KACZ;IASD,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;CAQvC"}
@@ -0,0 +1,32 @@
1
+ import { Texture } from 'pixi.js';
2
+ import { Particle } from '../Particle';
3
+ import { BehaviorOrder, IEmitterBehavior } from './Behaviors';
4
+ import { BehaviorEditorConfig } from './editor/Types';
5
+ /**
6
+ * A Textuure behavior that assigns a single texture to each particle.
7
+ * String values will be converted to textures with {@link ParticleUtils.GetTextureFromString}.
8
+ *
9
+ * Example config:
10
+ * ```javascript
11
+ * {
12
+ * type: 'textureSingle',
13
+ * config: {
14
+ * texture: Texture.from('myTexId'),
15
+ * }
16
+ * }
17
+ * ```
18
+ */
19
+ export declare class SingleTextureBehavior implements IEmitterBehavior {
20
+ static type: string;
21
+ static editorConfig: BehaviorEditorConfig;
22
+ order: BehaviorOrder;
23
+ private texture;
24
+ constructor(config: {
25
+ /**
26
+ * Image to use for each particle.
27
+ */
28
+ texture: Texture | string;
29
+ });
30
+ initParticles(first: Particle): void;
31
+ }
32
+ //# sourceMappingURL=SingleTexture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SingleTexture.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/particles/behaviors/SingleTexture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAErD;;;;;;;;;;;;;GAaG;AACH,qBAAa,qBAAsB,YAAW,gBAAgB;IAC1D,OAAc,IAAI,SAAkB;IACpC,OAAc,YAAY,EAAE,oBAAoB,CAAO;IAEhD,KAAK,gBAAuB;IACnC,OAAO,CAAC,OAAO,CAAS;gBACZ,MAAM,EAAE;QAChB;;WAEG;QACH,OAAO,EAAE,OAAO,GAAG,MAAM,CAAA;KAC5B;IAID,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;CASvC"}
@@ -0,0 +1,76 @@
1
+ import { Particle } from '../Particle';
2
+ import { ValueList } from '../PropertyNode';
3
+ import { BehaviorOrder, IEmitterBehavior } from './Behaviors';
4
+ import { BehaviorEditorConfig } from './editor/Types';
5
+ /**
6
+ * A Movement behavior that uses an interpolated or stepped list of values for a particles speed at any given moment.
7
+ * Movement direction is controlled by the particle's starting rotation.
8
+ *
9
+ * Example config:
10
+ * ```javascript
11
+ * {
12
+ * type: 'moveSpeed',
13
+ * config: {
14
+ * speed: {
15
+ * list: [{value: 10, time: 0}, {value: 100, time: 0.25}, {value: 0, time: 1}],
16
+ * },
17
+ * minMult: 0.8
18
+ * }
19
+ * }
20
+ * ```
21
+ */
22
+ export declare class SpeedBehavior implements IEmitterBehavior {
23
+ static type: string;
24
+ static editorConfig: BehaviorEditorConfig;
25
+ order: BehaviorOrder;
26
+ private list;
27
+ private minMult;
28
+ constructor(config: {
29
+ /**
30
+ * Speed of the particles in world units/second, with a minimum value of 0
31
+ */
32
+ speed: ValueList<number>;
33
+ /**
34
+ * A value between minimum speed multipler and 1 is randomly
35
+ * generated and multiplied with each speed value to generate the actual speed for each particle.
36
+ */
37
+ minMult: number;
38
+ });
39
+ initParticles(first: Particle): void;
40
+ updateParticle(particle: Particle, deltaSec: number): void;
41
+ }
42
+ /**
43
+ * A Movement behavior that uses a randomly picked constant speed throughout a particle's lifetime.
44
+ * Movement direction is controlled by the particle's starting rotation.
45
+ *
46
+ * Example config:
47
+ * ```javascript
48
+ * {
49
+ * type: 'moveSpeedStatic',
50
+ * config: {
51
+ * min: 100,
52
+ * max: 150
53
+ * }
54
+ * }
55
+ * ```
56
+ */
57
+ export declare class StaticSpeedBehavior implements IEmitterBehavior {
58
+ static type: string;
59
+ static editorConfig: BehaviorEditorConfig;
60
+ order: BehaviorOrder;
61
+ private min;
62
+ private max;
63
+ constructor(config: {
64
+ /**
65
+ * Minimum speed when initializing the particle.
66
+ */
67
+ min: number;
68
+ /**
69
+ * Maximum speed when initializing the particle.
70
+ */
71
+ max: number;
72
+ });
73
+ initParticles(first: Particle): void;
74
+ updateParticle(particle: Particle, deltaSec: number): void;
75
+ }
76
+ //# sourceMappingURL=SpeedMovement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpeedMovement.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/particles/behaviors/SpeedMovement.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGtC,OAAO,EAAgB,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAErD;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,aAAc,YAAW,gBAAgB;IAClD,OAAc,IAAI,SAAc;IAChC,OAAc,YAAY,EAAE,oBAAoB,CAAO;IAEhD,KAAK,gBAAqB;IACjC,OAAO,CAAC,IAAI,CAAsB;IAClC,OAAO,CAAC,OAAO,CAAQ;gBACX,MAAM,EAAE;QAChB;;WAEG;QACH,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;QACxB;;;WAGG;QACH,OAAO,EAAE,MAAM,CAAA;KAClB;IAMD,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAmBpC,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAS7D;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,mBAAoB,YAAW,gBAAgB;IACxD,OAAc,IAAI,SAAoB;IACtC,OAAc,YAAY,EAAE,oBAAoB,CAAO;IAEhD,KAAK,gBAAqB;IACjC,OAAO,CAAC,GAAG,CAAQ;IACnB,OAAO,CAAC,GAAG,CAAQ;gBACP,MAAM,EAAE;QAChB;;WAEG;QACH,GAAG,EAAE,MAAM,CAAA;QACX;;WAEG;QACH,GAAG,EAAE,MAAM,CAAA;KACd;IAKD,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAkBpC,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAM7D"}
@@ -0,0 +1,104 @@
1
+ export type NumberProperty = {
2
+ type: 'number';
3
+ name: string;
4
+ title: string;
5
+ description: string;
6
+ default: number;
7
+ min?: number;
8
+ max?: number;
9
+ };
10
+ export type ColorProperty = {
11
+ type: 'color';
12
+ name: string;
13
+ title: string;
14
+ description: string;
15
+ default: string;
16
+ };
17
+ export type BooleanProperty = {
18
+ type: 'boolean';
19
+ name: string;
20
+ title: string;
21
+ description: string;
22
+ default: boolean;
23
+ };
24
+ export type TextProperty = {
25
+ type: 'text';
26
+ name: string;
27
+ title: string;
28
+ description: string;
29
+ default: string;
30
+ };
31
+ export type PointProperty = {
32
+ type: 'point';
33
+ name: string;
34
+ title: string;
35
+ description: string;
36
+ default: {
37
+ x: number;
38
+ y: number;
39
+ };
40
+ };
41
+ export type NumberListProperty = {
42
+ type: 'numberList';
43
+ name: string;
44
+ title: string;
45
+ description: string;
46
+ default: number;
47
+ min?: number;
48
+ max?: number;
49
+ };
50
+ export type ColorListProperty = {
51
+ type: 'colorList';
52
+ name: string;
53
+ title: string;
54
+ description: string;
55
+ default: string;
56
+ };
57
+ export type ImageProperty = {
58
+ type: 'image';
59
+ name: string;
60
+ title: string;
61
+ description: string;
62
+ };
63
+ export type ListProperty = {
64
+ type: 'list';
65
+ name: string;
66
+ title: string;
67
+ description: string;
68
+ entryType: Property;
69
+ };
70
+ export type ObjectProperty = {
71
+ type: 'object';
72
+ name: string;
73
+ title: string;
74
+ description: string;
75
+ props: Property[];
76
+ };
77
+ export type SelectProperty = {
78
+ type: 'select';
79
+ name: string;
80
+ title: string;
81
+ description: string;
82
+ options: {
83
+ label: string;
84
+ value: string;
85
+ }[];
86
+ default: string;
87
+ };
88
+ export type SelectSubConfigProperty = {
89
+ type: 'subconfig';
90
+ /** Name of property where the type of the config is stored */
91
+ name: string;
92
+ title: string;
93
+ description: string;
94
+ dictionaryProp: string;
95
+ /** Name of property in which the config should be stored */
96
+ configName: string;
97
+ };
98
+ export type Property = NumberProperty | ColorProperty | BooleanProperty | TextProperty | PointProperty | NumberListProperty | ColorListProperty | ImageProperty | ListProperty | ObjectProperty | SelectProperty | SelectSubConfigProperty;
99
+ export type BehaviorEditorConfig = {
100
+ category: 'art' | 'color' | 'alpha' | 'scale' | 'movement' | 'rotation' | 'blend' | 'spawn' | 'other';
101
+ title: string;
102
+ props: Property[];
103
+ };
104
+ //# sourceMappingURL=Types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/particles/behaviors/editor/Types.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,21 @@
1
+ import * as spawnShapes from './shapes';
2
+ export { spawnShapes };
3
+ export * from './Behaviors';
4
+ import * as editor from './editor/Types';
5
+ export { editor };
6
+ export * from './AccelerationMovement';
7
+ export * from './Alpha';
8
+ export * from './AnimatedTexture';
9
+ export * from './BlendMode';
10
+ export * from './BurstSpawn';
11
+ export * from './Color';
12
+ export * from './OrderedTexture';
13
+ export * from './PathMovement';
14
+ export * from './PointSpawn';
15
+ export * from './RandomTexture';
16
+ export * from './Rotation';
17
+ export * from './Scale';
18
+ export * from './ShapeSpawn';
19
+ export * from './SingleTexture';
20
+ export * from './SpeedMovement';
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/particles/behaviors/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,WAAW,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,CAAA;AACtB,cAAc,aAAa,CAAA;AAE3B,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,CAAA;AAGjB,cAAc,wBAAwB,CAAA;AACtC,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,57 @@
1
+ import { PointData } from 'pixi.js';
2
+ import { ListProperty } from '../editor/Types';
3
+ import { SpawnShape } from './SpawnShape';
4
+ /**
5
+ * Data structure for internal parsed data in PolygonalChain spawn shapes.
6
+ */
7
+ export type Segment = {
8
+ p1: PointData;
9
+ p2: PointData;
10
+ l: number;
11
+ };
12
+ /**
13
+ * A spawn shape that picks a random position along a series of line segments. If those
14
+ * line segments form a polygon, particles will only be placed on the perimeter of that polygon.
15
+ *
16
+ * Example config:
17
+ * ```javascript
18
+ * {
19
+ * type: 'polygonalChain',
20
+ * data: [
21
+ * [{x: 0, y: 0}, {x: 10, y: 10}, {x: 20, y: 0}],
22
+ * [{x: 0, y, -10}, {x: 10, y: 0}, {x: 20, y: -10}]
23
+ * ]
24
+ * }
25
+ * ```
26
+ */
27
+ export declare class PolygonalChain implements SpawnShape {
28
+ static type: string;
29
+ static editorConfig: ListProperty;
30
+ /**
31
+ * List of segment objects in the chain.
32
+ */
33
+ private segments;
34
+ /**
35
+ * Total length of all segments of the chain.
36
+ */
37
+ private totalLength;
38
+ /**
39
+ * Total length of segments up to and including the segment of the same index.
40
+ * Used for weighted random selection of segment.
41
+ */
42
+ private countingLengths;
43
+ /**
44
+ * @param data Point data for polygon chains. Either a list of points for a single chain, or a list of chains.
45
+ */
46
+ constructor(data: PointData[] | PointData[][]);
47
+ /**
48
+ * @param data Point data for polygon chains. Either a list of points for a single chain, or a list of chains.
49
+ */
50
+ private init;
51
+ /**
52
+ * Gets a random point in the chain.
53
+ * @param out The point to store the selected position in.
54
+ */
55
+ getRandPos(out: PointData): void;
56
+ }
57
+ //# sourceMappingURL=PolygonalChain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PolygonalChain.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/particles/behaviors/shapes/PolygonalChain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IAClB,EAAE,EAAE,SAAS,CAAA;IACb,EAAE,EAAE,SAAS,CAAA;IACb,CAAC,EAAE,MAAM,CAAA;CACZ,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,cAAe,YAAW,UAAU;IAC7C,OAAc,IAAI,SAAmB;IACrC,OAAc,YAAY,EAAE,YAAY,CAAO;IAC/C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAW;IAC3B;;OAEG;IACH,OAAO,CAAC,WAAW,CAAQ;IAC3B;;;OAGG;IACH,OAAO,CAAC,eAAe,CAAU;IAEjC;;OAEG;gBACS,IAAI,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,EAAE;IAO7C;;OAEG;IACH,OAAO,CAAC,IAAI;IA2CZ;;;OAGG;IACI,UAAU,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI;CA+B1C"}
@@ -0,0 +1,59 @@
1
+ import { Particle } from '../../Particle';
2
+ import { ObjectProperty } from '../editor/Types';
3
+ import { SpawnShape } from './SpawnShape';
4
+ /**
5
+ * A SpawnShape that randomly picks locations inside a rectangle.
6
+ *
7
+ * Example config:
8
+ * ```javascript
9
+ * {
10
+ * type: 'rect',
11
+ * data: {
12
+ * x: 0,
13
+ * y: 0,
14
+ * w: 10,
15
+ * h: 100
16
+ * }
17
+ * }
18
+ * ```
19
+ */
20
+ export declare class Rectangle implements SpawnShape {
21
+ static type: string;
22
+ static editorConfig: ObjectProperty;
23
+ /**
24
+ * X (left) position of the rectangle.
25
+ */
26
+ x: number;
27
+ /**
28
+ * Y (top) position of the rectangle.
29
+ */
30
+ y: number;
31
+ /**
32
+ * Width of the rectangle.
33
+ */
34
+ w: number;
35
+ /**
36
+ * Height of the rectangle.
37
+ */
38
+ h: number;
39
+ constructor(config: {
40
+ /**
41
+ * X (left) position of the rectangle.
42
+ */
43
+ x: number;
44
+ /**
45
+ * Y (top) position of the rectangle.
46
+ */
47
+ y: number;
48
+ /**
49
+ * Width of the rectangle.
50
+ */
51
+ w: number;
52
+ /**
53
+ * Height of the rectangle.
54
+ */
55
+ h: number;
56
+ });
57
+ getRandPos(particle: Particle): void;
58
+ }
59
+ //# sourceMappingURL=Rectangle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Rectangle.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/particles/behaviors/shapes/Rectangle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,SAAU,YAAW,UAAU;IACxC,OAAc,IAAI,SAAS;IAC3B,OAAc,YAAY,EAAE,cAAc,CAAO;IACjD;;OAEG;IACI,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACI,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACI,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACI,CAAC,EAAE,MAAM,CAAA;gBAEJ,MAAM,EAAE;QAChB;;WAEG;QACH,CAAC,EAAE,MAAM,CAAA;QACT;;WAEG;QACH,CAAC,EAAE,MAAM,CAAA;QACT;;WAEG;QACH,CAAC,EAAE,MAAM,CAAA;QACT;;WAEG;QACH,CAAC,EAAE,MAAM,CAAA;KACZ;IAOD,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAKvC"}
@@ -0,0 +1,32 @@
1
+ import { Particle } from '../../Particle';
2
+ import { ListProperty, ObjectProperty } from '../editor/Types';
3
+ /**
4
+ * Any shape capable of generating a random position for the {@link ShapeSpawnBehavior | shape spawn behavior}.
5
+ */
6
+ export type SpawnShape = {
7
+ /**
8
+ * Assign a random position to the given particle.
9
+ * Rotation may optionally be applied; assigning any other properties, while allowed, would be improper.
10
+ */
11
+ getRandPos(particle: Particle): void;
12
+ };
13
+ /**
14
+ * Class definition/static properties for a shape capable of generating a random
15
+ * position for the {@link ShapeSpawnBehavior | shape spawn behavior}.
16
+ */
17
+ export type SpawnShapeClass = {
18
+ /**
19
+ * Type that the shape is registered under.
20
+ */
21
+ type: string;
22
+ /**
23
+ * Configuration for an editor to display. This does not need to exist in production code.
24
+ */
25
+ editorConfig?: ObjectProperty | ListProperty;
26
+ /**
27
+ * The shape constructor itself.
28
+ * @param config The config for the shape, which should match its defined specifications.
29
+ */
30
+ new (config: any): SpawnShape;
31
+ };
32
+ //# sourceMappingURL=SpawnShape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpawnShape.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/particles/behaviors/shapes/SpawnShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEnE;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB;;;OAGG;IACH,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAA;CACvC,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,YAAY,CAAC,EAAE,cAAc,GAAG,YAAY,CAAA;IAC5C;;;OAGG;IACH,KAAK,MAAM,EAAE,GAAG,GAAG,UAAU,CAAA;CAChC,CAAA"}
@@ -0,0 +1,71 @@
1
+ import { Particle } from '../../Particle';
2
+ import { ObjectProperty } from '../editor/Types';
3
+ import { SpawnShape } from './SpawnShape';
4
+ /**
5
+ * A class for spawning particles in a circle or ring.
6
+ * Can optionally apply rotation to particles so that they are aimed away from the center of the circle.
7
+ *
8
+ * Example config:
9
+ * ```javascript
10
+ * {
11
+ * type: 'torus',
12
+ * data: {
13
+ * radius: 30,
14
+ * x: 0,
15
+ * y: 0,
16
+ * innerRadius: 10,
17
+ * rotation: true
18
+ * }
19
+ * }
20
+ * ```
21
+ */
22
+ export declare class Torus implements SpawnShape {
23
+ static type: string;
24
+ static editorConfig: ObjectProperty;
25
+ /**
26
+ * X position of the center of the shape.
27
+ */
28
+ x: number;
29
+ /**
30
+ * Y position of the center of the shape.
31
+ */
32
+ y: number;
33
+ /**
34
+ * Radius of circle, or outer radius of a ring.
35
+ */
36
+ radius: number;
37
+ /**
38
+ * Inner radius of a ring. Use 0 to have a circle.
39
+ */
40
+ innerRadius: number;
41
+ /**
42
+ * If rotation should be applied to particles.
43
+ */
44
+ rotation: boolean;
45
+ constructor(config: {
46
+ /**
47
+ * Radius of circle, or outer radius of a ring. Note that this uses the full name of 'radius',
48
+ * where earlier versions of the library may have used 'r'.
49
+ */
50
+ radius: number;
51
+ /**
52
+ * X position of the center of the shape.
53
+ */
54
+ x: number;
55
+ /**
56
+ * Y position of the center of the shape.
57
+ */
58
+ y: number;
59
+ /**
60
+ * Inner radius of a ring. Omit, or use 0, to have a circle.
61
+ */
62
+ innerRadius?: number;
63
+ /**
64
+ * If rotation should be applied to particles, pointing them away from the center of the torus.
65
+ * Defaults to false.
66
+ */
67
+ affectRotation?: boolean;
68
+ });
69
+ getRandPos(particle: Particle): void;
70
+ }
71
+ //# sourceMappingURL=Torus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Torus.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/particles/behaviors/shapes/Torus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,KAAM,YAAW,UAAU;IACpC,OAAc,IAAI,SAAU;IAC5B,OAAc,YAAY,EAAE,cAAc,CAAO;IACjD;;OAEG;IACI,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACI,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACI,MAAM,EAAE,MAAM,CAAA;IACrB;;OAEG;IACI,WAAW,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACI,QAAQ,EAAE,OAAO,CAAA;gBAEZ,MAAM,EAAE;QAChB;;;WAGG;QACH,MAAM,EAAE,MAAM,CAAA;QACd;;WAEG;QACH,CAAC,EAAE,MAAM,CAAA;QACT;;WAEG;QACH,CAAC,EAAE,MAAM,CAAA;QACT;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB;;;WAGG;QACH,cAAc,CAAC,EAAE,OAAO,CAAA;KAC3B;IAQD,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAmBvC"}
@@ -0,0 +1,5 @@
1
+ export * from './PolygonalChain';
2
+ export * from './Rectangle';
3
+ export * from './SpawnShape';
4
+ export * from './Torus';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/particles/behaviors/shapes/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA"}
@@ -0,0 +1,9 @@
1
+ export * as behaviors from './behaviors';
2
+ export * from './Emitter';
3
+ export * from './EmitterConfig';
4
+ export * from './ContainerParticle';
5
+ export * from './Particle';
6
+ export * as ParticleUtils from './ParticleUtils';
7
+ export * from './PropertyList';
8
+ export * from './PropertyNode';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/libs/particles/index.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA;AACxC,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAA;AAChD,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"masked.scene.d.ts","sourceRoot":"","sources":["../../../../src/scenes/masked.scene.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,SAAS,CAAA;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD;;GAEG;AACH,8BAAsB,WAAY,SAAQ,aAAa;IACnD,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAsB;IAE5D;;;;;OAKG;IACH,SAAS,CAAC,IAAI,SAAI,EAAE,IAAI,SAAI,GAAG,IAAI,CAAC,QAAQ;CAW/C"}
1
+ {"version":3,"file":"masked.scene.d.ts","sourceRoot":"","sources":["../../../../src/scenes/masked.scene.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,SAAS,CAAA;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD;;GAEG;AACH,8BAAsB,WAAY,SAAQ,aAAa;IACnD,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAsB;IAE5D;;;;;OAKG;IACH,SAAS,CAAC,IAAI,SAAI,EAAE,IAAI,SAAI,GAAG,IAAI,CAAC,QAAQ;CAU/C"}