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.
Files changed (54) hide show
  1. package/Plugins/Emitters/EmitterInstance.js +8 -7
  2. package/Updaters/Opacity/OpacityUpdater.js +7 -5
  3. package/Updaters/Size/SizeUpdater.js +6 -5
  4. package/browser/Plugins/Emitters/EmitterInstance.js +8 -7
  5. package/browser/Updaters/Opacity/OpacityUpdater.js +7 -5
  6. package/browser/Updaters/Size/SizeUpdater.js +6 -5
  7. package/esm/Plugins/Emitters/EmitterInstance.js +8 -7
  8. package/esm/Updaters/Opacity/OpacityUpdater.js +7 -5
  9. package/esm/Updaters/Size/SizeUpdater.js +6 -5
  10. package/package.json +1 -1
  11. package/report.html +2 -2
  12. package/report.slim.html +2 -2
  13. package/tsparticles.engine.min.js +1 -1
  14. package/tsparticles.interaction.external.attract.min.js +1 -1
  15. package/tsparticles.interaction.external.bounce.min.js +1 -1
  16. package/tsparticles.interaction.external.bubble.min.js +1 -1
  17. package/tsparticles.interaction.external.connect.min.js +1 -1
  18. package/tsparticles.interaction.external.grab.min.js +1 -1
  19. package/tsparticles.interaction.external.repulse.min.js +1 -1
  20. package/tsparticles.interaction.external.trail.min.js +1 -1
  21. package/tsparticles.interaction.particles.attract.min.js +1 -1
  22. package/tsparticles.interaction.particles.collisions.min.js +1 -1
  23. package/tsparticles.interaction.particles.links.min.js +1 -1
  24. package/tsparticles.js +14 -13
  25. package/tsparticles.min.js +2 -2
  26. package/tsparticles.pathseg.min.js +1 -1
  27. package/tsparticles.plugins.absorbers.min.js +1 -1
  28. package/tsparticles.plugins.emitters.js +8 -7
  29. package/tsparticles.plugins.emitters.min.js +2 -2
  30. package/tsparticles.plugins.polygonMask.min.js +1 -1
  31. package/tsparticles.shape.circle.min.js +1 -1
  32. package/tsparticles.shape.image.min.js +1 -1
  33. package/tsparticles.shape.line.min.js +1 -1
  34. package/tsparticles.shape.polygon.min.js +1 -1
  35. package/tsparticles.shape.square.min.js +1 -1
  36. package/tsparticles.shape.star.min.js +1 -1
  37. package/tsparticles.shape.text.min.js +1 -1
  38. package/tsparticles.slim.js +6 -6
  39. package/tsparticles.slim.min.js +2 -2
  40. package/tsparticles.updater.angle.min.js +1 -1
  41. package/tsparticles.updater.color.min.js +1 -1
  42. package/tsparticles.updater.life.min.js +1 -1
  43. package/tsparticles.updater.opacity.js +3 -3
  44. package/tsparticles.updater.opacity.min.js +2 -2
  45. package/tsparticles.updater.outModes.min.js +1 -1
  46. package/tsparticles.updater.roll.min.js +1 -1
  47. package/tsparticles.updater.size.js +3 -3
  48. package/tsparticles.updater.size.min.js +2 -2
  49. package/tsparticles.updater.strokeColor.min.js +1 -1
  50. package/tsparticles.updater.tilt.min.js +1 -1
  51. package/tsparticles.updater.wobble.min.js +1 -1
  52. package/umd/Plugins/Emitters/EmitterInstance.js +8 -7
  53. package/umd/Updaters/Opacity/OpacityUpdater.js +7 -5
  54. 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 _g;
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 = (_b = __classPrivateFieldGet(this, _EmitterInstance_engine, "f").emitterShapeManager) === null || _b === void 0 ? void 0 : _b.getShape(this.options.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
- (_c = particlesOptions.move) !== null && _c !== void 0 ? _c : (particlesOptions.move = {});
49
- (_d = (_g = particlesOptions.move).direction) !== null && _d !== void 0 ? _d : (_g.direction = this.options.direction);
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
- (_e = this.options.size) !== null && _e !== void 0 ? _e : (() => {
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 = (_f = this.options.life.count) !== null && _f !== void 0 ? _f : -1;
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 (!(!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)))) {
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 || ((_b = particle.opacity.loops) !== null && _b !== void 0 ? _b : 0) < ((_c = particle.opacity.maxLoops) !== null && _c !== void 0 ? _c : 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 (!(!particle.destroyed &&
25
- particle.size.enable &&
26
- (((_b = particle.size.loops) !== 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
+ 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.loops) !== null && _a !== void 0 ? _a : 0) <= 0 || ((_b = particle.size.loops) !== null && _b !== void 0 ? _b : 0) < ((_c = particle.size.maxLoops) !== null && _c !== void 0 ? _c : 0)));
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 _g;
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 = (_b = __classPrivateFieldGet(this, _EmitterInstance_engine, "f").emitterShapeManager) === null || _b === void 0 ? void 0 : _b.getShape(this.options.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
- (_c = particlesOptions.move) !== null && _c !== void 0 ? _c : (particlesOptions.move = {});
49
- (_d = (_g = particlesOptions.move).direction) !== null && _d !== void 0 ? _d : (_g.direction = this.options.direction);
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
- (_e = this.options.size) !== null && _e !== void 0 ? _e : (() => {
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 = (_f = this.options.life.count) !== null && _f !== void 0 ? _f : -1;
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 (!(!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)))) {
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 || ((_b = particle.opacity.loops) !== null && _b !== void 0 ? _b : 0) < ((_c = particle.opacity.maxLoops) !== null && _c !== void 0 ? _c : 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 (!(!particle.destroyed &&
22
- particle.size.enable &&
23
- (((_b = particle.size.loops) !== 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)))) {
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.loops) !== null && _a !== void 0 ? _a : 0) <= 0 || ((_b = particle.size.loops) !== null && _b !== void 0 ? _b : 0) < ((_c = particle.size.maxLoops) !== null && _c !== void 0 ? _c : 0)));
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 _g;
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 = (_b = __classPrivateFieldGet(this, _EmitterInstance_engine, "f").emitterShapeManager) === null || _b === void 0 ? void 0 : _b.getShape(this.options.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
- (_c = particlesOptions.move) !== null && _c !== void 0 ? _c : (particlesOptions.move = {});
46
- (_d = (_g = particlesOptions.move).direction) !== null && _d !== void 0 ? _d : (_g.direction = this.options.direction);
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
- (_e = this.options.size) !== null && _e !== void 0 ? _e : (() => {
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 = (_f = this.options.life.count) !== null && _f !== void 0 ? _f : -1;
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 (!(!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)))) {
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 || ((_b = particle.opacity.loops) !== null && _b !== void 0 ? _b : 0) < ((_c = particle.opacity.maxLoops) !== null && _c !== void 0 ? _c : 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 (!(!particle.destroyed &&
22
- particle.size.enable &&
23
- (((_b = particle.size.loops) !== 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)))) {
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.loops) !== null && _a !== void 0 ? _a : 0) <= 0 || ((_b = particle.size.loops) !== null && _b !== void 0 ? _b : 0) < ((_c = particle.size.maxLoops) !== null && _c !== void 0 ? _c : 0)));
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.2",
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": {