@tsparticles/plugin-manual-particles 4.0.4 → 4.1.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/browser/ManualParticlesPluginInstance.js +4 -4
- package/browser/index.js +1 -1
- package/browser/index.lazy.js +1 -1
- package/cjs/ManualParticlesPluginInstance.js +4 -4
- package/cjs/index.js +1 -1
- package/cjs/index.lazy.js +1 -1
- package/esm/ManualParticlesPluginInstance.js +4 -4
- package/esm/index.js +1 -1
- package/esm/index.lazy.js +1 -1
- package/package.json +2 -2
- package/tsparticles.plugin.manualParticles.js +6 -6
- package/tsparticles.plugin.manualParticles.min.js +1 -1
- package/types/ManualParticlesPluginInstance.d.ts +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { getPosition } from "@tsparticles/engine";
|
|
2
2
|
const noParticles = 0;
|
|
3
3
|
export class ManualParticlesPluginInstance {
|
|
4
|
-
|
|
4
|
+
#container;
|
|
5
5
|
constructor(container) {
|
|
6
|
-
this
|
|
6
|
+
this.#container = container;
|
|
7
7
|
}
|
|
8
8
|
particlesDensityCount() {
|
|
9
|
-
return this.
|
|
9
|
+
return this.#container.actualOptions.manualParticles?.length ?? noParticles;
|
|
10
10
|
}
|
|
11
11
|
particlesInitialization() {
|
|
12
|
-
const container = this
|
|
12
|
+
const container = this.#container, options = container.actualOptions;
|
|
13
13
|
options.manualParticles?.forEach(p => container.particles.addParticle(p.position ? getPosition(p.position, container.canvas.size) : undefined, p.options));
|
|
14
14
|
return false;
|
|
15
15
|
}
|
package/browser/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ManualParticlesPlugin } from "./ManualParticlesPlugin.js";
|
|
2
2
|
export async function loadManualParticlesPlugin(engine) {
|
|
3
|
-
engine.checkVersion("4.0
|
|
3
|
+
engine.checkVersion("4.1.0");
|
|
4
4
|
await engine.pluginManager.register(e => {
|
|
5
5
|
e.pluginManager.addPlugin(new ManualParticlesPlugin());
|
|
6
6
|
});
|
package/browser/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadManualParticlesPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0
|
|
2
|
+
engine.checkVersion("4.1.0");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ManualParticlesPlugin } = await import("./ManualParticlesPlugin.js");
|
|
5
5
|
e.pluginManager.addPlugin(new ManualParticlesPlugin());
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { getPosition } from "@tsparticles/engine";
|
|
2
2
|
const noParticles = 0;
|
|
3
3
|
export class ManualParticlesPluginInstance {
|
|
4
|
-
|
|
4
|
+
#container;
|
|
5
5
|
constructor(container) {
|
|
6
|
-
this
|
|
6
|
+
this.#container = container;
|
|
7
7
|
}
|
|
8
8
|
particlesDensityCount() {
|
|
9
|
-
return this.
|
|
9
|
+
return this.#container.actualOptions.manualParticles?.length ?? noParticles;
|
|
10
10
|
}
|
|
11
11
|
particlesInitialization() {
|
|
12
|
-
const container = this
|
|
12
|
+
const container = this.#container, options = container.actualOptions;
|
|
13
13
|
options.manualParticles?.forEach(p => container.particles.addParticle(p.position ? getPosition(p.position, container.canvas.size) : undefined, p.options));
|
|
14
14
|
return false;
|
|
15
15
|
}
|
package/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ManualParticlesPlugin } from "./ManualParticlesPlugin.js";
|
|
2
2
|
export async function loadManualParticlesPlugin(engine) {
|
|
3
|
-
engine.checkVersion("4.0
|
|
3
|
+
engine.checkVersion("4.1.0");
|
|
4
4
|
await engine.pluginManager.register(e => {
|
|
5
5
|
e.pluginManager.addPlugin(new ManualParticlesPlugin());
|
|
6
6
|
});
|
package/cjs/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadManualParticlesPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0
|
|
2
|
+
engine.checkVersion("4.1.0");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ManualParticlesPlugin } = await import("./ManualParticlesPlugin.js");
|
|
5
5
|
e.pluginManager.addPlugin(new ManualParticlesPlugin());
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { getPosition } from "@tsparticles/engine";
|
|
2
2
|
const noParticles = 0;
|
|
3
3
|
export class ManualParticlesPluginInstance {
|
|
4
|
-
|
|
4
|
+
#container;
|
|
5
5
|
constructor(container) {
|
|
6
|
-
this
|
|
6
|
+
this.#container = container;
|
|
7
7
|
}
|
|
8
8
|
particlesDensityCount() {
|
|
9
|
-
return this.
|
|
9
|
+
return this.#container.actualOptions.manualParticles?.length ?? noParticles;
|
|
10
10
|
}
|
|
11
11
|
particlesInitialization() {
|
|
12
|
-
const container = this
|
|
12
|
+
const container = this.#container, options = container.actualOptions;
|
|
13
13
|
options.manualParticles?.forEach(p => container.particles.addParticle(p.position ? getPosition(p.position, container.canvas.size) : undefined, p.options));
|
|
14
14
|
return false;
|
|
15
15
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ManualParticlesPlugin } from "./ManualParticlesPlugin.js";
|
|
2
2
|
export async function loadManualParticlesPlugin(engine) {
|
|
3
|
-
engine.checkVersion("4.0
|
|
3
|
+
engine.checkVersion("4.1.0");
|
|
4
4
|
await engine.pluginManager.register(e => {
|
|
5
5
|
e.pluginManager.addPlugin(new ManualParticlesPlugin());
|
|
6
6
|
});
|
package/esm/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadManualParticlesPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0
|
|
2
|
+
engine.checkVersion("4.1.0");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ManualParticlesPlugin } = await import("./ManualParticlesPlugin.js");
|
|
5
5
|
e.pluginManager.addPlugin(new ManualParticlesPlugin());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-manual-particles",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "tsParticles manual particles plugin",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"./package.json": "./package.json"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"@tsparticles/engine": "4.0
|
|
95
|
+
"@tsparticles/engine": "4.1.0"
|
|
96
96
|
},
|
|
97
97
|
"publishConfig": {
|
|
98
98
|
"access": "public"
|
|
@@ -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
|
-
/* Plugin v4.0
|
|
2
|
+
/* Plugin v4.1.0 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/engine')) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/engine'], factory) :
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
async function loadManualParticlesPlugin(engine) {
|
|
55
|
-
engine.checkVersion("4.0
|
|
55
|
+
engine.checkVersion("4.1.0");
|
|
56
56
|
await engine.pluginManager.register(e => {
|
|
57
57
|
e.pluginManager.addPlugin(new ManualParticlesPlugin());
|
|
58
58
|
});
|
|
@@ -64,15 +64,15 @@
|
|
|
64
64
|
|
|
65
65
|
const noParticles = 0;
|
|
66
66
|
class ManualParticlesPluginInstance {
|
|
67
|
-
|
|
67
|
+
#container;
|
|
68
68
|
constructor(container) {
|
|
69
|
-
this
|
|
69
|
+
this.#container = container;
|
|
70
70
|
}
|
|
71
71
|
particlesDensityCount() {
|
|
72
|
-
return this.
|
|
72
|
+
return this.#container.actualOptions.manualParticles?.length ?? noParticles;
|
|
73
73
|
}
|
|
74
74
|
particlesInitialization() {
|
|
75
|
-
const container = this
|
|
75
|
+
const container = this.#container, options = container.actualOptions;
|
|
76
76
|
options.manualParticles?.forEach(p => container.particles.addParticle(p.position ? engine.getPosition(p.position, container.canvas.size) : undefined, p.options));
|
|
77
77
|
return false;
|
|
78
78
|
}
|
|
@@ -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/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine"],s):s(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.manualParticles=t.__tsParticlesInternals.plugins.manualParticles||{}),t.__tsParticlesInternals.engine)}(this,function(t,s){"use strict";class n{options;position;load(t){s.isNull(t)||(t.position&&(this.position={x:t.position.x??50,y:t.position.y??50,mode:t.position.mode??s.PixelMode.percent}),t.options&&(this.options=s.deepExtend({},t.options)))}}class e{id="manual-particles";async getPlugin(t){const{ManualParticlesPluginInstance:s}=await Promise.resolve().then(function(){return r});return new s(t)}loadOptions(t,s,e){(this.needsPlugin(s)||this.needsPlugin(e))&&(s.manualParticles??=[],e?.manualParticles&&(s.manualParticles=e.manualParticles.map(t=>{const s=new n;return s.load(t),s})))}needsPlugin(t){return!!t?.manualParticles?.length}}async function a(t){t.checkVersion("4.0
|
|
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/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine"],s):s(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.manualParticles=t.__tsParticlesInternals.plugins.manualParticles||{}),t.__tsParticlesInternals.engine)}(this,function(t,s){"use strict";class n{options;position;load(t){s.isNull(t)||(t.position&&(this.position={x:t.position.x??50,y:t.position.y??50,mode:t.position.mode??s.PixelMode.percent}),t.options&&(this.options=s.deepExtend({},t.options)))}}class e{id="manual-particles";async getPlugin(t){const{ManualParticlesPluginInstance:s}=await Promise.resolve().then(function(){return r});return new s(t)}loadOptions(t,s,e){(this.needsPlugin(s)||this.needsPlugin(e))&&(s.manualParticles??=[],e?.manualParticles&&(s.manualParticles=e.manualParticles.map(t=>{const s=new n;return s.load(t),s})))}needsPlugin(t){return!!t?.manualParticles?.length}}async function a(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new e)})}const l=globalThis;l.__tsParticlesInternals=l.__tsParticlesInternals??{},l.loadManualParticlesPlugin=a;var r=Object.freeze({__proto__:null,ManualParticlesPluginInstance:class{#t;constructor(t){this.#t=t}particlesDensityCount(){return this.#t.actualOptions.manualParticles?.length??0}particlesInitialization(){const t=this.#t,n=t.actualOptions;return n.manualParticles?.forEach(n=>t.particles.addParticle(n.position?s.getPosition(n.position,t.canvas.size):void 0,n.options)),!1}}});t.loadManualParticlesPlugin=a}),Object.assign(globalThis.window||globalThis,{loadManualParticlesPlugin:(globalThis.__tsParticlesInternals.plugins.manualParticles||{}).loadManualParticlesPlugin}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type IContainerPlugin } from "@tsparticles/engine";
|
|
2
2
|
import type { ManualParticlesContainer } from "./types.js";
|
|
3
3
|
export declare class ManualParticlesPluginInstance implements IContainerPlugin {
|
|
4
|
-
private
|
|
4
|
+
#private;
|
|
5
5
|
constructor(container: ManualParticlesContainer);
|
|
6
6
|
particlesDensityCount(): number;
|
|
7
7
|
particlesInitialization(): boolean;
|