tsparticles 1.41.2 → 1.41.5
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/Plugins/Emitters/EmitterInstance.js +8 -7
- package/Updaters/Opacity/OpacityUpdater.js +7 -5
- package/Updaters/Size/SizeUpdater.js +6 -5
- package/browser/Plugins/Emitters/EmitterInstance.js +8 -7
- package/browser/Updaters/Opacity/OpacityUpdater.js +7 -5
- package/browser/Updaters/Size/SizeUpdater.js +6 -5
- package/esm/Plugins/Emitters/EmitterInstance.js +8 -7
- package/esm/Updaters/Opacity/OpacityUpdater.js +7 -5
- package/esm/Updaters/Size/SizeUpdater.js +6 -5
- package/package.json +1 -1
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/tsparticles.engine.min.js +1 -1
- package/tsparticles.interaction.external.attract.min.js +1 -1
- package/tsparticles.interaction.external.bounce.min.js +1 -1
- package/tsparticles.interaction.external.bubble.min.js +1 -1
- package/tsparticles.interaction.external.connect.min.js +1 -1
- package/tsparticles.interaction.external.grab.min.js +1 -1
- package/tsparticles.interaction.external.repulse.min.js +1 -1
- package/tsparticles.interaction.external.trail.min.js +1 -1
- package/tsparticles.interaction.particles.attract.min.js +1 -1
- package/tsparticles.interaction.particles.collisions.min.js +1 -1
- package/tsparticles.interaction.particles.links.min.js +1 -1
- package/tsparticles.js +14 -13
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.min.js +1 -1
- package/tsparticles.plugins.absorbers.min.js +1 -1
- package/tsparticles.plugins.emitters.js +8 -7
- package/tsparticles.plugins.emitters.min.js +2 -2
- package/tsparticles.plugins.polygonMask.min.js +1 -1
- package/tsparticles.shape.circle.min.js +1 -1
- package/tsparticles.shape.image.min.js +1 -1
- package/tsparticles.shape.line.min.js +1 -1
- package/tsparticles.shape.polygon.min.js +1 -1
- package/tsparticles.shape.square.min.js +1 -1
- package/tsparticles.shape.star.min.js +1 -1
- package/tsparticles.shape.text.min.js +1 -1
- package/tsparticles.slim.js +6 -6
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.updater.angle.min.js +1 -1
- package/tsparticles.updater.color.min.js +1 -1
- package/tsparticles.updater.life.min.js +1 -1
- package/tsparticles.updater.opacity.js +3 -3
- package/tsparticles.updater.opacity.min.js +2 -2
- package/tsparticles.updater.outModes.min.js +1 -1
- package/tsparticles.updater.roll.min.js +1 -1
- package/tsparticles.updater.size.js +3 -3
- package/tsparticles.updater.size.min.js +2 -2
- package/tsparticles.updater.strokeColor.min.js +1 -1
- package/tsparticles.updater.tilt.min.js +1 -1
- package/tsparticles.updater.wobble.min.js +1 -1
- package/umd/Plugins/Emitters/EmitterInstance.js +8 -7
- package/umd/Updaters/Opacity/OpacityUpdater.js +7 -5
- package/umd/Updaters/Size/SizeUpdater.js +6 -5
|
@@ -18,8 +18,8 @@ const Emitter_1 = require("./Options/Classes/Emitter");
|
|
|
18
18
|
const EmitterSize_1 = require("./Options/Classes/EmitterSize");
|
|
19
19
|
class EmitterInstance {
|
|
20
20
|
constructor(engine, emitters, container, options, position) {
|
|
21
|
-
var _a, _b, _c, _d, _e, _f;
|
|
22
|
-
var
|
|
21
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
22
|
+
var _h;
|
|
23
23
|
this.emitters = emitters;
|
|
24
24
|
this.container = container;
|
|
25
25
|
_EmitterInstance_firstSpawn.set(this, void 0);
|
|
@@ -38,22 +38,23 @@ class EmitterInstance {
|
|
|
38
38
|
this.options.load(options);
|
|
39
39
|
}
|
|
40
40
|
this.spawnDelay = (((_a = this.options.life.delay) !== null && _a !== void 0 ? _a : 0) * 1000) / this.container.retina.reduceFactor;
|
|
41
|
+
this.position = (_b = this.initialPosition) !== null && _b !== void 0 ? _b : this.calcPosition();
|
|
41
42
|
this.name = this.options.name;
|
|
42
|
-
this.shape = (
|
|
43
|
+
this.shape = (_c = __classPrivateFieldGet(this, _EmitterInstance_engine, "f").emitterShapeManager) === null || _c === void 0 ? void 0 : _c.getShape(this.options.shape);
|
|
43
44
|
this.fill = this.options.fill;
|
|
44
45
|
__classPrivateFieldSet(this, _EmitterInstance_firstSpawn, !this.options.life.wait, "f");
|
|
45
46
|
__classPrivateFieldSet(this, _EmitterInstance_startParticlesAdded, false, "f");
|
|
46
47
|
let particlesOptions = (0, Utils_1.deepExtend)({}, this.options.particles);
|
|
47
48
|
particlesOptions !== null && particlesOptions !== void 0 ? particlesOptions : (particlesOptions = {});
|
|
48
|
-
(
|
|
49
|
-
(
|
|
49
|
+
(_d = particlesOptions.move) !== null && _d !== void 0 ? _d : (particlesOptions.move = {});
|
|
50
|
+
(_e = (_h = particlesOptions.move).direction) !== null && _e !== void 0 ? _e : (_h.direction = this.options.direction);
|
|
50
51
|
if (this.options.spawnColor) {
|
|
51
52
|
this.spawnColor = (0, Utils_1.colorToHsl)(this.options.spawnColor);
|
|
52
53
|
}
|
|
53
54
|
this.paused = !this.options.autoPlay;
|
|
54
55
|
this.particlesOptions = particlesOptions;
|
|
55
56
|
this.size =
|
|
56
|
-
(
|
|
57
|
+
(_f = this.options.size) !== null && _f !== void 0 ? _f : (() => {
|
|
57
58
|
const size = new EmitterSize_1.EmitterSize();
|
|
58
59
|
size.load({
|
|
59
60
|
height: 0,
|
|
@@ -62,7 +63,7 @@ class EmitterInstance {
|
|
|
62
63
|
});
|
|
63
64
|
return size;
|
|
64
65
|
})();
|
|
65
|
-
this.lifeCount = (
|
|
66
|
+
this.lifeCount = (_g = this.options.life.count) !== null && _g !== void 0 ? _g : -1;
|
|
66
67
|
this.immortal = this.lifeCount <= 0;
|
|
67
68
|
this.play();
|
|
68
69
|
}
|
|
@@ -23,9 +23,9 @@ function updateOpacity(particle, delta) {
|
|
|
23
23
|
}
|
|
24
24
|
const minValue = particle.opacity.min;
|
|
25
25
|
const maxValue = particle.opacity.max;
|
|
26
|
-
if (
|
|
27
|
-
particle.opacity.enable
|
|
28
|
-
(((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0)
|
|
26
|
+
if (particle.destroyed ||
|
|
27
|
+
!particle.opacity.enable ||
|
|
28
|
+
(((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0) > 0 && ((_b = particle.opacity.loops) !== null && _b !== void 0 ? _b : 0) > ((_c = particle.opacity.maxLoops) !== null && _c !== void 0 ? _c : 0))) {
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
switch (particle.opacity.status) {
|
|
@@ -102,12 +102,14 @@ class OpacityUpdater {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
isEnabled(particle) {
|
|
105
|
-
var _a, _b, _c;
|
|
105
|
+
var _a, _b, _c, _d;
|
|
106
106
|
return (!particle.destroyed &&
|
|
107
107
|
!particle.spawning &&
|
|
108
108
|
!!particle.opacity &&
|
|
109
109
|
particle.opacity.enable &&
|
|
110
|
-
(((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0) <= 0 ||
|
|
110
|
+
(((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0) <= 0 ||
|
|
111
|
+
(((_b = particle.opacity.maxLoops) !== null && _b !== void 0 ? _b : 0) > 0 &&
|
|
112
|
+
((_c = particle.opacity.loops) !== null && _c !== void 0 ? _c : 0) < ((_d = particle.opacity.maxLoops) !== null && _d !== void 0 ? _d : 0))));
|
|
111
113
|
}
|
|
112
114
|
update(particle, delta) {
|
|
113
115
|
if (!this.isEnabled(particle)) {
|
|
@@ -21,9 +21,9 @@ function updateSize(particle, delta) {
|
|
|
21
21
|
const sizeVelocity = ((_a = particle.size.velocity) !== null && _a !== void 0 ? _a : 0) * delta.factor;
|
|
22
22
|
const minValue = particle.size.min;
|
|
23
23
|
const maxValue = particle.size.max;
|
|
24
|
-
if (
|
|
25
|
-
particle.size.enable
|
|
26
|
-
(((_b = particle.size.
|
|
24
|
+
if (particle.destroyed ||
|
|
25
|
+
!particle.size.enable ||
|
|
26
|
+
(((_b = particle.size.maxLoops) !== null && _b !== void 0 ? _b : 0) > 0 && ((_c = particle.size.loops) !== null && _c !== void 0 ? _c : 0) > ((_d = particle.size.maxLoops) !== null && _d !== void 0 ? _d : 0))) {
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
switch (particle.size.status) {
|
|
@@ -60,11 +60,12 @@ class SizeUpdater {
|
|
|
60
60
|
init() {
|
|
61
61
|
}
|
|
62
62
|
isEnabled(particle) {
|
|
63
|
-
var _a, _b, _c;
|
|
63
|
+
var _a, _b, _c, _d;
|
|
64
64
|
return (!particle.destroyed &&
|
|
65
65
|
!particle.spawning &&
|
|
66
66
|
particle.size.enable &&
|
|
67
|
-
(((_a = particle.size.
|
|
67
|
+
(((_a = particle.size.maxLoops) !== null && _a !== void 0 ? _a : 0) <= 0 ||
|
|
68
|
+
(((_b = particle.size.maxLoops) !== null && _b !== void 0 ? _b : 0) > 0 && ((_c = particle.size.loops) !== null && _c !== void 0 ? _c : 0) < ((_d = particle.size.maxLoops) !== null && _d !== void 0 ? _d : 0))));
|
|
68
69
|
}
|
|
69
70
|
update(particle, delta) {
|
|
70
71
|
if (!this.isEnabled(particle)) {
|
|
@@ -18,8 +18,8 @@ import { EmitterSize } from "./Options/Classes/EmitterSize";
|
|
|
18
18
|
*/
|
|
19
19
|
export class EmitterInstance {
|
|
20
20
|
constructor(engine, emitters, container, options, position) {
|
|
21
|
-
var _a, _b, _c, _d, _e, _f;
|
|
22
|
-
var
|
|
21
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
22
|
+
var _h;
|
|
23
23
|
this.emitters = emitters;
|
|
24
24
|
this.container = container;
|
|
25
25
|
_EmitterInstance_firstSpawn.set(this, void 0);
|
|
@@ -38,22 +38,23 @@ export class EmitterInstance {
|
|
|
38
38
|
this.options.load(options);
|
|
39
39
|
}
|
|
40
40
|
this.spawnDelay = (((_a = this.options.life.delay) !== null && _a !== void 0 ? _a : 0) * 1000) / this.container.retina.reduceFactor;
|
|
41
|
+
this.position = (_b = this.initialPosition) !== null && _b !== void 0 ? _b : this.calcPosition();
|
|
41
42
|
this.name = this.options.name;
|
|
42
|
-
this.shape = (
|
|
43
|
+
this.shape = (_c = __classPrivateFieldGet(this, _EmitterInstance_engine, "f").emitterShapeManager) === null || _c === void 0 ? void 0 : _c.getShape(this.options.shape);
|
|
43
44
|
this.fill = this.options.fill;
|
|
44
45
|
__classPrivateFieldSet(this, _EmitterInstance_firstSpawn, !this.options.life.wait, "f");
|
|
45
46
|
__classPrivateFieldSet(this, _EmitterInstance_startParticlesAdded, false, "f");
|
|
46
47
|
let particlesOptions = deepExtend({}, this.options.particles);
|
|
47
48
|
particlesOptions !== null && particlesOptions !== void 0 ? particlesOptions : (particlesOptions = {});
|
|
48
|
-
(
|
|
49
|
-
(
|
|
49
|
+
(_d = particlesOptions.move) !== null && _d !== void 0 ? _d : (particlesOptions.move = {});
|
|
50
|
+
(_e = (_h = particlesOptions.move).direction) !== null && _e !== void 0 ? _e : (_h.direction = this.options.direction);
|
|
50
51
|
if (this.options.spawnColor) {
|
|
51
52
|
this.spawnColor = colorToHsl(this.options.spawnColor);
|
|
52
53
|
}
|
|
53
54
|
this.paused = !this.options.autoPlay;
|
|
54
55
|
this.particlesOptions = particlesOptions;
|
|
55
56
|
this.size =
|
|
56
|
-
(
|
|
57
|
+
(_f = this.options.size) !== null && _f !== void 0 ? _f : (() => {
|
|
57
58
|
const size = new EmitterSize();
|
|
58
59
|
size.load({
|
|
59
60
|
height: 0,
|
|
@@ -62,7 +63,7 @@ export class EmitterInstance {
|
|
|
62
63
|
});
|
|
63
64
|
return size;
|
|
64
65
|
})();
|
|
65
|
-
this.lifeCount = (
|
|
66
|
+
this.lifeCount = (_g = this.options.life.count) !== null && _g !== void 0 ? _g : -1;
|
|
66
67
|
this.immortal = this.lifeCount <= 0;
|
|
67
68
|
this.play();
|
|
68
69
|
}
|
|
@@ -20,9 +20,9 @@ function updateOpacity(particle, delta) {
|
|
|
20
20
|
}
|
|
21
21
|
const minValue = particle.opacity.min;
|
|
22
22
|
const maxValue = particle.opacity.max;
|
|
23
|
-
if (
|
|
24
|
-
particle.opacity.enable
|
|
25
|
-
(((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0)
|
|
23
|
+
if (particle.destroyed ||
|
|
24
|
+
!particle.opacity.enable ||
|
|
25
|
+
(((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0) > 0 && ((_b = particle.opacity.loops) !== null && _b !== void 0 ? _b : 0) > ((_c = particle.opacity.maxLoops) !== null && _c !== void 0 ? _c : 0))) {
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
switch (particle.opacity.status) {
|
|
@@ -100,12 +100,14 @@ export class OpacityUpdater {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
isEnabled(particle) {
|
|
103
|
-
var _a, _b, _c;
|
|
103
|
+
var _a, _b, _c, _d;
|
|
104
104
|
return (!particle.destroyed &&
|
|
105
105
|
!particle.spawning &&
|
|
106
106
|
!!particle.opacity &&
|
|
107
107
|
particle.opacity.enable &&
|
|
108
|
-
(((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0) <= 0 ||
|
|
108
|
+
(((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0) <= 0 ||
|
|
109
|
+
(((_b = particle.opacity.maxLoops) !== null && _b !== void 0 ? _b : 0) > 0 &&
|
|
110
|
+
((_c = particle.opacity.loops) !== null && _c !== void 0 ? _c : 0) < ((_d = particle.opacity.maxLoops) !== null && _d !== void 0 ? _d : 0))));
|
|
109
111
|
}
|
|
110
112
|
update(particle, delta) {
|
|
111
113
|
if (!this.isEnabled(particle)) {
|
|
@@ -18,9 +18,9 @@ function updateSize(particle, delta) {
|
|
|
18
18
|
const sizeVelocity = ((_a = particle.size.velocity) !== null && _a !== void 0 ? _a : 0) * delta.factor;
|
|
19
19
|
const minValue = particle.size.min;
|
|
20
20
|
const maxValue = particle.size.max;
|
|
21
|
-
if (
|
|
22
|
-
particle.size.enable
|
|
23
|
-
(((_b = particle.size.
|
|
21
|
+
if (particle.destroyed ||
|
|
22
|
+
!particle.size.enable ||
|
|
23
|
+
(((_b = particle.size.maxLoops) !== null && _b !== void 0 ? _b : 0) > 0 && ((_c = particle.size.loops) !== null && _c !== void 0 ? _c : 0) > ((_d = particle.size.maxLoops) !== null && _d !== void 0 ? _d : 0))) {
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
switch (particle.size.status) {
|
|
@@ -58,11 +58,12 @@ export class SizeUpdater {
|
|
|
58
58
|
// nothing
|
|
59
59
|
}
|
|
60
60
|
isEnabled(particle) {
|
|
61
|
-
var _a, _b, _c;
|
|
61
|
+
var _a, _b, _c, _d;
|
|
62
62
|
return (!particle.destroyed &&
|
|
63
63
|
!particle.spawning &&
|
|
64
64
|
particle.size.enable &&
|
|
65
|
-
(((_a = particle.size.
|
|
65
|
+
(((_a = particle.size.maxLoops) !== null && _a !== void 0 ? _a : 0) <= 0 ||
|
|
66
|
+
(((_b = particle.size.maxLoops) !== null && _b !== void 0 ? _b : 0) > 0 && ((_c = particle.size.loops) !== null && _c !== void 0 ? _c : 0) < ((_d = particle.size.maxLoops) !== null && _d !== void 0 ? _d : 0))));
|
|
66
67
|
}
|
|
67
68
|
update(particle, delta) {
|
|
68
69
|
if (!this.isEnabled(particle)) {
|
|
@@ -15,8 +15,8 @@ import { Emitter } from "./Options/Classes/Emitter";
|
|
|
15
15
|
import { EmitterSize } from "./Options/Classes/EmitterSize";
|
|
16
16
|
export class EmitterInstance {
|
|
17
17
|
constructor(engine, emitters, container, options, position) {
|
|
18
|
-
var _a, _b, _c, _d, _e, _f;
|
|
19
|
-
var
|
|
18
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
19
|
+
var _h;
|
|
20
20
|
this.emitters = emitters;
|
|
21
21
|
this.container = container;
|
|
22
22
|
_EmitterInstance_firstSpawn.set(this, void 0);
|
|
@@ -35,22 +35,23 @@ export class EmitterInstance {
|
|
|
35
35
|
this.options.load(options);
|
|
36
36
|
}
|
|
37
37
|
this.spawnDelay = (((_a = this.options.life.delay) !== null && _a !== void 0 ? _a : 0) * 1000) / this.container.retina.reduceFactor;
|
|
38
|
+
this.position = (_b = this.initialPosition) !== null && _b !== void 0 ? _b : this.calcPosition();
|
|
38
39
|
this.name = this.options.name;
|
|
39
|
-
this.shape = (
|
|
40
|
+
this.shape = (_c = __classPrivateFieldGet(this, _EmitterInstance_engine, "f").emitterShapeManager) === null || _c === void 0 ? void 0 : _c.getShape(this.options.shape);
|
|
40
41
|
this.fill = this.options.fill;
|
|
41
42
|
__classPrivateFieldSet(this, _EmitterInstance_firstSpawn, !this.options.life.wait, "f");
|
|
42
43
|
__classPrivateFieldSet(this, _EmitterInstance_startParticlesAdded, false, "f");
|
|
43
44
|
let particlesOptions = deepExtend({}, this.options.particles);
|
|
44
45
|
particlesOptions !== null && particlesOptions !== void 0 ? particlesOptions : (particlesOptions = {});
|
|
45
|
-
(
|
|
46
|
-
(
|
|
46
|
+
(_d = particlesOptions.move) !== null && _d !== void 0 ? _d : (particlesOptions.move = {});
|
|
47
|
+
(_e = (_h = particlesOptions.move).direction) !== null && _e !== void 0 ? _e : (_h.direction = this.options.direction);
|
|
47
48
|
if (this.options.spawnColor) {
|
|
48
49
|
this.spawnColor = colorToHsl(this.options.spawnColor);
|
|
49
50
|
}
|
|
50
51
|
this.paused = !this.options.autoPlay;
|
|
51
52
|
this.particlesOptions = particlesOptions;
|
|
52
53
|
this.size =
|
|
53
|
-
(
|
|
54
|
+
(_f = this.options.size) !== null && _f !== void 0 ? _f : (() => {
|
|
54
55
|
const size = new EmitterSize();
|
|
55
56
|
size.load({
|
|
56
57
|
height: 0,
|
|
@@ -59,7 +60,7 @@ export class EmitterInstance {
|
|
|
59
60
|
});
|
|
60
61
|
return size;
|
|
61
62
|
})();
|
|
62
|
-
this.lifeCount = (
|
|
63
|
+
this.lifeCount = (_g = this.options.life.count) !== null && _g !== void 0 ? _g : -1;
|
|
63
64
|
this.immortal = this.lifeCount <= 0;
|
|
64
65
|
this.play();
|
|
65
66
|
}
|
|
@@ -20,9 +20,9 @@ function updateOpacity(particle, delta) {
|
|
|
20
20
|
}
|
|
21
21
|
const minValue = particle.opacity.min;
|
|
22
22
|
const maxValue = particle.opacity.max;
|
|
23
|
-
if (
|
|
24
|
-
particle.opacity.enable
|
|
25
|
-
(((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0)
|
|
23
|
+
if (particle.destroyed ||
|
|
24
|
+
!particle.opacity.enable ||
|
|
25
|
+
(((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0) > 0 && ((_b = particle.opacity.loops) !== null && _b !== void 0 ? _b : 0) > ((_c = particle.opacity.maxLoops) !== null && _c !== void 0 ? _c : 0))) {
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
switch (particle.opacity.status) {
|
|
@@ -99,12 +99,14 @@ export class OpacityUpdater {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
isEnabled(particle) {
|
|
102
|
-
var _a, _b, _c;
|
|
102
|
+
var _a, _b, _c, _d;
|
|
103
103
|
return (!particle.destroyed &&
|
|
104
104
|
!particle.spawning &&
|
|
105
105
|
!!particle.opacity &&
|
|
106
106
|
particle.opacity.enable &&
|
|
107
|
-
(((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0) <= 0 ||
|
|
107
|
+
(((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0) <= 0 ||
|
|
108
|
+
(((_b = particle.opacity.maxLoops) !== null && _b !== void 0 ? _b : 0) > 0 &&
|
|
109
|
+
((_c = particle.opacity.loops) !== null && _c !== void 0 ? _c : 0) < ((_d = particle.opacity.maxLoops) !== null && _d !== void 0 ? _d : 0))));
|
|
108
110
|
}
|
|
109
111
|
update(particle, delta) {
|
|
110
112
|
if (!this.isEnabled(particle)) {
|
|
@@ -18,9 +18,9 @@ function updateSize(particle, delta) {
|
|
|
18
18
|
const sizeVelocity = ((_a = particle.size.velocity) !== null && _a !== void 0 ? _a : 0) * delta.factor;
|
|
19
19
|
const minValue = particle.size.min;
|
|
20
20
|
const maxValue = particle.size.max;
|
|
21
|
-
if (
|
|
22
|
-
particle.size.enable
|
|
23
|
-
(((_b = particle.size.
|
|
21
|
+
if (particle.destroyed ||
|
|
22
|
+
!particle.size.enable ||
|
|
23
|
+
(((_b = particle.size.maxLoops) !== null && _b !== void 0 ? _b : 0) > 0 && ((_c = particle.size.loops) !== null && _c !== void 0 ? _c : 0) > ((_d = particle.size.maxLoops) !== null && _d !== void 0 ? _d : 0))) {
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
switch (particle.size.status) {
|
|
@@ -57,11 +57,12 @@ export class SizeUpdater {
|
|
|
57
57
|
init() {
|
|
58
58
|
}
|
|
59
59
|
isEnabled(particle) {
|
|
60
|
-
var _a, _b, _c;
|
|
60
|
+
var _a, _b, _c, _d;
|
|
61
61
|
return (!particle.destroyed &&
|
|
62
62
|
!particle.spawning &&
|
|
63
63
|
particle.size.enable &&
|
|
64
|
-
(((_a = particle.size.
|
|
64
|
+
(((_a = particle.size.maxLoops) !== null && _a !== void 0 ? _a : 0) <= 0 ||
|
|
65
|
+
(((_b = particle.size.maxLoops) !== null && _b !== void 0 ? _b : 0) > 0 && ((_c = particle.size.loops) !== null && _c !== void 0 ? _c : 0) < ((_d = particle.size.maxLoops) !== null && _d !== void 0 ? _d : 0))));
|
|
65
66
|
}
|
|
66
67
|
update(particle, delta) {
|
|
67
68
|
if (!this.isEnabled(particle)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsparticles",
|
|
3
|
-
"version": "1.41.
|
|
3
|
+
"version": "1.41.5",
|
|
4
4
|
"description": "Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.",
|
|
5
5
|
"homepage": "https://particles.js.org/",
|
|
6
6
|
"scripts": {
|