@truelab/truengine 3.0.0 → 4.0.0-rc.1

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 +19051 -15410
  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,123 @@
1
+ import { Particle as PixiParticle, BLEND_MODES } from 'pixi.js';
2
+ import { Emitter } from './Emitter';
3
+ /**
4
+ * Прокси position над полями x/y лёгкой v8-частицы (behaviors эмиттера работают с particle.position.x/y)
5
+ */
6
+ declare class PositionProxy {
7
+ private readonly particle;
8
+ constructor(particle: PixiParticle);
9
+ get x(): number;
10
+ set x(value: number);
11
+ get y(): number;
12
+ set y(value: number);
13
+ set(x?: number, y?: number): void;
14
+ }
15
+ /**
16
+ * Прокси scale над полями scaleX/scaleY
17
+ */
18
+ declare class ScaleProxy {
19
+ private readonly particle;
20
+ constructor(particle: PixiParticle);
21
+ get x(): number;
22
+ set x(value: number);
23
+ get y(): number;
24
+ set y(value: number);
25
+ set(x?: number, y?: number): void;
26
+ }
27
+ /**
28
+ * Прокси anchor над полями anchorX/anchorY
29
+ */
30
+ declare class AnchorProxy {
31
+ private readonly particle;
32
+ constructor(particle: PixiParticle);
33
+ get x(): number;
34
+ set x(value: number);
35
+ get y(): number;
36
+ set y(value: number);
37
+ set(x?: number, y?: number): void;
38
+ }
39
+ /**
40
+ * Лёгкая частица для рендера через PIXI.ParticleContainer.
41
+ *
42
+ * Используется автоматически, когда эмиттеру передан PIXI.ParticleContainer.
43
+ * Выбирай этот режим для массовых однородных эффектов (снег, конфетти, монетопад):
44
+ * весь эффект рисуется одним дроуколлом, тысячи частиц почти не нагружают CPU/GPU.
45
+ * Не забудь про dynamicProperties контейнера: динамическими должны быть только те
46
+ * свойства, которые анимирует конфиг (vertex — scale, color — alpha/цвет, uvs — смена текстур).
47
+ *
48
+ * Публичная поверхность совместима с обычной Particle (extends Sprite): behaviors эмиттера
49
+ * работают с position/scale/anchor/rotation/alpha/tint/texture без изменений.
50
+ *
51
+ * Ограничения ParticleContainer (если что-то из этого нужно — используй спрайтовый
52
+ * режим с обычным Container, см. Particle.ts):
53
+ * - текстуры всех частиц должны быть из одного атласа (один источник на дроуколл)
54
+ * - per-particle blendMode не поддерживается (поле принимается и игнорируется)
55
+ * - у частиц нет фильтров, масок и вложенных объектов
56
+ */
57
+ export declare class ContainerParticle extends PixiParticle {
58
+ /**
59
+ * The emitter that controls this particle.
60
+ */
61
+ emitter: Emitter;
62
+ /**
63
+ * The maximum lifetime of this particle, in seconds.
64
+ */
65
+ maxLife: number;
66
+ /**
67
+ * The current age of the particle, in seconds.
68
+ */
69
+ age: number;
70
+ /**
71
+ * The current age of the particle as a normalized value between 0 and 1.
72
+ */
73
+ agePercent: number;
74
+ /**
75
+ * One divided by the max life of the particle, saved for slightly faster math.
76
+ */
77
+ oneOverLife: number;
78
+ /**
79
+ * Reference to the next particle in the list.
80
+ */
81
+ next: ContainerParticle;
82
+ /**
83
+ * Reference to the previous particle in the list.
84
+ */
85
+ prev: ContainerParticle;
86
+ prevChild: ContainerParticle;
87
+ nextChild: ContainerParticle;
88
+ /**
89
+ * Static per-particle configuration for behaviors to use. Is not cleared when recycling.
90
+ */
91
+ config: {
92
+ [key: string]: any;
93
+ };
94
+ /** Принимается от BlendModeBehavior, но ParticleContainer рендерит одним блендом — игнорируется */
95
+ blendMode: BLEND_MODES;
96
+ /** Флаг видимости для совместимости с эмиттером; рендер частицы им не управляет */
97
+ visible: boolean;
98
+ /** ParticleContainer не является родителем в терминах сцен-графа — удаление делает эмиттер */
99
+ readonly parent: null;
100
+ readonly position: PositionProxy;
101
+ readonly scale: ScaleProxy;
102
+ readonly anchor: AnchorProxy;
103
+ /**
104
+ * @param emitter The emitter that controls this particle.
105
+ */
106
+ constructor(emitter: Emitter);
107
+ /**
108
+ * Initializes the particle for use, based on the properties that have to
109
+ * have been set already on the particle.
110
+ */
111
+ init(maxLife: number): void;
112
+ /**
113
+ * Kills the particle, removing it from the display list
114
+ * and telling the emitter to recycle it.
115
+ */
116
+ kill(): void;
117
+ /**
118
+ * Destroys the particle, removing references and preventing future use.
119
+ */
120
+ destroy(): void;
121
+ }
122
+ export {};
123
+ //# sourceMappingURL=ContainerParticle.d.ts.map
@@ -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,IAAI;CAI1B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IAC/C;;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,iBAAiB,CAAA;IAE9B;;OAEG;IACI,IAAI,EAAE,iBAAiB,CAAA;IAEvB,SAAS,EAAE,iBAAiB,CAAA;IAC5B,SAAS,EAAE,iBAAiB,CAAA;IAEnC;;OAEG;IACI,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAA;IAErC,mGAAmG;IAC5F,SAAS,EAAE,WAAW,CAAA;IAE7B,mFAAmF;IAC5E,OAAO,EAAE,OAAO,CAAA;IAEvB,8FAA8F;IAC9F,SAAgB,MAAM,EAAE,IAAI,CAAO;IAEnC,SAAgB,QAAQ,EAAE,aAAa,CAAA;IACvC,SAAgB,KAAK,EAAE,UAAU,CAAA;IACjC,SAAgB,MAAM,EAAE,WAAW,CAAA;IAEnC;;OAEG;gBACS,OAAO,EAAE,OAAO;IAoB5B;;;OAGG;IACI,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAYlC;;;OAGG;IACI,IAAI,IAAI,IAAI;IAInB;;OAEG;IACI,OAAO,IAAI,IAAI;CAGzB"}
@@ -0,0 +1,303 @@
1
+ import { Container, Point, Ticker } from 'pixi.js';
2
+ import { IEmitterBehavior, IEmitterBehaviorClass } from './behaviors/Behaviors';
3
+ import { EmitterConfigV3 } from './EmitterConfig';
4
+ import { Particle } from './Particle';
5
+ import { SimpleEase } from './ParticleUtils';
6
+ /**
7
+ * Key used in sorted order to determine when to set particle position from the emitter position
8
+ * and rotation.
9
+ */
10
+ declare const PositionParticle: unique symbol;
11
+ /**
12
+ * A particle emitter.
13
+ *
14
+ * Режим рендера выбирается типом контейнера, переданного в конструктор:
15
+ * - обычный PIXI.Container → спрайтовые частицы (Particle), вся гибкость спрайтов
16
+ * - PIXI.ParticleContainer → лёгкие частицы (ContainerParticle), один дроуколл,
17
+ * для массовых эффектов; ограничения см. в ContainerParticle.ts
18
+ *
19
+ * Конфиг (EmitterConfigV3) и behaviors одинаковы для обоих режимов.
20
+ */
21
+ export declare class Emitter {
22
+ private static knownBehaviors;
23
+ /**
24
+ * Registers a new behavior, so that it will be recognized when initializing emitters.
25
+ * Behaviors registered later with duplicate types will override older ones, although there is no limit on
26
+ * the allowed types.
27
+ * @param constructor The behavior class to register.
28
+ */
29
+ static registerBehavior(constructor: IEmitterBehaviorClass): void;
30
+ /**
31
+ * Active initialization behaviors for this emitter.
32
+ */
33
+ protected initBehaviors: (IEmitterBehavior | typeof PositionParticle)[];
34
+ /**
35
+ * Active update behaviors for this emitter.
36
+ */
37
+ protected updateBehaviors: IEmitterBehavior[];
38
+ /**
39
+ * Active recycle behaviors for this emitter.
40
+ */
41
+ protected recycleBehaviors: IEmitterBehavior[];
42
+ /**
43
+ * The minimum lifetime for a particle, in seconds.
44
+ */
45
+ minLifetime: number;
46
+ /**
47
+ * The maximum lifetime for a particle, in seconds.
48
+ */
49
+ maxLifetime: number;
50
+ /**
51
+ * An easing function for nonlinear interpolation of values. Accepts a single
52
+ * parameter of time as a value from 0-1, inclusive. Expected outputs are values
53
+ * from 0-1, inclusive.
54
+ */
55
+ customEase: SimpleEase;
56
+ /**
57
+ * Time between particle spawns in seconds.
58
+ */
59
+ protected _frequency: number;
60
+ /**
61
+ * Chance that a particle will be spawned on each opportunity to spawn one.
62
+ * 0 is 0%, 1 is 100%.
63
+ */
64
+ spawnChance: number;
65
+ /**
66
+ * Maximum number of particles to keep alive at a time. If this limit
67
+ * is reached, no more particles will spawn until some have died.
68
+ */
69
+ maxParticles: number;
70
+ /**
71
+ * The amount of time in seconds to emit for before setting emit to false.
72
+ * A value of -1 is an unlimited amount of time.
73
+ */
74
+ emitterLifetime: number;
75
+ /**
76
+ * Position at which to spawn particles, relative to the emitter's owner's origin.
77
+ * For example, the flames of a rocket travelling right might have a spawnPos
78
+ * of {x:-50, y:0}.
79
+ * to spawn at the rear of the rocket.
80
+ * To change this, use updateSpawnPos().
81
+ */
82
+ spawnPos: Point;
83
+ /**
84
+ * Number of particles to spawn time that the frequency allows for particles to spawn.
85
+ */
86
+ particlesPerWave: number;
87
+ /**
88
+ * Rotation of the emitter or emitter's owner in degrees. This is added to
89
+ * the calculated spawn angle.
90
+ * To change this, use rotate().
91
+ */
92
+ protected rotation: number;
93
+ /**
94
+ * The world position of the emitter's owner, to add spawnPos to when
95
+ * spawning particles. To change this, use updateOwnerPos().
96
+ */
97
+ protected ownerPos: Point;
98
+ /**
99
+ * The origin + spawnPos in the previous update, so that the spawn position
100
+ * can be interpolated to space out particles better.
101
+ */
102
+ protected _prevEmitterPos: Point;
103
+ /**
104
+ * If _prevEmitterPos is valid, to prevent interpolation on the first update
105
+ */
106
+ protected _prevPosIsValid: boolean;
107
+ /**
108
+ * If either ownerPos or spawnPos has changed since the previous update.
109
+ */
110
+ protected _posChanged: boolean;
111
+ /**
112
+ * The container to add particles to.
113
+ */
114
+ protected _parent: Container;
115
+ /**
116
+ * If particles should be added at the back of the display list instead of the front.
117
+ */
118
+ addAtBack: boolean;
119
+ /**
120
+ * The current number of active particles.
121
+ */
122
+ particleCount: number;
123
+ /**
124
+ * If particles should be emitted during update() calls. Setting this to false
125
+ * stops new particles from being created, but allows existing ones to die out.
126
+ */
127
+ protected _emit: boolean;
128
+ /**
129
+ * The timer for when to spawn particles in seconds, where numbers less
130
+ * than 0 mean that particles should be spawned.
131
+ */
132
+ protected _spawnTimer: number;
133
+ /**
134
+ * The life of the emitter in seconds.
135
+ */
136
+ protected _emitterLife: number;
137
+ /**
138
+ * The particles that are active and on the display list. This is the first particle in a
139
+ * linked list.
140
+ */
141
+ protected _activeParticlesFirst: Particle;
142
+ /**
143
+ * The particles that are active and on the display list. This is the last particle in a
144
+ * linked list.
145
+ */
146
+ protected _activeParticlesLast: Particle;
147
+ /**
148
+ * The particles that are not currently being used. This is the first particle in a
149
+ * linked list.
150
+ */
151
+ protected _poolFirst: Particle;
152
+ /**
153
+ * The original config object that this emitter was initialized with.
154
+ */
155
+ protected _origConfig: any;
156
+ /**
157
+ * If the update function is called automatically from the shared ticker.
158
+ * Setting this to false requires calling the update function manually.
159
+ */
160
+ protected _autoUpdate: boolean;
161
+ /**
162
+ * Родитель является PIXI.ParticleContainer (частицы добавляются через addParticle)
163
+ */
164
+ protected _isParticleContainer: boolean;
165
+ /**
166
+ * If the emitter should destroy itself when all particles have died out. This is set by
167
+ * playOnceAndDestroy();
168
+ */
169
+ protected _destroyWhenComplete: boolean;
170
+ /**
171
+ * A callback for when all particles have died out. This is set by
172
+ * playOnceAndDestroy() or playOnce();
173
+ */
174
+ protected _completeCallback: () => void;
175
+ /**
176
+ * @param particleParent The container to add the particles to.
177
+ * @param particleImages A texture or array of textures to use
178
+ * for the particles. Strings will be turned
179
+ * into textures via Texture.from().
180
+ * @param config A configuration object containing settings for the emitter.
181
+ * @param config.emit If config.emit is explicitly passed as false, the
182
+ * Emitter will start disabled.
183
+ * @param config.autoUpdate If config.autoUpdate is explicitly passed as
184
+ * true, the Emitter will automatically call
185
+ * update via the PIXI shared ticker.
186
+ */
187
+ constructor(particleParent: Container, config: EmitterConfigV3);
188
+ /**
189
+ * Time between particle spawns in seconds. If this value is not a number greater than 0,
190
+ * it will be set to 1 (particle per second) to prevent infinite loops.
191
+ */
192
+ get frequency(): number;
193
+ set frequency(value: number);
194
+ /**
195
+ * The container to add particles to. Settings this will dump any active particles.
196
+ */
197
+ get parent(): Container;
198
+ set parent(value: Container);
199
+ /**
200
+ * Создать частицу подходящего класса: лёгкую для ParticleContainer или спрайтовую для обычного контейнера
201
+ */
202
+ protected _createParticle(): Particle;
203
+ /**
204
+ * Добавить частицу в контейнер (addParticle для ParticleContainer, addChild для обычного)
205
+ */
206
+ protected _addParticleToParent(p: Particle): void;
207
+ /**
208
+ * Sets up the emitter based on the config settings.
209
+ * @param config A configuration object containing settings for the emitter.
210
+ */
211
+ init(config: EmitterConfigV3): void;
212
+ /**
213
+ * Gets the instantiated behavior of the specified type, if it is present on this emitter.
214
+ * @param type The behavior type to find.
215
+ */
216
+ getBehavior(type: string): IEmitterBehavior | null;
217
+ /**
218
+ * Fills the pool with the specified number of particles, so that they don't have to be instantiated later.
219
+ * @param count The number of particles to create.
220
+ */
221
+ fillPool(count: number): void;
222
+ /**
223
+ * Recycles an individual particle. For internal use only.
224
+ * @param particle The particle to recycle.
225
+ * @param fromCleanup If this is being called to manually clean up all particles.
226
+ * @internal
227
+ */
228
+ recycle(particle: Particle, fromCleanup?: boolean): void;
229
+ /**
230
+ * Sets the rotation of the emitter to a new value. This rotates the spawn position in addition
231
+ * to particle direction.
232
+ * @param newRot The new rotation, in degrees.
233
+ */
234
+ rotate(newRot: number): void;
235
+ /**
236
+ * Changes the spawn position of the emitter.
237
+ * @param x The new x value of the spawn position for the emitter.
238
+ * @param y The new y value of the spawn position for the emitter.
239
+ */
240
+ updateSpawnPos(x: number, y: number): void;
241
+ /**
242
+ * Changes the position of the emitter's owner. You should call this if you are adding
243
+ * particles to the world container that your emitter's owner is moving around in.
244
+ * @param x The new x value of the emitter's owner.
245
+ * @param y The new y value of the emitter's owner.
246
+ */
247
+ updateOwnerPos(x: number, y: number): void;
248
+ /**
249
+ * Prevents emitter position interpolation in the next update.
250
+ * This should be used if you made a major position change of your emitter's owner
251
+ * that was not normal movement.
252
+ */
253
+ resetPositionTracking(): void;
254
+ /**
255
+ * If particles should be emitted during update() calls. Setting this to false
256
+ * stops new particles from being created, but allows existing ones to die out.
257
+ */
258
+ get emit(): boolean;
259
+ set emit(value: boolean);
260
+ /**
261
+ * If the update function is called automatically from the shared ticker.
262
+ * Setting this to false requires calling the update function manually.
263
+ */
264
+ get autoUpdate(): boolean;
265
+ set autoUpdate(value: boolean);
266
+ /**
267
+ * Starts emitting particles, sets autoUpdate to true, and sets up the Emitter to destroy itself
268
+ * when particle emission is complete.
269
+ * @param callback Callback for when emission is complete (all particles have died off)
270
+ */
271
+ playOnceAndDestroy(callback?: () => void): void;
272
+ /**
273
+ * Starts emitting particles and optionally calls a callback when particle emission is complete.
274
+ * @param callback Callback for when emission is complete (all particles have died off)
275
+ */
276
+ playOnce(callback?: () => void): void;
277
+ /**
278
+ * Updates all particles spawned by this emitter and emits new ones.
279
+ * @param delta Time elapsed since the previous frame, in __seconds__.
280
+ */
281
+ update(delta: number | Ticker): void;
282
+ /**
283
+ * Emits a single wave of particles, using standard spawnChance & particlesPerWave settings. Does not affect
284
+ * regular spawning through the frequency, and ignores the emit property. The max particle count is respected, however,
285
+ * so if there are already too many particles then nothing will happen.
286
+ */
287
+ emitNow(): void;
288
+ /**
289
+ * Kills all active particles immediately.
290
+ */
291
+ cleanup(): void;
292
+ /**
293
+ * If this emitter has been destroyed. Note that a destroyed emitter can still be reused, after
294
+ * having a new parent set and being reinitialized.
295
+ */
296
+ get destroyed(): boolean;
297
+ /**
298
+ * Destroys the emitter and all of its particles.
299
+ */
300
+ destroy(): void;
301
+ }
302
+ export {};
303
+ //# sourceMappingURL=Emitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Emitter.d.ts","sourceRoot":"","sources":["../../../../../src/libs/particles/Emitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAGhC,OAAO,EAAiB,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAE9F,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE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I,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAQzD;;;OAGG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IASpC;;;;;OAKG;IACI,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,UAAQ,GAAG,IAAI;IA8B7D;;;;OAIG;IACI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAYnC;;;;OAIG;IACI,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAMjD;;;;;OAKG;IACI,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAMjD;;;;OAIG;IACI,qBAAqB,IAAI,IAAI;IAIpC;;;OAGG;IACH,IAAW,IAAI,IAAI,OAAO,CAEzB;IAED,IAAW,IAAI,CAAC,KAAK,EAAE,OAAO,EAG7B;IAED;;;OAGG;IACH,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED,IAAW,UAAU,CAAC,KAAK,EAAE,OAAO,EAOnC;IAED;;;;OAIG;IACI,kBAAkB,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAOtD;;;OAGG;IACI,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAK5C;;;OAGG;IACI,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAyP3C;;;;OAIG;IACI,OAAO,IAAI,IAAI;IAmFtB;;OAEG;IACI,OAAO,IAAI,IAAI;IAYtB;;;OAGG;IACH,IAAW,SAAS,IAAI,OAAO,CAE9B;IAED;;OAEG;IACI,OAAO,IAAI,IAAI;CAiBzB"}
@@ -0,0 +1,228 @@
1
+ import { PointData } from 'pixi.js';
2
+ import { EaseSegment, SimpleEase } from './ParticleUtils';
3
+ import { ValueList } from './PropertyNode';
4
+ /**
5
+ * Full Emitter configuration for initializing an Emitter instance.
6
+ */
7
+ export type EmitterConfigV3 = {
8
+ /**
9
+ * Random number configuration for picking the lifetime for each particle..
10
+ */
11
+ lifetime: RandNumber;
12
+ /**
13
+ * Easing to be applied to all interpolated or stepped values across the particle lifetime.
14
+ */
15
+ ease?: SimpleEase | EaseSegment[];
16
+ /**
17
+ * How many particles to spawn at once, each time that it is determined that particles should be spawned.
18
+ * If omitted, only one particle will spawn at a time.
19
+ */
20
+ particlesPerWave?: number;
21
+ /**
22
+ * How often to spawn particles. This is a value in seconds, so a value of 0.5 would be twice a second.
23
+ */
24
+ frequency: number;
25
+ /**
26
+ * Defines a chance to not spawn particles. Values lower than 1 mean particles may not be spawned each time.
27
+ * If omitted, particles will always spawn.
28
+ */
29
+ spawnChance?: number;
30
+ /**
31
+ * How long to run the Emitter before it stops spawning particles. If omitted, runs forever (or until told to stop
32
+ * manually).
33
+ */
34
+ emitterLifetime?: number;
35
+ /**
36
+ * Maximum number of particles that can be alive at any given time for this emitter.
37
+ */
38
+ maxParticles?: number;
39
+ /**
40
+ * If newly spawned particles should be added to the back of the parent container (to make them less conspicuous
41
+ * as they pop in). If omitted, particles will be added to the top of the container.
42
+ */
43
+ addAtBack?: boolean;
44
+ /**
45
+ * Default position to spawn particles from inside the parent container.
46
+ */
47
+ pos: {
48
+ x: number;
49
+ y: number;
50
+ };
51
+ /**
52
+ * If the emitter should start out emitting particles. If omitted, it will be treated as `true` and will emit particles
53
+ * immediately.
54
+ */
55
+ emit?: boolean;
56
+ /**
57
+ * If the Emitter should hook into PixiJS's shared ticker. If this is false or emitted, you will be responsible for
58
+ * connecting it to update ticks.
59
+ */
60
+ autoUpdate?: boolean;
61
+ /**
62
+ * The list of behaviors to apply to this emitter. See the behaviors namespace for
63
+ * a list of built in behaviors. Custom behaviors may be registered with {@link Emitter.registerBehavior}.
64
+ */
65
+ behaviors: BehaviorEntry[];
66
+ };
67
+ /**
68
+ * See {@link EmitterConfigV3.behaviors}
69
+ */
70
+ export type BehaviorEntry = {
71
+ /**
72
+ * The behavior type, as defined as the static `type` property of a behavior class.
73
+ */
74
+ type: string;
75
+ /**
76
+ * Configuration data specific to that behavior.
77
+ */
78
+ config: any;
79
+ };
80
+ /**
81
+ * Configuration for how to pick a random number (inclusive).
82
+ */
83
+ export type RandNumber = {
84
+ /**
85
+ * Maximum pickable value.
86
+ */
87
+ max: number;
88
+ /**
89
+ * Minimum pickable value.
90
+ */
91
+ min: number;
92
+ };
93
+ /**
94
+ * Converts emitter configuration from pre-5.0.0 library values into the current version.
95
+ *
96
+ * Example usage:
97
+ * ```javascript
98
+ * const emitter = new Emitter(myContainer, upgradeConfig(myOldConfig, [myTexture, myOtherTexture]));
99
+ * ```
100
+ * @param config The old emitter config to upgrade.
101
+ * @param art The old art values as would have been passed into the Emitter constructor or `Emitter.init()`
102
+ */
103
+ export declare function upgradeConfig(config: EmitterConfigV2 | EmitterConfigV1, art: any): EmitterConfigV3;
104
+ /**
105
+ * The obsolete emitter configuration format from version 3.0.0 of the library.
106
+ * This type information is kept to make it easy to upgrade, but otherwise
107
+ * configuration should be made as {@link EmitterConfigV3}.
108
+ */
109
+ export type EmitterConfigV2 = {
110
+ alpha?: ValueList<number>;
111
+ speed?: ValueList<number>;
112
+ minimumSpeedMultiplier?: number;
113
+ maxSpeed?: number;
114
+ acceleration?: {
115
+ x: number;
116
+ y: number;
117
+ };
118
+ scale?: ValueList<number>;
119
+ minimumScaleMultiplier?: number;
120
+ color?: ValueList<string>;
121
+ startRotation?: RandNumber;
122
+ noRotation?: boolean;
123
+ rotationSpeed?: RandNumber;
124
+ rotationAcceleration?: number;
125
+ lifetime: RandNumber;
126
+ blendMode?: string;
127
+ ease?: SimpleEase | EaseSegment[];
128
+ extraData?: any;
129
+ particlesPerWave?: number;
130
+ /**
131
+ * Really "rect"|"circle"|"ring"|"burst"|"point"|"polygonalChain", but that
132
+ * tends to be too strict for random object creation.
133
+ */
134
+ spawnType?: string;
135
+ spawnRect?: {
136
+ x: number;
137
+ y: number;
138
+ w: number;
139
+ h: number;
140
+ };
141
+ spawnCircle?: {
142
+ x: number;
143
+ y: number;
144
+ r: number;
145
+ minR?: number;
146
+ };
147
+ particleSpacing?: number;
148
+ angleStart?: number;
149
+ spawnPolygon?: PointData[] | PointData[][];
150
+ frequency: number;
151
+ spawnChance?: number;
152
+ emitterLifetime?: number;
153
+ maxParticles?: number;
154
+ addAtBack?: boolean;
155
+ pos: {
156
+ x: number;
157
+ y: number;
158
+ };
159
+ emit?: boolean;
160
+ autoUpdate?: boolean;
161
+ orderedArt?: boolean;
162
+ };
163
+ export type BasicTweenable<T> = {
164
+ start: T;
165
+ end: T;
166
+ };
167
+ /**
168
+ * The obsolete emitter configuration format of the initial library release.
169
+ * This type information is kept to maintain compatibility with the older particle tool, but otherwise
170
+ * configuration should be made as {@link EmitterConfigV3}.
171
+ */
172
+ export type EmitterConfigV1 = {
173
+ alpha?: BasicTweenable<number>;
174
+ speed?: BasicTweenable<number> & {
175
+ minimumSpeedMultiplier?: number;
176
+ };
177
+ maxSpeed?: number;
178
+ acceleration?: {
179
+ x: number;
180
+ y: number;
181
+ };
182
+ scale?: BasicTweenable<number> & {
183
+ minimumScaleMultiplier?: number;
184
+ };
185
+ color?: BasicTweenable<string>;
186
+ startRotation?: RandNumber;
187
+ noRotation?: boolean;
188
+ rotationSpeed?: RandNumber;
189
+ rotationAcceleration?: number;
190
+ lifetime: RandNumber;
191
+ blendMode?: string;
192
+ ease?: SimpleEase | EaseSegment[];
193
+ extraData?: any;
194
+ particlesPerWave?: number;
195
+ /**
196
+ * Really "rect"|"circle"|"ring"|"burst"|"point"|"polygonalChain", but that
197
+ * tends to be too strict for random object creation.
198
+ */
199
+ spawnType?: string;
200
+ spawnRect?: {
201
+ x: number;
202
+ y: number;
203
+ w: number;
204
+ h: number;
205
+ };
206
+ spawnCircle?: {
207
+ x: number;
208
+ y: number;
209
+ r: number;
210
+ minR?: number;
211
+ };
212
+ particleSpacing?: number;
213
+ angleStart?: number;
214
+ spawnPolygon?: PointData[] | PointData[][];
215
+ frequency: number;
216
+ spawnChance?: number;
217
+ emitterLifetime?: number;
218
+ maxParticles?: number;
219
+ addAtBack?: boolean;
220
+ pos: {
221
+ x: number;
222
+ y: number;
223
+ };
224
+ emit?: boolean;
225
+ autoUpdate?: boolean;
226
+ orderedArt?: boolean;
227
+ };
228
+ //# sourceMappingURL=EmitterConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmitterConfig.d.ts","sourceRoot":"","sources":["../../../../../src/libs/particles/EmitterConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B;;OAEG;IACH,QAAQ,EAAE,UAAU,CAAA;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,WAAW,EAAE,CAAA;IACjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,GAAG,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC7B;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;OAGG;IACH,SAAS,EAAE,aAAa,EAAE,CAAA;CAC7B,CAAA;AAED;;GAE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