@tsparticles/interaction-particles-links 4.0.0-beta.8 → 4.0.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/browser.js +5 -0
- package/browser/index.js +8 -9
- package/browser/index.lazy.js +18 -0
- package/cjs/browser.js +5 -0
- package/cjs/index.js +8 -9
- package/cjs/index.lazy.js +18 -0
- package/esm/browser.js +5 -0
- package/esm/index.js +8 -9
- package/esm/index.lazy.js +18 -0
- package/package.json +11 -4
- package/report.html +4949 -94
- package/tsparticles.interaction.particles.links.js +493 -374
- package/tsparticles.interaction.particles.links.min.js +1 -2
- package/types/LinkInstance.d.ts +2 -2
- package/types/browser.d.ts +1 -0
- package/types/index.lazy.d.ts +8 -0
- package/218.min.js +0 -1
- package/540.min.js +0 -1
- package/907.min.js +0 -1
- package/dist_browser_LinkInstance_js.js +0 -40
- package/dist_browser_Linker_js.js +0 -40
- package/dist_browser_LinksPlugin_js.js +0 -30
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { loadParticlesLinksInteraction } from "./index.js";
|
|
2
|
+
const globalObject = globalThis;
|
|
3
|
+
globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
|
|
4
|
+
globalObject.loadParticlesLinksInteraction = loadParticlesLinksInteraction;
|
|
5
|
+
export * from "./index.js";
|
package/browser/index.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
+
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
|
+
import { Linker } from "./Linker.js";
|
|
3
|
+
import { LinksPlugin } from "./LinksPlugin.js";
|
|
1
4
|
export async function loadParticlesLinksInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0
|
|
3
|
-
await engine.pluginManager.register(
|
|
4
|
-
const pluginManager = e.pluginManager
|
|
5
|
-
import("@tsparticles/plugin-interactivity"),
|
|
6
|
-
import("./LinksPlugin.js"),
|
|
7
|
-
]);
|
|
5
|
+
engine.checkVersion("4.0.0");
|
|
6
|
+
await engine.pluginManager.register((e) => {
|
|
7
|
+
const pluginManager = e.pluginManager;
|
|
8
8
|
ensureInteractivityPluginLoaded(e);
|
|
9
9
|
pluginManager.addPlugin(new LinksPlugin(pluginManager));
|
|
10
|
-
pluginManager.addInteractor?.("particlesLinks",
|
|
11
|
-
|
|
12
|
-
return new Linker(pluginManager, container);
|
|
10
|
+
pluginManager.addInteractor?.("particlesLinks", container => {
|
|
11
|
+
return Promise.resolve(new Linker(pluginManager, container));
|
|
13
12
|
});
|
|
14
13
|
});
|
|
15
14
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export async function loadParticlesLinksInteraction(engine) {
|
|
2
|
+
engine.checkVersion("4.0.0");
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const pluginManager = e.pluginManager, [{ ensureInteractivityPluginLoaded }, { LinksPlugin },] = await Promise.all([
|
|
5
|
+
import("@tsparticles/plugin-interactivity/lazy"),
|
|
6
|
+
import("./LinksPlugin.js"),
|
|
7
|
+
]);
|
|
8
|
+
ensureInteractivityPluginLoaded(e);
|
|
9
|
+
pluginManager.addPlugin(new LinksPlugin(pluginManager));
|
|
10
|
+
pluginManager.addInteractor?.("particlesLinks", async (container) => {
|
|
11
|
+
const { Linker } = await import("./Linker.js");
|
|
12
|
+
return new Linker(pluginManager, container);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export * from "./Options/Classes/Links.js";
|
|
17
|
+
export * from "./Options/Classes/LinksShadow.js";
|
|
18
|
+
export * from "./Options/Classes/LinksTriangle.js";
|
package/cjs/browser.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { loadParticlesLinksInteraction } from "./index.js";
|
|
2
|
+
const globalObject = globalThis;
|
|
3
|
+
globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
|
|
4
|
+
globalObject.loadParticlesLinksInteraction = loadParticlesLinksInteraction;
|
|
5
|
+
export * from "./index.js";
|
package/cjs/index.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
+
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
|
+
import { Linker } from "./Linker.js";
|
|
3
|
+
import { LinksPlugin } from "./LinksPlugin.js";
|
|
1
4
|
export async function loadParticlesLinksInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0
|
|
3
|
-
await engine.pluginManager.register(
|
|
4
|
-
const pluginManager = e.pluginManager
|
|
5
|
-
import("@tsparticles/plugin-interactivity"),
|
|
6
|
-
import("./LinksPlugin.js"),
|
|
7
|
-
]);
|
|
5
|
+
engine.checkVersion("4.0.0");
|
|
6
|
+
await engine.pluginManager.register((e) => {
|
|
7
|
+
const pluginManager = e.pluginManager;
|
|
8
8
|
ensureInteractivityPluginLoaded(e);
|
|
9
9
|
pluginManager.addPlugin(new LinksPlugin(pluginManager));
|
|
10
|
-
pluginManager.addInteractor?.("particlesLinks",
|
|
11
|
-
|
|
12
|
-
return new Linker(pluginManager, container);
|
|
10
|
+
pluginManager.addInteractor?.("particlesLinks", container => {
|
|
11
|
+
return Promise.resolve(new Linker(pluginManager, container));
|
|
13
12
|
});
|
|
14
13
|
});
|
|
15
14
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export async function loadParticlesLinksInteraction(engine) {
|
|
2
|
+
engine.checkVersion("4.0.0");
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const pluginManager = e.pluginManager, [{ ensureInteractivityPluginLoaded }, { LinksPlugin },] = await Promise.all([
|
|
5
|
+
import("@tsparticles/plugin-interactivity/lazy"),
|
|
6
|
+
import("./LinksPlugin.js"),
|
|
7
|
+
]);
|
|
8
|
+
ensureInteractivityPluginLoaded(e);
|
|
9
|
+
pluginManager.addPlugin(new LinksPlugin(pluginManager));
|
|
10
|
+
pluginManager.addInteractor?.("particlesLinks", async (container) => {
|
|
11
|
+
const { Linker } = await import("./Linker.js");
|
|
12
|
+
return new Linker(pluginManager, container);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export * from "./Options/Classes/Links.js";
|
|
17
|
+
export * from "./Options/Classes/LinksShadow.js";
|
|
18
|
+
export * from "./Options/Classes/LinksTriangle.js";
|
package/esm/browser.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { loadParticlesLinksInteraction } from "./index.js";
|
|
2
|
+
const globalObject = globalThis;
|
|
3
|
+
globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
|
|
4
|
+
globalObject.loadParticlesLinksInteraction = loadParticlesLinksInteraction;
|
|
5
|
+
export * from "./index.js";
|
package/esm/index.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
+
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
|
+
import { Linker } from "./Linker.js";
|
|
3
|
+
import { LinksPlugin } from "./LinksPlugin.js";
|
|
1
4
|
export async function loadParticlesLinksInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0
|
|
3
|
-
await engine.pluginManager.register(
|
|
4
|
-
const pluginManager = e.pluginManager
|
|
5
|
-
import("@tsparticles/plugin-interactivity"),
|
|
6
|
-
import("./LinksPlugin.js"),
|
|
7
|
-
]);
|
|
5
|
+
engine.checkVersion("4.0.0");
|
|
6
|
+
await engine.pluginManager.register((e) => {
|
|
7
|
+
const pluginManager = e.pluginManager;
|
|
8
8
|
ensureInteractivityPluginLoaded(e);
|
|
9
9
|
pluginManager.addPlugin(new LinksPlugin(pluginManager));
|
|
10
|
-
pluginManager.addInteractor?.("particlesLinks",
|
|
11
|
-
|
|
12
|
-
return new Linker(pluginManager, container);
|
|
10
|
+
pluginManager.addInteractor?.("particlesLinks", container => {
|
|
11
|
+
return Promise.resolve(new Linker(pluginManager, container));
|
|
13
12
|
});
|
|
14
13
|
});
|
|
15
14
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export async function loadParticlesLinksInteraction(engine) {
|
|
2
|
+
engine.checkVersion("4.0.0");
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const pluginManager = e.pluginManager, [{ ensureInteractivityPluginLoaded }, { LinksPlugin },] = await Promise.all([
|
|
5
|
+
import("@tsparticles/plugin-interactivity/lazy"),
|
|
6
|
+
import("./LinksPlugin.js"),
|
|
7
|
+
]);
|
|
8
|
+
ensureInteractivityPluginLoaded(e);
|
|
9
|
+
pluginManager.addPlugin(new LinksPlugin(pluginManager));
|
|
10
|
+
pluginManager.addInteractor?.("particlesLinks", async (container) => {
|
|
11
|
+
const { Linker } = await import("./Linker.js");
|
|
12
|
+
return new Linker(pluginManager, container);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export * from "./Options/Classes/Links.js";
|
|
17
|
+
export * from "./Options/Classes/LinksShadow.js";
|
|
18
|
+
export * from "./Options/Classes/LinksTriangle.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/interaction-particles-links",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "tsParticles links particles interaction",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -83,6 +83,13 @@
|
|
|
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
|
"peerDepdendencies": {
|
|
@@ -95,8 +102,8 @@
|
|
|
95
102
|
},
|
|
96
103
|
"type": "module",
|
|
97
104
|
"peerDependencies": {
|
|
98
|
-
"@tsparticles/canvas-utils": "4.0.0
|
|
99
|
-
"@tsparticles/engine": "4.0.0
|
|
100
|
-
"@tsparticles/plugin-interactivity": "4.0.0
|
|
105
|
+
"@tsparticles/canvas-utils": "4.0.0",
|
|
106
|
+
"@tsparticles/engine": "4.0.0",
|
|
107
|
+
"@tsparticles/plugin-interactivity": "4.0.0"
|
|
101
108
|
}
|
|
102
109
|
}
|