tsparticles 2.2.0 → 2.2.3

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
- * v2.2.0
7
+ * v2.2.3
8
8
  */
9
9
  (function webpackUniversalModuleDefinition(root, factory) {
10
10
  if(typeof exports === 'object' && typeof module === 'object')
@@ -3144,13 +3144,13 @@ function alterHsl(color, type, value) {
3144
3144
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Core/Utils/Constants.js
3145
3145
  const generatedAttribute = "generated";
3146
3146
  const touchEndEvent = "touchend";
3147
- const mouseDownEvent = "mousedown";
3148
- const mouseUpEvent = "mouseup";
3149
- const mouseMoveEvent = "mousemove";
3147
+ const mouseDownEvent = "pointerdown";
3148
+ const mouseUpEvent = "pointerup";
3149
+ const mouseMoveEvent = "pointermove";
3150
3150
  const touchStartEvent = "touchstart";
3151
3151
  const touchMoveEvent = "touchmove";
3152
- const mouseLeaveEvent = "mouseleave";
3153
- const mouseOutEvent = "mouseout";
3152
+ const mouseLeaveEvent = "pointerleave";
3153
+ const mouseOutEvent = "pointerout";
3154
3154
  const touchCancelEvent = "touchcancel";
3155
3155
  const resizeEvent = "resize";
3156
3156
  const visibilityChangeEvent = "visibilitychange";
@@ -3943,7 +3943,7 @@ class EventListeners {
3943
3943
  let pos;
3944
3944
  const canvas = container.canvas.element;
3945
3945
 
3946
- if (e.type.startsWith("mouse")) {
3946
+ if (e.type.startsWith("pointer")) {
3947
3947
  this.canPush = true;
3948
3948
  const mouseEvent = e;
3949
3949
 
@@ -8353,7 +8353,7 @@ class Container {
8353
8353
  }
8354
8354
 
8355
8355
  intersectionManager(entries) {
8356
- if (!this.actualOptions.pauseOnOutsideViewport) {
8356
+ if (!guardCheck(this) || !this.actualOptions.pauseOnOutsideViewport) {
8357
8357
  return;
8358
8358
  }
8359
8359
 
@@ -10892,6 +10892,8 @@ _TrailMaker_container = new WeakMap();
10892
10892
  async function loadExternalTrailInteraction(engine) {
10893
10893
  await engine.addInteractor("externalTrail", container => new TrailMaker(container));
10894
10894
  }
10895
+
10896
+
10895
10897
  // EXTERNAL MODULE: ../../plugins/polygonMask/dist/esm/pathseg.js
10896
10898
  var pathseg = __webpack_require__(939);
10897
10899
  ;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/esm/Options/Classes/PolygonMaskDrawStroke.js
@@ -12711,6 +12713,8 @@ _Attractor_container = new WeakMap();
12711
12713
  async function loadExternalAttractInteraction(engine) {
12712
12714
  await engine.addInteractor("externalAttract", container => new Attractor(container));
12713
12715
  }
12716
+
12717
+
12714
12718
  ;// CONCATENATED MODULE: ../../interactions/external/bounce/dist/esm/Options/Classes/Bounce.js
12715
12719
  class Bounce {
12716
12720
  constructor() {
@@ -12869,6 +12873,8 @@ _Bouncer_container = new WeakMap();
12869
12873
  async function loadExternalBounceInteraction(engine) {
12870
12874
  await engine.addInteractor("externalBounce", container => new Bouncer(container));
12871
12875
  }
12876
+
12877
+
12872
12878
  ;// CONCATENATED MODULE: ../../interactions/external/bubble/dist/esm/Options/Classes/BubbleBase.js
12873
12879
 
12874
12880
  class BubbleBase {
@@ -13401,6 +13407,12 @@ _Bubbler_container = new WeakMap();
13401
13407
  async function loadExternalBubbleInteraction(engine) {
13402
13408
  await engine.addInteractor("externalBubble", container => new Bubbler(container));
13403
13409
  }
13410
+
13411
+
13412
+
13413
+
13414
+
13415
+
13404
13416
  ;// CONCATENATED MODULE: ../../interactions/external/connect/dist/esm/Options/Classes/ConnectLinks.js
13405
13417
  class ConnectLinks {
13406
13418
  constructor() {
@@ -13563,7 +13575,7 @@ class Connector extends ExternalInteractorBase {
13563
13575
  const container = Connector_classPrivateFieldGet(this, _Connector_container, "f"),
13564
13576
  options = container.actualOptions;
13565
13577
 
13566
- if (options.interactivity.events.onHover.enable && container.interactivity.status === "mousemove") {
13578
+ if (options.interactivity.events.onHover.enable && container.interactivity.status === "pointermove") {
13567
13579
  const mousePos = container.interactivity.mouse.position;
13568
13580
 
13569
13581
  if (!container.retina.connectModeDistance || container.retina.connectModeDistance < 0 || !container.retina.connectModeRadius || container.retina.connectModeRadius < 0 || !mousePos) {
@@ -13626,6 +13638,10 @@ _Connector_container = new WeakMap();
13626
13638
  async function loadExternalConnectInteraction(engine) {
13627
13639
  await engine.addInteractor("externalConnect", container => new Connector(container));
13628
13640
  }
13641
+
13642
+
13643
+
13644
+
13629
13645
  ;// CONCATENATED MODULE: ../../interactions/external/grab/dist/esm/Options/Classes/GrabLinks.js
13630
13646
 
13631
13647
  class GrabLinks {
@@ -13841,6 +13857,10 @@ _Grabber_container = new WeakMap();
13841
13857
  async function loadExternalGrabInteraction(engine) {
13842
13858
  await engine.addInteractor("externalGrab", container => new Grabber(container));
13843
13859
  }
13860
+
13861
+
13862
+
13863
+
13844
13864
  ;// CONCATENATED MODULE: ../../interactions/external/pause/dist/esm/Pauser.js
13845
13865
 
13846
13866
  class Pauser extends ExternalInteractorBase {
@@ -14004,6 +14024,8 @@ _Pusher_container = new WeakMap();
14004
14024
  async function loadExternalPushInteraction(engine) {
14005
14025
  await engine.addInteractor("externalPush", container => new Pusher(container));
14006
14026
  }
14027
+
14028
+
14007
14029
  ;// CONCATENATED MODULE: ../../interactions/external/remove/dist/esm/Options/Classes/Remove.js
14008
14030
  class Remove {
14009
14031
  constructor() {
@@ -14101,6 +14123,8 @@ _Remover_container = new WeakMap();
14101
14123
  function loadExternalRemoveInteraction(engine) {
14102
14124
  engine.addInteractor("externalRemove", container => new Remover(container));
14103
14125
  }
14126
+
14127
+
14104
14128
  ;// CONCATENATED MODULE: ../../interactions/external/repulse/dist/esm/Options/Classes/RepulseBase.js
14105
14129
  class RepulseBase {
14106
14130
  constructor() {
@@ -14489,6 +14513,12 @@ _Repulser_container = new WeakMap();
14489
14513
  async function loadExternalRepulseInteraction(engine) {
14490
14514
  await engine.addInteractor("externalRepulse", container => new Repulser(container));
14491
14515
  }
14516
+
14517
+
14518
+
14519
+
14520
+
14521
+
14492
14522
  ;// CONCATENATED MODULE: ../../shapes/image/dist/esm/Utils.js
14493
14523
 
14494
14524
  const currentColorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;
@@ -16348,6 +16378,12 @@ async function loadParticlesLinksInteraction(engine) {
16348
16378
  await loadInteraction(engine);
16349
16379
  await loadPlugin(engine);
16350
16380
  }
16381
+
16382
+
16383
+
16384
+
16385
+
16386
+
16351
16387
  ;// CONCATENATED MODULE: ../../shapes/polygon/dist/esm/PolygonDrawerBase.js
16352
16388
  class PolygonDrawerBase {
16353
16389
  draw(context, particle, radius) {