@tsparticles/interaction-external-particle 4.0.0-alpha.8 → 4.0.0-beta.1

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
- * v4.0.0-alpha.8
7
+ * v4.0.0-beta.1
8
8
  */
9
9
  /*
10
10
  * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
@@ -28,16 +28,6 @@ return /******/ (() => { // webpackBootstrap
28
28
  /******/ "use strict";
29
29
  /******/ var __webpack_modules__ = ({
30
30
 
31
- /***/ "./dist/browser/index.js"
32
- /*!*******************************!*\
33
- !*** ./dist/browser/index.js ***!
34
- \*******************************/
35
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
36
-
37
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadExternalParticleInteraction: () => (/* binding */ loadExternalParticleInteraction)\n/* harmony export */ });\nasync function loadExternalParticleInteraction(engine) {\n engine.checkVersion(\"4.0.0-alpha.8\");\n await engine.register(async e => {\n const {\n loadInteractivityPlugin\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-interactivity */ \"@tsparticles/plugin-interactivity\", 19));\n await loadInteractivityPlugin(e);\n e.addInteractor?.(\"externalParticle\", async container => {\n const {\n InteractivityParticleMaker\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_InteractivityParticleMaker_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./InteractivityParticleMaker.js */ \"./dist/browser/InteractivityParticleMaker.js\"));\n return new InteractivityParticleMaker(container);\n });\n });\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-external-particle/./dist/browser/index.js?\n}");
38
-
39
- /***/ },
40
-
41
31
  /***/ "@tsparticles/engine"
42
32
  /*!*********************************************************************************************************************************!*\
43
33
  !*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
@@ -56,6 +46,16 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
56
46
 
57
47
  module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
58
48
 
49
+ /***/ },
50
+
51
+ /***/ "./dist/browser/index.js"
52
+ /*!*******************************!*\
53
+ !*** ./dist/browser/index.js ***!
54
+ \*******************************/
55
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
56
+
57
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadExternalParticleInteraction: () => (/* binding */ loadExternalParticleInteraction)\n/* harmony export */ });\nasync function loadExternalParticleInteraction(engine) {\n engine.checkVersion(\"4.0.0-beta.1\");\n await engine.pluginManager.register(async (e)=>{\n const { ensureInteractivityPluginLoaded } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-interactivity */ \"@tsparticles/plugin-interactivity\", 19));\n ensureInteractivityPluginLoaded(e);\n e.pluginManager.addInteractor?.(\"externalParticle\", async (container)=>{\n const { InteractivityParticleMaker } = await __webpack_require__.e(/*! import() */ \"dist_browser_InteractivityParticleMaker_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./InteractivityParticleMaker.js */ \"./dist/browser/InteractivityParticleMaker.js\"));\n return new InteractivityParticleMaker(container);\n });\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/interaction-external-particle/./dist/browser/index.js?\n}");
58
+
59
59
  /***/ }
60
60
 
61
61
  /******/ });
@@ -70,12 +70,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
70
70
  /******/ if (cachedModule !== undefined) {
71
71
  /******/ return cachedModule.exports;
72
72
  /******/ }
73
- /******/ // Check if module exists (development only)
74
- /******/ if (__webpack_modules__[moduleId] === undefined) {
75
- /******/ var e = new Error("Cannot find module '" + moduleId + "'");
76
- /******/ e.code = 'MODULE_NOT_FOUND';
77
- /******/ throw e;
78
- /******/ }
79
73
  /******/ // Create a new module (and put it into the cache)
80
74
  /******/ var module = __webpack_module_cache__[moduleId] = {
81
75
  /******/ // no module.id needed
@@ -84,6 +78,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
84
78
  /******/ };
85
79
  /******/
86
80
  /******/ // Execute the module function
81
+ /******/ if (!(moduleId in __webpack_modules__)) {
82
+ /******/ delete __webpack_module_cache__[moduleId];
83
+ /******/ var e = new Error("Cannot find module '" + moduleId + "'");
84
+ /******/ e.code = 'MODULE_NOT_FOUND';
85
+ /******/ throw e;
86
+ /******/ }
87
87
  /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
88
88
  /******/
89
89
  /******/ // Return the exports of the module
@@ -158,6 +158,18 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
158
158
  /******/ };
159
159
  /******/ })();
160
160
  /******/
161
+ /******/ /* webpack/runtime/global */
162
+ /******/ (() => {
163
+ /******/ __webpack_require__.g = (function() {
164
+ /******/ if (typeof globalThis === 'object') return globalThis;
165
+ /******/ try {
166
+ /******/ return this || new Function('return this')();
167
+ /******/ } catch (e) {
168
+ /******/ if (typeof window === 'object') return window;
169
+ /******/ }
170
+ /******/ })();
171
+ /******/ })();
172
+ /******/
161
173
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
162
174
  /******/ (() => {
163
175
  /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
@@ -222,8 +234,8 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
222
234
  /******/ /* webpack/runtime/publicPath */
223
235
  /******/ (() => {
224
236
  /******/ var scriptUrl;
225
- /******/ if (globalThis.importScripts) scriptUrl = globalThis.location + "";
226
- /******/ var document = globalThis.document;
237
+ /******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
238
+ /******/ var document = __webpack_require__.g.document;
227
239
  /******/ if (!scriptUrl && document) {
228
240
  /******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
229
241
  /******/ scriptUrl = document.currentScript.src;
@@ -1,2 +1,2 @@
1
- /*! For license information please see tsparticles.interaction.external.particle.min.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/plugin-interactivity"),require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/plugin-interactivity","@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/plugin-interactivity"),require("@tsparticles/engine")):t(e.window,e.window);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(this,((e,t)=>(()=>{var r,i,n,o,a={303(e){e.exports=t},702(t){t.exports=e}},c={};function l(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}};return a[e](r,r.exports,l),r.exports}l.m=a,i=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var n=Object.create(null);l.r(n);var o={};r=r||[null,i({}),i([]),i(i)];for(var a=2&t&&e;("object"==typeof a||"function"==typeof a)&&!~r.indexOf(a);a=i(a))Object.getOwnPropertyNames(a).forEach((t=>o[t]=()=>e[t]));return o.default=()=>e,l.d(n,o),n},l.d=(e,t)=>{for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce(((t,r)=>(l.f[r](e,t),t)),[])),l.u=e=>e+".min.js",l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},o="@tsparticles/interaction-external-particle:",l.l=(e,t,r,i)=>{if(n[e])n[e].push(t);else{var a,c;if(void 0!==r)for(var s=document.getElementsByTagName("script"),p=0;p<s.length;p++){var u=s[p];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==o+r){a=u;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",l.nc&&a.setAttribute("nonce",l.nc),a.setAttribute("data-webpack",o+r),a.src=e),n[e]=[t];var f=(t,r)=>{a.onerror=a.onload=null,clearTimeout(d);var i=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((e=>e(r))),t)return t(r)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),c&&document.head.appendChild(a)}},l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=r[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l.p=e})(),(()=>{var e={464:0};l.f.j=(t,r)=>{var i=l.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var n=new Promise(((r,n)=>i=e[t]=[r,n]));r.push(i[2]=n);var o=l.p+l.u(t),a=new Error;l.l(o,(r=>{if(l.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var n=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+n+": "+o+")",a.name="ChunkLoadError",a.type=n,a.request=o,i[1](a)}}),"chunk-"+t,t)}};var t=(t,r)=>{var i,n,[o,a,c]=r,s=0;if(o.some((t=>0!==e[t]))){for(i in a)l.o(a,i)&&(l.m[i]=a[i]);if(c)c(l)}for(t&&t(r);s<o.length;s++)n=o[s],l.o(e,n)&&e[n]&&e[n][0](),e[n]=0},r=this.webpackChunk_tsparticles_interaction_external_particle=this.webpackChunk_tsparticles_interaction_external_particle||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var s={};async function p(e){e.checkVersion("4.0.0-alpha.8"),await e.register((async e=>{const{loadInteractivityPlugin:t}=await Promise.resolve().then(l.t.bind(l,702,19));await t(e),e.addInteractor?.("externalParticle",(async e=>{const{InteractivityParticleMaker:t}=await l.e(623).then(l.bind(l,623));return new t(e)}))}))}return l.r(s),l.d(s,{loadExternalParticleInteraction:()=>p}),s})()));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/plugin-interactivity"),require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/plugin-interactivity","@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/plugin-interactivity"),require("@tsparticles/engine")):t(e.window,e.window);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(this,(e,t)=>(()=>{"use strict";var r,i,n,o={303(e){e.exports=t},702(t){t.exports=e}},a={};function c(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return o[e](r,r.exports,c),r.exports}c.m=o,s=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);c.r(r);var i={};l=l||[null,s({}),s([]),s(s)];for(var n=2&t&&e;("object"==typeof n||"function"==typeof n)&&!~l.indexOf(n);n=s(n))Object.getOwnPropertyNames(n).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,c.d(r,i),r},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce((t,r)=>(c.f[r](e,t),t),[])),c.u=e=>""+e+".min.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),p={},c.l=(e,t,r,i)=>{if(p[e])return void p[e].push(t);if(void 0!==r)for(var n,o,a=document.getElementsByTagName("script"),l=0;l<a.length;l++){var s=a[l];if(s.getAttribute("src")==e||s.getAttribute("data-webpack")=="@tsparticles/interaction-external-particle:"+r){n=s;break}}n||(o=!0,(n=document.createElement("script")).charset="utf-8",c.nc&&n.setAttribute("nonce",c.nc),n.setAttribute("data-webpack","@tsparticles/interaction-external-particle:"+r),n.src=e),p[e]=[t];var u=(t,r)=>{n.onerror=n.onload=null,clearTimeout(f);var i=p[e];if(delete p[e],n.parentNode&&n.parentNode.removeChild(n),i&&i.forEach(e=>e(r)),t)return t(r)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=u.bind(null,n.onerror),n.onload=u.bind(null,n.onload),o&&document.head.appendChild(n)},c.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.g.importScripts&&(u=c.g.location+"");var l,s,p,u,f=c.g.document;if(!u&&f&&(f.currentScript&&"SCRIPT"===f.currentScript.tagName.toUpperCase()&&(u=f.currentScript.src),!u)){var d=f.getElementsByTagName("script");if(d.length)for(var b=d.length-1;b>-1&&(!u||!/^http(s?):/.test(u));)u=d[b--].src}if(!u)throw Error("Automatic publicPath is not supported in this browser");c.p=u=u.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r={464:0},c.f.j=(e,t)=>{var i=c.o(r,e)?r[e]:void 0;if(0!==i)if(i)t.push(i[2]);else{var n=new Promise((t,n)=>i=r[e]=[t,n]);t.push(i[2]=n);var o=c.p+c.u(e),a=Error();c.l(o,t=>{if(c.o(r,e)&&(0!==(i=r[e])&&(r[e]=void 0),i)){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;a.message="Loading chunk "+e+` failed.
2
+ (`+n+": "+o+")",a.name="ChunkLoadError",a.type=n,a.request=o,i[1](a)}},"chunk-"+e,e)}},i=(e,t)=>{var i,n,[o,a,l]=t,s=0;if(o.some(e=>0!==r[e])){for(i in a)c.o(a,i)&&(c.m[i]=a[i]);l&&l(c)}for(e&&e(t);s<o.length;s++)n=o[s],c.o(r,n)&&r[n]&&r[n][0](),r[n]=0},(n=this.webpackChunk_tsparticles_interaction_external_particle=this.webpackChunk_tsparticles_interaction_external_particle||[]).forEach(i.bind(null,0)),n.push=i.bind(null,n.push.bind(n));var g={};async function h(e){e.checkVersion("4.0.0-beta.1"),await e.pluginManager.register(async e=>{let{ensureInteractivityPluginLoaded:t}=await Promise.resolve().then(c.t.bind(c,702,19));t(e),e.pluginManager.addInteractor?.("externalParticle",async e=>{let{InteractivityParticleMaker:t}=await c.e(887).then(c.bind(c,887));return new t(e)})})}return c.r(g),c.d(g,{loadExternalParticleInteraction:()=>h}),g})());
@@ -2,6 +2,7 @@ import { ExternalInteractorBase, type IInteractivityData, type IModes, type Inte
2
2
  import { type RecursivePartial } from "@tsparticles/engine";
3
3
  import type { IParticleMode, InteractivityParticleContainer, ParticleMode } from "./Types.js";
4
4
  export declare class InteractivityParticleMaker extends ExternalInteractorBase<InteractivityParticleContainer> {
5
+ readonly maxDistance = 0;
5
6
  private _clearTimeout?;
6
7
  private _lastPosition?;
7
8
  private _particle?;
@@ -15,6 +15,10 @@
15
15
  const InteractivityParticleOptions_js_1 = require("./Options/Classes/InteractivityParticleOptions.js");
16
16
  const particleMode = "particle";
17
17
  class InteractivityParticleMaker extends plugin_interactivity_1.ExternalInteractorBase {
18
+ maxDistance = 0;
19
+ _clearTimeout;
20
+ _lastPosition;
21
+ _particle;
18
22
  constructor(container) {
19
23
  super(container);
20
24
  }
@@ -55,7 +59,7 @@
55
59
  if (interactivityParticleOptions.replaceCursor) {
56
60
  const element = interactivityData.element;
57
61
  if (element) {
58
- if (element instanceof Window) {
62
+ if (element instanceof Window || element instanceof Document) {
59
63
  (0, engine_1.safeDocument)().body.style.cursor = "";
60
64
  }
61
65
  else {
@@ -63,7 +67,7 @@
63
67
  }
64
68
  }
65
69
  }
66
- this.container.particles.remove(this._particle, undefined, true);
70
+ this._particle.destroy(true);
67
71
  delete this._particle;
68
72
  }, clearDelay);
69
73
  return;
@@ -82,7 +86,7 @@
82
86
  if (interactivityParticleOptions.replaceCursor) {
83
87
  const element = interactivityData.element;
84
88
  if (element) {
85
- if (element instanceof Window) {
89
+ if (element instanceof Window || element instanceof Document) {
86
90
  (0, engine_1.safeDocument)().body.style.cursor = "none";
87
91
  }
88
92
  else {
@@ -12,6 +12,10 @@
12
12
  exports.InteractivityParticleOptions = void 0;
13
13
  const engine_1 = require("@tsparticles/engine");
14
14
  class InteractivityParticleOptions {
15
+ options;
16
+ pauseOnStop;
17
+ replaceCursor;
18
+ stopDelay;
15
19
  constructor() {
16
20
  this.replaceCursor = false;
17
21
  this.pauseOnStop = false;
package/umd/index.js CHANGED
@@ -45,11 +45,11 @@ var __importStar = (this && this.__importStar) || (function () {
45
45
  Object.defineProperty(exports, "__esModule", { value: true });
46
46
  exports.loadExternalParticleInteraction = loadExternalParticleInteraction;
47
47
  async function loadExternalParticleInteraction(engine) {
48
- engine.checkVersion("4.0.0-alpha.8");
49
- await engine.register(async (e) => {
50
- const { loadInteractivityPlugin } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-interactivity"))) : new Promise((resolve_1, reject_1) => { require(["@tsparticles/plugin-interactivity"], resolve_1, reject_1); }).then(__importStar));
51
- await loadInteractivityPlugin(e);
52
- e.addInteractor?.("externalParticle", async (container) => {
48
+ engine.checkVersion("4.0.0-beta.1");
49
+ await engine.pluginManager.register(async (e) => {
50
+ const { ensureInteractivityPluginLoaded } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-interactivity"))) : new Promise((resolve_1, reject_1) => { require(["@tsparticles/plugin-interactivity"], resolve_1, reject_1); }).then(__importStar));
51
+ ensureInteractivityPluginLoaded(e);
52
+ e.pluginManager.addInteractor?.("externalParticle", async (container) => {
53
53
  const { InteractivityParticleMaker } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./InteractivityParticleMaker.js"))) : new Promise((resolve_2, reject_2) => { require(["./InteractivityParticleMaker.js"], resolve_2, reject_2); }).then(__importStar));
54
54
  return new InteractivityParticleMaker(container);
55
55
  });
package/623.min.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 623.min.js.LICENSE.txt */
2
- (this.webpackChunk_tsparticles_interaction_external_particle=this.webpackChunk_tsparticles_interaction_external_particle||[]).push([[623],{623(t,i,e){e.d(i,{InteractivityParticleMaker:()=>a});var s=e(702),o=e(303);class n{constructor(){this.replaceCursor=!1,this.pauseOnStop=!1,this.stopDelay=0}load(t){(0,o.isNull)(t)||(void 0!==t.options&&(this.options=(0,o.deepExtend)({},t.options)),void 0!==t.replaceCursor&&(this.replaceCursor=t.replaceCursor),void 0!==t.pauseOnStop&&(this.pauseOnStop=t.pauseOnStop),void 0!==t.stopDelay&&(this.stopDelay=t.stopDelay))}}const r="particle";class a extends s.ExternalInteractorBase{constructor(t){super(t)}clear(){}init(){}interact(t){const i=this.container,e=i.actualOptions;if(!i.retina.reduceFactor)return;const s=t.mouse.position,n=e.interactivity?.modes.particle;if(!n)return;const r=n.pauseOnStop&&(t.mouse.position===this._lastPosition||t.mouse.position?.x===this._lastPosition?.x&&t.mouse.position?.y===this._lastPosition?.y),a=n.stopDelay;if(s?this._lastPosition={...s}:delete this._lastPosition,this._lastPosition)if(r){if(this._clearTimeout)return;this._clearTimeout=setTimeout((()=>{if(this._particle){if(n.replaceCursor){const i=t.element;i&&(i instanceof Window?(0,o.safeDocument)().body.style.cursor="":i.style.cursor="")}this.container.particles.remove(this._particle,void 0,!0),delete this._particle}}),a)}else{if(this._clearTimeout&&(clearTimeout(this._clearTimeout),delete this._clearTimeout),!this._particle){const e=(0,o.deepExtend)(n.options,{move:{enable:!1}});if(this._particle=i.particles.addParticle(this._lastPosition,e),n.replaceCursor){const i=t.element;i&&(i instanceof Window?(0,o.safeDocument)().body.style.cursor="none":i.style.cursor="none")}}this._particle&&(this._particle.position.x=this._lastPosition.x,this._particle.position.y=this._lastPosition.y)}}isEnabled(t,i){const e=this.container.actualOptions,s=t.mouse,n=(i?.interactivity??e.interactivity)?.events;return!!n&&(s.clicking&&s.inside&&!!s.position&&(0,o.isInArray)(r,n.onClick.mode)||s.inside&&!!s.position&&(0,o.isInArray)(r,n.onHover.mode))}loadModeOptions(t,...i){t.particle??=new n;for(const e of i)t.particle.load(e?.particle)}reset(){}}}}]);
@@ -1 +0,0 @@
1
- /*! tsParticles Particle External Interaction v4.0.0-alpha.8 by Matteo Bruni */
@@ -1 +0,0 @@
1
- /*! tsParticles Particle External Interaction v4.0.0-alpha.8 by Matteo Bruni */