@tsparticles/interaction-particles-attract 4.0.0-beta.9 → 4.0.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/browser.js +5 -0
- package/browser/index.js +6 -6
- package/browser/index.lazy.js +11 -0
- package/cjs/browser.js +5 -0
- package/cjs/index.js +6 -6
- package/cjs/index.lazy.js +11 -0
- package/esm/browser.js +5 -0
- package/esm/index.js +6 -6
- package/esm/index.lazy.js +11 -0
- package/package.json +10 -3
- package/report.html +4949 -94
- package/tsparticles.interaction.particles.attract.js +107 -351
- package/tsparticles.interaction.particles.attract.min.js +1 -2
- package/types/browser.d.ts +1 -0
- package/types/index.lazy.d.ts +2 -0
- package/13.min.js +0 -1
- package/dist_browser_Attractor_js.js +0 -40
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { loadParticlesAttractInteraction } from "./index.js";
|
|
2
|
+
const globalObject = globalThis;
|
|
3
|
+
globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
|
|
4
|
+
globalObject.loadParticlesAttractInteraction = loadParticlesAttractInteraction;
|
|
5
|
+
export * from "./index.js";
|
package/browser/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
|
+
import { Attractor } from "./Attractor.js";
|
|
1
3
|
export async function loadParticlesAttractInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.0.
|
|
3
|
-
await engine.pluginManager.register(
|
|
4
|
-
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity");
|
|
4
|
+
engine.checkVersion("4.0.1");
|
|
5
|
+
await engine.pluginManager.register((e) => {
|
|
5
6
|
ensureInteractivityPluginLoaded(e);
|
|
6
|
-
e.pluginManager.addInteractor?.("particlesAttract",
|
|
7
|
-
|
|
8
|
-
return new Attractor(container);
|
|
7
|
+
e.pluginManager.addInteractor?.("particlesAttract", container => {
|
|
8
|
+
return Promise.resolve(new Attractor(container));
|
|
9
9
|
});
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export async function loadParticlesAttractInteraction(engine) {
|
|
2
|
+
engine.checkVersion("4.0.1");
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity/lazy");
|
|
5
|
+
ensureInteractivityPluginLoaded(e);
|
|
6
|
+
e.pluginManager.addInteractor?.("particlesAttract", async (container) => {
|
|
7
|
+
const { Attractor } = await import("./Attractor.js");
|
|
8
|
+
return new Attractor(container);
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
}
|
package/cjs/browser.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { loadParticlesAttractInteraction } from "./index.js";
|
|
2
|
+
const globalObject = globalThis;
|
|
3
|
+
globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
|
|
4
|
+
globalObject.loadParticlesAttractInteraction = loadParticlesAttractInteraction;
|
|
5
|
+
export * from "./index.js";
|
package/cjs/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
|
+
import { Attractor } from "./Attractor.js";
|
|
1
3
|
export async function loadParticlesAttractInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.0.
|
|
3
|
-
await engine.pluginManager.register(
|
|
4
|
-
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity");
|
|
4
|
+
engine.checkVersion("4.0.1");
|
|
5
|
+
await engine.pluginManager.register((e) => {
|
|
5
6
|
ensureInteractivityPluginLoaded(e);
|
|
6
|
-
e.pluginManager.addInteractor?.("particlesAttract",
|
|
7
|
-
|
|
8
|
-
return new Attractor(container);
|
|
7
|
+
e.pluginManager.addInteractor?.("particlesAttract", container => {
|
|
8
|
+
return Promise.resolve(new Attractor(container));
|
|
9
9
|
});
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export async function loadParticlesAttractInteraction(engine) {
|
|
2
|
+
engine.checkVersion("4.0.1");
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity/lazy");
|
|
5
|
+
ensureInteractivityPluginLoaded(e);
|
|
6
|
+
e.pluginManager.addInteractor?.("particlesAttract", async (container) => {
|
|
7
|
+
const { Attractor } = await import("./Attractor.js");
|
|
8
|
+
return new Attractor(container);
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
}
|
package/esm/browser.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { loadParticlesAttractInteraction } from "./index.js";
|
|
2
|
+
const globalObject = globalThis;
|
|
3
|
+
globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
|
|
4
|
+
globalObject.loadParticlesAttractInteraction = loadParticlesAttractInteraction;
|
|
5
|
+
export * from "./index.js";
|
package/esm/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
|
+
import { Attractor } from "./Attractor.js";
|
|
1
3
|
export async function loadParticlesAttractInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.0.
|
|
3
|
-
await engine.pluginManager.register(
|
|
4
|
-
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity");
|
|
4
|
+
engine.checkVersion("4.0.1");
|
|
5
|
+
await engine.pluginManager.register((e) => {
|
|
5
6
|
ensureInteractivityPluginLoaded(e);
|
|
6
|
-
e.pluginManager.addInteractor?.("particlesAttract",
|
|
7
|
-
|
|
8
|
-
return new Attractor(container);
|
|
7
|
+
e.pluginManager.addInteractor?.("particlesAttract", container => {
|
|
8
|
+
return Promise.resolve(new Attractor(container));
|
|
9
9
|
});
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export async function loadParticlesAttractInteraction(engine) {
|
|
2
|
+
engine.checkVersion("4.0.1");
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity/lazy");
|
|
5
|
+
ensureInteractivityPluginLoaded(e);
|
|
6
|
+
e.pluginManager.addInteractor?.("particlesAttract", async (container) => {
|
|
7
|
+
const { Attractor } = await import("./Attractor.js");
|
|
8
|
+
return new Attractor(container);
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/interaction-particles-attract",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "tsParticles attract particles interaction",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -83,11 +83,18 @@
|
|
|
83
83
|
"require": "./cjs/index.js",
|
|
84
84
|
"default": "./esm/index.js"
|
|
85
85
|
},
|
|
86
|
+
"./lazy": {
|
|
87
|
+
"types": "./types/index.lazy.d.ts",
|
|
88
|
+
"browser": "./browser/index.lazy.js",
|
|
89
|
+
"import": "./esm/index.lazy.js",
|
|
90
|
+
"require": "./cjs/index.lazy.js",
|
|
91
|
+
"default": "./esm/index.lazy.js"
|
|
92
|
+
},
|
|
86
93
|
"./package.json": "./package.json"
|
|
87
94
|
},
|
|
88
95
|
"peerDependencies": {
|
|
89
|
-
"@tsparticles/engine": "4.0.
|
|
90
|
-
"@tsparticles/plugin-interactivity": "4.0.
|
|
96
|
+
"@tsparticles/engine": "4.0.1",
|
|
97
|
+
"@tsparticles/plugin-interactivity": "4.0.1"
|
|
91
98
|
},
|
|
92
99
|
"publishConfig": {
|
|
93
100
|
"access": "public"
|