custom-pixi-particles 4.1.16 → 4.2.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.
- package/README.md +86 -13
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -19
- package/dist/index.js.map +1 -1
- package/dist/lib/Particle.d.ts +18 -0
- package/dist/lib/Particle.js +35 -0
- package/dist/lib/Particle.js.map +1 -1
- package/dist/lib/behaviour/AngularVelocityBehaviour.d.ts +1 -1
- package/dist/lib/behaviour/AngularVelocityBehaviour.js +15 -9
- package/dist/lib/behaviour/AngularVelocityBehaviour.js.map +1 -1
- package/dist/lib/behaviour/ColorBehaviour.d.ts +0 -4
- package/dist/lib/behaviour/ColorBehaviour.js +7 -14
- package/dist/lib/behaviour/ColorBehaviour.js.map +1 -1
- package/dist/lib/behaviour/EmitDirectionBehaviour.js +3 -2
- package/dist/lib/behaviour/EmitDirectionBehaviour.js.map +1 -1
- package/dist/lib/behaviour/LifeBehaviour.js +6 -5
- package/dist/lib/behaviour/LifeBehaviour.js.map +1 -1
- package/dist/lib/behaviour/PositionBehaviour.d.ts +62 -0
- package/dist/lib/behaviour/PositionBehaviour.js +368 -68
- package/dist/lib/behaviour/PositionBehaviour.js.map +1 -1
- package/dist/lib/behaviour/RotationBehaviour.js +4 -0
- package/dist/lib/behaviour/RotationBehaviour.js.map +1 -1
- package/dist/lib/behaviour/SizeBehaviour.js +24 -13
- package/dist/lib/behaviour/SizeBehaviour.js.map +1 -1
- package/dist/lib/util/MinMax.d.ts +34 -0
- package/dist/lib/util/MinMax.js +46 -0
- package/dist/lib/util/MinMax.js.map +1 -0
- package/dist/lib/util/Point.js +2 -2
- package/dist/lib/util/Point.js.map +1 -1
- package/dist/lib/util/ThereBack.d.ts +14 -0
- package/dist/lib/util/ThereBack.js +23 -0
- package/dist/lib/util/ThereBack.js.map +1 -0
- package/package.json +5 -4
- package/dist/lib/pixi/RendererEditor.d.ts +0 -116
- package/dist/lib/pixi/RendererEditor.js +0 -508
- package/dist/lib/pixi/RendererEditor.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SizeBehaviour.js","sourceRoot":"","sources":["../../../src/lib/behaviour/SizeBehaviour.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAGnD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,SAAS;IAApD;;QACE,YAAO,GAAG,IAAI,CAAA;QACd,aAAQ,GAAG,CAAC,CAAA;QACZ,wBAAmB,GAAG,KAAK,CAAA;QAC3B,cAAS,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAC3B,YAAO,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACzB,kBAAa,GAAG,CAAC,CAAA;QACjB,gBAAW,GAAG,CAAC,CAAA;QAEf,SAAI,GAAG,CAAC,QAAkB,EAAE,EAAE;YAC5B,IAAI,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"SizeBehaviour.js","sourceRoot":"","sources":["../../../src/lib/behaviour/SizeBehaviour.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAGnD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,SAAS;IAApD;;QACE,YAAO,GAAG,IAAI,CAAA;QACd,aAAQ,GAAG,CAAC,CAAA;QACZ,wBAAmB,GAAG,KAAK,CAAA;QAC3B,cAAS,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAC3B,YAAO,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC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AAC;gBACnB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;aACpB;YACD,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;SACrB,CAAA;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export default class MinMax {
|
|
2
|
+
min: number;
|
|
3
|
+
max: number;
|
|
4
|
+
constructor(min?: number, max?: number);
|
|
5
|
+
/**
|
|
6
|
+
* Sets the x and y coordinates of a Point
|
|
7
|
+
* @param {number} min - The x coordinate
|
|
8
|
+
* @param {number} max - The y coordinate
|
|
9
|
+
* @return {MinMax} - The MinMax instance
|
|
10
|
+
*/
|
|
11
|
+
set: (min: number, max: number) => this;
|
|
12
|
+
/**
|
|
13
|
+
* Copies the x and y coordinates from another Point
|
|
14
|
+
* @param {IMinMax} data - The Point instance to copy from
|
|
15
|
+
* @return {MinMax} - The MinMax instance
|
|
16
|
+
*/
|
|
17
|
+
copyFrom: (data: IMinMax) => this;
|
|
18
|
+
/**
|
|
19
|
+
* Copies the x and y coordinates from an object with numeric x and y properties
|
|
20
|
+
* @param {IMinMax} data - The object to copy from
|
|
21
|
+
* @return {MinMax} - The MinMax instance
|
|
22
|
+
*/
|
|
23
|
+
copyFromRawData: (data: IMinMax) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Adds the x and y coordinates of another Point to this Point
|
|
26
|
+
* @param {IMinMax} data - The other Point instance
|
|
27
|
+
* @return {MinMax} - The MinMax instance
|
|
28
|
+
*/
|
|
29
|
+
add: (data: IMinMax) => this;
|
|
30
|
+
}
|
|
31
|
+
export interface IMinMax {
|
|
32
|
+
min: number;
|
|
33
|
+
max: number;
|
|
34
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export default class MinMax {
|
|
2
|
+
constructor(min, max) {
|
|
3
|
+
/**
|
|
4
|
+
* Sets the x and y coordinates of a Point
|
|
5
|
+
* @param {number} min - The x coordinate
|
|
6
|
+
* @param {number} max - The y coordinate
|
|
7
|
+
* @return {MinMax} - The MinMax instance
|
|
8
|
+
*/
|
|
9
|
+
this.set = (min, max) => {
|
|
10
|
+
this.min = min;
|
|
11
|
+
this.max = max === undefined ? this.max : max;
|
|
12
|
+
return this;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Copies the x and y coordinates from another Point
|
|
16
|
+
* @param {IMinMax} data - The Point instance to copy from
|
|
17
|
+
* @return {MinMax} - The MinMax instance
|
|
18
|
+
*/
|
|
19
|
+
this.copyFrom = (data) => {
|
|
20
|
+
this.min = data.min;
|
|
21
|
+
this.max = data.max;
|
|
22
|
+
return this;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Copies the x and y coordinates from an object with numeric x and y properties
|
|
26
|
+
* @param {IMinMax} data - The object to copy from
|
|
27
|
+
* @return {MinMax} - The MinMax instance
|
|
28
|
+
*/
|
|
29
|
+
this.copyFromRawData = (data) => {
|
|
30
|
+
this.copyFrom(data);
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Adds the x and y coordinates of another Point to this Point
|
|
34
|
+
* @param {IMinMax} data - The other Point instance
|
|
35
|
+
* @return {MinMax} - The MinMax instance
|
|
36
|
+
*/
|
|
37
|
+
this.add = (data) => {
|
|
38
|
+
this.min += data.min;
|
|
39
|
+
this.max += data.max;
|
|
40
|
+
return this;
|
|
41
|
+
};
|
|
42
|
+
this.min = min || 0;
|
|
43
|
+
this.max = max || 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=MinMax.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MinMax.js","sourceRoot":"","sources":["../../../src/lib/util/MinMax.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,MAAM;IAIzB,YAAY,GAAY,EAAE,GAAY;QAKtC;;;;;WAKG;QACH,QA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C,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACf,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IACjB,CAAC;CA4CF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default class ThereBack {
|
|
2
|
+
x: string;
|
|
3
|
+
y: string;
|
|
4
|
+
ease: string;
|
|
5
|
+
constructor(x?: string, y?: string, ease?: string);
|
|
6
|
+
set: (x: string, y: string, ease: string) => this;
|
|
7
|
+
copyFrom: (data: IThereBack) => this;
|
|
8
|
+
copyFromRawData: (data: IThereBack) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface IThereBack {
|
|
11
|
+
x: string;
|
|
12
|
+
y: string;
|
|
13
|
+
ease: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default class ThereBack {
|
|
2
|
+
constructor(x, y, ease) {
|
|
3
|
+
this.set = (x, y, ease) => {
|
|
4
|
+
this.x = x || '';
|
|
5
|
+
this.y = y || '';
|
|
6
|
+
this.ease = ease || '';
|
|
7
|
+
return this;
|
|
8
|
+
};
|
|
9
|
+
this.copyFrom = (data) => {
|
|
10
|
+
this.x = data.x || '';
|
|
11
|
+
this.y = data.y || '';
|
|
12
|
+
this.ease = data.ease || '';
|
|
13
|
+
return this;
|
|
14
|
+
};
|
|
15
|
+
this.copyFromRawData = (data) => {
|
|
16
|
+
this.copyFrom(data);
|
|
17
|
+
};
|
|
18
|
+
this.x = x || '';
|
|
19
|
+
this.y = y || '';
|
|
20
|
+
this.ease = ease || '';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=ThereBack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThereBack.js","sourceRoot":"","sources":["../../../src/lib/util/ThereBack.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,SAAS;IAK5B,YAAY,CAAU,EAAE,CAAU,EAAE,IAAa;QAMjD,QAAG,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,IAAY,EAAE,EAAE;YAC3C,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAA;YAChB,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAA;YAChB,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAA;YACtB,OAAO,IAAI,CAAA;QACb,CAAC,CAAA;QAED,aAAQ,GAAG,CAAC,IAAgB,EAAE,EAAE;YAC9B,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;YACrB,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;YACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAA;YAC3B,OAAO,IAAI,CAAA;QACb,CAAC,CAAA;QAED,oBAAe,GAAG,CAAC,IAAgB,EAAE,EAAE;YACrC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;QACrB,CAAC,CAAA;QArBC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAA;QAChB,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAA;IACxB,CAAC;CAmBF"}
|
package/package.json
CHANGED
|
@@ -9,11 +9,12 @@
|
|
|
9
9
|
"copy-dir": "^1.3.0",
|
|
10
10
|
"file-saver": "^2.0.5",
|
|
11
11
|
"pixi.js-legacy": "^6.5.10",
|
|
12
|
-
"
|
|
12
|
+
"gsap": "^3.12.5",
|
|
13
|
+
"prettier": "^3.2.4",
|
|
13
14
|
"rimraf": "^5.0.5",
|
|
14
|
-
"ts-node": "^10.9.
|
|
15
|
+
"ts-node": "^10.9.2",
|
|
15
16
|
"tslint": "^6.1.3",
|
|
16
|
-
"typescript": "^5.3.
|
|
17
|
+
"typescript": "^5.3.3"
|
|
17
18
|
},
|
|
18
19
|
"dependencies": {
|
|
19
20
|
"eventemitter3": "^4.0.7"
|
|
@@ -40,5 +41,5 @@
|
|
|
40
41
|
"lint": "tslint 'src/**/*.ts'",
|
|
41
42
|
"lint:fix": "tslint --fix 'src/**/*.ts'"
|
|
42
43
|
},
|
|
43
|
-
"version": "4.
|
|
44
|
+
"version": "4.2.0"
|
|
44
45
|
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { Emitter } from '../emitter';
|
|
2
|
-
import { ICustomPixiParticlesSettings } from '../customPixiParticlesSettingsInterface';
|
|
3
|
-
import { Container } from 'pixi.js-legacy';
|
|
4
|
-
/**
|
|
5
|
-
* Renderer is a class used to render particles in the Pixi library.
|
|
6
|
-
*
|
|
7
|
-
* @class Renderer
|
|
8
|
-
*/
|
|
9
|
-
export default class Renderer extends Container {
|
|
10
|
-
blendMode: any;
|
|
11
|
-
emitter: Emitter;
|
|
12
|
-
turbulenceEmitter: Emitter;
|
|
13
|
-
private _paused;
|
|
14
|
-
private _internalPaused;
|
|
15
|
-
private textures;
|
|
16
|
-
private zeroPad;
|
|
17
|
-
private indexToStart;
|
|
18
|
-
private finishingTextureNames;
|
|
19
|
-
private unusedSprites;
|
|
20
|
-
private emitterParser;
|
|
21
|
-
private turbulenceParser;
|
|
22
|
-
private config;
|
|
23
|
-
private anchor;
|
|
24
|
-
private _model;
|
|
25
|
-
private _ticker;
|
|
26
|
-
/**
|
|
27
|
-
* Creates an instance of Renderer.
|
|
28
|
-
*
|
|
29
|
-
* @memberof Renderer
|
|
30
|
-
*/
|
|
31
|
-
constructor(settings: ICustomPixiParticlesSettings);
|
|
32
|
-
onComplete: any;
|
|
33
|
-
/**
|
|
34
|
-
* Sets the paused state of the object.
|
|
35
|
-
* @param {boolean} isPaused - The new paused state of the object.
|
|
36
|
-
* @return {void}
|
|
37
|
-
*/
|
|
38
|
-
pause(isPaused: boolean): void;
|
|
39
|
-
/**
|
|
40
|
-
* Updates the transform of the ParticleContainer and updates the emitters.
|
|
41
|
-
*/
|
|
42
|
-
_updateTransform(deltaTime: number): void;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @method updateTexture
|
|
46
|
-
* @description This method updates the texture of the unused sprites and children to a randomly generated texture.
|
|
47
|
-
*/
|
|
48
|
-
updateTexture(): void;
|
|
49
|
-
/**
|
|
50
|
-
* This method is used to start the emitter and turbulenceEmitter if available.
|
|
51
|
-
* @function start
|
|
52
|
-
*/
|
|
53
|
-
start(): void;
|
|
54
|
-
/**
|
|
55
|
-
* Resets the particle emitters in this class without removing existing particles and plays them.
|
|
56
|
-
* @function play
|
|
57
|
-
*/
|
|
58
|
-
play(): void;
|
|
59
|
-
/**
|
|
60
|
-
* Immediately stops emitting particles
|
|
61
|
-
*/
|
|
62
|
-
stopImmediately(): void;
|
|
63
|
-
/**
|
|
64
|
-
* Destroy particles
|
|
65
|
-
*/
|
|
66
|
-
destroy(): void;
|
|
67
|
-
/**
|
|
68
|
-
* Terminates the emitter and any turbulence emitter it is associated with
|
|
69
|
-
*/
|
|
70
|
-
stop(): void;
|
|
71
|
-
/**
|
|
72
|
-
* Resets the emitters to their initial state
|
|
73
|
-
*/
|
|
74
|
-
resetEmitter(): void;
|
|
75
|
-
/**
|
|
76
|
-
* Sets the textures used by the emitter
|
|
77
|
-
* @param {string[]} textures - Array of strings containing the textures to be used by the emitter
|
|
78
|
-
*/
|
|
79
|
-
setTextures(textures: string[]): void;
|
|
80
|
-
/**
|
|
81
|
-
* Updates the configuration of the emitter
|
|
82
|
-
* @param {any} config - Configuration object to be used to update the emitter
|
|
83
|
-
* @param {boolean} resetDuration - should duration be reset
|
|
84
|
-
*/
|
|
85
|
-
updateConfig(config: any, resetDuration?: boolean): void;
|
|
86
|
-
/**
|
|
87
|
-
* Updates the position of the emitter
|
|
88
|
-
* @param {Object} position - Object containing the x and y coordinates of the new position
|
|
89
|
-
* @param {boolean} resetDuration - should duration be reset
|
|
90
|
-
*/
|
|
91
|
-
updatePosition(position: {
|
|
92
|
-
x: number;
|
|
93
|
-
y: number;
|
|
94
|
-
}, resetDuration?: boolean): void;
|
|
95
|
-
/**
|
|
96
|
-
* Clears the sprite pool, the unused sprites list and the turbulence and particle pools.
|
|
97
|
-
*/
|
|
98
|
-
clearPool(): void;
|
|
99
|
-
private getByName;
|
|
100
|
-
private getOrCreateSprite;
|
|
101
|
-
private createFrameAnimationByName;
|
|
102
|
-
private onCreate;
|
|
103
|
-
private onCreateTurbulence;
|
|
104
|
-
private onUpdate;
|
|
105
|
-
private onUpdateTurbulence;
|
|
106
|
-
private onFinishing;
|
|
107
|
-
private onRemove;
|
|
108
|
-
private onRemoveTurbulence;
|
|
109
|
-
private getRandomTexture;
|
|
110
|
-
private getRandomFinishingTexture;
|
|
111
|
-
private getRandomFrameNumber;
|
|
112
|
-
private paused;
|
|
113
|
-
private internalPause;
|
|
114
|
-
private getConfigIndexByName;
|
|
115
|
-
private buildTurbulenceConfig;
|
|
116
|
-
}
|