tsparticles 1.36.0 → 1.37.3
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/Container.d.ts +3 -1
- package/Core/Container.js +16 -11
- 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/Enums/Modes/ResponsiveMode.d.ts +4 -0
- package/Enums/Modes/ResponsiveMode.js +8 -0
- package/Enums/Modes/index.d.ts +1 -0
- package/Enums/Modes/index.js +1 -0
- package/Interactions/External/Attract/index.d.ts +1 -1
- package/Interactions/External/Attract/index.js +2 -2
- package/Interactions/External/Bounce/index.d.ts +1 -1
- package/Interactions/External/Bounce/index.js +2 -2
- package/Interactions/External/Bubble/index.d.ts +1 -1
- package/Interactions/External/Bubble/index.js +2 -2
- package/Interactions/External/Connect/index.d.ts +1 -1
- package/Interactions/External/Connect/index.js +2 -2
- package/Interactions/External/Grab/index.d.ts +1 -1
- package/Interactions/External/Grab/index.js +2 -2
- package/Interactions/External/Repulse/index.d.ts +1 -1
- package/Interactions/External/Repulse/index.js +2 -2
- package/Interactions/External/Trail/index.d.ts +1 -1
- package/Interactions/External/Trail/index.js +2 -2
- package/Interactions/Particles/Attract/index.d.ts +1 -1
- package/Interactions/Particles/Attract/index.js +2 -2
- package/Interactions/Particles/Collisions/index.d.ts +1 -1
- package/Interactions/Particles/Collisions/index.js +2 -2
- package/Interactions/Particles/Links/index.d.ts +2 -2
- package/Interactions/Particles/Links/index.js +5 -5
- package/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/Interactions/Particles/Links/plugin.js +2 -2
- package/Options/Classes/FullScreen/FullScreen.js +2 -2
- package/Options/Classes/Interactivity/Interactivity.js +1 -1
- package/Options/Classes/Options.js +3 -1
- package/Options/Classes/Responsive.d.ts +2 -0
- package/Options/Classes/Responsive.js +10 -0
- package/Options/Interfaces/IResponsive.d.ts +2 -0
- package/Plugins/Absorbers/AbsorberInstance.d.ts +2 -1
- package/Plugins/Absorbers/AbsorberInstance.js +21 -9
- package/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -1
- package/Plugins/Absorbers/Options/Classes/AbsorberSize.js +6 -4
- package/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +9 -0
- package/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.js +21 -0
- package/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +3 -2
- package/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +4 -0
- package/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.js +2 -0
- package/Plugins/Absorbers/plugin.d.ts +1 -1
- package/Plugins/Absorbers/plugin.js +2 -2
- package/Plugins/Emitters/plugin.d.ts +1 -1
- package/Plugins/Emitters/plugin.js +2 -2
- package/Plugins/PolygonMask/plugin.js +1 -1
- package/Shapes/Circle/index.d.ts +1 -1
- package/Shapes/Circle/index.js +2 -2
- package/Shapes/Image/index.d.ts +1 -1
- package/Shapes/Image/index.js +3 -3
- package/Shapes/Line/index.d.ts +1 -1
- package/Shapes/Line/index.js +2 -2
- package/Shapes/Polygon/index.d.ts +3 -3
- package/Shapes/Polygon/index.js +7 -7
- package/Shapes/Square/index.d.ts +1 -1
- package/Shapes/Square/index.js +3 -3
- package/Shapes/Star/index.d.ts +1 -1
- package/Shapes/Star/index.js +2 -2
- package/Shapes/Text/index.d.ts +1 -1
- package/Shapes/Text/index.js +2 -2
- package/Updaters/Angle/index.d.ts +1 -1
- package/Updaters/Angle/index.js +2 -2
- package/Updaters/Color/index.d.ts +1 -1
- package/Updaters/Color/index.js +2 -2
- package/Updaters/Life/index.d.ts +1 -1
- package/Updaters/Life/index.js +2 -2
- package/Updaters/Opacity/index.d.ts +1 -1
- package/Updaters/Opacity/index.js +2 -2
- package/Updaters/OutModes/index.d.ts +1 -1
- package/Updaters/OutModes/index.js +2 -2
- package/Updaters/Roll/index.d.ts +1 -1
- package/Updaters/Roll/index.js +2 -2
- package/Updaters/Size/index.d.ts +1 -1
- package/Updaters/Size/index.js +2 -2
- package/Updaters/StrokeColor/index.d.ts +1 -1
- package/Updaters/StrokeColor/index.js +2 -2
- package/Updaters/Tilt/index.d.ts +1 -1
- package/Updaters/Tilt/index.js +2 -2
- package/Updaters/Wobble/index.d.ts +1 -1
- package/Updaters/Wobble/index.js +2 -2
- package/Utils/Plugins.d.ts +2 -2
- package/Utils/Plugins.js +4 -4
- package/Utils/Utils.d.ts +1 -2
- package/browser/Core/Container.d.ts +3 -1
- package/browser/Core/Container.js +17 -12
- 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/Enums/Modes/ResponsiveMode.d.ts +4 -0
- package/browser/Enums/Modes/ResponsiveMode.js +5 -0
- package/browser/Enums/Modes/index.d.ts +1 -0
- package/browser/Enums/Modes/index.js +1 -0
- package/browser/Interactions/External/Attract/index.d.ts +1 -1
- package/browser/Interactions/External/Attract/index.js +2 -2
- package/browser/Interactions/External/Bounce/index.d.ts +1 -1
- package/browser/Interactions/External/Bounce/index.js +2 -2
- package/browser/Interactions/External/Bubble/index.d.ts +1 -1
- package/browser/Interactions/External/Bubble/index.js +2 -2
- package/browser/Interactions/External/Connect/index.d.ts +1 -1
- package/browser/Interactions/External/Connect/index.js +2 -2
- package/browser/Interactions/External/Grab/index.d.ts +1 -1
- package/browser/Interactions/External/Grab/index.js +2 -2
- package/browser/Interactions/External/Repulse/index.d.ts +1 -1
- package/browser/Interactions/External/Repulse/index.js +2 -2
- package/browser/Interactions/External/Trail/index.d.ts +1 -1
- package/browser/Interactions/External/Trail/index.js +2 -2
- package/browser/Interactions/Particles/Attract/index.d.ts +1 -1
- package/browser/Interactions/Particles/Attract/index.js +2 -2
- package/browser/Interactions/Particles/Collisions/index.d.ts +1 -1
- package/browser/Interactions/Particles/Collisions/index.js +2 -2
- package/browser/Interactions/Particles/Links/index.d.ts +2 -2
- package/browser/Interactions/Particles/Links/index.js +5 -5
- package/browser/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/browser/Interactions/Particles/Links/plugin.js +2 -2
- package/browser/Options/Classes/FullScreen/FullScreen.js +2 -2
- package/browser/Options/Classes/Interactivity/Interactivity.js +1 -1
- package/browser/Options/Classes/Options.js +4 -2
- package/browser/Options/Classes/Responsive.d.ts +2 -0
- package/browser/Options/Classes/Responsive.js +11 -0
- package/browser/Options/Interfaces/IResponsive.d.ts +2 -0
- package/browser/Plugins/Absorbers/AbsorberInstance.d.ts +2 -1
- package/browser/Plugins/Absorbers/AbsorberInstance.js +21 -9
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -1
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSize.js +6 -4
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +9 -0
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.js +17 -0
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +3 -2
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +4 -0
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.js +1 -0
- package/browser/Plugins/Absorbers/plugin.d.ts +1 -1
- package/browser/Plugins/Absorbers/plugin.js +2 -2
- package/browser/Plugins/Emitters/plugin.d.ts +1 -1
- package/browser/Plugins/Emitters/plugin.js +2 -2
- package/browser/Plugins/PolygonMask/plugin.js +4 -2
- package/browser/Shapes/Circle/index.d.ts +1 -1
- package/browser/Shapes/Circle/index.js +2 -2
- package/browser/Shapes/Image/index.d.ts +1 -1
- package/browser/Shapes/Image/index.js +3 -3
- package/browser/Shapes/Line/index.d.ts +1 -1
- package/browser/Shapes/Line/index.js +2 -2
- package/browser/Shapes/Polygon/index.d.ts +3 -3
- package/browser/Shapes/Polygon/index.js +7 -7
- package/browser/Shapes/Square/index.d.ts +1 -1
- package/browser/Shapes/Square/index.js +3 -3
- package/browser/Shapes/Star/index.d.ts +1 -1
- package/browser/Shapes/Star/index.js +2 -2
- package/browser/Shapes/Text/index.d.ts +1 -1
- package/browser/Shapes/Text/index.js +2 -2
- package/browser/Updaters/Angle/index.d.ts +1 -1
- package/browser/Updaters/Angle/index.js +2 -2
- package/browser/Updaters/Color/index.d.ts +1 -1
- package/browser/Updaters/Color/index.js +2 -2
- package/browser/Updaters/Life/index.d.ts +1 -1
- package/browser/Updaters/Life/index.js +2 -2
- package/browser/Updaters/Opacity/index.d.ts +1 -1
- package/browser/Updaters/Opacity/index.js +2 -2
- package/browser/Updaters/OutModes/index.d.ts +1 -1
- package/browser/Updaters/OutModes/index.js +2 -2
- package/browser/Updaters/Roll/index.d.ts +1 -1
- package/browser/Updaters/Roll/index.js +2 -2
- package/browser/Updaters/Size/index.d.ts +1 -1
- package/browser/Updaters/Size/index.js +2 -2
- package/browser/Updaters/StrokeColor/index.d.ts +1 -1
- package/browser/Updaters/StrokeColor/index.js +2 -2
- package/browser/Updaters/Tilt/index.d.ts +1 -1
- package/browser/Updaters/Tilt/index.js +2 -2
- package/browser/Updaters/Wobble/index.d.ts +1 -1
- package/browser/Updaters/Wobble/index.js +2 -2
- package/browser/Utils/Plugins.d.ts +2 -2
- package/browser/Utils/Plugins.js +4 -4
- package/browser/Utils/Utils.d.ts +1 -2
- package/browser/full.d.ts +1 -1
- package/browser/full.js +9 -9
- package/browser/index.js +1 -1
- package/browser/index.slim.js +1 -1
- package/browser/main.d.ts +10 -6
- package/browser/main.js +20 -6
- package/browser/slim.d.ts +1 -1
- package/browser/slim.js +24 -24
- package/esm/Core/Container.d.ts +3 -1
- package/esm/Core/Container.js +16 -11
- 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/Enums/Modes/ResponsiveMode.d.ts +4 -0
- package/esm/Enums/Modes/ResponsiveMode.js +5 -0
- package/esm/Enums/Modes/index.d.ts +1 -0
- package/esm/Enums/Modes/index.js +1 -0
- package/esm/Interactions/External/Attract/index.d.ts +1 -1
- package/esm/Interactions/External/Attract/index.js +2 -2
- package/esm/Interactions/External/Bounce/index.d.ts +1 -1
- package/esm/Interactions/External/Bounce/index.js +2 -2
- package/esm/Interactions/External/Bubble/index.d.ts +1 -1
- package/esm/Interactions/External/Bubble/index.js +2 -2
- package/esm/Interactions/External/Connect/index.d.ts +1 -1
- package/esm/Interactions/External/Connect/index.js +2 -2
- package/esm/Interactions/External/Grab/index.d.ts +1 -1
- package/esm/Interactions/External/Grab/index.js +2 -2
- package/esm/Interactions/External/Repulse/index.d.ts +1 -1
- package/esm/Interactions/External/Repulse/index.js +2 -2
- package/esm/Interactions/External/Trail/index.d.ts +1 -1
- package/esm/Interactions/External/Trail/index.js +2 -2
- package/esm/Interactions/Particles/Attract/index.d.ts +1 -1
- package/esm/Interactions/Particles/Attract/index.js +2 -2
- package/esm/Interactions/Particles/Collisions/index.d.ts +1 -1
- package/esm/Interactions/Particles/Collisions/index.js +2 -2
- package/esm/Interactions/Particles/Links/index.d.ts +2 -2
- package/esm/Interactions/Particles/Links/index.js +5 -5
- package/esm/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/esm/Interactions/Particles/Links/plugin.js +2 -2
- package/esm/Options/Classes/FullScreen/FullScreen.js +2 -2
- package/esm/Options/Classes/Interactivity/Interactivity.js +1 -1
- package/esm/Options/Classes/Options.js +4 -2
- package/esm/Options/Classes/Responsive.d.ts +2 -0
- package/esm/Options/Classes/Responsive.js +10 -0
- package/esm/Options/Interfaces/IResponsive.d.ts +2 -0
- package/esm/Plugins/Absorbers/AbsorberInstance.d.ts +2 -1
- package/esm/Plugins/Absorbers/AbsorberInstance.js +21 -9
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -1
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSize.js +6 -4
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +9 -0
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.js +17 -0
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +3 -2
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +4 -0
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.js +1 -0
- package/esm/Plugins/Absorbers/plugin.d.ts +1 -1
- package/esm/Plugins/Absorbers/plugin.js +2 -2
- package/esm/Plugins/Emitters/plugin.d.ts +1 -1
- package/esm/Plugins/Emitters/plugin.js +2 -2
- package/esm/Plugins/PolygonMask/plugin.js +1 -1
- package/esm/Shapes/Circle/index.d.ts +1 -1
- package/esm/Shapes/Circle/index.js +2 -2
- package/esm/Shapes/Image/index.d.ts +1 -1
- package/esm/Shapes/Image/index.js +3 -3
- package/esm/Shapes/Line/index.d.ts +1 -1
- package/esm/Shapes/Line/index.js +2 -2
- package/esm/Shapes/Polygon/index.d.ts +3 -3
- package/esm/Shapes/Polygon/index.js +7 -7
- package/esm/Shapes/Square/index.d.ts +1 -1
- package/esm/Shapes/Square/index.js +3 -3
- package/esm/Shapes/Star/index.d.ts +1 -1
- package/esm/Shapes/Star/index.js +2 -2
- package/esm/Shapes/Text/index.d.ts +1 -1
- package/esm/Shapes/Text/index.js +2 -2
- package/esm/Updaters/Angle/index.d.ts +1 -1
- package/esm/Updaters/Angle/index.js +2 -2
- package/esm/Updaters/Color/index.d.ts +1 -1
- package/esm/Updaters/Color/index.js +2 -2
- package/esm/Updaters/Life/index.d.ts +1 -1
- package/esm/Updaters/Life/index.js +2 -2
- package/esm/Updaters/Opacity/index.d.ts +1 -1
- package/esm/Updaters/Opacity/index.js +2 -2
- package/esm/Updaters/OutModes/index.d.ts +1 -1
- package/esm/Updaters/OutModes/index.js +2 -2
- package/esm/Updaters/Roll/index.d.ts +1 -1
- package/esm/Updaters/Roll/index.js +2 -2
- package/esm/Updaters/Size/index.d.ts +1 -1
- package/esm/Updaters/Size/index.js +2 -2
- package/esm/Updaters/StrokeColor/index.d.ts +1 -1
- package/esm/Updaters/StrokeColor/index.js +2 -2
- package/esm/Updaters/Tilt/index.d.ts +1 -1
- package/esm/Updaters/Tilt/index.js +2 -2
- package/esm/Updaters/Wobble/index.d.ts +1 -1
- package/esm/Updaters/Wobble/index.js +2 -2
- package/esm/Utils/Plugins.d.ts +2 -2
- package/esm/Utils/Plugins.js +4 -4
- package/esm/Utils/Utils.d.ts +1 -2
- package/esm/full.d.ts +1 -1
- package/esm/full.js +9 -9
- package/esm/index.js +1 -1
- package/esm/index.slim.js +1 -1
- package/esm/main.d.ts +7 -6
- package/esm/main.js +17 -6
- package/esm/slim.d.ts +1 -1
- package/esm/slim.js +24 -24
- package/full.d.ts +1 -1
- package/full.js +9 -9
- package/index.js +1 -1
- package/index.slim.js +1 -1
- package/main.d.ts +7 -6
- package/main.js +17 -6
- package/package.json +1 -1
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/slim.d.ts +1 -1
- package/slim.js +24 -24
- package/tsparticles.js +743 -363
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.js +2 -2
- package/tsparticles.slim.js +539 -284
- package/tsparticles.slim.min.js +2 -2
package/tsparticles.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var a = factory();
|
|
4
4
|
for (var i in a) (typeof exports === "object" ? exports : root)[i] = a[i];
|
|
5
5
|
}
|
|
6
|
-
})(
|
|
7
|
-
return (
|
|
6
|
+
})(window, (function() {
|
|
7
|
+
return function() {
|
|
8
8
|
"use strict";
|
|
9
9
|
var __webpack_modules__ = {};
|
|
10
10
|
var __webpack_module_cache__ = {};
|
|
@@ -20,8 +20,54 @@
|
|
|
20
20
|
return module.exports;
|
|
21
21
|
}
|
|
22
22
|
__webpack_require__.m = __webpack_modules__;
|
|
23
|
-
(
|
|
24
|
-
var
|
|
23
|
+
!function() {
|
|
24
|
+
var deferred = [];
|
|
25
|
+
__webpack_require__.O = function(result, chunkIds, fn, priority) {
|
|
26
|
+
if (chunkIds) {
|
|
27
|
+
priority = priority || 0;
|
|
28
|
+
for (var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
|
29
|
+
deferred[i] = [ chunkIds, fn, priority ];
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
var notFulfilled = Infinity;
|
|
33
|
+
for (var i = 0; i < deferred.length; i++) {
|
|
34
|
+
var chunkIds = deferred[i][0];
|
|
35
|
+
var fn = deferred[i][1];
|
|
36
|
+
var priority = deferred[i][2];
|
|
37
|
+
var fulfilled = true;
|
|
38
|
+
for (var j = 0; j < chunkIds.length; j++) {
|
|
39
|
+
if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((function(key) {
|
|
40
|
+
return __webpack_require__.O[key](chunkIds[j]);
|
|
41
|
+
}))) {
|
|
42
|
+
chunkIds.splice(j--, 1);
|
|
43
|
+
} else {
|
|
44
|
+
fulfilled = false;
|
|
45
|
+
if (priority < notFulfilled) notFulfilled = priority;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (fulfilled) {
|
|
49
|
+
deferred.splice(i--, 1);
|
|
50
|
+
var r = fn();
|
|
51
|
+
if (r !== undefined) result = r;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return result;
|
|
55
|
+
};
|
|
56
|
+
}();
|
|
57
|
+
!function() {
|
|
58
|
+
__webpack_require__.F = {};
|
|
59
|
+
__webpack_require__.E = function(chunkId) {
|
|
60
|
+
Object.keys(__webpack_require__.F).map((function(key) {
|
|
61
|
+
__webpack_require__.F[key](chunkId);
|
|
62
|
+
}));
|
|
63
|
+
};
|
|
64
|
+
}();
|
|
65
|
+
!function() {
|
|
66
|
+
var getProto = Object.getPrototypeOf ? function(obj) {
|
|
67
|
+
return Object.getPrototypeOf(obj);
|
|
68
|
+
} : function(obj) {
|
|
69
|
+
return obj.__proto__;
|
|
70
|
+
};
|
|
25
71
|
var leafPrototypes;
|
|
26
72
|
__webpack_require__.t = function(value, mode) {
|
|
27
73
|
if (mode & 1) value = this(value);
|
|
@@ -35,15 +81,21 @@
|
|
|
35
81
|
var def = {};
|
|
36
82
|
leafPrototypes = leafPrototypes || [ null, getProto({}), getProto([]), getProto(getProto) ];
|
|
37
83
|
for (var current = mode & 2 && value; typeof current == "object" && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
|
38
|
-
Object.getOwnPropertyNames(current).forEach((key
|
|
84
|
+
Object.getOwnPropertyNames(current).forEach((function(key) {
|
|
85
|
+
def[key] = function() {
|
|
86
|
+
return value[key];
|
|
87
|
+
};
|
|
88
|
+
}));
|
|
39
89
|
}
|
|
40
|
-
def["default"] = ()
|
|
90
|
+
def["default"] = function() {
|
|
91
|
+
return value;
|
|
92
|
+
};
|
|
41
93
|
__webpack_require__.d(ns, def);
|
|
42
94
|
return ns;
|
|
43
95
|
};
|
|
44
|
-
}
|
|
45
|
-
(
|
|
46
|
-
__webpack_require__.d = (exports, definition)
|
|
96
|
+
}();
|
|
97
|
+
!function() {
|
|
98
|
+
__webpack_require__.d = function(exports, definition) {
|
|
47
99
|
for (var key in definition) {
|
|
48
100
|
if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
49
101
|
Object.defineProperty(exports, key, {
|
|
@@ -53,18 +105,22 @@
|
|
|
53
105
|
}
|
|
54
106
|
}
|
|
55
107
|
};
|
|
56
|
-
}
|
|
57
|
-
(
|
|
108
|
+
}();
|
|
109
|
+
!function() {
|
|
58
110
|
__webpack_require__.f = {};
|
|
59
|
-
__webpack_require__.e = chunkId
|
|
60
|
-
__webpack_require__.f
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
111
|
+
__webpack_require__.e = function(chunkId) {
|
|
112
|
+
return Promise.all(Object.keys(__webpack_require__.f).reduce((function(promises, key) {
|
|
113
|
+
__webpack_require__.f[key](chunkId, promises);
|
|
114
|
+
return promises;
|
|
115
|
+
}), []));
|
|
116
|
+
};
|
|
117
|
+
}();
|
|
118
|
+
!function() {
|
|
119
|
+
__webpack_require__.u = function(chunkId) {
|
|
120
|
+
return "" + "tsparticles.pathseg" + ".js";
|
|
121
|
+
};
|
|
122
|
+
}();
|
|
123
|
+
!function() {
|
|
68
124
|
__webpack_require__.g = function() {
|
|
69
125
|
if (typeof globalThis === "object") return globalThis;
|
|
70
126
|
try {
|
|
@@ -73,14 +129,16 @@
|
|
|
73
129
|
if (typeof window === "object") return window;
|
|
74
130
|
}
|
|
75
131
|
}();
|
|
76
|
-
}
|
|
77
|
-
(
|
|
78
|
-
__webpack_require__.o = (obj, prop)
|
|
79
|
-
|
|
80
|
-
|
|
132
|
+
}();
|
|
133
|
+
!function() {
|
|
134
|
+
__webpack_require__.o = function(obj, prop) {
|
|
135
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
136
|
+
};
|
|
137
|
+
}();
|
|
138
|
+
!function() {
|
|
81
139
|
var inProgress = {};
|
|
82
140
|
var dataWebpackPrefix = "tsparticles:";
|
|
83
|
-
__webpack_require__.l = (url, done, key, chunkId)
|
|
141
|
+
__webpack_require__.l = function(url, done, key, chunkId) {
|
|
84
142
|
if (inProgress[url]) {
|
|
85
143
|
inProgress[url].push(done);
|
|
86
144
|
return;
|
|
@@ -108,13 +166,15 @@
|
|
|
108
166
|
script.src = url;
|
|
109
167
|
}
|
|
110
168
|
inProgress[url] = [ done ];
|
|
111
|
-
var onScriptComplete = (prev, event)
|
|
169
|
+
var onScriptComplete = function(prev, event) {
|
|
112
170
|
script.onerror = script.onload = null;
|
|
113
171
|
clearTimeout(timeout);
|
|
114
172
|
var doneFns = inProgress[url];
|
|
115
173
|
delete inProgress[url];
|
|
116
174
|
script.parentNode && script.parentNode.removeChild(script);
|
|
117
|
-
doneFns && doneFns.forEach((fn
|
|
175
|
+
doneFns && doneFns.forEach((function(fn) {
|
|
176
|
+
return fn(event);
|
|
177
|
+
}));
|
|
118
178
|
if (prev) return prev(event);
|
|
119
179
|
};
|
|
120
180
|
var timeout = setTimeout(onScriptComplete.bind(null, undefined, {
|
|
@@ -125,9 +185,9 @@
|
|
|
125
185
|
script.onload = onScriptComplete.bind(null, script.onload);
|
|
126
186
|
needAttach && document.head.appendChild(script);
|
|
127
187
|
};
|
|
128
|
-
}
|
|
129
|
-
(
|
|
130
|
-
__webpack_require__.r = exports
|
|
188
|
+
}();
|
|
189
|
+
!function() {
|
|
190
|
+
__webpack_require__.r = function(exports) {
|
|
131
191
|
if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
|
|
132
192
|
Object.defineProperty(exports, Symbol.toStringTag, {
|
|
133
193
|
value: "Module"
|
|
@@ -137,8 +197,8 @@
|
|
|
137
197
|
value: true
|
|
138
198
|
});
|
|
139
199
|
};
|
|
140
|
-
}
|
|
141
|
-
(
|
|
200
|
+
}();
|
|
201
|
+
!function() {
|
|
142
202
|
var scriptUrl;
|
|
143
203
|
if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
|
144
204
|
var document = __webpack_require__.g.document;
|
|
@@ -152,24 +212,26 @@
|
|
|
152
212
|
if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
|
|
153
213
|
scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
|
|
154
214
|
__webpack_require__.p = scriptUrl;
|
|
155
|
-
}
|
|
156
|
-
(
|
|
215
|
+
}();
|
|
216
|
+
!function() {
|
|
157
217
|
var installedChunks = {
|
|
158
218
|
649: 0,
|
|
159
219
|
155: 0
|
|
160
220
|
};
|
|
161
|
-
__webpack_require__.f.j = (chunkId, promises)
|
|
221
|
+
__webpack_require__.f.j = function(chunkId, promises) {
|
|
162
222
|
var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
|
|
163
223
|
if (installedChunkData !== 0) {
|
|
164
224
|
if (installedChunkData) {
|
|
165
225
|
promises.push(installedChunkData[2]);
|
|
166
226
|
} else {
|
|
167
227
|
if (true) {
|
|
168
|
-
var promise = new Promise(((resolve, reject)
|
|
228
|
+
var promise = new Promise((function(resolve, reject) {
|
|
229
|
+
installedChunkData = installedChunks[chunkId] = [ resolve, reject ];
|
|
230
|
+
}));
|
|
169
231
|
promises.push(installedChunkData[2] = promise);
|
|
170
232
|
var url = __webpack_require__.p + __webpack_require__.u(chunkId);
|
|
171
233
|
var error = new Error;
|
|
172
|
-
var loadingEnded = event
|
|
234
|
+
var loadingEnded = function(event) {
|
|
173
235
|
if (__webpack_require__.o(installedChunks, chunkId)) {
|
|
174
236
|
installedChunkData = installedChunks[chunkId];
|
|
175
237
|
if (installedChunkData !== 0) installedChunks[chunkId] = undefined;
|
|
@@ -189,10 +251,30 @@
|
|
|
189
251
|
}
|
|
190
252
|
}
|
|
191
253
|
};
|
|
192
|
-
|
|
193
|
-
|
|
254
|
+
__webpack_require__.F.j = function(chunkId) {
|
|
255
|
+
if ((!__webpack_require__.o(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && true) {
|
|
256
|
+
installedChunks[chunkId] = null;
|
|
257
|
+
var link = document.createElement("link");
|
|
258
|
+
if (__webpack_require__.nc) {
|
|
259
|
+
link.setAttribute("nonce", __webpack_require__.nc);
|
|
260
|
+
}
|
|
261
|
+
link.rel = "prefetch";
|
|
262
|
+
link.as = "script";
|
|
263
|
+
link.href = __webpack_require__.p + __webpack_require__.u(chunkId);
|
|
264
|
+
document.head.appendChild(link);
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
__webpack_require__.O.j = function(chunkId) {
|
|
268
|
+
return installedChunks[chunkId] === 0;
|
|
269
|
+
};
|
|
270
|
+
var webpackJsonpCallback = function(parentChunkLoadingFunction, data) {
|
|
271
|
+
var chunkIds = data[0];
|
|
272
|
+
var moreModules = data[1];
|
|
273
|
+
var runtime = data[2];
|
|
194
274
|
var moduleId, chunkId, i = 0;
|
|
195
|
-
if (chunkIds.some((id
|
|
275
|
+
if (chunkIds.some((function(id) {
|
|
276
|
+
return installedChunks[id] !== 0;
|
|
277
|
+
}))) {
|
|
196
278
|
for (moduleId in moreModules) {
|
|
197
279
|
if (__webpack_require__.o(moreModules, moduleId)) {
|
|
198
280
|
__webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
@@ -208,128 +290,365 @@
|
|
|
208
290
|
}
|
|
209
291
|
installedChunks[chunkIds[i]] = 0;
|
|
210
292
|
}
|
|
293
|
+
return __webpack_require__.O(result);
|
|
211
294
|
};
|
|
212
|
-
var chunkLoadingGlobal =
|
|
295
|
+
var chunkLoadingGlobal = window["webpackChunktsparticles"] = window["webpackChunktsparticles"] || [];
|
|
213
296
|
chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
|
214
297
|
chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
|
215
|
-
}
|
|
298
|
+
}();
|
|
299
|
+
!function() {
|
|
300
|
+
__webpack_require__.O(0, [ 649 ], (function() {
|
|
301
|
+
__webpack_require__.E(917);
|
|
302
|
+
}), 5);
|
|
303
|
+
}();
|
|
216
304
|
var __webpack_exports__ = {};
|
|
217
305
|
__webpack_require__.r(__webpack_exports__);
|
|
218
306
|
__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
|
-
|
|
307
|
+
AbsorberClickMode: function() {
|
|
308
|
+
return AbsorberClickMode;
|
|
309
|
+
},
|
|
310
|
+
AlterType: function() {
|
|
311
|
+
return AlterType;
|
|
312
|
+
},
|
|
313
|
+
AnimationStatus: function() {
|
|
314
|
+
return AnimationStatus;
|
|
315
|
+
},
|
|
316
|
+
Circle: function() {
|
|
317
|
+
return Circle;
|
|
318
|
+
},
|
|
319
|
+
CircleWarp: function() {
|
|
320
|
+
return CircleWarp;
|
|
321
|
+
},
|
|
322
|
+
ClickMode: function() {
|
|
323
|
+
return ClickMode;
|
|
324
|
+
},
|
|
325
|
+
CollisionMode: function() {
|
|
326
|
+
return CollisionMode;
|
|
327
|
+
},
|
|
328
|
+
Constants: function() {
|
|
329
|
+
return Constants;
|
|
330
|
+
},
|
|
331
|
+
Container: function() {
|
|
332
|
+
return Container;
|
|
333
|
+
},
|
|
334
|
+
DestroyMode: function() {
|
|
335
|
+
return DestroyMode;
|
|
336
|
+
},
|
|
337
|
+
DestroyType: function() {
|
|
338
|
+
return DestroyType;
|
|
339
|
+
},
|
|
340
|
+
DivMode: function() {
|
|
341
|
+
return DivMode;
|
|
342
|
+
},
|
|
343
|
+
DivType: function() {
|
|
344
|
+
return DivType;
|
|
345
|
+
},
|
|
346
|
+
EasingType: function() {
|
|
347
|
+
return EasingType;
|
|
348
|
+
},
|
|
349
|
+
EmitterClickMode: function() {
|
|
350
|
+
return EmitterClickMode;
|
|
351
|
+
},
|
|
352
|
+
EmitterShapeType: function() {
|
|
353
|
+
return EmitterShapeType;
|
|
354
|
+
},
|
|
355
|
+
ExternalInteractorBase: function() {
|
|
356
|
+
return ExternalInteractorBase;
|
|
357
|
+
},
|
|
358
|
+
GradientType: function() {
|
|
359
|
+
return GradientType;
|
|
360
|
+
},
|
|
361
|
+
HoverMode: function() {
|
|
362
|
+
return HoverMode;
|
|
363
|
+
},
|
|
364
|
+
InlineArrangement: function() {
|
|
365
|
+
return InlineArrangement;
|
|
366
|
+
},
|
|
367
|
+
InteractivityDetect: function() {
|
|
368
|
+
return InteractivityDetect;
|
|
369
|
+
},
|
|
370
|
+
InteractorType: function() {
|
|
371
|
+
return InteractorType;
|
|
372
|
+
},
|
|
373
|
+
Main: function() {
|
|
374
|
+
return Main;
|
|
375
|
+
},
|
|
376
|
+
MoveDirection: function() {
|
|
377
|
+
return MoveDirection;
|
|
378
|
+
},
|
|
379
|
+
MoveType: function() {
|
|
380
|
+
return MoveType;
|
|
381
|
+
},
|
|
382
|
+
OrbitType: function() {
|
|
383
|
+
return OrbitType;
|
|
384
|
+
},
|
|
385
|
+
OutMode: function() {
|
|
386
|
+
return OutMode;
|
|
387
|
+
},
|
|
388
|
+
OutModeDirection: function() {
|
|
389
|
+
return OutModeDirection;
|
|
390
|
+
},
|
|
391
|
+
Particle: function() {
|
|
392
|
+
return Particle;
|
|
393
|
+
},
|
|
394
|
+
ParticlesInteractorBase: function() {
|
|
395
|
+
return ParticlesInteractorBase;
|
|
396
|
+
},
|
|
397
|
+
Point: function() {
|
|
398
|
+
return Point;
|
|
399
|
+
},
|
|
400
|
+
Rectangle: function() {
|
|
401
|
+
return Rectangle;
|
|
402
|
+
},
|
|
403
|
+
ResponsiveMode: function() {
|
|
404
|
+
return ResponsiveMode;
|
|
405
|
+
},
|
|
406
|
+
RollMode: function() {
|
|
407
|
+
return RollMode;
|
|
408
|
+
},
|
|
409
|
+
RotateDirection: function() {
|
|
410
|
+
return RotateDirection;
|
|
411
|
+
},
|
|
412
|
+
ShapeType: function() {
|
|
413
|
+
return ShapeType;
|
|
414
|
+
},
|
|
415
|
+
SizeMode: function() {
|
|
416
|
+
return SizeMode;
|
|
417
|
+
},
|
|
418
|
+
StartValueType: function() {
|
|
419
|
+
return StartValueType;
|
|
420
|
+
},
|
|
421
|
+
ThemeMode: function() {
|
|
422
|
+
return ThemeMode;
|
|
423
|
+
},
|
|
424
|
+
TiltDirection: function() {
|
|
425
|
+
return TiltDirection;
|
|
426
|
+
},
|
|
427
|
+
Type: function() {
|
|
428
|
+
return Type;
|
|
429
|
+
},
|
|
430
|
+
Vector: function() {
|
|
431
|
+
return Vector;
|
|
432
|
+
},
|
|
433
|
+
alterHsl: function() {
|
|
434
|
+
return alterHsl;
|
|
435
|
+
},
|
|
436
|
+
animate: function() {
|
|
437
|
+
return animate;
|
|
438
|
+
},
|
|
439
|
+
areBoundsInside: function() {
|
|
440
|
+
return areBoundsInside;
|
|
441
|
+
},
|
|
442
|
+
arrayRandomIndex: function() {
|
|
443
|
+
return arrayRandomIndex;
|
|
444
|
+
},
|
|
445
|
+
calcEasing: function() {
|
|
446
|
+
return calcEasing;
|
|
447
|
+
},
|
|
448
|
+
calculateBounds: function() {
|
|
449
|
+
return calculateBounds;
|
|
450
|
+
},
|
|
451
|
+
cancelAnimation: function() {
|
|
452
|
+
return cancelAnimation;
|
|
453
|
+
},
|
|
454
|
+
circleBounce: function() {
|
|
455
|
+
return circleBounce;
|
|
456
|
+
},
|
|
457
|
+
circleBounceDataFromParticle: function() {
|
|
458
|
+
return circleBounceDataFromParticle;
|
|
459
|
+
},
|
|
460
|
+
clamp: function() {
|
|
461
|
+
return clamp;
|
|
462
|
+
},
|
|
463
|
+
clear: function() {
|
|
464
|
+
return clear;
|
|
465
|
+
},
|
|
466
|
+
collisionVelocity: function() {
|
|
467
|
+
return collisionVelocity;
|
|
468
|
+
},
|
|
469
|
+
colorMix: function() {
|
|
470
|
+
return colorMix;
|
|
471
|
+
},
|
|
472
|
+
colorToHsl: function() {
|
|
473
|
+
return colorToHsl;
|
|
474
|
+
},
|
|
475
|
+
colorToRgb: function() {
|
|
476
|
+
return colorToRgb;
|
|
477
|
+
},
|
|
478
|
+
deepExtend: function() {
|
|
479
|
+
return deepExtend;
|
|
480
|
+
},
|
|
481
|
+
divMode: function() {
|
|
482
|
+
return divMode;
|
|
483
|
+
},
|
|
484
|
+
divModeExecute: function() {
|
|
485
|
+
return divModeExecute;
|
|
486
|
+
},
|
|
487
|
+
drawConnectLine: function() {
|
|
488
|
+
return drawConnectLine;
|
|
489
|
+
},
|
|
490
|
+
drawEllipse: function() {
|
|
491
|
+
return drawEllipse;
|
|
492
|
+
},
|
|
493
|
+
drawGrabLine: function() {
|
|
494
|
+
return drawGrabLine;
|
|
495
|
+
},
|
|
496
|
+
drawLinkLine: function() {
|
|
497
|
+
return drawLinkLine;
|
|
498
|
+
},
|
|
499
|
+
drawLinkTriangle: function() {
|
|
500
|
+
return drawLinkTriangle;
|
|
501
|
+
},
|
|
502
|
+
drawParticle: function() {
|
|
503
|
+
return drawParticle;
|
|
504
|
+
},
|
|
505
|
+
drawParticlePlugin: function() {
|
|
506
|
+
return drawParticlePlugin;
|
|
507
|
+
},
|
|
508
|
+
drawPlugin: function() {
|
|
509
|
+
return drawPlugin;
|
|
510
|
+
},
|
|
511
|
+
drawShape: function() {
|
|
512
|
+
return drawShape;
|
|
513
|
+
},
|
|
514
|
+
drawShapeAfterEffect: function() {
|
|
515
|
+
return drawShapeAfterEffect;
|
|
516
|
+
},
|
|
517
|
+
getDistance: function() {
|
|
518
|
+
return getDistance;
|
|
519
|
+
},
|
|
520
|
+
getDistances: function() {
|
|
521
|
+
return getDistances;
|
|
522
|
+
},
|
|
523
|
+
getHslAnimationFromHsl: function() {
|
|
524
|
+
return getHslAnimationFromHsl;
|
|
525
|
+
},
|
|
526
|
+
getHslFromAnimation: function() {
|
|
527
|
+
return getHslFromAnimation;
|
|
528
|
+
},
|
|
529
|
+
getLinkColor: function() {
|
|
530
|
+
return getLinkColor;
|
|
531
|
+
},
|
|
532
|
+
getLinkRandomColor: function() {
|
|
533
|
+
return getLinkRandomColor;
|
|
534
|
+
},
|
|
535
|
+
getParticleBaseVelocity: function() {
|
|
536
|
+
return getParticleBaseVelocity;
|
|
537
|
+
},
|
|
538
|
+
getParticleDirectionAngle: function() {
|
|
539
|
+
return getParticleDirectionAngle;
|
|
540
|
+
},
|
|
541
|
+
getRandomRgbColor: function() {
|
|
542
|
+
return getRandomRgbColor;
|
|
543
|
+
},
|
|
544
|
+
getRangeMax: function() {
|
|
545
|
+
return getRangeMax;
|
|
546
|
+
},
|
|
547
|
+
getRangeMin: function() {
|
|
548
|
+
return getRangeMin;
|
|
549
|
+
},
|
|
550
|
+
getRangeValue: function() {
|
|
551
|
+
return getRangeValue;
|
|
552
|
+
},
|
|
553
|
+
getStyleFromHsl: function() {
|
|
554
|
+
return getStyleFromHsl;
|
|
555
|
+
},
|
|
556
|
+
getStyleFromHsv: function() {
|
|
557
|
+
return getStyleFromHsv;
|
|
558
|
+
},
|
|
559
|
+
getStyleFromRgb: function() {
|
|
560
|
+
return getStyleFromRgb;
|
|
561
|
+
},
|
|
562
|
+
getValue: function() {
|
|
563
|
+
return getValue;
|
|
564
|
+
},
|
|
565
|
+
gradient: function() {
|
|
566
|
+
return gradient;
|
|
567
|
+
},
|
|
568
|
+
hslToHsv: function() {
|
|
569
|
+
return hslToHsv;
|
|
570
|
+
},
|
|
571
|
+
hslToRgb: function() {
|
|
572
|
+
return hslToRgb;
|
|
573
|
+
},
|
|
574
|
+
hslaToHsva: function() {
|
|
575
|
+
return hslaToHsva;
|
|
576
|
+
},
|
|
577
|
+
hslaToRgba: function() {
|
|
578
|
+
return hslaToRgba;
|
|
579
|
+
},
|
|
580
|
+
hsvToHsl: function() {
|
|
581
|
+
return hsvToHsl;
|
|
582
|
+
},
|
|
583
|
+
hsvToRgb: function() {
|
|
584
|
+
return hsvToRgb;
|
|
585
|
+
},
|
|
586
|
+
hsvaToHsla: function() {
|
|
587
|
+
return hsvaToHsla;
|
|
588
|
+
},
|
|
589
|
+
hsvaToRgba: function() {
|
|
590
|
+
return hsvaToRgba;
|
|
591
|
+
},
|
|
592
|
+
isDivModeEnabled: function() {
|
|
593
|
+
return isDivModeEnabled;
|
|
594
|
+
},
|
|
595
|
+
isInArray: function() {
|
|
596
|
+
return isInArray;
|
|
597
|
+
},
|
|
598
|
+
isPointInside: function() {
|
|
599
|
+
return isPointInside;
|
|
600
|
+
},
|
|
601
|
+
isSsr: function() {
|
|
602
|
+
return isSsr;
|
|
603
|
+
},
|
|
604
|
+
itemFromArray: function() {
|
|
605
|
+
return itemFromArray;
|
|
606
|
+
},
|
|
607
|
+
loadFont: function() {
|
|
608
|
+
return loadFont;
|
|
609
|
+
},
|
|
610
|
+
mix: function() {
|
|
611
|
+
return mix;
|
|
612
|
+
},
|
|
613
|
+
pJSDom: function() {
|
|
614
|
+
return pJSDom;
|
|
615
|
+
},
|
|
616
|
+
paintBase: function() {
|
|
617
|
+
return paintBase;
|
|
618
|
+
},
|
|
619
|
+
particlesJS: function() {
|
|
620
|
+
return particlesJS;
|
|
621
|
+
},
|
|
622
|
+
randomInRange: function() {
|
|
623
|
+
return randomInRange;
|
|
624
|
+
},
|
|
625
|
+
rectBounce: function() {
|
|
626
|
+
return rectBounce;
|
|
627
|
+
},
|
|
628
|
+
rgbToHsl: function() {
|
|
629
|
+
return rgbToHsl;
|
|
630
|
+
},
|
|
631
|
+
rgbToHsv: function() {
|
|
632
|
+
return rgbToHsv;
|
|
633
|
+
},
|
|
634
|
+
rgbaToHsva: function() {
|
|
635
|
+
return rgbaToHsva;
|
|
636
|
+
},
|
|
637
|
+
setRangeValue: function() {
|
|
638
|
+
return setRangeValue;
|
|
639
|
+
},
|
|
640
|
+
singleDivModeExecute: function() {
|
|
641
|
+
return singleDivModeExecute;
|
|
642
|
+
},
|
|
643
|
+
stringToAlpha: function() {
|
|
644
|
+
return stringToAlpha;
|
|
645
|
+
},
|
|
646
|
+
stringToRgb: function() {
|
|
647
|
+
return stringToRgb;
|
|
648
|
+
},
|
|
649
|
+
tsParticles: function() {
|
|
650
|
+
return tsParticles;
|
|
651
|
+
}
|
|
333
652
|
});
|
|
334
653
|
const initPjs = main => {
|
|
335
654
|
const particlesJS = (tagId, options) => main.load(tagId, options);
|
|
@@ -347,8 +666,8 @@
|
|
|
347
666
|
};
|
|
348
667
|
const pJSDom = main.dom();
|
|
349
668
|
return {
|
|
350
|
-
particlesJS,
|
|
351
|
-
pJSDom
|
|
669
|
+
particlesJS: particlesJS,
|
|
670
|
+
pJSDom: pJSDom
|
|
352
671
|
};
|
|
353
672
|
};
|
|
354
673
|
var MoveDirection;
|
|
@@ -448,6 +767,11 @@
|
|
|
448
767
|
ThemeMode["dark"] = "dark";
|
|
449
768
|
ThemeMode["light"] = "light";
|
|
450
769
|
})(ThemeMode || (ThemeMode = {}));
|
|
770
|
+
var ResponsiveMode;
|
|
771
|
+
(function(ResponsiveMode) {
|
|
772
|
+
ResponsiveMode["screen"] = "screen";
|
|
773
|
+
ResponsiveMode["canvas"] = "canvas";
|
|
774
|
+
})(ResponsiveMode || (ResponsiveMode = {}));
|
|
451
775
|
var AnimationStatus;
|
|
452
776
|
(function(AnimationStatus) {
|
|
453
777
|
AnimationStatus[AnimationStatus["increasing"] = 0] = "increasing";
|
|
@@ -648,7 +972,7 @@
|
|
|
648
972
|
}
|
|
649
973
|
function getValue(options) {
|
|
650
974
|
const random = options.random;
|
|
651
|
-
const {enable, minimumValue} = typeof random === "boolean" ? {
|
|
975
|
+
const {enable: enable, minimumValue: minimumValue} = typeof random === "boolean" ? {
|
|
652
976
|
enable: random,
|
|
653
977
|
minimumValue: 0
|
|
654
978
|
} : random;
|
|
@@ -658,8 +982,8 @@
|
|
|
658
982
|
const dx = pointA.x - pointB.x;
|
|
659
983
|
const dy = pointA.y - pointB.y;
|
|
660
984
|
return {
|
|
661
|
-
dx,
|
|
662
|
-
dy,
|
|
985
|
+
dx: dx,
|
|
986
|
+
dy: dy,
|
|
663
987
|
distance: Math.sqrt(dx * dx + dy * dy)
|
|
664
988
|
};
|
|
665
989
|
}
|
|
@@ -1274,7 +1598,7 @@
|
|
|
1274
1598
|
}
|
|
1275
1599
|
const s = !v ? 0 : c / v;
|
|
1276
1600
|
return {
|
|
1277
|
-
h,
|
|
1601
|
+
h: h,
|
|
1278
1602
|
s: s * 100,
|
|
1279
1603
|
v: v * 100
|
|
1280
1604
|
};
|
|
@@ -1683,8 +2007,8 @@
|
|
|
1683
2007
|
class Range {
|
|
1684
2008
|
constructor(x, y) {
|
|
1685
2009
|
this.position = {
|
|
1686
|
-
x,
|
|
1687
|
-
y
|
|
2010
|
+
x: x,
|
|
2011
|
+
y: y
|
|
1688
2012
|
};
|
|
1689
2013
|
}
|
|
1690
2014
|
}
|
|
@@ -1727,8 +2051,8 @@
|
|
|
1727
2051
|
constructor(x, y, width, height) {
|
|
1728
2052
|
super(x, y);
|
|
1729
2053
|
this.size = {
|
|
1730
|
-
height,
|
|
1731
|
-
width
|
|
2054
|
+
height: height,
|
|
2055
|
+
width: width
|
|
1732
2056
|
};
|
|
1733
2057
|
}
|
|
1734
2058
|
contains(point) {
|
|
@@ -2216,9 +2540,9 @@
|
|
|
2216
2540
|
pathGenerators.set(type, pathGenerator);
|
|
2217
2541
|
}
|
|
2218
2542
|
}
|
|
2219
|
-
static getInteractors(container) {
|
|
2543
|
+
static getInteractors(container, force = false) {
|
|
2220
2544
|
let res = interactors.get(container);
|
|
2221
|
-
if (!res) {
|
|
2545
|
+
if (!res || force) {
|
|
2222
2546
|
res = [ ...interactorsInitializers.values() ].map((t => t(container)));
|
|
2223
2547
|
interactors.set(container, res);
|
|
2224
2548
|
}
|
|
@@ -2227,9 +2551,9 @@
|
|
|
2227
2551
|
static addInteractor(name, initInteractor) {
|
|
2228
2552
|
interactorsInitializers.set(name, initInteractor);
|
|
2229
2553
|
}
|
|
2230
|
-
static getUpdaters(container) {
|
|
2554
|
+
static getUpdaters(container, force = false) {
|
|
2231
2555
|
let res = updaters.get(container);
|
|
2232
|
-
if (!res) {
|
|
2556
|
+
if (!res || force) {
|
|
2233
2557
|
res = [ ...updatersInitializers.values() ].map((t => t(container)));
|
|
2234
2558
|
updaters.set(container, res);
|
|
2235
2559
|
}
|
|
@@ -4486,21 +4810,21 @@
|
|
|
4486
4810
|
const radius = this.getRadius();
|
|
4487
4811
|
const outModes = this.options.move.outModes, fixHorizontal = outMode => {
|
|
4488
4812
|
fixOutMode({
|
|
4489
|
-
outMode,
|
|
4813
|
+
outMode: outMode,
|
|
4490
4814
|
checkModes: [ OutMode.bounce, OutMode.bounceHorizontal ],
|
|
4491
4815
|
coord: pos.x,
|
|
4492
4816
|
maxCoord: container.canvas.size.width,
|
|
4493
4817
|
setCb: value => pos.x += value,
|
|
4494
|
-
radius
|
|
4818
|
+
radius: radius
|
|
4495
4819
|
});
|
|
4496
4820
|
}, fixVertical = outMode => {
|
|
4497
4821
|
fixOutMode({
|
|
4498
|
-
outMode,
|
|
4822
|
+
outMode: outMode,
|
|
4499
4823
|
checkModes: [ OutMode.bounce, OutMode.bounceVertical ],
|
|
4500
4824
|
coord: pos.y,
|
|
4501
4825
|
maxCoord: container.canvas.size.height,
|
|
4502
4826
|
setCb: value => pos.y += value,
|
|
4503
|
-
radius
|
|
4827
|
+
radius: radius
|
|
4504
4828
|
});
|
|
4505
4829
|
};
|
|
4506
4830
|
fixHorizontal((_c = outModes.left) !== null && _c !== void 0 ? _c : outModes.default);
|
|
@@ -4582,9 +4906,12 @@
|
|
|
4582
4906
|
class InteractionManager {
|
|
4583
4907
|
constructor(container) {
|
|
4584
4908
|
this.container = container;
|
|
4585
|
-
const interactors = Plugins.getInteractors(container);
|
|
4586
4909
|
this.externalInteractors = [];
|
|
4587
4910
|
this.particleInteractors = [];
|
|
4911
|
+
this.init();
|
|
4912
|
+
}
|
|
4913
|
+
init() {
|
|
4914
|
+
const interactors = Plugins.getInteractors(this.container, true);
|
|
4588
4915
|
for (const interactor of interactors) {
|
|
4589
4916
|
switch (interactor.type) {
|
|
4590
4917
|
case InteractorType.External:
|
|
@@ -4617,7 +4944,7 @@
|
|
|
4617
4944
|
}
|
|
4618
4945
|
function applyDistance(particle) {
|
|
4619
4946
|
const initialPosition = particle.initialPosition;
|
|
4620
|
-
const {dx, dy} = getDistances(initialPosition, particle.position);
|
|
4947
|
+
const {dx: dx, dy: dy} = getDistances(initialPosition, particle.position);
|
|
4621
4948
|
const dxFixed = Math.abs(dx), dyFixed = Math.abs(dy);
|
|
4622
4949
|
const hDistance = particle.retina.maxDistance.horizontal;
|
|
4623
4950
|
const vDistance = particle.retina.maxDistance.vertical;
|
|
@@ -4806,7 +5133,7 @@
|
|
|
4806
5133
|
const canvasSize = this.container.canvas.size;
|
|
4807
5134
|
this.linksColors = new Map;
|
|
4808
5135
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
4809
|
-
this.updaters = Plugins.getUpdaters(container);
|
|
5136
|
+
this.updaters = Plugins.getUpdaters(container, true);
|
|
4810
5137
|
}
|
|
4811
5138
|
get count() {
|
|
4812
5139
|
return this.array.length;
|
|
@@ -4820,6 +5147,8 @@
|
|
|
4820
5147
|
this.freqs.links = new Map;
|
|
4821
5148
|
this.freqs.triangles = new Map;
|
|
4822
5149
|
let handled = false;
|
|
5150
|
+
this.updaters = Plugins.getUpdaters(container, true);
|
|
5151
|
+
this.interactionManager.init();
|
|
4823
5152
|
for (const [, plugin] of container.plugins) {
|
|
4824
5153
|
if (plugin.particlesInitialization !== undefined) {
|
|
4825
5154
|
handled = plugin.particlesInitialization();
|
|
@@ -5863,7 +6192,7 @@
|
|
|
5863
6192
|
}
|
|
5864
6193
|
class Interactivity {
|
|
5865
6194
|
constructor() {
|
|
5866
|
-
this.detectsOn = InteractivityDetect.
|
|
6195
|
+
this.detectsOn = InteractivityDetect.window;
|
|
5867
6196
|
this.events = new Events;
|
|
5868
6197
|
this.modes = new Modes;
|
|
5869
6198
|
}
|
|
@@ -5931,7 +6260,7 @@
|
|
|
5931
6260
|
color: data.cover
|
|
5932
6261
|
} : data.cover;
|
|
5933
6262
|
this.cover.load(cover.color !== undefined ? cover : {
|
|
5934
|
-
color
|
|
6263
|
+
color: color
|
|
5935
6264
|
});
|
|
5936
6265
|
}
|
|
5937
6266
|
if (data.enable !== undefined) {
|
|
@@ -6014,8 +6343,8 @@
|
|
|
6014
6343
|
}
|
|
6015
6344
|
class FullScreen {
|
|
6016
6345
|
constructor() {
|
|
6017
|
-
this.enable =
|
|
6018
|
-
this.zIndex =
|
|
6346
|
+
this.enable = true;
|
|
6347
|
+
this.zIndex = 0;
|
|
6019
6348
|
}
|
|
6020
6349
|
load(data) {
|
|
6021
6350
|
if (!data) {
|
|
@@ -6082,6 +6411,7 @@
|
|
|
6082
6411
|
constructor() {
|
|
6083
6412
|
this.maxWidth = Infinity;
|
|
6084
6413
|
this.options = {};
|
|
6414
|
+
this.mode = ResponsiveMode.canvas;
|
|
6085
6415
|
}
|
|
6086
6416
|
load(data) {
|
|
6087
6417
|
if (!data) {
|
|
@@ -6090,6 +6420,13 @@
|
|
|
6090
6420
|
if (data.maxWidth !== undefined) {
|
|
6091
6421
|
this.maxWidth = data.maxWidth;
|
|
6092
6422
|
}
|
|
6423
|
+
if (data.mode !== undefined) {
|
|
6424
|
+
if (data.mode === ResponsiveMode.screen) {
|
|
6425
|
+
this.mode = ResponsiveMode.screen;
|
|
6426
|
+
} else {
|
|
6427
|
+
this.mode = ResponsiveMode.canvas;
|
|
6428
|
+
}
|
|
6429
|
+
}
|
|
6093
6430
|
if (data.options !== undefined) {
|
|
6094
6431
|
this.options = deepExtend({}, data.options);
|
|
6095
6432
|
}
|
|
@@ -6228,7 +6565,7 @@
|
|
|
6228
6565
|
}
|
|
6229
6566
|
setResponsive(width, pxRatio, defaultOptions) {
|
|
6230
6567
|
this.load(defaultOptions);
|
|
6231
|
-
const responsiveOptions = this.responsive.find((t => t.maxWidth * pxRatio > width));
|
|
6568
|
+
const responsiveOptions = this.responsive.find((t => t.mode === ResponsiveMode.screen && screen ? t.maxWidth * pxRatio > screen.availWidth : t.maxWidth * pxRatio > width));
|
|
6232
6569
|
this.load(responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.options);
|
|
6233
6570
|
return responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.maxWidth;
|
|
6234
6571
|
}
|
|
@@ -6254,10 +6591,12 @@
|
|
|
6254
6591
|
this.zLayers = 100;
|
|
6255
6592
|
this.pageHidden = false;
|
|
6256
6593
|
this._sourceOptions = sourceOptions;
|
|
6594
|
+
this._initialSourceOptions = sourceOptions;
|
|
6257
6595
|
this.retina = new Retina(this);
|
|
6258
6596
|
this.canvas = new Canvas(this);
|
|
6259
6597
|
this.particles = new Particles(this);
|
|
6260
6598
|
this.drawer = new FrameManager(this);
|
|
6599
|
+
this.presets = presets;
|
|
6261
6600
|
this.pathGenerator = {
|
|
6262
6601
|
generate: () => {
|
|
6263
6602
|
const v = Vector.create(0, 0);
|
|
@@ -6286,17 +6625,6 @@
|
|
|
6286
6625
|
this.density = 1;
|
|
6287
6626
|
this._options = new Options;
|
|
6288
6627
|
this.actualOptions = new Options;
|
|
6289
|
-
for (const preset of presets) {
|
|
6290
|
-
this._options.load(Plugins.getPreset(preset));
|
|
6291
|
-
}
|
|
6292
|
-
const shapes = Plugins.getSupportedShapes();
|
|
6293
|
-
for (const type of shapes) {
|
|
6294
|
-
const drawer = Plugins.getShapeDrawer(type);
|
|
6295
|
-
if (drawer) {
|
|
6296
|
-
this.drawers.set(type, drawer);
|
|
6297
|
-
}
|
|
6298
|
-
}
|
|
6299
|
-
this._options.load(this._sourceOptions);
|
|
6300
6628
|
this.eventListeners = new EventListeners(this);
|
|
6301
6629
|
if (typeof IntersectionObserver !== "undefined" && IntersectionObserver) {
|
|
6302
6630
|
this.intersectionObserver = new IntersectionObserver((entries => this.intersectionManager(entries)));
|
|
@@ -6438,6 +6766,7 @@
|
|
|
6438
6766
|
this.particles.linksColors = new Map;
|
|
6439
6767
|
delete this.particles.grabLineColor;
|
|
6440
6768
|
delete this.particles.linksColor;
|
|
6769
|
+
this._sourceOptions = this._options;
|
|
6441
6770
|
}
|
|
6442
6771
|
async loadTheme(name) {
|
|
6443
6772
|
this.currentTheme = name;
|
|
@@ -6551,6 +6880,19 @@
|
|
|
6551
6880
|
return false;
|
|
6552
6881
|
}
|
|
6553
6882
|
async init() {
|
|
6883
|
+
this._options = new Options;
|
|
6884
|
+
for (const preset of this.presets) {
|
|
6885
|
+
this._options.load(Plugins.getPreset(preset));
|
|
6886
|
+
}
|
|
6887
|
+
const shapes = Plugins.getSupportedShapes();
|
|
6888
|
+
for (const type of shapes) {
|
|
6889
|
+
const drawer = Plugins.getShapeDrawer(type);
|
|
6890
|
+
if (drawer) {
|
|
6891
|
+
this.drawers.set(type, drawer);
|
|
6892
|
+
}
|
|
6893
|
+
}
|
|
6894
|
+
this._options.load(this._initialSourceOptions);
|
|
6895
|
+
this._options.load(this._sourceOptions);
|
|
6554
6896
|
this.actualOptions = new Options;
|
|
6555
6897
|
this.actualOptions.load(this._options);
|
|
6556
6898
|
this.retina.init();
|
|
@@ -6637,7 +6979,7 @@
|
|
|
6637
6979
|
static async loadOptions(params) {
|
|
6638
6980
|
var _a, _b, _c;
|
|
6639
6981
|
const tagId = (_a = params.tagId) !== null && _a !== void 0 ? _a : `tsparticles${Math.floor(Math.random() * 1e4)}`;
|
|
6640
|
-
const {options, index} = params;
|
|
6982
|
+
const {options: options, index: index} = params;
|
|
6641
6983
|
let domContainer = (_b = params.element) !== null && _b !== void 0 ? _b : document.getElementById(tagId);
|
|
6642
6984
|
if (!domContainer) {
|
|
6643
6985
|
domContainer = document.createElement("div");
|
|
@@ -6687,7 +7029,7 @@
|
|
|
6687
7029
|
return newItem;
|
|
6688
7030
|
}
|
|
6689
7031
|
static async loadRemoteOptions(params) {
|
|
6690
|
-
const {url: jsonUrl, index} = params;
|
|
7032
|
+
const {url: jsonUrl, index: index} = params;
|
|
6691
7033
|
const url = jsonUrl instanceof Array ? itemFromArray(jsonUrl, index) : jsonUrl;
|
|
6692
7034
|
if (!url) {
|
|
6693
7035
|
return;
|
|
@@ -6701,13 +7043,13 @@
|
|
|
6701
7043
|
return await Loader.loadOptions({
|
|
6702
7044
|
tagId: params.tagId,
|
|
6703
7045
|
element: params.element,
|
|
6704
|
-
index,
|
|
7046
|
+
index: index,
|
|
6705
7047
|
options: data
|
|
6706
7048
|
});
|
|
6707
7049
|
}
|
|
6708
7050
|
static load(tagId, options, index) {
|
|
6709
7051
|
const params = {
|
|
6710
|
-
index
|
|
7052
|
+
index: index
|
|
6711
7053
|
};
|
|
6712
7054
|
if (typeof tagId === "string") {
|
|
6713
7055
|
params.tagId = tagId;
|
|
@@ -6723,7 +7065,7 @@
|
|
|
6723
7065
|
}
|
|
6724
7066
|
static async set(id, domContainer, options, index) {
|
|
6725
7067
|
const params = {
|
|
6726
|
-
index
|
|
7068
|
+
index: index
|
|
6727
7069
|
};
|
|
6728
7070
|
if (typeof id === "string") {
|
|
6729
7071
|
params.tagId = id;
|
|
@@ -6752,8 +7094,8 @@
|
|
|
6752
7094
|
}
|
|
6753
7095
|
return await Loader.loadRemoteOptions({
|
|
6754
7096
|
tagId: id,
|
|
6755
|
-
url,
|
|
6756
|
-
index
|
|
7097
|
+
url: url,
|
|
7098
|
+
index: index
|
|
6757
7099
|
});
|
|
6758
7100
|
}
|
|
6759
7101
|
static async setJSON(id, domContainer, jsonUrl, index) {
|
|
@@ -6770,9 +7112,9 @@
|
|
|
6770
7112
|
}
|
|
6771
7113
|
return await Loader.loadRemoteOptions({
|
|
6772
7114
|
tagId: newId,
|
|
6773
|
-
url,
|
|
7115
|
+
url: url,
|
|
6774
7116
|
index: newIndex,
|
|
6775
|
-
element
|
|
7117
|
+
element: element
|
|
6776
7118
|
});
|
|
6777
7119
|
}
|
|
6778
7120
|
static setOnClickHandler(callback) {
|
|
@@ -6832,34 +7174,45 @@
|
|
|
6832
7174
|
domItem(index) {
|
|
6833
7175
|
return Loader.domItem(index);
|
|
6834
7176
|
}
|
|
6835
|
-
|
|
7177
|
+
async refresh() {
|
|
7178
|
+
for (const instance of this.dom()) {
|
|
7179
|
+
await instance.refresh();
|
|
7180
|
+
}
|
|
7181
|
+
}
|
|
7182
|
+
async addShape(shape, drawer, init, afterEffect, destroy) {
|
|
6836
7183
|
let customDrawer;
|
|
6837
7184
|
if (typeof drawer === "function") {
|
|
6838
7185
|
customDrawer = {
|
|
6839
|
-
afterEffect,
|
|
6840
|
-
destroy,
|
|
7186
|
+
afterEffect: afterEffect,
|
|
7187
|
+
destroy: destroy,
|
|
6841
7188
|
draw: drawer,
|
|
6842
|
-
init
|
|
7189
|
+
init: init
|
|
6843
7190
|
};
|
|
6844
7191
|
} else {
|
|
6845
7192
|
customDrawer = drawer;
|
|
6846
7193
|
}
|
|
6847
7194
|
Plugins.addShapeDrawer(shape, customDrawer);
|
|
7195
|
+
await this.refresh();
|
|
6848
7196
|
}
|
|
6849
|
-
addPreset(preset, options, override = false) {
|
|
7197
|
+
async addPreset(preset, options, override = false) {
|
|
6850
7198
|
Plugins.addPreset(preset, options, override);
|
|
7199
|
+
await this.refresh();
|
|
6851
7200
|
}
|
|
6852
|
-
addPlugin(plugin) {
|
|
7201
|
+
async addPlugin(plugin) {
|
|
6853
7202
|
Plugins.addPlugin(plugin);
|
|
7203
|
+
await this.refresh();
|
|
6854
7204
|
}
|
|
6855
|
-
addPathGenerator(name, generator) {
|
|
7205
|
+
async addPathGenerator(name, generator) {
|
|
6856
7206
|
Plugins.addPathGenerator(name, generator);
|
|
7207
|
+
await this.refresh();
|
|
6857
7208
|
}
|
|
6858
|
-
addInteractor(name, interactorInitializer) {
|
|
7209
|
+
async addInteractor(name, interactorInitializer) {
|
|
6859
7210
|
Plugins.addInteractor(name, interactorInitializer);
|
|
7211
|
+
await this.refresh();
|
|
6860
7212
|
}
|
|
6861
|
-
addParticleUpdater(name, updaterInitializer) {
|
|
7213
|
+
async addParticleUpdater(name, updaterInitializer) {
|
|
6862
7214
|
Plugins.addParticleUpdater(name, updaterInitializer);
|
|
7215
|
+
await this.refresh();
|
|
6863
7216
|
}
|
|
6864
7217
|
}
|
|
6865
7218
|
_Main_initialized = new WeakMap;
|
|
@@ -6871,8 +7224,8 @@
|
|
|
6871
7224
|
context.arc(0, 0, radius, 0, Math.PI * 2, false);
|
|
6872
7225
|
}
|
|
6873
7226
|
}
|
|
6874
|
-
function loadCircleShape(tsParticles) {
|
|
6875
|
-
tsParticles.addShape("circle", new CircleDrawer);
|
|
7227
|
+
async function loadCircleShape(tsParticles) {
|
|
7228
|
+
await tsParticles.addShape("circle", new CircleDrawer);
|
|
6876
7229
|
}
|
|
6877
7230
|
class LifeUpdater {
|
|
6878
7231
|
constructor(container) {
|
|
@@ -6933,8 +7286,8 @@
|
|
|
6933
7286
|
life.duration = getRangeValue(lifeOptions.duration.value) * 1e3;
|
|
6934
7287
|
}
|
|
6935
7288
|
}
|
|
6936
|
-
function loadLifeUpdater(tsParticles) {
|
|
6937
|
-
tsParticles.addParticleUpdater("life", (container => new LifeUpdater(container)));
|
|
7289
|
+
async function loadLifeUpdater(tsParticles) {
|
|
7290
|
+
await tsParticles.addParticleUpdater("life", (container => new LifeUpdater(container)));
|
|
6938
7291
|
}
|
|
6939
7292
|
class ExternalInteractorBase {
|
|
6940
7293
|
constructor(container) {
|
|
@@ -6976,8 +7329,8 @@
|
|
|
6976
7329
|
}
|
|
6977
7330
|
}
|
|
6978
7331
|
}
|
|
6979
|
-
function loadExternalConnectInteraction(tsParticles) {
|
|
6980
|
-
tsParticles.addInteractor("externalConnect", (container => new Connector(container)));
|
|
7332
|
+
async function loadExternalConnectInteraction(tsParticles) {
|
|
7333
|
+
await tsParticles.addInteractor("externalConnect", (container => new Connector(container)));
|
|
6981
7334
|
}
|
|
6982
7335
|
function checkDestroy(particle, value, minValue, maxValue) {
|
|
6983
7336
|
switch (particle.options.opacity.animation.destroy) {
|
|
@@ -7088,8 +7441,8 @@
|
|
|
7088
7441
|
updateOpacity(particle, delta);
|
|
7089
7442
|
}
|
|
7090
7443
|
}
|
|
7091
|
-
function loadOpacityUpdater(tsParticles) {
|
|
7092
|
-
tsParticles.addParticleUpdater("opacity", (container => new OpacityUpdater(container)));
|
|
7444
|
+
async function loadOpacityUpdater(tsParticles) {
|
|
7445
|
+
await tsParticles.addParticleUpdater("opacity", (container => new OpacityUpdater(container)));
|
|
7093
7446
|
}
|
|
7094
7447
|
function loadImage(source) {
|
|
7095
7448
|
return new Promise(((resolve, reject) => {
|
|
@@ -7098,7 +7451,7 @@
|
|
|
7098
7451
|
return;
|
|
7099
7452
|
}
|
|
7100
7453
|
const image = {
|
|
7101
|
-
source,
|
|
7454
|
+
source: source,
|
|
7102
7455
|
type: source.substr(source.length - 3)
|
|
7103
7456
|
};
|
|
7104
7457
|
const img = new Image;
|
|
@@ -7117,7 +7470,7 @@
|
|
|
7117
7470
|
throw new Error("Error tsParticles - No image.src");
|
|
7118
7471
|
}
|
|
7119
7472
|
const image = {
|
|
7120
|
-
source,
|
|
7473
|
+
source: source,
|
|
7121
7474
|
type: source.substr(source.length - 3)
|
|
7122
7475
|
};
|
|
7123
7476
|
if (image.type !== "svg") {
|
|
@@ -7131,7 +7484,7 @@
|
|
|
7131
7484
|
return image;
|
|
7132
7485
|
}
|
|
7133
7486
|
function replaceColorSvg(imageShape, color, opacity) {
|
|
7134
|
-
const {svgData} = imageShape;
|
|
7487
|
+
const {svgData: svgData} = imageShape;
|
|
7135
7488
|
if (!svgData) {
|
|
7136
7489
|
return "";
|
|
7137
7490
|
}
|
|
@@ -7335,8 +7688,8 @@
|
|
|
7335
7688
|
const close = (_g = imageData.close) !== null && _g !== void 0 ? _g : particle.close;
|
|
7336
7689
|
const imageShape = {
|
|
7337
7690
|
image: imageRes,
|
|
7338
|
-
fill,
|
|
7339
|
-
close
|
|
7691
|
+
fill: fill,
|
|
7692
|
+
close: close
|
|
7340
7693
|
};
|
|
7341
7694
|
particle.image = imageShape.image;
|
|
7342
7695
|
particle.fill = imageShape.fill;
|
|
@@ -7344,10 +7697,10 @@
|
|
|
7344
7697
|
}
|
|
7345
7698
|
}
|
|
7346
7699
|
_ImageDrawer_images = new WeakMap;
|
|
7347
|
-
function loadImageShape(tsParticles) {
|
|
7700
|
+
async function loadImageShape(tsParticles) {
|
|
7348
7701
|
const imageDrawer = new ImageDrawer;
|
|
7349
|
-
tsParticles.addShape("image", imageDrawer);
|
|
7350
|
-
tsParticles.addShape("images", imageDrawer);
|
|
7702
|
+
await tsParticles.addShape("image", imageDrawer);
|
|
7703
|
+
await tsParticles.addShape("images", imageDrawer);
|
|
7351
7704
|
}
|
|
7352
7705
|
class PolygonDrawerBase {
|
|
7353
7706
|
getSidesCount(particle) {
|
|
@@ -7416,15 +7769,15 @@
|
|
|
7416
7769
|
};
|
|
7417
7770
|
}
|
|
7418
7771
|
}
|
|
7419
|
-
function loadGenericPolygonShape(tsParticles) {
|
|
7420
|
-
tsParticles.addShape("polygon", new PolygonDrawer);
|
|
7772
|
+
async function loadGenericPolygonShape(tsParticles) {
|
|
7773
|
+
await tsParticles.addShape("polygon", new PolygonDrawer);
|
|
7421
7774
|
}
|
|
7422
|
-
function loadTriangleShape(tsParticles) {
|
|
7423
|
-
tsParticles.addShape("triangle", new TriangleDrawer);
|
|
7775
|
+
async function loadTriangleShape(tsParticles) {
|
|
7776
|
+
await tsParticles.addShape("triangle", new TriangleDrawer);
|
|
7424
7777
|
}
|
|
7425
|
-
function loadPolygonShape(tsParticles) {
|
|
7426
|
-
loadGenericPolygonShape(tsParticles);
|
|
7427
|
-
loadTriangleShape(tsParticles);
|
|
7778
|
+
async function loadPolygonShape(tsParticles) {
|
|
7779
|
+
await loadGenericPolygonShape(tsParticles);
|
|
7780
|
+
await loadTriangleShape(tsParticles);
|
|
7428
7781
|
}
|
|
7429
7782
|
var ProcessBubbleType;
|
|
7430
7783
|
(function(ProcessBubbleType) {
|
|
@@ -7664,8 +8017,8 @@
|
|
|
7664
8017
|
}
|
|
7665
8018
|
}
|
|
7666
8019
|
}
|
|
7667
|
-
function loadExternalBubbleInteraction(tsParticles) {
|
|
7668
|
-
tsParticles.addInteractor("externalBubble", (container => new Bubbler(container)));
|
|
8020
|
+
async function loadExternalBubbleInteraction(tsParticles) {
|
|
8021
|
+
await tsParticles.addInteractor("externalBubble", (container => new Bubbler(container)));
|
|
7669
8022
|
}
|
|
7670
8023
|
class Attractor extends ExternalInteractorBase {
|
|
7671
8024
|
constructor(container) {
|
|
@@ -7702,7 +8055,7 @@
|
|
|
7702
8055
|
const attractOptions = container.actualOptions.interactivity.modes.attract;
|
|
7703
8056
|
const query = container.particles.quadTree.query(area);
|
|
7704
8057
|
for (const particle of query) {
|
|
7705
|
-
const {dx, dy, distance} = getDistances(particle.position, position);
|
|
8058
|
+
const {dx: dx, dy: dy, distance: distance} = getDistances(particle.position, position);
|
|
7706
8059
|
const velocity = attractOptions.speed * attractOptions.factor;
|
|
7707
8060
|
const attractFactor = clamp(calcEasing(1 - distance / attractRadius, attractOptions.easing) * velocity, 0, attractOptions.maxSpeed);
|
|
7708
8061
|
const normVec = Vector.create(distance === 0 ? velocity : dx / distance * attractFactor, distance === 0 ? velocity : dy / distance * attractFactor);
|
|
@@ -7733,8 +8086,8 @@
|
|
|
7733
8086
|
return;
|
|
7734
8087
|
}
|
|
7735
8088
|
}
|
|
7736
|
-
function loadExternalAttractInteraction(tsParticles) {
|
|
7737
|
-
tsParticles.addInteractor("externalAttract", (container => new Attractor(container)));
|
|
8089
|
+
async function loadExternalAttractInteraction(tsParticles) {
|
|
8090
|
+
await tsParticles.addInteractor("externalAttract", (container => new Attractor(container)));
|
|
7738
8091
|
}
|
|
7739
8092
|
class Grabber extends ExternalInteractorBase {
|
|
7740
8093
|
constructor(container) {
|
|
@@ -7776,8 +8129,8 @@
|
|
|
7776
8129
|
}
|
|
7777
8130
|
}
|
|
7778
8131
|
}
|
|
7779
|
-
function loadExternalGrabInteraction(tsParticles) {
|
|
7780
|
-
tsParticles.addInteractor("externalGrab", (container => new Grabber(container)));
|
|
8132
|
+
async function loadExternalGrabInteraction(tsParticles) {
|
|
8133
|
+
await tsParticles.addInteractor("externalGrab", (container => new Grabber(container)));
|
|
7781
8134
|
}
|
|
7782
8135
|
class StarDrawer {
|
|
7783
8136
|
getSidesCount(particle) {
|
|
@@ -7799,8 +8152,8 @@
|
|
|
7799
8152
|
}
|
|
7800
8153
|
}
|
|
7801
8154
|
}
|
|
7802
|
-
function loadStarShape(tsParticles) {
|
|
7803
|
-
tsParticles.addShape("star", new StarDrawer);
|
|
8155
|
+
async function loadStarShape(tsParticles) {
|
|
8156
|
+
await tsParticles.addShape("star", new StarDrawer);
|
|
7804
8157
|
}
|
|
7805
8158
|
class ParticlesInteractorBase {
|
|
7806
8159
|
constructor(container) {
|
|
@@ -7819,7 +8172,7 @@
|
|
|
7819
8172
|
if (p1 === p2 || !p2.options.move.attract.enable || p2.destroyed || p2.spawning) {
|
|
7820
8173
|
continue;
|
|
7821
8174
|
}
|
|
7822
|
-
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;
|
|
8175
|
+
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;
|
|
7823
8176
|
p1.velocity.x -= ax * p1Factor;
|
|
7824
8177
|
p1.velocity.y -= ay * p1Factor;
|
|
7825
8178
|
p2.velocity.x += ax * p2Factor;
|
|
@@ -7831,8 +8184,8 @@
|
|
|
7831
8184
|
}
|
|
7832
8185
|
reset() {}
|
|
7833
8186
|
}
|
|
7834
|
-
function loadParticlesAttractInteraction(tsParticles) {
|
|
7835
|
-
tsParticles.addInteractor("particlesAttract", (container => new Attractor_Attractor(container)));
|
|
8187
|
+
async function loadParticlesAttractInteraction(tsParticles) {
|
|
8188
|
+
await tsParticles.addInteractor("particlesAttract", (container => new Attractor_Attractor(container)));
|
|
7836
8189
|
}
|
|
7837
8190
|
const fixFactor = Math.sqrt(2);
|
|
7838
8191
|
class SquareDrawer {
|
|
@@ -7843,10 +8196,10 @@
|
|
|
7843
8196
|
context.rect(-radius / fixFactor, -radius / fixFactor, radius * 2 / fixFactor, radius * 2 / fixFactor);
|
|
7844
8197
|
}
|
|
7845
8198
|
}
|
|
7846
|
-
function loadSquareShape(tsParticles) {
|
|
8199
|
+
async function loadSquareShape(tsParticles) {
|
|
7847
8200
|
const drawer = new SquareDrawer;
|
|
7848
|
-
tsParticles.addShape("edge", drawer);
|
|
7849
|
-
tsParticles.addShape("square", drawer);
|
|
8201
|
+
await tsParticles.addShape("edge", drawer);
|
|
8202
|
+
await tsParticles.addShape("square", drawer);
|
|
7850
8203
|
}
|
|
7851
8204
|
function updateColorValue(delta, value, valueAnimation, max, decrease) {
|
|
7852
8205
|
var _a;
|
|
@@ -7918,8 +8271,8 @@
|
|
|
7918
8271
|
updateStrokeColor(particle, delta);
|
|
7919
8272
|
}
|
|
7920
8273
|
}
|
|
7921
|
-
function loadStrokeColorUpdater(tsParticles) {
|
|
7922
|
-
tsParticles.addParticleUpdater("strokeColor", (container => new StrokeColorUpdater(container)));
|
|
8274
|
+
async function loadStrokeColorUpdater(tsParticles) {
|
|
8275
|
+
await tsParticles.addParticleUpdater("strokeColor", (container => new StrokeColorUpdater(container)));
|
|
7923
8276
|
}
|
|
7924
8277
|
function ColorUpdater_updateColorValue(delta, value, valueAnimation, max, decrease) {
|
|
7925
8278
|
var _a;
|
|
@@ -7978,8 +8331,8 @@
|
|
|
7978
8331
|
updateColor(particle, delta);
|
|
7979
8332
|
}
|
|
7980
8333
|
}
|
|
7981
|
-
function loadColorUpdater(tsParticles) {
|
|
7982
|
-
tsParticles.addParticleUpdater("color", (container => new ColorUpdater(container)));
|
|
8334
|
+
async function loadColorUpdater(tsParticles) {
|
|
8335
|
+
await tsParticles.addParticleUpdater("color", (container => new ColorUpdater(container)));
|
|
7983
8336
|
}
|
|
7984
8337
|
function bounce(p1, p2) {
|
|
7985
8338
|
circleBounce(circleBounceDataFromParticle(p1), circleBounceDataFromParticle(p2));
|
|
@@ -8078,8 +8431,8 @@
|
|
|
8078
8431
|
}
|
|
8079
8432
|
}
|
|
8080
8433
|
}
|
|
8081
|
-
function loadParticlesCollisionsInteraction(tsParticles) {
|
|
8082
|
-
tsParticles.addInteractor("particlesCollisions", (container => new Collider(container)));
|
|
8434
|
+
async function loadParticlesCollisionsInteraction(tsParticles) {
|
|
8435
|
+
await tsParticles.addInteractor("particlesCollisions", (container => new Collider(container)));
|
|
8083
8436
|
}
|
|
8084
8437
|
function updateAngle(particle, delta) {
|
|
8085
8438
|
var _a;
|
|
@@ -8156,8 +8509,8 @@
|
|
|
8156
8509
|
updateAngle(particle, delta);
|
|
8157
8510
|
}
|
|
8158
8511
|
}
|
|
8159
|
-
function loadAngleUpdater(tsParticles) {
|
|
8160
|
-
tsParticles.addParticleUpdater("angle", (container => new AngleUpdater(container)));
|
|
8512
|
+
async function loadAngleUpdater(tsParticles) {
|
|
8513
|
+
await tsParticles.addParticleUpdater("angle", (container => new AngleUpdater(container)));
|
|
8161
8514
|
}
|
|
8162
8515
|
function bounceHorizontal(data) {
|
|
8163
8516
|
if (!(data.outMode === OutMode.bounce || data.outMode === OutMode.bounceHorizontal || data.outMode === "bounceHorizontal" || data.outMode === OutMode.split)) {
|
|
@@ -8312,22 +8665,22 @@
|
|
|
8312
8665
|
}
|
|
8313
8666
|
const pos = particle.getPosition(), offset = particle.offset, size = particle.getRadius(), bounds = calculateBounds(pos, size), canvasSize = container.canvas.size;
|
|
8314
8667
|
bounceHorizontal({
|
|
8315
|
-
particle,
|
|
8316
|
-
outMode,
|
|
8317
|
-
direction,
|
|
8318
|
-
bounds,
|
|
8319
|
-
canvasSize,
|
|
8320
|
-
offset,
|
|
8321
|
-
size
|
|
8668
|
+
particle: particle,
|
|
8669
|
+
outMode: outMode,
|
|
8670
|
+
direction: direction,
|
|
8671
|
+
bounds: bounds,
|
|
8672
|
+
canvasSize: canvasSize,
|
|
8673
|
+
offset: offset,
|
|
8674
|
+
size: size
|
|
8322
8675
|
});
|
|
8323
8676
|
bounceVertical({
|
|
8324
|
-
particle,
|
|
8325
|
-
outMode,
|
|
8326
|
-
direction,
|
|
8327
|
-
bounds,
|
|
8328
|
-
canvasSize,
|
|
8329
|
-
offset,
|
|
8330
|
-
size
|
|
8677
|
+
particle: particle,
|
|
8678
|
+
outMode: outMode,
|
|
8679
|
+
direction: direction,
|
|
8680
|
+
bounds: bounds,
|
|
8681
|
+
canvasSize: canvasSize,
|
|
8682
|
+
offset: offset,
|
|
8683
|
+
size: size
|
|
8331
8684
|
});
|
|
8332
8685
|
}
|
|
8333
8686
|
none(particle, direction) {
|
|
@@ -8352,8 +8705,8 @@
|
|
|
8352
8705
|
}
|
|
8353
8706
|
}
|
|
8354
8707
|
}
|
|
8355
|
-
function loadOutModesUpdater(tsParticles) {
|
|
8356
|
-
tsParticles.addParticleUpdater("outModes", (container => new OutOfCanvasUpdater(container)));
|
|
8708
|
+
async function loadOutModesUpdater(tsParticles) {
|
|
8709
|
+
await tsParticles.addParticleUpdater("outModes", (container => new OutOfCanvasUpdater(container)));
|
|
8357
8710
|
}
|
|
8358
8711
|
class Repulser extends ExternalInteractorBase {
|
|
8359
8712
|
constructor(container) {
|
|
@@ -8403,7 +8756,7 @@
|
|
|
8403
8756
|
var _a;
|
|
8404
8757
|
const container = this.container, query = container.particles.quadTree.query(area), repulseOptions = container.actualOptions.interactivity.modes.repulse;
|
|
8405
8758
|
for (const particle of query) {
|
|
8406
|
-
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);
|
|
8759
|
+
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);
|
|
8407
8760
|
particle.position.addTo(normVec);
|
|
8408
8761
|
}
|
|
8409
8762
|
}
|
|
@@ -8425,7 +8778,7 @@
|
|
|
8425
8778
|
}
|
|
8426
8779
|
const range = new Circle(mouseClickPos.x, mouseClickPos.y, repulseRadius), query = container.particles.quadTree.query(range);
|
|
8427
8780
|
for (const particle of query) {
|
|
8428
|
-
const {dx, dy, distance} = getDistances(mouseClickPos, particle.position), d = distance ** 2, velocity = container.actualOptions.interactivity.modes.repulse.speed, force = -repulseRadius * velocity / d;
|
|
8781
|
+
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;
|
|
8429
8782
|
if (d <= repulseRadius) {
|
|
8430
8783
|
container.repulse.particles.push(particle);
|
|
8431
8784
|
const vect = Vector.create(dx, dy);
|
|
@@ -8441,8 +8794,8 @@
|
|
|
8441
8794
|
}
|
|
8442
8795
|
}
|
|
8443
8796
|
}
|
|
8444
|
-
function loadExternalRepulseInteraction(tsParticles) {
|
|
8445
|
-
tsParticles.addInteractor("externalRepulse", (container => new Repulser(container)));
|
|
8797
|
+
async function loadExternalRepulseInteraction(tsParticles) {
|
|
8798
|
+
await tsParticles.addInteractor("externalRepulse", (container => new Repulser(container)));
|
|
8446
8799
|
}
|
|
8447
8800
|
class LineDrawer {
|
|
8448
8801
|
getSidesCount() {
|
|
@@ -8453,8 +8806,8 @@
|
|
|
8453
8806
|
context.lineTo(radius / 2, 0);
|
|
8454
8807
|
}
|
|
8455
8808
|
}
|
|
8456
|
-
function loadLineShape(tsParticles) {
|
|
8457
|
-
tsParticles.addShape("line", new LineDrawer);
|
|
8809
|
+
async function loadLineShape(tsParticles) {
|
|
8810
|
+
await tsParticles.addShape("line", new LineDrawer);
|
|
8458
8811
|
}
|
|
8459
8812
|
class Bouncer extends ExternalInteractorBase {
|
|
8460
8813
|
constructor(container) {
|
|
@@ -8499,8 +8852,8 @@
|
|
|
8499
8852
|
for (const particle of query) {
|
|
8500
8853
|
if (area instanceof Circle) {
|
|
8501
8854
|
circleBounce(circleBounceDataFromParticle(particle), {
|
|
8502
|
-
position,
|
|
8503
|
-
radius,
|
|
8855
|
+
position: position,
|
|
8856
|
+
radius: radius,
|
|
8504
8857
|
mass: radius ** 2 * Math.PI / 2,
|
|
8505
8858
|
velocity: Vector.origin,
|
|
8506
8859
|
factor: Vector.origin
|
|
@@ -8511,8 +8864,8 @@
|
|
|
8511
8864
|
}
|
|
8512
8865
|
}
|
|
8513
8866
|
}
|
|
8514
|
-
function loadExternalBounceInteraction(tsParticles) {
|
|
8515
|
-
tsParticles.addInteractor("externalBounce", (container => new Bouncer(container)));
|
|
8867
|
+
async function loadExternalBounceInteraction(tsParticles) {
|
|
8868
|
+
await tsParticles.addInteractor("externalBounce", (container => new Bouncer(container)));
|
|
8516
8869
|
}
|
|
8517
8870
|
const validTypes = [ "text", "character", "char" ];
|
|
8518
8871
|
class TextDrawer {
|
|
@@ -8571,10 +8924,10 @@
|
|
|
8571
8924
|
context.globalAlpha = 1;
|
|
8572
8925
|
}
|
|
8573
8926
|
}
|
|
8574
|
-
function loadTextShape(tsParticles) {
|
|
8927
|
+
async function loadTextShape(tsParticles) {
|
|
8575
8928
|
const drawer = new TextDrawer;
|
|
8576
8929
|
for (const type of validTypes) {
|
|
8577
|
-
tsParticles.addShape(type, drawer);
|
|
8930
|
+
await tsParticles.addShape(type, drawer);
|
|
8578
8931
|
}
|
|
8579
8932
|
}
|
|
8580
8933
|
function getLinkDistance(pos1, pos2, optDistance, canvasSize, warp) {
|
|
@@ -8789,16 +9142,16 @@
|
|
|
8789
9142
|
}
|
|
8790
9143
|
loadOptions() {}
|
|
8791
9144
|
}
|
|
8792
|
-
function loadPlugin(tsParticles) {
|
|
9145
|
+
async function loadPlugin(tsParticles) {
|
|
8793
9146
|
const plugin = new Plugin;
|
|
8794
|
-
tsParticles.addPlugin(plugin);
|
|
9147
|
+
await tsParticles.addPlugin(plugin);
|
|
8795
9148
|
}
|
|
8796
|
-
function loadInteraction(tsParticles) {
|
|
8797
|
-
tsParticles.addInteractor("particlesLinks", (container => new Linker(container)));
|
|
9149
|
+
async function loadInteraction(tsParticles) {
|
|
9150
|
+
await tsParticles.addInteractor("particlesLinks", (container => new Linker(container)));
|
|
8798
9151
|
}
|
|
8799
|
-
function loadParticlesLinksInteraction(tsParticles) {
|
|
8800
|
-
loadInteraction(tsParticles);
|
|
8801
|
-
loadPlugin(tsParticles);
|
|
9152
|
+
async function loadParticlesLinksInteraction(tsParticles) {
|
|
9153
|
+
await loadInteraction(tsParticles);
|
|
9154
|
+
await loadPlugin(tsParticles);
|
|
8802
9155
|
}
|
|
8803
9156
|
function SizeUpdater_checkDestroy(particle, value, minValue, maxValue) {
|
|
8804
9157
|
switch (particle.options.size.animation.destroy) {
|
|
@@ -8865,33 +9218,33 @@
|
|
|
8865
9218
|
updateSize(particle, delta);
|
|
8866
9219
|
}
|
|
8867
9220
|
}
|
|
8868
|
-
function loadSizeUpdater(tsParticles) {
|
|
8869
|
-
tsParticles.addParticleUpdater("size", (() => new SizeUpdater));
|
|
8870
|
-
}
|
|
8871
|
-
function loadSlim(tsParticles) {
|
|
8872
|
-
loadExternalAttractInteraction(tsParticles);
|
|
8873
|
-
loadExternalBounceInteraction(tsParticles);
|
|
8874
|
-
loadExternalBubbleInteraction(tsParticles);
|
|
8875
|
-
loadExternalConnectInteraction(tsParticles);
|
|
8876
|
-
loadExternalGrabInteraction(tsParticles);
|
|
8877
|
-
loadExternalRepulseInteraction(tsParticles);
|
|
8878
|
-
loadParticlesAttractInteraction(tsParticles);
|
|
8879
|
-
loadParticlesCollisionsInteraction(tsParticles);
|
|
8880
|
-
loadParticlesLinksInteraction(tsParticles);
|
|
8881
|
-
loadCircleShape(tsParticles);
|
|
8882
|
-
loadImageShape(tsParticles);
|
|
8883
|
-
loadLineShape(tsParticles);
|
|
8884
|
-
loadPolygonShape(tsParticles);
|
|
8885
|
-
loadSquareShape(tsParticles);
|
|
8886
|
-
loadStarShape(tsParticles);
|
|
8887
|
-
loadTextShape(tsParticles);
|
|
8888
|
-
loadLifeUpdater(tsParticles);
|
|
8889
|
-
loadOpacityUpdater(tsParticles);
|
|
8890
|
-
loadSizeUpdater(tsParticles);
|
|
8891
|
-
loadAngleUpdater(tsParticles);
|
|
8892
|
-
loadColorUpdater(tsParticles);
|
|
8893
|
-
loadStrokeColorUpdater(tsParticles);
|
|
8894
|
-
loadOutModesUpdater(tsParticles);
|
|
9221
|
+
async function loadSizeUpdater(tsParticles) {
|
|
9222
|
+
await tsParticles.addParticleUpdater("size", (() => new SizeUpdater));
|
|
9223
|
+
}
|
|
9224
|
+
async function loadSlim(tsParticles) {
|
|
9225
|
+
await loadExternalAttractInteraction(tsParticles);
|
|
9226
|
+
await loadExternalBounceInteraction(tsParticles);
|
|
9227
|
+
await loadExternalBubbleInteraction(tsParticles);
|
|
9228
|
+
await loadExternalConnectInteraction(tsParticles);
|
|
9229
|
+
await loadExternalGrabInteraction(tsParticles);
|
|
9230
|
+
await loadExternalRepulseInteraction(tsParticles);
|
|
9231
|
+
await loadParticlesAttractInteraction(tsParticles);
|
|
9232
|
+
await loadParticlesCollisionsInteraction(tsParticles);
|
|
9233
|
+
await loadParticlesLinksInteraction(tsParticles);
|
|
9234
|
+
await loadCircleShape(tsParticles);
|
|
9235
|
+
await loadImageShape(tsParticles);
|
|
9236
|
+
await loadLineShape(tsParticles);
|
|
9237
|
+
await loadPolygonShape(tsParticles);
|
|
9238
|
+
await loadSquareShape(tsParticles);
|
|
9239
|
+
await loadStarShape(tsParticles);
|
|
9240
|
+
await loadTextShape(tsParticles);
|
|
9241
|
+
await loadLifeUpdater(tsParticles);
|
|
9242
|
+
await loadOpacityUpdater(tsParticles);
|
|
9243
|
+
await loadSizeUpdater(tsParticles);
|
|
9244
|
+
await loadAngleUpdater(tsParticles);
|
|
9245
|
+
await loadColorUpdater(tsParticles);
|
|
9246
|
+
await loadStrokeColorUpdater(tsParticles);
|
|
9247
|
+
await loadOutModesUpdater(tsParticles);
|
|
8895
9248
|
}
|
|
8896
9249
|
class TrailMaker extends ExternalInteractorBase {
|
|
8897
9250
|
constructor(container) {
|
|
@@ -8935,8 +9288,8 @@
|
|
|
8935
9288
|
}
|
|
8936
9289
|
reset() {}
|
|
8937
9290
|
}
|
|
8938
|
-
function loadExternalTrailInteraction(tsParticles) {
|
|
8939
|
-
tsParticles.addInteractor("externalTrail", (container => new TrailMaker(container)));
|
|
9291
|
+
async function loadExternalTrailInteraction(tsParticles) {
|
|
9292
|
+
await tsParticles.addInteractor("externalTrail", (container => new TrailMaker(container)));
|
|
8940
9293
|
}
|
|
8941
9294
|
function updateTilt(particle, delta) {
|
|
8942
9295
|
var _a;
|
|
@@ -9014,8 +9367,8 @@
|
|
|
9014
9367
|
updateTilt(particle, delta);
|
|
9015
9368
|
}
|
|
9016
9369
|
}
|
|
9017
|
-
function loadTiltUpdater(tsParticles) {
|
|
9018
|
-
tsParticles.addParticleUpdater("tilt", (container => new TiltUpdater(container)));
|
|
9370
|
+
async function loadTiltUpdater(tsParticles) {
|
|
9371
|
+
await tsParticles.addParticleUpdater("tilt", (container => new TiltUpdater(container)));
|
|
9019
9372
|
}
|
|
9020
9373
|
function updateWobble(particle, delta) {
|
|
9021
9374
|
var _a;
|
|
@@ -9062,12 +9415,12 @@
|
|
|
9062
9415
|
updateWobble(particle, delta);
|
|
9063
9416
|
}
|
|
9064
9417
|
}
|
|
9065
|
-
function loadWobbleUpdater(tsParticles) {
|
|
9066
|
-
tsParticles.addParticleUpdater("wobble", (container => new WobbleUpdater(container)));
|
|
9418
|
+
async function loadWobbleUpdater(tsParticles) {
|
|
9419
|
+
await tsParticles.addParticleUpdater("wobble", (container => new WobbleUpdater(container)));
|
|
9067
9420
|
}
|
|
9068
9421
|
class AbsorberInstance {
|
|
9069
9422
|
constructor(absorbers, container, options, position) {
|
|
9070
|
-
var _a, _b, _c;
|
|
9423
|
+
var _a, _b, _c, _d, _e;
|
|
9071
9424
|
this.absorbers = absorbers;
|
|
9072
9425
|
this.container = container;
|
|
9073
9426
|
this.initialPosition = position ? Vector.create(position.x, position.y) : undefined;
|
|
@@ -9078,16 +9431,22 @@
|
|
|
9078
9431
|
this.size = getRangeValue(options.size.value) * container.retina.pixelRatio;
|
|
9079
9432
|
this.mass = this.size * options.size.density * container.retina.reduceFactor;
|
|
9080
9433
|
const limit = options.size.limit;
|
|
9081
|
-
this.limit = limit
|
|
9434
|
+
this.limit = typeof limit === "number" ? {
|
|
9435
|
+
radius: limit * container.retina.pixelRatio * container.retina.reduceFactor,
|
|
9436
|
+
mass: 0
|
|
9437
|
+
} : {
|
|
9438
|
+
radius: ((_a = limit === null || limit === void 0 ? void 0 : limit.radius) !== null && _a !== void 0 ? _a : 0) * container.retina.pixelRatio * container.retina.reduceFactor,
|
|
9439
|
+
mass: (_b = limit === null || limit === void 0 ? void 0 : limit.mass) !== null && _b !== void 0 ? _b : 0
|
|
9440
|
+
};
|
|
9082
9441
|
const color = typeof options.color === "string" ? {
|
|
9083
9442
|
value: options.color
|
|
9084
9443
|
} : options.color;
|
|
9085
|
-
this.color = (
|
|
9444
|
+
this.color = (_c = colorToRgb(color)) !== null && _c !== void 0 ? _c : {
|
|
9086
9445
|
b: 0,
|
|
9087
9446
|
g: 0,
|
|
9088
9447
|
r: 0
|
|
9089
9448
|
};
|
|
9090
|
-
this.position = (
|
|
9449
|
+
this.position = (_e = (_d = this.initialPosition) === null || _d === void 0 ? void 0 : _d.copy()) !== null && _e !== void 0 ? _e : this.calcPosition();
|
|
9091
9450
|
}
|
|
9092
9451
|
attract(particle) {
|
|
9093
9452
|
const container = this.container;
|
|
@@ -9108,7 +9467,7 @@
|
|
|
9108
9467
|
}
|
|
9109
9468
|
}
|
|
9110
9469
|
const pos = particle.getPosition();
|
|
9111
|
-
const {dx, dy, distance} = getDistances(this.position, pos);
|
|
9470
|
+
const {dx: dx, dy: dy, distance: distance} = getDistances(this.position, pos);
|
|
9112
9471
|
const v = Vector.create(dx, dy);
|
|
9113
9472
|
v.length = this.mass / Math.pow(distance, 2) * container.retina.reduceFactor;
|
|
9114
9473
|
if (distance < this.size + particle.getRadius()) {
|
|
@@ -9126,10 +9485,12 @@
|
|
|
9126
9485
|
}
|
|
9127
9486
|
this.updateParticlePosition(particle, v);
|
|
9128
9487
|
}
|
|
9129
|
-
if (this.limit
|
|
9488
|
+
if (this.limit.radius <= 0 || this.size < this.limit.radius) {
|
|
9130
9489
|
this.size += sizeFactor;
|
|
9131
9490
|
}
|
|
9132
|
-
this.mass
|
|
9491
|
+
if (this.limit.mass <= 0 || this.mass < this.limit.mass) {
|
|
9492
|
+
this.mass += sizeFactor * this.options.size.density * container.retina.reduceFactor;
|
|
9493
|
+
}
|
|
9133
9494
|
} else {
|
|
9134
9495
|
this.updateParticlePosition(particle, v);
|
|
9135
9496
|
}
|
|
@@ -9160,9 +9521,10 @@
|
|
|
9160
9521
|
const container = this.container;
|
|
9161
9522
|
const canvasSize = container.canvas.size;
|
|
9162
9523
|
if (particle.needsNewPosition) {
|
|
9163
|
-
|
|
9164
|
-
particle.position.
|
|
9165
|
-
particle.
|
|
9524
|
+
particle.position.x = Math.floor(Math.random() * canvasSize.width);
|
|
9525
|
+
particle.position.y = Math.floor(Math.random() * canvasSize.height);
|
|
9526
|
+
particle.velocity.setTo(particle.initialVelocity);
|
|
9527
|
+
particle.absorberOrbit = undefined;
|
|
9166
9528
|
particle.needsNewPosition = false;
|
|
9167
9529
|
}
|
|
9168
9530
|
if (this.options.orbits) {
|
|
@@ -9199,12 +9561,30 @@
|
|
|
9199
9561
|
}
|
|
9200
9562
|
}
|
|
9201
9563
|
}
|
|
9564
|
+
class AbsorberSizeLimit {
|
|
9565
|
+
constructor() {
|
|
9566
|
+
this.radius = 0;
|
|
9567
|
+
this.mass = 0;
|
|
9568
|
+
}
|
|
9569
|
+
load(data) {
|
|
9570
|
+
if (!data) {
|
|
9571
|
+
return;
|
|
9572
|
+
}
|
|
9573
|
+
if (data.mass !== undefined) {
|
|
9574
|
+
this.mass = data.mass;
|
|
9575
|
+
}
|
|
9576
|
+
if (data.radius !== undefined) {
|
|
9577
|
+
this.radius = data.radius;
|
|
9578
|
+
}
|
|
9579
|
+
}
|
|
9580
|
+
}
|
|
9202
9581
|
class AbsorberSize extends ValueWithRandom {
|
|
9203
9582
|
constructor() {
|
|
9204
9583
|
super();
|
|
9205
9584
|
this.density = 5;
|
|
9206
9585
|
this.random.minimumValue = 1;
|
|
9207
9586
|
this.value = 50;
|
|
9587
|
+
this.limit = new AbsorberSizeLimit;
|
|
9208
9588
|
}
|
|
9209
9589
|
load(data) {
|
|
9210
9590
|
if (!data) {
|
|
@@ -9214,11 +9594,10 @@
|
|
|
9214
9594
|
if (data.density !== undefined) {
|
|
9215
9595
|
this.density = data.density;
|
|
9216
9596
|
}
|
|
9217
|
-
if (data.limit
|
|
9218
|
-
this.limit = data.limit;
|
|
9219
|
-
}
|
|
9220
|
-
|
|
9221
|
-
this.limit = data.limit;
|
|
9597
|
+
if (typeof data.limit === "number") {
|
|
9598
|
+
this.limit.radius = data.limit;
|
|
9599
|
+
} else {
|
|
9600
|
+
this.limit.load(data.limit);
|
|
9222
9601
|
}
|
|
9223
9602
|
}
|
|
9224
9603
|
}
|
|
@@ -9436,9 +9815,9 @@
|
|
|
9436
9815
|
}
|
|
9437
9816
|
}
|
|
9438
9817
|
}
|
|
9439
|
-
function loadAbsorbersPlugin(tsParticles) {
|
|
9818
|
+
async function loadAbsorbersPlugin(tsParticles) {
|
|
9440
9819
|
const plugin = new plugin_Plugin;
|
|
9441
|
-
tsParticles.addPlugin(plugin);
|
|
9820
|
+
await tsParticles.addPlugin(plugin);
|
|
9442
9821
|
}
|
|
9443
9822
|
class EmitterSize {
|
|
9444
9823
|
constructor() {
|
|
@@ -10030,9 +10409,9 @@
|
|
|
10030
10409
|
}
|
|
10031
10410
|
}
|
|
10032
10411
|
}
|
|
10033
|
-
function loadEmittersPlugin(tsParticles) {
|
|
10412
|
+
async function loadEmittersPlugin(tsParticles) {
|
|
10034
10413
|
const plugin = new EmittersPlugin;
|
|
10035
|
-
tsParticles.addPlugin(plugin);
|
|
10414
|
+
await tsParticles.addPlugin(plugin);
|
|
10036
10415
|
if (!tsParticles.addEmitterShape) {
|
|
10037
10416
|
tsParticles.addEmitterShape = (name, shape) => {
|
|
10038
10417
|
ShapeManager.addShape(name, shape);
|
|
@@ -10316,7 +10695,7 @@
|
|
|
10316
10695
|
return res;
|
|
10317
10696
|
}
|
|
10318
10697
|
function calcClosestPtOnSegment(s1, s2, pos) {
|
|
10319
|
-
const {dx, dy} = getDistances(pos, s1);
|
|
10698
|
+
const {dx: dx, dy: dy} = getDistances(pos, s1);
|
|
10320
10699
|
const {dx: dxx, dy: dyy} = getDistances(s2, s1);
|
|
10321
10700
|
const t = (dx * dxx + dy * dyy) / (dxx ** 2 + dyy ** 2);
|
|
10322
10701
|
let x = s1.x + dxx * t;
|
|
@@ -10329,13 +10708,13 @@
|
|
|
10329
10708
|
y = s2.y;
|
|
10330
10709
|
}
|
|
10331
10710
|
return {
|
|
10332
|
-
x,
|
|
10333
|
-
y,
|
|
10711
|
+
x: x,
|
|
10712
|
+
y: y,
|
|
10334
10713
|
isOnSegment: t >= 0 && t <= 1
|
|
10335
10714
|
};
|
|
10336
10715
|
}
|
|
10337
10716
|
function segmentBounce(start, stop, velocity) {
|
|
10338
|
-
const {dx, dy} = getDistances(start, stop);
|
|
10717
|
+
const {dx: dx, dy: dy} = getDistances(start, stop);
|
|
10339
10718
|
const wallAngle = Math.atan2(dy, dx);
|
|
10340
10719
|
const wallNormalX = Math.sin(wallAngle);
|
|
10341
10720
|
const wallNormalY = -Math.cos(wallAngle);
|
|
@@ -10733,7 +11112,7 @@
|
|
|
10733
11112
|
await __webpack_require__.e(917).then(__webpack_require__.t.bind(__webpack_require__, 167, 23));
|
|
10734
11113
|
}
|
|
10735
11114
|
const plugin = new PolygonMask_plugin_Plugin;
|
|
10736
|
-
tsParticles.addPlugin(plugin);
|
|
11115
|
+
await tsParticles.addPlugin(plugin);
|
|
10737
11116
|
}
|
|
10738
11117
|
function updateRoll(particle, delta) {
|
|
10739
11118
|
const roll = particle.options.roll;
|
|
@@ -10792,23 +11171,24 @@
|
|
|
10792
11171
|
updateRoll(particle, delta);
|
|
10793
11172
|
}
|
|
10794
11173
|
}
|
|
10795
|
-
function loadRollUpdater(tsParticles) {
|
|
10796
|
-
tsParticles.addParticleUpdater("roll", (() => new RollUpdater));
|
|
11174
|
+
async function loadRollUpdater(tsParticles) {
|
|
11175
|
+
await tsParticles.addParticleUpdater("roll", (() => new RollUpdater));
|
|
10797
11176
|
}
|
|
10798
|
-
function loadFull(tsParticles) {
|
|
10799
|
-
loadSlim(tsParticles);
|
|
10800
|
-
loadExternalTrailInteraction(tsParticles);
|
|
10801
|
-
loadRollUpdater(tsParticles);
|
|
10802
|
-
loadTiltUpdater(tsParticles);
|
|
10803
|
-
loadWobbleUpdater(tsParticles);
|
|
10804
|
-
loadAbsorbersPlugin(tsParticles);
|
|
10805
|
-
loadEmittersPlugin(tsParticles);
|
|
10806
|
-
loadPolygonMaskPlugin(tsParticles);
|
|
11177
|
+
async function loadFull(tsParticles) {
|
|
11178
|
+
await loadSlim(tsParticles);
|
|
11179
|
+
await loadExternalTrailInteraction(tsParticles);
|
|
11180
|
+
await loadRollUpdater(tsParticles);
|
|
11181
|
+
await loadTiltUpdater(tsParticles);
|
|
11182
|
+
await loadWobbleUpdater(tsParticles);
|
|
11183
|
+
await loadAbsorbersPlugin(tsParticles);
|
|
11184
|
+
await loadEmittersPlugin(tsParticles);
|
|
11185
|
+
await loadPolygonMaskPlugin(tsParticles);
|
|
10807
11186
|
}
|
|
10808
11187
|
const tsParticles = new Main;
|
|
10809
11188
|
tsParticles.init();
|
|
11189
|
+
const {particlesJS: particlesJS, pJSDom: pJSDom} = initPjs(tsParticles);
|
|
10810
11190
|
loadFull(tsParticles);
|
|
10811
|
-
|
|
11191
|
+
__webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
|
10812
11192
|
return __webpack_exports__;
|
|
10813
|
-
}
|
|
11193
|
+
}();
|
|
10814
11194
|
}));
|