tsparticles 2.2.1 → 2.2.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
- * v2.2.1
7
+ * v2.2.4
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
 
@@ -7804,7 +7804,7 @@ var _Container_engine, _Container_eventListeners, _Container_intersectionObserve
7804
7804
 
7805
7805
 
7806
7806
  function guardCheck(container) {
7807
- return !container.destroyed;
7807
+ return container !== undefined && !container.destroyed;
7808
7808
  }
7809
7809
 
7810
7810
  function loadContainerOptions(engine, container, ...sourceOptionsArr) {
@@ -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
 
@@ -13575,7 +13575,7 @@ class Connector extends ExternalInteractorBase {
13575
13575
  const container = Connector_classPrivateFieldGet(this, _Connector_container, "f"),
13576
13576
  options = container.actualOptions;
13577
13577
 
13578
- if (options.interactivity.events.onHover.enable && container.interactivity.status === "mousemove") {
13578
+ if (options.interactivity.events.onHover.enable && container.interactivity.status === "pointermove") {
13579
13579
  const mousePos = container.interactivity.mouse.position;
13580
13580
 
13581
13581
  if (!container.retina.connectModeDistance || container.retina.connectModeDistance < 0 || !container.retina.connectModeRadius || container.retina.connectModeRadius < 0 || !mousePos) {