tsparticles 1.37.0 → 1.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,11 +4,11 @@
4
4
  for (var i in a) (typeof exports === "object" ? exports : root)[i] = a[i];
5
5
  }
6
6
  })(this, (function() {
7
- return (() => {
7
+ return function() {
8
8
  "use strict";
9
9
  var __webpack_require__ = {};
10
- (() => {
11
- __webpack_require__.d = (exports, definition) => {
10
+ !function() {
11
+ __webpack_require__.d = function(exports, definition) {
12
12
  for (var key in definition) {
13
13
  if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
14
14
  Object.defineProperty(exports, key, {
@@ -18,12 +18,14 @@
18
18
  }
19
19
  }
20
20
  };
21
- })();
22
- (() => {
23
- __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
24
- })();
25
- (() => {
26
- __webpack_require__.r = exports => {
21
+ }();
22
+ !function() {
23
+ __webpack_require__.o = function(obj, prop) {
24
+ return Object.prototype.hasOwnProperty.call(obj, prop);
25
+ };
26
+ }();
27
+ !function() {
28
+ __webpack_require__.r = function(exports) {
27
29
  if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
28
30
  Object.defineProperty(exports, Symbol.toStringTag, {
29
31
  value: "Module"
@@ -33,119 +35,337 @@
33
35
  value: true
34
36
  });
35
37
  };
36
- })();
38
+ }();
37
39
  var __webpack_exports__ = {};
38
40
  __webpack_require__.r(__webpack_exports__);
39
41
  __webpack_require__.d(__webpack_exports__, {
40
- AlterType: () => AlterType,
41
- AnimationStatus: () => AnimationStatus,
42
- Circle: () => Circle,
43
- CircleWarp: () => CircleWarp,
44
- ClickMode: () => ClickMode,
45
- CollisionMode: () => CollisionMode,
46
- Constants: () => Constants,
47
- Container: () => Container,
48
- DestroyMode: () => DestroyMode,
49
- DestroyType: () => DestroyType,
50
- DivMode: () => DivMode,
51
- DivType: () => DivType,
52
- EasingType: () => EasingType,
53
- ExternalInteractorBase: () => ExternalInteractorBase,
54
- GradientType: () => GradientType,
55
- HoverMode: () => HoverMode,
56
- InteractivityDetect: () => InteractivityDetect,
57
- InteractorType: () => InteractorType,
58
- Main: () => Main,
59
- MoveDirection: () => MoveDirection,
60
- OrbitType: () => OrbitType,
61
- OutMode: () => OutMode,
62
- OutModeDirection: () => OutModeDirection,
63
- Particle: () => Particle,
64
- ParticlesInteractorBase: () => ParticlesInteractorBase,
65
- Point: () => Point,
66
- Rectangle: () => Rectangle,
67
- ResponsiveMode: () => ResponsiveMode,
68
- RollMode: () => RollMode,
69
- RotateDirection: () => RotateDirection,
70
- ShapeType: () => ShapeType,
71
- SizeMode: () => SizeMode,
72
- StartValueType: () => StartValueType,
73
- ThemeMode: () => ThemeMode,
74
- TiltDirection: () => TiltDirection,
75
- Vector: () => Vector,
76
- alterHsl: () => alterHsl,
77
- animate: () => animate,
78
- areBoundsInside: () => areBoundsInside,
79
- arrayRandomIndex: () => arrayRandomIndex,
80
- calcEasing: () => calcEasing,
81
- calculateBounds: () => calculateBounds,
82
- cancelAnimation: () => cancelAnimation,
83
- circleBounce: () => circleBounce,
84
- circleBounceDataFromParticle: () => circleBounceDataFromParticle,
85
- clamp: () => clamp,
86
- clear: () => clear,
87
- collisionVelocity: () => collisionVelocity,
88
- colorMix: () => colorMix,
89
- colorToHsl: () => colorToHsl,
90
- colorToRgb: () => colorToRgb,
91
- deepExtend: () => deepExtend,
92
- divMode: () => divMode,
93
- divModeExecute: () => divModeExecute,
94
- drawConnectLine: () => drawConnectLine,
95
- drawEllipse: () => drawEllipse,
96
- drawGrabLine: () => drawGrabLine,
97
- drawLinkLine: () => drawLinkLine,
98
- drawLinkTriangle: () => drawLinkTriangle,
99
- drawParticle: () => drawParticle,
100
- drawParticlePlugin: () => drawParticlePlugin,
101
- drawPlugin: () => drawPlugin,
102
- drawShape: () => drawShape,
103
- drawShapeAfterEffect: () => drawShapeAfterEffect,
104
- getDistance: () => getDistance,
105
- getDistances: () => getDistances,
106
- getHslAnimationFromHsl: () => getHslAnimationFromHsl,
107
- getHslFromAnimation: () => getHslFromAnimation,
108
- getLinkColor: () => getLinkColor,
109
- getLinkRandomColor: () => getLinkRandomColor,
110
- getParticleBaseVelocity: () => getParticleBaseVelocity,
111
- getParticleDirectionAngle: () => getParticleDirectionAngle,
112
- getRandomRgbColor: () => getRandomRgbColor,
113
- getRangeMax: () => getRangeMax,
114
- getRangeMin: () => getRangeMin,
115
- getRangeValue: () => getRangeValue,
116
- getStyleFromHsl: () => getStyleFromHsl,
117
- getStyleFromHsv: () => getStyleFromHsv,
118
- getStyleFromRgb: () => getStyleFromRgb,
119
- getValue: () => getValue,
120
- gradient: () => gradient,
121
- hslToHsv: () => hslToHsv,
122
- hslToRgb: () => hslToRgb,
123
- hslaToHsva: () => hslaToHsva,
124
- hslaToRgba: () => hslaToRgba,
125
- hsvToHsl: () => hsvToHsl,
126
- hsvToRgb: () => hsvToRgb,
127
- hsvaToHsla: () => hsvaToHsla,
128
- hsvaToRgba: () => hsvaToRgba,
129
- isDivModeEnabled: () => isDivModeEnabled,
130
- isInArray: () => isInArray,
131
- isPointInside: () => isPointInside,
132
- isSsr: () => isSsr,
133
- itemFromArray: () => itemFromArray,
134
- loadFont: () => loadFont,
135
- mix: () => mix,
136
- pJSDom: () => pJSDom,
137
- paintBase: () => paintBase,
138
- particlesJS: () => particlesJS,
139
- randomInRange: () => randomInRange,
140
- rectBounce: () => rectBounce,
141
- rgbToHsl: () => rgbToHsl,
142
- rgbToHsv: () => rgbToHsv,
143
- rgbaToHsva: () => rgbaToHsva,
144
- setRangeValue: () => setRangeValue,
145
- singleDivModeExecute: () => singleDivModeExecute,
146
- stringToAlpha: () => stringToAlpha,
147
- stringToRgb: () => stringToRgb,
148
- tsParticles: () => tsParticles
42
+ AlterType: function() {
43
+ return AlterType;
44
+ },
45
+ AnimationStatus: function() {
46
+ return AnimationStatus;
47
+ },
48
+ Circle: function() {
49
+ return Circle;
50
+ },
51
+ CircleWarp: function() {
52
+ return CircleWarp;
53
+ },
54
+ ClickMode: function() {
55
+ return ClickMode;
56
+ },
57
+ CollisionMode: function() {
58
+ return CollisionMode;
59
+ },
60
+ Constants: function() {
61
+ return Constants;
62
+ },
63
+ Container: function() {
64
+ return Container;
65
+ },
66
+ DestroyMode: function() {
67
+ return DestroyMode;
68
+ },
69
+ DestroyType: function() {
70
+ return DestroyType;
71
+ },
72
+ DivMode: function() {
73
+ return DivMode;
74
+ },
75
+ DivType: function() {
76
+ return DivType;
77
+ },
78
+ EasingType: function() {
79
+ return EasingType;
80
+ },
81
+ ExternalInteractorBase: function() {
82
+ return ExternalInteractorBase;
83
+ },
84
+ GradientType: function() {
85
+ return GradientType;
86
+ },
87
+ HoverMode: function() {
88
+ return HoverMode;
89
+ },
90
+ InteractivityDetect: function() {
91
+ return InteractivityDetect;
92
+ },
93
+ InteractorType: function() {
94
+ return InteractorType;
95
+ },
96
+ Main: function() {
97
+ return Main;
98
+ },
99
+ MoveDirection: function() {
100
+ return MoveDirection;
101
+ },
102
+ OrbitType: function() {
103
+ return OrbitType;
104
+ },
105
+ OutMode: function() {
106
+ return OutMode;
107
+ },
108
+ OutModeDirection: function() {
109
+ return OutModeDirection;
110
+ },
111
+ Particle: function() {
112
+ return Particle;
113
+ },
114
+ ParticlesInteractorBase: function() {
115
+ return ParticlesInteractorBase;
116
+ },
117
+ Point: function() {
118
+ return Point;
119
+ },
120
+ Rectangle: function() {
121
+ return Rectangle;
122
+ },
123
+ ResponsiveMode: function() {
124
+ return ResponsiveMode;
125
+ },
126
+ RollMode: function() {
127
+ return RollMode;
128
+ },
129
+ RotateDirection: function() {
130
+ return RotateDirection;
131
+ },
132
+ ShapeType: function() {
133
+ return ShapeType;
134
+ },
135
+ SizeMode: function() {
136
+ return SizeMode;
137
+ },
138
+ StartValueType: function() {
139
+ return StartValueType;
140
+ },
141
+ ThemeMode: function() {
142
+ return ThemeMode;
143
+ },
144
+ TiltDirection: function() {
145
+ return TiltDirection;
146
+ },
147
+ Vector: function() {
148
+ return Vector;
149
+ },
150
+ alterHsl: function() {
151
+ return alterHsl;
152
+ },
153
+ animate: function() {
154
+ return animate;
155
+ },
156
+ areBoundsInside: function() {
157
+ return areBoundsInside;
158
+ },
159
+ arrayRandomIndex: function() {
160
+ return arrayRandomIndex;
161
+ },
162
+ calcEasing: function() {
163
+ return calcEasing;
164
+ },
165
+ calculateBounds: function() {
166
+ return calculateBounds;
167
+ },
168
+ cancelAnimation: function() {
169
+ return cancelAnimation;
170
+ },
171
+ circleBounce: function() {
172
+ return circleBounce;
173
+ },
174
+ circleBounceDataFromParticle: function() {
175
+ return circleBounceDataFromParticle;
176
+ },
177
+ clamp: function() {
178
+ return clamp;
179
+ },
180
+ clear: function() {
181
+ return clear;
182
+ },
183
+ collisionVelocity: function() {
184
+ return collisionVelocity;
185
+ },
186
+ colorMix: function() {
187
+ return colorMix;
188
+ },
189
+ colorToHsl: function() {
190
+ return colorToHsl;
191
+ },
192
+ colorToRgb: function() {
193
+ return colorToRgb;
194
+ },
195
+ deepExtend: function() {
196
+ return deepExtend;
197
+ },
198
+ divMode: function() {
199
+ return divMode;
200
+ },
201
+ divModeExecute: function() {
202
+ return divModeExecute;
203
+ },
204
+ drawConnectLine: function() {
205
+ return drawConnectLine;
206
+ },
207
+ drawEllipse: function() {
208
+ return drawEllipse;
209
+ },
210
+ drawGrabLine: function() {
211
+ return drawGrabLine;
212
+ },
213
+ drawLinkLine: function() {
214
+ return drawLinkLine;
215
+ },
216
+ drawLinkTriangle: function() {
217
+ return drawLinkTriangle;
218
+ },
219
+ drawParticle: function() {
220
+ return drawParticle;
221
+ },
222
+ drawParticlePlugin: function() {
223
+ return drawParticlePlugin;
224
+ },
225
+ drawPlugin: function() {
226
+ return drawPlugin;
227
+ },
228
+ drawShape: function() {
229
+ return drawShape;
230
+ },
231
+ drawShapeAfterEffect: function() {
232
+ return drawShapeAfterEffect;
233
+ },
234
+ getDistance: function() {
235
+ return getDistance;
236
+ },
237
+ getDistances: function() {
238
+ return getDistances;
239
+ },
240
+ getHslAnimationFromHsl: function() {
241
+ return getHslAnimationFromHsl;
242
+ },
243
+ getHslFromAnimation: function() {
244
+ return getHslFromAnimation;
245
+ },
246
+ getLinkColor: function() {
247
+ return getLinkColor;
248
+ },
249
+ getLinkRandomColor: function() {
250
+ return getLinkRandomColor;
251
+ },
252
+ getParticleBaseVelocity: function() {
253
+ return getParticleBaseVelocity;
254
+ },
255
+ getParticleDirectionAngle: function() {
256
+ return getParticleDirectionAngle;
257
+ },
258
+ getRandomRgbColor: function() {
259
+ return getRandomRgbColor;
260
+ },
261
+ getRangeMax: function() {
262
+ return getRangeMax;
263
+ },
264
+ getRangeMin: function() {
265
+ return getRangeMin;
266
+ },
267
+ getRangeValue: function() {
268
+ return getRangeValue;
269
+ },
270
+ getStyleFromHsl: function() {
271
+ return getStyleFromHsl;
272
+ },
273
+ getStyleFromHsv: function() {
274
+ return getStyleFromHsv;
275
+ },
276
+ getStyleFromRgb: function() {
277
+ return getStyleFromRgb;
278
+ },
279
+ getValue: function() {
280
+ return getValue;
281
+ },
282
+ gradient: function() {
283
+ return gradient;
284
+ },
285
+ hslToHsv: function() {
286
+ return hslToHsv;
287
+ },
288
+ hslToRgb: function() {
289
+ return hslToRgb;
290
+ },
291
+ hslaToHsva: function() {
292
+ return hslaToHsva;
293
+ },
294
+ hslaToRgba: function() {
295
+ return hslaToRgba;
296
+ },
297
+ hsvToHsl: function() {
298
+ return hsvToHsl;
299
+ },
300
+ hsvToRgb: function() {
301
+ return hsvToRgb;
302
+ },
303
+ hsvaToHsla: function() {
304
+ return hsvaToHsla;
305
+ },
306
+ hsvaToRgba: function() {
307
+ return hsvaToRgba;
308
+ },
309
+ isDivModeEnabled: function() {
310
+ return isDivModeEnabled;
311
+ },
312
+ isInArray: function() {
313
+ return isInArray;
314
+ },
315
+ isPointInside: function() {
316
+ return isPointInside;
317
+ },
318
+ isSsr: function() {
319
+ return isSsr;
320
+ },
321
+ itemFromArray: function() {
322
+ return itemFromArray;
323
+ },
324
+ loadFont: function() {
325
+ return loadFont;
326
+ },
327
+ mix: function() {
328
+ return mix;
329
+ },
330
+ pJSDom: function() {
331
+ return pJSDom;
332
+ },
333
+ paintBase: function() {
334
+ return paintBase;
335
+ },
336
+ particlesJS: function() {
337
+ return particlesJS;
338
+ },
339
+ randomInRange: function() {
340
+ return randomInRange;
341
+ },
342
+ rectBounce: function() {
343
+ return rectBounce;
344
+ },
345
+ rgbToHsl: function() {
346
+ return rgbToHsl;
347
+ },
348
+ rgbToHsv: function() {
349
+ return rgbToHsv;
350
+ },
351
+ rgbaToHsva: function() {
352
+ return rgbaToHsva;
353
+ },
354
+ setRangeValue: function() {
355
+ return setRangeValue;
356
+ },
357
+ singleDivModeExecute: function() {
358
+ return singleDivModeExecute;
359
+ },
360
+ stringToAlpha: function() {
361
+ return stringToAlpha;
362
+ },
363
+ stringToRgb: function() {
364
+ return stringToRgb;
365
+ },
366
+ tsParticles: function() {
367
+ return tsParticles;
368
+ }
149
369
  });
150
370
  const initPjs = main => {
151
371
  const particlesJS = (tagId, options) => main.load(tagId, options);
@@ -163,8 +383,8 @@
163
383
  };
164
384
  const pJSDom = main.dom();
165
385
  return {
166
- particlesJS,
167
- pJSDom
386
+ particlesJS: particlesJS,
387
+ pJSDom: pJSDom
168
388
  };
169
389
  };
170
390
  var MoveDirection;
@@ -469,7 +689,7 @@
469
689
  }
470
690
  function getValue(options) {
471
691
  const random = options.random;
472
- const {enable, minimumValue} = typeof random === "boolean" ? {
692
+ const {enable: enable, minimumValue: minimumValue} = typeof random === "boolean" ? {
473
693
  enable: random,
474
694
  minimumValue: 0
475
695
  } : random;
@@ -479,8 +699,8 @@
479
699
  const dx = pointA.x - pointB.x;
480
700
  const dy = pointA.y - pointB.y;
481
701
  return {
482
- dx,
483
- dy,
702
+ dx: dx,
703
+ dy: dy,
484
704
  distance: Math.sqrt(dx * dx + dy * dy)
485
705
  };
486
706
  }
@@ -1095,7 +1315,7 @@
1095
1315
  }
1096
1316
  const s = !v ? 0 : c / v;
1097
1317
  return {
1098
- h,
1318
+ h: h,
1099
1319
  s: s * 100,
1100
1320
  v: v * 100
1101
1321
  };
@@ -1504,8 +1724,8 @@
1504
1724
  class Range {
1505
1725
  constructor(x, y) {
1506
1726
  this.position = {
1507
- x,
1508
- y
1727
+ x: x,
1728
+ y: y
1509
1729
  };
1510
1730
  }
1511
1731
  }
@@ -1548,8 +1768,8 @@
1548
1768
  constructor(x, y, width, height) {
1549
1769
  super(x, y);
1550
1770
  this.size = {
1551
- height,
1552
- width
1771
+ height: height,
1772
+ width: width
1553
1773
  };
1554
1774
  }
1555
1775
  contains(point) {
@@ -2037,9 +2257,9 @@
2037
2257
  pathGenerators.set(type, pathGenerator);
2038
2258
  }
2039
2259
  }
2040
- static getInteractors(container) {
2260
+ static getInteractors(container, force = false) {
2041
2261
  let res = interactors.get(container);
2042
- if (!res) {
2262
+ if (!res || force) {
2043
2263
  res = [ ...interactorsInitializers.values() ].map((t => t(container)));
2044
2264
  interactors.set(container, res);
2045
2265
  }
@@ -2048,9 +2268,9 @@
2048
2268
  static addInteractor(name, initInteractor) {
2049
2269
  interactorsInitializers.set(name, initInteractor);
2050
2270
  }
2051
- static getUpdaters(container) {
2271
+ static getUpdaters(container, force = false) {
2052
2272
  let res = updaters.get(container);
2053
- if (!res) {
2273
+ if (!res || force) {
2054
2274
  res = [ ...updatersInitializers.values() ].map((t => t(container)));
2055
2275
  updaters.set(container, res);
2056
2276
  }
@@ -4307,21 +4527,21 @@
4307
4527
  const radius = this.getRadius();
4308
4528
  const outModes = this.options.move.outModes, fixHorizontal = outMode => {
4309
4529
  fixOutMode({
4310
- outMode,
4530
+ outMode: outMode,
4311
4531
  checkModes: [ OutMode.bounce, OutMode.bounceHorizontal ],
4312
4532
  coord: pos.x,
4313
4533
  maxCoord: container.canvas.size.width,
4314
4534
  setCb: value => pos.x += value,
4315
- radius
4535
+ radius: radius
4316
4536
  });
4317
4537
  }, fixVertical = outMode => {
4318
4538
  fixOutMode({
4319
- outMode,
4539
+ outMode: outMode,
4320
4540
  checkModes: [ OutMode.bounce, OutMode.bounceVertical ],
4321
4541
  coord: pos.y,
4322
4542
  maxCoord: container.canvas.size.height,
4323
4543
  setCb: value => pos.y += value,
4324
- radius
4544
+ radius: radius
4325
4545
  });
4326
4546
  };
4327
4547
  fixHorizontal((_c = outModes.left) !== null && _c !== void 0 ? _c : outModes.default);
@@ -4403,9 +4623,12 @@
4403
4623
  class InteractionManager {
4404
4624
  constructor(container) {
4405
4625
  this.container = container;
4406
- const interactors = Plugins.getInteractors(container);
4407
4626
  this.externalInteractors = [];
4408
4627
  this.particleInteractors = [];
4628
+ this.init();
4629
+ }
4630
+ init() {
4631
+ const interactors = Plugins.getInteractors(this.container, true);
4409
4632
  for (const interactor of interactors) {
4410
4633
  switch (interactor.type) {
4411
4634
  case InteractorType.External:
@@ -4438,7 +4661,7 @@
4438
4661
  }
4439
4662
  function applyDistance(particle) {
4440
4663
  const initialPosition = particle.initialPosition;
4441
- const {dx, dy} = getDistances(initialPosition, particle.position);
4664
+ const {dx: dx, dy: dy} = getDistances(initialPosition, particle.position);
4442
4665
  const dxFixed = Math.abs(dx), dyFixed = Math.abs(dy);
4443
4666
  const hDistance = particle.retina.maxDistance.horizontal;
4444
4667
  const vDistance = particle.retina.maxDistance.vertical;
@@ -4627,7 +4850,7 @@
4627
4850
  const canvasSize = this.container.canvas.size;
4628
4851
  this.linksColors = new Map;
4629
4852
  this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
4630
- this.updaters = Plugins.getUpdaters(container);
4853
+ this.updaters = Plugins.getUpdaters(container, true);
4631
4854
  }
4632
4855
  get count() {
4633
4856
  return this.array.length;
@@ -4641,6 +4864,8 @@
4641
4864
  this.freqs.links = new Map;
4642
4865
  this.freqs.triangles = new Map;
4643
4866
  let handled = false;
4867
+ this.updaters = Plugins.getUpdaters(container, true);
4868
+ this.interactionManager.init();
4644
4869
  for (const [, plugin] of container.plugins) {
4645
4870
  if (plugin.particlesInitialization !== undefined) {
4646
4871
  handled = plugin.particlesInitialization();
@@ -5752,7 +5977,7 @@
5752
5977
  color: data.cover
5753
5978
  } : data.cover;
5754
5979
  this.cover.load(cover.color !== undefined ? cover : {
5755
- color
5980
+ color: color
5756
5981
  });
5757
5982
  }
5758
5983
  if (data.enable !== undefined) {
@@ -6469,7 +6694,7 @@
6469
6694
  static async loadOptions(params) {
6470
6695
  var _a, _b, _c;
6471
6696
  const tagId = (_a = params.tagId) !== null && _a !== void 0 ? _a : `tsparticles${Math.floor(Math.random() * 1e4)}`;
6472
- const {options, index} = params;
6697
+ const {options: options, index: index} = params;
6473
6698
  let domContainer = (_b = params.element) !== null && _b !== void 0 ? _b : document.getElementById(tagId);
6474
6699
  if (!domContainer) {
6475
6700
  domContainer = document.createElement("div");
@@ -6519,7 +6744,7 @@
6519
6744
  return newItem;
6520
6745
  }
6521
6746
  static async loadRemoteOptions(params) {
6522
- const {url: jsonUrl, index} = params;
6747
+ const {url: jsonUrl, index: index} = params;
6523
6748
  const url = jsonUrl instanceof Array ? itemFromArray(jsonUrl, index) : jsonUrl;
6524
6749
  if (!url) {
6525
6750
  return;
@@ -6533,13 +6758,13 @@
6533
6758
  return await Loader.loadOptions({
6534
6759
  tagId: params.tagId,
6535
6760
  element: params.element,
6536
- index,
6761
+ index: index,
6537
6762
  options: data
6538
6763
  });
6539
6764
  }
6540
6765
  static load(tagId, options, index) {
6541
6766
  const params = {
6542
- index
6767
+ index: index
6543
6768
  };
6544
6769
  if (typeof tagId === "string") {
6545
6770
  params.tagId = tagId;
@@ -6555,7 +6780,7 @@
6555
6780
  }
6556
6781
  static async set(id, domContainer, options, index) {
6557
6782
  const params = {
6558
- index
6783
+ index: index
6559
6784
  };
6560
6785
  if (typeof id === "string") {
6561
6786
  params.tagId = id;
@@ -6584,8 +6809,8 @@
6584
6809
  }
6585
6810
  return await Loader.loadRemoteOptions({
6586
6811
  tagId: id,
6587
- url,
6588
- index
6812
+ url: url,
6813
+ index: index
6589
6814
  });
6590
6815
  }
6591
6816
  static async setJSON(id, domContainer, jsonUrl, index) {
@@ -6602,9 +6827,9 @@
6602
6827
  }
6603
6828
  return await Loader.loadRemoteOptions({
6604
6829
  tagId: newId,
6605
- url,
6830
+ url: url,
6606
6831
  index: newIndex,
6607
- element
6832
+ element: element
6608
6833
  });
6609
6834
  }
6610
6835
  static setOnClickHandler(callback) {
@@ -6673,10 +6898,10 @@
6673
6898
  let customDrawer;
6674
6899
  if (typeof drawer === "function") {
6675
6900
  customDrawer = {
6676
- afterEffect,
6677
- destroy,
6901
+ afterEffect: afterEffect,
6902
+ destroy: destroy,
6678
6903
  draw: drawer,
6679
- init
6904
+ init: init
6680
6905
  };
6681
6906
  } else {
6682
6907
  customDrawer = drawer;
@@ -6941,7 +7166,7 @@
6941
7166
  return;
6942
7167
  }
6943
7168
  const image = {
6944
- source,
7169
+ source: source,
6945
7170
  type: source.substr(source.length - 3)
6946
7171
  };
6947
7172
  const img = new Image;
@@ -6960,7 +7185,7 @@
6960
7185
  throw new Error("Error tsParticles - No image.src");
6961
7186
  }
6962
7187
  const image = {
6963
- source,
7188
+ source: source,
6964
7189
  type: source.substr(source.length - 3)
6965
7190
  };
6966
7191
  if (image.type !== "svg") {
@@ -6974,7 +7199,7 @@
6974
7199
  return image;
6975
7200
  }
6976
7201
  function replaceColorSvg(imageShape, color, opacity) {
6977
- const {svgData} = imageShape;
7202
+ const {svgData: svgData} = imageShape;
6978
7203
  if (!svgData) {
6979
7204
  return "";
6980
7205
  }
@@ -7178,8 +7403,8 @@
7178
7403
  const close = (_g = imageData.close) !== null && _g !== void 0 ? _g : particle.close;
7179
7404
  const imageShape = {
7180
7405
  image: imageRes,
7181
- fill,
7182
- close
7406
+ fill: fill,
7407
+ close: close
7183
7408
  };
7184
7409
  particle.image = imageShape.image;
7185
7410
  particle.fill = imageShape.fill;
@@ -7545,7 +7770,7 @@
7545
7770
  const attractOptions = container.actualOptions.interactivity.modes.attract;
7546
7771
  const query = container.particles.quadTree.query(area);
7547
7772
  for (const particle of query) {
7548
- const {dx, dy, distance} = getDistances(particle.position, position);
7773
+ const {dx: dx, dy: dy, distance: distance} = getDistances(particle.position, position);
7549
7774
  const velocity = attractOptions.speed * attractOptions.factor;
7550
7775
  const attractFactor = clamp(calcEasing(1 - distance / attractRadius, attractOptions.easing) * velocity, 0, attractOptions.maxSpeed);
7551
7776
  const normVec = Vector.create(distance === 0 ? velocity : dx / distance * attractFactor, distance === 0 ? velocity : dy / distance * attractFactor);
@@ -7662,7 +7887,7 @@
7662
7887
  if (p1 === p2 || !p2.options.move.attract.enable || p2.destroyed || p2.spawning) {
7663
7888
  continue;
7664
7889
  }
7665
- 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;
7890
+ 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;
7666
7891
  p1.velocity.x -= ax * p1Factor;
7667
7892
  p1.velocity.y -= ay * p1Factor;
7668
7893
  p2.velocity.x += ax * p2Factor;
@@ -8155,22 +8380,22 @@
8155
8380
  }
8156
8381
  const pos = particle.getPosition(), offset = particle.offset, size = particle.getRadius(), bounds = calculateBounds(pos, size), canvasSize = container.canvas.size;
8157
8382
  bounceHorizontal({
8158
- particle,
8159
- outMode,
8160
- direction,
8161
- bounds,
8162
- canvasSize,
8163
- offset,
8164
- size
8383
+ particle: particle,
8384
+ outMode: outMode,
8385
+ direction: direction,
8386
+ bounds: bounds,
8387
+ canvasSize: canvasSize,
8388
+ offset: offset,
8389
+ size: size
8165
8390
  });
8166
8391
  bounceVertical({
8167
- particle,
8168
- outMode,
8169
- direction,
8170
- bounds,
8171
- canvasSize,
8172
- offset,
8173
- size
8392
+ particle: particle,
8393
+ outMode: outMode,
8394
+ direction: direction,
8395
+ bounds: bounds,
8396
+ canvasSize: canvasSize,
8397
+ offset: offset,
8398
+ size: size
8174
8399
  });
8175
8400
  }
8176
8401
  none(particle, direction) {
@@ -8246,7 +8471,7 @@
8246
8471
  var _a;
8247
8472
  const container = this.container, query = container.particles.quadTree.query(area), repulseOptions = container.actualOptions.interactivity.modes.repulse;
8248
8473
  for (const particle of query) {
8249
- 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);
8474
+ 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);
8250
8475
  particle.position.addTo(normVec);
8251
8476
  }
8252
8477
  }
@@ -8268,7 +8493,7 @@
8268
8493
  }
8269
8494
  const range = new Circle(mouseClickPos.x, mouseClickPos.y, repulseRadius), query = container.particles.quadTree.query(range);
8270
8495
  for (const particle of query) {
8271
- const {dx, dy, distance} = getDistances(mouseClickPos, particle.position), d = distance ** 2, velocity = container.actualOptions.interactivity.modes.repulse.speed, force = -repulseRadius * velocity / d;
8496
+ 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;
8272
8497
  if (d <= repulseRadius) {
8273
8498
  container.repulse.particles.push(particle);
8274
8499
  const vect = Vector.create(dx, dy);
@@ -8342,8 +8567,8 @@
8342
8567
  for (const particle of query) {
8343
8568
  if (area instanceof Circle) {
8344
8569
  circleBounce(circleBounceDataFromParticle(particle), {
8345
- position,
8346
- radius,
8570
+ position: position,
8571
+ radius: radius,
8347
8572
  mass: radius ** 2 * Math.PI / 2,
8348
8573
  velocity: Vector.origin,
8349
8574
  factor: Vector.origin
@@ -8738,8 +8963,8 @@
8738
8963
  }
8739
8964
  const tsParticles = new Main;
8740
8965
  tsParticles.init();
8741
- const {particlesJS, pJSDom} = initPjs(tsParticles);
8966
+ const {particlesJS: particlesJS, pJSDom: pJSDom} = initPjs(tsParticles);
8742
8967
  loadSlim(tsParticles);
8743
8968
  return __webpack_exports__;
8744
- })();
8969
+ }();
8745
8970
  }));