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/tsparticles.slim.js
CHANGED
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
ParticlesInteractorBase: () => ParticlesInteractorBase,
|
|
65
65
|
Point: () => Point,
|
|
66
66
|
Rectangle: () => Rectangle,
|
|
67
|
+
ResponsiveMode: () => ResponsiveMode,
|
|
67
68
|
RollMode: () => RollMode,
|
|
68
69
|
RotateDirection: () => RotateDirection,
|
|
69
70
|
ShapeType: () => ShapeType,
|
|
@@ -263,6 +264,11 @@
|
|
|
263
264
|
ThemeMode["dark"] = "dark";
|
|
264
265
|
ThemeMode["light"] = "light";
|
|
265
266
|
})(ThemeMode || (ThemeMode = {}));
|
|
267
|
+
var ResponsiveMode;
|
|
268
|
+
(function(ResponsiveMode) {
|
|
269
|
+
ResponsiveMode["screen"] = "screen";
|
|
270
|
+
ResponsiveMode["canvas"] = "canvas";
|
|
271
|
+
})(ResponsiveMode || (ResponsiveMode = {}));
|
|
266
272
|
var AnimationStatus;
|
|
267
273
|
(function(AnimationStatus) {
|
|
268
274
|
AnimationStatus[AnimationStatus["increasing"] = 0] = "increasing";
|
|
@@ -5678,7 +5684,7 @@
|
|
|
5678
5684
|
}
|
|
5679
5685
|
class Interactivity {
|
|
5680
5686
|
constructor() {
|
|
5681
|
-
this.detectsOn = InteractivityDetect.
|
|
5687
|
+
this.detectsOn = InteractivityDetect.window;
|
|
5682
5688
|
this.events = new Events;
|
|
5683
5689
|
this.modes = new Modes;
|
|
5684
5690
|
}
|
|
@@ -5829,8 +5835,8 @@
|
|
|
5829
5835
|
}
|
|
5830
5836
|
class FullScreen {
|
|
5831
5837
|
constructor() {
|
|
5832
|
-
this.enable =
|
|
5833
|
-
this.zIndex =
|
|
5838
|
+
this.enable = true;
|
|
5839
|
+
this.zIndex = 0;
|
|
5834
5840
|
}
|
|
5835
5841
|
load(data) {
|
|
5836
5842
|
if (!data) {
|
|
@@ -5897,6 +5903,7 @@
|
|
|
5897
5903
|
constructor() {
|
|
5898
5904
|
this.maxWidth = Infinity;
|
|
5899
5905
|
this.options = {};
|
|
5906
|
+
this.mode = ResponsiveMode.canvas;
|
|
5900
5907
|
}
|
|
5901
5908
|
load(data) {
|
|
5902
5909
|
if (!data) {
|
|
@@ -5905,6 +5912,13 @@
|
|
|
5905
5912
|
if (data.maxWidth !== undefined) {
|
|
5906
5913
|
this.maxWidth = data.maxWidth;
|
|
5907
5914
|
}
|
|
5915
|
+
if (data.mode !== undefined) {
|
|
5916
|
+
if (data.mode === ResponsiveMode.screen) {
|
|
5917
|
+
this.mode = ResponsiveMode.screen;
|
|
5918
|
+
} else {
|
|
5919
|
+
this.mode = ResponsiveMode.canvas;
|
|
5920
|
+
}
|
|
5921
|
+
}
|
|
5908
5922
|
if (data.options !== undefined) {
|
|
5909
5923
|
this.options = deepExtend({}, data.options);
|
|
5910
5924
|
}
|
|
@@ -6043,7 +6057,7 @@
|
|
|
6043
6057
|
}
|
|
6044
6058
|
setResponsive(width, pxRatio, defaultOptions) {
|
|
6045
6059
|
this.load(defaultOptions);
|
|
6046
|
-
const responsiveOptions = this.responsive.find((t => t.maxWidth * pxRatio > width));
|
|
6060
|
+
const responsiveOptions = this.responsive.find((t => t.mode === ResponsiveMode.screen && screen ? t.maxWidth * pxRatio > screen.availWidth : t.maxWidth * pxRatio > width));
|
|
6047
6061
|
this.load(responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.options);
|
|
6048
6062
|
return responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.maxWidth;
|
|
6049
6063
|
}
|
|
@@ -6073,6 +6087,7 @@
|
|
|
6073
6087
|
this.canvas = new Canvas(this);
|
|
6074
6088
|
this.particles = new Particles(this);
|
|
6075
6089
|
this.drawer = new FrameManager(this);
|
|
6090
|
+
this.presets = presets;
|
|
6076
6091
|
this.pathGenerator = {
|
|
6077
6092
|
generate: () => {
|
|
6078
6093
|
const v = Vector.create(0, 0);
|
|
@@ -6101,17 +6116,6 @@
|
|
|
6101
6116
|
this.density = 1;
|
|
6102
6117
|
this._options = new Options;
|
|
6103
6118
|
this.actualOptions = new Options;
|
|
6104
|
-
for (const preset of presets) {
|
|
6105
|
-
this._options.load(Plugins.getPreset(preset));
|
|
6106
|
-
}
|
|
6107
|
-
const shapes = Plugins.getSupportedShapes();
|
|
6108
|
-
for (const type of shapes) {
|
|
6109
|
-
const drawer = Plugins.getShapeDrawer(type);
|
|
6110
|
-
if (drawer) {
|
|
6111
|
-
this.drawers.set(type, drawer);
|
|
6112
|
-
}
|
|
6113
|
-
}
|
|
6114
|
-
this._options.load(this._sourceOptions);
|
|
6115
6119
|
this.eventListeners = new EventListeners(this);
|
|
6116
6120
|
if (typeof IntersectionObserver !== "undefined" && IntersectionObserver) {
|
|
6117
6121
|
this.intersectionObserver = new IntersectionObserver((entries => this.intersectionManager(entries)));
|
|
@@ -6253,6 +6257,7 @@
|
|
|
6253
6257
|
this.particles.linksColors = new Map;
|
|
6254
6258
|
delete this.particles.grabLineColor;
|
|
6255
6259
|
delete this.particles.linksColor;
|
|
6260
|
+
this._sourceOptions = this._options;
|
|
6256
6261
|
}
|
|
6257
6262
|
async loadTheme(name) {
|
|
6258
6263
|
this.currentTheme = name;
|
|
@@ -6366,6 +6371,18 @@
|
|
|
6366
6371
|
return false;
|
|
6367
6372
|
}
|
|
6368
6373
|
async init() {
|
|
6374
|
+
this._options = new Options;
|
|
6375
|
+
for (const preset of this.presets) {
|
|
6376
|
+
this._options.load(Plugins.getPreset(preset));
|
|
6377
|
+
}
|
|
6378
|
+
const shapes = Plugins.getSupportedShapes();
|
|
6379
|
+
for (const type of shapes) {
|
|
6380
|
+
const drawer = Plugins.getShapeDrawer(type);
|
|
6381
|
+
if (drawer) {
|
|
6382
|
+
this.drawers.set(type, drawer);
|
|
6383
|
+
}
|
|
6384
|
+
}
|
|
6385
|
+
this._options.load(this._sourceOptions);
|
|
6369
6386
|
this.actualOptions = new Options;
|
|
6370
6387
|
this.actualOptions.load(this._options);
|
|
6371
6388
|
this.retina.init();
|
|
@@ -6647,7 +6664,12 @@
|
|
|
6647
6664
|
domItem(index) {
|
|
6648
6665
|
return Loader.domItem(index);
|
|
6649
6666
|
}
|
|
6650
|
-
|
|
6667
|
+
async refresh() {
|
|
6668
|
+
for (const instance of this.dom()) {
|
|
6669
|
+
await instance.refresh();
|
|
6670
|
+
}
|
|
6671
|
+
}
|
|
6672
|
+
async addShape(shape, drawer, init, afterEffect, destroy) {
|
|
6651
6673
|
let customDrawer;
|
|
6652
6674
|
if (typeof drawer === "function") {
|
|
6653
6675
|
customDrawer = {
|
|
@@ -6660,21 +6682,27 @@
|
|
|
6660
6682
|
customDrawer = drawer;
|
|
6661
6683
|
}
|
|
6662
6684
|
Plugins.addShapeDrawer(shape, customDrawer);
|
|
6685
|
+
await this.refresh();
|
|
6663
6686
|
}
|
|
6664
|
-
addPreset(preset, options, override = false) {
|
|
6687
|
+
async addPreset(preset, options, override = false) {
|
|
6665
6688
|
Plugins.addPreset(preset, options, override);
|
|
6689
|
+
await this.refresh();
|
|
6666
6690
|
}
|
|
6667
|
-
addPlugin(plugin) {
|
|
6691
|
+
async addPlugin(plugin) {
|
|
6668
6692
|
Plugins.addPlugin(plugin);
|
|
6693
|
+
await this.refresh();
|
|
6669
6694
|
}
|
|
6670
|
-
addPathGenerator(name, generator) {
|
|
6695
|
+
async addPathGenerator(name, generator) {
|
|
6671
6696
|
Plugins.addPathGenerator(name, generator);
|
|
6697
|
+
await this.refresh();
|
|
6672
6698
|
}
|
|
6673
|
-
addInteractor(name, interactorInitializer) {
|
|
6699
|
+
async addInteractor(name, interactorInitializer) {
|
|
6674
6700
|
Plugins.addInteractor(name, interactorInitializer);
|
|
6701
|
+
await this.refresh();
|
|
6675
6702
|
}
|
|
6676
|
-
addParticleUpdater(name, updaterInitializer) {
|
|
6703
|
+
async addParticleUpdater(name, updaterInitializer) {
|
|
6677
6704
|
Plugins.addParticleUpdater(name, updaterInitializer);
|
|
6705
|
+
await this.refresh();
|
|
6678
6706
|
}
|
|
6679
6707
|
}
|
|
6680
6708
|
_Main_initialized = new WeakMap;
|
|
@@ -6686,8 +6714,8 @@
|
|
|
6686
6714
|
context.arc(0, 0, radius, 0, Math.PI * 2, false);
|
|
6687
6715
|
}
|
|
6688
6716
|
}
|
|
6689
|
-
function loadCircleShape(tsParticles) {
|
|
6690
|
-
tsParticles.addShape("circle", new CircleDrawer);
|
|
6717
|
+
async function loadCircleShape(tsParticles) {
|
|
6718
|
+
await tsParticles.addShape("circle", new CircleDrawer);
|
|
6691
6719
|
}
|
|
6692
6720
|
class LifeUpdater {
|
|
6693
6721
|
constructor(container) {
|
|
@@ -6748,8 +6776,8 @@
|
|
|
6748
6776
|
life.duration = getRangeValue(lifeOptions.duration.value) * 1e3;
|
|
6749
6777
|
}
|
|
6750
6778
|
}
|
|
6751
|
-
function loadLifeUpdater(tsParticles) {
|
|
6752
|
-
tsParticles.addParticleUpdater("life", (container => new LifeUpdater(container)));
|
|
6779
|
+
async function loadLifeUpdater(tsParticles) {
|
|
6780
|
+
await tsParticles.addParticleUpdater("life", (container => new LifeUpdater(container)));
|
|
6753
6781
|
}
|
|
6754
6782
|
class ExternalInteractorBase {
|
|
6755
6783
|
constructor(container) {
|
|
@@ -6791,8 +6819,8 @@
|
|
|
6791
6819
|
}
|
|
6792
6820
|
}
|
|
6793
6821
|
}
|
|
6794
|
-
function loadExternalConnectInteraction(tsParticles) {
|
|
6795
|
-
tsParticles.addInteractor("externalConnect", (container => new Connector(container)));
|
|
6822
|
+
async function loadExternalConnectInteraction(tsParticles) {
|
|
6823
|
+
await tsParticles.addInteractor("externalConnect", (container => new Connector(container)));
|
|
6796
6824
|
}
|
|
6797
6825
|
function checkDestroy(particle, value, minValue, maxValue) {
|
|
6798
6826
|
switch (particle.options.opacity.animation.destroy) {
|
|
@@ -6903,8 +6931,8 @@
|
|
|
6903
6931
|
updateOpacity(particle, delta);
|
|
6904
6932
|
}
|
|
6905
6933
|
}
|
|
6906
|
-
function loadOpacityUpdater(tsParticles) {
|
|
6907
|
-
tsParticles.addParticleUpdater("opacity", (container => new OpacityUpdater(container)));
|
|
6934
|
+
async function loadOpacityUpdater(tsParticles) {
|
|
6935
|
+
await tsParticles.addParticleUpdater("opacity", (container => new OpacityUpdater(container)));
|
|
6908
6936
|
}
|
|
6909
6937
|
function loadImage(source) {
|
|
6910
6938
|
return new Promise(((resolve, reject) => {
|
|
@@ -7159,10 +7187,10 @@
|
|
|
7159
7187
|
}
|
|
7160
7188
|
}
|
|
7161
7189
|
_ImageDrawer_images = new WeakMap;
|
|
7162
|
-
function loadImageShape(tsParticles) {
|
|
7190
|
+
async function loadImageShape(tsParticles) {
|
|
7163
7191
|
const imageDrawer = new ImageDrawer;
|
|
7164
|
-
tsParticles.addShape("image", imageDrawer);
|
|
7165
|
-
tsParticles.addShape("images", imageDrawer);
|
|
7192
|
+
await tsParticles.addShape("image", imageDrawer);
|
|
7193
|
+
await tsParticles.addShape("images", imageDrawer);
|
|
7166
7194
|
}
|
|
7167
7195
|
class PolygonDrawerBase {
|
|
7168
7196
|
getSidesCount(particle) {
|
|
@@ -7231,15 +7259,15 @@
|
|
|
7231
7259
|
};
|
|
7232
7260
|
}
|
|
7233
7261
|
}
|
|
7234
|
-
function loadGenericPolygonShape(tsParticles) {
|
|
7235
|
-
tsParticles.addShape("polygon", new PolygonDrawer);
|
|
7262
|
+
async function loadGenericPolygonShape(tsParticles) {
|
|
7263
|
+
await tsParticles.addShape("polygon", new PolygonDrawer);
|
|
7236
7264
|
}
|
|
7237
|
-
function loadTriangleShape(tsParticles) {
|
|
7238
|
-
tsParticles.addShape("triangle", new TriangleDrawer);
|
|
7265
|
+
async function loadTriangleShape(tsParticles) {
|
|
7266
|
+
await tsParticles.addShape("triangle", new TriangleDrawer);
|
|
7239
7267
|
}
|
|
7240
|
-
function loadPolygonShape(tsParticles) {
|
|
7241
|
-
loadGenericPolygonShape(tsParticles);
|
|
7242
|
-
loadTriangleShape(tsParticles);
|
|
7268
|
+
async function loadPolygonShape(tsParticles) {
|
|
7269
|
+
await loadGenericPolygonShape(tsParticles);
|
|
7270
|
+
await loadTriangleShape(tsParticles);
|
|
7243
7271
|
}
|
|
7244
7272
|
var ProcessBubbleType;
|
|
7245
7273
|
(function(ProcessBubbleType) {
|
|
@@ -7479,8 +7507,8 @@
|
|
|
7479
7507
|
}
|
|
7480
7508
|
}
|
|
7481
7509
|
}
|
|
7482
|
-
function loadExternalBubbleInteraction(tsParticles) {
|
|
7483
|
-
tsParticles.addInteractor("externalBubble", (container => new Bubbler(container)));
|
|
7510
|
+
async function loadExternalBubbleInteraction(tsParticles) {
|
|
7511
|
+
await tsParticles.addInteractor("externalBubble", (container => new Bubbler(container)));
|
|
7484
7512
|
}
|
|
7485
7513
|
class Attractor extends ExternalInteractorBase {
|
|
7486
7514
|
constructor(container) {
|
|
@@ -7548,8 +7576,8 @@
|
|
|
7548
7576
|
return;
|
|
7549
7577
|
}
|
|
7550
7578
|
}
|
|
7551
|
-
function loadExternalAttractInteraction(tsParticles) {
|
|
7552
|
-
tsParticles.addInteractor("externalAttract", (container => new Attractor(container)));
|
|
7579
|
+
async function loadExternalAttractInteraction(tsParticles) {
|
|
7580
|
+
await tsParticles.addInteractor("externalAttract", (container => new Attractor(container)));
|
|
7553
7581
|
}
|
|
7554
7582
|
class Grabber extends ExternalInteractorBase {
|
|
7555
7583
|
constructor(container) {
|
|
@@ -7591,8 +7619,8 @@
|
|
|
7591
7619
|
}
|
|
7592
7620
|
}
|
|
7593
7621
|
}
|
|
7594
|
-
function loadExternalGrabInteraction(tsParticles) {
|
|
7595
|
-
tsParticles.addInteractor("externalGrab", (container => new Grabber(container)));
|
|
7622
|
+
async function loadExternalGrabInteraction(tsParticles) {
|
|
7623
|
+
await tsParticles.addInteractor("externalGrab", (container => new Grabber(container)));
|
|
7596
7624
|
}
|
|
7597
7625
|
class StarDrawer {
|
|
7598
7626
|
getSidesCount(particle) {
|
|
@@ -7614,8 +7642,8 @@
|
|
|
7614
7642
|
}
|
|
7615
7643
|
}
|
|
7616
7644
|
}
|
|
7617
|
-
function loadStarShape(tsParticles) {
|
|
7618
|
-
tsParticles.addShape("star", new StarDrawer);
|
|
7645
|
+
async function loadStarShape(tsParticles) {
|
|
7646
|
+
await tsParticles.addShape("star", new StarDrawer);
|
|
7619
7647
|
}
|
|
7620
7648
|
class ParticlesInteractorBase {
|
|
7621
7649
|
constructor(container) {
|
|
@@ -7646,8 +7674,8 @@
|
|
|
7646
7674
|
}
|
|
7647
7675
|
reset() {}
|
|
7648
7676
|
}
|
|
7649
|
-
function loadParticlesAttractInteraction(tsParticles) {
|
|
7650
|
-
tsParticles.addInteractor("particlesAttract", (container => new Attractor_Attractor(container)));
|
|
7677
|
+
async function loadParticlesAttractInteraction(tsParticles) {
|
|
7678
|
+
await tsParticles.addInteractor("particlesAttract", (container => new Attractor_Attractor(container)));
|
|
7651
7679
|
}
|
|
7652
7680
|
const fixFactor = Math.sqrt(2);
|
|
7653
7681
|
class SquareDrawer {
|
|
@@ -7658,10 +7686,10 @@
|
|
|
7658
7686
|
context.rect(-radius / fixFactor, -radius / fixFactor, radius * 2 / fixFactor, radius * 2 / fixFactor);
|
|
7659
7687
|
}
|
|
7660
7688
|
}
|
|
7661
|
-
function loadSquareShape(tsParticles) {
|
|
7689
|
+
async function loadSquareShape(tsParticles) {
|
|
7662
7690
|
const drawer = new SquareDrawer;
|
|
7663
|
-
tsParticles.addShape("edge", drawer);
|
|
7664
|
-
tsParticles.addShape("square", drawer);
|
|
7691
|
+
await tsParticles.addShape("edge", drawer);
|
|
7692
|
+
await tsParticles.addShape("square", drawer);
|
|
7665
7693
|
}
|
|
7666
7694
|
function updateColorValue(delta, value, valueAnimation, max, decrease) {
|
|
7667
7695
|
var _a;
|
|
@@ -7733,8 +7761,8 @@
|
|
|
7733
7761
|
updateStrokeColor(particle, delta);
|
|
7734
7762
|
}
|
|
7735
7763
|
}
|
|
7736
|
-
function loadStrokeColorUpdater(tsParticles) {
|
|
7737
|
-
tsParticles.addParticleUpdater("strokeColor", (container => new StrokeColorUpdater(container)));
|
|
7764
|
+
async function loadStrokeColorUpdater(tsParticles) {
|
|
7765
|
+
await tsParticles.addParticleUpdater("strokeColor", (container => new StrokeColorUpdater(container)));
|
|
7738
7766
|
}
|
|
7739
7767
|
function ColorUpdater_updateColorValue(delta, value, valueAnimation, max, decrease) {
|
|
7740
7768
|
var _a;
|
|
@@ -7793,8 +7821,8 @@
|
|
|
7793
7821
|
updateColor(particle, delta);
|
|
7794
7822
|
}
|
|
7795
7823
|
}
|
|
7796
|
-
function loadColorUpdater(tsParticles) {
|
|
7797
|
-
tsParticles.addParticleUpdater("color", (container => new ColorUpdater(container)));
|
|
7824
|
+
async function loadColorUpdater(tsParticles) {
|
|
7825
|
+
await tsParticles.addParticleUpdater("color", (container => new ColorUpdater(container)));
|
|
7798
7826
|
}
|
|
7799
7827
|
function bounce(p1, p2) {
|
|
7800
7828
|
circleBounce(circleBounceDataFromParticle(p1), circleBounceDataFromParticle(p2));
|
|
@@ -7893,8 +7921,8 @@
|
|
|
7893
7921
|
}
|
|
7894
7922
|
}
|
|
7895
7923
|
}
|
|
7896
|
-
function loadParticlesCollisionsInteraction(tsParticles) {
|
|
7897
|
-
tsParticles.addInteractor("particlesCollisions", (container => new Collider(container)));
|
|
7924
|
+
async function loadParticlesCollisionsInteraction(tsParticles) {
|
|
7925
|
+
await tsParticles.addInteractor("particlesCollisions", (container => new Collider(container)));
|
|
7898
7926
|
}
|
|
7899
7927
|
function updateAngle(particle, delta) {
|
|
7900
7928
|
var _a;
|
|
@@ -7971,8 +7999,8 @@
|
|
|
7971
7999
|
updateAngle(particle, delta);
|
|
7972
8000
|
}
|
|
7973
8001
|
}
|
|
7974
|
-
function loadAngleUpdater(tsParticles) {
|
|
7975
|
-
tsParticles.addParticleUpdater("angle", (container => new AngleUpdater(container)));
|
|
8002
|
+
async function loadAngleUpdater(tsParticles) {
|
|
8003
|
+
await tsParticles.addParticleUpdater("angle", (container => new AngleUpdater(container)));
|
|
7976
8004
|
}
|
|
7977
8005
|
function bounceHorizontal(data) {
|
|
7978
8006
|
if (!(data.outMode === OutMode.bounce || data.outMode === OutMode.bounceHorizontal || data.outMode === "bounceHorizontal" || data.outMode === OutMode.split)) {
|
|
@@ -8167,8 +8195,8 @@
|
|
|
8167
8195
|
}
|
|
8168
8196
|
}
|
|
8169
8197
|
}
|
|
8170
|
-
function loadOutModesUpdater(tsParticles) {
|
|
8171
|
-
tsParticles.addParticleUpdater("outModes", (container => new OutOfCanvasUpdater(container)));
|
|
8198
|
+
async function loadOutModesUpdater(tsParticles) {
|
|
8199
|
+
await tsParticles.addParticleUpdater("outModes", (container => new OutOfCanvasUpdater(container)));
|
|
8172
8200
|
}
|
|
8173
8201
|
class Repulser extends ExternalInteractorBase {
|
|
8174
8202
|
constructor(container) {
|
|
@@ -8256,8 +8284,8 @@
|
|
|
8256
8284
|
}
|
|
8257
8285
|
}
|
|
8258
8286
|
}
|
|
8259
|
-
function loadExternalRepulseInteraction(tsParticles) {
|
|
8260
|
-
tsParticles.addInteractor("externalRepulse", (container => new Repulser(container)));
|
|
8287
|
+
async function loadExternalRepulseInteraction(tsParticles) {
|
|
8288
|
+
await tsParticles.addInteractor("externalRepulse", (container => new Repulser(container)));
|
|
8261
8289
|
}
|
|
8262
8290
|
class LineDrawer {
|
|
8263
8291
|
getSidesCount() {
|
|
@@ -8268,8 +8296,8 @@
|
|
|
8268
8296
|
context.lineTo(radius / 2, 0);
|
|
8269
8297
|
}
|
|
8270
8298
|
}
|
|
8271
|
-
function loadLineShape(tsParticles) {
|
|
8272
|
-
tsParticles.addShape("line", new LineDrawer);
|
|
8299
|
+
async function loadLineShape(tsParticles) {
|
|
8300
|
+
await tsParticles.addShape("line", new LineDrawer);
|
|
8273
8301
|
}
|
|
8274
8302
|
class Bouncer extends ExternalInteractorBase {
|
|
8275
8303
|
constructor(container) {
|
|
@@ -8326,8 +8354,8 @@
|
|
|
8326
8354
|
}
|
|
8327
8355
|
}
|
|
8328
8356
|
}
|
|
8329
|
-
function loadExternalBounceInteraction(tsParticles) {
|
|
8330
|
-
tsParticles.addInteractor("externalBounce", (container => new Bouncer(container)));
|
|
8357
|
+
async function loadExternalBounceInteraction(tsParticles) {
|
|
8358
|
+
await tsParticles.addInteractor("externalBounce", (container => new Bouncer(container)));
|
|
8331
8359
|
}
|
|
8332
8360
|
const validTypes = [ "text", "character", "char" ];
|
|
8333
8361
|
class TextDrawer {
|
|
@@ -8386,10 +8414,10 @@
|
|
|
8386
8414
|
context.globalAlpha = 1;
|
|
8387
8415
|
}
|
|
8388
8416
|
}
|
|
8389
|
-
function loadTextShape(tsParticles) {
|
|
8417
|
+
async function loadTextShape(tsParticles) {
|
|
8390
8418
|
const drawer = new TextDrawer;
|
|
8391
8419
|
for (const type of validTypes) {
|
|
8392
|
-
tsParticles.addShape(type, drawer);
|
|
8420
|
+
await tsParticles.addShape(type, drawer);
|
|
8393
8421
|
}
|
|
8394
8422
|
}
|
|
8395
8423
|
function getLinkDistance(pos1, pos2, optDistance, canvasSize, warp) {
|
|
@@ -8604,16 +8632,16 @@
|
|
|
8604
8632
|
}
|
|
8605
8633
|
loadOptions() {}
|
|
8606
8634
|
}
|
|
8607
|
-
function loadPlugin(tsParticles) {
|
|
8635
|
+
async function loadPlugin(tsParticles) {
|
|
8608
8636
|
const plugin = new Plugin;
|
|
8609
|
-
tsParticles.addPlugin(plugin);
|
|
8637
|
+
await tsParticles.addPlugin(plugin);
|
|
8610
8638
|
}
|
|
8611
|
-
function loadInteraction(tsParticles) {
|
|
8612
|
-
tsParticles.addInteractor("particlesLinks", (container => new Linker(container)));
|
|
8639
|
+
async function loadInteraction(tsParticles) {
|
|
8640
|
+
await tsParticles.addInteractor("particlesLinks", (container => new Linker(container)));
|
|
8613
8641
|
}
|
|
8614
|
-
function loadParticlesLinksInteraction(tsParticles) {
|
|
8615
|
-
loadInteraction(tsParticles);
|
|
8616
|
-
loadPlugin(tsParticles);
|
|
8642
|
+
async function loadParticlesLinksInteraction(tsParticles) {
|
|
8643
|
+
await loadInteraction(tsParticles);
|
|
8644
|
+
await loadPlugin(tsParticles);
|
|
8617
8645
|
}
|
|
8618
8646
|
function SizeUpdater_checkDestroy(particle, value, minValue, maxValue) {
|
|
8619
8647
|
switch (particle.options.size.animation.destroy) {
|
|
@@ -8680,38 +8708,38 @@
|
|
|
8680
8708
|
updateSize(particle, delta);
|
|
8681
8709
|
}
|
|
8682
8710
|
}
|
|
8683
|
-
function loadSizeUpdater(tsParticles) {
|
|
8684
|
-
tsParticles.addParticleUpdater("size", (() => new SizeUpdater));
|
|
8685
|
-
}
|
|
8686
|
-
function loadSlim(tsParticles) {
|
|
8687
|
-
loadExternalAttractInteraction(tsParticles);
|
|
8688
|
-
loadExternalBounceInteraction(tsParticles);
|
|
8689
|
-
loadExternalBubbleInteraction(tsParticles);
|
|
8690
|
-
loadExternalConnectInteraction(tsParticles);
|
|
8691
|
-
loadExternalGrabInteraction(tsParticles);
|
|
8692
|
-
loadExternalRepulseInteraction(tsParticles);
|
|
8693
|
-
loadParticlesAttractInteraction(tsParticles);
|
|
8694
|
-
loadParticlesCollisionsInteraction(tsParticles);
|
|
8695
|
-
loadParticlesLinksInteraction(tsParticles);
|
|
8696
|
-
loadCircleShape(tsParticles);
|
|
8697
|
-
loadImageShape(tsParticles);
|
|
8698
|
-
loadLineShape(tsParticles);
|
|
8699
|
-
loadPolygonShape(tsParticles);
|
|
8700
|
-
loadSquareShape(tsParticles);
|
|
8701
|
-
loadStarShape(tsParticles);
|
|
8702
|
-
loadTextShape(tsParticles);
|
|
8703
|
-
loadLifeUpdater(tsParticles);
|
|
8704
|
-
loadOpacityUpdater(tsParticles);
|
|
8705
|
-
loadSizeUpdater(tsParticles);
|
|
8706
|
-
loadAngleUpdater(tsParticles);
|
|
8707
|
-
loadColorUpdater(tsParticles);
|
|
8708
|
-
loadStrokeColorUpdater(tsParticles);
|
|
8709
|
-
loadOutModesUpdater(tsParticles);
|
|
8711
|
+
async function loadSizeUpdater(tsParticles) {
|
|
8712
|
+
await tsParticles.addParticleUpdater("size", (() => new SizeUpdater));
|
|
8713
|
+
}
|
|
8714
|
+
async function loadSlim(tsParticles) {
|
|
8715
|
+
await loadExternalAttractInteraction(tsParticles);
|
|
8716
|
+
await loadExternalBounceInteraction(tsParticles);
|
|
8717
|
+
await loadExternalBubbleInteraction(tsParticles);
|
|
8718
|
+
await loadExternalConnectInteraction(tsParticles);
|
|
8719
|
+
await loadExternalGrabInteraction(tsParticles);
|
|
8720
|
+
await loadExternalRepulseInteraction(tsParticles);
|
|
8721
|
+
await loadParticlesAttractInteraction(tsParticles);
|
|
8722
|
+
await loadParticlesCollisionsInteraction(tsParticles);
|
|
8723
|
+
await loadParticlesLinksInteraction(tsParticles);
|
|
8724
|
+
await loadCircleShape(tsParticles);
|
|
8725
|
+
await loadImageShape(tsParticles);
|
|
8726
|
+
await loadLineShape(tsParticles);
|
|
8727
|
+
await loadPolygonShape(tsParticles);
|
|
8728
|
+
await loadSquareShape(tsParticles);
|
|
8729
|
+
await loadStarShape(tsParticles);
|
|
8730
|
+
await loadTextShape(tsParticles);
|
|
8731
|
+
await loadLifeUpdater(tsParticles);
|
|
8732
|
+
await loadOpacityUpdater(tsParticles);
|
|
8733
|
+
await loadSizeUpdater(tsParticles);
|
|
8734
|
+
await loadAngleUpdater(tsParticles);
|
|
8735
|
+
await loadColorUpdater(tsParticles);
|
|
8736
|
+
await loadStrokeColorUpdater(tsParticles);
|
|
8737
|
+
await loadOutModesUpdater(tsParticles);
|
|
8710
8738
|
}
|
|
8711
8739
|
const tsParticles = new Main;
|
|
8712
8740
|
tsParticles.init();
|
|
8713
|
-
loadSlim(tsParticles);
|
|
8714
8741
|
const {particlesJS, pJSDom} = initPjs(tsParticles);
|
|
8742
|
+
loadSlim(tsParticles);
|
|
8715
8743
|
return __webpack_exports__;
|
|
8716
8744
|
})();
|
|
8717
8745
|
}));
|