@tsparticles/interaction-particles-links 4.0.0-beta.12 → 4.0.0-beta.16
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/browser.d.ts +1 -0
- package/types/index.lazy.d.ts +8 -0
- package/104.min.js +0 -1
- package/954.min.js +0 -1
- package/976.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
|
@@ -1,387 +1,506 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
/*
|
|
10
|
-
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
11
|
-
* This devtool is neither made for production nor for readable output files.
|
|
12
|
-
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
13
|
-
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
14
|
-
* or disable the default devtool with "devtool: false".
|
|
15
|
-
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
16
|
-
*/
|
|
17
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
18
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
19
|
-
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/plugin-interactivity"));
|
|
20
|
-
else if(typeof define === 'function' && define.amd)
|
|
21
|
-
define(["@tsparticles/engine", "@tsparticles/plugin-interactivity"], factory);
|
|
22
|
-
else {
|
|
23
|
-
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/plugin-interactivity")) : factory(root["window"], root["window"]);
|
|
24
|
-
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
25
|
-
}
|
|
26
|
-
})(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__) => {
|
|
27
|
-
return /******/ (() => { // webpackBootstrap
|
|
28
|
-
/******/ "use strict";
|
|
29
|
-
/******/ var __webpack_modules__ = ({
|
|
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
|
+
/* Particles Interaction v4.0.0-beta.16 */
|
|
3
|
+
(function (global, factory) {
|
|
4
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/plugin-interactivity'), require('@tsparticles/engine')) :
|
|
5
|
+
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/plugin-interactivity', '@tsparticles/engine'], factory) :
|
|
6
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.__tsParticlesInternals = global.__tsParticlesInternals || {}, global.__tsParticlesInternals.interactions = global.__tsParticlesInternals.interactions || {}, global.__tsParticlesInternals.interactions.particlesLinks = global.__tsParticlesInternals.interactions.particlesLinks || {}), global.__tsParticlesInternals.plugins.interactivity, global.__tsParticlesInternals.engine));
|
|
7
|
+
})(this, (function (exports, pluginInteractivity, engine) { 'use strict';
|
|
30
8
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
9
|
+
class CircleWarp extends engine.Circle {
|
|
10
|
+
canvasSize;
|
|
11
|
+
constructor(x, y, radius, canvasSize) {
|
|
12
|
+
super(x, y, radius);
|
|
13
|
+
this.canvasSize = canvasSize;
|
|
14
|
+
}
|
|
15
|
+
contains(point) {
|
|
16
|
+
if (super.contains(point))
|
|
17
|
+
return true;
|
|
18
|
+
const { width, height } = this.canvasSize, { x, y } = point;
|
|
19
|
+
return (super.contains({ x: x - width, y }) ||
|
|
20
|
+
super.contains({ x: x + width, y }) ||
|
|
21
|
+
super.contains({ x, y: y - height }) ||
|
|
22
|
+
super.contains({ x, y: y + height }) ||
|
|
23
|
+
super.contains({ x: x - width, y: y - height }) ||
|
|
24
|
+
super.contains({ x: x + width, y: y + height }) ||
|
|
25
|
+
super.contains({ x: x - width, y: y + height }) ||
|
|
26
|
+
super.contains({ x: x + width, y: y - height }));
|
|
27
|
+
}
|
|
28
|
+
intersects(range) {
|
|
29
|
+
if (super.intersects(range))
|
|
30
|
+
return true;
|
|
31
|
+
const { width, height } = this.canvasSize, pos = range.position, shifts = [
|
|
32
|
+
{ x: -width, y: 0 },
|
|
33
|
+
{ x: width, y: 0 },
|
|
34
|
+
{ x: 0, y: -height },
|
|
35
|
+
{ x: 0, y: height },
|
|
36
|
+
{ x: -width, y: -height },
|
|
37
|
+
{ x: width, y: height },
|
|
38
|
+
{ x: -width, y: height },
|
|
39
|
+
{ x: width, y: -height },
|
|
40
|
+
];
|
|
41
|
+
for (const shift of shifts) {
|
|
42
|
+
const shiftedPos = { x: pos.x + shift.x, y: pos.y + shift.y };
|
|
43
|
+
let shiftedRange;
|
|
44
|
+
if (range instanceof engine.Circle) {
|
|
45
|
+
shiftedRange = new engine.Circle(shiftedPos.x, shiftedPos.y, range.radius);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
const rect = range;
|
|
49
|
+
shiftedRange = new engine.Rectangle(shiftedPos.x, shiftedPos.y, rect.size.width, rect.size.height);
|
|
50
|
+
}
|
|
51
|
+
if (super.intersects(shiftedRange))
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
36
57
|
|
|
37
|
-
|
|
58
|
+
class LinksShadow {
|
|
59
|
+
blur;
|
|
60
|
+
color;
|
|
61
|
+
enable;
|
|
62
|
+
constructor() {
|
|
63
|
+
this.blur = 5;
|
|
64
|
+
this.color = new engine.OptionsColor();
|
|
65
|
+
this.color.value = "#000";
|
|
66
|
+
this.enable = false;
|
|
67
|
+
}
|
|
68
|
+
load(data) {
|
|
69
|
+
if (engine.isNull(data)) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (data.blur !== undefined) {
|
|
73
|
+
this.blur = data.blur;
|
|
74
|
+
}
|
|
75
|
+
this.color = engine.OptionsColor.create(this.color, data.color);
|
|
76
|
+
if (data.enable !== undefined) {
|
|
77
|
+
this.enable = data.enable;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
38
81
|
|
|
39
|
-
|
|
82
|
+
class LinksTriangle {
|
|
83
|
+
color;
|
|
84
|
+
enable;
|
|
85
|
+
frequency;
|
|
86
|
+
opacity;
|
|
87
|
+
constructor() {
|
|
88
|
+
this.enable = false;
|
|
89
|
+
this.frequency = 1;
|
|
90
|
+
}
|
|
91
|
+
load(data) {
|
|
92
|
+
if (engine.isNull(data)) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (data.color !== undefined) {
|
|
96
|
+
this.color = engine.OptionsColor.create(this.color, data.color);
|
|
97
|
+
}
|
|
98
|
+
if (data.enable !== undefined) {
|
|
99
|
+
this.enable = data.enable;
|
|
100
|
+
}
|
|
101
|
+
if (data.frequency !== undefined) {
|
|
102
|
+
this.frequency = data.frequency;
|
|
103
|
+
}
|
|
104
|
+
if (data.opacity !== undefined) {
|
|
105
|
+
this.opacity = data.opacity;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
40
109
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
110
|
+
class Links {
|
|
111
|
+
blink;
|
|
112
|
+
color;
|
|
113
|
+
consent;
|
|
114
|
+
distance;
|
|
115
|
+
enable;
|
|
116
|
+
frequency;
|
|
117
|
+
id;
|
|
118
|
+
opacity;
|
|
119
|
+
shadow;
|
|
120
|
+
triangles;
|
|
121
|
+
warp;
|
|
122
|
+
width;
|
|
123
|
+
constructor() {
|
|
124
|
+
this.blink = false;
|
|
125
|
+
this.color = new engine.OptionsColor();
|
|
126
|
+
this.color.value = "#fff";
|
|
127
|
+
this.consent = false;
|
|
128
|
+
this.distance = 100;
|
|
129
|
+
this.enable = false;
|
|
130
|
+
this.frequency = 1;
|
|
131
|
+
this.opacity = 1;
|
|
132
|
+
this.shadow = new LinksShadow();
|
|
133
|
+
this.triangles = new LinksTriangle();
|
|
134
|
+
this.width = 1;
|
|
135
|
+
this.warp = false;
|
|
136
|
+
}
|
|
137
|
+
load(data) {
|
|
138
|
+
if (engine.isNull(data)) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
if (data.id !== undefined) {
|
|
142
|
+
this.id = data.id;
|
|
143
|
+
}
|
|
144
|
+
if (data.blink !== undefined) {
|
|
145
|
+
this.blink = data.blink;
|
|
146
|
+
}
|
|
147
|
+
this.color = engine.OptionsColor.create(this.color, data.color);
|
|
148
|
+
if (data.consent !== undefined) {
|
|
149
|
+
this.consent = data.consent;
|
|
150
|
+
}
|
|
151
|
+
if (data.distance !== undefined) {
|
|
152
|
+
this.distance = data.distance;
|
|
153
|
+
}
|
|
154
|
+
if (data.enable !== undefined) {
|
|
155
|
+
this.enable = data.enable;
|
|
156
|
+
}
|
|
157
|
+
if (data.frequency !== undefined) {
|
|
158
|
+
this.frequency = data.frequency;
|
|
159
|
+
}
|
|
160
|
+
if (data.opacity !== undefined) {
|
|
161
|
+
this.opacity = data.opacity;
|
|
162
|
+
}
|
|
163
|
+
this.shadow.load(data.shadow);
|
|
164
|
+
this.triangles.load(data.triangles);
|
|
165
|
+
if (data.width !== undefined) {
|
|
166
|
+
this.width = data.width;
|
|
167
|
+
}
|
|
168
|
+
if (data.warp !== undefined) {
|
|
169
|
+
this.warp = data.warp;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
46
173
|
|
|
47
|
-
|
|
174
|
+
const opacityOffset = 1, minDistance$1 = 0;
|
|
175
|
+
function getWarpDistance(pos1, pos2, canvasSize) {
|
|
176
|
+
const { dx, dy } = engine.getDistances(pos1, pos2), absDiffs = { x: Math.abs(dx), y: Math.abs(dy) }, warpDistances = {
|
|
177
|
+
x: Math.min(absDiffs.x, canvasSize.width - absDiffs.x),
|
|
178
|
+
y: Math.min(absDiffs.y, canvasSize.height - absDiffs.y),
|
|
179
|
+
};
|
|
180
|
+
return Math.hypot(warpDistances.x, warpDistances.y);
|
|
181
|
+
}
|
|
182
|
+
class Linker extends pluginInteractivity.ParticlesInteractorBase {
|
|
183
|
+
_maxDistance;
|
|
184
|
+
_pluginManager;
|
|
185
|
+
constructor(pluginManager, container) {
|
|
186
|
+
super(container);
|
|
187
|
+
this._pluginManager = pluginManager;
|
|
188
|
+
this._maxDistance = 0;
|
|
189
|
+
}
|
|
190
|
+
get maxDistance() {
|
|
191
|
+
return this._maxDistance;
|
|
192
|
+
}
|
|
193
|
+
clear() {
|
|
194
|
+
}
|
|
195
|
+
init() {
|
|
196
|
+
this.container.particles.linksColor = undefined;
|
|
197
|
+
this.container.particles.linksColors = new Map();
|
|
198
|
+
}
|
|
199
|
+
interact(p1) {
|
|
200
|
+
if (!p1.options.links) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
p1.links = [];
|
|
204
|
+
if (p1.linksDistance && p1.linksDistance > this._maxDistance) {
|
|
205
|
+
this._maxDistance = p1.linksDistance;
|
|
206
|
+
}
|
|
207
|
+
const pos1 = p1.getPosition(), container = this.container, canvasSize = container.canvas.size;
|
|
208
|
+
if (pos1.x < engine.originPoint.x || pos1.y < engine.originPoint.y || pos1.x > canvasSize.width || pos1.y > canvasSize.height) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const linkOpt1 = p1.options.links, optOpacity = linkOpt1.opacity, optDistance = p1.retina.linksDistance ?? minDistance$1, warp = linkOpt1.warp, range = warp ? new CircleWarp(pos1.x, pos1.y, optDistance, canvasSize) : new engine.Circle(pos1.x, pos1.y, optDistance), query = container.particles.grid.query(range);
|
|
212
|
+
for (const p2 of query) {
|
|
213
|
+
const linkOpt2 = p2.options.links;
|
|
214
|
+
if (p1 === p2 ||
|
|
215
|
+
!linkOpt2?.enable ||
|
|
216
|
+
linkOpt1.id !== linkOpt2.id ||
|
|
217
|
+
p2.spawning ||
|
|
218
|
+
p2.destroyed ||
|
|
219
|
+
!p2.links ||
|
|
220
|
+
p1.links.some(t => t.destination === p2) ||
|
|
221
|
+
p2.links.some(t => t.destination === p1)) {
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
const pos2 = p2.getPosition();
|
|
225
|
+
if (pos2.x < engine.originPoint.x || pos2.y < engine.originPoint.y || pos2.x > canvasSize.width || pos2.y > canvasSize.height) {
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
const distDirect = engine.getDistances(pos1, pos2).distance, distWarp = warp && linkOpt2.warp ? getWarpDistance(pos1, pos2, canvasSize) : distDirect, distance = Math.min(distDirect, distWarp);
|
|
229
|
+
if (distance > optDistance) {
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
const opacityLine = (opacityOffset - distance / optDistance) * optOpacity;
|
|
233
|
+
this._setColor(p1);
|
|
234
|
+
p1.links.push({
|
|
235
|
+
destination: p2,
|
|
236
|
+
opacity: opacityLine,
|
|
237
|
+
color: this._getLinkColor(p1, p2),
|
|
238
|
+
isWarped: distWarp < distDirect,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
isEnabled(particle) {
|
|
243
|
+
return !!particle.options.links?.enable;
|
|
244
|
+
}
|
|
245
|
+
loadParticlesOptions(options, ...sources) {
|
|
246
|
+
options.links ??= new Links();
|
|
247
|
+
for (const source of sources) {
|
|
248
|
+
options.links.load(source?.links);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
reset() {
|
|
252
|
+
}
|
|
253
|
+
_getLinkColor(p1, p2) {
|
|
254
|
+
const container = this.container, linksOptions = p1.options.links;
|
|
255
|
+
if (!linksOptions) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
const linkColor = linksOptions.id !== undefined
|
|
259
|
+
? container.particles.linksColors.get(linksOptions.id)
|
|
260
|
+
: container.particles.linksColor;
|
|
261
|
+
return engine.getLinkColor(p1, p2, linkColor);
|
|
262
|
+
}
|
|
263
|
+
_setColor(p1) {
|
|
264
|
+
if (!p1.options.links) {
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
const container = this.container, linksOptions = p1.options.links;
|
|
268
|
+
let linkColor = linksOptions.id === undefined
|
|
269
|
+
? container.particles.linksColor
|
|
270
|
+
: container.particles.linksColors.get(linksOptions.id);
|
|
271
|
+
if (linkColor) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
linkColor = engine.getLinkRandomColor(this._pluginManager, linksOptions.color, linksOptions.blink, linksOptions.consent);
|
|
275
|
+
if (linksOptions.id === undefined) {
|
|
276
|
+
container.particles.linksColor = linkColor;
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
container.particles.linksColors.set(linksOptions.id, linkColor);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
48
283
|
|
|
49
|
-
|
|
284
|
+
class LinksPlugin {
|
|
285
|
+
id = "links";
|
|
286
|
+
_pluginManager;
|
|
287
|
+
constructor(pluginManager) {
|
|
288
|
+
this._pluginManager = pluginManager;
|
|
289
|
+
}
|
|
290
|
+
async getPlugin(container) {
|
|
291
|
+
const { LinkInstance } = await Promise.resolve().then(function () { return LinkInstance$1; });
|
|
292
|
+
return new LinkInstance(this._pluginManager, container);
|
|
293
|
+
}
|
|
294
|
+
loadOptions() {
|
|
295
|
+
}
|
|
296
|
+
needsPlugin() {
|
|
297
|
+
return true;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
50
300
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
(
|
|
301
|
+
async function loadParticlesLinksInteraction(engine) {
|
|
302
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
303
|
+
await engine.pluginManager.register((e) => {
|
|
304
|
+
const pluginManager = e.pluginManager;
|
|
305
|
+
pluginInteractivity.ensureInteractivityPluginLoaded(e);
|
|
306
|
+
pluginManager.addPlugin(new LinksPlugin(pluginManager));
|
|
307
|
+
pluginManager.addInteractor?.("particlesLinks", container => {
|
|
308
|
+
return Promise.resolve(new Linker(pluginManager, container));
|
|
309
|
+
});
|
|
310
|
+
});
|
|
311
|
+
}
|
|
56
312
|
|
|
57
|
-
|
|
313
|
+
const globalObject = globalThis;
|
|
314
|
+
globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
|
|
315
|
+
globalObject.loadParticlesLinksInteraction = loadParticlesLinksInteraction;
|
|
58
316
|
|
|
59
|
-
|
|
317
|
+
function getLinkKey(ids) {
|
|
318
|
+
return [...ids].sort((a, b) => a - b).join("_");
|
|
319
|
+
}
|
|
320
|
+
function setLinkFrequency(particles, dictionary) {
|
|
321
|
+
const key = getLinkKey(particles.map(t => t.id));
|
|
322
|
+
let res = dictionary.get(key);
|
|
323
|
+
if (res === undefined) {
|
|
324
|
+
res = engine.getRandom();
|
|
325
|
+
dictionary.set(key, res);
|
|
326
|
+
}
|
|
327
|
+
return res;
|
|
328
|
+
}
|
|
60
329
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
330
|
+
const minOpacity = 0, minWidth = 0, minDistance = 0, maxFrequency = 1, defaultFrequency = 0;
|
|
331
|
+
class LinkInstance {
|
|
332
|
+
_colorCache = new Map();
|
|
333
|
+
_container;
|
|
334
|
+
_freqs;
|
|
335
|
+
_pluginManager;
|
|
336
|
+
constructor(pluginManager, container) {
|
|
337
|
+
this._pluginManager = pluginManager;
|
|
338
|
+
this._container = container;
|
|
339
|
+
this._freqs = { links: new Map(), triangles: new Map() };
|
|
340
|
+
}
|
|
341
|
+
drawParticle(context, particle) {
|
|
342
|
+
const { links, options } = particle;
|
|
343
|
+
if (!links?.length || !options.links) {
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
const linkOpts = options.links, width = particle.retina.linksWidth ?? minWidth, pos1 = particle.getPosition(), twinkle = particle.options["twinkle"]?.links, trianglesEnabled = linkOpts.triangles.enable, p1Destinations = trianglesEnabled ? new Set(links.map(l => l.destination.id)) : null, originalAlpha = context.globalAlpha;
|
|
347
|
+
let currentColorStyle = "", currentWidth = -1, currentAlpha = -1, pathOpen = false;
|
|
348
|
+
const flushLines = () => {
|
|
349
|
+
if (pathOpen) {
|
|
350
|
+
context.stroke();
|
|
351
|
+
pathOpen = false;
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
for (const link of links) {
|
|
355
|
+
if (linkOpts.frequency < maxFrequency &&
|
|
356
|
+
this._getLinkFrequency(particle, link.destination) > linkOpts.frequency) {
|
|
357
|
+
continue;
|
|
358
|
+
}
|
|
359
|
+
const pos2 = link.destination.getPosition();
|
|
360
|
+
if (trianglesEnabled && !link.isWarped && p1Destinations) {
|
|
361
|
+
flushLines();
|
|
362
|
+
this._drawTriangles(options, particle, link, p1Destinations, pos1, pos2, context);
|
|
363
|
+
}
|
|
364
|
+
if (link.opacity <= minOpacity || width <= minWidth) {
|
|
365
|
+
continue;
|
|
366
|
+
}
|
|
367
|
+
if (!linkOpts.enable) {
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
370
|
+
let opacity = link.opacity, colorLine = link.color;
|
|
371
|
+
const twinkleRgb = twinkle?.enable && engine.getRandom() < twinkle.frequency
|
|
372
|
+
? engine.rangeColorToRgb(this._pluginManager, twinkle.color)
|
|
373
|
+
: undefined;
|
|
374
|
+
if (twinkle && twinkleRgb) {
|
|
375
|
+
colorLine = twinkleRgb;
|
|
376
|
+
opacity = engine.getRangeValue(twinkle.opacity);
|
|
377
|
+
}
|
|
378
|
+
if (!colorLine) {
|
|
379
|
+
const linkColor = linkOpts.id !== undefined
|
|
380
|
+
? this._container.particles.linksColors.get(linkOpts.id)
|
|
381
|
+
: this._container.particles.linksColor;
|
|
382
|
+
colorLine = engine.getLinkColor(particle, link.destination, linkColor);
|
|
383
|
+
}
|
|
384
|
+
if (!colorLine) {
|
|
385
|
+
continue;
|
|
386
|
+
}
|
|
387
|
+
const colorStyle = this._getCachedStyle(colorLine);
|
|
388
|
+
if (colorStyle !== currentColorStyle || width !== currentWidth || opacity !== currentAlpha) {
|
|
389
|
+
flushLines();
|
|
390
|
+
context.strokeStyle = colorStyle;
|
|
391
|
+
context.lineWidth = width;
|
|
392
|
+
context.globalAlpha = opacity;
|
|
393
|
+
currentColorStyle = colorStyle;
|
|
394
|
+
currentWidth = width;
|
|
395
|
+
currentAlpha = opacity;
|
|
396
|
+
context.beginPath();
|
|
397
|
+
pathOpen = true;
|
|
398
|
+
}
|
|
399
|
+
if (link.isWarped) {
|
|
400
|
+
const canvasSize = this._container.canvas.size, dx = pos2.x - pos1.x, dy = pos2.y - pos1.y;
|
|
401
|
+
let sx = engine.originPoint.x, sy = engine.originPoint.y;
|
|
402
|
+
if (Math.abs(dx) > canvasSize.width * engine.half) {
|
|
403
|
+
sx = dx > minDistance ? -canvasSize.width : canvasSize.width;
|
|
404
|
+
}
|
|
405
|
+
if (Math.abs(dy) > canvasSize.height * engine.half) {
|
|
406
|
+
sy = dy > minDistance ? -canvasSize.height : canvasSize.height;
|
|
407
|
+
}
|
|
408
|
+
context.moveTo(pos1.x, pos1.y);
|
|
409
|
+
context.lineTo(pos2.x + sx, pos2.y + sy);
|
|
410
|
+
context.moveTo(pos1.x - sx, pos1.y - sy);
|
|
411
|
+
context.lineTo(pos2.x, pos2.y);
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
context.moveTo(pos1.x, pos1.y);
|
|
415
|
+
context.lineTo(pos2.x, pos2.y);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
flushLines();
|
|
419
|
+
context.globalAlpha = originalAlpha;
|
|
420
|
+
}
|
|
421
|
+
init() {
|
|
422
|
+
this._freqs.links.clear();
|
|
423
|
+
this._freqs.triangles.clear();
|
|
424
|
+
this._colorCache.clear();
|
|
425
|
+
return Promise.resolve();
|
|
426
|
+
}
|
|
427
|
+
particleCreated(particle) {
|
|
428
|
+
particle.links = [];
|
|
429
|
+
if (!particle.options.links) {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
particle.linksDistance = particle.options.links.distance;
|
|
433
|
+
particle.linksWidth = particle.options.links.width;
|
|
434
|
+
const ratio = this._container.retina.pixelRatio;
|
|
435
|
+
particle.retina.linksDistance = particle.linksDistance * ratio;
|
|
436
|
+
particle.retina.linksWidth = particle.linksWidth * ratio;
|
|
437
|
+
}
|
|
438
|
+
particleDestroyed(particle) {
|
|
439
|
+
particle.links = [];
|
|
440
|
+
}
|
|
441
|
+
_drawTriangles(options, p1, link, p1Destinations, pos1, pos2, context) {
|
|
442
|
+
const p2 = link.destination, triangleOptions = options.links?.triangles;
|
|
443
|
+
if (!triangleOptions?.enable || !p2.options.links?.triangles.enable) {
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
const p2Links = p2.links;
|
|
447
|
+
if (!p2Links?.length) {
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
for (const vertex of p2Links) {
|
|
451
|
+
if (vertex.isWarped ||
|
|
452
|
+
this._getLinkFrequency(p2, vertex.destination) > p2.options.links.frequency ||
|
|
453
|
+
!p1Destinations.has(vertex.destination.id)) {
|
|
454
|
+
continue;
|
|
455
|
+
}
|
|
456
|
+
const p3 = vertex.destination;
|
|
457
|
+
if (this._getTriangleFrequency(p1, p2, p3) > (options.links?.triangles.frequency ?? defaultFrequency)) {
|
|
458
|
+
continue;
|
|
459
|
+
}
|
|
460
|
+
const opacityTriangle = triangleOptions.opacity ?? (link.opacity + vertex.opacity) * engine.half, colorTriangle = engine.rangeColorToRgb(this._pluginManager, triangleOptions.color) ?? link.color;
|
|
461
|
+
if (!colorTriangle || opacityTriangle <= minOpacity) {
|
|
462
|
+
continue;
|
|
463
|
+
}
|
|
464
|
+
const pos3 = p3.getPosition();
|
|
465
|
+
context.save();
|
|
466
|
+
context.fillStyle = this._getCachedStyle(colorTriangle);
|
|
467
|
+
context.globalAlpha = opacityTriangle;
|
|
468
|
+
context.beginPath();
|
|
469
|
+
context.moveTo(pos1.x, pos1.y);
|
|
470
|
+
context.lineTo(pos2.x, pos2.y);
|
|
471
|
+
context.lineTo(pos3.x, pos3.y);
|
|
472
|
+
context.closePath();
|
|
473
|
+
context.fill();
|
|
474
|
+
context.restore();
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
_getCachedStyle(rgb) {
|
|
478
|
+
const key = `${rgb.r},${rgb.g},${rgb.b}`;
|
|
479
|
+
let style = this._colorCache.get(key);
|
|
480
|
+
if (!style) {
|
|
481
|
+
style = engine.getStyleFromRgb(rgb, this._container.hdr);
|
|
482
|
+
this._colorCache.set(key, style);
|
|
483
|
+
}
|
|
484
|
+
return style;
|
|
485
|
+
}
|
|
486
|
+
_getLinkFrequency(p1, p2) {
|
|
487
|
+
return setLinkFrequency([p1, p2], this._freqs.links);
|
|
488
|
+
}
|
|
489
|
+
_getTriangleFrequency(p1, p2, p3) {
|
|
490
|
+
return setLinkFrequency([p1, p2, p3], this._freqs.triangles);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
66
493
|
|
|
67
|
-
|
|
494
|
+
var LinkInstance$1 = /*#__PURE__*/Object.freeze({
|
|
495
|
+
__proto__: null,
|
|
496
|
+
LinkInstance: LinkInstance
|
|
497
|
+
});
|
|
68
498
|
|
|
69
|
-
|
|
499
|
+
exports.Links = Links;
|
|
500
|
+
exports.LinksShadow = LinksShadow;
|
|
501
|
+
exports.LinksTriangle = LinksTriangle;
|
|
502
|
+
exports.loadParticlesLinksInteraction = loadParticlesLinksInteraction;
|
|
70
503
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
\*******************************************************/
|
|
75
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
76
|
-
|
|
77
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LinksTriangle: () => (/* binding */ LinksTriangle)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nclass LinksTriangle {\n color;\n enable;\n frequency;\n opacity;\n constructor(){\n this.enable = false;\n this.frequency = 1;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.color !== undefined) {\n this.color = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OptionsColor.create(this.color, data.color);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.frequency !== undefined) {\n this.frequency = data.frequency;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/interaction-particles-links/./dist/browser/Options/Classes/LinksTriangle.js?\n}");
|
|
78
|
-
|
|
79
|
-
/***/ },
|
|
80
|
-
|
|
81
|
-
/***/ "./dist/browser/index.js"
|
|
82
|
-
/*!*******************************!*\
|
|
83
|
-
!*** ./dist/browser/index.js ***!
|
|
84
|
-
\*******************************/
|
|
85
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
86
|
-
|
|
87
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Links: () => (/* reexport safe */ _Options_Classes_Links_js__WEBPACK_IMPORTED_MODULE_0__.Links),\n/* harmony export */ LinksShadow: () => (/* reexport safe */ _Options_Classes_LinksShadow_js__WEBPACK_IMPORTED_MODULE_1__.LinksShadow),\n/* harmony export */ LinksTriangle: () => (/* reexport safe */ _Options_Classes_LinksTriangle_js__WEBPACK_IMPORTED_MODULE_2__.LinksTriangle),\n/* harmony export */ loadParticlesLinksInteraction: () => (/* binding */ loadParticlesLinksInteraction)\n/* harmony export */ });\n/* harmony import */ var _Options_Classes_Links_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Options/Classes/Links.js */ \"./dist/browser/Options/Classes/Links.js\");\n/* harmony import */ var _Options_Classes_LinksShadow_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/LinksShadow.js */ \"./dist/browser/Options/Classes/LinksShadow.js\");\n/* harmony import */ var _Options_Classes_LinksTriangle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Options/Classes/LinksTriangle.js */ \"./dist/browser/Options/Classes/LinksTriangle.js\");\nasync function loadParticlesLinksInteraction(engine) {\n engine.checkVersion(\"4.0.0-beta.12\");\n await engine.pluginManager.register(async (e)=>{\n const pluginManager = e.pluginManager, [{ ensureInteractivityPluginLoaded }, { LinksPlugin }] = await Promise.all([\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-interactivity */ \"@tsparticles/plugin-interactivity\", 19)),\n __webpack_require__.e(/*! import() */ \"dist_browser_LinksPlugin_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./LinksPlugin.js */ \"./dist/browser/LinksPlugin.js\"))\n ]);\n ensureInteractivityPluginLoaded(e);\n pluginManager.addPlugin(new LinksPlugin(pluginManager));\n pluginManager.addInteractor?.(\"particlesLinks\", async (container)=>{\n const { Linker } = await __webpack_require__.e(/*! import() */ \"dist_browser_Linker_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./Linker.js */ \"./dist/browser/Linker.js\"));\n return new Linker(pluginManager, container);\n });\n });\n}\n\n\n\n\n\n//# sourceURL=webpack://@tsparticles/interaction-particles-links/./dist/browser/index.js?\n}");
|
|
88
|
-
|
|
89
|
-
/***/ }
|
|
90
|
-
|
|
91
|
-
/******/ });
|
|
92
|
-
/************************************************************************/
|
|
93
|
-
/******/ // The module cache
|
|
94
|
-
/******/ var __webpack_module_cache__ = {};
|
|
95
|
-
/******/
|
|
96
|
-
/******/ // The require function
|
|
97
|
-
/******/ function __webpack_require__(moduleId) {
|
|
98
|
-
/******/ // Check if module is in cache
|
|
99
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
100
|
-
/******/ if (cachedModule !== undefined) {
|
|
101
|
-
/******/ return cachedModule.exports;
|
|
102
|
-
/******/ }
|
|
103
|
-
/******/ // Create a new module (and put it into the cache)
|
|
104
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
105
|
-
/******/ // no module.id needed
|
|
106
|
-
/******/ // no module.loaded needed
|
|
107
|
-
/******/ exports: {}
|
|
108
|
-
/******/ };
|
|
109
|
-
/******/
|
|
110
|
-
/******/ // Execute the module function
|
|
111
|
-
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
112
|
-
/******/ delete __webpack_module_cache__[moduleId];
|
|
113
|
-
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
114
|
-
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
115
|
-
/******/ throw e;
|
|
116
|
-
/******/ }
|
|
117
|
-
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
118
|
-
/******/
|
|
119
|
-
/******/ // Return the exports of the module
|
|
120
|
-
/******/ return module.exports;
|
|
121
|
-
/******/ }
|
|
122
|
-
/******/
|
|
123
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
124
|
-
/******/ __webpack_require__.m = __webpack_modules__;
|
|
125
|
-
/******/
|
|
126
|
-
/************************************************************************/
|
|
127
|
-
/******/ /* webpack/runtime/create fake namespace object */
|
|
128
|
-
/******/ (() => {
|
|
129
|
-
/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
|
|
130
|
-
/******/ var leafPrototypes;
|
|
131
|
-
/******/ // create a fake namespace object
|
|
132
|
-
/******/ // mode & 1: value is a module id, require it
|
|
133
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
134
|
-
/******/ // mode & 4: return value when already ns object
|
|
135
|
-
/******/ // mode & 16: return value when it's Promise-like
|
|
136
|
-
/******/ // mode & 8|1: behave like require
|
|
137
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
138
|
-
/******/ if(mode & 1) value = this(value);
|
|
139
|
-
/******/ if(mode & 8) return value;
|
|
140
|
-
/******/ if(typeof value === 'object' && value) {
|
|
141
|
-
/******/ if((mode & 4) && value.__esModule) return value;
|
|
142
|
-
/******/ if((mode & 16) && typeof value.then === 'function') return value;
|
|
143
|
-
/******/ }
|
|
144
|
-
/******/ var ns = Object.create(null);
|
|
145
|
-
/******/ __webpack_require__.r(ns);
|
|
146
|
-
/******/ var def = {};
|
|
147
|
-
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
|
|
148
|
-
/******/ for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
|
149
|
-
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
|
|
150
|
-
/******/ }
|
|
151
|
-
/******/ def['default'] = () => (value);
|
|
152
|
-
/******/ __webpack_require__.d(ns, def);
|
|
153
|
-
/******/ return ns;
|
|
154
|
-
/******/ };
|
|
155
|
-
/******/ })();
|
|
156
|
-
/******/
|
|
157
|
-
/******/ /* webpack/runtime/define property getters */
|
|
158
|
-
/******/ (() => {
|
|
159
|
-
/******/ // define getter functions for harmony exports
|
|
160
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
161
|
-
/******/ for(var key in definition) {
|
|
162
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
163
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
164
|
-
/******/ }
|
|
165
|
-
/******/ }
|
|
166
|
-
/******/ };
|
|
167
|
-
/******/ })();
|
|
168
|
-
/******/
|
|
169
|
-
/******/ /* webpack/runtime/ensure chunk */
|
|
170
|
-
/******/ (() => {
|
|
171
|
-
/******/ __webpack_require__.f = {};
|
|
172
|
-
/******/ // This file contains only the entry chunk.
|
|
173
|
-
/******/ // The chunk loading function for additional chunks
|
|
174
|
-
/******/ __webpack_require__.e = (chunkId) => {
|
|
175
|
-
/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
|
|
176
|
-
/******/ __webpack_require__.f[key](chunkId, promises);
|
|
177
|
-
/******/ return promises;
|
|
178
|
-
/******/ }, []));
|
|
179
|
-
/******/ };
|
|
180
|
-
/******/ })();
|
|
181
|
-
/******/
|
|
182
|
-
/******/ /* webpack/runtime/get javascript chunk filename */
|
|
183
|
-
/******/ (() => {
|
|
184
|
-
/******/ // This function allow to reference async chunks
|
|
185
|
-
/******/ __webpack_require__.u = (chunkId) => {
|
|
186
|
-
/******/ // return url for filenames based on template
|
|
187
|
-
/******/ return "" + chunkId + ".js";
|
|
188
|
-
/******/ };
|
|
189
|
-
/******/ })();
|
|
190
|
-
/******/
|
|
191
|
-
/******/ /* webpack/runtime/global */
|
|
192
|
-
/******/ (() => {
|
|
193
|
-
/******/ __webpack_require__.g = (function() {
|
|
194
|
-
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
195
|
-
/******/ try {
|
|
196
|
-
/******/ return this || new Function('return this')();
|
|
197
|
-
/******/ } catch (e) {
|
|
198
|
-
/******/ if (typeof window === 'object') return window;
|
|
199
|
-
/******/ }
|
|
200
|
-
/******/ })();
|
|
201
|
-
/******/ })();
|
|
202
|
-
/******/
|
|
203
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
204
|
-
/******/ (() => {
|
|
205
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
206
|
-
/******/ })();
|
|
207
|
-
/******/
|
|
208
|
-
/******/ /* webpack/runtime/load script */
|
|
209
|
-
/******/ (() => {
|
|
210
|
-
/******/ var inProgress = {};
|
|
211
|
-
/******/ var dataWebpackPrefix = "@tsparticles/interaction-particles-links:";
|
|
212
|
-
/******/ // loadScript function to load a script via script tag
|
|
213
|
-
/******/ __webpack_require__.l = (url, done, key, chunkId) => {
|
|
214
|
-
/******/ if(inProgress[url]) { inProgress[url].push(done); return; }
|
|
215
|
-
/******/ var script, needAttach;
|
|
216
|
-
/******/ if(key !== undefined) {
|
|
217
|
-
/******/ var scripts = document.getElementsByTagName("script");
|
|
218
|
-
/******/ for(var i = 0; i < scripts.length; i++) {
|
|
219
|
-
/******/ var s = scripts[i];
|
|
220
|
-
/******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
|
|
221
|
-
/******/ }
|
|
222
|
-
/******/ }
|
|
223
|
-
/******/ if(!script) {
|
|
224
|
-
/******/ needAttach = true;
|
|
225
|
-
/******/ script = document.createElement('script');
|
|
226
|
-
/******/
|
|
227
|
-
/******/ script.charset = 'utf-8';
|
|
228
|
-
/******/ if (__webpack_require__.nc) {
|
|
229
|
-
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
|
230
|
-
/******/ }
|
|
231
|
-
/******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
|
|
232
|
-
/******/
|
|
233
|
-
/******/ script.src = url;
|
|
234
|
-
/******/ }
|
|
235
|
-
/******/ inProgress[url] = [done];
|
|
236
|
-
/******/ var onScriptComplete = (prev, event) => {
|
|
237
|
-
/******/ // avoid mem leaks in IE.
|
|
238
|
-
/******/ script.onerror = script.onload = null;
|
|
239
|
-
/******/ clearTimeout(timeout);
|
|
240
|
-
/******/ var doneFns = inProgress[url];
|
|
241
|
-
/******/ delete inProgress[url];
|
|
242
|
-
/******/ script.parentNode && script.parentNode.removeChild(script);
|
|
243
|
-
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
|
|
244
|
-
/******/ if(prev) return prev(event);
|
|
245
|
-
/******/ }
|
|
246
|
-
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
|
|
247
|
-
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
|
|
248
|
-
/******/ script.onload = onScriptComplete.bind(null, script.onload);
|
|
249
|
-
/******/ needAttach && document.head.appendChild(script);
|
|
250
|
-
/******/ };
|
|
251
|
-
/******/ })();
|
|
252
|
-
/******/
|
|
253
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
254
|
-
/******/ (() => {
|
|
255
|
-
/******/ // define __esModule on exports
|
|
256
|
-
/******/ __webpack_require__.r = (exports) => {
|
|
257
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
258
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
259
|
-
/******/ }
|
|
260
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
261
|
-
/******/ };
|
|
262
|
-
/******/ })();
|
|
263
|
-
/******/
|
|
264
|
-
/******/ /* webpack/runtime/publicPath */
|
|
265
|
-
/******/ (() => {
|
|
266
|
-
/******/ var scriptUrl;
|
|
267
|
-
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
|
268
|
-
/******/ var document = __webpack_require__.g.document;
|
|
269
|
-
/******/ if (!scriptUrl && document) {
|
|
270
|
-
/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
|
|
271
|
-
/******/ scriptUrl = document.currentScript.src;
|
|
272
|
-
/******/ if (!scriptUrl) {
|
|
273
|
-
/******/ var scripts = document.getElementsByTagName("script");
|
|
274
|
-
/******/ if(scripts.length) {
|
|
275
|
-
/******/ var i = scripts.length - 1;
|
|
276
|
-
/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
|
|
277
|
-
/******/ }
|
|
278
|
-
/******/ }
|
|
279
|
-
/******/ }
|
|
280
|
-
/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
|
|
281
|
-
/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
|
|
282
|
-
/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
|
|
283
|
-
/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
|
|
284
|
-
/******/ __webpack_require__.p = scriptUrl;
|
|
285
|
-
/******/ })();
|
|
286
|
-
/******/
|
|
287
|
-
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
288
|
-
/******/ (() => {
|
|
289
|
-
/******/ // no baseURI
|
|
290
|
-
/******/
|
|
291
|
-
/******/ // object to store loaded and loading chunks
|
|
292
|
-
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
293
|
-
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
|
294
|
-
/******/ var installedChunks = {
|
|
295
|
-
/******/ "tsparticles.interaction.particles.links": 0
|
|
296
|
-
/******/ };
|
|
297
|
-
/******/
|
|
298
|
-
/******/ __webpack_require__.f.j = (chunkId, promises) => {
|
|
299
|
-
/******/ // JSONP chunk loading for javascript
|
|
300
|
-
/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
|
|
301
|
-
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
|
|
302
|
-
/******/
|
|
303
|
-
/******/ // a Promise means "currently loading".
|
|
304
|
-
/******/ if(installedChunkData) {
|
|
305
|
-
/******/ promises.push(installedChunkData[2]);
|
|
306
|
-
/******/ } else {
|
|
307
|
-
/******/ if(true) { // all chunks have JS
|
|
308
|
-
/******/ // setup Promise in chunk cache
|
|
309
|
-
/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
|
|
310
|
-
/******/ promises.push(installedChunkData[2] = promise);
|
|
311
|
-
/******/
|
|
312
|
-
/******/ // start chunk loading
|
|
313
|
-
/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId);
|
|
314
|
-
/******/ // create error before stack unwound to get useful stacktrace later
|
|
315
|
-
/******/ var error = new Error();
|
|
316
|
-
/******/ var loadingEnded = (event) => {
|
|
317
|
-
/******/ if(__webpack_require__.o(installedChunks, chunkId)) {
|
|
318
|
-
/******/ installedChunkData = installedChunks[chunkId];
|
|
319
|
-
/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
|
|
320
|
-
/******/ if(installedChunkData) {
|
|
321
|
-
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
|
322
|
-
/******/ var realSrc = event && event.target && event.target.src;
|
|
323
|
-
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
|
|
324
|
-
/******/ error.name = 'ChunkLoadError';
|
|
325
|
-
/******/ error.type = errorType;
|
|
326
|
-
/******/ error.request = realSrc;
|
|
327
|
-
/******/ installedChunkData[1](error);
|
|
328
|
-
/******/ }
|
|
329
|
-
/******/ }
|
|
330
|
-
/******/ };
|
|
331
|
-
/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
|
|
332
|
-
/******/ }
|
|
333
|
-
/******/ }
|
|
334
|
-
/******/ }
|
|
335
|
-
/******/ };
|
|
336
|
-
/******/
|
|
337
|
-
/******/ // no prefetching
|
|
338
|
-
/******/
|
|
339
|
-
/******/ // no preloaded
|
|
340
|
-
/******/
|
|
341
|
-
/******/ // no HMR
|
|
342
|
-
/******/
|
|
343
|
-
/******/ // no HMR manifest
|
|
344
|
-
/******/
|
|
345
|
-
/******/ // no on chunks loaded
|
|
346
|
-
/******/
|
|
347
|
-
/******/ // install a JSONP callback for chunk loading
|
|
348
|
-
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
|
349
|
-
/******/ var [chunkIds, moreModules, runtime] = data;
|
|
350
|
-
/******/ // add "moreModules" to the modules object,
|
|
351
|
-
/******/ // then flag all "chunkIds" as loaded and fire callback
|
|
352
|
-
/******/ var moduleId, chunkId, i = 0;
|
|
353
|
-
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
|
354
|
-
/******/ for(moduleId in moreModules) {
|
|
355
|
-
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
|
356
|
-
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
357
|
-
/******/ }
|
|
358
|
-
/******/ }
|
|
359
|
-
/******/ if(runtime) var result = runtime(__webpack_require__);
|
|
360
|
-
/******/ }
|
|
361
|
-
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
|
362
|
-
/******/ for(;i < chunkIds.length; i++) {
|
|
363
|
-
/******/ chunkId = chunkIds[i];
|
|
364
|
-
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
|
365
|
-
/******/ installedChunks[chunkId][0]();
|
|
366
|
-
/******/ }
|
|
367
|
-
/******/ installedChunks[chunkId] = 0;
|
|
368
|
-
/******/ }
|
|
369
|
-
/******/
|
|
370
|
-
/******/ }
|
|
371
|
-
/******/
|
|
372
|
-
/******/ var chunkLoadingGlobal = this["webpackChunk_tsparticles_interaction_particles_links"] = this["webpackChunk_tsparticles_interaction_particles_links"] || [];
|
|
373
|
-
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
|
374
|
-
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
|
375
|
-
/******/ })();
|
|
376
|
-
/******/
|
|
377
|
-
/************************************************************************/
|
|
378
|
-
/******/
|
|
379
|
-
/******/ // startup
|
|
380
|
-
/******/ // Load entry module and return exports
|
|
381
|
-
/******/ // This entry module can't be inlined because the eval devtool is used.
|
|
382
|
-
/******/ var __webpack_exports__ = __webpack_require__("./dist/browser/index.js");
|
|
383
|
-
/******/
|
|
384
|
-
/******/ return __webpack_exports__;
|
|
385
|
-
/******/ })()
|
|
386
|
-
;
|
|
387
|
-
});
|
|
504
|
+
}));
|
|
505
|
+
Object.assign(globalThis.window || globalThis, { loadParticlesLinksInteraction: (globalThis.__tsParticlesInternals.interactions.particlesLinks || {}).loadParticlesLinksInteraction });
|
|
506
|
+
delete (globalThis.window || globalThis).tsparticlesInternalExports;
|