@tsparticles/updater-out-modes 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.
- package/128.min.js +2 -0
- package/128.min.js.LICENSE.txt +1 -0
- package/browser/BounceOutMode.js +4 -3
- package/browser/DestroyOutMode.js +1 -2
- package/browser/NoneOutMode.js +1 -2
- package/browser/OutOfCanvasUpdater.js +12 -12
- package/browser/OutOutMode.js +1 -2
- package/cjs/BounceOutMode.js +6 -28
- package/cjs/DestroyOutMode.js +1 -2
- package/cjs/NoneOutMode.js +1 -2
- package/cjs/OutOfCanvasUpdater.js +16 -39
- package/cjs/OutOutMode.js +1 -2
- package/cjs/index.js +1 -24
- package/dist_browser_OutOfCanvasUpdater_js.js +52 -2
- package/esm/BounceOutMode.js +4 -3
- package/esm/DestroyOutMode.js +1 -2
- package/esm/NoneOutMode.js +1 -2
- package/esm/OutOfCanvasUpdater.js +12 -12
- package/esm/OutOutMode.js +1 -2
- package/package.json +2 -2
- package/report.html +1 -1
- package/tsparticles.updater.out-modes.js +2 -2
- package/tsparticles.updater.out-modes.min.js +1 -1
- package/tsparticles.updater.out-modes.min.js.LICENSE.txt +1 -1
- package/types/BounceOutMode.d.ts +1 -1
- package/types/DestroyOutMode.d.ts +1 -1
- package/types/IOutModeManager.d.ts +1 -1
- package/types/NoneOutMode.d.ts +1 -1
- package/types/OutOfCanvasUpdater.d.ts +2 -2
- package/types/OutOutMode.d.ts +1 -1
- package/umd/BounceOutMode.js +7 -30
- package/umd/DestroyOutMode.js +1 -2
- package/umd/NoneOutMode.js +1 -2
- package/umd/OutOfCanvasUpdater.js +17 -41
- package/umd/OutOutMode.js +1 -2
- package/103.min.js +0 -2
- package/103.min.js.LICENSE.txt +0 -1
- package/388.min.js +0 -2
- package/388.min.js.LICENSE.txt +0 -1
- package/53.min.js +0 -2
- package/53.min.js.LICENSE.txt +0 -1
- package/569.min.js +0 -2
- package/569.min.js.LICENSE.txt +0 -1
- package/886.min.js +0 -2
- package/886.min.js.LICENSE.txt +0 -1
- package/920.min.js +0 -2
- package/920.min.js.LICENSE.txt +0 -1
- package/dist_browser_BounceOutMode_js.js +0 -30
- package/dist_browser_DestroyOutMode_js.js +0 -30
- package/dist_browser_NoneOutMode_js.js +0 -30
- package/dist_browser_OutOutMode_js.js +0 -30
- package/dist_browser_Utils_js.js +0 -30
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { BounceOutMode } from "./BounceOutMode.js";
|
|
2
|
+
import { DestroyOutMode } from "./DestroyOutMode.js";
|
|
3
|
+
import { NoneOutMode } from "./NoneOutMode.js";
|
|
4
|
+
import { OutOutMode } from "./OutOutMode.js";
|
|
1
5
|
const checkOutMode = (outModes, outMode) => {
|
|
2
6
|
return (outModes.default === outMode ||
|
|
3
7
|
outModes.bottom === outMode ||
|
|
@@ -7,42 +11,38 @@ const checkOutMode = (outModes, outMode) => {
|
|
|
7
11
|
};
|
|
8
12
|
export class OutOfCanvasUpdater {
|
|
9
13
|
constructor(container) {
|
|
10
|
-
this._updateOutMode =
|
|
14
|
+
this._updateOutMode = (particle, delta, outMode, direction) => {
|
|
11
15
|
for (const updater of this.updaters) {
|
|
12
|
-
|
|
16
|
+
updater.update(particle, direction, delta, outMode);
|
|
13
17
|
}
|
|
14
18
|
};
|
|
15
19
|
this.container = container;
|
|
16
20
|
this.updaters = [];
|
|
17
21
|
}
|
|
18
|
-
|
|
22
|
+
init(particle) {
|
|
19
23
|
this.updaters = [];
|
|
20
24
|
const outModes = particle.options.move.outModes;
|
|
21
25
|
if (checkOutMode(outModes, "bounce")) {
|
|
22
|
-
const { BounceOutMode } = await import("./BounceOutMode.js");
|
|
23
26
|
this.updaters.push(new BounceOutMode(this.container));
|
|
24
27
|
}
|
|
25
28
|
else if (checkOutMode(outModes, "out")) {
|
|
26
|
-
const { OutOutMode } = await import("./OutOutMode.js");
|
|
27
29
|
this.updaters.push(new OutOutMode(this.container));
|
|
28
30
|
}
|
|
29
31
|
else if (checkOutMode(outModes, "destroy")) {
|
|
30
|
-
const { DestroyOutMode } = await import("./DestroyOutMode.js");
|
|
31
32
|
this.updaters.push(new DestroyOutMode(this.container));
|
|
32
33
|
}
|
|
33
34
|
else if (checkOutMode(outModes, "none")) {
|
|
34
|
-
const { NoneOutMode } = await import("./NoneOutMode.js");
|
|
35
35
|
this.updaters.push(new NoneOutMode(this.container));
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
isEnabled(particle) {
|
|
39
39
|
return !particle.destroyed && !particle.spawning;
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
update(particle, delta) {
|
|
42
42
|
const outModes = particle.options.move.outModes;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
this._updateOutMode(particle, delta, outModes.bottom ?? outModes.default, "bottom");
|
|
44
|
+
this._updateOutMode(particle, delta, outModes.left ?? outModes.default, "left");
|
|
45
|
+
this._updateOutMode(particle, delta, outModes.right ?? outModes.default, "right");
|
|
46
|
+
this._updateOutMode(particle, delta, outModes.top ?? outModes.default, "top");
|
|
47
47
|
}
|
|
48
48
|
}
|
package/esm/OutOutMode.js
CHANGED
|
@@ -5,7 +5,7 @@ export class OutOutMode {
|
|
|
5
5
|
this.container = container;
|
|
6
6
|
this.modes = ["out"];
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
update(particle, direction, delta, outMode) {
|
|
9
9
|
if (!this.modes.includes(outMode)) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
@@ -107,6 +107,5 @@ export class OutOutMode {
|
|
|
107
107
|
break;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
await Promise.resolve();
|
|
111
110
|
}
|
|
112
111
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/updater-out-modes",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "tsParticles particles out modes updater",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"./package.json": "./package.json"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@tsparticles/engine": "^3.
|
|
90
|
+
"@tsparticles/engine": "^3.3.0"
|
|
91
91
|
},
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"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/updater-out-modes [
|
|
6
|
+
<title>@tsparticles/updater-out-modes [27 Feb 2024 at 12:22]</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.
|
|
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.updater.out-modes.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 o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,(e=>(()=>{var t,r,o={
|
|
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 o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,(e=>(()=>{var t,r,o={303:t=>{t.exports=e}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return o[e](r,r.exports,i),r.exports}i.m=o,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/updater-out-modes:",i.l=(e,o,n,a)=>{if(t[e])t[e].push(o);else{var s,u;if(void 0!==n)for(var p=document.getElementsByTagName("script"),c=0;c<p.length;c++){var d=p[c];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+n){s=d;break}}s||(u=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",r+n),s.src=e),t[e]=[o];var l=(r,o)=>{s.onerror=s.onload=null,clearTimeout(f);var n=t[e];if(delete t[e],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach((e=>e(o))),r)return r(o)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=l.bind(null,s.onerror),s.onload=l.bind(null,s.onload),u&&document.head.appendChild(s)}},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 o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={427:0};i.f.j=(t,r)=>{var o=i.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=n);var a=i.p+i.u(t),s=new Error;i.l(a,(r=>{if(i.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+n+": "+a+")",s.name="ChunkLoadError",s.type=n,s.request=a,o[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,n,a=r[0],s=r[1],u=r[2],p=0;if(a.some((t=>0!==e[t]))){for(o in s)i.o(s,o)&&(i.m[o]=s[o]);if(u)u(i)}for(t&&t(r);p<a.length;p++)n=a[p],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0},r=this.webpackChunk_tsparticles_updater_out_modes=this.webpackChunk_tsparticles_updater_out_modes||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a={};return(()=>{async function e(e,t=!0){await e.addParticleUpdater("outModes",(async e=>{const{OutOfCanvasUpdater:t}=await i.e(128).then(i.bind(i,128));return new t(e)}),t)}i.r(a),i.d(a,{loadOutModesUpdater:()=>e})})(),a})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Out Modes Updater v3.
|
|
1
|
+
/*! tsParticles Out Modes Updater v3.3.0 by Matteo Bruni */
|
package/types/BounceOutMode.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export declare class BounceOutMode implements IOutModeManager {
|
|
|
4
4
|
private readonly container;
|
|
5
5
|
modes: (OutMode | keyof typeof OutMode)[];
|
|
6
6
|
constructor(container: Container);
|
|
7
|
-
update(particle: Particle, direction: OutModeDirection, delta: IDelta, outMode: OutMode | keyof typeof OutMode):
|
|
7
|
+
update(particle: Particle, direction: OutModeDirection, delta: IDelta, outMode: OutMode | keyof typeof OutMode): void;
|
|
8
8
|
}
|
|
@@ -4,5 +4,5 @@ export declare class DestroyOutMode implements IOutModeManager {
|
|
|
4
4
|
private readonly container;
|
|
5
5
|
modes: (OutMode | keyof typeof OutMode)[];
|
|
6
6
|
constructor(container: Container);
|
|
7
|
-
update(particle: Particle, direction: OutModeDirection, _delta: IDelta, outMode: OutMode | keyof typeof OutMode):
|
|
7
|
+
update(particle: Particle, direction: OutModeDirection, _delta: IDelta, outMode: OutMode | keyof typeof OutMode): void;
|
|
8
8
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IDelta, OutMode, OutModeDirection, Particle } from "@tsparticles/engine";
|
|
2
2
|
export interface IOutModeManager {
|
|
3
3
|
modes: (OutMode | keyof typeof OutMode)[];
|
|
4
|
-
update(particle: Particle, direction: OutModeDirection, delta: IDelta, outMode: OutMode | keyof typeof OutMode):
|
|
4
|
+
update(particle: Particle, direction: OutModeDirection, delta: IDelta, outMode: OutMode | keyof typeof OutMode): void;
|
|
5
5
|
}
|
package/types/NoneOutMode.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export declare class NoneOutMode implements IOutModeManager {
|
|
|
4
4
|
private readonly container;
|
|
5
5
|
modes: (OutMode | keyof typeof OutMode)[];
|
|
6
6
|
constructor(container: Container);
|
|
7
|
-
update(particle: Particle, direction: OutModeDirection, delta: IDelta, outMode: OutMode | keyof typeof OutMode):
|
|
7
|
+
update(particle: Particle, direction: OutModeDirection, delta: IDelta, outMode: OutMode | keyof typeof OutMode): void;
|
|
8
8
|
}
|
|
@@ -4,8 +4,8 @@ export declare class OutOfCanvasUpdater implements IParticleUpdater {
|
|
|
4
4
|
updaters: IOutModeManager[];
|
|
5
5
|
private readonly container;
|
|
6
6
|
constructor(container: Container);
|
|
7
|
-
init(particle: Particle):
|
|
7
|
+
init(particle: Particle): void;
|
|
8
8
|
isEnabled(particle: Particle): boolean;
|
|
9
|
-
update(particle: Particle, delta: IDelta):
|
|
9
|
+
update(particle: Particle, delta: IDelta): void;
|
|
10
10
|
private readonly _updateOutMode;
|
|
11
11
|
}
|
package/types/OutOutMode.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export declare class OutOutMode implements IOutModeManager {
|
|
|
4
4
|
private readonly container;
|
|
5
5
|
modes: (OutMode | keyof typeof OutMode)[];
|
|
6
6
|
constructor(container: Container);
|
|
7
|
-
update(particle: Particle, direction: OutModeDirection, delta: IDelta, outMode: OutMode | keyof typeof OutMode):
|
|
7
|
+
update(particle: Particle, direction: OutModeDirection, delta: IDelta, outMode: OutMode | keyof typeof OutMode): void;
|
|
8
8
|
}
|
package/umd/BounceOutMode.js
CHANGED
|
@@ -1,40 +1,17 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
-
}) : function(o, v) {
|
|
15
|
-
o["default"] = v;
|
|
16
|
-
});
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
1
|
(function (factory) {
|
|
25
2
|
if (typeof module === "object" && typeof module.exports === "object") {
|
|
26
3
|
var v = factory(require, exports);
|
|
27
4
|
if (v !== undefined) module.exports = v;
|
|
28
5
|
}
|
|
29
6
|
else if (typeof define === "function" && define.amd) {
|
|
30
|
-
define(["require", "exports", "@tsparticles/engine"], factory);
|
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./Utils.js"], factory);
|
|
31
8
|
}
|
|
32
9
|
})(function (require, exports) {
|
|
33
10
|
"use strict";
|
|
34
|
-
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
|
|
35
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
12
|
exports.BounceOutMode = void 0;
|
|
37
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
|
+
const Utils_js_1 = require("./Utils.js");
|
|
38
15
|
class BounceOutMode {
|
|
39
16
|
constructor(container) {
|
|
40
17
|
this.container = container;
|
|
@@ -43,7 +20,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
43
20
|
"split",
|
|
44
21
|
];
|
|
45
22
|
}
|
|
46
|
-
|
|
23
|
+
update(particle, direction, delta, outMode) {
|
|
47
24
|
if (!this.modes.includes(outMode)) {
|
|
48
25
|
return;
|
|
49
26
|
}
|
|
@@ -51,7 +28,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
51
28
|
let handled = false;
|
|
52
29
|
for (const [, plugin] of container.plugins) {
|
|
53
30
|
if (plugin.particleBounce !== undefined) {
|
|
54
|
-
handled =
|
|
31
|
+
handled = plugin.particleBounce(particle, delta, direction);
|
|
55
32
|
}
|
|
56
33
|
if (handled) {
|
|
57
34
|
break;
|
|
@@ -60,9 +37,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
60
37
|
if (handled) {
|
|
61
38
|
return;
|
|
62
39
|
}
|
|
63
|
-
const pos = particle.getPosition(), offset = particle.offset, size = particle.getRadius(), bounds = (0, engine_1.calculateBounds)(pos, size), canvasSize = container.canvas.size
|
|
64
|
-
bounceHorizontal({ particle, outMode, direction, bounds, canvasSize, offset, size });
|
|
65
|
-
bounceVertical({ particle, outMode, direction, bounds, canvasSize, offset, size });
|
|
40
|
+
const pos = particle.getPosition(), offset = particle.offset, size = particle.getRadius(), bounds = (0, engine_1.calculateBounds)(pos, size), canvasSize = container.canvas.size;
|
|
41
|
+
(0, Utils_js_1.bounceHorizontal)({ particle, outMode, direction, bounds, canvasSize, offset, size });
|
|
42
|
+
(0, Utils_js_1.bounceVertical)({ particle, outMode, direction, bounds, canvasSize, offset, size });
|
|
66
43
|
}
|
|
67
44
|
}
|
|
68
45
|
exports.BounceOutMode = BounceOutMode;
|
package/umd/DestroyOutMode.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
this.container = container;
|
|
18
18
|
this.modes = ["destroy"];
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
update(particle, direction, _delta, outMode) {
|
|
21
21
|
if (!this.modes.includes(outMode)) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
container.particles.remove(particle, undefined, true);
|
|
44
|
-
await Promise.resolve();
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
exports.DestroyOutMode = DestroyOutMode;
|
package/umd/NoneOutMode.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
this.container = container;
|
|
18
18
|
this.modes = ["none"];
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
update(particle, direction, delta, outMode) {
|
|
21
21
|
if (!this.modes.includes(outMode)) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
container.particles.remove(particle);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
await Promise.resolve();
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
exports.NoneOutMode = NoneOutMode;
|
|
@@ -1,39 +1,19 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
-
}) : function(o, v) {
|
|
15
|
-
o["default"] = v;
|
|
16
|
-
});
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
1
|
(function (factory) {
|
|
25
2
|
if (typeof module === "object" && typeof module.exports === "object") {
|
|
26
3
|
var v = factory(require, exports);
|
|
27
4
|
if (v !== undefined) module.exports = v;
|
|
28
5
|
}
|
|
29
6
|
else if (typeof define === "function" && define.amd) {
|
|
30
|
-
define(["require", "exports"], factory);
|
|
7
|
+
define(["require", "exports", "./BounceOutMode.js", "./DestroyOutMode.js", "./NoneOutMode.js", "./OutOutMode.js"], factory);
|
|
31
8
|
}
|
|
32
9
|
})(function (require, exports) {
|
|
33
10
|
"use strict";
|
|
34
|
-
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
|
|
35
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
12
|
exports.OutOfCanvasUpdater = void 0;
|
|
13
|
+
const BounceOutMode_js_1 = require("./BounceOutMode.js");
|
|
14
|
+
const DestroyOutMode_js_1 = require("./DestroyOutMode.js");
|
|
15
|
+
const NoneOutMode_js_1 = require("./NoneOutMode.js");
|
|
16
|
+
const OutOutMode_js_1 = require("./OutOutMode.js");
|
|
37
17
|
const checkOutMode = (outModes, outMode) => {
|
|
38
18
|
return (outModes.default === outMode ||
|
|
39
19
|
outModes.bottom === outMode ||
|
|
@@ -43,43 +23,39 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
43
23
|
};
|
|
44
24
|
class OutOfCanvasUpdater {
|
|
45
25
|
constructor(container) {
|
|
46
|
-
this._updateOutMode =
|
|
26
|
+
this._updateOutMode = (particle, delta, outMode, direction) => {
|
|
47
27
|
for (const updater of this.updaters) {
|
|
48
|
-
|
|
28
|
+
updater.update(particle, direction, delta, outMode);
|
|
49
29
|
}
|
|
50
30
|
};
|
|
51
31
|
this.container = container;
|
|
52
32
|
this.updaters = [];
|
|
53
33
|
}
|
|
54
|
-
|
|
34
|
+
init(particle) {
|
|
55
35
|
this.updaters = [];
|
|
56
36
|
const outModes = particle.options.move.outModes;
|
|
57
37
|
if (checkOutMode(outModes, "bounce")) {
|
|
58
|
-
|
|
59
|
-
this.updaters.push(new BounceOutMode(this.container));
|
|
38
|
+
this.updaters.push(new BounceOutMode_js_1.BounceOutMode(this.container));
|
|
60
39
|
}
|
|
61
40
|
else if (checkOutMode(outModes, "out")) {
|
|
62
|
-
|
|
63
|
-
this.updaters.push(new OutOutMode(this.container));
|
|
41
|
+
this.updaters.push(new OutOutMode_js_1.OutOutMode(this.container));
|
|
64
42
|
}
|
|
65
43
|
else if (checkOutMode(outModes, "destroy")) {
|
|
66
|
-
|
|
67
|
-
this.updaters.push(new DestroyOutMode(this.container));
|
|
44
|
+
this.updaters.push(new DestroyOutMode_js_1.DestroyOutMode(this.container));
|
|
68
45
|
}
|
|
69
46
|
else if (checkOutMode(outModes, "none")) {
|
|
70
|
-
|
|
71
|
-
this.updaters.push(new NoneOutMode(this.container));
|
|
47
|
+
this.updaters.push(new NoneOutMode_js_1.NoneOutMode(this.container));
|
|
72
48
|
}
|
|
73
49
|
}
|
|
74
50
|
isEnabled(particle) {
|
|
75
51
|
return !particle.destroyed && !particle.spawning;
|
|
76
52
|
}
|
|
77
|
-
|
|
53
|
+
update(particle, delta) {
|
|
78
54
|
const outModes = particle.options.move.outModes;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
55
|
+
this._updateOutMode(particle, delta, outModes.bottom ?? outModes.default, "bottom");
|
|
56
|
+
this._updateOutMode(particle, delta, outModes.left ?? outModes.default, "left");
|
|
57
|
+
this._updateOutMode(particle, delta, outModes.right ?? outModes.default, "right");
|
|
58
|
+
this._updateOutMode(particle, delta, outModes.top ?? outModes.default, "top");
|
|
83
59
|
}
|
|
84
60
|
}
|
|
85
61
|
exports.OutOfCanvasUpdater = OutOfCanvasUpdater;
|
package/umd/OutOutMode.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
this.container = container;
|
|
18
18
|
this.modes = ["out"];
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
update(particle, direction, delta, outMode) {
|
|
21
21
|
if (!this.modes.includes(outMode)) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
@@ -119,7 +119,6 @@
|
|
|
119
119
|
break;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
await Promise.resolve();
|
|
123
122
|
}
|
|
124
123
|
}
|
|
125
124
|
exports.OutOutMode = OutOutMode;
|
package/103.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 103.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_updater_out_modes=this.webpackChunk_tsparticles_updater_out_modes||[]).push([[103],{103:(t,i,o)=>{o.d(i,{bounceHorizontal:()=>s,bounceVertical:()=>r});var e=o(533);const n=0,c=0;function s(t){if("bounce"!==t.outMode&&"split"!==t.outMode||"left"!==t.direction&&"right"!==t.direction)return;t.bounds.right<c&&"left"===t.direction?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&"right"===t.direction&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const i=t.particle.velocity.x;let o=!1;if("right"===t.direction&&t.bounds.right>=t.canvasSize.width&&i>n||"left"===t.direction&&t.bounds.left<=c&&i<n){const i=(0,e.getRangeValue)(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-i,o=!0}if(!o)return;const s=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width&&"right"===t.direction?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=c&&"left"===t.direction&&(t.particle.position.x=s),"split"===t.outMode&&t.particle.destroy()}function r(t){if("bounce"!==t.outMode&&"split"!==t.outMode||"bottom"!==t.direction&&"top"!==t.direction)return;t.bounds.bottom<c&&"top"===t.direction?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&"bottom"===t.direction&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const i=t.particle.velocity.y;let o=!1;if("bottom"===t.direction&&t.bounds.bottom>=t.canvasSize.height&&i>n||"top"===t.direction&&t.bounds.top<=c&&i<n){const i=(0,e.getRangeValue)(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-i,o=!0}if(!o)return;const s=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height&&"bottom"===t.direction?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=c&&"top"===t.direction&&(t.particle.position.y=s),"split"===t.outMode&&t.particle.destroy()}}}]);
|
package/103.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Out Modes Updater v3.2.2 by Matteo Bruni */
|
package/388.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 388.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_updater_out_modes=this.webpackChunk_tsparticles_updater_out_modes||[]).push([[388],{388:(t,i,e)=>{e.d(i,{NoneOutMode:()=>s});var o=e(533);class s{constructor(t){this.container=t,this.modes=["none"]}async update(t,i,e,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&("left"===i||"right"===i))??(t.options.move.distance.vertical&&("top"===i||"bottom"===i)))return;const n=t.options.move.gravity,r=this.container,a=r.canvas.size,c=t.getRadius();if(n.enable){const e=t.position;(!n.inverse&&e.y>a.height+c&&"bottom"===i||n.inverse&&e.y<-c&&"top"===i)&&r.particles.remove(t)}else{if(t.velocity.y>0&&t.position.y<=a.height+c||t.velocity.y<0&&t.position.y>=-c||t.velocity.x>0&&t.position.x<=a.width+c||t.velocity.x<0&&t.position.x>=-c)return;(0,o.isPointInside)(t.position,r.canvas.size,o.Vector.origin,c,i)||r.particles.remove(t)}await Promise.resolve()}}}}]);
|
package/388.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Out Modes Updater v3.2.2 by Matteo Bruni */
|
package/53.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 53.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_updater_out_modes=this.webpackChunk_tsparticles_updater_out_modes||[]).push([[53],{53:(t,e,s)=>{s.d(e,{OutOfCanvasUpdater:()=>o});const a=(t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e;class o{constructor(t){this._updateOutMode=async(t,e,s,a)=>{for(const o of this.updaters)await o.update(t,a,e,s)},this.container=t,this.updaters=[]}async init(t){this.updaters=[];const e=t.options.move.outModes;if(a(e,"bounce")){const{BounceOutMode:t}=await s.e(569).then(s.bind(s,569));this.updaters.push(new t(this.container))}else if(a(e,"out")){const{OutOutMode:t}=await s.e(886).then(s.bind(s,886));this.updaters.push(new t(this.container))}else if(a(e,"destroy")){const{DestroyOutMode:t}=await s.e(920).then(s.bind(s,920));this.updaters.push(new t(this.container))}else if(a(e,"none")){const{NoneOutMode:t}=await s.e(388).then(s.bind(s,388));this.updaters.push(new t(this.container))}}isEnabled(t){return!t.destroyed&&!t.spawning}async update(t,e){const s=t.options.move.outModes;await this._updateOutMode(t,e,s.bottom??s.default,"bottom"),await this._updateOutMode(t,e,s.left??s.default,"left"),await this._updateOutMode(t,e,s.right??s.default,"right"),await this._updateOutMode(t,e,s.top??s.default,"top")}}}}]);
|
package/53.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Out Modes Updater v3.2.2 by Matteo Bruni */
|
package/569.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 569.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_updater_out_modes=this.webpackChunk_tsparticles_updater_out_modes||[]).push([[569],{569:(e,t,o)=>{o.d(t,{BounceOutMode:()=>i});var s=o(533);class i{constructor(e){this.container=e,this.modes=["bounce","split"]}async update(e,t,i,n){if(!this.modes.includes(n))return;const a=this.container;let c=!1;for(const[,o]of a.plugins)if(void 0!==o.particleBounce&&(c=await o.particleBounce(e,i,t)),c)break;if(c)return;const u=e.getPosition(),r=e.offset,d=e.getRadius(),l=(0,s.calculateBounds)(u,d),p=a.canvas.size,{bounceHorizontal:f,bounceVertical:h}=await o.e(103).then(o.bind(o,103));f({particle:e,outMode:n,direction:t,bounds:l,canvasSize:p,offset:r,size:d}),h({particle:e,outMode:n,direction:t,bounds:l,canvasSize:p,offset:r,size:d})}}}}]);
|
package/569.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Out Modes Updater v3.2.2 by Matteo Bruni */
|
package/886.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 886.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_updater_out_modes=this.webpackChunk_tsparticles_updater_out_modes||[]).push([[886],{886:(t,i,o)=>{o.d(i,{OutOutMode:()=>n});var e=o(533);class n{constructor(t){this.container=t,this.modes=["out"]}async update(t,i,o,n){if(!this.modes.includes(n))return;const s=this.container;switch(t.outType){case"inside":{const{x:i,y:o}=t.velocity,n=e.Vector.origin;n.length=t.moveCenter.radius,n.angle=t.velocity.angle+Math.PI,n.addTo(e.Vector.create(t.moveCenter));const{dx:a,dy:r}=(0,e.getDistances)(t.position,n);if(i<=0&&a>=0||o<=0&&r>=0||i>=0&&a<=0||o>=0&&r<=0)return;t.position.x=Math.floor((0,e.randomInRange)({min:0,max:s.canvas.size.width})),t.position.y=Math.floor((0,e.randomInRange)({min:0,max:s.canvas.size.height}));const{dx:d,dy:c}=(0,e.getDistances)(t.position,t.moveCenter);t.direction=Math.atan2(-c,-d),t.velocity.angle=t.direction;break}default:if((0,e.isPointInside)(t.position,s.canvas.size,e.Vector.origin,t.getRadius(),i))return;switch(t.outType){case"outside":{t.position.x=Math.floor((0,e.randomInRange)({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor((0,e.randomInRange)({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:i,dy:o}=(0,e.getDistances)(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(o,i),t.velocity.angle=t.direction);break}case"normal":{const o=t.options.move.warp,n=s.canvas.size,a={bottom:n.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:n.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},r=t.getRadius(),d=(0,e.calculateBounds)(t.position,r);"right"===i&&d.left>n.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,o||(t.position.y=(0,e.getRandom)()*n.height,t.initialPosition.y=t.position.y)):"left"===i&&d.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,o||(t.position.y=(0,e.getRandom)()*n.height,t.initialPosition.y=t.position.y)),"bottom"===i&&d.top>n.height+t.offset.y?(o||(t.position.x=(0,e.getRandom)()*n.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y):"top"===i&&d.bottom<-t.offset.y&&(o||(t.position.x=(0,e.getRandom)()*n.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y);break}}}await Promise.resolve()}}}}]);
|
package/886.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Out Modes Updater v3.2.2 by Matteo Bruni */
|
package/920.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 920.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_updater_out_modes=this.webpackChunk_tsparticles_updater_out_modes||[]).push([[920],{920:(e,s,t)=>{t.d(s,{DestroyOutMode:()=>o});var i=t(533);class o{constructor(e){this.container=e,this.modes=["destroy"]}async update(e,s,t,o){if(!this.modes.includes(o))return;const r=this.container;switch(e.outType){case"normal":case"outside":if((0,i.isPointInside)(e.position,r.canvas.size,i.Vector.origin,e.getRadius(),s))return;break;case"inside":{const{dx:s,dy:t}=(0,i.getDistances)(e.position,e.moveCenter),{x:o,y:r}=e.velocity;if(o<0&&s>e.moveCenter.radius||r<0&&t>e.moveCenter.radius||o>=0&&s<-e.moveCenter.radius||r>=0&&t<-e.moveCenter.radius)return;break}}r.particles.remove(e,void 0,!0),await Promise.resolve()}}}}]);
|
package/920.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Out Modes Updater v3.2.2 by Matteo Bruni */
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Author : Matteo Bruni
|
|
3
|
-
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
-
* Demo / Generator : https://particles.js.org/
|
|
5
|
-
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
-
* How to use? : Check the GitHub README
|
|
7
|
-
* v3.2.2
|
|
8
|
-
*/
|
|
9
|
-
"use strict";
|
|
10
|
-
/*
|
|
11
|
-
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
-
* This devtool is neither made for production nor for readable output files.
|
|
13
|
-
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
-
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
-
* or disable the default devtool with "devtool: false".
|
|
16
|
-
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
-
*/
|
|
18
|
-
(this["webpackChunk_tsparticles_updater_out_modes"] = this["webpackChunk_tsparticles_updater_out_modes"] || []).push([["dist_browser_BounceOutMode_js"],{
|
|
19
|
-
|
|
20
|
-
/***/ "./dist/browser/BounceOutMode.js":
|
|
21
|
-
/*!***************************************!*\
|
|
22
|
-
!*** ./dist/browser/BounceOutMode.js ***!
|
|
23
|
-
\***************************************/
|
|
24
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25
|
-
|
|
26
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BounceOutMode: () => (/* binding */ BounceOutMode)\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\nclass BounceOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\"bounce\", \"split\"];\n }\n async update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n let handled = false;\n for (const [, plugin] of container.plugins) {\n if (plugin.particleBounce !== undefined) {\n handled = await plugin.particleBounce(particle, delta, direction);\n }\n if (handled) {\n break;\n }\n }\n if (handled) {\n return;\n }\n const pos = particle.getPosition(),\n offset = particle.offset,\n size = particle.getRadius(),\n bounds = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.calculateBounds)(pos, size),\n canvasSize = container.canvas.size,\n {\n bounceHorizontal,\n bounceVertical\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_Utils_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./Utils.js */ \"./dist/browser/Utils.js\"));\n bounceHorizontal({\n particle,\n outMode,\n direction,\n bounds,\n canvasSize,\n offset,\n size\n });\n bounceVertical({\n particle,\n outMode,\n direction,\n bounds,\n canvasSize,\n offset,\n size\n });\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-out-modes/./dist/browser/BounceOutMode.js?");
|
|
27
|
-
|
|
28
|
-
/***/ })
|
|
29
|
-
|
|
30
|
-
}]);
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Author : Matteo Bruni
|
|
3
|
-
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
-
* Demo / Generator : https://particles.js.org/
|
|
5
|
-
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
-
* How to use? : Check the GitHub README
|
|
7
|
-
* v3.2.2
|
|
8
|
-
*/
|
|
9
|
-
"use strict";
|
|
10
|
-
/*
|
|
11
|
-
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
-
* This devtool is neither made for production nor for readable output files.
|
|
13
|
-
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
-
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
-
* or disable the default devtool with "devtool: false".
|
|
16
|
-
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
-
*/
|
|
18
|
-
(this["webpackChunk_tsparticles_updater_out_modes"] = this["webpackChunk_tsparticles_updater_out_modes"] || []).push([["dist_browser_DestroyOutMode_js"],{
|
|
19
|
-
|
|
20
|
-
/***/ "./dist/browser/DestroyOutMode.js":
|
|
21
|
-
/*!****************************************!*\
|
|
22
|
-
!*** ./dist/browser/DestroyOutMode.js ***!
|
|
23
|
-
\****************************************/
|
|
24
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25
|
-
|
|
26
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DestroyOutMode: () => (/* binding */ DestroyOutMode)\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 minVelocity = 0;\nclass DestroyOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\"destroy\"];\n }\n async update(particle, direction, _delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n switch (particle.outType) {\n case \"normal\":\n case \"outside\":\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isPointInside)(particle.position, container.canvas.size, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.origin, particle.getRadius(), direction)) {\n return;\n }\n break;\n case \"inside\":\n {\n const {\n dx,\n dy\n } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(particle.position, particle.moveCenter),\n {\n x: vx,\n y: vy\n } = particle.velocity;\n if (vx < minVelocity && dx > particle.moveCenter.radius || vy < minVelocity && dy > particle.moveCenter.radius || vx >= minVelocity && dx < -particle.moveCenter.radius || vy >= minVelocity && dy < -particle.moveCenter.radius) {\n return;\n }\n break;\n }\n }\n container.particles.remove(particle, undefined, true);\n await Promise.resolve();\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-out-modes/./dist/browser/DestroyOutMode.js?");
|
|
27
|
-
|
|
28
|
-
/***/ })
|
|
29
|
-
|
|
30
|
-
}]);
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Author : Matteo Bruni
|
|
3
|
-
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
-
* Demo / Generator : https://particles.js.org/
|
|
5
|
-
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
-
* How to use? : Check the GitHub README
|
|
7
|
-
* v3.2.2
|
|
8
|
-
*/
|
|
9
|
-
"use strict";
|
|
10
|
-
/*
|
|
11
|
-
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
-
* This devtool is neither made for production nor for readable output files.
|
|
13
|
-
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
-
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
-
* or disable the default devtool with "devtool: false".
|
|
16
|
-
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
-
*/
|
|
18
|
-
(this["webpackChunk_tsparticles_updater_out_modes"] = this["webpackChunk_tsparticles_updater_out_modes"] || []).push([["dist_browser_NoneOutMode_js"],{
|
|
19
|
-
|
|
20
|
-
/***/ "./dist/browser/NoneOutMode.js":
|
|
21
|
-
/*!*************************************!*\
|
|
22
|
-
!*** ./dist/browser/NoneOutMode.js ***!
|
|
23
|
-
\*************************************/
|
|
24
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25
|
-
|
|
26
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ NoneOutMode: () => (/* binding */ NoneOutMode)\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 minVelocity = 0;\nclass NoneOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\"none\"];\n }\n async update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n if ((particle.options.move.distance.horizontal && (direction === \"left\" || direction === \"right\")) ?? (particle.options.move.distance.vertical && (direction === \"top\" || direction === \"bottom\"))) {\n return;\n }\n const gravityOptions = particle.options.move.gravity,\n container = this.container,\n canvasSize = container.canvas.size,\n pRadius = particle.getRadius();\n if (!gravityOptions.enable) {\n if (particle.velocity.y > minVelocity && particle.position.y <= canvasSize.height + pRadius || particle.velocity.y < minVelocity && particle.position.y >= -pRadius || particle.velocity.x > minVelocity && particle.position.x <= canvasSize.width + pRadius || particle.velocity.x < minVelocity && particle.position.x >= -pRadius) {\n return;\n }\n if (!(0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isPointInside)(particle.position, container.canvas.size, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.origin, pRadius, direction)) {\n container.particles.remove(particle);\n }\n } else {\n const position = particle.position;\n if (!gravityOptions.inverse && position.y > canvasSize.height + pRadius && direction === \"bottom\" || gravityOptions.inverse && position.y < -pRadius && direction === \"top\") {\n container.particles.remove(particle);\n }\n }\n await Promise.resolve();\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-out-modes/./dist/browser/NoneOutMode.js?");
|
|
27
|
-
|
|
28
|
-
/***/ })
|
|
29
|
-
|
|
30
|
-
}]);
|