@tsparticles/plugin-infection 4.0.0-beta.12 → 4.0.0-beta.15
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/browser.js +5 -0
- package/browser/index.js +7 -9
- package/browser/index.lazy.js +15 -0
- package/cjs/browser.js +5 -0
- package/cjs/index.js +7 -9
- package/cjs/index.lazy.js +15 -0
- package/esm/browser.js +5 -0
- package/esm/index.js +7 -9
- package/esm/index.lazy.js +15 -0
- package/package.json +10 -3
- package/report.html +4949 -94
- package/tsparticles.plugin.infection.js +313 -347
- package/tsparticles.plugin.infection.min.js +1 -2
- package/types/browser.d.ts +1 -0
- package/types/index.lazy.d.ts +4 -0
- package/541.min.js +0 -1
- package/785.min.js +0 -1
- package/938.min.js +0 -1
- package/dist_browser_InfectionPluginInstance_js.js +0 -40
- package/dist_browser_InfectionPlugin_js.js +0 -50
- package/dist_browser_ParticlesInfecter_js.js +0 -30
package/browser/index.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
+
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
|
+
import { InfectionPlugin } from "./InfectionPlugin.js";
|
|
3
|
+
import { ParticlesInfecter } from "./ParticlesInfecter.js";
|
|
1
4
|
export async function loadInfectionPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
-
await engine.pluginManager.register(
|
|
4
|
-
const [{ ensureInteractivityPluginLoaded }, { InfectionPlugin },] = await Promise.all([
|
|
5
|
-
import("@tsparticles/plugin-interactivity"),
|
|
6
|
-
import("./InfectionPlugin.js"),
|
|
7
|
-
]);
|
|
5
|
+
engine.checkVersion("4.0.0-beta.15");
|
|
6
|
+
await engine.pluginManager.register((e) => {
|
|
8
7
|
ensureInteractivityPluginLoaded(e);
|
|
9
8
|
e.pluginManager.addPlugin(new InfectionPlugin());
|
|
10
|
-
e.pluginManager.addInteractor?.("particlesInfection",
|
|
11
|
-
|
|
12
|
-
return new ParticlesInfecter(container);
|
|
9
|
+
e.pluginManager.addInteractor?.("particlesInfection", (container) => {
|
|
10
|
+
return Promise.resolve(new ParticlesInfecter(container));
|
|
13
11
|
});
|
|
14
12
|
});
|
|
15
13
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export async function loadInfectionPlugin(engine) {
|
|
2
|
+
engine.checkVersion("4.0.0-beta.15");
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const [{ ensureInteractivityPluginLoaded }, { InfectionPlugin },] = await Promise.all([
|
|
5
|
+
import("@tsparticles/plugin-interactivity/lazy"),
|
|
6
|
+
import("./InfectionPlugin.js"),
|
|
7
|
+
]);
|
|
8
|
+
ensureInteractivityPluginLoaded(e);
|
|
9
|
+
e.pluginManager.addPlugin(new InfectionPlugin());
|
|
10
|
+
e.pluginManager.addInteractor?.("particlesInfection", async (container) => {
|
|
11
|
+
const { ParticlesInfecter } = await import("./ParticlesInfecter.js");
|
|
12
|
+
return new ParticlesInfecter(container);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
}
|
package/cjs/browser.js
ADDED
package/cjs/index.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
+
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
|
+
import { InfectionPlugin } from "./InfectionPlugin.js";
|
|
3
|
+
import { ParticlesInfecter } from "./ParticlesInfecter.js";
|
|
1
4
|
export async function loadInfectionPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
-
await engine.pluginManager.register(
|
|
4
|
-
const [{ ensureInteractivityPluginLoaded }, { InfectionPlugin },] = await Promise.all([
|
|
5
|
-
import("@tsparticles/plugin-interactivity"),
|
|
6
|
-
import("./InfectionPlugin.js"),
|
|
7
|
-
]);
|
|
5
|
+
engine.checkVersion("4.0.0-beta.15");
|
|
6
|
+
await engine.pluginManager.register((e) => {
|
|
8
7
|
ensureInteractivityPluginLoaded(e);
|
|
9
8
|
e.pluginManager.addPlugin(new InfectionPlugin());
|
|
10
|
-
e.pluginManager.addInteractor?.("particlesInfection",
|
|
11
|
-
|
|
12
|
-
return new ParticlesInfecter(container);
|
|
9
|
+
e.pluginManager.addInteractor?.("particlesInfection", (container) => {
|
|
10
|
+
return Promise.resolve(new ParticlesInfecter(container));
|
|
13
11
|
});
|
|
14
12
|
});
|
|
15
13
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export async function loadInfectionPlugin(engine) {
|
|
2
|
+
engine.checkVersion("4.0.0-beta.15");
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const [{ ensureInteractivityPluginLoaded }, { InfectionPlugin },] = await Promise.all([
|
|
5
|
+
import("@tsparticles/plugin-interactivity/lazy"),
|
|
6
|
+
import("./InfectionPlugin.js"),
|
|
7
|
+
]);
|
|
8
|
+
ensureInteractivityPluginLoaded(e);
|
|
9
|
+
e.pluginManager.addPlugin(new InfectionPlugin());
|
|
10
|
+
e.pluginManager.addInteractor?.("particlesInfection", async (container) => {
|
|
11
|
+
const { ParticlesInfecter } = await import("./ParticlesInfecter.js");
|
|
12
|
+
return new ParticlesInfecter(container);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
}
|
package/esm/browser.js
ADDED
package/esm/index.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
+
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
|
+
import { InfectionPlugin } from "./InfectionPlugin.js";
|
|
3
|
+
import { ParticlesInfecter } from "./ParticlesInfecter.js";
|
|
1
4
|
export async function loadInfectionPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
-
await engine.pluginManager.register(
|
|
4
|
-
const [{ ensureInteractivityPluginLoaded }, { InfectionPlugin },] = await Promise.all([
|
|
5
|
-
import("@tsparticles/plugin-interactivity"),
|
|
6
|
-
import("./InfectionPlugin.js"),
|
|
7
|
-
]);
|
|
5
|
+
engine.checkVersion("4.0.0-beta.15");
|
|
6
|
+
await engine.pluginManager.register((e) => {
|
|
8
7
|
ensureInteractivityPluginLoaded(e);
|
|
9
8
|
e.pluginManager.addPlugin(new InfectionPlugin());
|
|
10
|
-
e.pluginManager.addInteractor?.("particlesInfection",
|
|
11
|
-
|
|
12
|
-
return new ParticlesInfecter(container);
|
|
9
|
+
e.pluginManager.addInteractor?.("particlesInfection", (container) => {
|
|
10
|
+
return Promise.resolve(new ParticlesInfecter(container));
|
|
13
11
|
});
|
|
14
12
|
});
|
|
15
13
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export async function loadInfectionPlugin(engine) {
|
|
2
|
+
engine.checkVersion("4.0.0-beta.15");
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const [{ ensureInteractivityPluginLoaded }, { InfectionPlugin },] = await Promise.all([
|
|
5
|
+
import("@tsparticles/plugin-interactivity/lazy"),
|
|
6
|
+
import("./InfectionPlugin.js"),
|
|
7
|
+
]);
|
|
8
|
+
ensureInteractivityPluginLoaded(e);
|
|
9
|
+
e.pluginManager.addPlugin(new InfectionPlugin());
|
|
10
|
+
e.pluginManager.addInteractor?.("particlesInfection", async (container) => {
|
|
11
|
+
const { ParticlesInfecter } = await import("./ParticlesInfecter.js");
|
|
12
|
+
return new ParticlesInfecter(container);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-infection",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.15",
|
|
4
4
|
"description": "tsParticles infection plugin",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -96,11 +96,18 @@
|
|
|
96
96
|
"require": "./cjs/index.js",
|
|
97
97
|
"default": "./esm/index.js"
|
|
98
98
|
},
|
|
99
|
+
"./lazy": {
|
|
100
|
+
"types": "./types/index.lazy.d.ts",
|
|
101
|
+
"browser": "./browser/index.lazy.js",
|
|
102
|
+
"import": "./esm/index.lazy.js",
|
|
103
|
+
"require": "./cjs/index.lazy.js",
|
|
104
|
+
"default": "./esm/index.lazy.js"
|
|
105
|
+
},
|
|
99
106
|
"./package.json": "./package.json"
|
|
100
107
|
},
|
|
101
108
|
"peerDependencies": {
|
|
102
|
-
"@tsparticles/engine": "4.0.0-beta.
|
|
103
|
-
"@tsparticles/plugin-interactivity": "4.0.0-beta.
|
|
109
|
+
"@tsparticles/engine": "4.0.0-beta.15",
|
|
110
|
+
"@tsparticles/plugin-interactivity": "4.0.0-beta.15"
|
|
104
111
|
},
|
|
105
112
|
"publishConfig": {
|
|
106
113
|
"access": "public"
|