@truelab/truengine 3.0.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 (143) 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 +19046 -15409
  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 +7 -0
  29. package/dist/types/src/components/cheat.component.d.ts.map +1 -1
  30. package/dist/types/src/components/fpsmeter.component.d.ts +44 -0
  31. package/dist/types/src/components/fpsmeter.component.d.ts.map +1 -0
  32. package/dist/types/src/components/link.component.d.ts +4 -4
  33. package/dist/types/src/components/link.component.d.ts.map +1 -1
  34. package/dist/types/src/components/particles.component.d.ts +1 -1
  35. package/dist/types/src/components/particles.component.d.ts.map +1 -1
  36. package/dist/types/src/components/retrigger.component.d.ts.map +1 -1
  37. package/dist/types/src/components/slideshow/slides.reel.component.d.ts +4 -4
  38. package/dist/types/src/components/slideshow/slides.reel.component.d.ts.map +1 -1
  39. package/dist/types/src/components/slot/hints/hints.component.d.ts.map +1 -1
  40. package/dist/types/src/components/slot/lines/lines.static.component.d.ts +3 -3
  41. package/dist/types/src/components/slot/lines/lines.static.component.d.ts.map +1 -1
  42. package/dist/types/src/components/slot/payout/payout.base.component.d.ts +2 -2
  43. package/dist/types/src/components/slot/payout/payout.base.component.d.ts.map +1 -1
  44. package/dist/types/src/components/slot/reel.component.d.ts.map +1 -1
  45. package/dist/types/src/components/slot/slot.component.d.ts +1 -1
  46. package/dist/types/src/components/slot/slot.component.d.ts.map +1 -1
  47. package/dist/types/src/components/slot/slot.config.d.ts.map +1 -1
  48. package/dist/types/src/components/slot/symbol/symbol.component.d.ts +1 -1
  49. package/dist/types/src/components/slot/symbol/symbol.component.d.ts.map +1 -1
  50. package/dist/types/src/components/switch.component.d.ts +1 -1
  51. package/dist/types/src/components/switch.component.d.ts.map +1 -1
  52. package/dist/types/src/components/text.component.d.ts +2 -2
  53. package/dist/types/src/components/text.component.d.ts.map +1 -1
  54. package/dist/types/src/extends/events.types.d.ts +1 -1
  55. package/dist/types/src/extends/events.types.d.ts.map +1 -1
  56. package/dist/types/src/extends/interfaces.d.ts +3 -2
  57. package/dist/types/src/extends/interfaces.d.ts.map +1 -1
  58. package/dist/types/src/extends/short.types.d.ts +2 -2
  59. package/dist/types/src/extends/short.types.d.ts.map +1 -1
  60. package/dist/types/src/extends/struct.types.d.ts +2 -2
  61. package/dist/types/src/extends/struct.types.d.ts.map +1 -1
  62. package/dist/types/src/functions/convert/textstyle.func.d.ts +15 -0
  63. package/dist/types/src/functions/convert/textstyle.func.d.ts.map +1 -0
  64. package/dist/types/src/functions/debug/container.func.d.ts.map +1 -1
  65. package/dist/types/src/functions/debug/line.func.d.ts.map +1 -1
  66. package/dist/types/src/functions/demotexture.func.d.ts.map +1 -1
  67. package/dist/types/src/functions/draw/canvasExtract.func.d.ts +6 -6
  68. package/dist/types/src/functions/draw/canvasExtract.func.d.ts.map +1 -1
  69. package/dist/types/src/functions/draw/radialGradient.func.d.ts +2 -2
  70. package/dist/types/src/functions/draw/radialGradient.func.d.ts.map +1 -1
  71. package/dist/types/src/functions/draw/rect.func.d.ts.map +1 -1
  72. package/dist/types/src/functions/is.funcs.d.ts +5 -0
  73. package/dist/types/src/functions/is.funcs.d.ts.map +1 -1
  74. package/dist/types/src/functions/object/deepMerge.d.ts +2 -1
  75. package/dist/types/src/functions/object/deepMerge.d.ts.map +1 -1
  76. package/dist/types/src/index.d.ts +2 -0
  77. package/dist/types/src/index.d.ts.map +1 -1
  78. package/dist/types/src/libs/particles/ContainerParticle.d.ts +123 -0
  79. package/dist/types/src/libs/particles/ContainerParticle.d.ts.map +1 -0
  80. package/dist/types/src/libs/particles/Emitter.d.ts +303 -0
  81. package/dist/types/src/libs/particles/Emitter.d.ts.map +1 -0
  82. package/dist/types/src/libs/particles/EmitterConfig.d.ts +228 -0
  83. package/dist/types/src/libs/particles/EmitterConfig.d.ts.map +1 -0
  84. package/dist/types/src/libs/particles/Particle.d.ts +70 -0
  85. package/dist/types/src/libs/particles/Particle.d.ts.map +1 -0
  86. package/dist/types/src/libs/particles/ParticleUtils.d.ts +95 -0
  87. package/dist/types/src/libs/particles/ParticleUtils.d.ts.map +1 -0
  88. package/dist/types/src/libs/particles/PropertyList.d.ts +40 -0
  89. package/dist/types/src/libs/particles/PropertyList.d.ts.map +1 -0
  90. package/dist/types/src/libs/particles/PropertyNode.d.ts +74 -0
  91. package/dist/types/src/libs/particles/PropertyNode.d.ts.map +1 -0
  92. package/dist/types/src/libs/particles/behaviors/AccelerationMovement.d.ts +62 -0
  93. package/dist/types/src/libs/particles/behaviors/AccelerationMovement.d.ts.map +1 -0
  94. package/dist/types/src/libs/particles/behaviors/Alpha.d.ts +60 -0
  95. package/dist/types/src/libs/particles/behaviors/Alpha.d.ts.map +1 -0
  96. package/dist/types/src/libs/particles/behaviors/AnimatedTexture.d.ts +111 -0
  97. package/dist/types/src/libs/particles/behaviors/AnimatedTexture.d.ts.map +1 -0
  98. package/dist/types/src/libs/particles/behaviors/Behaviors.d.ts +71 -0
  99. package/dist/types/src/libs/particles/behaviors/Behaviors.d.ts.map +1 -0
  100. package/dist/types/src/libs/particles/behaviors/BlendMode.d.ts +31 -0
  101. package/dist/types/src/libs/particles/behaviors/BlendMode.d.ts.map +1 -0
  102. package/dist/types/src/libs/particles/behaviors/BurstSpawn.d.ts +43 -0
  103. package/dist/types/src/libs/particles/behaviors/BurstSpawn.d.ts.map +1 -0
  104. package/dist/types/src/libs/particles/behaviors/Color.d.ts +60 -0
  105. package/dist/types/src/libs/particles/behaviors/Color.d.ts.map +1 -0
  106. package/dist/types/src/libs/particles/behaviors/OrderedTexture.d.ts +33 -0
  107. package/dist/types/src/libs/particles/behaviors/OrderedTexture.d.ts.map +1 -0
  108. package/dist/types/src/libs/particles/behaviors/PathMovement.d.ts +68 -0
  109. package/dist/types/src/libs/particles/behaviors/PathMovement.d.ts.map +1 -0
  110. package/dist/types/src/libs/particles/behaviors/PointSpawn.d.ts +21 -0
  111. package/dist/types/src/libs/particles/behaviors/PointSpawn.d.ts.map +1 -0
  112. package/dist/types/src/libs/particles/behaviors/RandomTexture.d.ts +32 -0
  113. package/dist/types/src/libs/particles/behaviors/RandomTexture.d.ts.map +1 -0
  114. package/dist/types/src/libs/particles/behaviors/Rotation.d.ts +114 -0
  115. package/dist/types/src/libs/particles/behaviors/Rotation.d.ts.map +1 -0
  116. package/dist/types/src/libs/particles/behaviors/Scale.d.ts +74 -0
  117. package/dist/types/src/libs/particles/behaviors/Scale.d.ts.map +1 -0
  118. package/dist/types/src/libs/particles/behaviors/ShapeSpawn.d.ts +58 -0
  119. package/dist/types/src/libs/particles/behaviors/ShapeSpawn.d.ts.map +1 -0
  120. package/dist/types/src/libs/particles/behaviors/SingleTexture.d.ts +32 -0
  121. package/dist/types/src/libs/particles/behaviors/SingleTexture.d.ts.map +1 -0
  122. package/dist/types/src/libs/particles/behaviors/SpeedMovement.d.ts +76 -0
  123. package/dist/types/src/libs/particles/behaviors/SpeedMovement.d.ts.map +1 -0
  124. package/dist/types/src/libs/particles/behaviors/editor/Types.d.ts +104 -0
  125. package/dist/types/src/libs/particles/behaviors/editor/Types.d.ts.map +1 -0
  126. package/dist/types/src/libs/particles/behaviors/index.d.ts +21 -0
  127. package/dist/types/src/libs/particles/behaviors/index.d.ts.map +1 -0
  128. package/dist/types/src/libs/particles/behaviors/shapes/PolygonalChain.d.ts +57 -0
  129. package/dist/types/src/libs/particles/behaviors/shapes/PolygonalChain.d.ts.map +1 -0
  130. package/dist/types/src/libs/particles/behaviors/shapes/Rectangle.d.ts +59 -0
  131. package/dist/types/src/libs/particles/behaviors/shapes/Rectangle.d.ts.map +1 -0
  132. package/dist/types/src/libs/particles/behaviors/shapes/SpawnShape.d.ts +32 -0
  133. package/dist/types/src/libs/particles/behaviors/shapes/SpawnShape.d.ts.map +1 -0
  134. package/dist/types/src/libs/particles/behaviors/shapes/Torus.d.ts +71 -0
  135. package/dist/types/src/libs/particles/behaviors/shapes/Torus.d.ts.map +1 -0
  136. package/dist/types/src/libs/particles/behaviors/shapes/index.d.ts +5 -0
  137. package/dist/types/src/libs/particles/behaviors/shapes/index.d.ts.map +1 -0
  138. package/dist/types/src/libs/particles/index.d.ts +9 -0
  139. package/dist/types/src/libs/particles/index.d.ts.map +1 -0
  140. package/dist/types/src/scenes/masked.scene.d.ts.map +1 -1
  141. package/dist/types/vite.config.d.ts.map +1 -1
  142. package/dist/webworkerAll-chunk.js +3 -0
  143. package/package.json +11 -8
@@ -0,0 +1,70 @@
1
+ import { Sprite } from 'pixi.js';
2
+ import { Emitter } from './Emitter';
3
+ /**
4
+ * An individual particle image. You shouldn't have to deal with these.
5
+ *
6
+ * Спрайтовая частица — используется, когда эмиттеру передан обычный PIXI.Container.
7
+ * Выбирай этот режим, если эффекту нужно что-то из возможностей полноценного спрайта:
8
+ * - свой blendMode на каждую частицу (behavior 'blendMode')
9
+ * - текстуры из разных атласов в одном эмиттере
10
+ * - встраивание частиц в z-порядок сцены (addAtBack, объекты между частицами)
11
+ * - фильтры/маски/вложенные объекты на отдельной частице
12
+ *
13
+ * Для массовых однородных эффектов (снег, конфетти, монетопад) лучше лёгкая
14
+ * ContainerParticle через PIXI.ParticleContainer — см. ContainerParticle.ts
15
+ */
16
+ export declare class Particle extends Sprite {
17
+ /**
18
+ * The emitter that controls this particle.
19
+ */
20
+ emitter: Emitter;
21
+ /**
22
+ * The maximum lifetime of this particle, in seconds.
23
+ */
24
+ maxLife: number;
25
+ /**
26
+ * The current age of the particle, in seconds.
27
+ */
28
+ age: number;
29
+ /**
30
+ * The current age of the particle as a normalized value between 0 and 1.
31
+ */
32
+ agePercent: number;
33
+ /**
34
+ * One divided by the max life of the particle, saved for slightly faster math.
35
+ */
36
+ oneOverLife: number;
37
+ /**
38
+ * Reference to the next particle in the list.
39
+ */
40
+ next: Particle;
41
+ /**
42
+ * Reference to the previous particle in the list.
43
+ */
44
+ prev: Particle;
45
+ prevChild: Particle;
46
+ nextChild: Particle;
47
+ /**
48
+ * Static per-particle configuration for behaviors to use. Is not cleared when recycling.
49
+ */
50
+ config: Record<string, any>;
51
+ /**
52
+ * @param emitter The emitter that controls this particle.
53
+ */
54
+ constructor(emitter: Emitter);
55
+ /**
56
+ * Initializes the particle for use, based on the properties that have to
57
+ * have been set already on the particle.
58
+ */
59
+ init(maxLife: number): void;
60
+ /**
61
+ * Kills the particle, removing it from the display list
62
+ * and telling the emitter to recycle it.
63
+ */
64
+ kill(): void;
65
+ /**
66
+ * Destroys the particle, removing references and preventing future use.
67
+ */
68
+ destroy(): void;
69
+ }
70
+ //# sourceMappingURL=Particle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Particle.d.ts","sourceRoot":"","sources":["../../../../../src/libs/particles/Particle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC;;;;;;;;;;;;GAYG;AACH,qBAAa,QAAS,SAAQ,MAAM;IAChC;;OAEG;IACI,OAAO,EAAE,OAAO,CAAA;IACvB;;OAEG;IACI,OAAO,EAAE,MAAM,CAAA;IACtB;;OAEG;IACI,GAAG,EAAE,MAAM,CAAA;IAClB;;OAEG;IACI,UAAU,EAAE,MAAM,CAAA;IACzB;;OAEG;IACI,WAAW,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACI,IAAI,EAAE,QAAQ,CAAA;IAErB;;OAEG;IACI,IAAI,EAAE,QAAQ,CAAA;IAEd,SAAS,EAAE,QAAQ,CAAA;IACnB,SAAS,EAAE,QAAQ,CAAA;IAE1B;;OAEG;IACI,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAElC;;OAEG;gBACS,OAAO,EAAE,OAAO;IAuB5B;;;OAGG;IACI,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAiBlC;;;OAGG;IACI,IAAI,IAAI,IAAI;IAInB;;OAEG;IACI,OAAO,IAAI,IAAI;CAOzB"}
@@ -0,0 +1,95 @@
1
+ import { BLEND_MODES, Texture, PointData } from 'pixi.js';
2
+ import { PropertyNode, ValueStep } from './PropertyNode';
3
+ /**
4
+ * The method used by behaviors to fetch textures. Defaults to Texture.from.
5
+ */
6
+ export declare let GetTextureFromString: (d: string) => Texture;
7
+ /**
8
+ * A color value, split apart for interpolation.
9
+ */
10
+ export type Color = {
11
+ r: number;
12
+ g: number;
13
+ b: number;
14
+ a?: number;
15
+ };
16
+ export type EaseSegment = {
17
+ cp: number;
18
+ s: number;
19
+ e: number;
20
+ };
21
+ /**
22
+ * The basic easing function used. Takes in a value between 0-1, and outputs another value between 0-1.
23
+ * For example, a basic quadratic in ease would be `(time) => time * time`
24
+ */
25
+ export type SimpleEase = (time: number) => number;
26
+ /**
27
+ * If errors and warnings should be logged within the library.
28
+ */
29
+ export declare const verbose = false;
30
+ export declare const DEG_TO_RADS: number;
31
+ /**
32
+ * Rotates a point by a given angle.
33
+ * @param angle The angle to rotate by in radians
34
+ * @param p The point to rotate around 0,0.
35
+ */
36
+ export declare function rotatePoint(angle: number, p: PointData): void;
37
+ /**
38
+ * Combines separate color components (0-255) into a single uint color.
39
+ * @param r The red value of the color
40
+ * @param g The green value of the color
41
+ * @param b The blue value of the color
42
+ * @return The color in the form of 0xRRGGBB
43
+ */
44
+ export declare function combineRGBComponents(r: number, g: number, b: number): number;
45
+ /**
46
+ * Returns the length (or magnitude) of this point.
47
+ * @param point The point to measure length
48
+ * @return The length of this point.
49
+ */
50
+ export declare function length(point: PointData): number;
51
+ /**
52
+ * Reduces the point to a length of 1.
53
+ * @param point The point to normalize
54
+ */
55
+ export declare function normalize(point: PointData): void;
56
+ /**
57
+ * Multiplies the x and y values of this point by a value.
58
+ * @param point The point to scaleBy
59
+ * @param value The value to scale by.
60
+ */
61
+ export declare function scaleBy(point: PointData, value: number): void;
62
+ /**
63
+ * Converts a hex string from "#AARRGGBB", "#RRGGBB", "0xAARRGGBB", "0xRRGGBB",
64
+ * "AARRGGBB", or "RRGGBB" to an object of ints of 0-255, as
65
+ * {r, g, b, (a)}.
66
+ * @param color The input color string.
67
+ * @param output An object to put the output in. If omitted, a new object is created.
68
+ * @return The object with r, g, and b properties, possibly with an a property.
69
+ */
70
+ export declare function hexToRGB(color: string, output?: Color): Color;
71
+ /**
72
+ * Generates a custom ease function, based on the GreenSock custom ease, as demonstrated
73
+ * by the related tool at http://www.greensock.com/customease/.
74
+ * @param segments An array of segments, as created by
75
+ * http://www.greensock.com/customease/.
76
+ * @return A function that calculates the percentage of change at
77
+ * a given point in time (0-1 inclusive).
78
+ */
79
+ export declare function generateEase(segments: EaseSegment[]): SimpleEase;
80
+ /**
81
+ * Gets a blend mode, ensuring that it is valid.
82
+ * @param name The name of the blend mode to get.
83
+ * @return The blend mode as a PIXI.BLEND_MODES string value.
84
+ */
85
+ export declare function getBlendMode(name: string): BLEND_MODES;
86
+ /**
87
+ * Converts a list of {value, time} objects starting at time 0 and ending at time 1 into an evenly
88
+ * spaced stepped list of PropertyNodes for color values. This is primarily to handle conversion of
89
+ * linear gradients to fewer colors, allowing for some optimization for Canvas2d fallbacks.
90
+ * @param list The list of data to convert.
91
+ * @param [numSteps=10] The number of steps to use.
92
+ * @return The blend mode as specified in the PIXI.blendModes enumeration.
93
+ */
94
+ export declare function createSteppedGradient(list: ValueStep<string>[], numSteps?: number): PropertyNode<Color>;
95
+ //# sourceMappingURL=ParticleUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParticleUtils.d.ts","sourceRoot":"","sources":["../../../../../src/libs/particles/ParticleUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAExD;;GAEG;AAGH,eAAO,IAAI,oBAAoB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAsB,CAAA;AAEtE;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IAChB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACZ,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;AAEjD;;GAEG;AACH,eAAO,MAAM,OAAO,QAAQ,CAAA;AAE5B,eAAO,MAAM,WAAW,QAAgB,CAAA;AAExC;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,GAAG,IAAI,CAU7D;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAY,MAAM,CAErF;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAE/C;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAWhD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAG7D;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,CAuB7D;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,UAAU,CAmBhE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAItD;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,SAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAqCnG"}
@@ -0,0 +1,40 @@
1
+ import { SimpleEase } from './ParticleUtils';
2
+ import { PropertyNode } from './PropertyNode';
3
+ /**
4
+ * Singly linked list container for keeping track of interpolated properties for particles.
5
+ * Each Particle will have one of these for each interpolated property.
6
+ */
7
+ export declare class PropertyList<V> {
8
+ /**
9
+ * The first property node in the linked list.
10
+ */
11
+ first: PropertyNode<V>;
12
+ /**
13
+ * Calculates the correct value for the current interpolation value. This method is set in
14
+ * the reset() method.
15
+ * @param lerp The interpolation value from 0-1.
16
+ * @return The interpolated value. Colors are converted to the hex value.
17
+ */
18
+ interpolate: (lerp: number) => number;
19
+ /**
20
+ * A custom easing method for this list.
21
+ * @param lerp The interpolation value from 0-1.
22
+ * @return The eased value, also from 0-1.
23
+ */
24
+ ease: SimpleEase;
25
+ /**
26
+ * If this list manages colors, which requires a different method for interpolation.
27
+ */
28
+ private isColor;
29
+ /**
30
+ * @param isColor If this list handles color values
31
+ */
32
+ constructor(isColor?: boolean);
33
+ /**
34
+ * Resets the list for use.
35
+ * @param first The first node in the list.
36
+ * @param first.isStepped If the values should be stepped instead of interpolated linearly.
37
+ */
38
+ reset(first: PropertyNode<V>): void;
39
+ }
40
+ //# sourceMappingURL=PropertyList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertyList.d.ts","sourceRoot":"","sources":["../../../../../src/libs/particles/PropertyList.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAsF7C;;;GAGG;AACH,qBAAa,YAAY,CAAC,CAAC;IACvB;;OAEG;IACI,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;IAC7B;;;;;OAKG;IACI,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IAC5C;;;;OAIG;IACI,IAAI,EAAE,UAAU,CAAA;IACvB;;OAEG;IACH,OAAO,CAAC,OAAO,CAAS;IAExB;;OAEG;gBACS,OAAO,UAAQ;IAO3B;;;;OAIG;IACI,KAAK,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI;CAa7C"}
@@ -0,0 +1,74 @@
1
+ import { BasicTweenable } from './EmitterConfig';
2
+ import { Color, EaseSegment, SimpleEase } from './ParticleUtils';
3
+ /**
4
+ * A single step of a ValueList.
5
+ */
6
+ export type ValueStep<T> = {
7
+ /**
8
+ * The color or number to use at this step.
9
+ */
10
+ value: T;
11
+ /**
12
+ * The percentage time of the particle's lifespan that this step happens at.
13
+ * Values are between 0 and 1, inclusive.
14
+ */
15
+ time: number;
16
+ };
17
+ /**
18
+ * Configuration for an interpolated or stepped list of numeric or color particle values.
19
+ */
20
+ export type ValueList<T> = {
21
+ /**
22
+ * The ordered list of values.
23
+ */
24
+ list: ValueStep<T>[];
25
+ /**
26
+ * If the list is stepped. Stepped lists don't determine any in-between values, instead sticking with each value
27
+ * until its time runs out.
28
+ */
29
+ isStepped?: boolean;
30
+ /**
31
+ * Easing that should be applied to this list, in order to alter how quickly the steps progress.
32
+ */
33
+ ease?: SimpleEase | EaseSegment[];
34
+ };
35
+ /**
36
+ * A single node in a PropertyList.
37
+ */
38
+ export declare class PropertyNode<V> {
39
+ /**
40
+ * Value for the node.
41
+ */
42
+ value: V;
43
+ /**
44
+ * Time value for the node. Between 0-1.
45
+ */
46
+ time: number;
47
+ /**
48
+ * The next node in line.
49
+ */
50
+ next: PropertyNode<V>;
51
+ /**
52
+ * If this is the first node in the list, controls if the entire list is stepped or not.
53
+ */
54
+ isStepped: boolean;
55
+ ease: SimpleEase;
56
+ /**
57
+ * @param value The value for this node
58
+ * @param time The time for this node, between 0-1
59
+ * @param [ease] Custom ease for this list. Only relevant for the first node.
60
+ */
61
+ constructor(value: V, time: number, ease?: SimpleEase | EaseSegment[]);
62
+ /**
63
+ * Creates a list of property values from a data object {list, isStepped} with a list of objects in
64
+ * the form {value, time}. Alternatively, the data object can be in the deprecated form of
65
+ * {start, end}.
66
+ * @param data The data for the list.
67
+ * @param data.list The array of value and time objects.
68
+ * @param data.isStepped If the list is stepped rather than interpolated.
69
+ * @param data.ease Custom ease for this list.
70
+ * @return The first node in the list
71
+ */
72
+ static createList<T extends string | number>(data: ValueList<T> | BasicTweenable<T>): PropertyNode<T extends string ? Color : T>;
73
+ }
74
+ //# sourceMappingURL=PropertyNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertyNode.d.ts","sourceRoot":"","sources":["../../../../../src/libs/particles/PropertyNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,KAAK,EAAE,WAAW,EAA0B,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAExF;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;IACvB;;OAEG;IACH,KAAK,EAAE,CAAC,CAAA;IACR;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;IACvB;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAA;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,WAAW,EAAE,CAAA;CACpC,CAAA;AACD;;GAEG;AACH,qBAAa,YAAY,CAAC,CAAC;IACvB;;OAEG;IACI,KAAK,EAAE,CAAC,CAAA;IACf;;OAEG;IACI,IAAI,EAAE,MAAM,CAAA;IACnB;;OAEG;IACI,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;IAC5B;;OAEG;IACI,SAAS,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,UAAU,CAAA;IAEvB;;;;OAIG;gBACS,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,UAAU,GAAG,WAAW,EAAE;IAYrE;;;;;;;;;OASG;WAEW,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAC9C,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,GACvC,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC;CAqChD"}
@@ -0,0 +1,62 @@
1
+ import { Particle } from '../Particle';
2
+ import { BehaviorOrder, IEmitterBehavior } from './Behaviors';
3
+ import { BehaviorEditorConfig } from './editor/Types';
4
+ /**
5
+ * A Movement behavior that handles movement by applying a constant acceleration to all particles.
6
+ *
7
+ * Example configuration:
8
+ * ```javascript
9
+ * {
10
+ * "type": "moveAcceleration",
11
+ * "config": {
12
+ * "accel": {
13
+ * "x": 0,
14
+ * "y": 2000
15
+ * },
16
+ * "minStart": 600,
17
+ * "maxStart": 600,
18
+ * "rotate": true
19
+ * }
20
+ *}
21
+ * ```
22
+ */
23
+ export declare class AccelerationBehavior implements IEmitterBehavior {
24
+ static type: string;
25
+ static editorConfig: BehaviorEditorConfig;
26
+ order: BehaviorOrder;
27
+ private minStart;
28
+ private maxStart;
29
+ private accel;
30
+ private rotate;
31
+ private maxSpeed;
32
+ constructor(config: {
33
+ /**
34
+ * Minimum speed when initializing the particle, in world units/second.
35
+ */
36
+ minStart: number;
37
+ /**
38
+ * Maximum speed when initializing the particle. in world units/second.
39
+ */
40
+ maxStart: number;
41
+ /**
42
+ * Constant acceleration, in the coordinate space of the particle parent, in world units/second.
43
+ */
44
+ accel: {
45
+ x: number;
46
+ y: number;
47
+ };
48
+ /**
49
+ * Rotate the particle with its direction of movement.
50
+ * While initial movement direction reacts to rotation settings, this overrides any dynamic rotation.
51
+ * Defaults to false.
52
+ */
53
+ rotate?: boolean;
54
+ /**
55
+ * Maximum linear speed. 0 is unlimited. Defaults to 0.
56
+ */
57
+ maxSpeed?: number;
58
+ });
59
+ initParticles(first: Particle): void;
60
+ updateParticle(particle: Particle, deltaSec: number): void;
61
+ }
62
+ //# sourceMappingURL=AccelerationMovement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccelerationMovement.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/particles/behaviors/AccelerationMovement.ts"],"names":[],"mappings":"AAEA,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;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,oBAAqB,YAAW,gBAAgB;IACzD,OAAc,IAAI,SAAqB;IACvC,OAAc,YAAY,EAAE,oBAAoB,CAAO;IAIhD,KAAK,gBAAqB;IACjC,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,KAAK,CAA0B;IACvC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAQ;gBACZ,MAAM,EAAE;QAChB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAA;QAChB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAA;QAChB;;WAEG;QACH,KAAK,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;QAC/B;;;;WAIG;QACH,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAA;KACpB;IAQD,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAkBpC,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAuB7D"}
@@ -0,0 +1,60 @@
1
+ import { Particle } from '../Particle';
2
+ import { ValueList } from '../PropertyNode';
3
+ import { BehaviorOrder, IEmitterBehavior } from './Behaviors';
4
+ import { BehaviorEditorConfig } from './editor/Types';
5
+ /**
6
+ * An Alpha behavior that applies an interpolated or stepped list of values to the particle's opacity.
7
+ *
8
+ * Example config:
9
+ * ```javascript
10
+ * {
11
+ * type: 'alpha',
12
+ * config: {
13
+ * alpha: {
14
+ * list: [{value: 0, time: 0}, {value: 1, time: 0.25}, {value: 0, time: 1}]
15
+ * },
16
+ * }
17
+ * }
18
+ * ```
19
+ */
20
+ export declare class AlphaBehavior implements IEmitterBehavior {
21
+ static type: string;
22
+ static editorConfig: BehaviorEditorConfig;
23
+ order: BehaviorOrder;
24
+ private list;
25
+ constructor(config: {
26
+ /**
27
+ * Transparency of the particles from 0 (transparent) to 1 (opaque)
28
+ */
29
+ alpha: ValueList<number>;
30
+ });
31
+ initParticles(first: Particle): void;
32
+ updateParticle(particle: Particle): void;
33
+ }
34
+ /**
35
+ * An Alpha behavior that applies a static value to the particle's opacity at particle initialization.
36
+ *
37
+ * Example config:
38
+ * ```javascript
39
+ * {
40
+ * type: 'alphaStatic',
41
+ * config: {
42
+ * alpha: 0.75,
43
+ * }
44
+ * }
45
+ * ```
46
+ */
47
+ export declare class StaticAlphaBehavior implements IEmitterBehavior {
48
+ static type: string;
49
+ static editorConfig: BehaviorEditorConfig;
50
+ order: BehaviorOrder;
51
+ private value;
52
+ constructor(config: {
53
+ /**
54
+ * Transparency of the particles from 0 (transparent) to 1 (opaque)
55
+ */
56
+ alpha: number;
57
+ });
58
+ initParticles(first: Particle): void;
59
+ }
60
+ //# sourceMappingURL=Alpha.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Alpha.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/particles/behaviors/Alpha.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;;;;;;;;;;;;;;GAcG;AACH,qBAAa,aAAc,YAAW,gBAAgB;IAClD,OAAc,IAAI,SAAU;IAC5B,OAAc,YAAY,EAAE,oBAAoB,CAAO;IAEhD,KAAK,gBAAuB;IACnC,OAAO,CAAC,IAAI,CAAsB;gBACtB,MAAM,EAAE;QAChB;;WAEG;QACH,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;KAC3B;IAKD,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IASpC,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAG3C;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,mBAAoB,YAAW,gBAAgB;IACxD,OAAc,IAAI,SAAgB;IAClC,OAAc,YAAY,EAAE,oBAAoB,CAAO;IAEhD,KAAK,gBAAuB;IACnC,OAAO,CAAC,KAAK,CAAQ;gBACT,MAAM,EAAE;QAChB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAA;KAChB;IAID,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;CAQvC"}
@@ -0,0 +1,111 @@
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
+ * The format of a single animation to be used on a particle.
7
+ */
8
+ export type AnimatedParticleArt = {
9
+ /**
10
+ * Framerate for the animation (in frames per second). A value of -1 will tie the framerate to
11
+ * the particle's lifetime so that the animation lasts exactly as long as the particle.
12
+ */
13
+ framerate: -1 | number;
14
+ /**
15
+ * If the animation should loop. Defaults to false.
16
+ */
17
+ loop?: boolean;
18
+ /**
19
+ * A list of textures or frame descriptions for duplicated frames.
20
+ * String values will be converted to textures with {@link ParticleUtils.GetTextureFromString}.
21
+ * Example of a texture repeated for 5 frames, followed by a second texture for one frame:
22
+ * ```javascript
23
+ * [{texture: 'myFirstTex', count: 5}, 'mySecondTex']
24
+ * ```
25
+ */
26
+ textures: (string | Texture | {
27
+ texture: string | Texture;
28
+ count: number;
29
+ })[];
30
+ };
31
+ /**
32
+ * Internal data format for playback.
33
+ */
34
+ export type ParsedAnimatedParticleArt = {
35
+ textures: Texture[];
36
+ duration: number;
37
+ framerate: number;
38
+ loop: boolean;
39
+ };
40
+ /**
41
+ * A Texture behavior that picks a random animation for each particle to play.
42
+ * See {@link AnimatedParticleArt} for detailed configuration info.
43
+ *
44
+ * Example config:
45
+ * ```javascript
46
+ * {
47
+ * type: 'animatedRandom',
48
+ * config: {
49
+ * anims: [
50
+ * {
51
+ * framerate: 25,
52
+ * loop: true,
53
+ * textures: ['frame1', 'frame2', 'frame3']
54
+ * },
55
+ * {
56
+ * framerate: 25,
57
+ * loop: true,
58
+ * textures: ['frame3', 'frame2', 'frame1']
59
+ * }
60
+ * ],
61
+ * }
62
+ * }
63
+ * ```
64
+ */
65
+ export declare class RandomAnimatedTextureBehavior implements IEmitterBehavior {
66
+ static type: string;
67
+ static editorConfig: BehaviorEditorConfig;
68
+ order: BehaviorOrder;
69
+ private anims;
70
+ constructor(config: {
71
+ /**
72
+ * Animation configuration to use for each particle, randomly chosen from the list.
73
+ */
74
+ anims: AnimatedParticleArt[];
75
+ });
76
+ initParticles(first: Particle): void;
77
+ updateParticle(particle: Particle, deltaSec: number): void;
78
+ }
79
+ /**
80
+ * A Texture behavior that uses a single animation for each particle to play.
81
+ * See {@link AnimatedParticleArt} for detailed configuration info.
82
+ *
83
+ * Example config:
84
+ * ```javascript
85
+ * {
86
+ * type: 'animatedSingle',
87
+ * config: {
88
+ * anim: {
89
+ * framerate: 25,
90
+ * loop: true,
91
+ * textures: ['frame1', 'frame2', 'frame3']
92
+ * }
93
+ * }
94
+ * }
95
+ * ```
96
+ */
97
+ export declare class SingleAnimatedTextureBehavior implements IEmitterBehavior {
98
+ static type: string;
99
+ static editorConfig: BehaviorEditorConfig;
100
+ order: BehaviorOrder;
101
+ private anim;
102
+ constructor(config: {
103
+ /**
104
+ * Animation configuration to use for each particle.
105
+ */
106
+ anim: AnimatedParticleArt;
107
+ });
108
+ initParticles(first: Particle): void;
109
+ updateParticle(particle: Particle, deltaSec: number): void;
110
+ }
111
+ //# sourceMappingURL=AnimatedTexture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnimatedTexture.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/particles/behaviors/AnimatedTexture.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;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAC9B;;;OAGG;IACH,SAAS,EAAE,CAAC,CAAC,GAAG,MAAM,CAAA;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;;;;;;OAOG;IACH,QAAQ,EAAE,CAAC,MAAM,GAAG,OAAO,GAAG;QAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAA;CAChF,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACpC,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;CAChB,CAAA;AAgCD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,6BAA8B,YAAW,gBAAgB;IAClE,OAAc,IAAI,SAAmB;IACrC,OAAc,YAAY,EAAE,oBAAoB,CAAO;IAEhD,KAAK,gBAAuB;IACnC,OAAO,CAAC,KAAK,CAA6B;gBAC9B,MAAM,EAAE;QAChB;;WAEG;QACH,KAAK,EAAE,mBAAmB,EAAE,CAAA;KAC/B;IAkBD,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAsBpC,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAsB7D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,6BAA8B,YAAW,gBAAgB;IAClE,OAAc,IAAI,SAAmB;IACrC,OAAc,YAAY,EAAE,oBAAoB,CAAO;IAEhD,KAAK,gBAAuB;IACnC,OAAO,CAAC,IAAI,CAA2B;gBAC3B,MAAM,EAAE;QAChB;;WAEG;QACH,IAAI,EAAE,mBAAmB,CAAA;KAC5B;IAcD,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAoBpC,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAsB7D"}
@@ -0,0 +1,71 @@
1
+ import { Particle } from '../Particle';
2
+ import { BehaviorEditorConfig } from './editor/Types';
3
+ /**
4
+ * All behaviors instances must implement this interface, and the class must match the
5
+ * {@link IEmitterBehaviorClass} interface. All behaviors must have an order property and
6
+ * `initParticles` method. Implementing the `updateParticle` or `recycleParticle` methods is optional.
7
+ */
8
+ export type IEmitterBehavior = {
9
+ /**
10
+ * Order in which the behavior will be handled. Lower numbers are handled earlier, with an order of 0 getting
11
+ * special treatment before the Emitter's transformation is applied.
12
+ */
13
+ order: number;
14
+ /**
15
+ * Called to initialize a wave of particles, with a reference to the first particle in the linked list.
16
+ * @param first The first (maybe only) particle in a newly spawned wave of particles.
17
+ */
18
+ initParticles(first: Particle): void;
19
+ /**
20
+ * Updates a single particle for a given period of time elapsed. Return `true` to recycle the particle.
21
+ * @param particle The particle to update.
22
+ * @param deltaSec The time to advance the particle by in seconds.
23
+ */
24
+ updateParticle?(particle: Particle, deltaSec: number): void | boolean;
25
+ /**
26
+ * A hook for when a particle is recycled.
27
+ * @param particle The particle that was just recycled.
28
+ * @param natural `true` if the reycling was due to natural lifecycle, `false` if it was due to emitter cleanup.
29
+ */
30
+ recycleParticle?(particle: Particle, natural: boolean): void;
31
+ };
32
+ /**
33
+ * All behavior classes must match this interface. The instances need to implement the {@link IEmitterBehavior} interface.
34
+ */
35
+ export type IEmitterBehaviorClass = {
36
+ /**
37
+ * The unique type name that the behavior is registered under.
38
+ */
39
+ type: string;
40
+ /**
41
+ * Configuration data for an editor to display this behavior. Does not need to exist in production code.
42
+ */
43
+ editorConfig?: BehaviorEditorConfig;
44
+ /**
45
+ * The behavior constructor itself.
46
+ * @param config The config for the behavior, which should match its defined specifications.
47
+ */
48
+ new (config: any): IEmitterBehavior;
49
+ };
50
+ /**
51
+ * Standard behavior order values, specifying when/how they are used. Other numeric values can be used,
52
+ * but only the Spawn value will be handled in a special way. All other values will be sorted numerically.
53
+ * Behaviors with the same value will not be given any specific sort order, as they are assumed to not
54
+ * interfere with each other.
55
+ */
56
+ export declare enum BehaviorOrder {
57
+ /**
58
+ * Spawn - initial placement and/or rotation. This happens before rotation/translation due to
59
+ * emitter rotation/position is applied.
60
+ */
61
+ Spawn = 0,
62
+ /**
63
+ * Normal priority, for things that don't matter when they are applied.
64
+ */
65
+ Normal = 2,
66
+ /**
67
+ * Delayed priority, for things that need to read other values in order to act correctly.
68
+ */
69
+ Late = 5
70
+ }
71
+ //# sourceMappingURL=Behaviors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Behaviors.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/particles/behaviors/Behaviors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAErD;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC3B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;IACpC;;;;OAIG;IACH,cAAc,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAA;IACrE;;;;OAIG;IACH,eAAe,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;CAC/D,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACnC;;;OAGG;IACH,KAAK,MAAM,EAAE,GAAG,GAAG,gBAAgB,CAAA;CACtC,CAAA;AAED;;;;;GAKG;AACH,oBAAY,aAAa;IACrB;;;OAGG;IACH,KAAK,IAAI;IACT;;OAEG;IACH,MAAM,IAAI;IACV;;OAEG;IACH,IAAI,IAAI;CACX"}
@@ -0,0 +1,31 @@
1
+ import { Particle } from '../Particle';
2
+ import { BehaviorOrder, IEmitterBehavior } from './Behaviors';
3
+ import { BehaviorEditorConfig } from './editor/Types';
4
+ /**
5
+ * A Blend Mode behavior that applies a blend mode value to the particle at initialization.
6
+ *
7
+ * Example config:
8
+ * ```javascript
9
+ * {
10
+ * type: 'blendMode',
11
+ * config: {
12
+ * blendMode: 'multiply',
13
+ * }
14
+ * }
15
+ * ```
16
+ */
17
+ export declare class BlendModeBehavior implements IEmitterBehavior {
18
+ static type: string;
19
+ static editorConfig: BehaviorEditorConfig;
20
+ order: BehaviorOrder;
21
+ private value;
22
+ constructor(config: {
23
+ /**
24
+ * Blend mode of all particles. This value is a key from
25
+ * [PixiJs's BLEND_MODE enum](https://pixijs.download/release/docs/PIXI.html#BLEND_MODES).
26
+ */
27
+ blendMode: string;
28
+ });
29
+ initParticles(first: Particle): void;
30
+ }
31
+ //# sourceMappingURL=BlendMode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlendMode.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/particles/behaviors/BlendMode.ts"],"names":[],"mappings":"AAAA,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;;;;;;;;;;;;GAYG;AACH,qBAAa,iBAAkB,YAAW,gBAAgB;IACtD,OAAc,IAAI,SAAc;IAChC,OAAc,YAAY,EAAE,oBAAoB,CAAO;IAEhD,KAAK,gBAAuB;IACnC,OAAO,CAAC,KAAK,CAAQ;gBACT,MAAM,EAAE;QAChB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAA;KACpB;IAID,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;CAQvC"}