tsparticles 1.37.0 → 1.37.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/Core/InteractionManager.d.ts +1 -0
- package/Core/InteractionManager.js +4 -1
- package/Core/Particles.d.ts +1 -1
- package/Core/Particles.js +3 -1
- package/Utils/Plugins.d.ts +2 -2
- package/Utils/Plugins.js +4 -4
- package/browser/Core/InteractionManager.d.ts +1 -0
- package/browser/Core/InteractionManager.js +4 -1
- package/browser/Core/Particles.d.ts +1 -1
- package/browser/Core/Particles.js +3 -1
- package/browser/Plugins/PolygonMask/plugin.js +1 -1
- package/browser/Utils/Plugins.d.ts +2 -2
- package/browser/Utils/Plugins.js +4 -4
- package/esm/Core/InteractionManager.d.ts +1 -0
- package/esm/Core/InteractionManager.js +4 -1
- package/esm/Core/Particles.d.ts +1 -1
- package/esm/Core/Particles.js +3 -1
- package/esm/Utils/Plugins.d.ts +2 -2
- package/esm/Utils/Plugins.js +4 -4
- package/package.json +1 -1
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/tsparticles.js +433 -371
- package/tsparticles.min.js +2 -2
- package/tsparticles.slim.js +405 -180
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.pathseg.js +0 -1472
package/tsparticles.js
CHANGED
|
@@ -4,46 +4,11 @@
|
|
|
4
4
|
for (var i in a) (typeof exports === "object" ? exports : root)[i] = a[i];
|
|
5
5
|
}
|
|
6
6
|
})(this, (function() {
|
|
7
|
-
return (
|
|
7
|
+
return function() {
|
|
8
8
|
"use strict";
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var cachedModule = __webpack_module_cache__[moduleId];
|
|
13
|
-
if (cachedModule !== undefined) {
|
|
14
|
-
return cachedModule.exports;
|
|
15
|
-
}
|
|
16
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
17
|
-
exports: {}
|
|
18
|
-
};
|
|
19
|
-
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
20
|
-
return module.exports;
|
|
21
|
-
}
|
|
22
|
-
__webpack_require__.m = __webpack_modules__;
|
|
23
|
-
(() => {
|
|
24
|
-
var getProto = Object.getPrototypeOf ? obj => Object.getPrototypeOf(obj) : obj => obj.__proto__;
|
|
25
|
-
var leafPrototypes;
|
|
26
|
-
__webpack_require__.t = function(value, mode) {
|
|
27
|
-
if (mode & 1) value = this(value);
|
|
28
|
-
if (mode & 8) return value;
|
|
29
|
-
if (typeof value === "object" && value) {
|
|
30
|
-
if (mode & 4 && value.__esModule) return value;
|
|
31
|
-
if (mode & 16 && typeof value.then === "function") return value;
|
|
32
|
-
}
|
|
33
|
-
var ns = Object.create(null);
|
|
34
|
-
__webpack_require__.r(ns);
|
|
35
|
-
var def = {};
|
|
36
|
-
leafPrototypes = leafPrototypes || [ null, getProto({}), getProto([]), getProto(getProto) ];
|
|
37
|
-
for (var current = mode & 2 && value; typeof current == "object" && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
|
38
|
-
Object.getOwnPropertyNames(current).forEach((key => def[key] = () => value[key]));
|
|
39
|
-
}
|
|
40
|
-
def["default"] = () => value;
|
|
41
|
-
__webpack_require__.d(ns, def);
|
|
42
|
-
return ns;
|
|
43
|
-
};
|
|
44
|
-
})();
|
|
45
|
-
(() => {
|
|
46
|
-
__webpack_require__.d = (exports, definition) => {
|
|
9
|
+
var __webpack_require__ = {};
|
|
10
|
+
!function() {
|
|
11
|
+
__webpack_require__.d = function(exports, definition) {
|
|
47
12
|
for (var key in definition) {
|
|
48
13
|
if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
49
14
|
Object.defineProperty(exports, key, {
|
|
@@ -53,81 +18,14 @@
|
|
|
53
18
|
}
|
|
54
19
|
}
|
|
55
20
|
};
|
|
56
|
-
}
|
|
57
|
-
(
|
|
58
|
-
__webpack_require__.
|
|
59
|
-
|
|
60
|
-
__webpack_require__.f[key](chunkId, promises);
|
|
61
|
-
return promises;
|
|
62
|
-
}), []));
|
|
63
|
-
})();
|
|
64
|
-
(() => {
|
|
65
|
-
__webpack_require__.u = chunkId => "" + "tsparticles.pathseg" + ".js";
|
|
66
|
-
})();
|
|
67
|
-
(() => {
|
|
68
|
-
__webpack_require__.g = function() {
|
|
69
|
-
if (typeof globalThis === "object") return globalThis;
|
|
70
|
-
try {
|
|
71
|
-
return this || new Function("return this")();
|
|
72
|
-
} catch (e) {
|
|
73
|
-
if (typeof window === "object") return window;
|
|
74
|
-
}
|
|
75
|
-
}();
|
|
76
|
-
})();
|
|
77
|
-
(() => {
|
|
78
|
-
__webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
|
|
79
|
-
})();
|
|
80
|
-
(() => {
|
|
81
|
-
var inProgress = {};
|
|
82
|
-
var dataWebpackPrefix = "tsparticles:";
|
|
83
|
-
__webpack_require__.l = (url, done, key, chunkId) => {
|
|
84
|
-
if (inProgress[url]) {
|
|
85
|
-
inProgress[url].push(done);
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
var script, needAttach;
|
|
89
|
-
if (key !== undefined) {
|
|
90
|
-
var scripts = document.getElementsByTagName("script");
|
|
91
|
-
for (var i = 0; i < scripts.length; i++) {
|
|
92
|
-
var s = scripts[i];
|
|
93
|
-
if (s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) {
|
|
94
|
-
script = s;
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
if (!script) {
|
|
100
|
-
needAttach = true;
|
|
101
|
-
script = document.createElement("script");
|
|
102
|
-
script.charset = "utf-8";
|
|
103
|
-
script.timeout = 120;
|
|
104
|
-
if (__webpack_require__.nc) {
|
|
105
|
-
script.setAttribute("nonce", __webpack_require__.nc);
|
|
106
|
-
}
|
|
107
|
-
script.setAttribute("data-webpack", dataWebpackPrefix + key);
|
|
108
|
-
script.src = url;
|
|
109
|
-
}
|
|
110
|
-
inProgress[url] = [ done ];
|
|
111
|
-
var onScriptComplete = (prev, event) => {
|
|
112
|
-
script.onerror = script.onload = null;
|
|
113
|
-
clearTimeout(timeout);
|
|
114
|
-
var doneFns = inProgress[url];
|
|
115
|
-
delete inProgress[url];
|
|
116
|
-
script.parentNode && script.parentNode.removeChild(script);
|
|
117
|
-
doneFns && doneFns.forEach((fn => fn(event)));
|
|
118
|
-
if (prev) return prev(event);
|
|
119
|
-
};
|
|
120
|
-
var timeout = setTimeout(onScriptComplete.bind(null, undefined, {
|
|
121
|
-
type: "timeout",
|
|
122
|
-
target: script
|
|
123
|
-
}), 12e4);
|
|
124
|
-
script.onerror = onScriptComplete.bind(null, script.onerror);
|
|
125
|
-
script.onload = onScriptComplete.bind(null, script.onload);
|
|
126
|
-
needAttach && document.head.appendChild(script);
|
|
21
|
+
}();
|
|
22
|
+
!function() {
|
|
23
|
+
__webpack_require__.o = function(obj, prop) {
|
|
24
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
127
25
|
};
|
|
128
|
-
}
|
|
129
|
-
(
|
|
130
|
-
__webpack_require__.r = exports
|
|
26
|
+
}();
|
|
27
|
+
!function() {
|
|
28
|
+
__webpack_require__.r = function(exports) {
|
|
131
29
|
if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
|
|
132
30
|
Object.defineProperty(exports, Symbol.toStringTag, {
|
|
133
31
|
value: "Module"
|
|
@@ -137,200 +35,355 @@
|
|
|
137
35
|
value: true
|
|
138
36
|
});
|
|
139
37
|
};
|
|
140
|
-
}
|
|
141
|
-
(() => {
|
|
142
|
-
var scriptUrl;
|
|
143
|
-
if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
|
144
|
-
var document = __webpack_require__.g.document;
|
|
145
|
-
if (!scriptUrl && document) {
|
|
146
|
-
if (document.currentScript) scriptUrl = document.currentScript.src;
|
|
147
|
-
if (!scriptUrl) {
|
|
148
|
-
var scripts = document.getElementsByTagName("script");
|
|
149
|
-
if (scripts.length) scriptUrl = scripts[scripts.length - 1].src;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
|
|
153
|
-
scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
|
|
154
|
-
__webpack_require__.p = scriptUrl;
|
|
155
|
-
})();
|
|
156
|
-
(() => {
|
|
157
|
-
var installedChunks = {
|
|
158
|
-
649: 0,
|
|
159
|
-
155: 0
|
|
160
|
-
};
|
|
161
|
-
__webpack_require__.f.j = (chunkId, promises) => {
|
|
162
|
-
var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
|
|
163
|
-
if (installedChunkData !== 0) {
|
|
164
|
-
if (installedChunkData) {
|
|
165
|
-
promises.push(installedChunkData[2]);
|
|
166
|
-
} else {
|
|
167
|
-
if (true) {
|
|
168
|
-
var promise = new Promise(((resolve, reject) => installedChunkData = installedChunks[chunkId] = [ resolve, reject ]));
|
|
169
|
-
promises.push(installedChunkData[2] = promise);
|
|
170
|
-
var url = __webpack_require__.p + __webpack_require__.u(chunkId);
|
|
171
|
-
var error = new Error;
|
|
172
|
-
var loadingEnded = event => {
|
|
173
|
-
if (__webpack_require__.o(installedChunks, chunkId)) {
|
|
174
|
-
installedChunkData = installedChunks[chunkId];
|
|
175
|
-
if (installedChunkData !== 0) installedChunks[chunkId] = undefined;
|
|
176
|
-
if (installedChunkData) {
|
|
177
|
-
var errorType = event && (event.type === "load" ? "missing" : event.type);
|
|
178
|
-
var realSrc = event && event.target && event.target.src;
|
|
179
|
-
error.message = "Loading chunk " + chunkId + " failed.\n(" + errorType + ": " + realSrc + ")";
|
|
180
|
-
error.name = "ChunkLoadError";
|
|
181
|
-
error.type = errorType;
|
|
182
|
-
error.request = realSrc;
|
|
183
|
-
installedChunkData[1](error);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
__webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
|
|
188
|
-
} else installedChunks[chunkId] = 0;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
|
193
|
-
var [chunkIds, moreModules, runtime] = data;
|
|
194
|
-
var moduleId, chunkId, i = 0;
|
|
195
|
-
if (chunkIds.some((id => installedChunks[id] !== 0))) {
|
|
196
|
-
for (moduleId in moreModules) {
|
|
197
|
-
if (__webpack_require__.o(moreModules, moduleId)) {
|
|
198
|
-
__webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
if (runtime) var result = runtime(__webpack_require__);
|
|
202
|
-
}
|
|
203
|
-
if (parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
|
204
|
-
for (;i < chunkIds.length; i++) {
|
|
205
|
-
chunkId = chunkIds[i];
|
|
206
|
-
if (__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
|
207
|
-
installedChunks[chunkId][0]();
|
|
208
|
-
}
|
|
209
|
-
installedChunks[chunkIds[i]] = 0;
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
var chunkLoadingGlobal = this["webpackChunktsparticles"] = this["webpackChunktsparticles"] || [];
|
|
213
|
-
chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
|
214
|
-
chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
|
215
|
-
})();
|
|
38
|
+
}();
|
|
216
39
|
var __webpack_exports__ = {};
|
|
217
40
|
__webpack_require__.r(__webpack_exports__);
|
|
218
41
|
__webpack_require__.d(__webpack_exports__, {
|
|
219
|
-
AbsorberClickMode: ()
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
42
|
+
AbsorberClickMode: function() {
|
|
43
|
+
return AbsorberClickMode;
|
|
44
|
+
},
|
|
45
|
+
AlterType: function() {
|
|
46
|
+
return AlterType;
|
|
47
|
+
},
|
|
48
|
+
AnimationStatus: function() {
|
|
49
|
+
return AnimationStatus;
|
|
50
|
+
},
|
|
51
|
+
Circle: function() {
|
|
52
|
+
return Circle;
|
|
53
|
+
},
|
|
54
|
+
CircleWarp: function() {
|
|
55
|
+
return CircleWarp;
|
|
56
|
+
},
|
|
57
|
+
ClickMode: function() {
|
|
58
|
+
return ClickMode;
|
|
59
|
+
},
|
|
60
|
+
CollisionMode: function() {
|
|
61
|
+
return CollisionMode;
|
|
62
|
+
},
|
|
63
|
+
Constants: function() {
|
|
64
|
+
return Constants;
|
|
65
|
+
},
|
|
66
|
+
Container: function() {
|
|
67
|
+
return Container;
|
|
68
|
+
},
|
|
69
|
+
DestroyMode: function() {
|
|
70
|
+
return DestroyMode;
|
|
71
|
+
},
|
|
72
|
+
DestroyType: function() {
|
|
73
|
+
return DestroyType;
|
|
74
|
+
},
|
|
75
|
+
DivMode: function() {
|
|
76
|
+
return DivMode;
|
|
77
|
+
},
|
|
78
|
+
DivType: function() {
|
|
79
|
+
return DivType;
|
|
80
|
+
},
|
|
81
|
+
EasingType: function() {
|
|
82
|
+
return EasingType;
|
|
83
|
+
},
|
|
84
|
+
EmitterClickMode: function() {
|
|
85
|
+
return EmitterClickMode;
|
|
86
|
+
},
|
|
87
|
+
EmitterShapeType: function() {
|
|
88
|
+
return EmitterShapeType;
|
|
89
|
+
},
|
|
90
|
+
ExternalInteractorBase: function() {
|
|
91
|
+
return ExternalInteractorBase;
|
|
92
|
+
},
|
|
93
|
+
GradientType: function() {
|
|
94
|
+
return GradientType;
|
|
95
|
+
},
|
|
96
|
+
HoverMode: function() {
|
|
97
|
+
return HoverMode;
|
|
98
|
+
},
|
|
99
|
+
InlineArrangement: function() {
|
|
100
|
+
return InlineArrangement;
|
|
101
|
+
},
|
|
102
|
+
InteractivityDetect: function() {
|
|
103
|
+
return InteractivityDetect;
|
|
104
|
+
},
|
|
105
|
+
InteractorType: function() {
|
|
106
|
+
return InteractorType;
|
|
107
|
+
},
|
|
108
|
+
Main: function() {
|
|
109
|
+
return Main;
|
|
110
|
+
},
|
|
111
|
+
MoveDirection: function() {
|
|
112
|
+
return MoveDirection;
|
|
113
|
+
},
|
|
114
|
+
MoveType: function() {
|
|
115
|
+
return MoveType;
|
|
116
|
+
},
|
|
117
|
+
OrbitType: function() {
|
|
118
|
+
return OrbitType;
|
|
119
|
+
},
|
|
120
|
+
OutMode: function() {
|
|
121
|
+
return OutMode;
|
|
122
|
+
},
|
|
123
|
+
OutModeDirection: function() {
|
|
124
|
+
return OutModeDirection;
|
|
125
|
+
},
|
|
126
|
+
Particle: function() {
|
|
127
|
+
return Particle;
|
|
128
|
+
},
|
|
129
|
+
ParticlesInteractorBase: function() {
|
|
130
|
+
return ParticlesInteractorBase;
|
|
131
|
+
},
|
|
132
|
+
Point: function() {
|
|
133
|
+
return Point;
|
|
134
|
+
},
|
|
135
|
+
Rectangle: function() {
|
|
136
|
+
return Rectangle;
|
|
137
|
+
},
|
|
138
|
+
ResponsiveMode: function() {
|
|
139
|
+
return ResponsiveMode;
|
|
140
|
+
},
|
|
141
|
+
RollMode: function() {
|
|
142
|
+
return RollMode;
|
|
143
|
+
},
|
|
144
|
+
RotateDirection: function() {
|
|
145
|
+
return RotateDirection;
|
|
146
|
+
},
|
|
147
|
+
ShapeType: function() {
|
|
148
|
+
return ShapeType;
|
|
149
|
+
},
|
|
150
|
+
SizeMode: function() {
|
|
151
|
+
return SizeMode;
|
|
152
|
+
},
|
|
153
|
+
StartValueType: function() {
|
|
154
|
+
return StartValueType;
|
|
155
|
+
},
|
|
156
|
+
ThemeMode: function() {
|
|
157
|
+
return ThemeMode;
|
|
158
|
+
},
|
|
159
|
+
TiltDirection: function() {
|
|
160
|
+
return TiltDirection;
|
|
161
|
+
},
|
|
162
|
+
Type: function() {
|
|
163
|
+
return Type;
|
|
164
|
+
},
|
|
165
|
+
Vector: function() {
|
|
166
|
+
return Vector;
|
|
167
|
+
},
|
|
168
|
+
alterHsl: function() {
|
|
169
|
+
return alterHsl;
|
|
170
|
+
},
|
|
171
|
+
animate: function() {
|
|
172
|
+
return animate;
|
|
173
|
+
},
|
|
174
|
+
areBoundsInside: function() {
|
|
175
|
+
return areBoundsInside;
|
|
176
|
+
},
|
|
177
|
+
arrayRandomIndex: function() {
|
|
178
|
+
return arrayRandomIndex;
|
|
179
|
+
},
|
|
180
|
+
calcEasing: function() {
|
|
181
|
+
return calcEasing;
|
|
182
|
+
},
|
|
183
|
+
calculateBounds: function() {
|
|
184
|
+
return calculateBounds;
|
|
185
|
+
},
|
|
186
|
+
cancelAnimation: function() {
|
|
187
|
+
return cancelAnimation;
|
|
188
|
+
},
|
|
189
|
+
circleBounce: function() {
|
|
190
|
+
return circleBounce;
|
|
191
|
+
},
|
|
192
|
+
circleBounceDataFromParticle: function() {
|
|
193
|
+
return circleBounceDataFromParticle;
|
|
194
|
+
},
|
|
195
|
+
clamp: function() {
|
|
196
|
+
return clamp;
|
|
197
|
+
},
|
|
198
|
+
clear: function() {
|
|
199
|
+
return clear;
|
|
200
|
+
},
|
|
201
|
+
collisionVelocity: function() {
|
|
202
|
+
return collisionVelocity;
|
|
203
|
+
},
|
|
204
|
+
colorMix: function() {
|
|
205
|
+
return colorMix;
|
|
206
|
+
},
|
|
207
|
+
colorToHsl: function() {
|
|
208
|
+
return colorToHsl;
|
|
209
|
+
},
|
|
210
|
+
colorToRgb: function() {
|
|
211
|
+
return colorToRgb;
|
|
212
|
+
},
|
|
213
|
+
deepExtend: function() {
|
|
214
|
+
return deepExtend;
|
|
215
|
+
},
|
|
216
|
+
divMode: function() {
|
|
217
|
+
return divMode;
|
|
218
|
+
},
|
|
219
|
+
divModeExecute: function() {
|
|
220
|
+
return divModeExecute;
|
|
221
|
+
},
|
|
222
|
+
drawConnectLine: function() {
|
|
223
|
+
return drawConnectLine;
|
|
224
|
+
},
|
|
225
|
+
drawEllipse: function() {
|
|
226
|
+
return drawEllipse;
|
|
227
|
+
},
|
|
228
|
+
drawGrabLine: function() {
|
|
229
|
+
return drawGrabLine;
|
|
230
|
+
},
|
|
231
|
+
drawLinkLine: function() {
|
|
232
|
+
return drawLinkLine;
|
|
233
|
+
},
|
|
234
|
+
drawLinkTriangle: function() {
|
|
235
|
+
return drawLinkTriangle;
|
|
236
|
+
},
|
|
237
|
+
drawParticle: function() {
|
|
238
|
+
return drawParticle;
|
|
239
|
+
},
|
|
240
|
+
drawParticlePlugin: function() {
|
|
241
|
+
return drawParticlePlugin;
|
|
242
|
+
},
|
|
243
|
+
drawPlugin: function() {
|
|
244
|
+
return drawPlugin;
|
|
245
|
+
},
|
|
246
|
+
drawShape: function() {
|
|
247
|
+
return drawShape;
|
|
248
|
+
},
|
|
249
|
+
drawShapeAfterEffect: function() {
|
|
250
|
+
return drawShapeAfterEffect;
|
|
251
|
+
},
|
|
252
|
+
getDistance: function() {
|
|
253
|
+
return getDistance;
|
|
254
|
+
},
|
|
255
|
+
getDistances: function() {
|
|
256
|
+
return getDistances;
|
|
257
|
+
},
|
|
258
|
+
getHslAnimationFromHsl: function() {
|
|
259
|
+
return getHslAnimationFromHsl;
|
|
260
|
+
},
|
|
261
|
+
getHslFromAnimation: function() {
|
|
262
|
+
return getHslFromAnimation;
|
|
263
|
+
},
|
|
264
|
+
getLinkColor: function() {
|
|
265
|
+
return getLinkColor;
|
|
266
|
+
},
|
|
267
|
+
getLinkRandomColor: function() {
|
|
268
|
+
return getLinkRandomColor;
|
|
269
|
+
},
|
|
270
|
+
getParticleBaseVelocity: function() {
|
|
271
|
+
return getParticleBaseVelocity;
|
|
272
|
+
},
|
|
273
|
+
getParticleDirectionAngle: function() {
|
|
274
|
+
return getParticleDirectionAngle;
|
|
275
|
+
},
|
|
276
|
+
getRandomRgbColor: function() {
|
|
277
|
+
return getRandomRgbColor;
|
|
278
|
+
},
|
|
279
|
+
getRangeMax: function() {
|
|
280
|
+
return getRangeMax;
|
|
281
|
+
},
|
|
282
|
+
getRangeMin: function() {
|
|
283
|
+
return getRangeMin;
|
|
284
|
+
},
|
|
285
|
+
getRangeValue: function() {
|
|
286
|
+
return getRangeValue;
|
|
287
|
+
},
|
|
288
|
+
getStyleFromHsl: function() {
|
|
289
|
+
return getStyleFromHsl;
|
|
290
|
+
},
|
|
291
|
+
getStyleFromHsv: function() {
|
|
292
|
+
return getStyleFromHsv;
|
|
293
|
+
},
|
|
294
|
+
getStyleFromRgb: function() {
|
|
295
|
+
return getStyleFromRgb;
|
|
296
|
+
},
|
|
297
|
+
getValue: function() {
|
|
298
|
+
return getValue;
|
|
299
|
+
},
|
|
300
|
+
gradient: function() {
|
|
301
|
+
return gradient;
|
|
302
|
+
},
|
|
303
|
+
hslToHsv: function() {
|
|
304
|
+
return hslToHsv;
|
|
305
|
+
},
|
|
306
|
+
hslToRgb: function() {
|
|
307
|
+
return hslToRgb;
|
|
308
|
+
},
|
|
309
|
+
hslaToHsva: function() {
|
|
310
|
+
return hslaToHsva;
|
|
311
|
+
},
|
|
312
|
+
hslaToRgba: function() {
|
|
313
|
+
return hslaToRgba;
|
|
314
|
+
},
|
|
315
|
+
hsvToHsl: function() {
|
|
316
|
+
return hsvToHsl;
|
|
317
|
+
},
|
|
318
|
+
hsvToRgb: function() {
|
|
319
|
+
return hsvToRgb;
|
|
320
|
+
},
|
|
321
|
+
hsvaToHsla: function() {
|
|
322
|
+
return hsvaToHsla;
|
|
323
|
+
},
|
|
324
|
+
hsvaToRgba: function() {
|
|
325
|
+
return hsvaToRgba;
|
|
326
|
+
},
|
|
327
|
+
isDivModeEnabled: function() {
|
|
328
|
+
return isDivModeEnabled;
|
|
329
|
+
},
|
|
330
|
+
isInArray: function() {
|
|
331
|
+
return isInArray;
|
|
332
|
+
},
|
|
333
|
+
isPointInside: function() {
|
|
334
|
+
return isPointInside;
|
|
335
|
+
},
|
|
336
|
+
isSsr: function() {
|
|
337
|
+
return isSsr;
|
|
338
|
+
},
|
|
339
|
+
itemFromArray: function() {
|
|
340
|
+
return itemFromArray;
|
|
341
|
+
},
|
|
342
|
+
loadFont: function() {
|
|
343
|
+
return loadFont;
|
|
344
|
+
},
|
|
345
|
+
mix: function() {
|
|
346
|
+
return mix;
|
|
347
|
+
},
|
|
348
|
+
pJSDom: function() {
|
|
349
|
+
return pJSDom;
|
|
350
|
+
},
|
|
351
|
+
paintBase: function() {
|
|
352
|
+
return paintBase;
|
|
353
|
+
},
|
|
354
|
+
particlesJS: function() {
|
|
355
|
+
return particlesJS;
|
|
356
|
+
},
|
|
357
|
+
randomInRange: function() {
|
|
358
|
+
return randomInRange;
|
|
359
|
+
},
|
|
360
|
+
rectBounce: function() {
|
|
361
|
+
return rectBounce;
|
|
362
|
+
},
|
|
363
|
+
rgbToHsl: function() {
|
|
364
|
+
return rgbToHsl;
|
|
365
|
+
},
|
|
366
|
+
rgbToHsv: function() {
|
|
367
|
+
return rgbToHsv;
|
|
368
|
+
},
|
|
369
|
+
rgbaToHsva: function() {
|
|
370
|
+
return rgbaToHsva;
|
|
371
|
+
},
|
|
372
|
+
setRangeValue: function() {
|
|
373
|
+
return setRangeValue;
|
|
374
|
+
},
|
|
375
|
+
singleDivModeExecute: function() {
|
|
376
|
+
return singleDivModeExecute;
|
|
377
|
+
},
|
|
378
|
+
stringToAlpha: function() {
|
|
379
|
+
return stringToAlpha;
|
|
380
|
+
},
|
|
381
|
+
stringToRgb: function() {
|
|
382
|
+
return stringToRgb;
|
|
383
|
+
},
|
|
384
|
+
tsParticles: function() {
|
|
385
|
+
return tsParticles;
|
|
386
|
+
}
|
|
334
387
|
});
|
|
335
388
|
const initPjs = main => {
|
|
336
389
|
const particlesJS = (tagId, options) => main.load(tagId, options);
|
|
@@ -348,8 +401,8 @@
|
|
|
348
401
|
};
|
|
349
402
|
const pJSDom = main.dom();
|
|
350
403
|
return {
|
|
351
|
-
particlesJS,
|
|
352
|
-
pJSDom
|
|
404
|
+
particlesJS: particlesJS,
|
|
405
|
+
pJSDom: pJSDom
|
|
353
406
|
};
|
|
354
407
|
};
|
|
355
408
|
var MoveDirection;
|
|
@@ -654,7 +707,7 @@
|
|
|
654
707
|
}
|
|
655
708
|
function getValue(options) {
|
|
656
709
|
const random = options.random;
|
|
657
|
-
const {enable, minimumValue} = typeof random === "boolean" ? {
|
|
710
|
+
const {enable: enable, minimumValue: minimumValue} = typeof random === "boolean" ? {
|
|
658
711
|
enable: random,
|
|
659
712
|
minimumValue: 0
|
|
660
713
|
} : random;
|
|
@@ -664,8 +717,8 @@
|
|
|
664
717
|
const dx = pointA.x - pointB.x;
|
|
665
718
|
const dy = pointA.y - pointB.y;
|
|
666
719
|
return {
|
|
667
|
-
dx,
|
|
668
|
-
dy,
|
|
720
|
+
dx: dx,
|
|
721
|
+
dy: dy,
|
|
669
722
|
distance: Math.sqrt(dx * dx + dy * dy)
|
|
670
723
|
};
|
|
671
724
|
}
|
|
@@ -1280,7 +1333,7 @@
|
|
|
1280
1333
|
}
|
|
1281
1334
|
const s = !v ? 0 : c / v;
|
|
1282
1335
|
return {
|
|
1283
|
-
h,
|
|
1336
|
+
h: h,
|
|
1284
1337
|
s: s * 100,
|
|
1285
1338
|
v: v * 100
|
|
1286
1339
|
};
|
|
@@ -1689,8 +1742,8 @@
|
|
|
1689
1742
|
class Range {
|
|
1690
1743
|
constructor(x, y) {
|
|
1691
1744
|
this.position = {
|
|
1692
|
-
x,
|
|
1693
|
-
y
|
|
1745
|
+
x: x,
|
|
1746
|
+
y: y
|
|
1694
1747
|
};
|
|
1695
1748
|
}
|
|
1696
1749
|
}
|
|
@@ -1733,8 +1786,8 @@
|
|
|
1733
1786
|
constructor(x, y, width, height) {
|
|
1734
1787
|
super(x, y);
|
|
1735
1788
|
this.size = {
|
|
1736
|
-
height,
|
|
1737
|
-
width
|
|
1789
|
+
height: height,
|
|
1790
|
+
width: width
|
|
1738
1791
|
};
|
|
1739
1792
|
}
|
|
1740
1793
|
contains(point) {
|
|
@@ -2222,9 +2275,9 @@
|
|
|
2222
2275
|
pathGenerators.set(type, pathGenerator);
|
|
2223
2276
|
}
|
|
2224
2277
|
}
|
|
2225
|
-
static getInteractors(container) {
|
|
2278
|
+
static getInteractors(container, force = false) {
|
|
2226
2279
|
let res = interactors.get(container);
|
|
2227
|
-
if (!res) {
|
|
2280
|
+
if (!res || force) {
|
|
2228
2281
|
res = [ ...interactorsInitializers.values() ].map((t => t(container)));
|
|
2229
2282
|
interactors.set(container, res);
|
|
2230
2283
|
}
|
|
@@ -2233,9 +2286,9 @@
|
|
|
2233
2286
|
static addInteractor(name, initInteractor) {
|
|
2234
2287
|
interactorsInitializers.set(name, initInteractor);
|
|
2235
2288
|
}
|
|
2236
|
-
static getUpdaters(container) {
|
|
2289
|
+
static getUpdaters(container, force = false) {
|
|
2237
2290
|
let res = updaters.get(container);
|
|
2238
|
-
if (!res) {
|
|
2291
|
+
if (!res || force) {
|
|
2239
2292
|
res = [ ...updatersInitializers.values() ].map((t => t(container)));
|
|
2240
2293
|
updaters.set(container, res);
|
|
2241
2294
|
}
|
|
@@ -4492,21 +4545,21 @@
|
|
|
4492
4545
|
const radius = this.getRadius();
|
|
4493
4546
|
const outModes = this.options.move.outModes, fixHorizontal = outMode => {
|
|
4494
4547
|
fixOutMode({
|
|
4495
|
-
outMode,
|
|
4548
|
+
outMode: outMode,
|
|
4496
4549
|
checkModes: [ OutMode.bounce, OutMode.bounceHorizontal ],
|
|
4497
4550
|
coord: pos.x,
|
|
4498
4551
|
maxCoord: container.canvas.size.width,
|
|
4499
4552
|
setCb: value => pos.x += value,
|
|
4500
|
-
radius
|
|
4553
|
+
radius: radius
|
|
4501
4554
|
});
|
|
4502
4555
|
}, fixVertical = outMode => {
|
|
4503
4556
|
fixOutMode({
|
|
4504
|
-
outMode,
|
|
4557
|
+
outMode: outMode,
|
|
4505
4558
|
checkModes: [ OutMode.bounce, OutMode.bounceVertical ],
|
|
4506
4559
|
coord: pos.y,
|
|
4507
4560
|
maxCoord: container.canvas.size.height,
|
|
4508
4561
|
setCb: value => pos.y += value,
|
|
4509
|
-
radius
|
|
4562
|
+
radius: radius
|
|
4510
4563
|
});
|
|
4511
4564
|
};
|
|
4512
4565
|
fixHorizontal((_c = outModes.left) !== null && _c !== void 0 ? _c : outModes.default);
|
|
@@ -4588,9 +4641,12 @@
|
|
|
4588
4641
|
class InteractionManager {
|
|
4589
4642
|
constructor(container) {
|
|
4590
4643
|
this.container = container;
|
|
4591
|
-
const interactors = Plugins.getInteractors(container);
|
|
4592
4644
|
this.externalInteractors = [];
|
|
4593
4645
|
this.particleInteractors = [];
|
|
4646
|
+
this.init();
|
|
4647
|
+
}
|
|
4648
|
+
init() {
|
|
4649
|
+
const interactors = Plugins.getInteractors(this.container, true);
|
|
4594
4650
|
for (const interactor of interactors) {
|
|
4595
4651
|
switch (interactor.type) {
|
|
4596
4652
|
case InteractorType.External:
|
|
@@ -4623,7 +4679,7 @@
|
|
|
4623
4679
|
}
|
|
4624
4680
|
function applyDistance(particle) {
|
|
4625
4681
|
const initialPosition = particle.initialPosition;
|
|
4626
|
-
const {dx, dy} = getDistances(initialPosition, particle.position);
|
|
4682
|
+
const {dx: dx, dy: dy} = getDistances(initialPosition, particle.position);
|
|
4627
4683
|
const dxFixed = Math.abs(dx), dyFixed = Math.abs(dy);
|
|
4628
4684
|
const hDistance = particle.retina.maxDistance.horizontal;
|
|
4629
4685
|
const vDistance = particle.retina.maxDistance.vertical;
|
|
@@ -4812,7 +4868,7 @@
|
|
|
4812
4868
|
const canvasSize = this.container.canvas.size;
|
|
4813
4869
|
this.linksColors = new Map;
|
|
4814
4870
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
4815
|
-
this.updaters = Plugins.getUpdaters(container);
|
|
4871
|
+
this.updaters = Plugins.getUpdaters(container, true);
|
|
4816
4872
|
}
|
|
4817
4873
|
get count() {
|
|
4818
4874
|
return this.array.length;
|
|
@@ -4826,6 +4882,8 @@
|
|
|
4826
4882
|
this.freqs.links = new Map;
|
|
4827
4883
|
this.freqs.triangles = new Map;
|
|
4828
4884
|
let handled = false;
|
|
4885
|
+
this.updaters = Plugins.getUpdaters(container, true);
|
|
4886
|
+
this.interactionManager.init();
|
|
4829
4887
|
for (const [, plugin] of container.plugins) {
|
|
4830
4888
|
if (plugin.particlesInitialization !== undefined) {
|
|
4831
4889
|
handled = plugin.particlesInitialization();
|
|
@@ -5937,7 +5995,7 @@
|
|
|
5937
5995
|
color: data.cover
|
|
5938
5996
|
} : data.cover;
|
|
5939
5997
|
this.cover.load(cover.color !== undefined ? cover : {
|
|
5940
|
-
color
|
|
5998
|
+
color: color
|
|
5941
5999
|
});
|
|
5942
6000
|
}
|
|
5943
6001
|
if (data.enable !== undefined) {
|
|
@@ -6654,7 +6712,7 @@
|
|
|
6654
6712
|
static async loadOptions(params) {
|
|
6655
6713
|
var _a, _b, _c;
|
|
6656
6714
|
const tagId = (_a = params.tagId) !== null && _a !== void 0 ? _a : `tsparticles${Math.floor(Math.random() * 1e4)}`;
|
|
6657
|
-
const {options, index} = params;
|
|
6715
|
+
const {options: options, index: index} = params;
|
|
6658
6716
|
let domContainer = (_b = params.element) !== null && _b !== void 0 ? _b : document.getElementById(tagId);
|
|
6659
6717
|
if (!domContainer) {
|
|
6660
6718
|
domContainer = document.createElement("div");
|
|
@@ -6704,7 +6762,7 @@
|
|
|
6704
6762
|
return newItem;
|
|
6705
6763
|
}
|
|
6706
6764
|
static async loadRemoteOptions(params) {
|
|
6707
|
-
const {url: jsonUrl, index} = params;
|
|
6765
|
+
const {url: jsonUrl, index: index} = params;
|
|
6708
6766
|
const url = jsonUrl instanceof Array ? itemFromArray(jsonUrl, index) : jsonUrl;
|
|
6709
6767
|
if (!url) {
|
|
6710
6768
|
return;
|
|
@@ -6718,13 +6776,13 @@
|
|
|
6718
6776
|
return await Loader.loadOptions({
|
|
6719
6777
|
tagId: params.tagId,
|
|
6720
6778
|
element: params.element,
|
|
6721
|
-
index,
|
|
6779
|
+
index: index,
|
|
6722
6780
|
options: data
|
|
6723
6781
|
});
|
|
6724
6782
|
}
|
|
6725
6783
|
static load(tagId, options, index) {
|
|
6726
6784
|
const params = {
|
|
6727
|
-
index
|
|
6785
|
+
index: index
|
|
6728
6786
|
};
|
|
6729
6787
|
if (typeof tagId === "string") {
|
|
6730
6788
|
params.tagId = tagId;
|
|
@@ -6740,7 +6798,7 @@
|
|
|
6740
6798
|
}
|
|
6741
6799
|
static async set(id, domContainer, options, index) {
|
|
6742
6800
|
const params = {
|
|
6743
|
-
index
|
|
6801
|
+
index: index
|
|
6744
6802
|
};
|
|
6745
6803
|
if (typeof id === "string") {
|
|
6746
6804
|
params.tagId = id;
|
|
@@ -6769,8 +6827,8 @@
|
|
|
6769
6827
|
}
|
|
6770
6828
|
return await Loader.loadRemoteOptions({
|
|
6771
6829
|
tagId: id,
|
|
6772
|
-
url,
|
|
6773
|
-
index
|
|
6830
|
+
url: url,
|
|
6831
|
+
index: index
|
|
6774
6832
|
});
|
|
6775
6833
|
}
|
|
6776
6834
|
static async setJSON(id, domContainer, jsonUrl, index) {
|
|
@@ -6787,9 +6845,9 @@
|
|
|
6787
6845
|
}
|
|
6788
6846
|
return await Loader.loadRemoteOptions({
|
|
6789
6847
|
tagId: newId,
|
|
6790
|
-
url,
|
|
6848
|
+
url: url,
|
|
6791
6849
|
index: newIndex,
|
|
6792
|
-
element
|
|
6850
|
+
element: element
|
|
6793
6851
|
});
|
|
6794
6852
|
}
|
|
6795
6853
|
static setOnClickHandler(callback) {
|
|
@@ -6858,10 +6916,10 @@
|
|
|
6858
6916
|
let customDrawer;
|
|
6859
6917
|
if (typeof drawer === "function") {
|
|
6860
6918
|
customDrawer = {
|
|
6861
|
-
afterEffect,
|
|
6862
|
-
destroy,
|
|
6919
|
+
afterEffect: afterEffect,
|
|
6920
|
+
destroy: destroy,
|
|
6863
6921
|
draw: drawer,
|
|
6864
|
-
init
|
|
6922
|
+
init: init
|
|
6865
6923
|
};
|
|
6866
6924
|
} else {
|
|
6867
6925
|
customDrawer = drawer;
|
|
@@ -7126,7 +7184,7 @@
|
|
|
7126
7184
|
return;
|
|
7127
7185
|
}
|
|
7128
7186
|
const image = {
|
|
7129
|
-
source,
|
|
7187
|
+
source: source,
|
|
7130
7188
|
type: source.substr(source.length - 3)
|
|
7131
7189
|
};
|
|
7132
7190
|
const img = new Image;
|
|
@@ -7145,7 +7203,7 @@
|
|
|
7145
7203
|
throw new Error("Error tsParticles - No image.src");
|
|
7146
7204
|
}
|
|
7147
7205
|
const image = {
|
|
7148
|
-
source,
|
|
7206
|
+
source: source,
|
|
7149
7207
|
type: source.substr(source.length - 3)
|
|
7150
7208
|
};
|
|
7151
7209
|
if (image.type !== "svg") {
|
|
@@ -7159,7 +7217,7 @@
|
|
|
7159
7217
|
return image;
|
|
7160
7218
|
}
|
|
7161
7219
|
function replaceColorSvg(imageShape, color, opacity) {
|
|
7162
|
-
const {svgData} = imageShape;
|
|
7220
|
+
const {svgData: svgData} = imageShape;
|
|
7163
7221
|
if (!svgData) {
|
|
7164
7222
|
return "";
|
|
7165
7223
|
}
|
|
@@ -7363,8 +7421,8 @@
|
|
|
7363
7421
|
const close = (_g = imageData.close) !== null && _g !== void 0 ? _g : particle.close;
|
|
7364
7422
|
const imageShape = {
|
|
7365
7423
|
image: imageRes,
|
|
7366
|
-
fill,
|
|
7367
|
-
close
|
|
7424
|
+
fill: fill,
|
|
7425
|
+
close: close
|
|
7368
7426
|
};
|
|
7369
7427
|
particle.image = imageShape.image;
|
|
7370
7428
|
particle.fill = imageShape.fill;
|
|
@@ -7730,7 +7788,7 @@
|
|
|
7730
7788
|
const attractOptions = container.actualOptions.interactivity.modes.attract;
|
|
7731
7789
|
const query = container.particles.quadTree.query(area);
|
|
7732
7790
|
for (const particle of query) {
|
|
7733
|
-
const {dx, dy, distance} = getDistances(particle.position, position);
|
|
7791
|
+
const {dx: dx, dy: dy, distance: distance} = getDistances(particle.position, position);
|
|
7734
7792
|
const velocity = attractOptions.speed * attractOptions.factor;
|
|
7735
7793
|
const attractFactor = clamp(calcEasing(1 - distance / attractRadius, attractOptions.easing) * velocity, 0, attractOptions.maxSpeed);
|
|
7736
7794
|
const normVec = Vector.create(distance === 0 ? velocity : dx / distance * attractFactor, distance === 0 ? velocity : dy / distance * attractFactor);
|
|
@@ -7847,7 +7905,7 @@
|
|
|
7847
7905
|
if (p1 === p2 || !p2.options.move.attract.enable || p2.destroyed || p2.spawning) {
|
|
7848
7906
|
continue;
|
|
7849
7907
|
}
|
|
7850
|
-
const pos2 = p2.getPosition(), {dx, dy} = getDistances(pos1, pos2), rotate = p1.options.move.attract.rotate, ax = dx / (rotate.x * 1e3), ay = dy / (rotate.y * 1e3), p1Factor = p2.size.value / p1.size.value, p2Factor = 1 / p1Factor;
|
|
7908
|
+
const pos2 = p2.getPosition(), {dx: dx, dy: dy} = getDistances(pos1, pos2), rotate = p1.options.move.attract.rotate, ax = dx / (rotate.x * 1e3), ay = dy / (rotate.y * 1e3), p1Factor = p2.size.value / p1.size.value, p2Factor = 1 / p1Factor;
|
|
7851
7909
|
p1.velocity.x -= ax * p1Factor;
|
|
7852
7910
|
p1.velocity.y -= ay * p1Factor;
|
|
7853
7911
|
p2.velocity.x += ax * p2Factor;
|
|
@@ -8340,22 +8398,22 @@
|
|
|
8340
8398
|
}
|
|
8341
8399
|
const pos = particle.getPosition(), offset = particle.offset, size = particle.getRadius(), bounds = calculateBounds(pos, size), canvasSize = container.canvas.size;
|
|
8342
8400
|
bounceHorizontal({
|
|
8343
|
-
particle,
|
|
8344
|
-
outMode,
|
|
8345
|
-
direction,
|
|
8346
|
-
bounds,
|
|
8347
|
-
canvasSize,
|
|
8348
|
-
offset,
|
|
8349
|
-
size
|
|
8401
|
+
particle: particle,
|
|
8402
|
+
outMode: outMode,
|
|
8403
|
+
direction: direction,
|
|
8404
|
+
bounds: bounds,
|
|
8405
|
+
canvasSize: canvasSize,
|
|
8406
|
+
offset: offset,
|
|
8407
|
+
size: size
|
|
8350
8408
|
});
|
|
8351
8409
|
bounceVertical({
|
|
8352
|
-
particle,
|
|
8353
|
-
outMode,
|
|
8354
|
-
direction,
|
|
8355
|
-
bounds,
|
|
8356
|
-
canvasSize,
|
|
8357
|
-
offset,
|
|
8358
|
-
size
|
|
8410
|
+
particle: particle,
|
|
8411
|
+
outMode: outMode,
|
|
8412
|
+
direction: direction,
|
|
8413
|
+
bounds: bounds,
|
|
8414
|
+
canvasSize: canvasSize,
|
|
8415
|
+
offset: offset,
|
|
8416
|
+
size: size
|
|
8359
8417
|
});
|
|
8360
8418
|
}
|
|
8361
8419
|
none(particle, direction) {
|
|
@@ -8431,7 +8489,7 @@
|
|
|
8431
8489
|
var _a;
|
|
8432
8490
|
const container = this.container, query = container.particles.quadTree.query(area), repulseOptions = container.actualOptions.interactivity.modes.repulse;
|
|
8433
8491
|
for (const particle of query) {
|
|
8434
|
-
const {dx, dy, distance} = getDistances(particle.position, position), velocity = ((_a = divRepulse === null || divRepulse === void 0 ? void 0 : divRepulse.speed) !== null && _a !== void 0 ? _a : repulseOptions.speed) * repulseOptions.factor, repulseFactor = clamp(calcEasing(1 - distance / repulseRadius, repulseOptions.easing) * velocity, 0, repulseOptions.maxSpeed), normVec = Vector.create(distance === 0 ? velocity : dx / distance * repulseFactor, distance === 0 ? velocity : dy / distance * repulseFactor);
|
|
8492
|
+
const {dx: dx, dy: dy, distance: distance} = getDistances(particle.position, position), velocity = ((_a = divRepulse === null || divRepulse === void 0 ? void 0 : divRepulse.speed) !== null && _a !== void 0 ? _a : repulseOptions.speed) * repulseOptions.factor, repulseFactor = clamp(calcEasing(1 - distance / repulseRadius, repulseOptions.easing) * velocity, 0, repulseOptions.maxSpeed), normVec = Vector.create(distance === 0 ? velocity : dx / distance * repulseFactor, distance === 0 ? velocity : dy / distance * repulseFactor);
|
|
8435
8493
|
particle.position.addTo(normVec);
|
|
8436
8494
|
}
|
|
8437
8495
|
}
|
|
@@ -8453,7 +8511,7 @@
|
|
|
8453
8511
|
}
|
|
8454
8512
|
const range = new Circle(mouseClickPos.x, mouseClickPos.y, repulseRadius), query = container.particles.quadTree.query(range);
|
|
8455
8513
|
for (const particle of query) {
|
|
8456
|
-
const {dx, dy, distance} = getDistances(mouseClickPos, particle.position), d = distance ** 2, velocity = container.actualOptions.interactivity.modes.repulse.speed, force = -repulseRadius * velocity / d;
|
|
8514
|
+
const {dx: dx, dy: dy, distance: distance} = getDistances(mouseClickPos, particle.position), d = distance ** 2, velocity = container.actualOptions.interactivity.modes.repulse.speed, force = -repulseRadius * velocity / d;
|
|
8457
8515
|
if (d <= repulseRadius) {
|
|
8458
8516
|
container.repulse.particles.push(particle);
|
|
8459
8517
|
const vect = Vector.create(dx, dy);
|
|
@@ -8527,8 +8585,8 @@
|
|
|
8527
8585
|
for (const particle of query) {
|
|
8528
8586
|
if (area instanceof Circle) {
|
|
8529
8587
|
circleBounce(circleBounceDataFromParticle(particle), {
|
|
8530
|
-
position,
|
|
8531
|
-
radius,
|
|
8588
|
+
position: position,
|
|
8589
|
+
radius: radius,
|
|
8532
8590
|
mass: radius ** 2 * Math.PI / 2,
|
|
8533
8591
|
velocity: Vector.origin,
|
|
8534
8592
|
factor: Vector.origin
|
|
@@ -9136,7 +9194,7 @@
|
|
|
9136
9194
|
}
|
|
9137
9195
|
}
|
|
9138
9196
|
const pos = particle.getPosition();
|
|
9139
|
-
const {dx, dy, distance} = getDistances(this.position, pos);
|
|
9197
|
+
const {dx: dx, dy: dy, distance: distance} = getDistances(this.position, pos);
|
|
9140
9198
|
const v = Vector.create(dx, dy);
|
|
9141
9199
|
v.length = this.mass / Math.pow(distance, 2) * container.retina.reduceFactor;
|
|
9142
9200
|
if (distance < this.size + particle.getRadius()) {
|
|
@@ -10344,7 +10402,7 @@
|
|
|
10344
10402
|
return res;
|
|
10345
10403
|
}
|
|
10346
10404
|
function calcClosestPtOnSegment(s1, s2, pos) {
|
|
10347
|
-
const {dx, dy} = getDistances(pos, s1);
|
|
10405
|
+
const {dx: dx, dy: dy} = getDistances(pos, s1);
|
|
10348
10406
|
const {dx: dxx, dy: dyy} = getDistances(s2, s1);
|
|
10349
10407
|
const t = (dx * dxx + dy * dyy) / (dxx ** 2 + dyy ** 2);
|
|
10350
10408
|
let x = s1.x + dxx * t;
|
|
@@ -10357,13 +10415,13 @@
|
|
|
10357
10415
|
y = s2.y;
|
|
10358
10416
|
}
|
|
10359
10417
|
return {
|
|
10360
|
-
x,
|
|
10361
|
-
y,
|
|
10418
|
+
x: x,
|
|
10419
|
+
y: y,
|
|
10362
10420
|
isOnSegment: t >= 0 && t <= 1
|
|
10363
10421
|
};
|
|
10364
10422
|
}
|
|
10365
10423
|
function segmentBounce(start, stop, velocity) {
|
|
10366
|
-
const {dx, dy} = getDistances(start, stop);
|
|
10424
|
+
const {dx: dx, dy: dy} = getDistances(start, stop);
|
|
10367
10425
|
const wallAngle = Math.atan2(dy, dx);
|
|
10368
10426
|
const wallNormalX = Math.sin(wallAngle);
|
|
10369
10427
|
const wallNormalY = -Math.cos(wallAngle);
|
|
@@ -10758,7 +10816,11 @@
|
|
|
10758
10816
|
}
|
|
10759
10817
|
async function loadPolygonMaskPlugin(tsParticles) {
|
|
10760
10818
|
if (!isSsr() && !window.SVGPathSeg) {
|
|
10761
|
-
await
|
|
10819
|
+
await Promise.resolve().then((function() {
|
|
10820
|
+
var e = new Error("Module is not available (weak dependency)");
|
|
10821
|
+
e.code = "MODULE_NOT_FOUND";
|
|
10822
|
+
throw e;
|
|
10823
|
+
}));
|
|
10762
10824
|
}
|
|
10763
10825
|
const plugin = new PolygonMask_plugin_Plugin;
|
|
10764
10826
|
await tsParticles.addPlugin(plugin);
|
|
@@ -10835,8 +10897,8 @@
|
|
|
10835
10897
|
}
|
|
10836
10898
|
const tsParticles = new Main;
|
|
10837
10899
|
tsParticles.init();
|
|
10838
|
-
const {particlesJS, pJSDom} = initPjs(tsParticles);
|
|
10900
|
+
const {particlesJS: particlesJS, pJSDom: pJSDom} = initPjs(tsParticles);
|
|
10839
10901
|
loadFull(tsParticles);
|
|
10840
10902
|
return __webpack_exports__;
|
|
10841
|
-
}
|
|
10903
|
+
}();
|
|
10842
10904
|
}));
|