@tsparticles/plugin-emitters-shape-path 4.5.1 → 4.5.2
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/browser/index.js +1 -1
- package/browser/index.lazy.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.lazy.js +1 -1
- package/esm/index.js +1 -1
- package/esm/index.lazy.js +1 -1
- package/package.json +3 -3
- package/report.html +1 -1
- package/tsparticles.plugin.emitters.shape.path.js +2 -2
- package/tsparticles.plugin.emitters.shape.path.min.js +1 -1
package/browser/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { addErrorMessages } from "@tsparticles/engine";
|
|
|
3
3
|
import { EmittersPathShapeGenerator } from "./EmittersPathShapeGenerator.js";
|
|
4
4
|
import { ErrorMessages } from "./ErrorMessages.js";
|
|
5
5
|
export async function loadEmittersShapePath(engine) {
|
|
6
|
-
engine.checkVersion("4.5.
|
|
6
|
+
engine.checkVersion("4.5.2");
|
|
7
7
|
if (typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
|
|
8
8
|
addErrorMessages(ErrorMessages);
|
|
9
9
|
}
|
package/browser/index.lazy.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { addErrorMessages } from "@tsparticles/engine/lazy";
|
|
2
2
|
import { ErrorMessages } from "./ErrorMessages.js";
|
|
3
3
|
export async function loadEmittersShapePath(engine) {
|
|
4
|
-
engine.checkVersion("4.5.
|
|
4
|
+
engine.checkVersion("4.5.2");
|
|
5
5
|
if (typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
|
|
6
6
|
addErrorMessages(ErrorMessages);
|
|
7
7
|
}
|
package/cjs/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { addErrorMessages } from "@tsparticles/engine";
|
|
|
3
3
|
import { EmittersPathShapeGenerator } from "./EmittersPathShapeGenerator.js";
|
|
4
4
|
import { ErrorMessages } from "./ErrorMessages.js";
|
|
5
5
|
export async function loadEmittersShapePath(engine) {
|
|
6
|
-
engine.checkVersion("4.5.
|
|
6
|
+
engine.checkVersion("4.5.2");
|
|
7
7
|
if (typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
|
|
8
8
|
addErrorMessages(ErrorMessages);
|
|
9
9
|
}
|
package/cjs/index.lazy.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { addErrorMessages } from "@tsparticles/engine/lazy";
|
|
2
2
|
import { ErrorMessages } from "./ErrorMessages.js";
|
|
3
3
|
export async function loadEmittersShapePath(engine) {
|
|
4
|
-
engine.checkVersion("4.5.
|
|
4
|
+
engine.checkVersion("4.5.2");
|
|
5
5
|
if (typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
|
|
6
6
|
addErrorMessages(ErrorMessages);
|
|
7
7
|
}
|
package/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { addErrorMessages } from "@tsparticles/engine";
|
|
|
3
3
|
import { EmittersPathShapeGenerator } from "./EmittersPathShapeGenerator.js";
|
|
4
4
|
import { ErrorMessages } from "./ErrorMessages.js";
|
|
5
5
|
export async function loadEmittersShapePath(engine) {
|
|
6
|
-
engine.checkVersion("4.5.
|
|
6
|
+
engine.checkVersion("4.5.2");
|
|
7
7
|
if (typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
|
|
8
8
|
addErrorMessages(ErrorMessages);
|
|
9
9
|
}
|
package/esm/index.lazy.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { addErrorMessages } from "@tsparticles/engine/lazy";
|
|
2
2
|
import { ErrorMessages } from "./ErrorMessages.js";
|
|
3
3
|
export async function loadEmittersShapePath(engine) {
|
|
4
|
-
engine.checkVersion("4.5.
|
|
4
|
+
engine.checkVersion("4.5.2");
|
|
5
5
|
if (typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
|
|
6
6
|
addErrorMessages(ErrorMessages);
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-emitters-shape-path",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.2",
|
|
4
4
|
"description": "tsParticles emitters shape path plugin",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
"./package.json": "./package.json"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
109
|
-
"@tsparticles/engine": "4.5.
|
|
110
|
-
"@tsparticles/plugin-emitters": "4.5.
|
|
109
|
+
"@tsparticles/engine": "4.5.2",
|
|
110
|
+
"@tsparticles/plugin-emitters": "4.5.2"
|
|
111
111
|
},
|
|
112
112
|
"publishConfig": {
|
|
113
113
|
"access": "public"
|
package/report.html
CHANGED
|
@@ -5285,7 +5285,7 @@ var drawChart = (function (exports) {
|
|
|
5285
5285
|
</script>
|
|
5286
5286
|
<script>
|
|
5287
5287
|
/*<!--*/
|
|
5288
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"tsparticles.plugin.emitters.shape.path.js","children":[{"name":"dist/browser","children":[{"uid":"
|
|
5288
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"tsparticles.plugin.emitters.shape.path.js","children":[{"name":"dist/browser","children":[{"uid":"42ddb1a5-1","name":"utils.js"},{"uid":"42ddb1a5-3","name":"ErrorCodes.js"},{"uid":"42ddb1a5-5","name":"EmittersPathShape.js"},{"name":"Options/Classes/EmittersPathShapeOptions.js","uid":"42ddb1a5-7"},{"uid":"42ddb1a5-9","name":"EmittersPathShapeGenerator.js"},{"uid":"42ddb1a5-11","name":"ErrorMessages.js"},{"uid":"42ddb1a5-13","name":"index.js"},{"uid":"42ddb1a5-15","name":"browser.js"}]}]}],"isRoot":true},"nodeParts":{"42ddb1a5-1":{"renderedLength":1209,"gzipLength":0,"brotliLength":0,"metaUid":"42ddb1a5-0"},"42ddb1a5-3":{"renderedLength":120,"gzipLength":0,"brotliLength":0,"metaUid":"42ddb1a5-2"},"42ddb1a5-5":{"renderedLength":4358,"gzipLength":0,"brotliLength":0,"metaUid":"42ddb1a5-4"},"42ddb1a5-7":{"renderedLength":392,"gzipLength":0,"brotliLength":0,"metaUid":"42ddb1a5-6"},"42ddb1a5-9":{"renderedLength":309,"gzipLength":0,"brotliLength":0,"metaUid":"42ddb1a5-8"},"42ddb1a5-11":{"renderedLength":178,"gzipLength":0,"brotliLength":0,"metaUid":"42ddb1a5-10"},"42ddb1a5-13":{"renderedLength":470,"gzipLength":0,"brotliLength":0,"metaUid":"42ddb1a5-12"},"42ddb1a5-15":{"renderedLength":185,"gzipLength":0,"brotliLength":0,"metaUid":"42ddb1a5-14"}},"nodeMetas":{"42ddb1a5-0":{"id":"/dist/browser/utils.js","moduleParts":{"tsparticles.plugin.emitters.shape.path.js":"42ddb1a5-1"},"imported":[{"uid":"42ddb1a5-17"}],"importedBy":[{"uid":"42ddb1a5-4"}]},"42ddb1a5-2":{"id":"/dist/browser/ErrorCodes.js","moduleParts":{"tsparticles.plugin.emitters.shape.path.js":"42ddb1a5-3"},"imported":[],"importedBy":[{"uid":"42ddb1a5-10"},{"uid":"42ddb1a5-4"}]},"42ddb1a5-4":{"id":"/dist/browser/EmittersPathShape.js","moduleParts":{"tsparticles.plugin.emitters.shape.path.js":"42ddb1a5-5"},"imported":[{"uid":"42ddb1a5-17"},{"uid":"42ddb1a5-16"},{"uid":"42ddb1a5-0"},{"uid":"42ddb1a5-2"}],"importedBy":[{"uid":"42ddb1a5-8"}]},"42ddb1a5-6":{"id":"/dist/browser/Options/Classes/EmittersPathShapeOptions.js","moduleParts":{"tsparticles.plugin.emitters.shape.path.js":"42ddb1a5-7"},"imported":[{"uid":"42ddb1a5-17"}],"importedBy":[{"uid":"42ddb1a5-8"}]},"42ddb1a5-8":{"id":"/dist/browser/EmittersPathShapeGenerator.js","moduleParts":{"tsparticles.plugin.emitters.shape.path.js":"42ddb1a5-9"},"imported":[{"uid":"42ddb1a5-4"},{"uid":"42ddb1a5-6"}],"importedBy":[{"uid":"42ddb1a5-12"}]},"42ddb1a5-10":{"id":"/dist/browser/ErrorMessages.js","moduleParts":{"tsparticles.plugin.emitters.shape.path.js":"42ddb1a5-11"},"imported":[{"uid":"42ddb1a5-2"}],"importedBy":[{"uid":"42ddb1a5-12"}]},"42ddb1a5-12":{"id":"/dist/browser/index.js","moduleParts":{"tsparticles.plugin.emitters.shape.path.js":"42ddb1a5-13"},"imported":[{"uid":"42ddb1a5-16"},{"uid":"42ddb1a5-17"},{"uid":"42ddb1a5-8"},{"uid":"42ddb1a5-10"}],"importedBy":[{"uid":"42ddb1a5-14"}]},"42ddb1a5-14":{"id":"/dist/browser/browser.js","moduleParts":{"tsparticles.plugin.emitters.shape.path.js":"42ddb1a5-15"},"imported":[{"uid":"42ddb1a5-12"}],"importedBy":[],"isEntry":true},"42ddb1a5-16":{"id":"@tsparticles/plugin-emitters","moduleParts":{},"imported":[],"importedBy":[{"uid":"42ddb1a5-12"},{"uid":"42ddb1a5-4"}],"isExternal":true},"42ddb1a5-17":{"id":"@tsparticles/engine","moduleParts":{},"imported":[],"importedBy":[{"uid":"42ddb1a5-12"},{"uid":"42ddb1a5-4"},{"uid":"42ddb1a5-6"},{"uid":"42ddb1a5-0"}],"isExternal":true}},"env":{"rollup":"4.67.4"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
|
5289
5289
|
|
|
5290
5290
|
const run = () => {
|
|
5291
5291
|
const width = window.innerWidth;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
2
|
(function (g) {
|
|
3
|
-
/* Emitters Shape v4.5.
|
|
3
|
+
/* Emitters Shape v4.5.2 */
|
|
4
4
|
g.__tsParticlesInternals = g.__tsParticlesInternals || {};
|
|
5
5
|
g.__tsParticlesInternals.plugins = g.__tsParticlesInternals.plugins || {};
|
|
6
6
|
g.__tsParticlesInternals.plugins.emittersShapes = g.__tsParticlesInternals.plugins.emittersShapes || {};
|
|
@@ -166,7 +166,7 @@ g.__tsParticlesInternals.plugins.emittersShapes = g.__tsParticlesInternals.plugi
|
|
|
166
166
|
};
|
|
167
167
|
|
|
168
168
|
async function loadEmittersShapePath(engine$1) {
|
|
169
|
-
engine$1.checkVersion("4.5.
|
|
169
|
+
engine$1.checkVersion("4.5.2");
|
|
170
170
|
if (typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
|
|
171
171
|
engine.addErrorMessages(ErrorMessages);
|
|
172
172
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var s="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,s){return s in t||(t[s]={}),t[s]}})}:function(t){return t};t.__tsParticlesInternals.bundles=s(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=s(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=s(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=s(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=s(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=s(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=s(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=s(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=s(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=s(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=s(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=s(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=s(t.__tsParticlesInternals.path)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},function(t,s,e){"use strict";const n="TSP-3102",a="TSP-3103";class r extends s.EmitterShapeBase{checkContext;path;points;constructor(t,s,r,i,l){super(s,r,i,l);const _=e.safeDocument().createElement("canvas").getContext("2d",t.canvas.render.settings);if(!_)throw new Error(e.getErrorMessage(n));this.checkContext=_,this.points=l.points;const c=this.points,o=new Path2D,h=s.x-r.width*e.half,p=s.y-r.height*e.half;for(const[t,s]of c.entries()){const n={x:h+s.x*r.width/e.percentDenominator,y:p+s.y*r.height/e.percentDenominator};t?o.lineTo(n.x,n.y):o.moveTo(n.x,n.y)}const P=c.length?c[0]:null;if(!P)throw new Error(e.getErrorMessage(a));const I={x:h+P.x*r.width/e.percentDenominator,y:p+P.y*r.height/e.percentDenominator};o.lineTo(I.x,I.y),this.path=o}draw(t){const s=this.position,n=this.size,a=this.points,r=s.x-n.width*e.half,i=s.y-n.height*e.half;for(const[s,l]of a.entries()){const a={x:r+l.x*n.width/e.percentDenominator,y:i+l.y*n.height/e.percentDenominator};s?t.lineTo(a.x,a.y):t.moveTo(a.x,a.y)}t.closePath()}async init(){}randomPosition(){const t=this.checkContext,s=this.position,n=this.size,a=this.fill,r=this.path,i=a?function(t,s,n,a){let r=null;for(let i=0;i<100;i++){const i={x:n.x+e.getRandom()*a.width-a.width*e.half,y:n.y+e.getRandom()*a.height-a.height*e.half};if(t.isPointInPath(s,i.x,i.y)){r=i;break}}return r}(t,r,s,n):function(t,s,n,a){let r=null;for(let i=0;i<100;i++){const i={x:n.x+e.getRandom()*a.width-a.width*e.half,y:n.y+e.getRandom()*a.height-a.height*e.half};if(t.isPointInStroke(s,i.x,i.y)){r=i;break}}return r}(t,r,s,n);return i?{position:i}:null}resize(t,s){super.resize(t,s);const n=this.points,r=new Path2D,i=t.x-s.width*e.half,l=t.y-s.height*e.half;for(const[t,a]of n.entries()){const n={x:i+a.x*s.width/e.percentDenominator,y:l+a.y*s.height/e.percentDenominator};t?r.lineTo(n.x,n.y):r.moveTo(n.x,n.y)}const _=n.length?n[0]:null;if(!_)throw new Error(e.getErrorMessage(a));const c={x:i+_.x*s.width/e.percentDenominator,y:l+_.y*s.height/e.percentDenominator};r.lineTo(c.x,c.y),this.path=r}}const i=50,l=50;class _{points=[];load(t){e.isNull(t)||void 0!==t.points&&(this.points=t.points.map(t=>({x:t.x??i,y:t.y??l})))}}class c{generate(t,s,e,n,a){const i=new _;return i.load(a),new r(t,s,e,n,i)}}async function o(t){t.checkVersion("4.5.
|
|
1
|
+
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var s="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,s){return s in t||(t[s]={}),t[s]}})}:function(t){return t};t.__tsParticlesInternals.bundles=s(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=s(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=s(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=s(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=s(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=s(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=s(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=s(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=s(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=s(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=s(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=s(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=s(t.__tsParticlesInternals.path)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},function(t,s,e){"use strict";const n="TSP-3102",a="TSP-3103";class r extends s.EmitterShapeBase{checkContext;path;points;constructor(t,s,r,i,l){super(s,r,i,l);const _=e.safeDocument().createElement("canvas").getContext("2d",t.canvas.render.settings);if(!_)throw new Error(e.getErrorMessage(n));this.checkContext=_,this.points=l.points;const c=this.points,o=new Path2D,h=s.x-r.width*e.half,p=s.y-r.height*e.half;for(const[t,s]of c.entries()){const n={x:h+s.x*r.width/e.percentDenominator,y:p+s.y*r.height/e.percentDenominator};t?o.lineTo(n.x,n.y):o.moveTo(n.x,n.y)}const P=c.length?c[0]:null;if(!P)throw new Error(e.getErrorMessage(a));const I={x:h+P.x*r.width/e.percentDenominator,y:p+P.y*r.height/e.percentDenominator};o.lineTo(I.x,I.y),this.path=o}draw(t){const s=this.position,n=this.size,a=this.points,r=s.x-n.width*e.half,i=s.y-n.height*e.half;for(const[s,l]of a.entries()){const a={x:r+l.x*n.width/e.percentDenominator,y:i+l.y*n.height/e.percentDenominator};s?t.lineTo(a.x,a.y):t.moveTo(a.x,a.y)}t.closePath()}async init(){}randomPosition(){const t=this.checkContext,s=this.position,n=this.size,a=this.fill,r=this.path,i=a?function(t,s,n,a){let r=null;for(let i=0;i<100;i++){const i={x:n.x+e.getRandom()*a.width-a.width*e.half,y:n.y+e.getRandom()*a.height-a.height*e.half};if(t.isPointInPath(s,i.x,i.y)){r=i;break}}return r}(t,r,s,n):function(t,s,n,a){let r=null;for(let i=0;i<100;i++){const i={x:n.x+e.getRandom()*a.width-a.width*e.half,y:n.y+e.getRandom()*a.height-a.height*e.half};if(t.isPointInStroke(s,i.x,i.y)){r=i;break}}return r}(t,r,s,n);return i?{position:i}:null}resize(t,s){super.resize(t,s);const n=this.points,r=new Path2D,i=t.x-s.width*e.half,l=t.y-s.height*e.half;for(const[t,a]of n.entries()){const n={x:i+a.x*s.width/e.percentDenominator,y:l+a.y*s.height/e.percentDenominator};t?r.lineTo(n.x,n.y):r.moveTo(n.x,n.y)}const _=n.length?n[0]:null;if(!_)throw new Error(e.getErrorMessage(a));const c={x:i+_.x*s.width/e.percentDenominator,y:l+_.y*s.height/e.percentDenominator};r.lineTo(c.x,c.y),this.path=r}}const i=50,l=50;class _{points=[];load(t){e.isNull(t)||void 0!==t.points&&(this.points=t.points.map(t=>({x:t.x??i,y:t.y??l})))}}class c{generate(t,s,e,n,a){const i=new _;return i.load(a),new r(t,s,e,n,i)}}async function o(t){t.checkVersion("4.5.2"),await t.pluginManager.register(t=>{s.ensureEmittersPluginLoaded(t),t.pluginManager.addEmitterShapeGenerator?.("path",new c)})}const h=globalThis;h.__tsParticlesInternals=h.__tsParticlesInternals??{},h.loadEmittersShapePath=o,t.loadEmittersShapePath=o}(t.__tsParticlesInternals.plugins.emittersShapes.path=t.__tsParticlesInternals.plugins.emittersShapes.path||{},t.__tsParticlesInternals.plugins.emitters,t.__tsParticlesInternals.engine)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{loadEmittersShapePath:(globalThis.__tsParticlesInternals.plugins.emittersShapes.path||{}).loadEmittersShapePath});
|