@tsparticles/updater-out-modes 3.0.3 → 3.2.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/103.min.js +2 -0
- package/103.min.js.LICENSE.txt +1 -0
- package/388.min.js +2 -0
- package/388.min.js.LICENSE.txt +1 -0
- package/53.min.js +2 -0
- package/53.min.js.LICENSE.txt +1 -0
- package/569.min.js +2 -0
- package/569.min.js.LICENSE.txt +1 -0
- package/886.min.js +2 -0
- package/886.min.js.LICENSE.txt +1 -0
- package/920.min.js +2 -0
- package/920.min.js.LICENSE.txt +1 -0
- package/browser/BounceOutMode.js +3 -8
- package/browser/DestroyOutMode.js +8 -7
- package/browser/NoneOutMode.js +9 -9
- package/browser/OutOfCanvasUpdater.js +35 -19
- package/browser/OutOutMode.js +7 -2
- package/browser/Utils.js +15 -16
- package/browser/index.js +4 -2
- package/cjs/BounceOutMode.js +28 -10
- package/cjs/DestroyOutMode.js +8 -7
- package/cjs/NoneOutMode.js +9 -9
- package/cjs/OutOfCanvasUpdater.js +58 -19
- package/cjs/OutOutMode.js +7 -2
- package/cjs/Utils.js +15 -16
- package/cjs/index.js +27 -2
- package/dist_browser_BounceOutMode_js.js +30 -0
- package/dist_browser_DestroyOutMode_js.js +30 -0
- package/dist_browser_NoneOutMode_js.js +30 -0
- package/dist_browser_OutOfCanvasUpdater_js.js +30 -0
- package/dist_browser_OutOutMode_js.js +30 -0
- package/dist_browser_Utils_js.js +30 -0
- package/esm/BounceOutMode.js +3 -8
- package/esm/DestroyOutMode.js +8 -7
- package/esm/NoneOutMode.js +9 -9
- package/esm/OutOfCanvasUpdater.js +35 -19
- package/esm/OutOutMode.js +7 -2
- package/esm/Utils.js +15 -16
- package/esm/index.js +4 -2
- package/package.json +2 -2
- package/report.html +3 -3
- package/tsparticles.updater.out-modes.js +241 -354
- 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 +3 -3
- package/types/DestroyOutMode.d.ts +3 -3
- package/types/IBounceData.d.ts +2 -2
- package/types/IOutModeManager.d.ts +3 -3
- package/types/NoneOutMode.d.ts +3 -3
- package/types/OutOfCanvasUpdater.d.ts +3 -3
- package/types/OutOutMode.d.ts +3 -3
- package/umd/BounceOutMode.js +30 -11
- package/umd/DestroyOutMode.js +8 -7
- package/umd/NoneOutMode.js +9 -9
- package/umd/OutOfCanvasUpdater.js +60 -20
- package/umd/OutOutMode.js +7 -2
- package/umd/Utils.js +15 -16
- package/umd/index.js +29 -3
package/103.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
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()}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Out Modes Updater v3.2.0 by Matteo Bruni */
|
package/388.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
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()}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Out Modes Updater v3.2.0 by Matteo Bruni */
|
package/53.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
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")}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Out Modes Updater v3.2.0 by Matteo Bruni */
|
package/569.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
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})}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Out Modes Updater v3.2.0 by Matteo Bruni */
|
package/886.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
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()}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Out Modes Updater v3.2.0 by Matteo Bruni */
|
package/920.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
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()}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Out Modes Updater v3.2.0 by Matteo Bruni */
|
package/browser/BounceOutMode.js
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { calculateBounds, } from "@tsparticles/engine";
|
|
2
|
-
import { bounceHorizontal, bounceVertical } from "./Utils.js";
|
|
3
2
|
export class BounceOutMode {
|
|
4
3
|
constructor(container) {
|
|
5
4
|
this.container = container;
|
|
6
5
|
this.modes = [
|
|
7
6
|
"bounce",
|
|
8
|
-
"bounce-vertical",
|
|
9
|
-
"bounce-horizontal",
|
|
10
|
-
"bounceVertical",
|
|
11
|
-
"bounceHorizontal",
|
|
12
7
|
"split",
|
|
13
8
|
];
|
|
14
9
|
}
|
|
15
|
-
update(particle, direction, delta, outMode) {
|
|
10
|
+
async update(particle, direction, delta, outMode) {
|
|
16
11
|
if (!this.modes.includes(outMode)) {
|
|
17
12
|
return;
|
|
18
13
|
}
|
|
@@ -20,7 +15,7 @@ export class BounceOutMode {
|
|
|
20
15
|
let handled = false;
|
|
21
16
|
for (const [, plugin] of container.plugins) {
|
|
22
17
|
if (plugin.particleBounce !== undefined) {
|
|
23
|
-
handled = plugin.particleBounce(particle, delta, direction);
|
|
18
|
+
handled = await plugin.particleBounce(particle, delta, direction);
|
|
24
19
|
}
|
|
25
20
|
if (handled) {
|
|
26
21
|
break;
|
|
@@ -29,7 +24,7 @@ export class BounceOutMode {
|
|
|
29
24
|
if (handled) {
|
|
30
25
|
return;
|
|
31
26
|
}
|
|
32
|
-
const pos = particle.getPosition(), offset = particle.offset, size = particle.getRadius(), bounds = calculateBounds(pos, size), canvasSize = container.canvas.size;
|
|
27
|
+
const pos = particle.getPosition(), offset = particle.offset, size = particle.getRadius(), bounds = calculateBounds(pos, size), canvasSize = container.canvas.size, { bounceHorizontal, bounceVertical } = await import("./Utils.js");
|
|
33
28
|
bounceHorizontal({ particle, outMode, direction, bounds, canvasSize, offset, size });
|
|
34
29
|
bounceVertical({ particle, outMode, direction, bounds, canvasSize, offset, size });
|
|
35
30
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Vector, getDistances, isPointInside, } from "@tsparticles/engine";
|
|
2
|
+
const minVelocity = 0;
|
|
2
3
|
export class DestroyOutMode {
|
|
3
4
|
constructor(container) {
|
|
4
5
|
this.container = container;
|
|
5
6
|
this.modes = ["destroy"];
|
|
6
7
|
}
|
|
7
|
-
update(particle, direction, _delta, outMode) {
|
|
8
|
+
async update(particle, direction, _delta, outMode) {
|
|
8
9
|
if (!this.modes.includes(outMode)) {
|
|
9
10
|
return;
|
|
10
11
|
}
|
|
@@ -17,17 +18,17 @@ export class DestroyOutMode {
|
|
|
17
18
|
}
|
|
18
19
|
break;
|
|
19
20
|
case "inside": {
|
|
20
|
-
const { dx, dy } = getDistances(particle.position, particle.moveCenter);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
(
|
|
24
|
-
(
|
|
25
|
-
(vy >= 0 && dy < -particle.moveCenter.radius)) {
|
|
21
|
+
const { dx, dy } = getDistances(particle.position, particle.moveCenter), { x: vx, y: vy } = particle.velocity;
|
|
22
|
+
if ((vx < minVelocity && dx > particle.moveCenter.radius) ||
|
|
23
|
+
(vy < minVelocity && dy > particle.moveCenter.radius) ||
|
|
24
|
+
(vx >= minVelocity && dx < -particle.moveCenter.radius) ||
|
|
25
|
+
(vy >= minVelocity && dy < -particle.moveCenter.radius)) {
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
break;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
container.particles.remove(particle, undefined, true);
|
|
32
|
+
await Promise.resolve();
|
|
32
33
|
}
|
|
33
34
|
}
|
package/browser/NoneOutMode.js
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
import { Vector, isPointInside, } from "@tsparticles/engine";
|
|
2
|
+
const minVelocity = 0;
|
|
2
3
|
export class NoneOutMode {
|
|
3
4
|
constructor(container) {
|
|
4
5
|
this.container = container;
|
|
5
6
|
this.modes = ["none"];
|
|
6
7
|
}
|
|
7
|
-
update(particle, direction, delta, outMode) {
|
|
8
|
+
async update(particle, direction, delta, outMode) {
|
|
8
9
|
if (!this.modes.includes(outMode)) {
|
|
9
10
|
return;
|
|
10
11
|
}
|
|
11
12
|
if ((particle.options.move.distance.horizontal &&
|
|
12
|
-
(direction === "left" || direction === "right"))
|
|
13
|
+
(direction === "left" || direction === "right")) ??
|
|
13
14
|
(particle.options.move.distance.vertical &&
|
|
14
15
|
(direction === "top" || direction === "bottom"))) {
|
|
15
16
|
return;
|
|
16
17
|
}
|
|
17
|
-
const gravityOptions = particle.options.move.gravity, container = this.container;
|
|
18
|
-
const canvasSize = container.canvas.size;
|
|
19
|
-
const pRadius = particle.getRadius();
|
|
18
|
+
const gravityOptions = particle.options.move.gravity, container = this.container, canvasSize = container.canvas.size, pRadius = particle.getRadius();
|
|
20
19
|
if (!gravityOptions.enable) {
|
|
21
|
-
if ((particle.velocity.y >
|
|
22
|
-
(particle.velocity.y <
|
|
23
|
-
(particle.velocity.x >
|
|
24
|
-
(particle.velocity.x <
|
|
20
|
+
if ((particle.velocity.y > minVelocity && particle.position.y <= canvasSize.height + pRadius) ||
|
|
21
|
+
(particle.velocity.y < minVelocity && particle.position.y >= -pRadius) ||
|
|
22
|
+
(particle.velocity.x > minVelocity && particle.position.x <= canvasSize.width + pRadius) ||
|
|
23
|
+
(particle.velocity.x < minVelocity && particle.position.x >= -pRadius)) {
|
|
25
24
|
return;
|
|
26
25
|
}
|
|
27
26
|
if (!isPointInside(particle.position, container.canvas.size, Vector.origin, pRadius, direction)) {
|
|
@@ -37,5 +36,6 @@ export class NoneOutMode {
|
|
|
37
36
|
container.particles.remove(particle);
|
|
38
37
|
}
|
|
39
38
|
}
|
|
39
|
+
await Promise.resolve();
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -1,32 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const checkOutMode = (outModes, outMode) => {
|
|
2
|
+
return (outModes.default === outMode ||
|
|
3
|
+
outModes.bottom === outMode ||
|
|
4
|
+
outModes.left === outMode ||
|
|
5
|
+
outModes.right === outMode ||
|
|
6
|
+
outModes.top === outMode);
|
|
7
|
+
};
|
|
5
8
|
export class OutOfCanvasUpdater {
|
|
6
9
|
constructor(container) {
|
|
7
|
-
this.
|
|
8
|
-
this._updateOutMode = (particle, delta, outMode, direction) => {
|
|
10
|
+
this._updateOutMode = async (particle, delta, outMode, direction) => {
|
|
9
11
|
for (const updater of this.updaters) {
|
|
10
|
-
updater.update(particle, direction, delta, outMode);
|
|
12
|
+
await updater.update(particle, direction, delta, outMode);
|
|
11
13
|
}
|
|
12
14
|
};
|
|
13
|
-
this.
|
|
14
|
-
|
|
15
|
-
new DestroyOutMode(container),
|
|
16
|
-
new OutOutMode(container),
|
|
17
|
-
new NoneOutMode(container),
|
|
18
|
-
];
|
|
15
|
+
this.container = container;
|
|
16
|
+
this.updaters = [];
|
|
19
17
|
}
|
|
20
|
-
init() {
|
|
18
|
+
async init(particle) {
|
|
19
|
+
this.updaters = [];
|
|
20
|
+
const outModes = particle.options.move.outModes;
|
|
21
|
+
if (checkOutMode(outModes, "bounce")) {
|
|
22
|
+
const { BounceOutMode } = await import("./BounceOutMode.js");
|
|
23
|
+
this.updaters.push(new BounceOutMode(this.container));
|
|
24
|
+
}
|
|
25
|
+
else if (checkOutMode(outModes, "out")) {
|
|
26
|
+
const { OutOutMode } = await import("./OutOutMode.js");
|
|
27
|
+
this.updaters.push(new OutOutMode(this.container));
|
|
28
|
+
}
|
|
29
|
+
else if (checkOutMode(outModes, "destroy")) {
|
|
30
|
+
const { DestroyOutMode } = await import("./DestroyOutMode.js");
|
|
31
|
+
this.updaters.push(new DestroyOutMode(this.container));
|
|
32
|
+
}
|
|
33
|
+
else if (checkOutMode(outModes, "none")) {
|
|
34
|
+
const { NoneOutMode } = await import("./NoneOutMode.js");
|
|
35
|
+
this.updaters.push(new NoneOutMode(this.container));
|
|
36
|
+
}
|
|
21
37
|
}
|
|
22
38
|
isEnabled(particle) {
|
|
23
39
|
return !particle.destroyed && !particle.spawning;
|
|
24
40
|
}
|
|
25
|
-
update(particle, delta) {
|
|
41
|
+
async update(particle, delta) {
|
|
26
42
|
const outModes = particle.options.move.outModes;
|
|
27
|
-
this._updateOutMode(particle, delta, outModes.bottom ?? outModes.default, "bottom");
|
|
28
|
-
this._updateOutMode(particle, delta, outModes.left ?? outModes.default, "left");
|
|
29
|
-
this._updateOutMode(particle, delta, outModes.right ?? outModes.default, "right");
|
|
30
|
-
this._updateOutMode(particle, delta, outModes.top ?? outModes.default, "top");
|
|
43
|
+
await this._updateOutMode(particle, delta, outModes.bottom ?? outModes.default, "bottom");
|
|
44
|
+
await this._updateOutMode(particle, delta, outModes.left ?? outModes.default, "left");
|
|
45
|
+
await this._updateOutMode(particle, delta, outModes.right ?? outModes.default, "right");
|
|
46
|
+
await this._updateOutMode(particle, delta, outModes.top ?? outModes.default, "top");
|
|
31
47
|
}
|
|
32
48
|
}
|
package/browser/OutOutMode.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Vector, calculateBounds, getDistances, getRandom, isPointInside, randomInRange, } from "@tsparticles/engine";
|
|
2
|
+
const minVelocity = 0, minDistance = 0;
|
|
2
3
|
export class OutOutMode {
|
|
3
4
|
constructor(container) {
|
|
4
5
|
this.container = container;
|
|
5
6
|
this.modes = ["out"];
|
|
6
7
|
}
|
|
7
|
-
update(particle, direction, delta, outMode) {
|
|
8
|
+
async update(particle, direction, delta, outMode) {
|
|
8
9
|
if (!this.modes.includes(outMode)) {
|
|
9
10
|
return;
|
|
10
11
|
}
|
|
@@ -17,7 +18,10 @@ export class OutOutMode {
|
|
|
17
18
|
circVec.angle = particle.velocity.angle + Math.PI;
|
|
18
19
|
circVec.addTo(Vector.create(particle.moveCenter));
|
|
19
20
|
const { dx, dy } = getDistances(particle.position, circVec);
|
|
20
|
-
if ((vx <=
|
|
21
|
+
if ((vx <= minVelocity && dx >= minDistance) ||
|
|
22
|
+
(vy <= minVelocity && dy >= minDistance) ||
|
|
23
|
+
(vx >= minVelocity && dx <= minDistance) ||
|
|
24
|
+
(vy >= minVelocity && dy <= minDistance)) {
|
|
21
25
|
return;
|
|
22
26
|
}
|
|
23
27
|
particle.position.x = Math.floor(randomInRange({
|
|
@@ -103,5 +107,6 @@ export class OutOutMode {
|
|
|
103
107
|
break;
|
|
104
108
|
}
|
|
105
109
|
}
|
|
110
|
+
await Promise.resolve();
|
|
106
111
|
}
|
|
107
112
|
}
|
package/browser/Utils.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { getRangeValue } from "@tsparticles/engine";
|
|
2
|
+
const minVelocity = 0, boundsMin = 0;
|
|
2
3
|
export function bounceHorizontal(data) {
|
|
3
|
-
if ((data.outMode !== "bounce" &&
|
|
4
|
-
data.outMode !== "bounce-horizontal" &&
|
|
5
|
-
data.outMode !== "bounceHorizontal" &&
|
|
6
|
-
data.outMode !== "split") ||
|
|
4
|
+
if ((data.outMode !== "bounce" && data.outMode !== "split") ||
|
|
7
5
|
(data.direction !== "left" && data.direction !== "right")) {
|
|
8
6
|
return;
|
|
9
7
|
}
|
|
10
|
-
if (data.bounds.right <
|
|
8
|
+
if (data.bounds.right < boundsMin && data.direction === "left") {
|
|
11
9
|
data.particle.position.x = data.size + data.offset.x;
|
|
12
10
|
}
|
|
13
11
|
else if (data.bounds.left > data.canvasSize.width && data.direction === "right") {
|
|
@@ -15,8 +13,10 @@ export function bounceHorizontal(data) {
|
|
|
15
13
|
}
|
|
16
14
|
const velocity = data.particle.velocity.x;
|
|
17
15
|
let bounced = false;
|
|
18
|
-
if ((data.direction === "right" &&
|
|
19
|
-
|
|
16
|
+
if ((data.direction === "right" &&
|
|
17
|
+
data.bounds.right >= data.canvasSize.width &&
|
|
18
|
+
velocity > minVelocity) ||
|
|
19
|
+
(data.direction === "left" && data.bounds.left <= boundsMin && velocity < minVelocity)) {
|
|
20
20
|
const newVelocity = getRangeValue(data.particle.options.bounce.horizontal.value);
|
|
21
21
|
data.particle.velocity.x *= -newVelocity;
|
|
22
22
|
bounced = true;
|
|
@@ -28,7 +28,7 @@ export function bounceHorizontal(data) {
|
|
|
28
28
|
if (data.bounds.right >= data.canvasSize.width && data.direction === "right") {
|
|
29
29
|
data.particle.position.x = data.canvasSize.width - minPos;
|
|
30
30
|
}
|
|
31
|
-
else if (data.bounds.left <=
|
|
31
|
+
else if (data.bounds.left <= boundsMin && data.direction === "left") {
|
|
32
32
|
data.particle.position.x = minPos;
|
|
33
33
|
}
|
|
34
34
|
if (data.outMode === "split") {
|
|
@@ -36,14 +36,11 @@ export function bounceHorizontal(data) {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
export function bounceVertical(data) {
|
|
39
|
-
if ((data.outMode !== "bounce" &&
|
|
40
|
-
data.outMode !== "bounce-vertical" &&
|
|
41
|
-
data.outMode !== "bounceVertical" &&
|
|
42
|
-
data.outMode !== "split") ||
|
|
39
|
+
if ((data.outMode !== "bounce" && data.outMode !== "split") ||
|
|
43
40
|
(data.direction !== "bottom" && data.direction !== "top")) {
|
|
44
41
|
return;
|
|
45
42
|
}
|
|
46
|
-
if (data.bounds.bottom <
|
|
43
|
+
if (data.bounds.bottom < boundsMin && data.direction === "top") {
|
|
47
44
|
data.particle.position.y = data.size + data.offset.y;
|
|
48
45
|
}
|
|
49
46
|
else if (data.bounds.top > data.canvasSize.height && data.direction === "bottom") {
|
|
@@ -51,8 +48,10 @@ export function bounceVertical(data) {
|
|
|
51
48
|
}
|
|
52
49
|
const velocity = data.particle.velocity.y;
|
|
53
50
|
let bounced = false;
|
|
54
|
-
if ((data.direction === "bottom" &&
|
|
55
|
-
|
|
51
|
+
if ((data.direction === "bottom" &&
|
|
52
|
+
data.bounds.bottom >= data.canvasSize.height &&
|
|
53
|
+
velocity > minVelocity) ||
|
|
54
|
+
(data.direction === "top" && data.bounds.top <= boundsMin && velocity < minVelocity)) {
|
|
56
55
|
const newVelocity = getRangeValue(data.particle.options.bounce.vertical.value);
|
|
57
56
|
data.particle.velocity.y *= -newVelocity;
|
|
58
57
|
bounced = true;
|
|
@@ -64,7 +63,7 @@ export function bounceVertical(data) {
|
|
|
64
63
|
if (data.bounds.bottom >= data.canvasSize.height && data.direction === "bottom") {
|
|
65
64
|
data.particle.position.y = data.canvasSize.height - minPos;
|
|
66
65
|
}
|
|
67
|
-
else if (data.bounds.top <=
|
|
66
|
+
else if (data.bounds.top <= boundsMin && data.direction === "top") {
|
|
68
67
|
data.particle.position.y = minPos;
|
|
69
68
|
}
|
|
70
69
|
if (data.outMode === "split") {
|
package/browser/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { OutOfCanvasUpdater } from "./OutOfCanvasUpdater.js";
|
|
2
1
|
export async function loadOutModesUpdater(engine, refresh = true) {
|
|
3
|
-
await engine.addParticleUpdater("outModes", (container) =>
|
|
2
|
+
await engine.addParticleUpdater("outModes", async (container) => {
|
|
3
|
+
const { OutOfCanvasUpdater } = await import("./OutOfCanvasUpdater.js");
|
|
4
|
+
return new OutOfCanvasUpdater(container);
|
|
5
|
+
}, refresh);
|
|
4
6
|
}
|
package/cjs/BounceOutMode.js
CHANGED
|
@@ -1,21 +1,39 @@
|
|
|
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
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.BounceOutMode = void 0;
|
|
4
27
|
const engine_1 = require("@tsparticles/engine");
|
|
5
|
-
const Utils_js_1 = require("./Utils.js");
|
|
6
28
|
class BounceOutMode {
|
|
7
29
|
constructor(container) {
|
|
8
30
|
this.container = container;
|
|
9
31
|
this.modes = [
|
|
10
32
|
"bounce",
|
|
11
|
-
"bounce-vertical",
|
|
12
|
-
"bounce-horizontal",
|
|
13
|
-
"bounceVertical",
|
|
14
|
-
"bounceHorizontal",
|
|
15
33
|
"split",
|
|
16
34
|
];
|
|
17
35
|
}
|
|
18
|
-
update(particle, direction, delta, outMode) {
|
|
36
|
+
async update(particle, direction, delta, outMode) {
|
|
19
37
|
if (!this.modes.includes(outMode)) {
|
|
20
38
|
return;
|
|
21
39
|
}
|
|
@@ -23,7 +41,7 @@ class BounceOutMode {
|
|
|
23
41
|
let handled = false;
|
|
24
42
|
for (const [, plugin] of container.plugins) {
|
|
25
43
|
if (plugin.particleBounce !== undefined) {
|
|
26
|
-
handled = plugin.particleBounce(particle, delta, direction);
|
|
44
|
+
handled = await plugin.particleBounce(particle, delta, direction);
|
|
27
45
|
}
|
|
28
46
|
if (handled) {
|
|
29
47
|
break;
|
|
@@ -32,9 +50,9 @@ class BounceOutMode {
|
|
|
32
50
|
if (handled) {
|
|
33
51
|
return;
|
|
34
52
|
}
|
|
35
|
-
const pos = particle.getPosition(), offset = particle.offset, size = particle.getRadius(), bounds = (0, engine_1.calculateBounds)(pos, size), canvasSize = container.canvas.size;
|
|
36
|
-
|
|
37
|
-
|
|
53
|
+
const pos = particle.getPosition(), offset = particle.offset, size = particle.getRadius(), bounds = (0, engine_1.calculateBounds)(pos, size), canvasSize = container.canvas.size, { bounceHorizontal, bounceVertical } = await Promise.resolve().then(() => __importStar(require("./Utils.js")));
|
|
54
|
+
bounceHorizontal({ particle, outMode, direction, bounds, canvasSize, offset, size });
|
|
55
|
+
bounceVertical({ particle, outMode, direction, bounds, canvasSize, offset, size });
|
|
38
56
|
}
|
|
39
57
|
}
|
|
40
58
|
exports.BounceOutMode = BounceOutMode;
|
package/cjs/DestroyOutMode.js
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DestroyOutMode = void 0;
|
|
4
4
|
const engine_1 = require("@tsparticles/engine");
|
|
5
|
+
const minVelocity = 0;
|
|
5
6
|
class DestroyOutMode {
|
|
6
7
|
constructor(container) {
|
|
7
8
|
this.container = container;
|
|
8
9
|
this.modes = ["destroy"];
|
|
9
10
|
}
|
|
10
|
-
update(particle, direction, _delta, outMode) {
|
|
11
|
+
async update(particle, direction, _delta, outMode) {
|
|
11
12
|
if (!this.modes.includes(outMode)) {
|
|
12
13
|
return;
|
|
13
14
|
}
|
|
@@ -20,18 +21,18 @@ class DestroyOutMode {
|
|
|
20
21
|
}
|
|
21
22
|
break;
|
|
22
23
|
case "inside": {
|
|
23
|
-
const { dx, dy } = (0, engine_1.getDistances)(particle.position, particle.moveCenter);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
(
|
|
27
|
-
(
|
|
28
|
-
(vy >= 0 && dy < -particle.moveCenter.radius)) {
|
|
24
|
+
const { dx, dy } = (0, engine_1.getDistances)(particle.position, particle.moveCenter), { x: vx, y: vy } = particle.velocity;
|
|
25
|
+
if ((vx < minVelocity && dx > particle.moveCenter.radius) ||
|
|
26
|
+
(vy < minVelocity && dy > particle.moveCenter.radius) ||
|
|
27
|
+
(vx >= minVelocity && dx < -particle.moveCenter.radius) ||
|
|
28
|
+
(vy >= minVelocity && dy < -particle.moveCenter.radius)) {
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
break;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
container.particles.remove(particle, undefined, true);
|
|
35
|
+
await Promise.resolve();
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
exports.DestroyOutMode = DestroyOutMode;
|
package/cjs/NoneOutMode.js
CHANGED
|
@@ -2,29 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NoneOutMode = void 0;
|
|
4
4
|
const engine_1 = require("@tsparticles/engine");
|
|
5
|
+
const minVelocity = 0;
|
|
5
6
|
class NoneOutMode {
|
|
6
7
|
constructor(container) {
|
|
7
8
|
this.container = container;
|
|
8
9
|
this.modes = ["none"];
|
|
9
10
|
}
|
|
10
|
-
update(particle, direction, delta, outMode) {
|
|
11
|
+
async update(particle, direction, delta, outMode) {
|
|
11
12
|
if (!this.modes.includes(outMode)) {
|
|
12
13
|
return;
|
|
13
14
|
}
|
|
14
15
|
if ((particle.options.move.distance.horizontal &&
|
|
15
|
-
(direction === "left" || direction === "right"))
|
|
16
|
+
(direction === "left" || direction === "right")) ??
|
|
16
17
|
(particle.options.move.distance.vertical &&
|
|
17
18
|
(direction === "top" || direction === "bottom"))) {
|
|
18
19
|
return;
|
|
19
20
|
}
|
|
20
|
-
const gravityOptions = particle.options.move.gravity, container = this.container;
|
|
21
|
-
const canvasSize = container.canvas.size;
|
|
22
|
-
const pRadius = particle.getRadius();
|
|
21
|
+
const gravityOptions = particle.options.move.gravity, container = this.container, canvasSize = container.canvas.size, pRadius = particle.getRadius();
|
|
23
22
|
if (!gravityOptions.enable) {
|
|
24
|
-
if ((particle.velocity.y >
|
|
25
|
-
(particle.velocity.y <
|
|
26
|
-
(particle.velocity.x >
|
|
27
|
-
(particle.velocity.x <
|
|
23
|
+
if ((particle.velocity.y > minVelocity && particle.position.y <= canvasSize.height + pRadius) ||
|
|
24
|
+
(particle.velocity.y < minVelocity && particle.position.y >= -pRadius) ||
|
|
25
|
+
(particle.velocity.x > minVelocity && particle.position.x <= canvasSize.width + pRadius) ||
|
|
26
|
+
(particle.velocity.x < minVelocity && particle.position.x >= -pRadius)) {
|
|
28
27
|
return;
|
|
29
28
|
}
|
|
30
29
|
if (!(0, engine_1.isPointInside)(particle.position, container.canvas.size, engine_1.Vector.origin, pRadius, direction)) {
|
|
@@ -40,6 +39,7 @@ class NoneOutMode {
|
|
|
40
39
|
container.particles.remove(particle);
|
|
41
40
|
}
|
|
42
41
|
}
|
|
42
|
+
await Promise.resolve();
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
exports.NoneOutMode = NoneOutMode;
|
|
@@ -1,36 +1,75 @@
|
|
|
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
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.OutOfCanvasUpdater = void 0;
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
27
|
+
const checkOutMode = (outModes, outMode) => {
|
|
28
|
+
return (outModes.default === outMode ||
|
|
29
|
+
outModes.bottom === outMode ||
|
|
30
|
+
outModes.left === outMode ||
|
|
31
|
+
outModes.right === outMode ||
|
|
32
|
+
outModes.top === outMode);
|
|
33
|
+
};
|
|
8
34
|
class OutOfCanvasUpdater {
|
|
9
35
|
constructor(container) {
|
|
10
|
-
this.
|
|
11
|
-
this._updateOutMode = (particle, delta, outMode, direction) => {
|
|
36
|
+
this._updateOutMode = async (particle, delta, outMode, direction) => {
|
|
12
37
|
for (const updater of this.updaters) {
|
|
13
|
-
updater.update(particle, direction, delta, outMode);
|
|
38
|
+
await updater.update(particle, direction, delta, outMode);
|
|
14
39
|
}
|
|
15
40
|
};
|
|
16
|
-
this.
|
|
17
|
-
|
|
18
|
-
new DestroyOutMode_js_1.DestroyOutMode(container),
|
|
19
|
-
new OutOutMode_js_1.OutOutMode(container),
|
|
20
|
-
new NoneOutMode_js_1.NoneOutMode(container),
|
|
21
|
-
];
|
|
41
|
+
this.container = container;
|
|
42
|
+
this.updaters = [];
|
|
22
43
|
}
|
|
23
|
-
init() {
|
|
44
|
+
async init(particle) {
|
|
45
|
+
this.updaters = [];
|
|
46
|
+
const outModes = particle.options.move.outModes;
|
|
47
|
+
if (checkOutMode(outModes, "bounce")) {
|
|
48
|
+
const { BounceOutMode } = await Promise.resolve().then(() => __importStar(require("./BounceOutMode.js")));
|
|
49
|
+
this.updaters.push(new BounceOutMode(this.container));
|
|
50
|
+
}
|
|
51
|
+
else if (checkOutMode(outModes, "out")) {
|
|
52
|
+
const { OutOutMode } = await Promise.resolve().then(() => __importStar(require("./OutOutMode.js")));
|
|
53
|
+
this.updaters.push(new OutOutMode(this.container));
|
|
54
|
+
}
|
|
55
|
+
else if (checkOutMode(outModes, "destroy")) {
|
|
56
|
+
const { DestroyOutMode } = await Promise.resolve().then(() => __importStar(require("./DestroyOutMode.js")));
|
|
57
|
+
this.updaters.push(new DestroyOutMode(this.container));
|
|
58
|
+
}
|
|
59
|
+
else if (checkOutMode(outModes, "none")) {
|
|
60
|
+
const { NoneOutMode } = await Promise.resolve().then(() => __importStar(require("./NoneOutMode.js")));
|
|
61
|
+
this.updaters.push(new NoneOutMode(this.container));
|
|
62
|
+
}
|
|
24
63
|
}
|
|
25
64
|
isEnabled(particle) {
|
|
26
65
|
return !particle.destroyed && !particle.spawning;
|
|
27
66
|
}
|
|
28
|
-
update(particle, delta) {
|
|
67
|
+
async update(particle, delta) {
|
|
29
68
|
const outModes = particle.options.move.outModes;
|
|
30
|
-
this._updateOutMode(particle, delta, outModes.bottom ?? outModes.default, "bottom");
|
|
31
|
-
this._updateOutMode(particle, delta, outModes.left ?? outModes.default, "left");
|
|
32
|
-
this._updateOutMode(particle, delta, outModes.right ?? outModes.default, "right");
|
|
33
|
-
this._updateOutMode(particle, delta, outModes.top ?? outModes.default, "top");
|
|
69
|
+
await this._updateOutMode(particle, delta, outModes.bottom ?? outModes.default, "bottom");
|
|
70
|
+
await this._updateOutMode(particle, delta, outModes.left ?? outModes.default, "left");
|
|
71
|
+
await this._updateOutMode(particle, delta, outModes.right ?? outModes.default, "right");
|
|
72
|
+
await this._updateOutMode(particle, delta, outModes.top ?? outModes.default, "top");
|
|
34
73
|
}
|
|
35
74
|
}
|
|
36
75
|
exports.OutOfCanvasUpdater = OutOfCanvasUpdater;
|