@tsparticles/plugin-infection 3.2.2 → 3.3.0

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.
@@ -1,2 +1,2 @@
1
- /*! For license information please see 431.min.js.LICENSE.txt */
2
- (this.webpackChunk_tsparticles_plugin_infection=this.webpackChunk_tsparticles_plugin_infection||[]).push([[431],{431:(i,t,e)=>{e.d(t,{InfectionPlugin:()=>a});var n=e(533);class s{constructor(){this.color=new n.OptionsColor,this.color.value="#ff0000",this.radius=0,this.rate=1}load(i){void 0!==i&&(void 0!==i.color&&(this.color=n.OptionsColor.create(this.color,i.color)),this.duration=i.duration,this.infectedStage=i.infectedStage,void 0!==i.radius&&(this.radius=i.radius),void 0!==i.rate&&(this.rate=i.rate))}}class o{constructor(){this.cure=!1,this.delay=0,this.enable=!1,this.infections=0,this.stages=[]}load(i){void 0!==i&&(void 0!==i.cure&&(this.cure=i.cure),void 0!==i.delay&&(this.delay=i.delay),void 0!==i.enable&&(this.enable=i.enable),void 0!==i.infections&&(this.infections=i.infections),void 0!==i.stages&&(this.stages=i.stages.map((i=>{const t=new s;return t.load(i),t}))))}}class a{constructor(){this.id="infection"}async getPlugin(i){const{InfectionInstance:t}=await e.e(733).then(e.bind(e,733));return new t(i)}loadOptions(i,t){if(!this.needsPlugin(i)&&!this.needsPlugin(t))return;let e=i.infection;void 0===e?.load&&(i.infection=e=new o),e.load(t?.infection)}needsPlugin(i){return i?.infection?.enable??!1}}}}]);
1
+ /*! For license information please see 459.min.js.LICENSE.txt */
2
+ (this.webpackChunk_tsparticles_plugin_infection=this.webpackChunk_tsparticles_plugin_infection||[]).push([[459],{459:(i,t,e)=>{e.d(t,{InfectionPlugin:()=>a});var n=e(303);class s{constructor(){this.color=new n.OptionsColor,this.color.value="#ff0000",this.radius=0,this.rate=1}load(i){void 0!==i&&(void 0!==i.color&&(this.color=n.OptionsColor.create(this.color,i.color)),this.duration=i.duration,this.infectedStage=i.infectedStage,void 0!==i.radius&&(this.radius=i.radius),void 0!==i.rate&&(this.rate=i.rate))}}class o{constructor(){this.cure=!1,this.delay=0,this.enable=!1,this.infections=0,this.stages=[]}load(i){void 0!==i&&(void 0!==i.cure&&(this.cure=i.cure),void 0!==i.delay&&(this.delay=i.delay),void 0!==i.enable&&(this.enable=i.enable),void 0!==i.infections&&(this.infections=i.infections),void 0!==i.stages&&(this.stages=i.stages.map((i=>{const t=new s;return t.load(i),t}))))}}class a{constructor(){this.id="infection"}async getPlugin(i){const{InfectionInstance:t}=await e.e(931).then(e.bind(e,931));return new t(i)}loadOptions(i,t){if(!this.needsPlugin(i)&&!this.needsPlugin(t))return;let e=i.infection;void 0===e?.load&&(i.infection=e=new o),e.load(t?.infection)}needsPlugin(i){return i?.infection?.enable??!1}}}}]);
@@ -0,0 +1 @@
1
+ /*! tsParticles Infection Plugin v3.3.0 by Matteo Bruni */
package/892.min.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 892.min.js.LICENSE.txt */
2
+ (this.webpackChunk_tsparticles_plugin_infection=this.webpackChunk_tsparticles_plugin_infection||[]).push([[892],{892:(e,t,n)=>{n.d(t,{ParticlesInfecter:()=>a});var i=n(303);class a extends i.ParticlesInteractorBase{constructor(e){super(e)}clear(){}init(){}interact(e,t){const n=this.container.infecter;if(!n)return;if(n.updateInfection(e,t.value),void 0===e.infection?.stage)return;const a=this.container,s=a.actualOptions.infection;if(!s?.enable||s.stages.length<1)return;const c=s.stages[e.infection.stage],o=a.retina.pixelRatio,r=2*e.getRadius()+c.radius*o,f=e.getPosition(),g=c.infectedStage??e.infection.stage,l=a.particles.quadTree.queryCircle(f,r),u=c.rate,d=l.length;for(const t of l){const a=t;if(!(a===e||a.destroyed||a.spawning||void 0!==a.infection?.stage&&a.infection.stage===e.infection.stage||(0,i.getRandom)()>=u/d))if(void 0===a.infection?.stage)n.startInfection(a,g);else if(a.infection.stage<e.infection.stage)n.updateInfectionStage(a,g);else if(a.infection.stage>e.infection.stage){const t=s.stages[a.infection.stage],i=t?.infectedStage??a.infection.stage;n.updateInfectionStage(e,i)}}}isEnabled(){return this.container.actualOptions?.infection?.enable??!1}reset(){}}}}]);
@@ -0,0 +1 @@
1
+ /*! tsParticles Infection Plugin v3.3.0 by Matteo Bruni */
@@ -1,2 +1,2 @@
1
- /*! For license information please see 733.min.js.LICENSE.txt */
2
- (this.webpackChunk_tsparticles_plugin_infection=this.webpackChunk_tsparticles_plugin_infection||[]).push([[733],{733:(t,e,i)=>{i.d(e,{InfectionInstance:()=>s});var n=i(533);class o{constructor(t){this._nextInfectionStage=t=>{const e=this._container.actualOptions.infection,{infection:i}=t;if(!e||!i)return;const n=e.stages.length;n<=0||void 0===i.stage||(i.time=0,n<=++i.stage&&(e.cure?(delete i.stage,delete i.time):(i.stage=0,i.time=0)))},this._container=t}startInfection(t,e){const i=this._container.actualOptions.infection,{infection:n}=t;if(!i||!n)return;e>i.stages.length||e<0||(n.delay=0,n.delayStage=e)}updateInfection(t,e){const i=this._container.actualOptions.infection,{infection:o}=t;if(!i||!o)return;const s=i.stages,a=s.length;if(void 0!==o.delay&&void 0!==o.delayStage){const t=o.delayStage;if(t>a||t<0)return;o.delay>=i.delay*n.millisecondsToSeconds?(o.stage=t,o.time=0,delete o.delay,delete o.delayStage):o.delay+=e}else delete o.delay,delete o.delayStage;if(void 0!==o.stage&&void 0!==o.time){const i=s[o.stage];void 0!==i.duration&&i.duration>=0&&o.time>i.duration*n.millisecondsToSeconds?this._nextInfectionStage(t):o.time+=e}else delete o.stage,delete o.time}updateInfectionStage(t,e){const i=this._container.actualOptions,{infection:n}=t;if(!i.infection||!n)return;e>i.infection.stages.length||e<0||void 0!==n.stage&&n.stage>e||(n.stage=e,n.time=0)}}class s{constructor(t){this._container=t,this._container.infecter=new o(this._container)}particleFillColor(t){const e=this._container.actualOptions;if(!t.infection||!e.infection)return;const i=t.infection.stage,n=e.infection.stages;return void 0!==i?n[i].color:void 0}particleStrokeColor(t){return this.particleFillColor(t)}particlesSetup(){const t=this._container.actualOptions;if(t.infection)for(let e=0;e<t.infection.infections;e++){const t=this._container.particles.filter((t=>{const e=t;return e.infection||(e.infection={}),void 0===e.infection.stage})),e=(0,n.itemFromArray)(t);this._container.infecter?.startInfection(e,0)}}}}}]);
1
+ /*! For license information please see 931.min.js.LICENSE.txt */
2
+ (this.webpackChunk_tsparticles_plugin_infection=this.webpackChunk_tsparticles_plugin_infection||[]).push([[931],{931:(t,e,i)=>{i.d(e,{InfectionInstance:()=>s});var n=i(303);class o{constructor(t){this._nextInfectionStage=t=>{const e=this._container.actualOptions.infection,{infection:i}=t;if(!e||!i)return;const n=e.stages.length;n<=0||void 0===i.stage||(i.time=0,n<=++i.stage&&(e.cure?(delete i.stage,delete i.time):(i.stage=0,i.time=0)))},this._container=t}startInfection(t,e){const i=this._container.actualOptions.infection,{infection:n}=t;if(!i||!n)return;e>i.stages.length||e<0||(n.delay=0,n.delayStage=e)}updateInfection(t,e){const i=this._container.actualOptions.infection,{infection:o}=t;if(!i||!o)return;const s=i.stages,a=s.length;if(void 0!==o.delay&&void 0!==o.delayStage){const t=o.delayStage;if(t>a||t<0)return;o.delay>=i.delay*n.millisecondsToSeconds?(o.stage=t,o.time=0,delete o.delay,delete o.delayStage):o.delay+=e}else delete o.delay,delete o.delayStage;if(void 0!==o.stage&&void 0!==o.time){const i=s[o.stage];void 0!==i.duration&&i.duration>=0&&o.time>i.duration*n.millisecondsToSeconds?this._nextInfectionStage(t):o.time+=e}else delete o.stage,delete o.time}updateInfectionStage(t,e){const i=this._container.actualOptions,{infection:n}=t;if(!i.infection||!n)return;e>i.infection.stages.length||e<0||void 0!==n.stage&&n.stage>e||(n.stage=e,n.time=0)}}class s{constructor(t){this._container=t,this._container.infecter=new o(this._container)}particleFillColor(t){const e=this._container.actualOptions;if(!t.infection||!e.infection)return;const i=t.infection.stage,n=e.infection.stages;return void 0!==i?n[i].color:void 0}particleStrokeColor(t){return this.particleFillColor(t)}particlesSetup(){const t=this._container.actualOptions;if(t.infection)for(let e=0;e<t.infection.infections;e++){const t=this._container.particles.filter((t=>{const e=t;return e.infection||(e.infection={}),void 0===e.infection.stage})),e=(0,n.itemFromArray)(t);this._container.infecter?.startInfection(e,0)}}}}}]);
@@ -0,0 +1 @@
1
+ /*! tsParticles Infection Plugin v3.3.0 by Matteo Bruni */
@@ -8,7 +8,7 @@ export class ParticlesInfecter extends ParticlesInteractorBase {
8
8
  }
9
9
  init() {
10
10
  }
11
- async interact(p1, delta) {
11
+ interact(p1, delta) {
12
12
  const infecter = this.container.infecter;
13
13
  if (!infecter) {
14
14
  return;
@@ -43,7 +43,6 @@ export class ParticlesInfecter extends ParticlesInteractorBase {
43
43
  infecter.updateInfectionStage(p1, infectedStage2);
44
44
  }
45
45
  }
46
- await Promise.resolve();
47
46
  }
48
47
  isEnabled() {
49
48
  return this.container.actualOptions?.infection?.enable ?? false;
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.InfectionPlugin = void 0;
27
4
  const Infection_js_1 = require("./Options/Classes/Infection.js");
@@ -30,7 +7,7 @@ class InfectionPlugin {
30
7
  this.id = "infection";
31
8
  }
32
9
  async getPlugin(container) {
33
- const { InfectionInstance } = await Promise.resolve().then(() => __importStar(require("./InfectionInstance.js")));
10
+ const { InfectionInstance } = await import("./InfectionInstance.js");
34
11
  return new InfectionInstance(container);
35
12
  }
36
13
  loadOptions(options, source) {
@@ -11,7 +11,7 @@ class ParticlesInfecter extends engine_1.ParticlesInteractorBase {
11
11
  }
12
12
  init() {
13
13
  }
14
- async interact(p1, delta) {
14
+ interact(p1, delta) {
15
15
  const infecter = this.container.infecter;
16
16
  if (!infecter) {
17
17
  return;
@@ -46,7 +46,6 @@ class ParticlesInfecter extends engine_1.ParticlesInteractorBase {
46
46
  infecter.updateInfectionStage(p1, infectedStage2);
47
47
  }
48
48
  }
49
- await Promise.resolve();
50
49
  }
51
50
  isEnabled() {
52
51
  return this.container.actualOptions?.infection?.enable ?? false;
package/cjs/index.js CHANGED
@@ -10,28 +10,16 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
10
10
  if (k2 === undefined) k2 = k;
11
11
  o[k2] = m[k];
12
12
  }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
15
  };
28
16
  Object.defineProperty(exports, "__esModule", { value: true });
29
17
  exports.loadInfectionPlugin = void 0;
30
18
  async function loadInfectionPlugin(engine, refresh = true) {
31
- const { InfectionPlugin } = await Promise.resolve().then(() => __importStar(require("./InfectionPlugin.js"))), plugin = new InfectionPlugin();
19
+ const { InfectionPlugin } = await import("./InfectionPlugin.js"), plugin = new InfectionPlugin();
32
20
  await engine.addPlugin(plugin, refresh);
33
21
  await engine.addInteractor("particlesInfection", async (container) => {
34
- const { ParticlesInfecter } = await Promise.resolve().then(() => __importStar(require("./ParticlesInfecter.js")));
22
+ const { ParticlesInfecter } = await import("./ParticlesInfecter.js");
35
23
  return new ParticlesInfecter(container);
36
24
  }, refresh);
37
25
  }
@@ -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.2.2
7
+ * v3.3.0
8
8
  */
9
9
  "use strict";
10
10
  /*
@@ -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.2.2
7
+ * v3.3.0
8
8
  */
9
9
  "use strict";
10
10
  /*
@@ -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.2.2
7
+ * v3.3.0
8
8
  */
9
9
  "use strict";
10
10
  /*
@@ -23,7 +23,7 @@
23
23
  \*******************************************/
24
24
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25
25
 
26
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ParticlesInfecter: () => (/* binding */ ParticlesInfecter)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nconst minStagesCount = 1,\n double = 2;\nclass ParticlesInfecter extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticlesInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {}\n init() {}\n async interact(p1, delta) {\n const infecter = this.container.infecter;\n if (!infecter) {\n return;\n }\n infecter.updateInfection(p1, delta.value);\n if (p1.infection?.stage === undefined) {\n return;\n }\n const container = this.container,\n options = container.actualOptions,\n infectionOptions = options.infection;\n if (!infectionOptions?.enable || infectionOptions.stages.length < minStagesCount) {\n return;\n }\n const infectionStage1 = infectionOptions.stages[p1.infection.stage],\n pxRatio = container.retina.pixelRatio,\n radius = p1.getRadius() * double + infectionStage1.radius * pxRatio,\n pos = p1.getPosition(),\n infectedStage1 = infectionStage1.infectedStage ?? p1.infection.stage,\n query = container.particles.quadTree.queryCircle(pos, radius),\n infections = infectionStage1.rate,\n neighbors = query.length;\n for (const p2 of query) {\n const infP2 = p2;\n if (infP2 === p1 || infP2.destroyed || infP2.spawning || !(infP2.infection?.stage === undefined || infP2.infection.stage !== p1.infection.stage) || (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() >= infections / neighbors) {\n continue;\n }\n if (infP2.infection?.stage === undefined) {\n infecter.startInfection(infP2, infectedStage1);\n } else if (infP2.infection.stage < p1.infection.stage) {\n infecter.updateInfectionStage(infP2, infectedStage1);\n } else if (infP2.infection.stage > p1.infection.stage) {\n const infectionStage2 = infectionOptions.stages[infP2.infection.stage];\n const infectedStage2 = infectionStage2?.infectedStage ?? infP2.infection.stage;\n infecter.updateInfectionStage(p1, infectedStage2);\n }\n }\n await Promise.resolve();\n }\n isEnabled() {\n return this.container.actualOptions?.infection?.enable ?? false;\n }\n reset() {}\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-infection/./dist/browser/ParticlesInfecter.js?");
26
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ParticlesInfecter: () => (/* binding */ ParticlesInfecter)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nconst minStagesCount = 1,\n double = 2;\nclass ParticlesInfecter extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticlesInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {}\n init() {}\n interact(p1, delta) {\n const infecter = this.container.infecter;\n if (!infecter) {\n return;\n }\n infecter.updateInfection(p1, delta.value);\n if (p1.infection?.stage === undefined) {\n return;\n }\n const container = this.container,\n options = container.actualOptions,\n infectionOptions = options.infection;\n if (!infectionOptions?.enable || infectionOptions.stages.length < minStagesCount) {\n return;\n }\n const infectionStage1 = infectionOptions.stages[p1.infection.stage],\n pxRatio = container.retina.pixelRatio,\n radius = p1.getRadius() * double + infectionStage1.radius * pxRatio,\n pos = p1.getPosition(),\n infectedStage1 = infectionStage1.infectedStage ?? p1.infection.stage,\n query = container.particles.quadTree.queryCircle(pos, radius),\n infections = infectionStage1.rate,\n neighbors = query.length;\n for (const p2 of query) {\n const infP2 = p2;\n if (infP2 === p1 || infP2.destroyed || infP2.spawning || !(infP2.infection?.stage === undefined || infP2.infection.stage !== p1.infection.stage) || (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() >= infections / neighbors) {\n continue;\n }\n if (infP2.infection?.stage === undefined) {\n infecter.startInfection(infP2, infectedStage1);\n } else if (infP2.infection.stage < p1.infection.stage) {\n infecter.updateInfectionStage(infP2, infectedStage1);\n } else if (infP2.infection.stage > p1.infection.stage) {\n const infectionStage2 = infectionOptions.stages[infP2.infection.stage];\n const infectedStage2 = infectionStage2?.infectedStage ?? infP2.infection.stage;\n infecter.updateInfectionStage(p1, infectedStage2);\n }\n }\n }\n isEnabled() {\n return this.container.actualOptions?.infection?.enable ?? false;\n }\n reset() {}\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-infection/./dist/browser/ParticlesInfecter.js?");
27
27
 
28
28
  /***/ })
29
29
 
@@ -8,7 +8,7 @@ export class ParticlesInfecter extends ParticlesInteractorBase {
8
8
  }
9
9
  init() {
10
10
  }
11
- async interact(p1, delta) {
11
+ interact(p1, delta) {
12
12
  const infecter = this.container.infecter;
13
13
  if (!infecter) {
14
14
  return;
@@ -43,7 +43,6 @@ export class ParticlesInfecter extends ParticlesInteractorBase {
43
43
  infecter.updateInfectionStage(p1, infectedStage2);
44
44
  }
45
45
  }
46
- await Promise.resolve();
47
46
  }
48
47
  isEnabled() {
49
48
  return this.container.actualOptions?.infection?.enable ?? false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/plugin-infection",
3
- "version": "3.2.2",
3
+ "version": "3.3.0",
4
4
  "description": "tsParticles infection plugin",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -100,7 +100,7 @@
100
100
  "./package.json": "./package.json"
101
101
  },
102
102
  "dependencies": {
103
- "@tsparticles/engine": "^3.2.2"
103
+ "@tsparticles/engine": "^3.3.0"
104
104
  },
105
105
  "publishConfig": {
106
106
  "access": "public"
package/report.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8"/>
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
6
- <title>@tsparticles/plugin-infection [20 Feb 2024 at 01:36]</title>
6
+ <title>@tsparticles/plugin-infection [27 Feb 2024 at 12:18]</title>
7
7
  <link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX9zdNgag5w7rRqA44Lzw0hr1WqES36dFliSJFlh2rXIae3FFcDDgKdxrUIDePr8jGcSClV1u7A9xeN0ModY/pHMxmR1EzRh8TJiwqsHmKW0l4FCEZI+jHio+JdPPE9qwQtTRxku2D8sIeRL2LnxWSllANCQGOIiqVHAz2ye2JR0DcH+HoxDkaADLjgxjKQ+AwCX/g0+DNgdG0ukYCONAe+dbc2IAc6fwt1ARoDSezNHxV2Cmzwv3O6lDMV55edBGwGK9n1+x2F8EDfAGCxug8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII=" type="image/x-icon" />
8
8
 
9
9
  <script>
@@ -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.2.2
7
+ * v3.3.0
8
8
  */
9
9
  /*
10
10
  * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
@@ -210,7 +210,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
210
210
  /******/ var scripts = document.getElementsByTagName("script");
211
211
  /******/ if(scripts.length) {
212
212
  /******/ var i = scripts.length - 1;
213
- /******/ while (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;
213
+ /******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
214
214
  /******/ }
215
215
  /******/ }
216
216
  /******/ }
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.plugin.infection.min.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(e=>(()=>{var t,r,n={533:t=>{t.exports=e}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.m=n,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>e+".min.js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="@tsparticles/plugin-infection:",i.l=(e,n,o,a)=>{if(t[e])t[e].push(n);else{var c,s;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var p=l[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==r+o){c=p;break}}c||(s=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.setAttribute("data-webpack",r+o),c.src=e),t[e]=[n];var d=(r,n)=>{c.onerror=c.onload=null,clearTimeout(f);var o=t[e];if(delete t[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(n))),r)return r(n)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=d.bind(null,c.onerror),c.onload=d.bind(null,c.onload),s&&document.head.appendChild(c)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&!e;)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={564:0};i.f.j=(t,r)=>{var n=i.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=o);var a=i.p+i.u(t),c=new Error;i.l(a,(r=>{if(i.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",c.name="ChunkLoadError",c.type=o,c.request=a,n[1](c)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,o,a=r[0],c=r[1],s=r[2],l=0;if(a.some((t=>0!==e[t]))){for(n in c)i.o(c,n)&&(i.m[n]=c[n]);if(s)s(i)}for(t&&t(r);l<a.length;l++)o=a[l],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=this.webpackChunk_tsparticles_plugin_infection=this.webpackChunk_tsparticles_plugin_infection||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a={};return(()=>{async function e(e,t=!0){const{InfectionPlugin:r}=await i.e(431).then(i.bind(i,431)),n=new r;await e.addPlugin(n,t),await e.addInteractor("particlesInfection",(async e=>{const{ParticlesInfecter:t}=await i.e(854).then(i.bind(i,854));return new t(e)}),t)}i.r(a),i.d(a,{loadInfectionPlugin:()=>e})})(),a})()));
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(e=>(()=>{var t,r,n={303:t=>{t.exports=e}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.m=n,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>e+".min.js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="@tsparticles/plugin-infection:",i.l=(e,n,o,a)=>{if(t[e])t[e].push(n);else{var c,s;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var p=l[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==r+o){c=p;break}}c||(s=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.setAttribute("data-webpack",r+o),c.src=e),t[e]=[n];var d=(r,n)=>{c.onerror=c.onload=null,clearTimeout(f);var o=t[e];if(delete t[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(n))),r)return r(n)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=d.bind(null,c.onerror),c.onload=d.bind(null,c.onload),s&&document.head.appendChild(c)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={587:0};i.f.j=(t,r)=>{var n=i.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=o);var a=i.p+i.u(t),c=new Error;i.l(a,(r=>{if(i.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",c.name="ChunkLoadError",c.type=o,c.request=a,n[1](c)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,o,a=r[0],c=r[1],s=r[2],l=0;if(a.some((t=>0!==e[t]))){for(n in c)i.o(c,n)&&(i.m[n]=c[n]);if(s)s(i)}for(t&&t(r);l<a.length;l++)o=a[l],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=this.webpackChunk_tsparticles_plugin_infection=this.webpackChunk_tsparticles_plugin_infection||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a={};return(()=>{async function e(e,t=!0){const{InfectionPlugin:r}=await i.e(459).then(i.bind(i,459)),n=new r;await e.addPlugin(n,t),await e.addInteractor("particlesInfection",(async e=>{const{ParticlesInfecter:t}=await i.e(892).then(i.bind(i,892));return new t(e)}),t)}i.r(a),i.d(a,{loadInfectionPlugin:()=>e})})(),a})()));
@@ -1 +1 @@
1
- /*! tsParticles Infection Plugin v3.2.2 by Matteo Bruni */
1
+ /*! tsParticles Infection Plugin v3.3.0 by Matteo Bruni */
@@ -4,7 +4,7 @@ export declare class ParticlesInfecter extends ParticlesInteractorBase<Infectabl
4
4
  constructor(container: InfectableContainer);
5
5
  clear(): void;
6
6
  init(): void;
7
- interact(p1: InfectableParticle, delta: IDelta): Promise<void>;
7
+ interact(p1: InfectableParticle, delta: IDelta): void;
8
8
  isEnabled(): boolean;
9
9
  reset(): void;
10
10
  }
@@ -20,7 +20,7 @@
20
20
  }
21
21
  init() {
22
22
  }
23
- async interact(p1, delta) {
23
+ interact(p1, delta) {
24
24
  const infecter = this.container.infecter;
25
25
  if (!infecter) {
26
26
  return;
@@ -55,7 +55,6 @@
55
55
  infecter.updateInfectionStage(p1, infectedStage2);
56
56
  }
57
57
  }
58
- await Promise.resolve();
59
58
  }
60
59
  isEnabled() {
61
60
  return this.container.actualOptions?.infection?.enable ?? false;
@@ -1 +0,0 @@
1
- /*! tsParticles Infection Plugin v3.2.2 by Matteo Bruni */
@@ -1 +0,0 @@
1
- /*! tsParticles Infection Plugin v3.2.2 by Matteo Bruni */
package/854.min.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 854.min.js.LICENSE.txt */
2
- (this.webpackChunk_tsparticles_plugin_infection=this.webpackChunk_tsparticles_plugin_infection||[]).push([[854],{854:(e,t,n)=>{n.d(t,{ParticlesInfecter:()=>a});var i=n(533);class a extends i.ParticlesInteractorBase{constructor(e){super(e)}clear(){}init(){}async interact(e,t){const n=this.container.infecter;if(!n)return;if(n.updateInfection(e,t.value),void 0===e.infection?.stage)return;const a=this.container,s=a.actualOptions.infection;if(!s?.enable||s.stages.length<1)return;const c=s.stages[e.infection.stage],o=a.retina.pixelRatio,r=2*e.getRadius()+c.radius*o,f=e.getPosition(),g=c.infectedStage??e.infection.stage,l=a.particles.quadTree.queryCircle(f,r),u=c.rate,d=l.length;for(const t of l){const a=t;if(!(a===e||a.destroyed||a.spawning||void 0!==a.infection?.stage&&a.infection.stage===e.infection.stage||(0,i.getRandom)()>=u/d))if(void 0===a.infection?.stage)n.startInfection(a,g);else if(a.infection.stage<e.infection.stage)n.updateInfectionStage(a,g);else if(a.infection.stage>e.infection.stage){const t=s.stages[a.infection.stage],i=t?.infectedStage??a.infection.stage;n.updateInfectionStage(e,i)}}await Promise.resolve()}isEnabled(){return this.container.actualOptions?.infection?.enable??!1}reset(){}}}}]);
@@ -1 +0,0 @@
1
- /*! tsParticles Infection Plugin v3.2.2 by Matteo Bruni */