@tsparticles/plugin-emitters-shape-path 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/235.min.js +2 -0
- package/235.min.js.LICENSE.txt +1 -0
- package/browser/EmittersPathShape.js +21 -18
- package/browser/Options/Classes/EmittersPathShapeOptions.js +2 -1
- package/browser/index.js +2 -4
- package/browser/utils.js +7 -6
- package/cjs/EmittersPathShape.js +20 -17
- package/cjs/Options/Classes/EmittersPathShapeOptions.js +2 -1
- package/cjs/index.js +25 -4
- package/cjs/utils.js +7 -6
- package/dist_browser_EmittersPathShapeGenerator_js.js +60 -0
- package/esm/EmittersPathShape.js +21 -18
- package/esm/Options/Classes/EmittersPathShapeOptions.js +2 -1
- package/esm/index.js +2 -4
- package/esm/utils.js +7 -6
- package/package.json +3 -3
- package/report.html +3 -3
- package/tsparticles.plugin.emitters.shape.path.js +246 -167
- package/tsparticles.plugin.emitters.shape.path.min.js +1 -1
- package/tsparticles.plugin.emitters.shape.path.min.js.LICENSE.txt +1 -1
- package/umd/EmittersPathShape.js +20 -17
- package/umd/Options/Classes/EmittersPathShapeOptions.js +2 -1
- package/umd/index.js +27 -5
- package/umd/utils.js +7 -6
package/235.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 235.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_plugin_emitters_shape_path=this.webpackChunk_tsparticles_plugin_emitters_shape_path||[]).push([[235],{235:(t,e,n)=>{n.d(e,{EmittersPathShapeGenerator:()=>x});var i=n(68),o=n(533);const s=.5;const h=.5;class r extends i.EmitterShapeBase{constructor(t,e,n,i){super(t,e,n,i);const s=document.createElement("canvas").getContext("2d");if(!s)throw new Error(`${o.errorPrefix} No 2d context available`);this.checkContext=s,this.points=i.points;const r=this.points,a=new Path2D,c=t.x-e.width*h,p=t.y-e.height*h;for(const[t,n]of r.entries()){const i={x:c+n.x*e.width/o.percentDenominator,y:p+n.y*e.height/o.percentDenominator};t?a.lineTo(i.x,i.y):a.moveTo(i.x,i.y)}const x=r[0];if(x){const t={x:c+x.x*e.width/o.percentDenominator,y:p+x.y*e.height/o.percentDenominator};a.lineTo(t.x,t.y)}this.path=a}async init(){}async randomPosition(){const t=this.checkContext,e=this.position,n=this.size,i=this.fill,h=this.path,r=i?function(t,e,n,i){let h=null;for(let r=0;r<100;r++){const r={x:n.x+(0,o.getRandom)()*i.width-i.width*s,y:n.y+(0,o.getRandom)()*i.height-i.height*s};if(t.isPointInPath(e,r.x,r.y)){h=r;break}}return h}(t,h,e,n):function(t,e,n,i){let h=null;for(let r=0;r<100;r++){const r={x:n.x+(0,o.getRandom)()*i.width-i.width*s,y:n.y+(0,o.getRandom)()*i.height-i.height*s};if(t.isPointInStroke(e,r.x,r.y)){h=r;break}}return h}(t,h,e,n);return Promise.resolve(r?{position:r}:null)}resize(t,e){super.resize(t,e);const n=this.points,i=new Path2D,s=t.x-e.width*h,r=t.y-e.height*h;for(const[t,h]of n.entries()){const n={x:s+h.x*e.width/o.percentDenominator,y:r+h.y*e.height/o.percentDenominator};t?i.lineTo(n.x,n.y):i.moveTo(n.x,n.y)}const a=n[0];if(a){const t={x:s+a.x*e.width/o.percentDenominator,y:r+a.y*e.height/o.percentDenominator};i.lineTo(t.x,t.y)}this.path=i}}const a=50,c=50;class p{constructor(){this.points=[]}load(t){t&&void 0!==t.points&&(this.points=t.points.map((t=>({x:t.x??a,y:t.y??c}))))}}class x{generate(t,e,n,i){const o=new p;return o.load(i),new r(t,e,n,o)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Emitters Shape Path Plugin v3.2.0 by Matteo Bruni */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EmitterShapeBase } from "@tsparticles/plugin-emitters";
|
|
2
|
-
import { errorPrefix } from "@tsparticles/engine";
|
|
2
|
+
import { errorPrefix, percentDenominator } from "@tsparticles/engine";
|
|
3
3
|
import { generateRandomPointOnPathPerimeter, generateRandomPointWithinPath } from "./utils.js";
|
|
4
|
+
const half = 0.5;
|
|
4
5
|
export class EmittersPathShape extends EmitterShapeBase {
|
|
5
6
|
constructor(position, size, fill, options) {
|
|
6
7
|
super(position, size, fill, options);
|
|
@@ -11,25 +12,26 @@ export class EmittersPathShape extends EmitterShapeBase {
|
|
|
11
12
|
this.checkContext = ctx;
|
|
12
13
|
this.points = options.points;
|
|
13
14
|
const pathData = this.points, path = new Path2D(), offset = {
|
|
14
|
-
x: position.x - size.width
|
|
15
|
-
y: position.y - size.height
|
|
15
|
+
x: position.x - size.width * half,
|
|
16
|
+
y: position.y - size.height * half,
|
|
16
17
|
};
|
|
17
18
|
for (const [index, point] of pathData.entries()) {
|
|
18
19
|
const coords = {
|
|
19
|
-
x: offset.x + (point.x * size.width) /
|
|
20
|
-
y: offset.y + (point.y * size.height) /
|
|
20
|
+
x: offset.x + (point.x * size.width) / percentDenominator,
|
|
21
|
+
y: offset.y + (point.y * size.height) / percentDenominator,
|
|
21
22
|
};
|
|
22
|
-
if (index
|
|
23
|
+
if (!index) {
|
|
23
24
|
path.moveTo(coords.x, coords.y);
|
|
24
25
|
}
|
|
25
26
|
else {
|
|
26
27
|
path.lineTo(coords.x, coords.y);
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
+
const firstIndex = 0, firstPathData = pathData[firstIndex];
|
|
31
|
+
if (firstPathData) {
|
|
30
32
|
const coords = {
|
|
31
|
-
x: offset.x + (
|
|
32
|
-
y: offset.y + (
|
|
33
|
+
x: offset.x + (firstPathData.x * size.width) / percentDenominator,
|
|
34
|
+
y: offset.y + (firstPathData.y * size.height) / percentDenominator,
|
|
33
35
|
};
|
|
34
36
|
path.lineTo(coords.x, coords.y);
|
|
35
37
|
}
|
|
@@ -41,30 +43,31 @@ export class EmittersPathShape extends EmitterShapeBase {
|
|
|
41
43
|
const ctx = this.checkContext, position = this.position, size = this.size, fill = this.fill, path = this.path, res = fill
|
|
42
44
|
? generateRandomPointWithinPath(ctx, path, position, size)
|
|
43
45
|
: generateRandomPointOnPathPerimeter(ctx, path, position, size);
|
|
44
|
-
return res ? { position: res } : null;
|
|
46
|
+
return Promise.resolve(res ? { position: res } : null);
|
|
45
47
|
}
|
|
46
48
|
resize(position, size) {
|
|
47
49
|
super.resize(position, size);
|
|
48
50
|
const pathData = this.points, path = new Path2D(), offset = {
|
|
49
|
-
x: position.x - size.width
|
|
50
|
-
y: position.y - size.height
|
|
51
|
+
x: position.x - size.width * half,
|
|
52
|
+
y: position.y - size.height * half,
|
|
51
53
|
};
|
|
52
54
|
for (const [index, point] of pathData.entries()) {
|
|
53
55
|
const coords = {
|
|
54
|
-
x: offset.x + (point.x * size.width) /
|
|
55
|
-
y: offset.y + (point.y * size.height) /
|
|
56
|
+
x: offset.x + (point.x * size.width) / percentDenominator,
|
|
57
|
+
y: offset.y + (point.y * size.height) / percentDenominator,
|
|
56
58
|
};
|
|
57
|
-
if (index
|
|
59
|
+
if (!index) {
|
|
58
60
|
path.moveTo(coords.x, coords.y);
|
|
59
61
|
}
|
|
60
62
|
else {
|
|
61
63
|
path.lineTo(coords.x, coords.y);
|
|
62
64
|
}
|
|
63
65
|
}
|
|
64
|
-
|
|
66
|
+
const firstIndex = 0, firstPathData = pathData[firstIndex];
|
|
67
|
+
if (firstPathData) {
|
|
65
68
|
const coords = {
|
|
66
|
-
x: offset.x + (
|
|
67
|
-
y: offset.y + (
|
|
69
|
+
x: offset.x + (firstPathData.x * size.width) / percentDenominator,
|
|
70
|
+
y: offset.y + (firstPathData.y * size.height) / percentDenominator,
|
|
68
71
|
};
|
|
69
72
|
path.lineTo(coords.x, coords.y);
|
|
70
73
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const defaultPosition = { x: 50, y: 50 };
|
|
1
2
|
export class EmittersPathShapeOptions {
|
|
2
3
|
constructor() {
|
|
3
4
|
this.points = [];
|
|
@@ -7,7 +8,7 @@ export class EmittersPathShapeOptions {
|
|
|
7
8
|
return;
|
|
8
9
|
}
|
|
9
10
|
if (data.points !== undefined) {
|
|
10
|
-
this.points = data.points.map((t) => ({ x: t.x ??
|
|
11
|
+
this.points = data.points.map((t) => ({ x: t.x ?? defaultPosition.x, y: t.y ?? defaultPosition.y }));
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
}
|
package/browser/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { EmittersPathShapeGenerator } from "./EmittersPathShapeGenerator.js";
|
|
2
1
|
export async function loadEmittersShapePath(engine, refresh = true) {
|
|
3
|
-
const emittersEngine = engine;
|
|
4
|
-
emittersEngine.addEmitterShapeGenerator
|
|
5
|
-
emittersEngine.addEmitterShapeGenerator("path", new EmittersPathShapeGenerator());
|
|
2
|
+
const emittersEngine = engine, { EmittersPathShapeGenerator } = await import("./EmittersPathShapeGenerator.js");
|
|
3
|
+
emittersEngine.addEmitterShapeGenerator?.("path", new EmittersPathShapeGenerator());
|
|
6
4
|
await emittersEngine.refresh(refresh);
|
|
7
5
|
}
|
package/browser/utils.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { getRandom } from "@tsparticles/engine";
|
|
2
|
+
const maxAttempts = 100, half = 0.5;
|
|
2
3
|
export function generateRandomPointWithinPath(ctx, path, center, size) {
|
|
3
4
|
let randomPoint = null;
|
|
4
|
-
for (let attempts = 0; attempts <
|
|
5
|
+
for (let attempts = 0; attempts < maxAttempts; attempts++) {
|
|
5
6
|
const tmpPoint = {
|
|
6
|
-
x: center.x + getRandom() * size.width - size.width
|
|
7
|
-
y: center.y + getRandom() * size.height - size.height
|
|
7
|
+
x: center.x + getRandom() * size.width - size.width * half,
|
|
8
|
+
y: center.y + getRandom() * size.height - size.height * half,
|
|
8
9
|
};
|
|
9
10
|
if (ctx.isPointInPath(path, tmpPoint.x, tmpPoint.y)) {
|
|
10
11
|
randomPoint = tmpPoint;
|
|
@@ -15,10 +16,10 @@ export function generateRandomPointWithinPath(ctx, path, center, size) {
|
|
|
15
16
|
}
|
|
16
17
|
export function generateRandomPointOnPathPerimeter(ctx, path, center, size) {
|
|
17
18
|
let randomPoint = null;
|
|
18
|
-
for (let attempts = 0; attempts <
|
|
19
|
+
for (let attempts = 0; attempts < maxAttempts; attempts++) {
|
|
19
20
|
const tmpPoint = {
|
|
20
|
-
x: center.x + getRandom() * size.width - size.width
|
|
21
|
-
y: center.y + getRandom() * size.height - size.height
|
|
21
|
+
x: center.x + getRandom() * size.width - size.width * half,
|
|
22
|
+
y: center.y + getRandom() * size.height - size.height * half,
|
|
22
23
|
};
|
|
23
24
|
if (ctx.isPointInStroke(path, tmpPoint.x, tmpPoint.y)) {
|
|
24
25
|
randomPoint = tmpPoint;
|
package/cjs/EmittersPathShape.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.EmittersPathShape = void 0;
|
|
|
4
4
|
const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
|
|
5
5
|
const engine_1 = require("@tsparticles/engine");
|
|
6
6
|
const utils_js_1 = require("./utils.js");
|
|
7
|
+
const half = 0.5;
|
|
7
8
|
class EmittersPathShape extends plugin_emitters_1.EmitterShapeBase {
|
|
8
9
|
constructor(position, size, fill, options) {
|
|
9
10
|
super(position, size, fill, options);
|
|
@@ -14,25 +15,26 @@ class EmittersPathShape extends plugin_emitters_1.EmitterShapeBase {
|
|
|
14
15
|
this.checkContext = ctx;
|
|
15
16
|
this.points = options.points;
|
|
16
17
|
const pathData = this.points, path = new Path2D(), offset = {
|
|
17
|
-
x: position.x - size.width
|
|
18
|
-
y: position.y - size.height
|
|
18
|
+
x: position.x - size.width * half,
|
|
19
|
+
y: position.y - size.height * half,
|
|
19
20
|
};
|
|
20
21
|
for (const [index, point] of pathData.entries()) {
|
|
21
22
|
const coords = {
|
|
22
|
-
x: offset.x + (point.x * size.width) /
|
|
23
|
-
y: offset.y + (point.y * size.height) /
|
|
23
|
+
x: offset.x + (point.x * size.width) / engine_1.percentDenominator,
|
|
24
|
+
y: offset.y + (point.y * size.height) / engine_1.percentDenominator,
|
|
24
25
|
};
|
|
25
|
-
if (index
|
|
26
|
+
if (!index) {
|
|
26
27
|
path.moveTo(coords.x, coords.y);
|
|
27
28
|
}
|
|
28
29
|
else {
|
|
29
30
|
path.lineTo(coords.x, coords.y);
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
+
const firstIndex = 0, firstPathData = pathData[firstIndex];
|
|
34
|
+
if (firstPathData) {
|
|
33
35
|
const coords = {
|
|
34
|
-
x: offset.x + (
|
|
35
|
-
y: offset.y + (
|
|
36
|
+
x: offset.x + (firstPathData.x * size.width) / engine_1.percentDenominator,
|
|
37
|
+
y: offset.y + (firstPathData.y * size.height) / engine_1.percentDenominator,
|
|
36
38
|
};
|
|
37
39
|
path.lineTo(coords.x, coords.y);
|
|
38
40
|
}
|
|
@@ -44,30 +46,31 @@ class EmittersPathShape extends plugin_emitters_1.EmitterShapeBase {
|
|
|
44
46
|
const ctx = this.checkContext, position = this.position, size = this.size, fill = this.fill, path = this.path, res = fill
|
|
45
47
|
? (0, utils_js_1.generateRandomPointWithinPath)(ctx, path, position, size)
|
|
46
48
|
: (0, utils_js_1.generateRandomPointOnPathPerimeter)(ctx, path, position, size);
|
|
47
|
-
return res ? { position: res } : null;
|
|
49
|
+
return Promise.resolve(res ? { position: res } : null);
|
|
48
50
|
}
|
|
49
51
|
resize(position, size) {
|
|
50
52
|
super.resize(position, size);
|
|
51
53
|
const pathData = this.points, path = new Path2D(), offset = {
|
|
52
|
-
x: position.x - size.width
|
|
53
|
-
y: position.y - size.height
|
|
54
|
+
x: position.x - size.width * half,
|
|
55
|
+
y: position.y - size.height * half,
|
|
54
56
|
};
|
|
55
57
|
for (const [index, point] of pathData.entries()) {
|
|
56
58
|
const coords = {
|
|
57
|
-
x: offset.x + (point.x * size.width) /
|
|
58
|
-
y: offset.y + (point.y * size.height) /
|
|
59
|
+
x: offset.x + (point.x * size.width) / engine_1.percentDenominator,
|
|
60
|
+
y: offset.y + (point.y * size.height) / engine_1.percentDenominator,
|
|
59
61
|
};
|
|
60
|
-
if (index
|
|
62
|
+
if (!index) {
|
|
61
63
|
path.moveTo(coords.x, coords.y);
|
|
62
64
|
}
|
|
63
65
|
else {
|
|
64
66
|
path.lineTo(coords.x, coords.y);
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
|
-
|
|
69
|
+
const firstIndex = 0, firstPathData = pathData[firstIndex];
|
|
70
|
+
if (firstPathData) {
|
|
68
71
|
const coords = {
|
|
69
|
-
x: offset.x + (
|
|
70
|
-
y: offset.y + (
|
|
72
|
+
x: offset.x + (firstPathData.x * size.width) / engine_1.percentDenominator,
|
|
73
|
+
y: offset.y + (firstPathData.y * size.height) / engine_1.percentDenominator,
|
|
71
74
|
};
|
|
72
75
|
path.lineTo(coords.x, coords.y);
|
|
73
76
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EmittersPathShapeOptions = void 0;
|
|
4
|
+
const defaultPosition = { x: 50, y: 50 };
|
|
4
5
|
class EmittersPathShapeOptions {
|
|
5
6
|
constructor() {
|
|
6
7
|
this.points = [];
|
|
@@ -10,7 +11,7 @@ class EmittersPathShapeOptions {
|
|
|
10
11
|
return;
|
|
11
12
|
}
|
|
12
13
|
if (data.points !== undefined) {
|
|
13
|
-
this.points = data.points.map((t) => ({ x: t.x ??
|
|
14
|
+
this.points = data.points.map((t) => ({ x: t.x ?? defaultPosition.x, y: t.y ?? defaultPosition.y }));
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
}
|
package/cjs/index.js
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
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.loadEmittersShapePath = void 0;
|
|
4
|
-
const EmittersPathShapeGenerator_js_1 = require("./EmittersPathShapeGenerator.js");
|
|
5
27
|
async function loadEmittersShapePath(engine, refresh = true) {
|
|
6
|
-
const emittersEngine = engine;
|
|
7
|
-
emittersEngine.addEmitterShapeGenerator
|
|
8
|
-
emittersEngine.addEmitterShapeGenerator("path", new EmittersPathShapeGenerator_js_1.EmittersPathShapeGenerator());
|
|
28
|
+
const emittersEngine = engine, { EmittersPathShapeGenerator } = await Promise.resolve().then(() => __importStar(require("./EmittersPathShapeGenerator.js")));
|
|
29
|
+
emittersEngine.addEmitterShapeGenerator?.("path", new EmittersPathShapeGenerator());
|
|
9
30
|
await emittersEngine.refresh(refresh);
|
|
10
31
|
}
|
|
11
32
|
exports.loadEmittersShapePath = loadEmittersShapePath;
|
package/cjs/utils.js
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateRandomPointOnPathPerimeter = exports.generateRandomPointWithinPath = void 0;
|
|
4
4
|
const engine_1 = require("@tsparticles/engine");
|
|
5
|
+
const maxAttempts = 100, half = 0.5;
|
|
5
6
|
function generateRandomPointWithinPath(ctx, path, center, size) {
|
|
6
7
|
let randomPoint = null;
|
|
7
|
-
for (let attempts = 0; attempts <
|
|
8
|
+
for (let attempts = 0; attempts < maxAttempts; attempts++) {
|
|
8
9
|
const tmpPoint = {
|
|
9
|
-
x: center.x + (0, engine_1.getRandom)() * size.width - size.width
|
|
10
|
-
y: center.y + (0, engine_1.getRandom)() * size.height - size.height
|
|
10
|
+
x: center.x + (0, engine_1.getRandom)() * size.width - size.width * half,
|
|
11
|
+
y: center.y + (0, engine_1.getRandom)() * size.height - size.height * half,
|
|
11
12
|
};
|
|
12
13
|
if (ctx.isPointInPath(path, tmpPoint.x, tmpPoint.y)) {
|
|
13
14
|
randomPoint = tmpPoint;
|
|
@@ -19,10 +20,10 @@ function generateRandomPointWithinPath(ctx, path, center, size) {
|
|
|
19
20
|
exports.generateRandomPointWithinPath = generateRandomPointWithinPath;
|
|
20
21
|
function generateRandomPointOnPathPerimeter(ctx, path, center, size) {
|
|
21
22
|
let randomPoint = null;
|
|
22
|
-
for (let attempts = 0; attempts <
|
|
23
|
+
for (let attempts = 0; attempts < maxAttempts; attempts++) {
|
|
23
24
|
const tmpPoint = {
|
|
24
|
-
x: center.x + (0, engine_1.getRandom)() * size.width - size.width
|
|
25
|
-
y: center.y + (0, engine_1.getRandom)() * size.height - size.height
|
|
25
|
+
x: center.x + (0, engine_1.getRandom)() * size.width - size.width * half,
|
|
26
|
+
y: center.y + (0, engine_1.getRandom)() * size.height - size.height * half,
|
|
26
27
|
};
|
|
27
28
|
if (ctx.isPointInStroke(path, tmpPoint.x, tmpPoint.y)) {
|
|
28
29
|
randomPoint = tmpPoint;
|
|
@@ -0,0 +1,60 @@
|
|
|
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.0
|
|
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_plugin_emitters_shape_path"] = this["webpackChunk_tsparticles_plugin_emitters_shape_path"] || []).push([["dist_browser_EmittersPathShapeGenerator_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "./dist/browser/EmittersPathShape.js":
|
|
21
|
+
/*!*******************************************!*\
|
|
22
|
+
!*** ./dist/browser/EmittersPathShape.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 */ EmittersPathShape: () => (/* binding */ EmittersPathShape)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/plugin-emitters */ \"@tsparticles/plugin-emitters\");\n/* harmony import */ var _tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ \"./dist/browser/utils.js\");\n\n\n\nconst half = 0.5;\nclass EmittersPathShape extends _tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_0__.EmitterShapeBase {\n constructor(position, size, fill, options) {\n super(position, size, fill, options);\n const ctx = document.createElement(\"canvas\").getContext(\"2d\");\n if (!ctx) {\n throw new Error(`${_tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.errorPrefix} No 2d context available`);\n }\n this.checkContext = ctx;\n this.points = options.points;\n const pathData = this.points,\n path = new Path2D(),\n offset = {\n x: position.x - size.width * half,\n y: position.y - size.height * half\n };\n for (const [index, point] of pathData.entries()) {\n const coords = {\n x: offset.x + point.x * size.width / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.percentDenominator,\n y: offset.y + point.y * size.height / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.percentDenominator\n };\n if (!index) {\n path.moveTo(coords.x, coords.y);\n } else {\n path.lineTo(coords.x, coords.y);\n }\n }\n const firstIndex = 0,\n firstPathData = pathData[firstIndex];\n if (firstPathData) {\n const coords = {\n x: offset.x + firstPathData.x * size.width / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.percentDenominator,\n y: offset.y + firstPathData.y * size.height / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.percentDenominator\n };\n path.lineTo(coords.x, coords.y);\n }\n this.path = path;\n }\n async init() {}\n async randomPosition() {\n const ctx = this.checkContext,\n position = this.position,\n size = this.size,\n fill = this.fill,\n path = this.path,\n res = fill ? (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.generateRandomPointWithinPath)(ctx, path, position, size) : (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.generateRandomPointOnPathPerimeter)(ctx, path, position, size);\n return Promise.resolve(res ? {\n position: res\n } : null);\n }\n resize(position, size) {\n super.resize(position, size);\n const pathData = this.points,\n path = new Path2D(),\n offset = {\n x: position.x - size.width * half,\n y: position.y - size.height * half\n };\n for (const [index, point] of pathData.entries()) {\n const coords = {\n x: offset.x + point.x * size.width / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.percentDenominator,\n y: offset.y + point.y * size.height / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.percentDenominator\n };\n if (!index) {\n path.moveTo(coords.x, coords.y);\n } else {\n path.lineTo(coords.x, coords.y);\n }\n }\n const firstIndex = 0,\n firstPathData = pathData[firstIndex];\n if (firstPathData) {\n const coords = {\n x: offset.x + firstPathData.x * size.width / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.percentDenominator,\n y: offset.y + firstPathData.y * size.height / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.percentDenominator\n };\n path.lineTo(coords.x, coords.y);\n }\n this.path = path;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters-shape-path/./dist/browser/EmittersPathShape.js?");
|
|
27
|
+
|
|
28
|
+
/***/ }),
|
|
29
|
+
|
|
30
|
+
/***/ "./dist/browser/EmittersPathShapeGenerator.js":
|
|
31
|
+
/*!****************************************************!*\
|
|
32
|
+
!*** ./dist/browser/EmittersPathShapeGenerator.js ***!
|
|
33
|
+
\****************************************************/
|
|
34
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
35
|
+
|
|
36
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmittersPathShapeGenerator: () => (/* binding */ EmittersPathShapeGenerator)\n/* harmony export */ });\n/* harmony import */ var _EmittersPathShape_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./EmittersPathShape.js */ \"./dist/browser/EmittersPathShape.js\");\n/* harmony import */ var _Options_Classes_EmittersPathShapeOptions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Options/Classes/EmittersPathShapeOptions.js */ \"./dist/browser/Options/Classes/EmittersPathShapeOptions.js\");\n\n\nclass EmittersPathShapeGenerator {\n generate(position, size, fill, options) {\n const shapeOptions = new _Options_Classes_EmittersPathShapeOptions_js__WEBPACK_IMPORTED_MODULE_0__.EmittersPathShapeOptions();\n shapeOptions.load(options);\n return new _EmittersPathShape_js__WEBPACK_IMPORTED_MODULE_1__.EmittersPathShape(position, size, fill, shapeOptions);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters-shape-path/./dist/browser/EmittersPathShapeGenerator.js?");
|
|
37
|
+
|
|
38
|
+
/***/ }),
|
|
39
|
+
|
|
40
|
+
/***/ "./dist/browser/Options/Classes/EmittersPathShapeOptions.js":
|
|
41
|
+
/*!******************************************************************!*\
|
|
42
|
+
!*** ./dist/browser/Options/Classes/EmittersPathShapeOptions.js ***!
|
|
43
|
+
\******************************************************************/
|
|
44
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
45
|
+
|
|
46
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmittersPathShapeOptions: () => (/* binding */ EmittersPathShapeOptions)\n/* harmony export */ });\nconst defaultPosition = {\n x: 50,\n y: 50\n};\nclass EmittersPathShapeOptions {\n constructor() {\n this.points = [];\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.points !== undefined) {\n this.points = data.points.map(t => ({\n x: t.x ?? defaultPosition.x,\n y: t.y ?? defaultPosition.y\n }));\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters-shape-path/./dist/browser/Options/Classes/EmittersPathShapeOptions.js?");
|
|
47
|
+
|
|
48
|
+
/***/ }),
|
|
49
|
+
|
|
50
|
+
/***/ "./dist/browser/utils.js":
|
|
51
|
+
/*!*******************************!*\
|
|
52
|
+
!*** ./dist/browser/utils.js ***!
|
|
53
|
+
\*******************************/
|
|
54
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
55
|
+
|
|
56
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ generateRandomPointOnPathPerimeter: () => (/* binding */ generateRandomPointOnPathPerimeter),\n/* harmony export */ generateRandomPointWithinPath: () => (/* binding */ generateRandomPointWithinPath)\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 maxAttempts = 100,\n half = 0.5;\nfunction generateRandomPointWithinPath(ctx, path, center, size) {\n let randomPoint = null;\n for (let attempts = 0; attempts < maxAttempts; attempts++) {\n const tmpPoint = {\n x: center.x + (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * size.width - size.width * half,\n y: center.y + (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * size.height - size.height * half\n };\n if (ctx.isPointInPath(path, tmpPoint.x, tmpPoint.y)) {\n randomPoint = tmpPoint;\n break;\n }\n }\n return randomPoint;\n}\nfunction generateRandomPointOnPathPerimeter(ctx, path, center, size) {\n let randomPoint = null;\n for (let attempts = 0; attempts < maxAttempts; attempts++) {\n const tmpPoint = {\n x: center.x + (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * size.width - size.width * half,\n y: center.y + (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * size.height - size.height * half\n };\n if (ctx.isPointInStroke(path, tmpPoint.x, tmpPoint.y)) {\n randomPoint = tmpPoint;\n break;\n }\n }\n return randomPoint;\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters-shape-path/./dist/browser/utils.js?");
|
|
57
|
+
|
|
58
|
+
/***/ })
|
|
59
|
+
|
|
60
|
+
}]);
|
package/esm/EmittersPathShape.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EmitterShapeBase } from "@tsparticles/plugin-emitters";
|
|
2
|
-
import { errorPrefix } from "@tsparticles/engine";
|
|
2
|
+
import { errorPrefix, percentDenominator } from "@tsparticles/engine";
|
|
3
3
|
import { generateRandomPointOnPathPerimeter, generateRandomPointWithinPath } from "./utils.js";
|
|
4
|
+
const half = 0.5;
|
|
4
5
|
export class EmittersPathShape extends EmitterShapeBase {
|
|
5
6
|
constructor(position, size, fill, options) {
|
|
6
7
|
super(position, size, fill, options);
|
|
@@ -11,25 +12,26 @@ export class EmittersPathShape extends EmitterShapeBase {
|
|
|
11
12
|
this.checkContext = ctx;
|
|
12
13
|
this.points = options.points;
|
|
13
14
|
const pathData = this.points, path = new Path2D(), offset = {
|
|
14
|
-
x: position.x - size.width
|
|
15
|
-
y: position.y - size.height
|
|
15
|
+
x: position.x - size.width * half,
|
|
16
|
+
y: position.y - size.height * half,
|
|
16
17
|
};
|
|
17
18
|
for (const [index, point] of pathData.entries()) {
|
|
18
19
|
const coords = {
|
|
19
|
-
x: offset.x + (point.x * size.width) /
|
|
20
|
-
y: offset.y + (point.y * size.height) /
|
|
20
|
+
x: offset.x + (point.x * size.width) / percentDenominator,
|
|
21
|
+
y: offset.y + (point.y * size.height) / percentDenominator,
|
|
21
22
|
};
|
|
22
|
-
if (index
|
|
23
|
+
if (!index) {
|
|
23
24
|
path.moveTo(coords.x, coords.y);
|
|
24
25
|
}
|
|
25
26
|
else {
|
|
26
27
|
path.lineTo(coords.x, coords.y);
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
+
const firstIndex = 0, firstPathData = pathData[firstIndex];
|
|
31
|
+
if (firstPathData) {
|
|
30
32
|
const coords = {
|
|
31
|
-
x: offset.x + (
|
|
32
|
-
y: offset.y + (
|
|
33
|
+
x: offset.x + (firstPathData.x * size.width) / percentDenominator,
|
|
34
|
+
y: offset.y + (firstPathData.y * size.height) / percentDenominator,
|
|
33
35
|
};
|
|
34
36
|
path.lineTo(coords.x, coords.y);
|
|
35
37
|
}
|
|
@@ -41,30 +43,31 @@ export class EmittersPathShape extends EmitterShapeBase {
|
|
|
41
43
|
const ctx = this.checkContext, position = this.position, size = this.size, fill = this.fill, path = this.path, res = fill
|
|
42
44
|
? generateRandomPointWithinPath(ctx, path, position, size)
|
|
43
45
|
: generateRandomPointOnPathPerimeter(ctx, path, position, size);
|
|
44
|
-
return res ? { position: res } : null;
|
|
46
|
+
return Promise.resolve(res ? { position: res } : null);
|
|
45
47
|
}
|
|
46
48
|
resize(position, size) {
|
|
47
49
|
super.resize(position, size);
|
|
48
50
|
const pathData = this.points, path = new Path2D(), offset = {
|
|
49
|
-
x: position.x - size.width
|
|
50
|
-
y: position.y - size.height
|
|
51
|
+
x: position.x - size.width * half,
|
|
52
|
+
y: position.y - size.height * half,
|
|
51
53
|
};
|
|
52
54
|
for (const [index, point] of pathData.entries()) {
|
|
53
55
|
const coords = {
|
|
54
|
-
x: offset.x + (point.x * size.width) /
|
|
55
|
-
y: offset.y + (point.y * size.height) /
|
|
56
|
+
x: offset.x + (point.x * size.width) / percentDenominator,
|
|
57
|
+
y: offset.y + (point.y * size.height) / percentDenominator,
|
|
56
58
|
};
|
|
57
|
-
if (index
|
|
59
|
+
if (!index) {
|
|
58
60
|
path.moveTo(coords.x, coords.y);
|
|
59
61
|
}
|
|
60
62
|
else {
|
|
61
63
|
path.lineTo(coords.x, coords.y);
|
|
62
64
|
}
|
|
63
65
|
}
|
|
64
|
-
|
|
66
|
+
const firstIndex = 0, firstPathData = pathData[firstIndex];
|
|
67
|
+
if (firstPathData) {
|
|
65
68
|
const coords = {
|
|
66
|
-
x: offset.x + (
|
|
67
|
-
y: offset.y + (
|
|
69
|
+
x: offset.x + (firstPathData.x * size.width) / percentDenominator,
|
|
70
|
+
y: offset.y + (firstPathData.y * size.height) / percentDenominator,
|
|
68
71
|
};
|
|
69
72
|
path.lineTo(coords.x, coords.y);
|
|
70
73
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const defaultPosition = { x: 50, y: 50 };
|
|
1
2
|
export class EmittersPathShapeOptions {
|
|
2
3
|
constructor() {
|
|
3
4
|
this.points = [];
|
|
@@ -7,7 +8,7 @@ export class EmittersPathShapeOptions {
|
|
|
7
8
|
return;
|
|
8
9
|
}
|
|
9
10
|
if (data.points !== undefined) {
|
|
10
|
-
this.points = data.points.map((t) => ({ x: t.x ??
|
|
11
|
+
this.points = data.points.map((t) => ({ x: t.x ?? defaultPosition.x, y: t.y ?? defaultPosition.y }));
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { EmittersPathShapeGenerator } from "./EmittersPathShapeGenerator.js";
|
|
2
1
|
export async function loadEmittersShapePath(engine, refresh = true) {
|
|
3
|
-
const emittersEngine = engine;
|
|
4
|
-
emittersEngine.addEmitterShapeGenerator
|
|
5
|
-
emittersEngine.addEmitterShapeGenerator("path", new EmittersPathShapeGenerator());
|
|
2
|
+
const emittersEngine = engine, { EmittersPathShapeGenerator } = await import("./EmittersPathShapeGenerator.js");
|
|
3
|
+
emittersEngine.addEmitterShapeGenerator?.("path", new EmittersPathShapeGenerator());
|
|
6
4
|
await emittersEngine.refresh(refresh);
|
|
7
5
|
}
|
package/esm/utils.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { getRandom } from "@tsparticles/engine";
|
|
2
|
+
const maxAttempts = 100, half = 0.5;
|
|
2
3
|
export function generateRandomPointWithinPath(ctx, path, center, size) {
|
|
3
4
|
let randomPoint = null;
|
|
4
|
-
for (let attempts = 0; attempts <
|
|
5
|
+
for (let attempts = 0; attempts < maxAttempts; attempts++) {
|
|
5
6
|
const tmpPoint = {
|
|
6
|
-
x: center.x + getRandom() * size.width - size.width
|
|
7
|
-
y: center.y + getRandom() * size.height - size.height
|
|
7
|
+
x: center.x + getRandom() * size.width - size.width * half,
|
|
8
|
+
y: center.y + getRandom() * size.height - size.height * half,
|
|
8
9
|
};
|
|
9
10
|
if (ctx.isPointInPath(path, tmpPoint.x, tmpPoint.y)) {
|
|
10
11
|
randomPoint = tmpPoint;
|
|
@@ -15,10 +16,10 @@ export function generateRandomPointWithinPath(ctx, path, center, size) {
|
|
|
15
16
|
}
|
|
16
17
|
export function generateRandomPointOnPathPerimeter(ctx, path, center, size) {
|
|
17
18
|
let randomPoint = null;
|
|
18
|
-
for (let attempts = 0; attempts <
|
|
19
|
+
for (let attempts = 0; attempts < maxAttempts; attempts++) {
|
|
19
20
|
const tmpPoint = {
|
|
20
|
-
x: center.x + getRandom() * size.width - size.width
|
|
21
|
-
y: center.y + getRandom() * size.height - size.height
|
|
21
|
+
x: center.x + getRandom() * size.width - size.width * half,
|
|
22
|
+
y: center.y + getRandom() * size.height - size.height * half,
|
|
22
23
|
};
|
|
23
24
|
if (ctx.isPointInStroke(path, tmpPoint.x, tmpPoint.y)) {
|
|
24
25
|
randomPoint = tmpPoint;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-emitters-shape-path",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "tsParticles emitters shape path plugin",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
"./package.json": "./package.json"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@tsparticles/engine": "^3.0
|
|
104
|
-
"@tsparticles/plugin-emitters": "^3.0
|
|
103
|
+
"@tsparticles/engine": "^3.2.0",
|
|
104
|
+
"@tsparticles/plugin-emitters": "^3.2.0"
|
|
105
105
|
},
|
|
106
106
|
"publishConfig": {
|
|
107
107
|
"access": "public"
|
package/report.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8"/>
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
6
|
-
<title>@tsparticles/plugin-emitters-shape-path [
|
|
6
|
+
<title>@tsparticles/plugin-emitters-shape-path [31 Jan 2024 at 02:13]</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>
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
<body>
|
|
32
32
|
<div id="app"></div>
|
|
33
33
|
<script>
|
|
34
|
-
window.chartData = [
|
|
35
|
-
window.entrypoints = ["tsparticles.plugin.emitters.shape.path
|
|
34
|
+
window.chartData = [];
|
|
35
|
+
window.entrypoints = ["tsparticles.plugin.emitters.shape.path.min"];
|
|
36
36
|
window.defaultSizes = "parsed";
|
|
37
37
|
</script>
|
|
38
38
|
</body>
|