@tsparticles/plugin-emitters-shape-canvas 4.1.3 → 4.2.1
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/Options/Classes/EmittersCanvasShapeOptions.js +5 -12
- package/browser/Options/Classes/PixelsOptions.js +1 -4
- package/browser/Options/Classes/TextFontOptions.js +5 -12
- package/browser/Options/Classes/TextLinesOptions.js +2 -6
- package/browser/Options/Classes/TextOptions.js +4 -10
- package/browser/index.js +1 -1
- package/browser/index.lazy.js +1 -1
- package/cjs/Options/Classes/EmittersCanvasShapeOptions.js +5 -12
- package/cjs/Options/Classes/PixelsOptions.js +1 -4
- package/cjs/Options/Classes/TextFontOptions.js +5 -12
- package/cjs/Options/Classes/TextLinesOptions.js +2 -6
- package/cjs/Options/Classes/TextOptions.js +4 -10
- package/cjs/index.js +1 -1
- package/cjs/index.lazy.js +1 -1
- package/esm/Options/Classes/EmittersCanvasShapeOptions.js +5 -12
- package/esm/Options/Classes/PixelsOptions.js +1 -4
- package/esm/Options/Classes/TextFontOptions.js +5 -12
- package/esm/Options/Classes/TextLinesOptions.js +2 -6
- package/esm/Options/Classes/TextOptions.js +4 -10
- package/esm/index.js +1 -1
- package/esm/index.lazy.js +1 -1
- package/package.json +4 -4
- package/report.html +1 -1
- package/tsparticles.plugin.emitters.shape.canvas.js +19 -46
- package/tsparticles.plugin.emitters.shape.canvas.min.js +1 -1
- package/types/Options/Classes/EmittersCanvasShapeOptions.d.ts +3 -4
- package/types/Options/Classes/PixelsOptions.d.ts +0 -1
- package/types/Options/Classes/TextFontOptions.d.ts +0 -1
- package/types/Options/Classes/TextLinesOptions.d.ts +0 -1
- package/types/Options/Classes/TextOptions.d.ts +2 -3
|
@@ -4,19 +4,12 @@ import { TextOptions } from "./TextOptions.js";
|
|
|
4
4
|
const minAlpha = 0;
|
|
5
5
|
export class EmittersCanvasShapeOptions {
|
|
6
6
|
element;
|
|
7
|
-
filter;
|
|
8
7
|
image;
|
|
9
|
-
pixels;
|
|
10
|
-
scale;
|
|
11
|
-
selector;
|
|
12
|
-
text;
|
|
13
|
-
|
|
14
|
-
this.filter = (pixel) => pixel.a > minAlpha;
|
|
15
|
-
this.pixels = new PixelsOptions();
|
|
16
|
-
this.scale = 1;
|
|
17
|
-
this.selector = "";
|
|
18
|
-
this.text = new TextOptions();
|
|
19
|
-
}
|
|
8
|
+
pixels = new PixelsOptions();
|
|
9
|
+
scale = 1;
|
|
10
|
+
selector = "";
|
|
11
|
+
text = new TextOptions();
|
|
12
|
+
filter = (pixel) => pixel.a > minAlpha;
|
|
20
13
|
load(data) {
|
|
21
14
|
if (isNull(data)) {
|
|
22
15
|
return;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { isNull } from "@tsparticles/engine";
|
|
2
2
|
export class TextFontOptions {
|
|
3
|
-
family;
|
|
4
|
-
size;
|
|
5
|
-
style;
|
|
6
|
-
variant;
|
|
7
|
-
weight;
|
|
8
|
-
constructor() {
|
|
9
|
-
this.family = "Verdana";
|
|
10
|
-
this.size = 32;
|
|
11
|
-
this.style = "";
|
|
12
|
-
this.variant = "";
|
|
13
|
-
this.weight = "";
|
|
14
|
-
}
|
|
3
|
+
family = "Verdana";
|
|
4
|
+
size = 32;
|
|
5
|
+
style = "";
|
|
6
|
+
variant = "";
|
|
7
|
+
weight = "";
|
|
15
8
|
load(data) {
|
|
16
9
|
if (isNull(data)) {
|
|
17
10
|
return;
|
|
@@ -2,16 +2,10 @@ import { isNull } from "@tsparticles/engine";
|
|
|
2
2
|
import { TextFontOptions } from "./TextFontOptions.js";
|
|
3
3
|
import { TextLinesOptions } from "./TextLinesOptions.js";
|
|
4
4
|
export class TextOptions {
|
|
5
|
-
color;
|
|
6
|
-
font;
|
|
7
|
-
lines;
|
|
8
|
-
text;
|
|
9
|
-
constructor() {
|
|
10
|
-
this.color = "#000000";
|
|
11
|
-
this.font = new TextFontOptions();
|
|
12
|
-
this.lines = new TextLinesOptions();
|
|
13
|
-
this.text = "";
|
|
14
|
-
}
|
|
5
|
+
color = "#000000";
|
|
6
|
+
font = new TextFontOptions();
|
|
7
|
+
lines = new TextLinesOptions();
|
|
8
|
+
text = "";
|
|
15
9
|
load(data) {
|
|
16
10
|
if (isNull(data)) {
|
|
17
11
|
return;
|
package/browser/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ensureEmittersPluginLoaded } from "@tsparticles/plugin-emitters";
|
|
2
2
|
import { EmittersCanvasShapeGenerator } from "./EmittersCanvasShapeGenerator.js";
|
|
3
3
|
export async function loadEmittersShapeCanvas(engine) {
|
|
4
|
-
engine.checkVersion("4.1
|
|
4
|
+
engine.checkVersion("4.2.1");
|
|
5
5
|
await engine.pluginManager.register((e) => {
|
|
6
6
|
ensureEmittersPluginLoaded(e);
|
|
7
7
|
e.pluginManager.addEmitterShapeGenerator?.("canvas", new EmittersCanvasShapeGenerator());
|
package/browser/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadEmittersShapeCanvas(engine) {
|
|
2
|
-
engine.checkVersion("4.1
|
|
2
|
+
engine.checkVersion("4.2.1");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ensureEmittersPluginLoaded } = await import("@tsparticles/plugin-emitters/lazy");
|
|
5
5
|
ensureEmittersPluginLoaded(e);
|
|
@@ -4,19 +4,12 @@ import { TextOptions } from "./TextOptions.js";
|
|
|
4
4
|
const minAlpha = 0;
|
|
5
5
|
export class EmittersCanvasShapeOptions {
|
|
6
6
|
element;
|
|
7
|
-
filter;
|
|
8
7
|
image;
|
|
9
|
-
pixels;
|
|
10
|
-
scale;
|
|
11
|
-
selector;
|
|
12
|
-
text;
|
|
13
|
-
|
|
14
|
-
this.filter = (pixel) => pixel.a > minAlpha;
|
|
15
|
-
this.pixels = new PixelsOptions();
|
|
16
|
-
this.scale = 1;
|
|
17
|
-
this.selector = "";
|
|
18
|
-
this.text = new TextOptions();
|
|
19
|
-
}
|
|
8
|
+
pixels = new PixelsOptions();
|
|
9
|
+
scale = 1;
|
|
10
|
+
selector = "";
|
|
11
|
+
text = new TextOptions();
|
|
12
|
+
filter = (pixel) => pixel.a > minAlpha;
|
|
20
13
|
load(data) {
|
|
21
14
|
if (isNull(data)) {
|
|
22
15
|
return;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { isNull } from "@tsparticles/engine";
|
|
2
2
|
export class TextFontOptions {
|
|
3
|
-
family;
|
|
4
|
-
size;
|
|
5
|
-
style;
|
|
6
|
-
variant;
|
|
7
|
-
weight;
|
|
8
|
-
constructor() {
|
|
9
|
-
this.family = "Verdana";
|
|
10
|
-
this.size = 32;
|
|
11
|
-
this.style = "";
|
|
12
|
-
this.variant = "";
|
|
13
|
-
this.weight = "";
|
|
14
|
-
}
|
|
3
|
+
family = "Verdana";
|
|
4
|
+
size = 32;
|
|
5
|
+
style = "";
|
|
6
|
+
variant = "";
|
|
7
|
+
weight = "";
|
|
15
8
|
load(data) {
|
|
16
9
|
if (isNull(data)) {
|
|
17
10
|
return;
|
|
@@ -2,16 +2,10 @@ import { isNull } from "@tsparticles/engine";
|
|
|
2
2
|
import { TextFontOptions } from "./TextFontOptions.js";
|
|
3
3
|
import { TextLinesOptions } from "./TextLinesOptions.js";
|
|
4
4
|
export class TextOptions {
|
|
5
|
-
color;
|
|
6
|
-
font;
|
|
7
|
-
lines;
|
|
8
|
-
text;
|
|
9
|
-
constructor() {
|
|
10
|
-
this.color = "#000000";
|
|
11
|
-
this.font = new TextFontOptions();
|
|
12
|
-
this.lines = new TextLinesOptions();
|
|
13
|
-
this.text = "";
|
|
14
|
-
}
|
|
5
|
+
color = "#000000";
|
|
6
|
+
font = new TextFontOptions();
|
|
7
|
+
lines = new TextLinesOptions();
|
|
8
|
+
text = "";
|
|
15
9
|
load(data) {
|
|
16
10
|
if (isNull(data)) {
|
|
17
11
|
return;
|
package/cjs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ensureEmittersPluginLoaded } from "@tsparticles/plugin-emitters";
|
|
2
2
|
import { EmittersCanvasShapeGenerator } from "./EmittersCanvasShapeGenerator.js";
|
|
3
3
|
export async function loadEmittersShapeCanvas(engine) {
|
|
4
|
-
engine.checkVersion("4.1
|
|
4
|
+
engine.checkVersion("4.2.1");
|
|
5
5
|
await engine.pluginManager.register((e) => {
|
|
6
6
|
ensureEmittersPluginLoaded(e);
|
|
7
7
|
e.pluginManager.addEmitterShapeGenerator?.("canvas", new EmittersCanvasShapeGenerator());
|
package/cjs/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadEmittersShapeCanvas(engine) {
|
|
2
|
-
engine.checkVersion("4.1
|
|
2
|
+
engine.checkVersion("4.2.1");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ensureEmittersPluginLoaded } = await import("@tsparticles/plugin-emitters/lazy");
|
|
5
5
|
ensureEmittersPluginLoaded(e);
|
|
@@ -4,19 +4,12 @@ import { TextOptions } from "./TextOptions.js";
|
|
|
4
4
|
const minAlpha = 0;
|
|
5
5
|
export class EmittersCanvasShapeOptions {
|
|
6
6
|
element;
|
|
7
|
-
filter;
|
|
8
7
|
image;
|
|
9
|
-
pixels;
|
|
10
|
-
scale;
|
|
11
|
-
selector;
|
|
12
|
-
text;
|
|
13
|
-
|
|
14
|
-
this.filter = (pixel) => pixel.a > minAlpha;
|
|
15
|
-
this.pixels = new PixelsOptions();
|
|
16
|
-
this.scale = 1;
|
|
17
|
-
this.selector = "";
|
|
18
|
-
this.text = new TextOptions();
|
|
19
|
-
}
|
|
8
|
+
pixels = new PixelsOptions();
|
|
9
|
+
scale = 1;
|
|
10
|
+
selector = "";
|
|
11
|
+
text = new TextOptions();
|
|
12
|
+
filter = (pixel) => pixel.a > minAlpha;
|
|
20
13
|
load(data) {
|
|
21
14
|
if (isNull(data)) {
|
|
22
15
|
return;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { isNull } from "@tsparticles/engine";
|
|
2
2
|
export class TextFontOptions {
|
|
3
|
-
family;
|
|
4
|
-
size;
|
|
5
|
-
style;
|
|
6
|
-
variant;
|
|
7
|
-
weight;
|
|
8
|
-
constructor() {
|
|
9
|
-
this.family = "Verdana";
|
|
10
|
-
this.size = 32;
|
|
11
|
-
this.style = "";
|
|
12
|
-
this.variant = "";
|
|
13
|
-
this.weight = "";
|
|
14
|
-
}
|
|
3
|
+
family = "Verdana";
|
|
4
|
+
size = 32;
|
|
5
|
+
style = "";
|
|
6
|
+
variant = "";
|
|
7
|
+
weight = "";
|
|
15
8
|
load(data) {
|
|
16
9
|
if (isNull(data)) {
|
|
17
10
|
return;
|
|
@@ -2,16 +2,10 @@ import { isNull } from "@tsparticles/engine";
|
|
|
2
2
|
import { TextFontOptions } from "./TextFontOptions.js";
|
|
3
3
|
import { TextLinesOptions } from "./TextLinesOptions.js";
|
|
4
4
|
export class TextOptions {
|
|
5
|
-
color;
|
|
6
|
-
font;
|
|
7
|
-
lines;
|
|
8
|
-
text;
|
|
9
|
-
constructor() {
|
|
10
|
-
this.color = "#000000";
|
|
11
|
-
this.font = new TextFontOptions();
|
|
12
|
-
this.lines = new TextLinesOptions();
|
|
13
|
-
this.text = "";
|
|
14
|
-
}
|
|
5
|
+
color = "#000000";
|
|
6
|
+
font = new TextFontOptions();
|
|
7
|
+
lines = new TextLinesOptions();
|
|
8
|
+
text = "";
|
|
15
9
|
load(data) {
|
|
16
10
|
if (isNull(data)) {
|
|
17
11
|
return;
|
package/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ensureEmittersPluginLoaded } from "@tsparticles/plugin-emitters";
|
|
2
2
|
import { EmittersCanvasShapeGenerator } from "./EmittersCanvasShapeGenerator.js";
|
|
3
3
|
export async function loadEmittersShapeCanvas(engine) {
|
|
4
|
-
engine.checkVersion("4.1
|
|
4
|
+
engine.checkVersion("4.2.1");
|
|
5
5
|
await engine.pluginManager.register((e) => {
|
|
6
6
|
ensureEmittersPluginLoaded(e);
|
|
7
7
|
e.pluginManager.addEmitterShapeGenerator?.("canvas", new EmittersCanvasShapeGenerator());
|
package/esm/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadEmittersShapeCanvas(engine) {
|
|
2
|
-
engine.checkVersion("4.1
|
|
2
|
+
engine.checkVersion("4.2.1");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ensureEmittersPluginLoaded } = await import("@tsparticles/plugin-emitters/lazy");
|
|
5
5
|
ensureEmittersPluginLoaded(e);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-emitters-shape-canvas",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "tsParticles emitters shape canvas plugin",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -106,14 +106,14 @@
|
|
|
106
106
|
"./package.json": "./package.json"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
109
|
-
"@tsparticles/engine": "4.1
|
|
110
|
-
"@tsparticles/plugin-emitters": "4.1
|
|
109
|
+
"@tsparticles/engine": "4.2.1",
|
|
110
|
+
"@tsparticles/plugin-emitters": "4.2.1"
|
|
111
111
|
},
|
|
112
112
|
"publishConfig": {
|
|
113
113
|
"access": "public"
|
|
114
114
|
},
|
|
115
115
|
"type": "module",
|
|
116
116
|
"dependencies": {
|
|
117
|
-
"@tsparticles/canvas-utils": "4.1
|
|
117
|
+
"@tsparticles/canvas-utils": "4.2.1"
|
|
118
118
|
}
|
|
119
119
|
}
|
package/report.html
CHANGED
|
@@ -4930,7 +4930,7 @@ var drawChart = (function (exports) {
|
|
|
4930
4930
|
</script>
|
|
4931
4931
|
<script>
|
|
4932
4932
|
/*<!--*/
|
|
4933
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"tsparticles.plugin.emitters.shape.canvas.js","children":[{"name":"dist/browser","children":[{"uid":"
|
|
4933
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"tsparticles.plugin.emitters.shape.canvas.js","children":[{"name":"dist/browser","children":[{"uid":"8249ad99-1","name":"EmittersCanvasShape.js"},{"name":"Options/Classes","children":[{"uid":"8249ad99-3","name":"PixelsOptions.js"},{"uid":"8249ad99-5","name":"TextFontOptions.js"},{"uid":"8249ad99-7","name":"TextLinesOptions.js"},{"uid":"8249ad99-9","name":"TextOptions.js"},{"uid":"8249ad99-11","name":"EmittersCanvasShapeOptions.js"}]},{"uid":"8249ad99-13","name":"EmittersCanvasShapeGenerator.js"},{"uid":"8249ad99-15","name":"index.js"},{"uid":"8249ad99-17","name":"browser.js"}]}]}],"isRoot":true},"nodeParts":{"8249ad99-1":{"renderedLength":3767,"gzipLength":0,"brotliLength":0,"metaUid":"8249ad99-0"},"8249ad99-3":{"renderedLength":261,"gzipLength":0,"brotliLength":0,"metaUid":"8249ad99-2"},"8249ad99-5":{"renderedLength":755,"gzipLength":0,"brotliLength":0,"metaUid":"8249ad99-4"},"8249ad99-7":{"renderedLength":405,"gzipLength":0,"brotliLength":0,"metaUid":"8249ad99-6"},"8249ad99-9":{"renderedLength":536,"gzipLength":0,"brotliLength":0,"metaUid":"8249ad99-8"},"8249ad99-11":{"renderedLength":965,"gzipLength":0,"brotliLength":0,"metaUid":"8249ad99-10"},"8249ad99-13":{"renderedLength":315,"gzipLength":0,"brotliLength":0,"metaUid":"8249ad99-12"},"8249ad99-15":{"renderedLength":321,"gzipLength":0,"brotliLength":0,"metaUid":"8249ad99-14"},"8249ad99-17":{"renderedLength":189,"gzipLength":0,"brotliLength":0,"metaUid":"8249ad99-16"}},"nodeMetas":{"8249ad99-0":{"id":"/dist/browser/EmittersCanvasShape.js","moduleParts":{"tsparticles.plugin.emitters.shape.canvas.js":"8249ad99-1"},"imported":[{"uid":"8249ad99-19"},{"uid":"8249ad99-18"},{"uid":"8249ad99-20"}],"importedBy":[{"uid":"8249ad99-12"}]},"8249ad99-2":{"id":"/dist/browser/Options/Classes/PixelsOptions.js","moduleParts":{"tsparticles.plugin.emitters.shape.canvas.js":"8249ad99-3"},"imported":[{"uid":"8249ad99-19"}],"importedBy":[{"uid":"8249ad99-10"}]},"8249ad99-4":{"id":"/dist/browser/Options/Classes/TextFontOptions.js","moduleParts":{"tsparticles.plugin.emitters.shape.canvas.js":"8249ad99-5"},"imported":[{"uid":"8249ad99-19"}],"importedBy":[{"uid":"8249ad99-8"}]},"8249ad99-6":{"id":"/dist/browser/Options/Classes/TextLinesOptions.js","moduleParts":{"tsparticles.plugin.emitters.shape.canvas.js":"8249ad99-7"},"imported":[{"uid":"8249ad99-19"}],"importedBy":[{"uid":"8249ad99-8"}]},"8249ad99-8":{"id":"/dist/browser/Options/Classes/TextOptions.js","moduleParts":{"tsparticles.plugin.emitters.shape.canvas.js":"8249ad99-9"},"imported":[{"uid":"8249ad99-19"},{"uid":"8249ad99-4"},{"uid":"8249ad99-6"}],"importedBy":[{"uid":"8249ad99-10"}]},"8249ad99-10":{"id":"/dist/browser/Options/Classes/EmittersCanvasShapeOptions.js","moduleParts":{"tsparticles.plugin.emitters.shape.canvas.js":"8249ad99-11"},"imported":[{"uid":"8249ad99-19"},{"uid":"8249ad99-2"},{"uid":"8249ad99-8"}],"importedBy":[{"uid":"8249ad99-12"}]},"8249ad99-12":{"id":"/dist/browser/EmittersCanvasShapeGenerator.js","moduleParts":{"tsparticles.plugin.emitters.shape.canvas.js":"8249ad99-13"},"imported":[{"uid":"8249ad99-0"},{"uid":"8249ad99-10"}],"importedBy":[{"uid":"8249ad99-14"}]},"8249ad99-14":{"id":"/dist/browser/index.js","moduleParts":{"tsparticles.plugin.emitters.shape.canvas.js":"8249ad99-15"},"imported":[{"uid":"8249ad99-18"},{"uid":"8249ad99-12"}],"importedBy":[{"uid":"8249ad99-16"}]},"8249ad99-16":{"id":"/dist/browser/browser.js","moduleParts":{"tsparticles.plugin.emitters.shape.canvas.js":"8249ad99-17"},"imported":[{"uid":"8249ad99-14"}],"importedBy":[],"isEntry":true},"8249ad99-18":{"id":"@tsparticles/plugin-emitters","moduleParts":{},"imported":[],"importedBy":[{"uid":"8249ad99-14"},{"uid":"8249ad99-0"}],"isExternal":true},"8249ad99-19":{"id":"@tsparticles/engine","moduleParts":{},"imported":[],"importedBy":[{"uid":"8249ad99-0"},{"uid":"8249ad99-10"},{"uid":"8249ad99-2"},{"uid":"8249ad99-8"},{"uid":"8249ad99-4"},{"uid":"8249ad99-6"}],"isExternal":true},"8249ad99-20":{"id":"@tsparticles/canvas-utils","moduleParts":{},"imported":[],"importedBy":[{"uid":"8249ad99-0"}],"isExternal":true}},"env":{"rollup":"4.62.0"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
|
4934
4934
|
|
|
4935
4935
|
const run = () => {
|
|
4936
4936
|
const width = window.innerWidth;
|
|
@@ -1,5 +1,5 @@
|
|
|
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);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
|
-
/* Emitters Shape v4.1
|
|
2
|
+
/* Emitters Shape v4.2.1 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/plugin-emitters'), require('@tsparticles/engine'), require('@tsparticles/canvas-utils')) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/plugin-emitters', '@tsparticles/engine', '@tsparticles/canvas-utils'], factory) :
|
|
@@ -104,10 +104,7 @@
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
class PixelsOptions {
|
|
107
|
-
offset;
|
|
108
|
-
constructor() {
|
|
109
|
-
this.offset = 4;
|
|
110
|
-
}
|
|
107
|
+
offset = 4;
|
|
111
108
|
load(data) {
|
|
112
109
|
if (engine.isNull(data)) {
|
|
113
110
|
return;
|
|
@@ -119,18 +116,11 @@
|
|
|
119
116
|
}
|
|
120
117
|
|
|
121
118
|
class TextFontOptions {
|
|
122
|
-
family;
|
|
123
|
-
size;
|
|
124
|
-
style;
|
|
125
|
-
variant;
|
|
126
|
-
weight;
|
|
127
|
-
constructor() {
|
|
128
|
-
this.family = "Verdana";
|
|
129
|
-
this.size = 32;
|
|
130
|
-
this.style = "";
|
|
131
|
-
this.variant = "";
|
|
132
|
-
this.weight = "";
|
|
133
|
-
}
|
|
119
|
+
family = "Verdana";
|
|
120
|
+
size = 32;
|
|
121
|
+
style = "";
|
|
122
|
+
variant = "";
|
|
123
|
+
weight = "";
|
|
134
124
|
load(data) {
|
|
135
125
|
if (engine.isNull(data)) {
|
|
136
126
|
return;
|
|
@@ -154,12 +144,8 @@
|
|
|
154
144
|
}
|
|
155
145
|
|
|
156
146
|
class TextLinesOptions {
|
|
157
|
-
separator;
|
|
158
|
-
spacing;
|
|
159
|
-
constructor() {
|
|
160
|
-
this.separator = "\n";
|
|
161
|
-
this.spacing = 0;
|
|
162
|
-
}
|
|
147
|
+
separator = "\n";
|
|
148
|
+
spacing = 0;
|
|
163
149
|
load(data) {
|
|
164
150
|
if (engine.isNull(data)) {
|
|
165
151
|
return;
|
|
@@ -174,16 +160,10 @@
|
|
|
174
160
|
}
|
|
175
161
|
|
|
176
162
|
class TextOptions {
|
|
177
|
-
color;
|
|
178
|
-
font;
|
|
179
|
-
lines;
|
|
180
|
-
text;
|
|
181
|
-
constructor() {
|
|
182
|
-
this.color = "#000000";
|
|
183
|
-
this.font = new TextFontOptions();
|
|
184
|
-
this.lines = new TextLinesOptions();
|
|
185
|
-
this.text = "";
|
|
186
|
-
}
|
|
163
|
+
color = "#000000";
|
|
164
|
+
font = new TextFontOptions();
|
|
165
|
+
lines = new TextLinesOptions();
|
|
166
|
+
text = "";
|
|
187
167
|
load(data) {
|
|
188
168
|
if (engine.isNull(data)) {
|
|
189
169
|
return;
|
|
@@ -202,19 +182,12 @@
|
|
|
202
182
|
const minAlpha = 0;
|
|
203
183
|
class EmittersCanvasShapeOptions {
|
|
204
184
|
element;
|
|
205
|
-
filter;
|
|
206
185
|
image;
|
|
207
|
-
pixels;
|
|
208
|
-
scale;
|
|
209
|
-
selector;
|
|
210
|
-
text;
|
|
211
|
-
|
|
212
|
-
this.filter = (pixel) => pixel.a > minAlpha;
|
|
213
|
-
this.pixels = new PixelsOptions();
|
|
214
|
-
this.scale = 1;
|
|
215
|
-
this.selector = "";
|
|
216
|
-
this.text = new TextOptions();
|
|
217
|
-
}
|
|
186
|
+
pixels = new PixelsOptions();
|
|
187
|
+
scale = 1;
|
|
188
|
+
selector = "";
|
|
189
|
+
text = new TextOptions();
|
|
190
|
+
filter = (pixel) => pixel.a > minAlpha;
|
|
218
191
|
load(data) {
|
|
219
192
|
if (engine.isNull(data)) {
|
|
220
193
|
return;
|
|
@@ -248,7 +221,7 @@
|
|
|
248
221
|
}
|
|
249
222
|
|
|
250
223
|
async function loadEmittersShapeCanvas(engine) {
|
|
251
|
-
engine.checkVersion("4.1
|
|
224
|
+
engine.checkVersion("4.2.1");
|
|
252
225
|
await engine.pluginManager.register((e) => {
|
|
253
226
|
pluginEmitters.ensureEmittersPluginLoaded(e);
|
|
254
227
|
e.pluginManager.addEmitterShapeGenerator?.("canvas", new EmittersCanvasShapeGenerator());
|
|
@@ -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),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports,require("@tsparticles/plugin-emitters"),require("@tsparticles/engine"),require("@tsparticles/canvas-utils")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/plugin-emitters","@tsparticles/engine","@tsparticles/canvas-utils"],s):s(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.plugins.emittersShapes.canvas=t.__tsParticlesInternals.plugins.emittersShapes.canvas||{}),t.__tsParticlesInternals.plugins.emitters,t.__tsParticlesInternals.engine,t.__tsParticlesInternals.canvas.utils)}(this,function(t,s,e,a){"use strict";class n extends s.EmitterShapeBase{filter;pixelData;scale;#t;constructor(t,s,a,n,i){super(s,a,n,i),this.#t=t;const l=i.filter;let r=t=>t.a>0;if(e.isString(l)){if(l in globalThis){const t=globalThis[l];e.isFunction(t)&&(r=t)}}else r=l;this.filter=r,this.scale=i.scale,this.pixelData={pixels:[],height:0,width:0}}async init(){let t;const s=this.options,n=s.selector,i=s.pixels,l=s.image,r=s.element,c=s.text,
|
|
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),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports,require("@tsparticles/plugin-emitters"),require("@tsparticles/engine"),require("@tsparticles/canvas-utils")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/plugin-emitters","@tsparticles/engine","@tsparticles/canvas-utils"],s):s(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.plugins.emittersShapes.canvas=t.__tsParticlesInternals.plugins.emittersShapes.canvas||{}),t.__tsParticlesInternals.plugins.emitters,t.__tsParticlesInternals.engine,t.__tsParticlesInternals.canvas.utils)}(this,function(t,s,e,a){"use strict";class n extends s.EmitterShapeBase{filter;pixelData;scale;#t;constructor(t,s,a,n,i){super(s,a,n,i),this.#t=t;const l=i.filter;let r=t=>t.a>0;if(e.isString(l)){if(l in globalThis){const t=globalThis[l];e.isFunction(t)&&(r=t)}}else r=l;this.filter=r,this.scale=i.scale,this.pixelData={pixels:[],height:0,width:0}}async init(){let t;const s=this.options,n=s.selector,i=s.pixels,l=s.image,r=s.element,c=s.text,_=i.offset;if(l){const s=l.src;if(!s)return;t=await a.getImageData(s,_,this.#t.canvas.render.settings)}else if(r??n){const s=r??(n&&e.safeDocument().querySelector(n));if(!s)return;const i=s.getContext("2d",this.#t.canvas.render.settings);if(!i)return;t=a.getCanvasImageData(i,s,_)}else{const s=a.getTextData(c,_,this.fill,this.#t.canvas.render.settings);if(e.isNull(s))return;t=s}this.pixelData=t}randomPosition(){const{height:t,width:s}=this.pixelData,a=this.pixelData,n=this.position,i=this.scale,l=n.x-s*i*e.half,r=n.y-t*i*e.half;for(let n=0;n<100;n++){const n=Math.floor(e.getRandom()*s*t),c={x:n%s,y:Math.floor(n/s)},_=a.pixels[c.y];if(!_)continue;const o=_[c.x];if(!o)continue;if(this.filter(o))return{position:{x:c.x*i+l,y:c.y*i+r},color:{...o},opacity:o.a}}return null}resize(t,s){super.resize(t,s)}}class i{offset=4;load(t){e.isNull(t)||void 0!==t.offset&&(this.offset=t.offset)}}class l{family="Verdana";size=32;style="";variant="";weight="";load(t){e.isNull(t)||(void 0!==t.family&&(this.family=t.family),void 0!==t.size&&(this.size=t.size),void 0!==t.style&&(this.style=t.style),void 0!==t.variant&&(this.variant=t.variant),void 0!==t.weight&&(this.weight=t.weight))}}class r{separator="\n";spacing=0;load(t){e.isNull(t)||(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class c{color="#000000";font=new l;lines=new r;text="";load(t){e.isNull(t)||(void 0!==t.color&&(this.color=t.color),this.font.load(t.font),this.lines.load(t.lines),void 0!==t.text&&(this.text=t.text))}}class _{element;image;pixels=new i;scale=1;selector="";text=new c;filter=t=>t.a>0;load(t){e.isNull(t)||(void 0!==t.element&&(this.element=t.element),void 0!==t.filter&&(this.filter=t.filter),this.pixels.load(t.pixels),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.selector&&(this.selector=t.selector),void 0!==t.image&&(this.image=t.image),this.text.load(t.text))}}class o{generate(t,s,e,a,i){const l=new _;return l.load(i),new n(t,s,e,a,l)}}async function p(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{s.ensureEmittersPluginLoaded(t),t.pluginManager.addEmitterShapeGenerator?.("canvas",new o)})}const h=globalThis;h.__tsParticlesInternals=h.__tsParticlesInternals??{},h.loadEmittersShapeCanvas=p,t.loadEmittersShapeCanvas=p}),Object.assign(globalThis.window||globalThis,{loadEmittersShapeCanvas:(globalThis.__tsParticlesInternals.plugins.emittersShapes.canvas||{}).loadEmittersShapeCanvas}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
@@ -4,12 +4,11 @@ import { PixelsOptions } from "./PixelsOptions.js";
|
|
|
4
4
|
import { TextOptions } from "./TextOptions.js";
|
|
5
5
|
export declare class EmittersCanvasShapeOptions implements IEmittersCanvasShapeOptions, IOptionLoader<IEmittersCanvasShapeOptions> {
|
|
6
6
|
element?: HTMLCanvasElement;
|
|
7
|
-
filter: string | ((pixel: IRgba) => boolean);
|
|
8
7
|
image?: HTMLImageElement;
|
|
9
|
-
pixels: PixelsOptions;
|
|
8
|
+
readonly pixels: PixelsOptions;
|
|
10
9
|
scale: number;
|
|
11
10
|
selector: string;
|
|
12
|
-
text: TextOptions;
|
|
13
|
-
|
|
11
|
+
readonly text: TextOptions;
|
|
12
|
+
filter: string | ((pixel: IRgba) => boolean);
|
|
14
13
|
load(data?: RecursivePartial<IEmittersCanvasShapeOptions>): void;
|
|
15
14
|
}
|
|
@@ -2,6 +2,5 @@ import { type IOptionLoader, type RecursivePartial } from "@tsparticles/engine";
|
|
|
2
2
|
import type { IPixelsOptions } from "../Interfaces/IPixelsOptions.js";
|
|
3
3
|
export declare class PixelsOptions implements IPixelsOptions, IOptionLoader<IPixelsOptions> {
|
|
4
4
|
offset: number;
|
|
5
|
-
constructor();
|
|
6
5
|
load(data?: RecursivePartial<IPixelsOptions>): void;
|
|
7
6
|
}
|
|
@@ -3,6 +3,5 @@ import type { ITextLinesOptions } from "../Interfaces/ITextLinesOptions.js";
|
|
|
3
3
|
export declare class TextLinesOptions implements ITextLinesOptions, IOptionLoader<ITextLinesOptions> {
|
|
4
4
|
separator: string;
|
|
5
5
|
spacing: number;
|
|
6
|
-
constructor();
|
|
7
6
|
load(data?: RecursivePartial<ITextLinesOptions>): void;
|
|
8
7
|
}
|
|
@@ -4,9 +4,8 @@ import { TextFontOptions } from "./TextFontOptions.js";
|
|
|
4
4
|
import { TextLinesOptions } from "./TextLinesOptions.js";
|
|
5
5
|
export declare class TextOptions implements ITextOptions, IOptionLoader<ITextOptions> {
|
|
6
6
|
color: string;
|
|
7
|
-
font: TextFontOptions;
|
|
8
|
-
lines: TextLinesOptions;
|
|
7
|
+
readonly font: TextFontOptions;
|
|
8
|
+
readonly lines: TextLinesOptions;
|
|
9
9
|
text: string;
|
|
10
|
-
constructor();
|
|
11
10
|
load(data?: RecursivePartial<ITextOptions>): void;
|
|
12
11
|
}
|