tsparticles 1.36.0 → 1.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Core/Container.d.ts +2 -1
- package/Core/Container.js +14 -11
- 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/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/Utils.d.ts +1 -2
- package/browser/Core/Container.d.ts +2 -1
- package/browser/Core/Container.js +15 -12
- 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/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 +1 -1
- 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/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 +2 -1
- package/esm/Core/Container.js +14 -11
- 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/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/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 +155 -127
- package/tsparticles.min.js +2 -2
- package/tsparticles.slim.js +133 -105
- package/tsparticles.slim.min.js +2 -2
package/slim.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "./main";
|
|
2
|
-
export declare function loadSlim(tsParticles: Main): void
|
|
2
|
+
export declare function loadSlim(tsParticles: Main): Promise<void>;
|
package/slim.js
CHANGED
|
@@ -24,29 +24,29 @@ const Bounce_1 = require("./Interactions/External/Bounce");
|
|
|
24
24
|
const Text_1 = require("./Shapes/Text");
|
|
25
25
|
const Links_1 = require("./Interactions/Particles/Links");
|
|
26
26
|
const Size_1 = require("./Updaters/Size");
|
|
27
|
-
function loadSlim(tsParticles) {
|
|
28
|
-
(0, Attract_1.loadExternalAttractInteraction)(tsParticles);
|
|
29
|
-
(0, Bounce_1.loadExternalBounceInteraction)(tsParticles);
|
|
30
|
-
(0, Bubble_1.loadExternalBubbleInteraction)(tsParticles);
|
|
31
|
-
(0, Connect_1.loadExternalConnectInteraction)(tsParticles);
|
|
32
|
-
(0, Grab_1.loadExternalGrabInteraction)(tsParticles);
|
|
33
|
-
(0, Repulse_1.loadExternalRepulseInteraction)(tsParticles);
|
|
34
|
-
(0, Attract_2.loadParticlesAttractInteraction)(tsParticles);
|
|
35
|
-
(0, Collisions_1.loadParticlesCollisionsInteraction)(tsParticles);
|
|
36
|
-
(0, Links_1.loadParticlesLinksInteraction)(tsParticles);
|
|
37
|
-
(0, Circle_1.loadCircleShape)(tsParticles);
|
|
38
|
-
(0, Image_1.loadImageShape)(tsParticles);
|
|
39
|
-
(0, Line_1.loadLineShape)(tsParticles);
|
|
40
|
-
(0, Polygon_1.loadPolygonShape)(tsParticles);
|
|
41
|
-
(0, Square_1.loadSquareShape)(tsParticles);
|
|
42
|
-
(0, Star_1.loadStarShape)(tsParticles);
|
|
43
|
-
(0, Text_1.loadTextShape)(tsParticles);
|
|
44
|
-
(0, Life_1.loadLifeUpdater)(tsParticles);
|
|
45
|
-
(0, Opacity_1.loadOpacityUpdater)(tsParticles);
|
|
46
|
-
(0, Size_1.loadSizeUpdater)(tsParticles);
|
|
47
|
-
(0, Angle_1.loadAngleUpdater)(tsParticles);
|
|
48
|
-
(0, Color_1.loadColorUpdater)(tsParticles);
|
|
49
|
-
(0, StrokeColor_1.loadStrokeColorUpdater)(tsParticles);
|
|
50
|
-
(0, OutModes_1.loadOutModesUpdater)(tsParticles);
|
|
27
|
+
async function loadSlim(tsParticles) {
|
|
28
|
+
await (0, Attract_1.loadExternalAttractInteraction)(tsParticles);
|
|
29
|
+
await (0, Bounce_1.loadExternalBounceInteraction)(tsParticles);
|
|
30
|
+
await (0, Bubble_1.loadExternalBubbleInteraction)(tsParticles);
|
|
31
|
+
await (0, Connect_1.loadExternalConnectInteraction)(tsParticles);
|
|
32
|
+
await (0, Grab_1.loadExternalGrabInteraction)(tsParticles);
|
|
33
|
+
await (0, Repulse_1.loadExternalRepulseInteraction)(tsParticles);
|
|
34
|
+
await (0, Attract_2.loadParticlesAttractInteraction)(tsParticles);
|
|
35
|
+
await (0, Collisions_1.loadParticlesCollisionsInteraction)(tsParticles);
|
|
36
|
+
await (0, Links_1.loadParticlesLinksInteraction)(tsParticles);
|
|
37
|
+
await (0, Circle_1.loadCircleShape)(tsParticles);
|
|
38
|
+
await (0, Image_1.loadImageShape)(tsParticles);
|
|
39
|
+
await (0, Line_1.loadLineShape)(tsParticles);
|
|
40
|
+
await (0, Polygon_1.loadPolygonShape)(tsParticles);
|
|
41
|
+
await (0, Square_1.loadSquareShape)(tsParticles);
|
|
42
|
+
await (0, Star_1.loadStarShape)(tsParticles);
|
|
43
|
+
await (0, Text_1.loadTextShape)(tsParticles);
|
|
44
|
+
await (0, Life_1.loadLifeUpdater)(tsParticles);
|
|
45
|
+
await (0, Opacity_1.loadOpacityUpdater)(tsParticles);
|
|
46
|
+
await (0, Size_1.loadSizeUpdater)(tsParticles);
|
|
47
|
+
await (0, Angle_1.loadAngleUpdater)(tsParticles);
|
|
48
|
+
await (0, Color_1.loadColorUpdater)(tsParticles);
|
|
49
|
+
await (0, StrokeColor_1.loadStrokeColorUpdater)(tsParticles);
|
|
50
|
+
await (0, OutModes_1.loadOutModesUpdater)(tsParticles);
|
|
51
51
|
}
|
|
52
52
|
exports.loadSlim = loadSlim;
|
package/tsparticles.js
CHANGED
|
@@ -248,6 +248,7 @@
|
|
|
248
248
|
ParticlesInteractorBase: () => ParticlesInteractorBase,
|
|
249
249
|
Point: () => Point,
|
|
250
250
|
Rectangle: () => Rectangle,
|
|
251
|
+
ResponsiveMode: () => ResponsiveMode,
|
|
251
252
|
RollMode: () => RollMode,
|
|
252
253
|
RotateDirection: () => RotateDirection,
|
|
253
254
|
ShapeType: () => ShapeType,
|
|
@@ -448,6 +449,11 @@
|
|
|
448
449
|
ThemeMode["dark"] = "dark";
|
|
449
450
|
ThemeMode["light"] = "light";
|
|
450
451
|
})(ThemeMode || (ThemeMode = {}));
|
|
452
|
+
var ResponsiveMode;
|
|
453
|
+
(function(ResponsiveMode) {
|
|
454
|
+
ResponsiveMode["screen"] = "screen";
|
|
455
|
+
ResponsiveMode["canvas"] = "canvas";
|
|
456
|
+
})(ResponsiveMode || (ResponsiveMode = {}));
|
|
451
457
|
var AnimationStatus;
|
|
452
458
|
(function(AnimationStatus) {
|
|
453
459
|
AnimationStatus[AnimationStatus["increasing"] = 0] = "increasing";
|
|
@@ -5863,7 +5869,7 @@
|
|
|
5863
5869
|
}
|
|
5864
5870
|
class Interactivity {
|
|
5865
5871
|
constructor() {
|
|
5866
|
-
this.detectsOn = InteractivityDetect.
|
|
5872
|
+
this.detectsOn = InteractivityDetect.window;
|
|
5867
5873
|
this.events = new Events;
|
|
5868
5874
|
this.modes = new Modes;
|
|
5869
5875
|
}
|
|
@@ -6014,8 +6020,8 @@
|
|
|
6014
6020
|
}
|
|
6015
6021
|
class FullScreen {
|
|
6016
6022
|
constructor() {
|
|
6017
|
-
this.enable =
|
|
6018
|
-
this.zIndex =
|
|
6023
|
+
this.enable = true;
|
|
6024
|
+
this.zIndex = 0;
|
|
6019
6025
|
}
|
|
6020
6026
|
load(data) {
|
|
6021
6027
|
if (!data) {
|
|
@@ -6082,6 +6088,7 @@
|
|
|
6082
6088
|
constructor() {
|
|
6083
6089
|
this.maxWidth = Infinity;
|
|
6084
6090
|
this.options = {};
|
|
6091
|
+
this.mode = ResponsiveMode.canvas;
|
|
6085
6092
|
}
|
|
6086
6093
|
load(data) {
|
|
6087
6094
|
if (!data) {
|
|
@@ -6090,6 +6097,13 @@
|
|
|
6090
6097
|
if (data.maxWidth !== undefined) {
|
|
6091
6098
|
this.maxWidth = data.maxWidth;
|
|
6092
6099
|
}
|
|
6100
|
+
if (data.mode !== undefined) {
|
|
6101
|
+
if (data.mode === ResponsiveMode.screen) {
|
|
6102
|
+
this.mode = ResponsiveMode.screen;
|
|
6103
|
+
} else {
|
|
6104
|
+
this.mode = ResponsiveMode.canvas;
|
|
6105
|
+
}
|
|
6106
|
+
}
|
|
6093
6107
|
if (data.options !== undefined) {
|
|
6094
6108
|
this.options = deepExtend({}, data.options);
|
|
6095
6109
|
}
|
|
@@ -6228,7 +6242,7 @@
|
|
|
6228
6242
|
}
|
|
6229
6243
|
setResponsive(width, pxRatio, defaultOptions) {
|
|
6230
6244
|
this.load(defaultOptions);
|
|
6231
|
-
const responsiveOptions = this.responsive.find((t => t.maxWidth * pxRatio > width));
|
|
6245
|
+
const responsiveOptions = this.responsive.find((t => t.mode === ResponsiveMode.screen && screen ? t.maxWidth * pxRatio > screen.availWidth : t.maxWidth * pxRatio > width));
|
|
6232
6246
|
this.load(responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.options);
|
|
6233
6247
|
return responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.maxWidth;
|
|
6234
6248
|
}
|
|
@@ -6258,6 +6272,7 @@
|
|
|
6258
6272
|
this.canvas = new Canvas(this);
|
|
6259
6273
|
this.particles = new Particles(this);
|
|
6260
6274
|
this.drawer = new FrameManager(this);
|
|
6275
|
+
this.presets = presets;
|
|
6261
6276
|
this.pathGenerator = {
|
|
6262
6277
|
generate: () => {
|
|
6263
6278
|
const v = Vector.create(0, 0);
|
|
@@ -6286,17 +6301,6 @@
|
|
|
6286
6301
|
this.density = 1;
|
|
6287
6302
|
this._options = new Options;
|
|
6288
6303
|
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
6304
|
this.eventListeners = new EventListeners(this);
|
|
6301
6305
|
if (typeof IntersectionObserver !== "undefined" && IntersectionObserver) {
|
|
6302
6306
|
this.intersectionObserver = new IntersectionObserver((entries => this.intersectionManager(entries)));
|
|
@@ -6438,6 +6442,7 @@
|
|
|
6438
6442
|
this.particles.linksColors = new Map;
|
|
6439
6443
|
delete this.particles.grabLineColor;
|
|
6440
6444
|
delete this.particles.linksColor;
|
|
6445
|
+
this._sourceOptions = this._options;
|
|
6441
6446
|
}
|
|
6442
6447
|
async loadTheme(name) {
|
|
6443
6448
|
this.currentTheme = name;
|
|
@@ -6551,6 +6556,18 @@
|
|
|
6551
6556
|
return false;
|
|
6552
6557
|
}
|
|
6553
6558
|
async init() {
|
|
6559
|
+
this._options = new Options;
|
|
6560
|
+
for (const preset of this.presets) {
|
|
6561
|
+
this._options.load(Plugins.getPreset(preset));
|
|
6562
|
+
}
|
|
6563
|
+
const shapes = Plugins.getSupportedShapes();
|
|
6564
|
+
for (const type of shapes) {
|
|
6565
|
+
const drawer = Plugins.getShapeDrawer(type);
|
|
6566
|
+
if (drawer) {
|
|
6567
|
+
this.drawers.set(type, drawer);
|
|
6568
|
+
}
|
|
6569
|
+
}
|
|
6570
|
+
this._options.load(this._sourceOptions);
|
|
6554
6571
|
this.actualOptions = new Options;
|
|
6555
6572
|
this.actualOptions.load(this._options);
|
|
6556
6573
|
this.retina.init();
|
|
@@ -6832,7 +6849,12 @@
|
|
|
6832
6849
|
domItem(index) {
|
|
6833
6850
|
return Loader.domItem(index);
|
|
6834
6851
|
}
|
|
6835
|
-
|
|
6852
|
+
async refresh() {
|
|
6853
|
+
for (const instance of this.dom()) {
|
|
6854
|
+
await instance.refresh();
|
|
6855
|
+
}
|
|
6856
|
+
}
|
|
6857
|
+
async addShape(shape, drawer, init, afterEffect, destroy) {
|
|
6836
6858
|
let customDrawer;
|
|
6837
6859
|
if (typeof drawer === "function") {
|
|
6838
6860
|
customDrawer = {
|
|
@@ -6845,21 +6867,27 @@
|
|
|
6845
6867
|
customDrawer = drawer;
|
|
6846
6868
|
}
|
|
6847
6869
|
Plugins.addShapeDrawer(shape, customDrawer);
|
|
6870
|
+
await this.refresh();
|
|
6848
6871
|
}
|
|
6849
|
-
addPreset(preset, options, override = false) {
|
|
6872
|
+
async addPreset(preset, options, override = false) {
|
|
6850
6873
|
Plugins.addPreset(preset, options, override);
|
|
6874
|
+
await this.refresh();
|
|
6851
6875
|
}
|
|
6852
|
-
addPlugin(plugin) {
|
|
6876
|
+
async addPlugin(plugin) {
|
|
6853
6877
|
Plugins.addPlugin(plugin);
|
|
6878
|
+
await this.refresh();
|
|
6854
6879
|
}
|
|
6855
|
-
addPathGenerator(name, generator) {
|
|
6880
|
+
async addPathGenerator(name, generator) {
|
|
6856
6881
|
Plugins.addPathGenerator(name, generator);
|
|
6882
|
+
await this.refresh();
|
|
6857
6883
|
}
|
|
6858
|
-
addInteractor(name, interactorInitializer) {
|
|
6884
|
+
async addInteractor(name, interactorInitializer) {
|
|
6859
6885
|
Plugins.addInteractor(name, interactorInitializer);
|
|
6886
|
+
await this.refresh();
|
|
6860
6887
|
}
|
|
6861
|
-
addParticleUpdater(name, updaterInitializer) {
|
|
6888
|
+
async addParticleUpdater(name, updaterInitializer) {
|
|
6862
6889
|
Plugins.addParticleUpdater(name, updaterInitializer);
|
|
6890
|
+
await this.refresh();
|
|
6863
6891
|
}
|
|
6864
6892
|
}
|
|
6865
6893
|
_Main_initialized = new WeakMap;
|
|
@@ -6871,8 +6899,8 @@
|
|
|
6871
6899
|
context.arc(0, 0, radius, 0, Math.PI * 2, false);
|
|
6872
6900
|
}
|
|
6873
6901
|
}
|
|
6874
|
-
function loadCircleShape(tsParticles) {
|
|
6875
|
-
tsParticles.addShape("circle", new CircleDrawer);
|
|
6902
|
+
async function loadCircleShape(tsParticles) {
|
|
6903
|
+
await tsParticles.addShape("circle", new CircleDrawer);
|
|
6876
6904
|
}
|
|
6877
6905
|
class LifeUpdater {
|
|
6878
6906
|
constructor(container) {
|
|
@@ -6933,8 +6961,8 @@
|
|
|
6933
6961
|
life.duration = getRangeValue(lifeOptions.duration.value) * 1e3;
|
|
6934
6962
|
}
|
|
6935
6963
|
}
|
|
6936
|
-
function loadLifeUpdater(tsParticles) {
|
|
6937
|
-
tsParticles.addParticleUpdater("life", (container => new LifeUpdater(container)));
|
|
6964
|
+
async function loadLifeUpdater(tsParticles) {
|
|
6965
|
+
await tsParticles.addParticleUpdater("life", (container => new LifeUpdater(container)));
|
|
6938
6966
|
}
|
|
6939
6967
|
class ExternalInteractorBase {
|
|
6940
6968
|
constructor(container) {
|
|
@@ -6976,8 +7004,8 @@
|
|
|
6976
7004
|
}
|
|
6977
7005
|
}
|
|
6978
7006
|
}
|
|
6979
|
-
function loadExternalConnectInteraction(tsParticles) {
|
|
6980
|
-
tsParticles.addInteractor("externalConnect", (container => new Connector(container)));
|
|
7007
|
+
async function loadExternalConnectInteraction(tsParticles) {
|
|
7008
|
+
await tsParticles.addInteractor("externalConnect", (container => new Connector(container)));
|
|
6981
7009
|
}
|
|
6982
7010
|
function checkDestroy(particle, value, minValue, maxValue) {
|
|
6983
7011
|
switch (particle.options.opacity.animation.destroy) {
|
|
@@ -7088,8 +7116,8 @@
|
|
|
7088
7116
|
updateOpacity(particle, delta);
|
|
7089
7117
|
}
|
|
7090
7118
|
}
|
|
7091
|
-
function loadOpacityUpdater(tsParticles) {
|
|
7092
|
-
tsParticles.addParticleUpdater("opacity", (container => new OpacityUpdater(container)));
|
|
7119
|
+
async function loadOpacityUpdater(tsParticles) {
|
|
7120
|
+
await tsParticles.addParticleUpdater("opacity", (container => new OpacityUpdater(container)));
|
|
7093
7121
|
}
|
|
7094
7122
|
function loadImage(source) {
|
|
7095
7123
|
return new Promise(((resolve, reject) => {
|
|
@@ -7344,10 +7372,10 @@
|
|
|
7344
7372
|
}
|
|
7345
7373
|
}
|
|
7346
7374
|
_ImageDrawer_images = new WeakMap;
|
|
7347
|
-
function loadImageShape(tsParticles) {
|
|
7375
|
+
async function loadImageShape(tsParticles) {
|
|
7348
7376
|
const imageDrawer = new ImageDrawer;
|
|
7349
|
-
tsParticles.addShape("image", imageDrawer);
|
|
7350
|
-
tsParticles.addShape("images", imageDrawer);
|
|
7377
|
+
await tsParticles.addShape("image", imageDrawer);
|
|
7378
|
+
await tsParticles.addShape("images", imageDrawer);
|
|
7351
7379
|
}
|
|
7352
7380
|
class PolygonDrawerBase {
|
|
7353
7381
|
getSidesCount(particle) {
|
|
@@ -7416,15 +7444,15 @@
|
|
|
7416
7444
|
};
|
|
7417
7445
|
}
|
|
7418
7446
|
}
|
|
7419
|
-
function loadGenericPolygonShape(tsParticles) {
|
|
7420
|
-
tsParticles.addShape("polygon", new PolygonDrawer);
|
|
7447
|
+
async function loadGenericPolygonShape(tsParticles) {
|
|
7448
|
+
await tsParticles.addShape("polygon", new PolygonDrawer);
|
|
7421
7449
|
}
|
|
7422
|
-
function loadTriangleShape(tsParticles) {
|
|
7423
|
-
tsParticles.addShape("triangle", new TriangleDrawer);
|
|
7450
|
+
async function loadTriangleShape(tsParticles) {
|
|
7451
|
+
await tsParticles.addShape("triangle", new TriangleDrawer);
|
|
7424
7452
|
}
|
|
7425
|
-
function loadPolygonShape(tsParticles) {
|
|
7426
|
-
loadGenericPolygonShape(tsParticles);
|
|
7427
|
-
loadTriangleShape(tsParticles);
|
|
7453
|
+
async function loadPolygonShape(tsParticles) {
|
|
7454
|
+
await loadGenericPolygonShape(tsParticles);
|
|
7455
|
+
await loadTriangleShape(tsParticles);
|
|
7428
7456
|
}
|
|
7429
7457
|
var ProcessBubbleType;
|
|
7430
7458
|
(function(ProcessBubbleType) {
|
|
@@ -7664,8 +7692,8 @@
|
|
|
7664
7692
|
}
|
|
7665
7693
|
}
|
|
7666
7694
|
}
|
|
7667
|
-
function loadExternalBubbleInteraction(tsParticles) {
|
|
7668
|
-
tsParticles.addInteractor("externalBubble", (container => new Bubbler(container)));
|
|
7695
|
+
async function loadExternalBubbleInteraction(tsParticles) {
|
|
7696
|
+
await tsParticles.addInteractor("externalBubble", (container => new Bubbler(container)));
|
|
7669
7697
|
}
|
|
7670
7698
|
class Attractor extends ExternalInteractorBase {
|
|
7671
7699
|
constructor(container) {
|
|
@@ -7733,8 +7761,8 @@
|
|
|
7733
7761
|
return;
|
|
7734
7762
|
}
|
|
7735
7763
|
}
|
|
7736
|
-
function loadExternalAttractInteraction(tsParticles) {
|
|
7737
|
-
tsParticles.addInteractor("externalAttract", (container => new Attractor(container)));
|
|
7764
|
+
async function loadExternalAttractInteraction(tsParticles) {
|
|
7765
|
+
await tsParticles.addInteractor("externalAttract", (container => new Attractor(container)));
|
|
7738
7766
|
}
|
|
7739
7767
|
class Grabber extends ExternalInteractorBase {
|
|
7740
7768
|
constructor(container) {
|
|
@@ -7776,8 +7804,8 @@
|
|
|
7776
7804
|
}
|
|
7777
7805
|
}
|
|
7778
7806
|
}
|
|
7779
|
-
function loadExternalGrabInteraction(tsParticles) {
|
|
7780
|
-
tsParticles.addInteractor("externalGrab", (container => new Grabber(container)));
|
|
7807
|
+
async function loadExternalGrabInteraction(tsParticles) {
|
|
7808
|
+
await tsParticles.addInteractor("externalGrab", (container => new Grabber(container)));
|
|
7781
7809
|
}
|
|
7782
7810
|
class StarDrawer {
|
|
7783
7811
|
getSidesCount(particle) {
|
|
@@ -7799,8 +7827,8 @@
|
|
|
7799
7827
|
}
|
|
7800
7828
|
}
|
|
7801
7829
|
}
|
|
7802
|
-
function loadStarShape(tsParticles) {
|
|
7803
|
-
tsParticles.addShape("star", new StarDrawer);
|
|
7830
|
+
async function loadStarShape(tsParticles) {
|
|
7831
|
+
await tsParticles.addShape("star", new StarDrawer);
|
|
7804
7832
|
}
|
|
7805
7833
|
class ParticlesInteractorBase {
|
|
7806
7834
|
constructor(container) {
|
|
@@ -7831,8 +7859,8 @@
|
|
|
7831
7859
|
}
|
|
7832
7860
|
reset() {}
|
|
7833
7861
|
}
|
|
7834
|
-
function loadParticlesAttractInteraction(tsParticles) {
|
|
7835
|
-
tsParticles.addInteractor("particlesAttract", (container => new Attractor_Attractor(container)));
|
|
7862
|
+
async function loadParticlesAttractInteraction(tsParticles) {
|
|
7863
|
+
await tsParticles.addInteractor("particlesAttract", (container => new Attractor_Attractor(container)));
|
|
7836
7864
|
}
|
|
7837
7865
|
const fixFactor = Math.sqrt(2);
|
|
7838
7866
|
class SquareDrawer {
|
|
@@ -7843,10 +7871,10 @@
|
|
|
7843
7871
|
context.rect(-radius / fixFactor, -radius / fixFactor, radius * 2 / fixFactor, radius * 2 / fixFactor);
|
|
7844
7872
|
}
|
|
7845
7873
|
}
|
|
7846
|
-
function loadSquareShape(tsParticles) {
|
|
7874
|
+
async function loadSquareShape(tsParticles) {
|
|
7847
7875
|
const drawer = new SquareDrawer;
|
|
7848
|
-
tsParticles.addShape("edge", drawer);
|
|
7849
|
-
tsParticles.addShape("square", drawer);
|
|
7876
|
+
await tsParticles.addShape("edge", drawer);
|
|
7877
|
+
await tsParticles.addShape("square", drawer);
|
|
7850
7878
|
}
|
|
7851
7879
|
function updateColorValue(delta, value, valueAnimation, max, decrease) {
|
|
7852
7880
|
var _a;
|
|
@@ -7918,8 +7946,8 @@
|
|
|
7918
7946
|
updateStrokeColor(particle, delta);
|
|
7919
7947
|
}
|
|
7920
7948
|
}
|
|
7921
|
-
function loadStrokeColorUpdater(tsParticles) {
|
|
7922
|
-
tsParticles.addParticleUpdater("strokeColor", (container => new StrokeColorUpdater(container)));
|
|
7949
|
+
async function loadStrokeColorUpdater(tsParticles) {
|
|
7950
|
+
await tsParticles.addParticleUpdater("strokeColor", (container => new StrokeColorUpdater(container)));
|
|
7923
7951
|
}
|
|
7924
7952
|
function ColorUpdater_updateColorValue(delta, value, valueAnimation, max, decrease) {
|
|
7925
7953
|
var _a;
|
|
@@ -7978,8 +8006,8 @@
|
|
|
7978
8006
|
updateColor(particle, delta);
|
|
7979
8007
|
}
|
|
7980
8008
|
}
|
|
7981
|
-
function loadColorUpdater(tsParticles) {
|
|
7982
|
-
tsParticles.addParticleUpdater("color", (container => new ColorUpdater(container)));
|
|
8009
|
+
async function loadColorUpdater(tsParticles) {
|
|
8010
|
+
await tsParticles.addParticleUpdater("color", (container => new ColorUpdater(container)));
|
|
7983
8011
|
}
|
|
7984
8012
|
function bounce(p1, p2) {
|
|
7985
8013
|
circleBounce(circleBounceDataFromParticle(p1), circleBounceDataFromParticle(p2));
|
|
@@ -8078,8 +8106,8 @@
|
|
|
8078
8106
|
}
|
|
8079
8107
|
}
|
|
8080
8108
|
}
|
|
8081
|
-
function loadParticlesCollisionsInteraction(tsParticles) {
|
|
8082
|
-
tsParticles.addInteractor("particlesCollisions", (container => new Collider(container)));
|
|
8109
|
+
async function loadParticlesCollisionsInteraction(tsParticles) {
|
|
8110
|
+
await tsParticles.addInteractor("particlesCollisions", (container => new Collider(container)));
|
|
8083
8111
|
}
|
|
8084
8112
|
function updateAngle(particle, delta) {
|
|
8085
8113
|
var _a;
|
|
@@ -8156,8 +8184,8 @@
|
|
|
8156
8184
|
updateAngle(particle, delta);
|
|
8157
8185
|
}
|
|
8158
8186
|
}
|
|
8159
|
-
function loadAngleUpdater(tsParticles) {
|
|
8160
|
-
tsParticles.addParticleUpdater("angle", (container => new AngleUpdater(container)));
|
|
8187
|
+
async function loadAngleUpdater(tsParticles) {
|
|
8188
|
+
await tsParticles.addParticleUpdater("angle", (container => new AngleUpdater(container)));
|
|
8161
8189
|
}
|
|
8162
8190
|
function bounceHorizontal(data) {
|
|
8163
8191
|
if (!(data.outMode === OutMode.bounce || data.outMode === OutMode.bounceHorizontal || data.outMode === "bounceHorizontal" || data.outMode === OutMode.split)) {
|
|
@@ -8352,8 +8380,8 @@
|
|
|
8352
8380
|
}
|
|
8353
8381
|
}
|
|
8354
8382
|
}
|
|
8355
|
-
function loadOutModesUpdater(tsParticles) {
|
|
8356
|
-
tsParticles.addParticleUpdater("outModes", (container => new OutOfCanvasUpdater(container)));
|
|
8383
|
+
async function loadOutModesUpdater(tsParticles) {
|
|
8384
|
+
await tsParticles.addParticleUpdater("outModes", (container => new OutOfCanvasUpdater(container)));
|
|
8357
8385
|
}
|
|
8358
8386
|
class Repulser extends ExternalInteractorBase {
|
|
8359
8387
|
constructor(container) {
|
|
@@ -8441,8 +8469,8 @@
|
|
|
8441
8469
|
}
|
|
8442
8470
|
}
|
|
8443
8471
|
}
|
|
8444
|
-
function loadExternalRepulseInteraction(tsParticles) {
|
|
8445
|
-
tsParticles.addInteractor("externalRepulse", (container => new Repulser(container)));
|
|
8472
|
+
async function loadExternalRepulseInteraction(tsParticles) {
|
|
8473
|
+
await tsParticles.addInteractor("externalRepulse", (container => new Repulser(container)));
|
|
8446
8474
|
}
|
|
8447
8475
|
class LineDrawer {
|
|
8448
8476
|
getSidesCount() {
|
|
@@ -8453,8 +8481,8 @@
|
|
|
8453
8481
|
context.lineTo(radius / 2, 0);
|
|
8454
8482
|
}
|
|
8455
8483
|
}
|
|
8456
|
-
function loadLineShape(tsParticles) {
|
|
8457
|
-
tsParticles.addShape("line", new LineDrawer);
|
|
8484
|
+
async function loadLineShape(tsParticles) {
|
|
8485
|
+
await tsParticles.addShape("line", new LineDrawer);
|
|
8458
8486
|
}
|
|
8459
8487
|
class Bouncer extends ExternalInteractorBase {
|
|
8460
8488
|
constructor(container) {
|
|
@@ -8511,8 +8539,8 @@
|
|
|
8511
8539
|
}
|
|
8512
8540
|
}
|
|
8513
8541
|
}
|
|
8514
|
-
function loadExternalBounceInteraction(tsParticles) {
|
|
8515
|
-
tsParticles.addInteractor("externalBounce", (container => new Bouncer(container)));
|
|
8542
|
+
async function loadExternalBounceInteraction(tsParticles) {
|
|
8543
|
+
await tsParticles.addInteractor("externalBounce", (container => new Bouncer(container)));
|
|
8516
8544
|
}
|
|
8517
8545
|
const validTypes = [ "text", "character", "char" ];
|
|
8518
8546
|
class TextDrawer {
|
|
@@ -8571,10 +8599,10 @@
|
|
|
8571
8599
|
context.globalAlpha = 1;
|
|
8572
8600
|
}
|
|
8573
8601
|
}
|
|
8574
|
-
function loadTextShape(tsParticles) {
|
|
8602
|
+
async function loadTextShape(tsParticles) {
|
|
8575
8603
|
const drawer = new TextDrawer;
|
|
8576
8604
|
for (const type of validTypes) {
|
|
8577
|
-
tsParticles.addShape(type, drawer);
|
|
8605
|
+
await tsParticles.addShape(type, drawer);
|
|
8578
8606
|
}
|
|
8579
8607
|
}
|
|
8580
8608
|
function getLinkDistance(pos1, pos2, optDistance, canvasSize, warp) {
|
|
@@ -8789,16 +8817,16 @@
|
|
|
8789
8817
|
}
|
|
8790
8818
|
loadOptions() {}
|
|
8791
8819
|
}
|
|
8792
|
-
function loadPlugin(tsParticles) {
|
|
8820
|
+
async function loadPlugin(tsParticles) {
|
|
8793
8821
|
const plugin = new Plugin;
|
|
8794
|
-
tsParticles.addPlugin(plugin);
|
|
8822
|
+
await tsParticles.addPlugin(plugin);
|
|
8795
8823
|
}
|
|
8796
|
-
function loadInteraction(tsParticles) {
|
|
8797
|
-
tsParticles.addInteractor("particlesLinks", (container => new Linker(container)));
|
|
8824
|
+
async function loadInteraction(tsParticles) {
|
|
8825
|
+
await tsParticles.addInteractor("particlesLinks", (container => new Linker(container)));
|
|
8798
8826
|
}
|
|
8799
|
-
function loadParticlesLinksInteraction(tsParticles) {
|
|
8800
|
-
loadInteraction(tsParticles);
|
|
8801
|
-
loadPlugin(tsParticles);
|
|
8827
|
+
async function loadParticlesLinksInteraction(tsParticles) {
|
|
8828
|
+
await loadInteraction(tsParticles);
|
|
8829
|
+
await loadPlugin(tsParticles);
|
|
8802
8830
|
}
|
|
8803
8831
|
function SizeUpdater_checkDestroy(particle, value, minValue, maxValue) {
|
|
8804
8832
|
switch (particle.options.size.animation.destroy) {
|
|
@@ -8865,33 +8893,33 @@
|
|
|
8865
8893
|
updateSize(particle, delta);
|
|
8866
8894
|
}
|
|
8867
8895
|
}
|
|
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);
|
|
8896
|
+
async function loadSizeUpdater(tsParticles) {
|
|
8897
|
+
await tsParticles.addParticleUpdater("size", (() => new SizeUpdater));
|
|
8898
|
+
}
|
|
8899
|
+
async function loadSlim(tsParticles) {
|
|
8900
|
+
await loadExternalAttractInteraction(tsParticles);
|
|
8901
|
+
await loadExternalBounceInteraction(tsParticles);
|
|
8902
|
+
await loadExternalBubbleInteraction(tsParticles);
|
|
8903
|
+
await loadExternalConnectInteraction(tsParticles);
|
|
8904
|
+
await loadExternalGrabInteraction(tsParticles);
|
|
8905
|
+
await loadExternalRepulseInteraction(tsParticles);
|
|
8906
|
+
await loadParticlesAttractInteraction(tsParticles);
|
|
8907
|
+
await loadParticlesCollisionsInteraction(tsParticles);
|
|
8908
|
+
await loadParticlesLinksInteraction(tsParticles);
|
|
8909
|
+
await loadCircleShape(tsParticles);
|
|
8910
|
+
await loadImageShape(tsParticles);
|
|
8911
|
+
await loadLineShape(tsParticles);
|
|
8912
|
+
await loadPolygonShape(tsParticles);
|
|
8913
|
+
await loadSquareShape(tsParticles);
|
|
8914
|
+
await loadStarShape(tsParticles);
|
|
8915
|
+
await loadTextShape(tsParticles);
|
|
8916
|
+
await loadLifeUpdater(tsParticles);
|
|
8917
|
+
await loadOpacityUpdater(tsParticles);
|
|
8918
|
+
await loadSizeUpdater(tsParticles);
|
|
8919
|
+
await loadAngleUpdater(tsParticles);
|
|
8920
|
+
await loadColorUpdater(tsParticles);
|
|
8921
|
+
await loadStrokeColorUpdater(tsParticles);
|
|
8922
|
+
await loadOutModesUpdater(tsParticles);
|
|
8895
8923
|
}
|
|
8896
8924
|
class TrailMaker extends ExternalInteractorBase {
|
|
8897
8925
|
constructor(container) {
|
|
@@ -8935,8 +8963,8 @@
|
|
|
8935
8963
|
}
|
|
8936
8964
|
reset() {}
|
|
8937
8965
|
}
|
|
8938
|
-
function loadExternalTrailInteraction(tsParticles) {
|
|
8939
|
-
tsParticles.addInteractor("externalTrail", (container => new TrailMaker(container)));
|
|
8966
|
+
async function loadExternalTrailInteraction(tsParticles) {
|
|
8967
|
+
await tsParticles.addInteractor("externalTrail", (container => new TrailMaker(container)));
|
|
8940
8968
|
}
|
|
8941
8969
|
function updateTilt(particle, delta) {
|
|
8942
8970
|
var _a;
|
|
@@ -9014,8 +9042,8 @@
|
|
|
9014
9042
|
updateTilt(particle, delta);
|
|
9015
9043
|
}
|
|
9016
9044
|
}
|
|
9017
|
-
function loadTiltUpdater(tsParticles) {
|
|
9018
|
-
tsParticles.addParticleUpdater("tilt", (container => new TiltUpdater(container)));
|
|
9045
|
+
async function loadTiltUpdater(tsParticles) {
|
|
9046
|
+
await tsParticles.addParticleUpdater("tilt", (container => new TiltUpdater(container)));
|
|
9019
9047
|
}
|
|
9020
9048
|
function updateWobble(particle, delta) {
|
|
9021
9049
|
var _a;
|
|
@@ -9062,8 +9090,8 @@
|
|
|
9062
9090
|
updateWobble(particle, delta);
|
|
9063
9091
|
}
|
|
9064
9092
|
}
|
|
9065
|
-
function loadWobbleUpdater(tsParticles) {
|
|
9066
|
-
tsParticles.addParticleUpdater("wobble", (container => new WobbleUpdater(container)));
|
|
9093
|
+
async function loadWobbleUpdater(tsParticles) {
|
|
9094
|
+
await tsParticles.addParticleUpdater("wobble", (container => new WobbleUpdater(container)));
|
|
9067
9095
|
}
|
|
9068
9096
|
class AbsorberInstance {
|
|
9069
9097
|
constructor(absorbers, container, options, position) {
|
|
@@ -9436,9 +9464,9 @@
|
|
|
9436
9464
|
}
|
|
9437
9465
|
}
|
|
9438
9466
|
}
|
|
9439
|
-
function loadAbsorbersPlugin(tsParticles) {
|
|
9467
|
+
async function loadAbsorbersPlugin(tsParticles) {
|
|
9440
9468
|
const plugin = new plugin_Plugin;
|
|
9441
|
-
tsParticles.addPlugin(plugin);
|
|
9469
|
+
await tsParticles.addPlugin(plugin);
|
|
9442
9470
|
}
|
|
9443
9471
|
class EmitterSize {
|
|
9444
9472
|
constructor() {
|
|
@@ -10030,9 +10058,9 @@
|
|
|
10030
10058
|
}
|
|
10031
10059
|
}
|
|
10032
10060
|
}
|
|
10033
|
-
function loadEmittersPlugin(tsParticles) {
|
|
10061
|
+
async function loadEmittersPlugin(tsParticles) {
|
|
10034
10062
|
const plugin = new EmittersPlugin;
|
|
10035
|
-
tsParticles.addPlugin(plugin);
|
|
10063
|
+
await tsParticles.addPlugin(plugin);
|
|
10036
10064
|
if (!tsParticles.addEmitterShape) {
|
|
10037
10065
|
tsParticles.addEmitterShape = (name, shape) => {
|
|
10038
10066
|
ShapeManager.addShape(name, shape);
|
|
@@ -10733,7 +10761,7 @@
|
|
|
10733
10761
|
await __webpack_require__.e(917).then(__webpack_require__.t.bind(__webpack_require__, 167, 23));
|
|
10734
10762
|
}
|
|
10735
10763
|
const plugin = new PolygonMask_plugin_Plugin;
|
|
10736
|
-
tsParticles.addPlugin(plugin);
|
|
10764
|
+
await tsParticles.addPlugin(plugin);
|
|
10737
10765
|
}
|
|
10738
10766
|
function updateRoll(particle, delta) {
|
|
10739
10767
|
const roll = particle.options.roll;
|
|
@@ -10792,23 +10820,23 @@
|
|
|
10792
10820
|
updateRoll(particle, delta);
|
|
10793
10821
|
}
|
|
10794
10822
|
}
|
|
10795
|
-
function loadRollUpdater(tsParticles) {
|
|
10796
|
-
tsParticles.addParticleUpdater("roll", (() => new RollUpdater));
|
|
10823
|
+
async function loadRollUpdater(tsParticles) {
|
|
10824
|
+
await tsParticles.addParticleUpdater("roll", (() => new RollUpdater));
|
|
10797
10825
|
}
|
|
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);
|
|
10826
|
+
async function loadFull(tsParticles) {
|
|
10827
|
+
await loadSlim(tsParticles);
|
|
10828
|
+
await loadExternalTrailInteraction(tsParticles);
|
|
10829
|
+
await loadRollUpdater(tsParticles);
|
|
10830
|
+
await loadTiltUpdater(tsParticles);
|
|
10831
|
+
await loadWobbleUpdater(tsParticles);
|
|
10832
|
+
await loadAbsorbersPlugin(tsParticles);
|
|
10833
|
+
await loadEmittersPlugin(tsParticles);
|
|
10834
|
+
await loadPolygonMaskPlugin(tsParticles);
|
|
10807
10835
|
}
|
|
10808
10836
|
const tsParticles = new Main;
|
|
10809
10837
|
tsParticles.init();
|
|
10810
|
-
loadFull(tsParticles);
|
|
10811
10838
|
const {particlesJS, pJSDom} = initPjs(tsParticles);
|
|
10839
|
+
loadFull(tsParticles);
|
|
10812
10840
|
return __webpack_exports__;
|
|
10813
10841
|
})();
|
|
10814
10842
|
}));
|