@tsparticles/preset-fountain 3.0.0-beta.1 → 3.0.0-beta.4

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.
@@ -4,7 +4,7 @@
4
4
  * Demo / Generator : https://particles.js.org/
5
5
  * GitHub : https://www.github.com/matteobruni/tsparticles
6
6
  * How to use? : Check the GitHub README
7
- * v3.0.0-beta.1
7
+ * v3.0.0-beta.4
8
8
  */
9
9
  (function webpackUniversalModuleDefinition(root, factory) {
10
10
  if(typeof exports === 'object' && typeof module === 'object')
@@ -61,7 +61,7 @@ __webpack_require__.d(__webpack_exports__, {
61
61
  tsParticles: () => (/* reexport */ tsParticles)
62
62
  });
63
63
 
64
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Utils/Constants.js
64
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Utils/Constants.js
65
65
  const generatedAttribute = "generated";
66
66
  const mouseDownEvent = "pointerdown";
67
67
  const mouseUpEvent = "pointerup";
@@ -76,7 +76,7 @@ const resizeEvent = "resize";
76
76
  const visibilityChangeEvent = "visibilitychange";
77
77
  const errorPrefix = "tsParticles - Error";
78
78
 
79
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Utils/Vector3d.js
79
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Utils/Vector3d.js
80
80
 
81
81
 
82
82
  class Vector3d {
@@ -182,7 +182,7 @@ class Vector3d {
182
182
  }
183
183
  }
184
184
 
185
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Utils/Vector.js
185
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Utils/Vector.js
186
186
 
187
187
  class Vector_Vector extends Vector3d {
188
188
  constructor(xOrCoords, y) {
@@ -199,7 +199,7 @@ class Vector_Vector extends Vector3d {
199
199
  }
200
200
  }
201
201
 
202
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Utils/NumberUtils.js
202
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Utils/NumberUtils.js
203
203
 
204
204
 
205
205
  let _random = Math.random;
@@ -233,7 +233,7 @@ function randomInRange(r) {
233
233
  }
234
234
  return getRandom() * (max - min) + min;
235
235
  }
236
- function getRangeValue(value) {
236
+ function NumberUtils_getRangeValue(value) {
237
237
  return isNumber(value) ? value : randomInRange(value);
238
238
  }
239
239
  function getRangeMin(value) {
@@ -254,15 +254,6 @@ function setRangeValue(source, value) {
254
254
  }
255
255
  : setRangeValue(min, max);
256
256
  }
257
- function NumberUtils_getValue(options) {
258
- const random = options.random, { enable, minimumValue } = isBoolean(random)
259
- ? {
260
- enable: random,
261
- minimumValue: 0,
262
- }
263
- : random;
264
- return enable ? getRangeValue(setRangeValue(options.value, minimumValue)) : getRangeValue(options.value);
265
- }
266
257
  function NumberUtils_getDistances(pointA, pointB) {
267
258
  const dx = pointA.x - pointB.x, dy = pointA.y - pointB.y;
268
259
  return { dx: dx, dy: dy, distance: Math.sqrt(dx ** 2 + dy ** 2) };
@@ -276,21 +267,21 @@ function getParticleDirectionAngle(direction, position, center) {
276
267
  }
277
268
  switch (direction) {
278
269
  case "top":
279
- return -Math.PI / 2;
270
+ return -Math.PI * 0.5;
280
271
  case "top-right":
281
- return -Math.PI / 4;
272
+ return -Math.PI * 0.25;
282
273
  case "right":
283
274
  return 0;
284
275
  case "bottom-right":
285
- return Math.PI / 4;
276
+ return Math.PI * 0.25;
286
277
  case "bottom":
287
- return Math.PI / 2;
278
+ return Math.PI * 0.5;
288
279
  case "bottom-left":
289
- return (3 * Math.PI) / 4;
280
+ return Math.PI * 0.75;
290
281
  case "left":
291
282
  return Math.PI;
292
283
  case "top-left":
293
- return (-3 * Math.PI) / 4;
284
+ return -Math.PI * 0.75;
294
285
  case "inside":
295
286
  return Math.atan2(center.y - position.y, center.x - position.x);
296
287
  case "outside":
@@ -324,8 +315,8 @@ function calcPositionOrRandomFromSize(data) {
324
315
  }
325
316
  function calcPositionOrRandomFromSizeRanged(data) {
326
317
  const position = {
327
- x: data.position?.x !== undefined ? getRangeValue(data.position.x) : undefined,
328
- y: data.position?.y !== undefined ? getRangeValue(data.position.y) : undefined,
318
+ x: data.position?.x !== undefined ? NumberUtils_getRangeValue(data.position.x) : undefined,
319
+ y: data.position?.y !== undefined ? NumberUtils_getRangeValue(data.position.y) : undefined,
329
320
  };
330
321
  return calcPositionOrRandomFromSize({ size: data.size, position });
331
322
  }
@@ -337,8 +328,8 @@ function calcExactPositionOrRandomFromSize(data) {
337
328
  }
338
329
  function calcExactPositionOrRandomFromSizeRanged(data) {
339
330
  const position = {
340
- x: data.position?.x !== undefined ? getRangeValue(data.position.x) : undefined,
341
- y: data.position?.y !== undefined ? getRangeValue(data.position.y) : undefined,
331
+ x: data.position?.x !== undefined ? NumberUtils_getRangeValue(data.position.x) : undefined,
332
+ y: data.position?.y !== undefined ? NumberUtils_getRangeValue(data.position.y) : undefined,
342
333
  };
343
334
  return calcExactPositionOrRandomFromSize({ size: data.size, position });
344
335
  }
@@ -346,7 +337,7 @@ function parseAlpha(input) {
346
337
  return input ? (input.endsWith("%") ? parseFloat(input) / 100 : parseFloat(input)) : 1;
347
338
  }
348
339
 
349
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Utils/Utils.js
340
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Utils/Utils.js
350
341
 
351
342
 
352
343
  const _logger = {
@@ -376,8 +367,8 @@ function rectSideBounce(data) {
376
367
  pOtherSide.max > rectOtherSide.max) {
377
368
  return res;
378
369
  }
379
- if ((pSide.max >= rectSide.min && pSide.max <= (rectSide.max + rectSide.min) / 2 && velocity > 0) ||
380
- (pSide.min <= rectSide.max && pSide.min > (rectSide.max + rectSide.min) / 2 && velocity < 0)) {
370
+ if ((pSide.max >= rectSide.min && pSide.max <= (rectSide.max + rectSide.min) * 0.5 && velocity > 0) ||
371
+ (pSide.min <= rectSide.max && pSide.min > (rectSide.max + rectSide.min) * 0.5 && velocity < 0)) {
381
372
  res.velocity = velocity * -factor;
382
373
  res.bounced = true;
383
374
  }
@@ -401,6 +392,12 @@ function safeMatchMedia(query) {
401
392
  }
402
393
  return matchMedia(query);
403
394
  }
395
+ function safeIntersectionObserver(callback) {
396
+ if (isSsr() || typeof IntersectionObserver === "undefined") {
397
+ return;
398
+ }
399
+ return new IntersectionObserver(callback);
400
+ }
404
401
  function safeMutationObserver(callback) {
405
402
  if (isSsr() || typeof MutationObserver === "undefined") {
406
403
  return;
@@ -510,7 +507,7 @@ function circleBounceDataFromParticle(p) {
510
507
  radius: p.getRadius(),
511
508
  mass: p.getMass(),
512
509
  velocity: p.velocity,
513
- factor: Vector.create(getValue(p.options.bounce.horizontal), getValue(p.options.bounce.vertical)),
510
+ factor: Vector.create(getRangeValue(p.options.bounce.horizontal.value), getRangeValue(p.options.bounce.vertical.value)),
514
511
  };
515
512
  }
516
513
  function circleBounce(p1, p2) {
@@ -525,7 +522,7 @@ function circleBounce(p1, p2) {
525
522
  p2.velocity.y = vFinal2.y * p2.factor.y;
526
523
  }
527
524
  function rectBounce(particle, divBounds) {
528
- const pPos = particle.getPosition(), size = particle.getRadius(), bounds = calculateBounds(pPos, size), resH = rectSideBounce({
525
+ const pPos = particle.getPosition(), size = particle.getRadius(), bounds = calculateBounds(pPos, size), bounceOptions = particle.options.bounce, resH = rectSideBounce({
529
526
  pSide: {
530
527
  min: bounds.left,
531
528
  max: bounds.right,
@@ -543,7 +540,7 @@ function rectBounce(particle, divBounds) {
543
540
  max: divBounds.bottom,
544
541
  },
545
542
  velocity: particle.velocity.x,
546
- factor: getValue(particle.options.bounce.horizontal),
543
+ factor: getRangeValue(bounceOptions.horizontal.value),
547
544
  });
548
545
  if (resH.bounced) {
549
546
  if (resH.velocity !== undefined) {
@@ -571,7 +568,7 @@ function rectBounce(particle, divBounds) {
571
568
  max: divBounds.right,
572
569
  },
573
570
  velocity: particle.velocity.y,
574
- factor: getValue(particle.options.bounce.vertical),
571
+ factor: getRangeValue(bounceOptions.vertical.value),
575
572
  });
576
573
  if (resV.bounced) {
577
574
  if (resV.velocity !== undefined) {
@@ -593,17 +590,17 @@ function findItemFromSingleOrMultiple(obj, callback) {
593
590
  }
594
591
  function initParticleNumericAnimationValue(options, pxRatio) {
595
592
  const valueRange = options.value, animationOptions = options.animation, res = {
596
- delayTime: getRangeValue(animationOptions.delay) * 1000,
593
+ delayTime: NumberUtils_getRangeValue(animationOptions.delay) * 1000,
597
594
  enable: animationOptions.enable,
598
- value: getRangeValue(options.value) * pxRatio,
595
+ value: NumberUtils_getRangeValue(options.value) * pxRatio,
599
596
  max: getRangeMax(valueRange) * pxRatio,
600
597
  min: getRangeMin(valueRange) * pxRatio,
601
598
  loops: 0,
602
- maxLoops: getRangeValue(animationOptions.count),
599
+ maxLoops: NumberUtils_getRangeValue(animationOptions.count),
603
600
  time: 0,
604
601
  };
605
602
  if (animationOptions.enable) {
606
- res.decay = 1 - getRangeValue(animationOptions.decay);
603
+ res.decay = 1 - NumberUtils_getRangeValue(animationOptions.decay);
607
604
  switch (animationOptions.mode) {
608
605
  case "increase":
609
606
  res.status = "increasing";
@@ -686,31 +683,13 @@ function isArray(arg) {
686
683
  return Array.isArray(arg);
687
684
  }
688
685
 
689
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Utils/ColorUtils.js
686
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Utils/ColorUtils.js
690
687
 
691
688
 
692
689
  const randomColorValue = "random", midColorValue = "mid", colorManagers = new Map();
693
690
  function addColorManager(manager) {
694
691
  colorManagers.set(manager.key, manager);
695
692
  }
696
- function hue2rgb(p, q, t) {
697
- if (t < 0) {
698
- t += 1;
699
- }
700
- if (t > 1) {
701
- t -= 1;
702
- }
703
- if (t < 1 / 6) {
704
- return p + (q - p) * 6 * t;
705
- }
706
- if (t < 1 / 2) {
707
- return q;
708
- }
709
- if (t < 2 / 3) {
710
- return p + (q - p) * (2 / 3 - t) * 6;
711
- }
712
- return p;
713
- }
714
693
  function stringToRgba(input) {
715
694
  for (const [, manager] of colorManagers) {
716
695
  if (input.startsWith(manager.stringPrefix)) {
@@ -780,7 +759,7 @@ function rangeColorToHsl(color, index, useIndex = true) {
780
759
  function rgbToHsl(color) {
781
760
  const r1 = color.r / 255, g1 = color.g / 255, b1 = color.b / 255, max = Math.max(r1, g1, b1), min = Math.min(r1, g1, b1), res = {
782
761
  h: 0,
783
- l: (max + min) / 2,
762
+ l: (max + min) * 0.5,
784
763
  s: 0,
785
764
  };
786
765
  if (max !== min) {
@@ -808,26 +787,30 @@ function stringToRgb(input) {
808
787
  return stringToRgba(input);
809
788
  }
810
789
  function hslToRgb(hsl) {
811
- const result = { b: 0, g: 0, r: 0 }, hslPercent = {
812
- h: hsl.h / 360,
813
- l: hsl.l / 100,
814
- s: hsl.s / 100,
815
- };
816
- if (!hslPercent.s) {
817
- result.r = result.g = result.b = hslPercent.l;
790
+ const h = ((hsl.h % 360) + 360) % 360, s = Math.max(0, Math.min(100, hsl.s)), l = Math.max(0, Math.min(100, hsl.l)), hNormalized = h / 360, sNormalized = s / 100, lNormalized = l / 100;
791
+ if (s === 0) {
792
+ const grayscaleValue = Math.round(lNormalized * 255);
793
+ return { r: grayscaleValue, g: grayscaleValue, b: grayscaleValue };
818
794
  }
819
- else {
820
- const q = hslPercent.l < 0.5
821
- ? hslPercent.l * (1 + hslPercent.s)
822
- : hslPercent.l + hslPercent.s - hslPercent.l * hslPercent.s, p = 2 * hslPercent.l - q;
823
- result.r = hue2rgb(p, q, hslPercent.h + 1 / 3);
824
- result.g = hue2rgb(p, q, hslPercent.h);
825
- result.b = hue2rgb(p, q, hslPercent.h - 1 / 3);
826
- }
827
- result.r = Math.floor(result.r * 255);
828
- result.g = Math.floor(result.g * 255);
829
- result.b = Math.floor(result.b * 255);
830
- return result;
795
+ const channel = (temp1, temp2, temp3) => {
796
+ if (temp3 < 0) {
797
+ temp3 += 1;
798
+ }
799
+ if (temp3 > 1) {
800
+ temp3 -= 1;
801
+ }
802
+ if (temp3 * 6 < 1) {
803
+ return temp1 + (temp2 - temp1) * 6 * temp3;
804
+ }
805
+ if (temp3 * 2 < 1) {
806
+ return temp2;
807
+ }
808
+ if (temp3 * 3 < 2) {
809
+ return temp1 + (temp2 - temp1) * (2 / 3 - temp3) * 6;
810
+ }
811
+ return temp1;
812
+ }, temp1 = lNormalized < 0.5 ? lNormalized * (1 + sNormalized) : lNormalized + sNormalized - lNormalized * sNormalized, temp2 = 2 * lNormalized - temp1, red = Math.min(255, 255 * channel(temp2, temp1, hNormalized + 1 / 3)), green = Math.min(255, 255 * channel(temp2, temp1, hNormalized)), blue = Math.min(255, 255 * channel(temp2, temp1, hNormalized - 1 / 3));
813
+ return { r: Math.round(red), g: Math.round(green), b: Math.round(blue) };
831
814
  }
832
815
  function hslaToRgba(hsla) {
833
816
  const rgbResult = hslToRgb(hsla);
@@ -942,13 +925,13 @@ function getHslAnimationFromHsl(hsl, animationOptions, reduceFactor) {
942
925
  function setColorAnimation(colorValue, colorAnimation, reduceFactor) {
943
926
  colorValue.enable = colorAnimation.enable;
944
927
  if (colorValue.enable) {
945
- colorValue.velocity = (getRangeValue(colorAnimation.speed) / 100) * reduceFactor;
946
- colorValue.decay = 1 - getRangeValue(colorAnimation.decay);
928
+ colorValue.velocity = (NumberUtils_getRangeValue(colorAnimation.speed) / 100) * reduceFactor;
929
+ colorValue.decay = 1 - NumberUtils_getRangeValue(colorAnimation.decay);
947
930
  colorValue.status = "increasing";
948
931
  colorValue.loops = 0;
949
- colorValue.maxLoops = getRangeValue(colorAnimation.count);
932
+ colorValue.maxLoops = NumberUtils_getRangeValue(colorAnimation.count);
950
933
  colorValue.time = 0;
951
- colorValue.delayTime = getRangeValue(colorAnimation.delay) * 1000;
934
+ colorValue.delayTime = NumberUtils_getRangeValue(colorAnimation.delay) * 1000;
952
935
  if (!colorAnimation.sync) {
953
936
  colorValue.velocity *= getRandom();
954
937
  colorValue.value *= getRandom();
@@ -960,7 +943,7 @@ function setColorAnimation(colorValue, colorAnimation, reduceFactor) {
960
943
  }
961
944
  }
962
945
 
963
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Utils/CanvasUtils.js
946
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Utils/CanvasUtils.js
964
947
 
965
948
  function drawLine(context, begin, end) {
966
949
  context.beginPath();
@@ -968,13 +951,6 @@ function drawLine(context, begin, end) {
968
951
  context.lineTo(end.x, end.y);
969
952
  context.closePath();
970
953
  }
971
- function drawTriangle(context, p1, p2, p3) {
972
- context.beginPath();
973
- context.moveTo(p1.x, p1.y);
974
- context.lineTo(p2.x, p2.y);
975
- context.lineTo(p3.x, p3.y);
976
- context.closePath();
977
- }
978
954
  function paintBase(context, dimension, baseColor) {
979
955
  context.fillStyle = baseColor ?? "rgba(0,0,0,0)";
980
956
  context.fillRect(0, 0, dimension.width, dimension.height);
@@ -1002,7 +978,6 @@ function drawParticle(data) {
1002
978
  d: rotateData.cos * (transform.d ?? 1),
1003
979
  };
1004
980
  context.setTransform(transformData.a, transformData.b, transformData.c, transformData.d, pos.x, pos.y);
1005
- context.beginPath();
1006
981
  if (backgroundMask) {
1007
982
  context.globalCompositeOperation = composite;
1008
983
  }
@@ -1021,39 +996,55 @@ function drawParticle(data) {
1021
996
  if (colorStyles.stroke) {
1022
997
  context.strokeStyle = colorStyles.stroke;
1023
998
  }
1024
- drawShape(container, context, particle, radius, opacity, delta);
999
+ const drawData = { container, context, particle, radius, opacity, delta };
1000
+ context.beginPath();
1001
+ drawShape(drawData);
1002
+ if (particle.shapeClose) {
1003
+ context.closePath();
1004
+ }
1025
1005
  if (strokeWidth > 0) {
1026
1006
  context.stroke();
1027
1007
  }
1028
- if (particle.close) {
1029
- context.closePath();
1030
- }
1031
- if (particle.fill) {
1008
+ if (particle.shapeFill) {
1032
1009
  context.fill();
1033
1010
  }
1034
- drawShapeAfterEffect(container, context, particle, radius, opacity, delta);
1011
+ drawShapeAfterDraw(drawData);
1012
+ drawEffect(drawData);
1035
1013
  context.globalCompositeOperation = "source-over";
1036
1014
  context.setTransform(1, 0, 0, 1, 0, 0);
1037
1015
  }
1038
- function drawShape(container, context, particle, radius, opacity, delta) {
1016
+ function drawEffect(data) {
1017
+ const { container, context, particle, radius, opacity, delta } = data;
1018
+ if (!particle.effect) {
1019
+ return;
1020
+ }
1021
+ const drawer = container.effectDrawers.get(particle.effect);
1022
+ if (!drawer) {
1023
+ return;
1024
+ }
1025
+ drawer.draw({ context, particle, radius, opacity, delta, pixelRatio: container.retina.pixelRatio });
1026
+ }
1027
+ function drawShape(data) {
1028
+ const { container, context, particle, radius, opacity, delta } = data;
1039
1029
  if (!particle.shape) {
1040
1030
  return;
1041
1031
  }
1042
- const drawer = container.drawers.get(particle.shape);
1032
+ const drawer = container.shapeDrawers.get(particle.shape);
1043
1033
  if (!drawer) {
1044
1034
  return;
1045
1035
  }
1046
- drawer.draw(context, particle, radius, opacity, delta, container.retina.pixelRatio);
1036
+ drawer.draw({ context, particle, radius, opacity, delta, pixelRatio: container.retina.pixelRatio });
1047
1037
  }
1048
- function drawShapeAfterEffect(container, context, particle, radius, opacity, delta) {
1038
+ function drawShapeAfterDraw(data) {
1039
+ const { container, context, particle, radius, opacity, delta } = data;
1049
1040
  if (!particle.shape) {
1050
1041
  return;
1051
1042
  }
1052
- const drawer = container.drawers.get(particle.shape);
1053
- if (!drawer || !drawer.afterEffect) {
1043
+ const drawer = container.shapeDrawers.get(particle.shape);
1044
+ if (!drawer || !drawer.afterDraw) {
1054
1045
  return;
1055
1046
  }
1056
- drawer.afterEffect(context, particle, radius, opacity, delta, container.retina.pixelRatio);
1047
+ drawer.afterDraw({ context, particle, radius, opacity, delta, pixelRatio: container.retina.pixelRatio });
1057
1048
  }
1058
1049
  function drawPlugin(context, plugin, delta) {
1059
1050
  if (!plugin.draw) {
@@ -1075,7 +1066,7 @@ function alterHsl(color, type, value) {
1075
1066
  };
1076
1067
  }
1077
1068
 
1078
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Canvas.js
1069
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Canvas.js
1079
1070
 
1080
1071
 
1081
1072
 
@@ -1480,10 +1471,10 @@ class Canvas {
1480
1471
  this.element.width = size.width = this.element.offsetWidth * pxRatio;
1481
1472
  this.element.height = size.height = this.element.offsetHeight * pxRatio;
1482
1473
  if (this.container.started) {
1483
- this.resizeFactor = {
1474
+ container.particles.setResizeFactor({
1484
1475
  width: size.width / oldSize.width,
1485
1476
  height: size.height / oldSize.height,
1486
- };
1477
+ });
1487
1478
  }
1488
1479
  return true;
1489
1480
  }
@@ -1505,7 +1496,7 @@ class Canvas {
1505
1496
  }
1506
1497
  }
1507
1498
 
1508
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Utils/EventListeners.js
1499
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Utils/EventListeners.js
1509
1500
 
1510
1501
 
1511
1502
  function manageListener(element, event, handler, add, options) {
@@ -1826,7 +1817,7 @@ class EventListeners {
1826
1817
  }
1827
1818
  }
1828
1819
 
1829
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/OptionsColor.js
1820
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/OptionsColor.js
1830
1821
 
1831
1822
  class OptionsColor {
1832
1823
  constructor() {
@@ -1853,7 +1844,7 @@ class OptionsColor {
1853
1844
  }
1854
1845
  }
1855
1846
 
1856
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Background/Background.js
1847
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Background/Background.js
1857
1848
 
1858
1849
  class Background {
1859
1850
  constructor() {
@@ -1890,7 +1881,7 @@ class Background {
1890
1881
  }
1891
1882
  }
1892
1883
 
1893
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.js
1884
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.js
1894
1885
 
1895
1886
  class BackgroundMaskCover {
1896
1887
  constructor() {
@@ -1911,7 +1902,7 @@ class BackgroundMaskCover {
1911
1902
  }
1912
1903
  }
1913
1904
 
1914
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMask.js
1905
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMask.js
1915
1906
 
1916
1907
 
1917
1908
  class BackgroundMask {
@@ -1928,8 +1919,7 @@ class BackgroundMask {
1928
1919
  this.composite = data.composite;
1929
1920
  }
1930
1921
  if (data.cover !== undefined) {
1931
- const cover = data.cover;
1932
- const color = (Utils_isString(data.cover) ? { color: data.cover } : data.cover);
1922
+ const cover = data.cover, color = (Utils_isString(data.cover) ? { color: data.cover } : data.cover);
1933
1923
  this.cover.load(cover.color !== undefined ? cover : { color: color });
1934
1924
  }
1935
1925
  if (data.enable !== undefined) {
@@ -1938,7 +1928,7 @@ class BackgroundMask {
1938
1928
  }
1939
1929
  }
1940
1930
 
1941
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/FullScreen/FullScreen.js
1931
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/FullScreen/FullScreen.js
1942
1932
  class FullScreen {
1943
1933
  constructor() {
1944
1934
  this.enable = true;
@@ -1957,7 +1947,7 @@ class FullScreen {
1957
1947
  }
1958
1948
  }
1959
1949
 
1960
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ClickEvent.js
1950
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ClickEvent.js
1961
1951
  class ClickEvent {
1962
1952
  constructor() {
1963
1953
  this.enable = false;
@@ -1976,7 +1966,7 @@ class ClickEvent {
1976
1966
  }
1977
1967
  }
1978
1968
 
1979
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/DivEvent.js
1969
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/DivEvent.js
1980
1970
  class DivEvent {
1981
1971
  constructor() {
1982
1972
  this.selectors = [];
@@ -2003,7 +1993,7 @@ class DivEvent {
2003
1993
  }
2004
1994
  }
2005
1995
 
2006
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Parallax.js
1996
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Parallax.js
2007
1997
  class Parallax {
2008
1998
  constructor() {
2009
1999
  this.enable = false;
@@ -2026,7 +2016,7 @@ class Parallax {
2026
2016
  }
2027
2017
  }
2028
2018
 
2029
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/HoverEvent.js
2019
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/HoverEvent.js
2030
2020
 
2031
2021
  class HoverEvent {
2032
2022
  constructor() {
@@ -2048,7 +2038,7 @@ class HoverEvent {
2048
2038
  }
2049
2039
  }
2050
2040
 
2051
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ResizeEvent.js
2041
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ResizeEvent.js
2052
2042
  class ResizeEvent {
2053
2043
  constructor() {
2054
2044
  this.delay = 0.5;
@@ -2067,7 +2057,7 @@ class ResizeEvent {
2067
2057
  }
2068
2058
  }
2069
2059
 
2070
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Events.js
2060
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Events.js
2071
2061
 
2072
2062
 
2073
2063
 
@@ -2103,7 +2093,7 @@ class Events {
2103
2093
  }
2104
2094
  }
2105
2095
 
2106
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Modes/Modes.js
2096
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Modes/Modes.js
2107
2097
  class Modes {
2108
2098
  constructor(engine, container) {
2109
2099
  this._engine = engine;
@@ -2129,7 +2119,7 @@ class Modes {
2129
2119
  }
2130
2120
  }
2131
2121
 
2132
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Interactivity.js
2122
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Interactivity.js
2133
2123
 
2134
2124
 
2135
2125
  class Interactivity {
@@ -2151,7 +2141,7 @@ class Interactivity {
2151
2141
  }
2152
2142
  }
2153
2143
 
2154
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/ManualParticle.js
2144
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/ManualParticle.js
2155
2145
 
2156
2146
  class ManualParticle {
2157
2147
  load(data) {
@@ -2171,7 +2161,7 @@ class ManualParticle {
2171
2161
  }
2172
2162
  }
2173
2163
 
2174
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Responsive.js
2164
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Responsive.js
2175
2165
 
2176
2166
  class Responsive {
2177
2167
  constructor() {
@@ -2200,7 +2190,7 @@ class Responsive {
2200
2190
  }
2201
2191
  }
2202
2192
 
2203
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/ThemeDefault.js
2193
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/ThemeDefault.js
2204
2194
  class ThemeDefault {
2205
2195
  constructor() {
2206
2196
  this.auto = false;
@@ -2223,7 +2213,7 @@ class ThemeDefault {
2223
2213
  }
2224
2214
  }
2225
2215
 
2226
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/Theme.js
2216
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/Theme.js
2227
2217
 
2228
2218
 
2229
2219
  class Theme {
@@ -2245,17 +2235,16 @@ class Theme {
2245
2235
  }
2246
2236
  }
2247
2237
 
2248
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/ColorAnimation.js
2238
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/AnimationOptions.js
2249
2239
 
2250
- class ColorAnimation {
2240
+ class AnimationOptions {
2251
2241
  constructor() {
2252
2242
  this.count = 0;
2253
2243
  this.enable = false;
2254
- this.offset = 0;
2255
2244
  this.speed = 1;
2256
- this.delay = 0;
2257
2245
  this.decay = 0;
2258
- this.sync = true;
2246
+ this.delay = 0;
2247
+ this.sync = false;
2259
2248
  }
2260
2249
  load(data) {
2261
2250
  if (!data) {
@@ -2267,9 +2256,6 @@ class ColorAnimation {
2267
2256
  if (data.enable !== undefined) {
2268
2257
  this.enable = data.enable;
2269
2258
  }
2270
- if (data.offset !== undefined) {
2271
- this.offset = setRangeValue(data.offset);
2272
- }
2273
2259
  if (data.speed !== undefined) {
2274
2260
  this.speed = setRangeValue(data.speed);
2275
2261
  }
@@ -2284,8 +2270,47 @@ class ColorAnimation {
2284
2270
  }
2285
2271
  }
2286
2272
  }
2273
+ class RangedAnimationOptions extends AnimationOptions {
2274
+ constructor() {
2275
+ super();
2276
+ this.mode = "auto";
2277
+ this.startValue = "random";
2278
+ }
2279
+ load(data) {
2280
+ super.load(data);
2281
+ if (!data) {
2282
+ return;
2283
+ }
2284
+ if (data.mode !== undefined) {
2285
+ this.mode = data.mode;
2286
+ }
2287
+ if (data.startValue !== undefined) {
2288
+ this.startValue = data.startValue;
2289
+ }
2290
+ }
2291
+ }
2287
2292
 
2288
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/HslAnimation.js
2293
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/ColorAnimation.js
2294
+
2295
+
2296
+ class ColorAnimation extends AnimationOptions {
2297
+ constructor() {
2298
+ super();
2299
+ this.offset = 0;
2300
+ this.sync = true;
2301
+ }
2302
+ load(data) {
2303
+ super.load(data);
2304
+ if (!data) {
2305
+ return;
2306
+ }
2307
+ if (data.offset !== undefined) {
2308
+ this.offset = setRangeValue(data.offset);
2309
+ }
2310
+ }
2311
+ }
2312
+
2313
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/HslAnimation.js
2289
2314
 
2290
2315
  class HslAnimation {
2291
2316
  constructor() {
@@ -2303,7 +2328,7 @@ class HslAnimation {
2303
2328
  }
2304
2329
  }
2305
2330
 
2306
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/AnimatableColor.js
2331
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/AnimatableColor.js
2307
2332
 
2308
2333
 
2309
2334
 
@@ -2342,7 +2367,7 @@ class AnimatableColor extends OptionsColor {
2342
2367
  }
2343
2368
  }
2344
2369
 
2345
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsAbsorb.js
2370
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsAbsorb.js
2346
2371
  class CollisionsAbsorb {
2347
2372
  constructor() {
2348
2373
  this.speed = 2;
@@ -2357,7 +2382,7 @@ class CollisionsAbsorb {
2357
2382
  }
2358
2383
  }
2359
2384
 
2360
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsOverlap.js
2385
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsOverlap.js
2361
2386
  class CollisionsOverlap {
2362
2387
  constructor() {
2363
2388
  this.enable = true;
@@ -2376,106 +2401,23 @@ class CollisionsOverlap {
2376
2401
  }
2377
2402
  }
2378
2403
 
2379
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/AnimationOptions.js
2380
-
2381
- class AnimationOptions_AnimationOptions {
2382
- constructor() {
2383
- this.count = 0;
2384
- this.enable = false;
2385
- this.speed = 1;
2386
- this.decay = 0;
2387
- this.delay = 0;
2388
- this.sync = false;
2389
- }
2390
- load(data) {
2391
- if (!data) {
2392
- return;
2393
- }
2394
- if (data.count !== undefined) {
2395
- this.count = setRangeValue(data.count);
2396
- }
2397
- if (data.enable !== undefined) {
2398
- this.enable = data.enable;
2399
- }
2400
- if (data.speed !== undefined) {
2401
- this.speed = setRangeValue(data.speed);
2402
- }
2403
- if (data.decay !== undefined) {
2404
- this.decay = setRangeValue(data.decay);
2405
- }
2406
- if (data.delay !== undefined) {
2407
- this.delay = setRangeValue(data.delay);
2408
- }
2409
- if (data.sync !== undefined) {
2410
- this.sync = data.sync;
2411
- }
2412
- }
2413
- }
2414
- class AnimationOptions_RangedAnimationOptions extends AnimationOptions_AnimationOptions {
2415
- constructor() {
2416
- super();
2417
- this.mode = "auto";
2418
- this.startValue = "random";
2419
- }
2420
- load(data) {
2421
- super.load(data);
2422
- if (!data) {
2423
- return;
2424
- }
2425
- if (data.mode !== undefined) {
2426
- this.mode = data.mode;
2427
- }
2428
- if (data.startValue !== undefined) {
2429
- this.startValue = data.startValue;
2430
- }
2431
- }
2432
- }
2433
-
2434
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Random.js
2435
- class Random {
2436
- constructor() {
2437
- this.enable = false;
2438
- this.minimumValue = 0;
2439
- }
2440
- load(data) {
2441
- if (!data) {
2442
- return;
2443
- }
2444
- if (data.enable !== undefined) {
2445
- this.enable = data.enable;
2446
- }
2447
- if (data.minimumValue !== undefined) {
2448
- this.minimumValue = data.minimumValue;
2449
- }
2450
- }
2451
- }
2452
-
2453
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/ValueWithRandom.js
2454
-
2455
-
2404
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/ValueWithRandom.js
2456
2405
 
2457
2406
 
2458
2407
  class ValueWithRandom {
2459
2408
  constructor() {
2460
- this.random = new Random();
2461
2409
  this.value = 0;
2462
2410
  }
2463
2411
  load(data) {
2464
2412
  if (!data) {
2465
2413
  return;
2466
2414
  }
2467
- if (isBoolean(data.random)) {
2468
- this.random.enable = data.random;
2469
- }
2470
- else {
2471
- this.random.load(data.random);
2472
- }
2473
2415
  if (data.value !== undefined) {
2474
- this.value = setRangeValue(data.value, this.random.enable ? this.random.minimumValue : undefined);
2416
+ this.value = setRangeValue(data.value);
2475
2417
  }
2476
2418
  }
2477
2419
  }
2478
- class AnimationValueWithRandom extends (/* unused pure expression or super */ null && (ValueWithRandom)) {
2420
+ class AnimationValueWithRandom extends ValueWithRandom {
2479
2421
  constructor() {
2480
2422
  super();
2481
2423
  this.animation = new AnimationOptions();
@@ -2491,7 +2433,7 @@ class AnimationValueWithRandom extends (/* unused pure expression or super */ nu
2491
2433
  }
2492
2434
  }
2493
2435
  }
2494
- class RangedAnimationValueWithRandom extends (/* unused pure expression or super */ null && (AnimationValueWithRandom)) {
2436
+ class RangedAnimationValueWithRandom extends AnimationValueWithRandom {
2495
2437
  constructor() {
2496
2438
  super();
2497
2439
  this.animation = new RangedAnimationOptions();
@@ -2501,17 +2443,16 @@ class RangedAnimationValueWithRandom extends (/* unused pure expression or super
2501
2443
  }
2502
2444
  }
2503
2445
 
2504
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js
2446
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js
2505
2447
 
2506
2448
  class ParticlesBounceFactor extends ValueWithRandom {
2507
2449
  constructor() {
2508
2450
  super();
2509
- this.random.minimumValue = 0.1;
2510
2451
  this.value = 1;
2511
2452
  }
2512
2453
  }
2513
2454
 
2514
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounce.js
2455
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounce.js
2515
2456
 
2516
2457
  class ParticlesBounce {
2517
2458
  constructor() {
@@ -2527,7 +2468,7 @@ class ParticlesBounce {
2527
2468
  }
2528
2469
  }
2529
2470
 
2530
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/Collisions.js
2471
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/Collisions.js
2531
2472
 
2532
2473
 
2533
2474
 
@@ -2560,7 +2501,41 @@ class Collisions {
2560
2501
  }
2561
2502
  }
2562
2503
 
2563
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAngle.js
2504
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Effect/Effect.js
2505
+
2506
+ class Effect {
2507
+ constructor() {
2508
+ this.close = true;
2509
+ this.fill = true;
2510
+ this.options = {};
2511
+ this.type = [];
2512
+ }
2513
+ load(data) {
2514
+ if (!data) {
2515
+ return;
2516
+ }
2517
+ const options = data.options;
2518
+ if (options !== undefined) {
2519
+ for (const effect in options) {
2520
+ const item = options[effect];
2521
+ if (item) {
2522
+ this.options[effect] = deepExtend(this.options[effect] ?? {}, item);
2523
+ }
2524
+ }
2525
+ }
2526
+ if (data.close !== undefined) {
2527
+ this.close = data.close;
2528
+ }
2529
+ if (data.fill !== undefined) {
2530
+ this.fill = data.fill;
2531
+ }
2532
+ if (data.type !== undefined) {
2533
+ this.type = data.type;
2534
+ }
2535
+ }
2536
+ }
2537
+
2538
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAngle.js
2564
2539
 
2565
2540
  class MoveAngle {
2566
2541
  constructor() {
@@ -2580,7 +2555,7 @@ class MoveAngle {
2580
2555
  }
2581
2556
  }
2582
2557
 
2583
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAttract.js
2558
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAttract.js
2584
2559
 
2585
2560
  class MoveAttract {
2586
2561
  constructor() {
@@ -2614,7 +2589,7 @@ class MoveAttract {
2614
2589
  }
2615
2590
  }
2616
2591
 
2617
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveCenter.js
2592
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveCenter.js
2618
2593
  class MoveCenter {
2619
2594
  constructor() {
2620
2595
  this.x = 50;
@@ -2641,7 +2616,7 @@ class MoveCenter {
2641
2616
  }
2642
2617
  }
2643
2618
 
2644
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveGravity.js
2619
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveGravity.js
2645
2620
 
2646
2621
  class MoveGravity {
2647
2622
  constructor() {
@@ -2669,7 +2644,7 @@ class MoveGravity {
2669
2644
  }
2670
2645
  }
2671
2646
 
2672
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Path/MovePath.js
2647
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Path/MovePath.js
2673
2648
 
2674
2649
 
2675
2650
  class MovePath {
@@ -2697,7 +2672,7 @@ class MovePath {
2697
2672
  }
2698
2673
  }
2699
2674
 
2700
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrailFill.js
2675
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrailFill.js
2701
2676
 
2702
2677
  class MoveTrailFill {
2703
2678
  load(data) {
@@ -2713,7 +2688,7 @@ class MoveTrailFill {
2713
2688
  }
2714
2689
  }
2715
2690
 
2716
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrail.js
2691
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrail.js
2717
2692
 
2718
2693
  class MoveTrail {
2719
2694
  constructor() {
@@ -2737,7 +2712,7 @@ class MoveTrail {
2737
2712
  }
2738
2713
  }
2739
2714
 
2740
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/OutModes.js
2715
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/OutModes.js
2741
2716
  class OutModes {
2742
2717
  constructor() {
2743
2718
  this.default = "out";
@@ -2756,7 +2731,7 @@ class OutModes {
2756
2731
  }
2757
2732
  }
2758
2733
 
2759
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Spin.js
2734
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Spin.js
2760
2735
 
2761
2736
 
2762
2737
  class Spin {
@@ -2780,7 +2755,7 @@ class Spin {
2780
2755
  }
2781
2756
  }
2782
2757
 
2783
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Move.js
2758
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Move.js
2784
2759
 
2785
2760
 
2786
2761
 
@@ -2876,9 +2851,9 @@ class Move {
2876
2851
  }
2877
2852
  }
2878
2853
 
2879
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js
2854
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js
2880
2855
 
2881
- class OpacityAnimation extends AnimationOptions_RangedAnimationOptions {
2856
+ class OpacityAnimation extends RangedAnimationOptions {
2882
2857
  constructor() {
2883
2858
  super();
2884
2859
  this.destroy = "none";
@@ -2895,14 +2870,13 @@ class OpacityAnimation extends AnimationOptions_RangedAnimationOptions {
2895
2870
  }
2896
2871
  }
2897
2872
 
2898
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/Opacity.js
2873
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/Opacity.js
2899
2874
 
2900
2875
 
2901
- class Opacity extends ValueWithRandom {
2876
+ class Opacity extends RangedAnimationValueWithRandom {
2902
2877
  constructor() {
2903
2878
  super();
2904
2879
  this.animation = new OpacityAnimation();
2905
- this.random.minimumValue = 0.1;
2906
2880
  this.value = 1;
2907
2881
  }
2908
2882
  load(data) {
@@ -2917,7 +2891,7 @@ class Opacity extends ValueWithRandom {
2917
2891
  }
2918
2892
  }
2919
2893
 
2920
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesDensity.js
2894
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesDensity.js
2921
2895
  class ParticlesDensity {
2922
2896
  constructor() {
2923
2897
  this.enable = false;
@@ -2942,12 +2916,32 @@ class ParticlesDensity {
2942
2916
  }
2943
2917
  }
2944
2918
 
2945
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumber.js
2919
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumberLimit.js
2920
+ class ParticlesNumberLimit {
2921
+ constructor() {
2922
+ this.mode = "delete";
2923
+ this.value = 0;
2924
+ }
2925
+ load(data) {
2926
+ if (!data) {
2927
+ return;
2928
+ }
2929
+ if (data.mode !== undefined) {
2930
+ this.mode = data.mode;
2931
+ }
2932
+ if (data.value !== undefined) {
2933
+ this.value = data.value;
2934
+ }
2935
+ }
2936
+ }
2937
+
2938
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumber.js
2939
+
2946
2940
 
2947
2941
  class ParticlesNumber {
2948
2942
  constructor() {
2949
2943
  this.density = new ParticlesDensity();
2950
- this.limit = 0;
2944
+ this.limit = new ParticlesNumberLimit();
2951
2945
  this.value = 0;
2952
2946
  }
2953
2947
  load(data) {
@@ -2955,17 +2949,14 @@ class ParticlesNumber {
2955
2949
  return;
2956
2950
  }
2957
2951
  this.density.load(data.density);
2958
- const limit = data.limit;
2959
- if (limit !== undefined) {
2960
- this.limit = limit;
2961
- }
2952
+ this.limit.load(data.limit);
2962
2953
  if (data.value !== undefined) {
2963
2954
  this.value = data.value;
2964
2955
  }
2965
2956
  }
2966
2957
  }
2967
2958
 
2968
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shadow.js
2959
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shadow.js
2969
2960
 
2970
2961
  class Shadow {
2971
2962
  constructor() {
@@ -3001,7 +2992,7 @@ class Shadow {
3001
2992
  }
3002
2993
  }
3003
2994
 
3004
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shape/Shape.js
2995
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shape/Shape.js
3005
2996
 
3006
2997
  class Shape {
3007
2998
  constructor() {
@@ -3035,9 +3026,9 @@ class Shape {
3035
3026
  }
3036
3027
  }
3037
3028
 
3038
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/SizeAnimation.js
3029
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/SizeAnimation.js
3039
3030
 
3040
- class SizeAnimation extends AnimationOptions_RangedAnimationOptions {
3031
+ class SizeAnimation extends RangedAnimationOptions {
3041
3032
  constructor() {
3042
3033
  super();
3043
3034
  this.destroy = "none";
@@ -3054,14 +3045,13 @@ class SizeAnimation extends AnimationOptions_RangedAnimationOptions {
3054
3045
  }
3055
3046
  }
3056
3047
 
3057
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/Size.js
3048
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/Size.js
3058
3049
 
3059
3050
 
3060
- class Size extends ValueWithRandom {
3051
+ class Size extends RangedAnimationValueWithRandom {
3061
3052
  constructor() {
3062
3053
  super();
3063
3054
  this.animation = new SizeAnimation();
3064
- this.random.minimumValue = 1;
3065
3055
  this.value = 3;
3066
3056
  }
3067
3057
  load(data) {
@@ -3076,7 +3066,7 @@ class Size extends ValueWithRandom {
3076
3066
  }
3077
3067
  }
3078
3068
 
3079
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Stroke.js
3069
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Stroke.js
3080
3070
 
3081
3071
 
3082
3072
  class Stroke {
@@ -3099,7 +3089,7 @@ class Stroke {
3099
3089
  }
3100
3090
  }
3101
3091
 
3102
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ZIndex/ZIndex.js
3092
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ZIndex/ZIndex.js
3103
3093
 
3104
3094
  class ZIndex extends ValueWithRandom {
3105
3095
  constructor() {
@@ -3125,7 +3115,8 @@ class ZIndex extends ValueWithRandom {
3125
3115
  }
3126
3116
  }
3127
3117
 
3128
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ParticlesOptions.js
3118
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ParticlesOptions.js
3119
+
3129
3120
 
3130
3121
 
3131
3122
 
@@ -3146,6 +3137,7 @@ class ParticlesOptions {
3146
3137
  this.collisions = new Collisions();
3147
3138
  this.color = new AnimatableColor();
3148
3139
  this.color.value = "#fff";
3140
+ this.effect = new Effect();
3149
3141
  this.groups = {};
3150
3142
  this.move = new Move();
3151
3143
  this.number = new ParticlesNumber();
@@ -3163,6 +3155,7 @@ class ParticlesOptions {
3163
3155
  }
3164
3156
  this.bounce.load(data.bounce);
3165
3157
  this.color.load(AnimatableColor.create(this.color, data.color));
3158
+ this.effect.load(data.effect);
3166
3159
  if (data.groups !== undefined) {
3167
3160
  for (const group in data.groups) {
3168
3161
  const item = data.groups[group];
@@ -3214,7 +3207,7 @@ class ParticlesOptions {
3214
3207
  }
3215
3208
  }
3216
3209
 
3217
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Utils/OptionsUtils.js
3210
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Utils/OptionsUtils.js
3218
3211
 
3219
3212
  function loadOptions(options, ...sourceOptionsArr) {
3220
3213
  for (const sourceOptions of sourceOptionsArr) {
@@ -3227,7 +3220,7 @@ function loadParticlesOptions(engine, container, ...sourceOptionsArr) {
3227
3220
  return options;
3228
3221
  }
3229
3222
 
3230
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Options/Classes/Options.js
3223
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Options/Classes/Options.js
3231
3224
 
3232
3225
 
3233
3226
 
@@ -3379,7 +3372,7 @@ class Options {
3379
3372
  }
3380
3373
  }
3381
3374
 
3382
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Utils/InteractionManager.js
3375
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Utils/InteractionManager.js
3383
3376
  class InteractionManager {
3384
3377
  constructor(engine, container) {
3385
3378
  this.container = container;
@@ -3431,7 +3424,7 @@ class InteractionManager {
3431
3424
  }
3432
3425
  }
3433
3426
 
3434
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Particle.js
3427
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Particle.js
3435
3428
 
3436
3429
 
3437
3430
 
@@ -3441,7 +3434,27 @@ class InteractionManager {
3441
3434
 
3442
3435
 
3443
3436
 
3444
- const fixOutMode = (data) => {
3437
+ function loadEffectData(effect, effectOptions, id, reduceDuplicates) {
3438
+ const effectData = effectOptions.options[effect];
3439
+ if (!effectData) {
3440
+ return;
3441
+ }
3442
+ return deepExtend({
3443
+ close: effectOptions.close,
3444
+ fill: effectOptions.fill,
3445
+ }, itemFromSingleOrMultiple(effectData, id, reduceDuplicates));
3446
+ }
3447
+ function loadShapeData(shape, shapeOptions, id, reduceDuplicates) {
3448
+ const shapeData = shapeOptions.options[shape];
3449
+ if (!shapeData) {
3450
+ return;
3451
+ }
3452
+ return deepExtend({
3453
+ close: shapeOptions.close,
3454
+ fill: shapeOptions.fill,
3455
+ }, itemFromSingleOrMultiple(shapeData, id, reduceDuplicates));
3456
+ }
3457
+ function fixOutMode(data) {
3445
3458
  if (!isInArray(data.outMode, data.checkModes)) {
3446
3459
  return;
3447
3460
  }
@@ -3452,7 +3465,7 @@ const fixOutMode = (data) => {
3452
3465
  else if (data.coord < diameter) {
3453
3466
  data.setCb(data.radius);
3454
3467
  }
3455
- };
3468
+ }
3456
3469
  class Particle {
3457
3470
  constructor(engine, id, container, position, overrideOptions, group) {
3458
3471
  this.container = container;
@@ -3499,9 +3512,9 @@ class Particle {
3499
3512
  if (moveOptions.direction === "inside" || moveOptions.direction === "outside") {
3500
3513
  return res;
3501
3514
  }
3502
- const rad = (Math.PI / 180) * getRangeValue(moveOptions.angle.value), radOffset = (Math.PI / 180) * getRangeValue(moveOptions.angle.offset), range = {
3503
- left: radOffset - rad / 2,
3504
- right: radOffset + rad / 2,
3515
+ const rad = (Math.PI / 180) * NumberUtils_getRangeValue(moveOptions.angle.value), radOffset = (Math.PI / 180) * NumberUtils_getRangeValue(moveOptions.angle.offset), range = {
3516
+ left: radOffset - rad * 0.5,
3517
+ right: radOffset + rad * 0.5,
3505
3518
  };
3506
3519
  if (!moveOptions.straight) {
3507
3520
  res.angle += randomInRange(setRangeValue(range.left, range.right));
@@ -3530,7 +3543,7 @@ class Particle {
3530
3543
  if (!color || !this.roll || (!this.backColor && !this.roll.alter)) {
3531
3544
  return color;
3532
3545
  }
3533
- const backFactor = this.roll.horizontal && this.roll.vertical ? 2 : 1, backSum = this.roll.horizontal ? Math.PI / 2 : 0, rolled = Math.floor(((this.roll.angle ?? 0) + backSum) / (Math.PI / backFactor)) % 2;
3546
+ const backFactor = this.roll.horizontal && this.roll.vertical ? 2 : 1, backSum = this.roll.horizontal ? Math.PI * 0.5 : 0, rolled = Math.floor(((this.roll.angle ?? 0) + backSum) / (Math.PI / backFactor)) % 2;
3534
3547
  if (!rolled) {
3535
3548
  return color;
3536
3549
  }
@@ -3543,7 +3556,7 @@ class Particle {
3543
3556
  return color;
3544
3557
  };
3545
3558
  this._initPosition = (position) => {
3546
- const container = this.container, zIndexValue = getRangeValue(this.options.zIndex.value);
3559
+ const container = this.container, zIndexValue = NumberUtils_getRangeValue(this.options.zIndex.value);
3547
3560
  this.position = this._calcPosition(container, position, clamp(zIndexValue, 0, container.zLayers));
3548
3561
  this.initialPosition = this.position.copy();
3549
3562
  const canvasSize = container.canvas.size;
@@ -3563,16 +3576,6 @@ class Particle {
3563
3576
  }
3564
3577
  this.offset = Vector_Vector.origin;
3565
3578
  };
3566
- this._loadShapeData = (shapeOptions, reduceDuplicates) => {
3567
- const shapeData = shapeOptions.options[this.shape];
3568
- if (!shapeData) {
3569
- return;
3570
- }
3571
- return deepExtend({
3572
- close: shapeOptions.close,
3573
- fill: shapeOptions.fill,
3574
- }, itemFromSingleOrMultiple(shapeData, this.id, reduceDuplicates));
3575
- };
3576
3579
  this._engine = engine;
3577
3580
  this.init(id, position, overrideOptions, group);
3578
3581
  }
@@ -3585,18 +3588,12 @@ class Particle {
3585
3588
  this.slow.inRange = false;
3586
3589
  const container = this.container, pathGenerator = this.pathGenerator;
3587
3590
  for (const [, plugin] of container.plugins) {
3588
- if (plugin.particleDestroyed) {
3589
- plugin.particleDestroyed(this, override);
3590
- }
3591
+ plugin.particleDestroyed && plugin.particleDestroyed(this, override);
3591
3592
  }
3592
3593
  for (const updater of container.particles.updaters) {
3593
- if (updater.particleDestroyed) {
3594
- updater.particleDestroyed(this, override);
3595
- }
3596
- }
3597
- if (pathGenerator) {
3598
- pathGenerator.reset(this);
3594
+ updater.particleDestroyed && updater.particleDestroyed(this, override);
3599
3595
  }
3596
+ pathGenerator && pathGenerator.reset(this);
3600
3597
  }
3601
3598
  draw(delta) {
3602
3599
  const container = this.container, canvas = container.canvas;
@@ -3609,7 +3606,7 @@ class Particle {
3609
3606
  return this._getRollColor(this.bubble.color ?? getHslFromAnimation(this.color));
3610
3607
  }
3611
3608
  getMass() {
3612
- return (this.getRadius() ** 2 * Math.PI) / 2;
3609
+ return this.getRadius() ** 2 * Math.PI * 0.5;
3613
3610
  }
3614
3611
  getPosition() {
3615
3612
  return {
@@ -3628,9 +3625,11 @@ class Particle {
3628
3625
  const container = this.container, engine = this._engine;
3629
3626
  this.id = id;
3630
3627
  this.group = group;
3631
- this.fill = true;
3628
+ this.effectClose = true;
3629
+ this.effectFill = true;
3630
+ this.shapeClose = true;
3631
+ this.shapeFill = true;
3632
3632
  this.pathRotation = false;
3633
- this.close = true;
3634
3633
  this.lastPathTime = 0;
3635
3634
  this.destroyed = false;
3636
3635
  this.unbreakable = false;
@@ -3641,18 +3640,33 @@ class Particle {
3641
3640
  };
3642
3641
  this.outType = "normal";
3643
3642
  this.ignoresResizeRatio = true;
3644
- const pxRatio = container.retina.pixelRatio, mainOptions = container.actualOptions, particlesOptions = loadParticlesOptions(this._engine, container, mainOptions.particles), shapeType = particlesOptions.shape.type, { reduceDuplicates } = particlesOptions;
3643
+ const pxRatio = container.retina.pixelRatio, mainOptions = container.actualOptions, particlesOptions = loadParticlesOptions(this._engine, container, mainOptions.particles), effectType = particlesOptions.effect.type, shapeType = particlesOptions.shape.type, { reduceDuplicates } = particlesOptions;
3644
+ this.effect = itemFromSingleOrMultiple(effectType, this.id, reduceDuplicates);
3645
3645
  this.shape = itemFromSingleOrMultiple(shapeType, this.id, reduceDuplicates);
3646
- const shapeOptions = particlesOptions.shape;
3647
- if (overrideOptions && overrideOptions.shape && overrideOptions.shape.type) {
3648
- const overrideShapeType = overrideOptions.shape.type, shape = itemFromSingleOrMultiple(overrideShapeType, this.id, reduceDuplicates);
3649
- if (shape) {
3650
- this.shape = shape;
3651
- shapeOptions.load(overrideOptions.shape);
3646
+ const effectOptions = particlesOptions.effect, shapeOptions = particlesOptions.shape;
3647
+ if (overrideOptions) {
3648
+ if (overrideOptions.effect && overrideOptions.effect.type) {
3649
+ const overrideEffectType = overrideOptions.effect.type, effect = itemFromSingleOrMultiple(overrideEffectType, this.id, reduceDuplicates);
3650
+ if (effect) {
3651
+ this.effect = effect;
3652
+ effectOptions.load(overrideOptions.effect);
3653
+ }
3654
+ }
3655
+ if (overrideOptions.shape && overrideOptions.shape.type) {
3656
+ const overrideShapeType = overrideOptions.shape.type, shape = itemFromSingleOrMultiple(overrideShapeType, this.id, reduceDuplicates);
3657
+ if (shape) {
3658
+ this.shape = shape;
3659
+ shapeOptions.load(overrideOptions.shape);
3660
+ }
3652
3661
  }
3653
3662
  }
3654
- this.shapeData = this._loadShapeData(shapeOptions, reduceDuplicates);
3663
+ this.effectData = loadEffectData(this.effect, effectOptions, this.id, reduceDuplicates);
3664
+ this.shapeData = loadShapeData(this.shape, shapeOptions, this.id, reduceDuplicates);
3655
3665
  particlesOptions.load(overrideOptions);
3666
+ const effectData = this.effectData;
3667
+ if (effectData) {
3668
+ particlesOptions.load(effectData.particles);
3669
+ }
3656
3670
  const shapeData = this.shapeData;
3657
3671
  if (shapeData) {
3658
3672
  particlesOptions.load(shapeData.particles);
@@ -3661,11 +3675,13 @@ class Particle {
3661
3675
  interactivity.load(container.actualOptions.interactivity);
3662
3676
  interactivity.load(particlesOptions.interactivity);
3663
3677
  this.interactivity = interactivity;
3664
- this.fill = shapeData?.fill ?? particlesOptions.shape.fill;
3665
- this.close = shapeData?.close ?? particlesOptions.shape.close;
3678
+ this.effectFill = effectData?.fill ?? particlesOptions.effect.fill;
3679
+ this.effectClose = effectData?.close ?? particlesOptions.effect.close;
3680
+ this.shapeFill = shapeData?.fill ?? particlesOptions.shape.fill;
3681
+ this.shapeClose = shapeData?.close ?? particlesOptions.shape.close;
3666
3682
  this.options = particlesOptions;
3667
3683
  const pathOptions = this.options.move.path;
3668
- this.pathDelay = NumberUtils_getValue(pathOptions.delay) * 1000;
3684
+ this.pathDelay = NumberUtils_getRangeValue(pathOptions.delay.value) * 1000;
3669
3685
  if (pathOptions.generator) {
3670
3686
  this.pathGenerator = this._engine.getPathGenerator(pathOptions.generator);
3671
3687
  if (this.pathGenerator && container.addPath(pathOptions.generator, this.pathGenerator)) {
@@ -3684,36 +3700,48 @@ class Particle {
3684
3700
  this._initPosition(position);
3685
3701
  this.initialVelocity = this._calculateVelocity();
3686
3702
  this.velocity = this.initialVelocity.copy();
3687
- this.moveDecay = 1 - getRangeValue(this.options.move.decay);
3703
+ this.moveDecay = 1 - NumberUtils_getRangeValue(this.options.move.decay);
3688
3704
  const particles = container.particles;
3689
- particles.needsSort = particles.needsSort || particles.lastZIndex < this.position.z;
3690
- particles.lastZIndex = this.position.z;
3705
+ particles.setLastZIndex(this.position.z);
3691
3706
  this.zIndexFactor = this.position.z / container.zLayers;
3692
3707
  this.sides = 24;
3693
- let drawer = container.drawers.get(this.shape);
3694
- if (!drawer) {
3695
- drawer = this._engine.getShapeDrawer(this.shape);
3696
- if (drawer) {
3697
- container.drawers.set(this.shape, drawer);
3708
+ let effectDrawer = container.effectDrawers.get(this.effect);
3709
+ if (!effectDrawer) {
3710
+ effectDrawer = this._engine.getEffectDrawer(this.effect);
3711
+ if (effectDrawer) {
3712
+ container.effectDrawers.set(this.effect, effectDrawer);
3698
3713
  }
3699
3714
  }
3700
- if (drawer && drawer.loadShape) {
3701
- drawer.loadShape(this);
3715
+ if (effectDrawer && effectDrawer.loadEffect) {
3716
+ effectDrawer.loadEffect(this);
3717
+ }
3718
+ let shapeDrawer = container.shapeDrawers.get(this.shape);
3719
+ if (!shapeDrawer) {
3720
+ shapeDrawer = this._engine.getShapeDrawer(this.shape);
3721
+ if (shapeDrawer) {
3722
+ container.shapeDrawers.set(this.shape, shapeDrawer);
3723
+ }
3702
3724
  }
3703
- const sideCountFunc = drawer?.getSidesCount;
3725
+ if (shapeDrawer && shapeDrawer.loadShape) {
3726
+ shapeDrawer.loadShape(this);
3727
+ }
3728
+ const sideCountFunc = shapeDrawer?.getSidesCount;
3704
3729
  if (sideCountFunc) {
3705
3730
  this.sides = sideCountFunc(this);
3706
3731
  }
3707
3732
  this.spawning = false;
3708
3733
  this.shadowColor = rangeColorToRgb(this.options.shadow.color);
3709
- for (const updater of container.particles.updaters) {
3734
+ for (const updater of particles.updaters) {
3710
3735
  updater.init(this);
3711
3736
  }
3712
- for (const mover of container.particles.movers) {
3737
+ for (const mover of particles.movers) {
3713
3738
  mover.init && mover.init(this);
3714
3739
  }
3715
- if (drawer && drawer.particleInit) {
3716
- drawer.particleInit(container, this);
3740
+ if (effectDrawer && effectDrawer.particleInit) {
3741
+ effectDrawer.particleInit(container, this);
3742
+ }
3743
+ if (shapeDrawer && shapeDrawer.particleInit) {
3744
+ shapeDrawer.particleInit(container, this);
3717
3745
  }
3718
3746
  for (const [, plugin] of container.plugins) {
3719
3747
  plugin.particleCreated && plugin.particleCreated(this);
@@ -3736,7 +3764,7 @@ class Particle {
3736
3764
  }
3737
3765
  }
3738
3766
 
3739
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Utils/Point.js
3767
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Utils/Point.js
3740
3768
  class Point {
3741
3769
  constructor(position, particle) {
3742
3770
  this.position = position;
@@ -3744,7 +3772,7 @@ class Point {
3744
3772
  }
3745
3773
  }
3746
3774
 
3747
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Utils/Range.js
3775
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Utils/Range.js
3748
3776
  class Range {
3749
3777
  constructor(x, y) {
3750
3778
  this.position = {
@@ -3754,7 +3782,7 @@ class Range {
3754
3782
  }
3755
3783
  }
3756
3784
 
3757
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Utils/Rectangle.js
3785
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Utils/Rectangle.js
3758
3786
 
3759
3787
 
3760
3788
  class Rectangle extends Range {
@@ -3778,7 +3806,7 @@ class Rectangle extends Range {
3778
3806
  }
3779
3807
  }
3780
3808
 
3781
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Utils/Circle.js
3809
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Utils/Circle.js
3782
3810
 
3783
3811
 
3784
3812
 
@@ -3807,7 +3835,7 @@ class Circle extends Range {
3807
3835
  }
3808
3836
  }
3809
3837
 
3810
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Utils/QuadTree.js
3838
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Utils/QuadTree.js
3811
3839
 
3812
3840
 
3813
3841
 
@@ -3818,7 +3846,7 @@ class QuadTree {
3818
3846
  this._subdivide = () => {
3819
3847
  const { x, y } = this.rectangle.position, { width, height } = this.rectangle.size, { capacity } = this;
3820
3848
  for (let i = 0; i < 4; i++) {
3821
- this._subs.push(new QuadTree(new Rectangle(x + (width / 2) * (i % 2), y + (height / 2) * (Math.round(i / 2) - (i % 2)), width / 2, height / 2), capacity));
3849
+ this._subs.push(new QuadTree(new Rectangle(x + width * 0.5 * (i % 2), y + height * 0.5 * (Math.round(i * 0.5) - (i % 2)), width * 0.5, height * 0.5), capacity));
3822
3850
  }
3823
3851
  this._divided = true;
3824
3852
  };
@@ -3867,7 +3895,7 @@ class QuadTree {
3867
3895
  }
3868
3896
  }
3869
3897
 
3870
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Particles.js
3898
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Particles.js
3871
3899
 
3872
3900
 
3873
3901
 
@@ -3877,16 +3905,29 @@ class QuadTree {
3877
3905
 
3878
3906
  const qTreeCapacity = 4;
3879
3907
  const qTreeRectangle = (canvasSize) => {
3880
- return new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, (canvasSize.width * 3) / 2, (canvasSize.height * 3) / 2);
3908
+ const { height, width } = canvasSize, posOffset = -0.25, sizeFactor = 1.5;
3909
+ return new Rectangle(posOffset * width, posOffset * height, sizeFactor * width, sizeFactor * height);
3881
3910
  };
3882
3911
  class Particles {
3883
3912
  constructor(engine, container) {
3884
3913
  this._applyDensity = (options, manualCount, group) => {
3914
+ const numberOptions = options.number;
3885
3915
  if (!options.number.density?.enable) {
3916
+ if (group === undefined) {
3917
+ this._limit = numberOptions.limit.value;
3918
+ }
3919
+ else {
3920
+ this._groupLimits.set(group, numberOptions.limit.value);
3921
+ }
3886
3922
  return;
3887
3923
  }
3888
- const numberOptions = options.number, densityFactor = this._initDensityFactor(numberOptions.density), optParticlesNumber = numberOptions.value, optParticlesLimit = numberOptions.limit > 0 ? numberOptions.limit : optParticlesNumber, particlesNumber = Math.min(optParticlesNumber, optParticlesLimit) * densityFactor + manualCount, particlesCount = Math.min(this.count, this.filter((t) => t.group === group).length);
3889
- this.limit = numberOptions.limit * densityFactor;
3924
+ const densityFactor = this._initDensityFactor(numberOptions.density), optParticlesNumber = numberOptions.value, optParticlesLimit = numberOptions.limit.value > 0 ? numberOptions.limit.value : optParticlesNumber, particlesNumber = Math.min(optParticlesNumber, optParticlesLimit) * densityFactor + manualCount, particlesCount = Math.min(this.count, this.filter((t) => t.group === group).length);
3925
+ if (group === undefined) {
3926
+ this._limit = numberOptions.limit.value * densityFactor;
3927
+ }
3928
+ else {
3929
+ this._groupLimits.set(group, numberOptions.limit.value * densityFactor);
3930
+ }
3890
3931
  if (particlesCount < particlesNumber) {
3891
3932
  this.push(Math.abs(particlesNumber - particlesCount), undefined, options, group);
3892
3933
  }
@@ -3904,7 +3945,7 @@ class Particles {
3904
3945
  };
3905
3946
  this._pushParticle = (position, overrideOptions, group, initializer) => {
3906
3947
  try {
3907
- let particle = this.pool.pop();
3948
+ let particle = this._pool.pop();
3908
3949
  if (particle) {
3909
3950
  particle.init(this._nextId, position, overrideOptions, group);
3910
3951
  }
@@ -3940,9 +3981,10 @@ class Particles {
3940
3981
  return false;
3941
3982
  }
3942
3983
  particle.destroy(override);
3984
+ const zIdx = this._zArray.indexOf(particle);
3943
3985
  this._array.splice(index, 1);
3944
- this._zArray = this._zArray.splice(this._zArray.indexOf(particle), 1);
3945
- this.pool.push(particle);
3986
+ this._zArray.splice(zIdx, 1);
3987
+ this._pool.push(particle);
3946
3988
  this._engine.dispatchEvent("particleRemoved", {
3947
3989
  container: this._container,
3948
3990
  data: {
@@ -3956,10 +3998,11 @@ class Particles {
3956
3998
  this._nextId = 0;
3957
3999
  this._array = [];
3958
4000
  this._zArray = [];
3959
- this.pool = [];
3960
- this.limit = 0;
3961
- this.needsSort = false;
3962
- this.lastZIndex = 0;
4001
+ this._pool = [];
4002
+ this._limit = 0;
4003
+ this._groupLimits = new Map();
4004
+ this._needsSort = false;
4005
+ this._lastZIndex = 0;
3963
4006
  this._interactionManager = new InteractionManager(engine, container);
3964
4007
  const canvasSize = container.canvas.size;
3965
4008
  this.quadTree = new QuadTree(qTreeRectangle(canvasSize), qTreeCapacity);
@@ -3976,17 +4019,21 @@ class Particles {
3976
4019
  }
3977
4020
  }
3978
4021
  addParticle(position, overrideOptions, group, initializer) {
3979
- this.pushing = true;
3980
- const container = this._container, options = container.actualOptions, limit = options.particles.number.limit;
4022
+ const limitOptions = this._container.actualOptions.particles.number.limit, limit = group === undefined ? this._limit : this._groupLimits.get(group) ?? this._limit, currentCount = this.count;
3981
4023
  if (limit > 0) {
3982
- const countToRemove = this.count + 1 - limit;
3983
- if (countToRemove > 0) {
3984
- this.removeQuantity(countToRemove);
4024
+ if (limitOptions.mode === "delete") {
4025
+ const countToRemove = currentCount + 1 - limit;
4026
+ if (countToRemove > 0) {
4027
+ this.removeQuantity(countToRemove);
4028
+ }
4029
+ }
4030
+ else if (limitOptions.mode === "wait") {
4031
+ if (currentCount >= limit) {
4032
+ return;
4033
+ }
3985
4034
  }
3986
4035
  }
3987
- const res = this._pushParticle(position, overrideOptions, group, initializer);
3988
- this.pushing = false;
3989
- return res;
4036
+ return this._pushParticle(position, overrideOptions, group, initializer);
3990
4037
  }
3991
4038
  clear() {
3992
4039
  this._array = [];
@@ -4023,8 +4070,8 @@ class Particles {
4023
4070
  }
4024
4071
  init() {
4025
4072
  const container = this._container, options = container.actualOptions;
4026
- this.lastZIndex = 0;
4027
- this.needsSort = false;
4073
+ this._lastZIndex = 0;
4074
+ this._needsSort = false;
4028
4075
  let handled = false;
4029
4076
  this.updaters = this._engine.getUpdaters(container, true);
4030
4077
  this._interactionManager.init();
@@ -4042,7 +4089,7 @@ class Particles {
4042
4089
  }
4043
4090
  this.addManualParticles();
4044
4091
  if (!handled) {
4045
- const particlesOptions = options.particles, groups = options.particles.groups;
4092
+ const particlesOptions = options.particles, groups = particlesOptions.groups;
4046
4093
  for (const group in groups) {
4047
4094
  const groupOptions = groups[group];
4048
4095
  for (let i = this.count, j = 0; j < groupOptions.number?.value && i < particlesOptions.number.value; i++, j++) {
@@ -4086,6 +4133,13 @@ class Particles {
4086
4133
  }
4087
4134
  this._applyDensity(options.particles, options.manualParticles.length);
4088
4135
  }
4136
+ setLastZIndex(zIndex) {
4137
+ this._lastZIndex = zIndex;
4138
+ this._needsSort = this._needsSort || this._lastZIndex < zIndex;
4139
+ }
4140
+ setResizeFactor(factor) {
4141
+ this._resizeFactor = factor;
4142
+ }
4089
4143
  async update(delta) {
4090
4144
  const container = this._container, particlesToDelete = new Set();
4091
4145
  this.quadTree = new QuadTree(qTreeRectangle(container.canvas.size), qTreeCapacity);
@@ -4093,10 +4147,10 @@ class Particles {
4093
4147
  pathGenerator.update();
4094
4148
  }
4095
4149
  for (const [, plugin] of container.plugins) {
4096
- plugin.update && plugin.update(delta);
4150
+ plugin.update && (await plugin.update(delta));
4097
4151
  }
4152
+ const resizeFactor = this._resizeFactor;
4098
4153
  for (const particle of this._array) {
4099
- const resizeFactor = container.canvas.resizeFactor;
4100
4154
  if (resizeFactor && !particle.ignoresResizeRatio) {
4101
4155
  particle.position.x *= resizeFactor.width;
4102
4156
  particle.position.y *= resizeFactor.height;
@@ -4124,7 +4178,7 @@ class Particles {
4124
4178
  const checkDelete = (p) => !particlesToDelete.has(p);
4125
4179
  this._array = this.filter(checkDelete);
4126
4180
  this._zArray = this._zArray.filter(checkDelete);
4127
- this.pool.push(...particlesToDelete);
4181
+ this._pool.push(...particlesToDelete);
4128
4182
  }
4129
4183
  await this._interactionManager.externalInteract(delta);
4130
4184
  for (const particle of this._array) {
@@ -4135,17 +4189,17 @@ class Particles {
4135
4189
  await this._interactionManager.particlesInteract(particle, delta);
4136
4190
  }
4137
4191
  }
4138
- delete container.canvas.resizeFactor;
4139
- if (this.needsSort) {
4192
+ delete this._resizeFactor;
4193
+ if (this._needsSort) {
4140
4194
  const zArray = this._zArray;
4141
4195
  zArray.sort((a, b) => b.position.z - a.position.z || a.id - b.id);
4142
- this.lastZIndex = zArray[zArray.length - 1].position.z;
4143
- this.needsSort = false;
4196
+ this._lastZIndex = zArray[zArray.length - 1].position.z;
4197
+ this._needsSort = false;
4144
4198
  }
4145
4199
  }
4146
4200
  }
4147
4201
 
4148
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Retina.js
4202
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Retina.js
4149
4203
 
4150
4204
 
4151
4205
  class Retina {
@@ -4165,24 +4219,22 @@ class Retina {
4165
4219
  canvas.size.height = element.offsetHeight * ratio;
4166
4220
  }
4167
4221
  const particles = options.particles, moveOptions = particles.move;
4168
- this.attractDistance = getRangeValue(moveOptions.attract.distance) * ratio;
4169
- this.maxSpeed = getRangeValue(moveOptions.gravity.maxSpeed) * ratio;
4170
- this.sizeAnimationSpeed = getRangeValue(particles.size.animation.speed) * ratio;
4222
+ this.maxSpeed = NumberUtils_getRangeValue(moveOptions.gravity.maxSpeed) * ratio;
4223
+ this.sizeAnimationSpeed = NumberUtils_getRangeValue(particles.size.animation.speed) * ratio;
4171
4224
  }
4172
4225
  initParticle(particle) {
4173
4226
  const options = particle.options, ratio = this.pixelRatio, moveOptions = options.move, moveDistance = moveOptions.distance, props = particle.retina;
4174
- props.attractDistance = getRangeValue(moveOptions.attract.distance) * ratio;
4175
- props.moveDrift = getRangeValue(moveOptions.drift) * ratio;
4176
- props.moveSpeed = getRangeValue(moveOptions.speed) * ratio;
4177
- props.sizeAnimationSpeed = getRangeValue(options.size.animation.speed) * ratio;
4227
+ props.moveDrift = NumberUtils_getRangeValue(moveOptions.drift) * ratio;
4228
+ props.moveSpeed = NumberUtils_getRangeValue(moveOptions.speed) * ratio;
4229
+ props.sizeAnimationSpeed = NumberUtils_getRangeValue(options.size.animation.speed) * ratio;
4178
4230
  const maxDistance = props.maxDistance;
4179
4231
  maxDistance.horizontal = moveDistance.horizontal !== undefined ? moveDistance.horizontal * ratio : undefined;
4180
4232
  maxDistance.vertical = moveDistance.vertical !== undefined ? moveDistance.vertical * ratio : undefined;
4181
- props.maxSpeed = getRangeValue(moveOptions.gravity.maxSpeed) * ratio;
4233
+ props.maxSpeed = NumberUtils_getRangeValue(moveOptions.gravity.maxSpeed) * ratio;
4182
4234
  }
4183
4235
  }
4184
4236
 
4185
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Container.js
4237
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Container.js
4186
4238
 
4187
4239
 
4188
4240
 
@@ -4208,7 +4260,6 @@ function loadContainerOptions(engine, container, ...sourceOptionsArr) {
4208
4260
  }
4209
4261
  class Container {
4210
4262
  constructor(engine, id, sourceOptions) {
4211
- this.id = id;
4212
4263
  this._intersectionManager = (entries) => {
4213
4264
  if (!guardCheck(this) || !this.actualOptions.pauseOnOutsideViewport) {
4214
4265
  return;
@@ -4222,16 +4273,16 @@ class Container {
4222
4273
  };
4223
4274
  this._nextFrame = async (timestamp) => {
4224
4275
  try {
4225
- if (!this.smooth &&
4226
- this.lastFrameTime !== undefined &&
4227
- timestamp < this.lastFrameTime + 1000 / this.fpsLimit) {
4276
+ if (!this._smooth &&
4277
+ this._lastFrameTime !== undefined &&
4278
+ timestamp < this._lastFrameTime + 1000 / this.fpsLimit) {
4228
4279
  this.draw(false);
4229
4280
  return;
4230
4281
  }
4231
- this.lastFrameTime ??= timestamp;
4232
- const delta = initDelta(timestamp - this.lastFrameTime, this.fpsLimit, this.smooth);
4282
+ this._lastFrameTime ??= timestamp;
4283
+ const delta = initDelta(timestamp - this._lastFrameTime, this.fpsLimit, this._smooth);
4233
4284
  this.addLifeTime(delta.value);
4234
- this.lastFrameTime = timestamp;
4285
+ this._lastFrameTime = timestamp;
4235
4286
  if (delta.value > 1000) {
4236
4287
  this.draw(false);
4237
4288
  return;
@@ -4250,8 +4301,9 @@ class Container {
4250
4301
  }
4251
4302
  };
4252
4303
  this._engine = engine;
4304
+ this.id = Symbol(id);
4253
4305
  this.fpsLimit = 120;
4254
- this.smooth = false;
4306
+ this._smooth = false;
4255
4307
  this._delay = 0;
4256
4308
  this._duration = 0;
4257
4309
  this._lifeTime = 0;
@@ -4259,7 +4311,7 @@ class Container {
4259
4311
  this.started = false;
4260
4312
  this.destroyed = false;
4261
4313
  this._paused = true;
4262
- this.lastFrameTime = 0;
4314
+ this._lastFrameTime = 0;
4263
4315
  this.zLayers = 100;
4264
4316
  this.pageHidden = false;
4265
4317
  this._sourceOptions = sourceOptions;
@@ -4275,13 +4327,12 @@ class Container {
4275
4327
  },
4276
4328
  };
4277
4329
  this.plugins = new Map();
4278
- this.drawers = new Map();
4330
+ this.effectDrawers = new Map();
4331
+ this.shapeDrawers = new Map();
4279
4332
  this._options = loadContainerOptions(this._engine, this);
4280
4333
  this.actualOptions = loadContainerOptions(this._engine, this);
4281
4334
  this._eventListeners = new EventListeners(this);
4282
- if (typeof IntersectionObserver !== "undefined" && IntersectionObserver) {
4283
- this._intersectionObserver = new IntersectionObserver((entries) => this._intersectionManager(entries));
4284
- }
4335
+ this._intersectionObserver = safeIntersectionObserver((entries) => this._intersectionManager(entries));
4285
4336
  this._engine.dispatchEvent("containerBuilt", { container: this });
4286
4337
  }
4287
4338
  get options() {
@@ -4387,11 +4438,17 @@ class Container {
4387
4438
  this.stop();
4388
4439
  this.particles.destroy();
4389
4440
  this.canvas.destroy();
4390
- for (const [, drawer] of this.drawers) {
4391
- drawer.destroy && drawer.destroy(this);
4441
+ for (const [, effectDrawer] of this.effectDrawers) {
4442
+ effectDrawer.destroy && effectDrawer.destroy(this);
4443
+ }
4444
+ for (const [, shapeDrawer] of this.shapeDrawers) {
4445
+ shapeDrawer.destroy && shapeDrawer.destroy(this);
4446
+ }
4447
+ for (const key of this.effectDrawers.keys()) {
4448
+ this.effectDrawers.delete(key);
4392
4449
  }
4393
- for (const key of this.drawers.keys()) {
4394
- this.drawers.delete(key);
4450
+ for (const key of this.shapeDrawers.keys()) {
4451
+ this.shapeDrawers.delete(key);
4395
4452
  }
4396
4453
  this._engine.clearPlugins(this);
4397
4454
  this.destroyed = true;
@@ -4408,7 +4465,7 @@ class Container {
4408
4465
  let refreshTime = force;
4409
4466
  this._drawAnimationFrame = requestAnimationFrame(async (timestamp) => {
4410
4467
  if (refreshTime) {
4411
- this.lastFrameTime = undefined;
4468
+ this._lastFrameTime = undefined;
4412
4469
  refreshTime = false;
4413
4470
  }
4414
4471
  await this._nextFrame(timestamp);
@@ -4443,11 +4500,18 @@ class Container {
4443
4500
  if (!guardCheck(this)) {
4444
4501
  return;
4445
4502
  }
4503
+ const effects = this._engine.getSupportedEffects();
4504
+ for (const type of effects) {
4505
+ const drawer = this._engine.getEffectDrawer(type);
4506
+ if (drawer) {
4507
+ this.effectDrawers.set(type, drawer);
4508
+ }
4509
+ }
4446
4510
  const shapes = this._engine.getSupportedShapes();
4447
4511
  for (const type of shapes) {
4448
4512
  const drawer = this._engine.getShapeDrawer(type);
4449
4513
  if (drawer) {
4450
- this.drawers.set(type, drawer);
4514
+ this.shapeDrawers.set(type, drawer);
4451
4515
  }
4452
4516
  }
4453
4517
  this._options = loadContainerOptions(this._engine, this, this._initialSourceOptions, this.sourceOptions);
@@ -4462,12 +4526,15 @@ class Container {
4462
4526
  this.canvas.initBackground();
4463
4527
  this.canvas.resize();
4464
4528
  this.zLayers = this.actualOptions.zLayers;
4465
- this._duration = getRangeValue(this.actualOptions.duration) * 1000;
4466
- this._delay = getRangeValue(this.actualOptions.delay) * 1000;
4529
+ this._duration = NumberUtils_getRangeValue(this.actualOptions.duration) * 1000;
4530
+ this._delay = NumberUtils_getRangeValue(this.actualOptions.delay) * 1000;
4467
4531
  this._lifeTime = 0;
4468
4532
  this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit : 120;
4469
- this.smooth = this.actualOptions.smooth;
4470
- for (const [, drawer] of this.drawers) {
4533
+ this._smooth = this.actualOptions.smooth;
4534
+ for (const [, drawer] of this.effectDrawers) {
4535
+ drawer.init && (await drawer.init(this));
4536
+ }
4537
+ for (const [, drawer] of this.shapeDrawers) {
4471
4538
  drawer.init && (await drawer.init(this));
4472
4539
  }
4473
4540
  for (const [, plugin] of this.plugins) {
@@ -4596,15 +4663,15 @@ class Container {
4596
4663
  this.actualOptions.responsive = [];
4597
4664
  const newMaxWidth = this.actualOptions.setResponsive(this.canvas.size.width, this.retina.pixelRatio, this._options);
4598
4665
  this.actualOptions.setTheme(this._currentTheme);
4599
- if (this.responsiveMaxWidth === newMaxWidth) {
4666
+ if (this._responsiveMaxWidth === newMaxWidth) {
4600
4667
  return false;
4601
4668
  }
4602
- this.responsiveMaxWidth = newMaxWidth;
4669
+ this._responsiveMaxWidth = newMaxWidth;
4603
4670
  return true;
4604
4671
  }
4605
4672
  }
4606
4673
 
4607
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Utils/EventDispatcher.js
4674
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Utils/EventDispatcher.js
4608
4675
  class EventDispatcher {
4609
4676
  constructor() {
4610
4677
  this._listeners = new Map();
@@ -4651,7 +4718,7 @@ class EventDispatcher {
4651
4718
  }
4652
4719
  }
4653
4720
 
4654
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Core/Engine.js
4721
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Core/Engine.js
4655
4722
 
4656
4723
 
4657
4724
 
@@ -4693,7 +4760,8 @@ class Engine {
4693
4760
  this.movers = new Map();
4694
4761
  this.updaters = new Map();
4695
4762
  this.presets = new Map();
4696
- this.drawers = new Map();
4763
+ this.effectDrawers = new Map();
4764
+ this.shapeDrawers = new Map();
4697
4765
  this.pathGenerators = new Map();
4698
4766
  }
4699
4767
  get configs() {
@@ -4704,18 +4772,18 @@ class Engine {
4704
4772
  return res;
4705
4773
  }
4706
4774
  get version() {
4707
- return "3.0.0-beta.1";
4775
+ return "3.0.0-beta.4";
4708
4776
  }
4709
- addConfig(nameOrConfig, config) {
4710
- if (Utils_isString(nameOrConfig)) {
4711
- if (config) {
4712
- config.name = nameOrConfig;
4713
- this._configs.set(nameOrConfig, config);
4714
- }
4715
- }
4716
- else {
4717
- this._configs.set(nameOrConfig.name ?? "default", nameOrConfig);
4718
- }
4777
+ addConfig(config) {
4778
+ const name = config.name ?? "default";
4779
+ this._configs.set(name, config);
4780
+ this._eventDispatcher.dispatchEvent("configAdded", { data: { name, config } });
4781
+ }
4782
+ async addEffect(effect, drawer, refresh = true) {
4783
+ executeOnSingleOrMultiple(effect, (type) => {
4784
+ !this.getEffectDrawer(type) && this.effectDrawers.set(type, drawer);
4785
+ });
4786
+ await this.refresh(refresh);
4719
4787
  }
4720
4788
  addEventListener(type, listener) {
4721
4789
  this._eventDispatcher.addEventListener(type, listener);
@@ -4744,45 +4812,11 @@ class Engine {
4744
4812
  (override || !this.getPreset(preset)) && this.presets.set(preset, options);
4745
4813
  await this.refresh(refresh);
4746
4814
  }
4747
- async addShape(shape, drawer, initOrRefresh, afterEffectOrRefresh, destroyOrRefresh, refresh = true) {
4748
- let customDrawer;
4749
- let realRefresh = refresh, realInit, realAfterEffect, realDestroy;
4750
- if (isBoolean(initOrRefresh)) {
4751
- realRefresh = initOrRefresh;
4752
- realInit = undefined;
4753
- }
4754
- else {
4755
- realInit = initOrRefresh;
4756
- }
4757
- if (isBoolean(afterEffectOrRefresh)) {
4758
- realRefresh = afterEffectOrRefresh;
4759
- realAfterEffect = undefined;
4760
- }
4761
- else {
4762
- realAfterEffect = afterEffectOrRefresh;
4763
- }
4764
- if (isBoolean(destroyOrRefresh)) {
4765
- realRefresh = destroyOrRefresh;
4766
- realDestroy = undefined;
4767
- }
4768
- else {
4769
- realDestroy = destroyOrRefresh;
4770
- }
4771
- if (isFunction(drawer)) {
4772
- customDrawer = {
4773
- afterEffect: realAfterEffect,
4774
- destroy: realDestroy,
4775
- draw: drawer,
4776
- init: realInit,
4777
- };
4778
- }
4779
- else {
4780
- customDrawer = drawer;
4781
- }
4815
+ async addShape(shape, drawer, refresh = true) {
4782
4816
  executeOnSingleOrMultiple(shape, (type) => {
4783
- !this.getShapeDrawer(type) && this.drawers.set(type, customDrawer);
4817
+ !this.getShapeDrawer(type) && this.shapeDrawers.set(type, drawer);
4784
4818
  });
4785
- await this.refresh(realRefresh);
4819
+ await this.refresh(refresh);
4786
4820
  }
4787
4821
  clearPlugins(container) {
4788
4822
  this.updaters.delete(container);
@@ -4810,6 +4844,9 @@ class Engine {
4810
4844
  }
4811
4845
  return res;
4812
4846
  }
4847
+ getEffectDrawer(type) {
4848
+ return this.effectDrawers.get(type);
4849
+ }
4813
4850
  getInteractors(container, force = false) {
4814
4851
  return getItemsFromInitializer(container, this.interactors, this._initializers.interactors, force);
4815
4852
  }
@@ -4826,10 +4863,13 @@ class Engine {
4826
4863
  return this.presets.get(preset);
4827
4864
  }
4828
4865
  getShapeDrawer(type) {
4829
- return this.drawers.get(type);
4866
+ return this.shapeDrawers.get(type);
4867
+ }
4868
+ getSupportedEffects() {
4869
+ return this.effectDrawers.keys();
4830
4870
  }
4831
4871
  getSupportedShapes() {
4832
- return this.drawers.keys();
4872
+ return this.shapeDrawers.keys();
4833
4873
  }
4834
4874
  getUpdaters(container, force = false) {
4835
4875
  return getItemsFromInitializer(container, this.updaters, this._initializers.updaters, force);
@@ -4848,7 +4888,7 @@ class Engine {
4848
4888
  domContainer.id = id;
4849
4889
  document.body.append(domContainer);
4850
4890
  }
4851
- const currentOptions = itemFromSingleOrMultiple(options, index), dom = this.dom(), oldIndex = dom.findIndex((v) => v.id === id);
4891
+ const currentOptions = itemFromSingleOrMultiple(options, index), dom = this.dom(), oldIndex = dom.findIndex((v) => v.id.description === id);
4852
4892
  if (oldIndex >= 0) {
4853
4893
  const old = this.domItem(oldIndex);
4854
4894
  if (old && !old.destroyed) {
@@ -4924,7 +4964,7 @@ class Engine {
4924
4964
  }
4925
4965
  }
4926
4966
 
4927
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Utils/HslColorManager.js
4967
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Utils/HslColorManager.js
4928
4968
 
4929
4969
 
4930
4970
  class HslColorManager {
@@ -4942,9 +4982,9 @@ class HslColorManager {
4942
4982
  const colorValue = color.value, hslColor = colorValue.hsl ?? color.value;
4943
4983
  if (hslColor.h !== undefined && hslColor.l !== undefined) {
4944
4984
  return hslToRgb({
4945
- h: getRangeValue(hslColor.h),
4946
- l: getRangeValue(hslColor.l),
4947
- s: getRangeValue(hslColor.s),
4985
+ h: NumberUtils_getRangeValue(hslColor.h),
4986
+ l: NumberUtils_getRangeValue(hslColor.l),
4987
+ s: NumberUtils_getRangeValue(hslColor.s),
4948
4988
  });
4949
4989
  }
4950
4990
  }
@@ -4964,7 +5004,7 @@ class HslColorManager {
4964
5004
  }
4965
5005
  }
4966
5006
 
4967
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/Utils/RgbColorManager.js
5007
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/Utils/RgbColorManager.js
4968
5008
 
4969
5009
  class RgbColorManager {
4970
5010
  constructor() {
@@ -4981,9 +5021,9 @@ class RgbColorManager {
4981
5021
  const colorValue = color.value, rgbColor = colorValue.rgb ?? color.value;
4982
5022
  if (rgbColor.r !== undefined) {
4983
5023
  return {
4984
- r: getRangeValue(rgbColor.r),
4985
- g: getRangeValue(rgbColor.g),
4986
- b: getRangeValue(rgbColor.b),
5024
+ r: NumberUtils_getRangeValue(rgbColor.r),
5025
+ g: NumberUtils_getRangeValue(rgbColor.g),
5026
+ b: NumberUtils_getRangeValue(rgbColor.b),
4987
5027
  };
4988
5028
  }
4989
5029
  }
@@ -5003,7 +5043,7 @@ class RgbColorManager {
5003
5043
  }
5004
5044
  }
5005
5045
 
5006
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/init.js
5046
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/init.js
5007
5047
 
5008
5048
 
5009
5049
 
@@ -5017,7 +5057,7 @@ function init() {
5017
5057
  return engine;
5018
5058
  }
5019
5059
 
5020
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/exports.js
5060
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/exports.js
5021
5061
 
5022
5062
 
5023
5063
 
@@ -5107,8 +5147,7 @@ function init() {
5107
5147
 
5108
5148
 
5109
5149
 
5110
-
5111
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.1/node_modules/@tsparticles/engine/browser/index.js
5150
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+engine@3.0.0-beta.4/node_modules/@tsparticles/engine/browser/index.js
5112
5151
 
5113
5152
 
5114
5153
  const tsParticles = init();
@@ -5119,7 +5158,7 @@ if (!isSsr()) {
5119
5158
 
5120
5159
 
5121
5160
 
5122
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+move-base@3.0.0-beta.1/node_modules/@tsparticles/move-base/browser/Utils.js
5161
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+move-base@3.0.0-beta.4/node_modules/@tsparticles/move-base/browser/Utils.js
5123
5162
 
5124
5163
  function applyDistance(particle) {
5125
5164
  const initialPosition = particle.initialPosition, { dx, dy } = NumberUtils_getDistances(initialPosition, particle.position), dxFixed = Math.abs(dx), dyFixed = Math.abs(dy), { maxDistance } = particle.retina, hDistance = maxDistance.horizontal, vDistance = maxDistance.vertical;
@@ -5129,10 +5168,10 @@ function applyDistance(particle) {
5129
5168
  if (((hDistance && dxFixed >= hDistance) || (vDistance && dyFixed >= vDistance)) && !particle.misplaced) {
5130
5169
  particle.misplaced = (!!hDistance && dxFixed > hDistance) || (!!vDistance && dyFixed > vDistance);
5131
5170
  if (hDistance) {
5132
- particle.velocity.x = particle.velocity.y / 2 - particle.velocity.x;
5171
+ particle.velocity.x = particle.velocity.y * 0.5 - particle.velocity.x;
5133
5172
  }
5134
5173
  if (vDistance) {
5135
- particle.velocity.y = particle.velocity.x / 2 - particle.velocity.y;
5174
+ particle.velocity.y = particle.velocity.x * 0.5 - particle.velocity.y;
5136
5175
  }
5137
5176
  }
5138
5177
  else if ((!hDistance || dxFixed < hDistance) && (!vDistance || dyFixed < vDistance) && particle.misplaced) {
@@ -5190,16 +5229,16 @@ function spin(particle, moveSpeed) {
5190
5229
  particle.position.x = particle.spin.center.x + particle.spin.radius * updateFunc.x(particle.spin.angle);
5191
5230
  particle.position.y = particle.spin.center.y + particle.spin.radius * updateFunc.y(particle.spin.angle);
5192
5231
  particle.spin.radius += particle.spin.acceleration;
5193
- const maxCanvasSize = Math.max(container.canvas.size.width, container.canvas.size.height);
5194
- if (particle.spin.radius > maxCanvasSize / 2) {
5195
- particle.spin.radius = maxCanvasSize / 2;
5232
+ const maxCanvasSize = Math.max(container.canvas.size.width, container.canvas.size.height), halfMaxSize = maxCanvasSize * 0.5;
5233
+ if (particle.spin.radius > halfMaxSize) {
5234
+ particle.spin.radius = halfMaxSize;
5196
5235
  particle.spin.acceleration *= -1;
5197
5236
  }
5198
5237
  else if (particle.spin.radius < 0) {
5199
5238
  particle.spin.radius = 0;
5200
5239
  particle.spin.acceleration *= -1;
5201
5240
  }
5202
- particle.spin.angle += (moveSpeed / 100) * (1 - particle.spin.radius / maxCanvasSize);
5241
+ particle.spin.angle += moveSpeed * 0.01 * (1 - particle.spin.radius / maxCanvasSize);
5203
5242
  }
5204
5243
  function applyPath(particle, delta) {
5205
5244
  const particlesOptions = particle.options, pathOptions = particlesOptions.move.path, pathEnabled = pathOptions.enable;
@@ -5224,7 +5263,7 @@ function getProximitySpeedFactor(particle) {
5224
5263
  return particle.slow.inRange ? particle.slow.factor : 1;
5225
5264
  }
5226
5265
 
5227
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+move-base@3.0.0-beta.1/node_modules/@tsparticles/move-base/browser/BaseMover.js
5266
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+move-base@3.0.0-beta.4/node_modules/@tsparticles/move-base/browser/BaseMover.js
5228
5267
 
5229
5268
 
5230
5269
  const diffFactor = 2;
@@ -5236,9 +5275,9 @@ class BaseMover {
5236
5275
  return;
5237
5276
  }
5238
5277
  const spinPos = spinOptions.position ?? { x: 50, y: 50 }, spinCenter = {
5239
- x: (spinPos.x / 100) * container.canvas.size.width,
5240
- y: (spinPos.y / 100) * container.canvas.size.height,
5241
- }, pos = particle.getPosition(), distance = getDistance(pos, spinCenter), spinAcceleration = getRangeValue(spinOptions.acceleration);
5278
+ x: spinPos.x * 0.01 * container.canvas.size.width,
5279
+ y: spinPos.y * 0.01 * container.canvas.size.height,
5280
+ }, pos = particle.getPosition(), distance = getDistance(pos, spinCenter), spinAcceleration = NumberUtils_getRangeValue(spinOptions.acceleration);
5242
5281
  particle.retina.spinAcceleration = spinAcceleration * container.retina.pixelRatio;
5243
5282
  particle.spin = {
5244
5283
  center: spinCenter,
@@ -5253,7 +5292,7 @@ class BaseMover {
5253
5292
  const options = particle.options, gravityOptions = options.move.gravity;
5254
5293
  particle.gravity = {
5255
5294
  enable: gravityOptions.enable,
5256
- acceleration: getRangeValue(gravityOptions.acceleration),
5295
+ acceleration: NumberUtils_getRangeValue(gravityOptions.acceleration),
5257
5296
  inverse: gravityOptions.inverse,
5258
5297
  };
5259
5298
  this._initSpin(particle);
@@ -5266,8 +5305,8 @@ class BaseMover {
5266
5305
  if (!moveOptions.enable) {
5267
5306
  return;
5268
5307
  }
5269
- const container = particle.container, pxRatio = container.retina.pixelRatio, slowFactor = getProximitySpeedFactor(particle), baseSpeed = (particle.retina.moveSpeed ??= getRangeValue(moveOptions.speed) * pxRatio) *
5270
- container.retina.reduceFactor, moveDrift = (particle.retina.moveDrift ??= getRangeValue(particle.options.move.drift) * pxRatio), maxSize = getRangeMax(particleOptions.size.value) * pxRatio, sizeFactor = moveOptions.size ? particle.getRadius() / maxSize : 1, moveSpeed = (baseSpeed * sizeFactor * slowFactor * (delta.factor || 1)) / diffFactor, maxSpeed = particle.retina.maxSpeed ?? container.retina.maxSpeed;
5308
+ const container = particle.container, pxRatio = container.retina.pixelRatio, slowFactor = getProximitySpeedFactor(particle), baseSpeed = (particle.retina.moveSpeed ??= NumberUtils_getRangeValue(moveOptions.speed) * pxRatio) *
5309
+ container.retina.reduceFactor, moveDrift = (particle.retina.moveDrift ??= NumberUtils_getRangeValue(particle.options.move.drift) * pxRatio), maxSize = getRangeMax(particleOptions.size.value) * pxRatio, sizeFactor = moveOptions.size ? particle.getRadius() / maxSize : 1, moveSpeed = (baseSpeed * sizeFactor * slowFactor * (delta.factor || 1)) / diffFactor, maxSpeed = particle.retina.maxSpeed ?? container.retina.maxSpeed;
5271
5310
  if (moveOptions.spin.enable) {
5272
5311
  spin(particle, moveSpeed);
5273
5312
  }
@@ -5278,16 +5317,17 @@ class BaseMover {
5278
5317
  }
5279
5318
  }
5280
5319
 
5281
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+move-base@3.0.0-beta.1/node_modules/@tsparticles/move-base/browser/index.js
5320
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+move-base@3.0.0-beta.4/node_modules/@tsparticles/move-base/browser/index.js
5282
5321
 
5283
5322
  async function loadBaseMover(engine, refresh = true) {
5284
5323
  await engine.addMover("base", () => new BaseMover(), refresh);
5285
5324
  }
5286
5325
 
5287
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+shape-circle@3.0.0-beta.1/node_modules/@tsparticles/shape-circle/browser/CircleDrawer.js
5326
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+shape-circle@3.0.0-beta.4/node_modules/@tsparticles/shape-circle/browser/CircleDrawer.js
5288
5327
 
5289
5328
  class CircleDrawer {
5290
- draw(context, particle, radius) {
5329
+ draw(data) {
5330
+ const { context, particle, radius } = data;
5291
5331
  if (!particle.circleRange) {
5292
5332
  particle.circleRange = { min: 0, max: Math.PI * 2 };
5293
5333
  }
@@ -5311,13 +5351,13 @@ class CircleDrawer {
5311
5351
  }
5312
5352
  }
5313
5353
 
5314
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+shape-circle@3.0.0-beta.1/node_modules/@tsparticles/shape-circle/browser/index.js
5354
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+shape-circle@3.0.0-beta.4/node_modules/@tsparticles/shape-circle/browser/index.js
5315
5355
 
5316
5356
  async function loadCircleShape(engine, refresh = true) {
5317
5357
  await engine.addShape("circle", new CircleDrawer(), refresh);
5318
5358
  }
5319
5359
 
5320
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-color@3.0.0-beta.1/node_modules/@tsparticles/updater-color/browser/Utils.js
5360
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-color@3.0.0-beta.4/node_modules/@tsparticles/updater-color/browser/Utils.js
5321
5361
 
5322
5362
  function updateColorValue(delta, colorValue, valueAnimation, max, decrease) {
5323
5363
  if (!colorValue ||
@@ -5383,7 +5423,7 @@ function updateColor(particle, delta) {
5383
5423
  }
5384
5424
  }
5385
5425
 
5386
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-color@3.0.0-beta.1/node_modules/@tsparticles/updater-color/browser/ColorUpdater.js
5426
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-color@3.0.0-beta.4/node_modules/@tsparticles/updater-color/browser/ColorUpdater.js
5387
5427
 
5388
5428
 
5389
5429
  class ColorUpdater {
@@ -5409,13 +5449,13 @@ class ColorUpdater {
5409
5449
  }
5410
5450
  }
5411
5451
 
5412
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-color@3.0.0-beta.1/node_modules/@tsparticles/updater-color/browser/index.js
5452
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-color@3.0.0-beta.4/node_modules/@tsparticles/updater-color/browser/index.js
5413
5453
 
5414
5454
  async function loadColorUpdater(engine, refresh = true) {
5415
5455
  await engine.addParticleUpdater("color", (container) => new ColorUpdater(container), refresh);
5416
5456
  }
5417
5457
 
5418
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-opacity@3.0.0-beta.1/node_modules/@tsparticles/updater-opacity/browser/Utils.js
5458
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-opacity@3.0.0-beta.4/node_modules/@tsparticles/updater-opacity/browser/Utils.js
5419
5459
 
5420
5460
  function checkDestroy(particle, value, minValue, maxValue) {
5421
5461
  switch (particle.options.opacity.animation.destroy) {
@@ -5481,7 +5521,7 @@ function updateOpacity(particle, delta) {
5481
5521
  }
5482
5522
  }
5483
5523
 
5484
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-opacity@3.0.0-beta.1/node_modules/@tsparticles/updater-opacity/browser/OpacityUpdater.js
5524
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-opacity@3.0.0-beta.4/node_modules/@tsparticles/updater-opacity/browser/OpacityUpdater.js
5485
5525
 
5486
5526
 
5487
5527
  class OpacityUpdater {
@@ -5494,7 +5534,7 @@ class OpacityUpdater {
5494
5534
  const opacityAnimation = opacityOptions.animation;
5495
5535
  if (opacityAnimation.enable) {
5496
5536
  particle.opacity.velocity =
5497
- (getRangeValue(opacityAnimation.speed) / 100) * this.container.retina.reduceFactor;
5537
+ (NumberUtils_getRangeValue(opacityAnimation.speed) / 100) * this.container.retina.reduceFactor;
5498
5538
  if (!opacityAnimation.sync) {
5499
5539
  particle.opacity.velocity *= getRandom();
5500
5540
  }
@@ -5523,13 +5563,13 @@ class OpacityUpdater {
5523
5563
  }
5524
5564
  }
5525
5565
 
5526
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-opacity@3.0.0-beta.1/node_modules/@tsparticles/updater-opacity/browser/index.js
5566
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-opacity@3.0.0-beta.4/node_modules/@tsparticles/updater-opacity/browser/index.js
5527
5567
 
5528
5568
  async function loadOpacityUpdater(engine, refresh = true) {
5529
5569
  await engine.addParticleUpdater("opacity", (container) => new OpacityUpdater(container), refresh);
5530
5570
  }
5531
5571
 
5532
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/Utils.js
5572
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.0.0-beta.4/node_modules/@tsparticles/updater-out-modes/browser/Utils.js
5533
5573
 
5534
5574
  function bounceHorizontal(data) {
5535
5575
  if ((data.outMode !== "bounce" &&
@@ -5549,7 +5589,7 @@ function bounceHorizontal(data) {
5549
5589
  let bounced = false;
5550
5590
  if ((data.direction === "right" && data.bounds.right >= data.canvasSize.width && velocity > 0) ||
5551
5591
  (data.direction === "left" && data.bounds.left <= 0 && velocity < 0)) {
5552
- const newVelocity = NumberUtils_getValue(data.particle.options.bounce.horizontal);
5592
+ const newVelocity = NumberUtils_getRangeValue(data.particle.options.bounce.horizontal.value);
5553
5593
  data.particle.velocity.x *= -newVelocity;
5554
5594
  bounced = true;
5555
5595
  }
@@ -5585,7 +5625,7 @@ function bounceVertical(data) {
5585
5625
  let bounced = false;
5586
5626
  if ((data.direction === "bottom" && data.bounds.bottom >= data.canvasSize.height && velocity > 0) ||
5587
5627
  (data.direction === "top" && data.bounds.top <= 0 && velocity < 0)) {
5588
- const newVelocity = NumberUtils_getValue(data.particle.options.bounce.vertical);
5628
+ const newVelocity = NumberUtils_getRangeValue(data.particle.options.bounce.vertical.value);
5589
5629
  data.particle.velocity.y *= -newVelocity;
5590
5630
  bounced = true;
5591
5631
  }
@@ -5604,7 +5644,7 @@ function bounceVertical(data) {
5604
5644
  }
5605
5645
  }
5606
5646
 
5607
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js
5647
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.0.0-beta.4/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js
5608
5648
 
5609
5649
 
5610
5650
  class BounceOutMode {
@@ -5642,7 +5682,7 @@ class BounceOutMode {
5642
5682
  }
5643
5683
  }
5644
5684
 
5645
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js
5685
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.0.0-beta.4/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js
5646
5686
 
5647
5687
  class DestroyOutMode {
5648
5688
  constructor(container) {
@@ -5677,7 +5717,7 @@ class DestroyOutMode {
5677
5717
  }
5678
5718
  }
5679
5719
 
5680
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js
5720
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.0.0-beta.4/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js
5681
5721
 
5682
5722
  class NoneOutMode {
5683
5723
  constructor(container) {
@@ -5720,7 +5760,7 @@ class NoneOutMode {
5720
5760
  }
5721
5761
  }
5722
5762
 
5723
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js
5763
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.0.0-beta.4/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js
5724
5764
 
5725
5765
  class OutOutMode {
5726
5766
  constructor(container) {
@@ -5829,7 +5869,7 @@ class OutOutMode {
5829
5869
  }
5830
5870
  }
5831
5871
 
5832
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js
5872
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.0.0-beta.4/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js
5833
5873
 
5834
5874
 
5835
5875
 
@@ -5863,13 +5903,13 @@ class OutOfCanvasUpdater {
5863
5903
  }
5864
5904
  }
5865
5905
 
5866
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/index.js
5906
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.0.0-beta.4/node_modules/@tsparticles/updater-out-modes/browser/index.js
5867
5907
 
5868
5908
  async function loadOutModesUpdater(engine, refresh = true) {
5869
5909
  await engine.addParticleUpdater("outModes", (container) => new OutOfCanvasUpdater(container), refresh);
5870
5910
  }
5871
5911
 
5872
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-size@3.0.0-beta.1/node_modules/@tsparticles/updater-size/browser/Utils.js
5912
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-size@3.0.0-beta.4/node_modules/@tsparticles/updater-size/browser/Utils.js
5873
5913
 
5874
5914
  function Utils_checkDestroy(particle, value, minValue, maxValue) {
5875
5915
  switch (particle.options.size.animation.destroy) {
@@ -5937,7 +5977,7 @@ function updateSize(particle, delta) {
5937
5977
  }
5938
5978
  }
5939
5979
 
5940
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-size@3.0.0-beta.1/node_modules/@tsparticles/updater-size/browser/SizeUpdater.js
5980
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-size@3.0.0-beta.4/node_modules/@tsparticles/updater-size/browser/SizeUpdater.js
5941
5981
 
5942
5982
 
5943
5983
  class SizeUpdater {
@@ -5970,13 +6010,13 @@ class SizeUpdater {
5970
6010
  }
5971
6011
  }
5972
6012
 
5973
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-size@3.0.0-beta.1/node_modules/@tsparticles/updater-size/browser/index.js
6013
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-size@3.0.0-beta.4/node_modules/@tsparticles/updater-size/browser/index.js
5974
6014
 
5975
6015
  async function loadSizeUpdater(engine, refresh = true) {
5976
6016
  await engine.addParticleUpdater("size", () => new SizeUpdater(), refresh);
5977
6017
  }
5978
6018
 
5979
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+basic@3.0.0-beta.1/node_modules/@tsparticles/basic/browser/index.js
6019
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+basic@3.0.0-beta.4/node_modules/@tsparticles/basic/browser/index.js
5980
6020
 
5981
6021
 
5982
6022
 
@@ -5993,7 +6033,7 @@ async function loadBasic(engine, refresh = true) {
5993
6033
  await engine.refresh(refresh);
5994
6034
  }
5995
6035
 
5996
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.1/node_modules/@tsparticles/updater-destroy/browser/Options/Classes/DestroyBounds.js
6036
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.4/node_modules/@tsparticles/updater-destroy/browser/Options/Classes/DestroyBounds.js
5997
6037
 
5998
6038
  class DestroyBounds {
5999
6039
  load(data) {
@@ -6015,7 +6055,7 @@ class DestroyBounds {
6015
6055
  }
6016
6056
  }
6017
6057
 
6018
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.1/node_modules/@tsparticles/updater-destroy/browser/Options/Classes/SplitFactor.js
6058
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.4/node_modules/@tsparticles/updater-destroy/browser/Options/Classes/SplitFactor.js
6019
6059
 
6020
6060
  class SplitFactor extends ValueWithRandom {
6021
6061
  constructor() {
@@ -6024,7 +6064,7 @@ class SplitFactor extends ValueWithRandom {
6024
6064
  }
6025
6065
  }
6026
6066
 
6027
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.1/node_modules/@tsparticles/updater-destroy/browser/Options/Classes/SplitRate.js
6067
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.4/node_modules/@tsparticles/updater-destroy/browser/Options/Classes/SplitRate.js
6028
6068
 
6029
6069
  class SplitRate extends ValueWithRandom {
6030
6070
  constructor() {
@@ -6033,7 +6073,7 @@ class SplitRate extends ValueWithRandom {
6033
6073
  }
6034
6074
  }
6035
6075
 
6036
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.1/node_modules/@tsparticles/updater-destroy/browser/Options/Classes/Split.js
6076
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.4/node_modules/@tsparticles/updater-destroy/browser/Options/Classes/Split.js
6037
6077
 
6038
6078
 
6039
6079
 
@@ -6077,7 +6117,7 @@ class Split {
6077
6117
  }
6078
6118
  }
6079
6119
 
6080
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.1/node_modules/@tsparticles/updater-destroy/browser/Options/Classes/Destroy.js
6120
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.4/node_modules/@tsparticles/updater-destroy/browser/Options/Classes/Destroy.js
6081
6121
 
6082
6122
 
6083
6123
  class Destroy {
@@ -6100,14 +6140,14 @@ class Destroy {
6100
6140
  }
6101
6141
  }
6102
6142
 
6103
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.1/node_modules/@tsparticles/updater-destroy/browser/Utils.js
6143
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.4/node_modules/@tsparticles/updater-destroy/browser/Utils.js
6104
6144
 
6105
6145
  function addSplitParticle(engine, container, parent, splitParticlesOptions) {
6106
6146
  const destroyOptions = parent.options.destroy;
6107
6147
  if (!destroyOptions) {
6108
6148
  return;
6109
6149
  }
6110
- const splitOptions = destroyOptions.split, options = loadParticlesOptions(engine, container, parent.options), factor = NumberUtils_getValue(splitOptions.factor), parentColor = parent.getFillColor();
6150
+ const splitOptions = destroyOptions.split, options = loadParticlesOptions(engine, container, parent.options), factor = NumberUtils_getRangeValue(splitOptions.factor.value), parentColor = parent.getFillColor();
6111
6151
  if (splitOptions.color) {
6112
6152
  options.color.load(splitOptions.color);
6113
6153
  }
@@ -6115,9 +6155,9 @@ function addSplitParticle(engine, container, parent, splitParticlesOptions) {
6115
6155
  options.color.load({
6116
6156
  value: {
6117
6157
  hsl: {
6118
- h: parentColor.h + getRangeValue(splitOptions.colorOffset.h ?? 0),
6119
- s: parentColor.s + getRangeValue(splitOptions.colorOffset.s ?? 0),
6120
- l: parentColor.l + getRangeValue(splitOptions.colorOffset.l ?? 0),
6158
+ h: parentColor.h + NumberUtils_getRangeValue(splitOptions.colorOffset.h ?? 0),
6159
+ s: parentColor.s + NumberUtils_getRangeValue(splitOptions.colorOffset.s ?? 0),
6160
+ l: parentColor.l + NumberUtils_getRangeValue(splitOptions.colorOffset.l ?? 0),
6121
6161
  },
6122
6162
  },
6123
6163
  });
@@ -6170,13 +6210,13 @@ function split(engine, container, particle) {
6170
6210
  if (splitOptions.count >= 0 && (particle.splitCount === undefined || particle.splitCount++ > splitOptions.count)) {
6171
6211
  return;
6172
6212
  }
6173
- const rate = NumberUtils_getValue(splitOptions.rate), particlesSplitOptions = itemFromSingleOrMultiple(splitOptions.particles);
6213
+ const rate = NumberUtils_getRangeValue(splitOptions.rate.value), particlesSplitOptions = itemFromSingleOrMultiple(splitOptions.particles);
6174
6214
  for (let i = 0; i < rate; i++) {
6175
6215
  addSplitParticle(engine, container, particle, particlesSplitOptions);
6176
6216
  }
6177
6217
  }
6178
6218
 
6179
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.1/node_modules/@tsparticles/updater-destroy/browser/DestroyUpdater.js
6219
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.4/node_modules/@tsparticles/updater-destroy/browser/DestroyUpdater.js
6180
6220
 
6181
6221
 
6182
6222
 
@@ -6197,16 +6237,16 @@ class DestroyUpdater {
6197
6237
  }
6198
6238
  const { bottom, left, right, top } = destroyBoundsOptions, { destroyBounds } = particle, canvasSize = container.canvas.size;
6199
6239
  if (bottom) {
6200
- destroyBounds.bottom = (getRangeValue(bottom) * canvasSize.height) / 100;
6240
+ destroyBounds.bottom = (NumberUtils_getRangeValue(bottom) * canvasSize.height) / 100;
6201
6241
  }
6202
6242
  if (left) {
6203
- destroyBounds.left = (getRangeValue(left) * canvasSize.width) / 100;
6243
+ destroyBounds.left = (NumberUtils_getRangeValue(left) * canvasSize.width) / 100;
6204
6244
  }
6205
6245
  if (right) {
6206
- destroyBounds.right = (getRangeValue(right) * canvasSize.width) / 100;
6246
+ destroyBounds.right = (NumberUtils_getRangeValue(right) * canvasSize.width) / 100;
6207
6247
  }
6208
6248
  if (top) {
6209
- destroyBounds.top = (getRangeValue(top) * canvasSize.height) / 100;
6249
+ destroyBounds.top = (NumberUtils_getRangeValue(top) * canvasSize.height) / 100;
6210
6250
  }
6211
6251
  }
6212
6252
  isEnabled(particle) {
@@ -6246,39 +6286,13 @@ class DestroyUpdater {
6246
6286
  }
6247
6287
  }
6248
6288
 
6249
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.1/node_modules/@tsparticles/updater-destroy/browser/index.js
6289
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-destroy@3.0.0-beta.4/node_modules/@tsparticles/updater-destroy/browser/index.js
6250
6290
 
6251
6291
  async function loadDestroyUpdater(engine, refresh = true) {
6252
6292
  await engine.addParticleUpdater("destroy", (container) => new DestroyUpdater(engine, container), refresh);
6253
6293
  }
6254
6294
 
6255
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.1/node_modules/@tsparticles/plugin-emitters/browser/Shapes/Circle/CircleShape.js
6256
-
6257
- class CircleShape {
6258
- randomPosition(position, size, fill) {
6259
- const generateTheta = (x, y) => {
6260
- const u = getRandom() / 4.0, theta = Math.atan((y / x) * Math.tan(2 * Math.PI * u)), v = getRandom();
6261
- if (v < 0.25) {
6262
- return theta;
6263
- }
6264
- else if (v < 0.5) {
6265
- return Math.PI - theta;
6266
- }
6267
- else if (v < 0.75) {
6268
- return Math.PI + theta;
6269
- }
6270
- else {
6271
- return -theta;
6272
- }
6273
- }, radius = (x, y, theta) => (x * y) / Math.sqrt((y * Math.cos(theta)) ** 2 + (x * Math.sin(theta)) ** 2), [a, b] = [size.width / 2, size.height / 2], randomTheta = generateTheta(a, b), maxRadius = radius(a, b, randomTheta), randomRadius = fill ? maxRadius * Math.sqrt(getRandom()) : maxRadius;
6274
- return {
6275
- x: position.x + randomRadius * Math.cos(randomTheta),
6276
- y: position.y + randomRadius * Math.sin(randomTheta),
6277
- };
6278
- }
6279
- }
6280
-
6281
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.1/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterLife.js
6295
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.4/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterLife.js
6282
6296
 
6283
6297
  class EmitterLife {
6284
6298
  constructor() {
@@ -6303,7 +6317,7 @@ class EmitterLife {
6303
6317
  }
6304
6318
  }
6305
6319
 
6306
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.1/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterRate.js
6320
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.4/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterRate.js
6307
6321
 
6308
6322
  class EmitterRate {
6309
6323
  constructor() {
@@ -6323,7 +6337,49 @@ class EmitterRate {
6323
6337
  }
6324
6338
  }
6325
6339
 
6326
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.1/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterSize.js
6340
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.4/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterShapeReplace.js
6341
+ class EmitterShapeReplace {
6342
+ constructor() {
6343
+ this.color = false;
6344
+ this.opacity = false;
6345
+ }
6346
+ load(data) {
6347
+ if (!data) {
6348
+ return;
6349
+ }
6350
+ if (data.color !== undefined) {
6351
+ this.color = data.color;
6352
+ }
6353
+ if (data.opacity !== undefined) {
6354
+ this.opacity = data.opacity;
6355
+ }
6356
+ }
6357
+ }
6358
+
6359
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.4/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterShape.js
6360
+
6361
+
6362
+ class EmitterShape {
6363
+ constructor() {
6364
+ this.options = {};
6365
+ this.replace = new EmitterShapeReplace();
6366
+ this.type = "square";
6367
+ }
6368
+ load(data) {
6369
+ if (!data) {
6370
+ return;
6371
+ }
6372
+ if (data.options !== undefined) {
6373
+ this.options = deepExtend({}, data.options ?? {});
6374
+ }
6375
+ this.replace.load(data.replace);
6376
+ if (data.type !== undefined) {
6377
+ this.type = data.type;
6378
+ }
6379
+ }
6380
+ }
6381
+
6382
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.4/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterSize.js
6327
6383
  class EmitterSize {
6328
6384
  constructor() {
6329
6385
  this.mode = "percent";
@@ -6346,7 +6402,8 @@ class EmitterSize {
6346
6402
  }
6347
6403
  }
6348
6404
 
6349
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.1/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/Emitter.js
6405
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.4/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/Emitter.js
6406
+
6350
6407
 
6351
6408
 
6352
6409
 
@@ -6357,7 +6414,7 @@ class Emitter {
6357
6414
  this.fill = true;
6358
6415
  this.life = new EmitterLife();
6359
6416
  this.rate = new EmitterRate();
6360
- this.shape = "square";
6417
+ this.shape = new EmitterShape();
6361
6418
  this.startCount = 0;
6362
6419
  }
6363
6420
  load(data) {
@@ -6386,9 +6443,7 @@ class Emitter {
6386
6443
  return deepExtend({}, particles);
6387
6444
  });
6388
6445
  this.rate.load(data.rate);
6389
- if (data.shape !== undefined) {
6390
- this.shape = data.shape;
6391
- }
6446
+ this.shape.load(data.shape);
6392
6447
  if (data.position !== undefined) {
6393
6448
  this.position = {};
6394
6449
  if (data.position.x !== undefined) {
@@ -6410,21 +6465,29 @@ class Emitter {
6410
6465
  }
6411
6466
  }
6412
6467
 
6413
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.1/node_modules/@tsparticles/plugin-emitters/browser/EmitterInstance.js
6468
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.4/node_modules/@tsparticles/plugin-emitters/browser/EmitterInstance.js
6414
6469
 
6415
6470
 
6416
6471
 
6472
+ function setParticlesOptionsColor(particlesOptions, color) {
6473
+ if (particlesOptions.color) {
6474
+ particlesOptions.color.value = color;
6475
+ }
6476
+ else {
6477
+ particlesOptions.color = {
6478
+ value: color,
6479
+ };
6480
+ }
6481
+ }
6417
6482
  class EmitterInstance {
6418
6483
  constructor(engine, emitters, container, options, position) {
6419
6484
  this.emitters = emitters;
6420
6485
  this.container = container;
6421
- this._calcPosition = () => {
6422
- return calcPositionOrRandomFromSizeRanged({
6423
- size: this.container.canvas.size,
6424
- position: this.options.position,
6425
- });
6426
- };
6427
6486
  this._destroy = () => {
6487
+ this._mutationObserver?.disconnect();
6488
+ this._mutationObserver = undefined;
6489
+ this._resizeObserver?.disconnect();
6490
+ this._resizeObserver = undefined;
6428
6491
  this.emitters.removeEmitter(this);
6429
6492
  this._engine.dispatchEvent("emitterDestroyed", {
6430
6493
  container: this.container,
@@ -6433,45 +6496,11 @@ class EmitterInstance {
6433
6496
  },
6434
6497
  });
6435
6498
  };
6436
- this._emit = () => {
6437
- if (this._paused) {
6438
- return;
6439
- }
6440
- const quantity = getRangeValue(this.options.rate.quantity);
6441
- this._emitParticles(quantity);
6442
- };
6443
- this._emitParticles = (quantity) => {
6444
- const position = this.getPosition(), size = this.getSize(), singleParticlesOptions = itemFromSingleOrMultiple(this._particlesOptions);
6445
- for (let i = 0; i < quantity; i++) {
6446
- const particlesOptions = deepExtend({}, singleParticlesOptions);
6447
- if (this.spawnColor) {
6448
- const hslAnimation = this.options.spawnColor?.animation;
6449
- if (hslAnimation) {
6450
- this.spawnColor.h = this._setColorAnimation(hslAnimation.h, this.spawnColor.h, 360);
6451
- this.spawnColor.s = this._setColorAnimation(hslAnimation.s, this.spawnColor.s, 100);
6452
- this.spawnColor.l = this._setColorAnimation(hslAnimation.l, this.spawnColor.l, 100);
6453
- }
6454
- if (!particlesOptions.color) {
6455
- particlesOptions.color = {
6456
- value: this.spawnColor,
6457
- };
6458
- }
6459
- else {
6460
- particlesOptions.color.value = this.spawnColor;
6461
- }
6462
- }
6463
- if (!position) {
6464
- return;
6465
- }
6466
- const pPosition = this._shape?.randomPosition(position, size, this.fill) ?? position;
6467
- this.container.particles.addParticle(pPosition, particlesOptions);
6468
- }
6469
- };
6470
6499
  this._prepareToDie = () => {
6471
6500
  if (this._paused) {
6472
6501
  return;
6473
6502
  }
6474
- const duration = this.options.life?.duration !== undefined ? getRangeValue(this.options.life.duration) : undefined;
6503
+ const duration = this.options.life?.duration !== undefined ? NumberUtils_getRangeValue(this.options.life.duration) : undefined;
6475
6504
  if (this.container.retina.reduceFactor &&
6476
6505
  (this._lifeCount > 0 || this._immortal) &&
6477
6506
  duration !== undefined &&
@@ -6484,7 +6513,7 @@ class EmitterInstance {
6484
6513
  if (!animation.enable) {
6485
6514
  return initValue;
6486
6515
  }
6487
- const colorOffset = randomInRange(animation.offset), delay = getRangeValue(this.options.rate.delay), emitFactor = (1000 * delay) / container.retina.reduceFactor, colorSpeed = getRangeValue(animation.speed ?? 0);
6516
+ const colorOffset = randomInRange(animation.offset), delay = NumberUtils_getRangeValue(this.options.rate.delay), emitFactor = (1000 * delay) / container.retina.reduceFactor, colorSpeed = NumberUtils_getRangeValue(animation.speed ?? 0);
6488
6517
  return (initValue + (colorSpeed * container.fpsLimit) / emitFactor + colorOffset * 3.6) % maxValue;
6489
6518
  };
6490
6519
  this._engine = engine;
@@ -6499,10 +6528,9 @@ class EmitterInstance {
6499
6528
  this.options = new Emitter();
6500
6529
  this.options.load(options);
6501
6530
  }
6502
- this._spawnDelay = (getRangeValue(this.options.life.delay ?? 0) * 1000) / this.container.retina.reduceFactor;
6531
+ this._spawnDelay = (NumberUtils_getRangeValue(this.options.life.delay ?? 0) * 1000) / this.container.retina.reduceFactor;
6503
6532
  this.position = this._initialPosition ?? this._calcPosition();
6504
6533
  this.name = this.options.name;
6505
- this._shape = this._engine.emitterShapeManager?.getShape(this.options.shape);
6506
6534
  this.fill = this.options.fill;
6507
6535
  this._firstSpawn = !this.options.life.wait;
6508
6536
  this._startParticlesAdded = false;
@@ -6515,19 +6543,30 @@ class EmitterInstance {
6515
6543
  }
6516
6544
  this._paused = !this.options.autoPlay;
6517
6545
  this._particlesOptions = particlesOptions;
6518
- this.size =
6519
- this.options.size ??
6520
- (() => {
6521
- const size = new EmitterSize();
6522
- size.load({
6523
- height: 0,
6524
- mode: "percent",
6525
- width: 0,
6526
- });
6527
- return size;
6528
- })();
6546
+ this._size = this._calcSize();
6547
+ this.size = getSize(this._size, this.container.canvas.size);
6529
6548
  this._lifeCount = this.options.life.count ?? -1;
6530
6549
  this._immortal = this._lifeCount <= 0;
6550
+ if (this.options.domId) {
6551
+ const element = document.getElementById(this.options.domId);
6552
+ if (element) {
6553
+ this._mutationObserver = new MutationObserver(() => {
6554
+ this.resize();
6555
+ });
6556
+ this._resizeObserver = new ResizeObserver(() => {
6557
+ this.resize();
6558
+ });
6559
+ this._mutationObserver.observe(element, {
6560
+ attributes: true,
6561
+ attributeFilter: ["style", "width", "height"],
6562
+ });
6563
+ this._resizeObserver.observe(element);
6564
+ }
6565
+ }
6566
+ const shapeOptions = this.options.shape, shapeGenerator = this._engine.emitterShapeManager?.getShapeGenerator(shapeOptions.type);
6567
+ if (shapeGenerator) {
6568
+ this._shape = shapeGenerator.generate(this.position, this.size, this.fill, shapeOptions.options);
6569
+ }
6531
6570
  this._engine.dispatchEvent("emitterCreated", {
6532
6571
  container,
6533
6572
  data: {
@@ -6544,32 +6583,8 @@ class EmitterInstance {
6544
6583
  this._paused = false;
6545
6584
  this.play();
6546
6585
  }
6547
- getPosition() {
6548
- if (this.options.domId) {
6549
- const container = this.container, element = document.getElementById(this.options.domId);
6550
- if (element) {
6551
- const elRect = element.getBoundingClientRect();
6552
- return {
6553
- x: (elRect.x + elRect.width / 2) * container.retina.pixelRatio,
6554
- y: (elRect.y + elRect.height / 2) * container.retina.pixelRatio,
6555
- };
6556
- }
6557
- }
6558
- return this.position;
6559
- }
6560
- getSize() {
6561
- const container = this.container;
6562
- if (this.options.domId) {
6563
- const element = document.getElementById(this.options.domId);
6564
- if (element) {
6565
- const elRect = element.getBoundingClientRect();
6566
- return {
6567
- width: elRect.width * container.retina.pixelRatio,
6568
- height: elRect.height * container.retina.pixelRatio,
6569
- };
6570
- }
6571
- }
6572
- return getSize(this.size, container.canvas.size);
6586
+ async init() {
6587
+ await this._shape?.init();
6573
6588
  }
6574
6589
  pause() {
6575
6590
  if (this._paused) {
@@ -6587,7 +6602,7 @@ class EmitterInstance {
6587
6602
  return;
6588
6603
  }
6589
6604
  if (this._emitDelay === undefined) {
6590
- const delay = getRangeValue(this.options.rate.delay);
6605
+ const delay = NumberUtils_getRangeValue(this.options.rate.delay);
6591
6606
  this._emitDelay = (1000 * delay) / this.container.retina.reduceFactor;
6592
6607
  }
6593
6608
  if (this._lifeCount > 0 || this._immortal) {
@@ -6600,8 +6615,11 @@ class EmitterInstance {
6600
6615
  initialPosition && isPointInside(initialPosition, this.container.canvas.size, Vector_Vector.origin)
6601
6616
  ? initialPosition
6602
6617
  : this._calcPosition();
6618
+ this._size = this._calcSize();
6619
+ this.size = getSize(this._size, this.container.canvas.size);
6620
+ this._shape?.resize(this.position, this.size);
6603
6621
  }
6604
- update(delta) {
6622
+ async update(delta) {
6605
6623
  if (this._paused) {
6606
6624
  return;
6607
6625
  }
@@ -6612,7 +6630,7 @@ class EmitterInstance {
6612
6630
  }
6613
6631
  if (!this._startParticlesAdded) {
6614
6632
  this._startParticlesAdded = true;
6615
- this._emitParticles(this.options.startCount);
6633
+ await this._emitParticles(this.options.startCount);
6616
6634
  }
6617
6635
  if (this._duration !== undefined) {
6618
6636
  this._currentDuration += delta.value;
@@ -6627,7 +6645,7 @@ class EmitterInstance {
6627
6645
  if (this._lifeCount > 0 || this._immortal) {
6628
6646
  this.position = this._calcPosition();
6629
6647
  this._spawnDelay =
6630
- (getRangeValue(this.options.life.delay ?? 0) * 1000) / this.container.retina.reduceFactor;
6648
+ (NumberUtils_getRangeValue(this.options.life.delay ?? 0) * 1000) / this.container.retina.reduceFactor;
6631
6649
  }
6632
6650
  else {
6633
6651
  this._destroy();
@@ -6655,9 +6673,99 @@ class EmitterInstance {
6655
6673
  }
6656
6674
  }
6657
6675
  }
6676
+ _calcPosition() {
6677
+ if (this.options.domId) {
6678
+ const container = this.container, element = document.getElementById(this.options.domId);
6679
+ if (element) {
6680
+ const elRect = element.getBoundingClientRect();
6681
+ return {
6682
+ x: (elRect.x + elRect.width / 2) * container.retina.pixelRatio,
6683
+ y: (elRect.y + elRect.height / 2) * container.retina.pixelRatio,
6684
+ };
6685
+ }
6686
+ }
6687
+ return calcPositionOrRandomFromSizeRanged({
6688
+ size: this.container.canvas.size,
6689
+ position: this.options.position,
6690
+ });
6691
+ }
6692
+ _calcSize() {
6693
+ const container = this.container;
6694
+ if (this.options.domId) {
6695
+ const element = document.getElementById(this.options.domId);
6696
+ if (element) {
6697
+ const elRect = element.getBoundingClientRect();
6698
+ return {
6699
+ width: elRect.width * container.retina.pixelRatio,
6700
+ height: elRect.height * container.retina.pixelRatio,
6701
+ mode: "precise",
6702
+ };
6703
+ }
6704
+ }
6705
+ return (this.options.size ??
6706
+ (() => {
6707
+ const size = new EmitterSize();
6708
+ size.load({
6709
+ height: 0,
6710
+ mode: "percent",
6711
+ width: 0,
6712
+ });
6713
+ return size;
6714
+ })());
6715
+ }
6716
+ async _emit() {
6717
+ if (this._paused) {
6718
+ return;
6719
+ }
6720
+ const quantity = NumberUtils_getRangeValue(this.options.rate.quantity);
6721
+ await this._emitParticles(quantity);
6722
+ }
6723
+ async _emitParticles(quantity) {
6724
+ const singleParticlesOptions = itemFromSingleOrMultiple(this._particlesOptions);
6725
+ for (let i = 0; i < quantity; i++) {
6726
+ const particlesOptions = deepExtend({}, singleParticlesOptions);
6727
+ if (this.spawnColor) {
6728
+ const hslAnimation = this.options.spawnColor?.animation;
6729
+ if (hslAnimation) {
6730
+ this.spawnColor.h = this._setColorAnimation(hslAnimation.h, this.spawnColor.h, 360);
6731
+ this.spawnColor.s = this._setColorAnimation(hslAnimation.s, this.spawnColor.s, 100);
6732
+ this.spawnColor.l = this._setColorAnimation(hslAnimation.l, this.spawnColor.l, 100);
6733
+ }
6734
+ setParticlesOptionsColor(particlesOptions, this.spawnColor);
6735
+ }
6736
+ const shapeOptions = this.options.shape;
6737
+ let position = this.position;
6738
+ if (this._shape) {
6739
+ const shapePosData = await this._shape.randomPosition();
6740
+ if (shapePosData) {
6741
+ position = shapePosData.position;
6742
+ const replaceData = shapeOptions.replace;
6743
+ if (replaceData.color && shapePosData.color) {
6744
+ setParticlesOptionsColor(particlesOptions, shapePosData.color);
6745
+ }
6746
+ if (replaceData.opacity) {
6747
+ if (particlesOptions.opacity) {
6748
+ particlesOptions.opacity.value = shapePosData.opacity;
6749
+ }
6750
+ else {
6751
+ particlesOptions.opacity = {
6752
+ value: shapePosData.opacity,
6753
+ };
6754
+ }
6755
+ }
6756
+ }
6757
+ else {
6758
+ position = null;
6759
+ }
6760
+ }
6761
+ if (position) {
6762
+ this.container.particles.addParticle(position, particlesOptions);
6763
+ }
6764
+ }
6765
+ }
6658
6766
  }
6659
6767
 
6660
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.1/node_modules/@tsparticles/plugin-emitters/browser/Emitters.js
6768
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.4/node_modules/@tsparticles/plugin-emitters/browser/Emitters.js
6661
6769
 
6662
6770
 
6663
6771
 
@@ -6677,7 +6785,7 @@ class Emitters {
6677
6785
  container.getEmitter = (idxOrName) => idxOrName === undefined || isNumber(idxOrName)
6678
6786
  ? this.array[idxOrName || 0]
6679
6787
  : this.array.find((t) => t.name === idxOrName);
6680
- container.addEmitter = (options, position) => this.addEmitter(options, position);
6788
+ container.addEmitter = async (options, position) => this.addEmitter(options, position);
6681
6789
  container.removeEmitter = (idxOrName) => {
6682
6790
  const emitter = container.getEmitter(idxOrName);
6683
6791
  if (emitter) {
@@ -6697,10 +6805,11 @@ class Emitters {
6697
6805
  }
6698
6806
  };
6699
6807
  }
6700
- addEmitter(options, position) {
6808
+ async addEmitter(options, position) {
6701
6809
  const emitterOptions = new Emitter();
6702
6810
  emitterOptions.load(options);
6703
6811
  const emitter = new EmitterInstance(this._engine, this, this.container, emitterOptions, position);
6812
+ await emitter.init();
6704
6813
  this.array.push(emitter);
6705
6814
  return emitter;
6706
6815
  }
@@ -6744,11 +6853,11 @@ class Emitters {
6744
6853
  }
6745
6854
  if (isArray(this.emitters)) {
6746
6855
  for (const emitterOptions of this.emitters) {
6747
- this.addEmitter(emitterOptions);
6856
+ await this.addEmitter(emitterOptions);
6748
6857
  }
6749
6858
  }
6750
6859
  else {
6751
- this.addEmitter(this.emitters);
6860
+ await this.addEmitter(this.emitters);
6752
6861
  }
6753
6862
  }
6754
6863
  pause() {
@@ -6775,77 +6884,33 @@ class Emitters {
6775
6884
  stop() {
6776
6885
  this.array = [];
6777
6886
  }
6778
- update(delta) {
6887
+ async update(delta) {
6779
6888
  for (const emitter of this.array) {
6780
- emitter.update(delta);
6889
+ await emitter.update(delta);
6781
6890
  }
6782
6891
  }
6783
6892
  }
6784
6893
 
6785
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.1/node_modules/@tsparticles/plugin-emitters/browser/ShapeManager.js
6786
- const shapes = new Map();
6894
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.4/node_modules/@tsparticles/plugin-emitters/browser/ShapeManager.js
6895
+ const shapeGeneratorss = new Map();
6787
6896
  class ShapeManager {
6788
6897
  constructor(engine) {
6789
6898
  this._engine = engine;
6790
6899
  }
6791
- addShape(name, drawer) {
6792
- if (!this.getShape(name)) {
6793
- shapes.set(name, drawer);
6900
+ addShapeGenerator(name, generator) {
6901
+ if (!this.getShapeGenerator(name)) {
6902
+ shapeGeneratorss.set(name, generator);
6794
6903
  }
6795
6904
  }
6796
- getShape(name) {
6797
- return shapes.get(name);
6905
+ getShapeGenerator(name) {
6906
+ return shapeGeneratorss.get(name);
6798
6907
  }
6799
- getSupportedShapes() {
6800
- return shapes.keys();
6908
+ getSupportedShapeGenerators() {
6909
+ return shapeGeneratorss.keys();
6801
6910
  }
6802
6911
  }
6803
6912
 
6804
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.1/node_modules/@tsparticles/plugin-emitters/browser/Shapes/Square/SquareShape.js
6805
-
6806
- function randomSquareCoordinate(position, offset) {
6807
- return position + offset * (getRandom() - 0.5);
6808
- }
6809
- class SquareShape {
6810
- randomPosition(position, size, fill) {
6811
- if (fill) {
6812
- return {
6813
- x: randomSquareCoordinate(position.x, size.width),
6814
- y: randomSquareCoordinate(position.y, size.height),
6815
- };
6816
- }
6817
- else {
6818
- const halfW = size.width / 2, halfH = size.height / 2, side = Math.floor(getRandom() * 4), v = (getRandom() - 0.5) * 2;
6819
- switch (side) {
6820
- case 0:
6821
- return {
6822
- x: position.x + v * halfW,
6823
- y: position.y - halfH,
6824
- };
6825
- case 1:
6826
- return {
6827
- x: position.x - halfW,
6828
- y: position.y + v * halfH,
6829
- };
6830
- case 2:
6831
- return {
6832
- x: position.x + v * halfW,
6833
- y: position.y + halfH,
6834
- };
6835
- case 3:
6836
- default:
6837
- return {
6838
- x: position.x + halfW,
6839
- y: position.y + v * halfH,
6840
- };
6841
- }
6842
- }
6843
- }
6844
- }
6845
-
6846
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.1/node_modules/@tsparticles/plugin-emitters/browser/index.js
6847
-
6848
-
6913
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+plugin-emitters@3.0.0-beta.4/node_modules/@tsparticles/plugin-emitters/browser/index.js
6849
6914
 
6850
6915
 
6851
6916
 
@@ -6940,21 +7005,22 @@ async function loadEmittersPlugin(engine, refresh = true) {
6940
7005
  if (!engine.emitterShapeManager) {
6941
7006
  engine.emitterShapeManager = new ShapeManager(engine);
6942
7007
  }
6943
- if (!engine.addEmitterShape) {
6944
- engine.addEmitterShape = (name, shape) => {
6945
- engine.emitterShapeManager?.addShape(name, shape);
7008
+ if (!engine.addEmitterShapeGenerator) {
7009
+ engine.addEmitterShapeGenerator = (name, generator) => {
7010
+ engine.emitterShapeManager?.addShapeGenerator(name, generator);
6946
7011
  };
6947
7012
  }
6948
7013
  const plugin = new EmittersPlugin(engine);
6949
7014
  await engine.addPlugin(plugin, refresh);
6950
- engine.addEmitterShape("circle", new CircleShape());
6951
- engine.addEmitterShape("square", new SquareShape());
6952
7015
  }
6953
7016
 
6954
7017
 
6955
7018
 
6956
7019
 
6957
7020
 
7021
+
7022
+
7023
+
6958
7024
  ;// CONCATENATED MODULE: ./dist/browser/options.js
6959
7025
  const options = {
6960
7026
  fpsLimit: 120,