tsparticles 2.0.0-beta.2 → 2.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/107.js +1 -1
- package/README.md +68 -50
- package/index.d.ts +1 -1
- package/index.js +22 -5
- package/package.json +11 -13
- package/report.html +6 -5
- package/tsparticles.bundle.js +2474 -896
- package/tsparticles.bundle.min.js +2 -2
- package/tsparticles.js +85 -18
- package/tsparticles.min.js +2 -2
package/tsparticles.bundle.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v2.0.0-beta.
|
|
7
|
+
* v2.0.0-beta.3
|
|
8
8
|
*/
|
|
9
9
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
10
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -20,7 +20,7 @@ return /******/ (() => { // webpackBootstrap
|
|
|
20
20
|
/******/ "use strict";
|
|
21
21
|
/******/ var __webpack_modules__ = ({
|
|
22
22
|
|
|
23
|
-
/***/
|
|
23
|
+
/***/ 967:
|
|
24
24
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25
25
|
|
|
26
26
|
|
|
@@ -29,10 +29,356 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
"R": () => (/* binding */ loadFull)
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
// EXTERNAL MODULE: ../slim/dist/index.js +
|
|
33
|
-
var dist = __webpack_require__(
|
|
32
|
+
// EXTERNAL MODULE: ../slim/dist/index.js + 68 modules
|
|
33
|
+
var dist = __webpack_require__(7330);
|
|
34
34
|
// EXTERNAL MODULE: ../../engine/dist/index.js
|
|
35
35
|
var engine_dist = __webpack_require__(9685);
|
|
36
|
+
;// CONCATENATED MODULE: ../../updaters/tilt/dist/TiltUpdater.js
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
function updateTilt(particle, delta) {
|
|
40
|
+
var _a;
|
|
41
|
+
|
|
42
|
+
if (!particle.tilt) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const tilt = particle.options.tilt;
|
|
47
|
+
const tiltAnimation = tilt.animation;
|
|
48
|
+
const speed = ((_a = particle.tilt.velocity) !== null && _a !== void 0 ? _a : 0) * delta.factor;
|
|
49
|
+
const max = 2 * Math.PI;
|
|
50
|
+
|
|
51
|
+
if (!tiltAnimation.enable) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
switch (particle.tilt.status) {
|
|
56
|
+
case engine_dist.AnimationStatus.increasing:
|
|
57
|
+
particle.tilt.value += speed;
|
|
58
|
+
|
|
59
|
+
if (particle.tilt.value > max) {
|
|
60
|
+
particle.tilt.value -= max;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
break;
|
|
64
|
+
|
|
65
|
+
case engine_dist.AnimationStatus.decreasing:
|
|
66
|
+
default:
|
|
67
|
+
particle.tilt.value -= speed;
|
|
68
|
+
|
|
69
|
+
if (particle.tilt.value < 0) {
|
|
70
|
+
particle.tilt.value += max;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
class TiltUpdater {
|
|
78
|
+
constructor(container) {
|
|
79
|
+
this.container = container;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
init(particle) {
|
|
83
|
+
const tiltOptions = particle.options.tilt;
|
|
84
|
+
particle.tilt = {
|
|
85
|
+
enable: tiltOptions.enable,
|
|
86
|
+
value: (0,engine_dist.getRangeValue)(tiltOptions.value) * Math.PI / 180,
|
|
87
|
+
sinDirection: Math.random() >= 0.5 ? 1 : -1,
|
|
88
|
+
cosDirection: Math.random() >= 0.5 ? 1 : -1
|
|
89
|
+
};
|
|
90
|
+
let tiltDirection = tiltOptions.direction;
|
|
91
|
+
|
|
92
|
+
if (tiltDirection === engine_dist.TiltDirection.random) {
|
|
93
|
+
const index = Math.floor(Math.random() * 2);
|
|
94
|
+
tiltDirection = index > 0 ? engine_dist.TiltDirection.counterClockwise : engine_dist.TiltDirection.clockwise;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
switch (tiltDirection) {
|
|
98
|
+
case engine_dist.TiltDirection.counterClockwise:
|
|
99
|
+
case "counterClockwise":
|
|
100
|
+
particle.tilt.status = engine_dist.AnimationStatus.decreasing;
|
|
101
|
+
break;
|
|
102
|
+
|
|
103
|
+
case engine_dist.TiltDirection.clockwise:
|
|
104
|
+
particle.tilt.status = engine_dist.AnimationStatus.increasing;
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const tiltAnimation = particle.options.tilt.animation;
|
|
109
|
+
|
|
110
|
+
if (tiltAnimation.enable) {
|
|
111
|
+
particle.tilt.velocity = tiltAnimation.speed / 360 * this.container.retina.reduceFactor;
|
|
112
|
+
|
|
113
|
+
if (!tiltAnimation.sync) {
|
|
114
|
+
particle.tilt.velocity *= Math.random();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
isEnabled(particle) {
|
|
120
|
+
const tilt = particle.options.tilt;
|
|
121
|
+
const tiltAnimation = tilt.animation;
|
|
122
|
+
return !particle.destroyed && !particle.spawning && tiltAnimation.enable;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
update(particle, delta) {
|
|
126
|
+
if (!this.isEnabled(particle)) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
updateTilt(particle, delta);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
}
|
|
134
|
+
;// CONCATENATED MODULE: ../../updaters/tilt/dist/index.js
|
|
135
|
+
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
136
|
+
function adopt(value) {
|
|
137
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
138
|
+
resolve(value);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
143
|
+
function fulfilled(value) {
|
|
144
|
+
try {
|
|
145
|
+
step(generator.next(value));
|
|
146
|
+
} catch (e) {
|
|
147
|
+
reject(e);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function rejected(value) {
|
|
152
|
+
try {
|
|
153
|
+
step(generator["throw"](value));
|
|
154
|
+
} catch (e) {
|
|
155
|
+
reject(e);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function step(result) {
|
|
160
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
function loadTiltUpdater(tsParticles) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
yield tsParticles.addParticleUpdater("tilt", container => new TiltUpdater(container));
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
;// CONCATENATED MODULE: ../../updaters/roll/dist/RollUpdater.js
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
function updateRoll(particle, delta) {
|
|
177
|
+
const roll = particle.options.roll;
|
|
178
|
+
|
|
179
|
+
if (!particle.roll || !roll.enable) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const speed = particle.roll.speed * delta.factor;
|
|
184
|
+
const max = 2 * Math.PI;
|
|
185
|
+
particle.roll.angle += speed;
|
|
186
|
+
|
|
187
|
+
if (particle.roll.angle > max) {
|
|
188
|
+
particle.roll.angle -= max;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
class RollUpdater {
|
|
193
|
+
init(particle) {
|
|
194
|
+
const rollOpt = particle.options.roll;
|
|
195
|
+
|
|
196
|
+
if (rollOpt.enable) {
|
|
197
|
+
particle.roll = {
|
|
198
|
+
angle: Math.random() * Math.PI * 2,
|
|
199
|
+
speed: (0,engine_dist.getRangeValue)(rollOpt.speed) / 360
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
if (rollOpt.backColor) {
|
|
203
|
+
particle.backColor = (0,engine_dist.colorToHsl)(rollOpt.backColor);
|
|
204
|
+
} else if (rollOpt.darken.enable && rollOpt.enlighten.enable) {
|
|
205
|
+
const alterType = Math.random() >= 0.5 ? engine_dist.AlterType.darken : engine_dist.AlterType.enlighten;
|
|
206
|
+
particle.roll.alter = {
|
|
207
|
+
type: alterType,
|
|
208
|
+
value: alterType === engine_dist.AlterType.darken ? rollOpt.darken.value : rollOpt.enlighten.value
|
|
209
|
+
};
|
|
210
|
+
} else if (rollOpt.darken.enable) {
|
|
211
|
+
particle.roll.alter = {
|
|
212
|
+
type: engine_dist.AlterType.darken,
|
|
213
|
+
value: rollOpt.darken.value
|
|
214
|
+
};
|
|
215
|
+
} else if (rollOpt.enlighten.enable) {
|
|
216
|
+
particle.roll.alter = {
|
|
217
|
+
type: engine_dist.AlterType.enlighten,
|
|
218
|
+
value: rollOpt.enlighten.value
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
} else {
|
|
222
|
+
particle.roll = {
|
|
223
|
+
angle: 0,
|
|
224
|
+
speed: 0
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
isEnabled(particle) {
|
|
230
|
+
const roll = particle.options.roll;
|
|
231
|
+
return !particle.destroyed && !particle.spawning && roll.enable;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
update(particle, delta) {
|
|
235
|
+
if (!this.isEnabled(particle)) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
updateRoll(particle, delta);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
}
|
|
243
|
+
;// CONCATENATED MODULE: ../../updaters/roll/dist/index.js
|
|
244
|
+
var dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
245
|
+
function adopt(value) {
|
|
246
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
247
|
+
resolve(value);
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
252
|
+
function fulfilled(value) {
|
|
253
|
+
try {
|
|
254
|
+
step(generator.next(value));
|
|
255
|
+
} catch (e) {
|
|
256
|
+
reject(e);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function rejected(value) {
|
|
261
|
+
try {
|
|
262
|
+
step(generator["throw"](value));
|
|
263
|
+
} catch (e) {
|
|
264
|
+
reject(e);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
function step(result) {
|
|
269
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
273
|
+
});
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
function loadRollUpdater(tsParticles) {
|
|
278
|
+
return dist_awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
yield tsParticles.addParticleUpdater("roll", () => new RollUpdater());
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
;// CONCATENATED MODULE: ../../updaters/wobble/dist/WobbleUpdater.js
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
function updateWobble(particle, delta) {
|
|
286
|
+
var _a;
|
|
287
|
+
|
|
288
|
+
const wobble = particle.options.wobble;
|
|
289
|
+
|
|
290
|
+
if (!wobble.enable || !particle.wobble) {
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
const speed = particle.wobble.speed * delta.factor;
|
|
295
|
+
const distance = ((_a = particle.retina.wobbleDistance) !== null && _a !== void 0 ? _a : 0) * delta.factor / (1000 / 60);
|
|
296
|
+
const max = 2 * Math.PI;
|
|
297
|
+
particle.wobble.angle += speed;
|
|
298
|
+
|
|
299
|
+
if (particle.wobble.angle > max) {
|
|
300
|
+
particle.wobble.angle -= max;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
particle.position.x += distance * Math.cos(particle.wobble.angle);
|
|
304
|
+
particle.position.y += distance * Math.abs(Math.sin(particle.wobble.angle));
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
class WobbleUpdater {
|
|
308
|
+
constructor(container) {
|
|
309
|
+
this.container = container;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
init(particle) {
|
|
313
|
+
const wobbleOpt = particle.options.wobble;
|
|
314
|
+
|
|
315
|
+
if (wobbleOpt.enable) {
|
|
316
|
+
particle.wobble = {
|
|
317
|
+
angle: Math.random() * Math.PI * 2,
|
|
318
|
+
speed: (0,engine_dist.getRangeValue)(wobbleOpt.speed) / 360
|
|
319
|
+
};
|
|
320
|
+
} else {
|
|
321
|
+
particle.wobble = {
|
|
322
|
+
angle: 0,
|
|
323
|
+
speed: 0
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
particle.retina.wobbleDistance = (0,engine_dist.getRangeValue)(wobbleOpt.distance) * this.container.retina.pixelRatio;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
isEnabled(particle) {
|
|
331
|
+
return !particle.destroyed && !particle.spawning && particle.options.wobble.enable;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
update(particle, delta) {
|
|
335
|
+
if (!this.isEnabled(particle)) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
updateWobble(particle, delta);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
}
|
|
343
|
+
;// CONCATENATED MODULE: ../../updaters/wobble/dist/index.js
|
|
344
|
+
var wobble_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
345
|
+
function adopt(value) {
|
|
346
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
347
|
+
resolve(value);
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
352
|
+
function fulfilled(value) {
|
|
353
|
+
try {
|
|
354
|
+
step(generator.next(value));
|
|
355
|
+
} catch (e) {
|
|
356
|
+
reject(e);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
function rejected(value) {
|
|
361
|
+
try {
|
|
362
|
+
step(generator["throw"](value));
|
|
363
|
+
} catch (e) {
|
|
364
|
+
reject(e);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
function step(result) {
|
|
369
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
373
|
+
});
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
function loadWobbleUpdater(tsParticles) {
|
|
378
|
+
return wobble_dist_awaiter(this, void 0, void 0, function* () {
|
|
379
|
+
yield tsParticles.addParticleUpdater("wobble", container => new WobbleUpdater(container));
|
|
380
|
+
});
|
|
381
|
+
}
|
|
36
382
|
;// CONCATENATED MODULE: ../../interactions/external/trail/dist/TrailMaker.js
|
|
37
383
|
|
|
38
384
|
class TrailMaker extends engine_dist.ExternalInteractorBase {
|
|
@@ -97,17 +443,50 @@ class TrailMaker extends engine_dist.ExternalInteractorBase {
|
|
|
97
443
|
|
|
98
444
|
}
|
|
99
445
|
;// CONCATENATED MODULE: ../../interactions/external/trail/dist/index.js
|
|
446
|
+
var trail_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
447
|
+
function adopt(value) {
|
|
448
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
449
|
+
resolve(value);
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
454
|
+
function fulfilled(value) {
|
|
455
|
+
try {
|
|
456
|
+
step(generator.next(value));
|
|
457
|
+
} catch (e) {
|
|
458
|
+
reject(e);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
function rejected(value) {
|
|
463
|
+
try {
|
|
464
|
+
step(generator["throw"](value));
|
|
465
|
+
} catch (e) {
|
|
466
|
+
reject(e);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
function step(result) {
|
|
471
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
475
|
+
});
|
|
476
|
+
};
|
|
477
|
+
|
|
100
478
|
|
|
101
479
|
function loadExternalTrailInteraction(tsParticles) {
|
|
102
|
-
|
|
480
|
+
return trail_dist_awaiter(this, void 0, void 0, function* () {
|
|
481
|
+
yield tsParticles.addInteractor("externalTrail", container => new TrailMaker(container));
|
|
482
|
+
});
|
|
103
483
|
}
|
|
104
484
|
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/AbsorberInstance.js
|
|
105
485
|
|
|
106
486
|
|
|
107
|
-
|
|
108
487
|
class AbsorberInstance {
|
|
109
488
|
constructor(absorbers, container, options, position) {
|
|
110
|
-
var _a, _b, _c;
|
|
489
|
+
var _a, _b, _c, _d, _e;
|
|
111
490
|
|
|
112
491
|
this.absorbers = absorbers;
|
|
113
492
|
this.container = container;
|
|
@@ -119,16 +498,22 @@ class AbsorberInstance {
|
|
|
119
498
|
this.size = (0,engine_dist.getRangeValue)(options.size.value) * container.retina.pixelRatio;
|
|
120
499
|
this.mass = this.size * options.size.density * container.retina.reduceFactor;
|
|
121
500
|
const limit = options.size.limit;
|
|
122
|
-
this.limit = limit
|
|
501
|
+
this.limit = typeof limit === "number" ? {
|
|
502
|
+
radius: limit * container.retina.pixelRatio * container.retina.reduceFactor,
|
|
503
|
+
mass: 0
|
|
504
|
+
} : {
|
|
505
|
+
radius: ((_a = limit === null || limit === void 0 ? void 0 : limit.radius) !== null && _a !== void 0 ? _a : 0) * container.retina.pixelRatio * container.retina.reduceFactor,
|
|
506
|
+
mass: (_b = limit === null || limit === void 0 ? void 0 : limit.mass) !== null && _b !== void 0 ? _b : 0
|
|
507
|
+
};
|
|
123
508
|
const color = typeof options.color === "string" ? {
|
|
124
509
|
value: options.color
|
|
125
510
|
} : options.color;
|
|
126
|
-
this.color = (
|
|
511
|
+
this.color = (_c = (0,engine_dist.colorToRgb)(color)) !== null && _c !== void 0 ? _c : {
|
|
127
512
|
b: 0,
|
|
128
513
|
g: 0,
|
|
129
514
|
r: 0
|
|
130
515
|
};
|
|
131
|
-
this.position = (
|
|
516
|
+
this.position = (_e = (_d = this.initialPosition) === null || _d === void 0 ? void 0 : _d.copy()) !== null && _e !== void 0 ? _e : this.calcPosition();
|
|
132
517
|
}
|
|
133
518
|
|
|
134
519
|
attract(particle) {
|
|
@@ -181,11 +566,13 @@ class AbsorberInstance {
|
|
|
181
566
|
this.updateParticlePosition(particle, v);
|
|
182
567
|
}
|
|
183
568
|
|
|
184
|
-
if (this.limit
|
|
569
|
+
if (this.limit.radius <= 0 || this.size < this.limit.radius) {
|
|
185
570
|
this.size += sizeFactor;
|
|
186
571
|
}
|
|
187
572
|
|
|
188
|
-
this.mass
|
|
573
|
+
if (this.limit.mass <= 0 || this.mass < this.limit.mass) {
|
|
574
|
+
this.mass += sizeFactor * this.options.size.density * container.retina.reduceFactor;
|
|
575
|
+
}
|
|
189
576
|
} else {
|
|
190
577
|
this.updateParticlePosition(particle, v);
|
|
191
578
|
}
|
|
@@ -193,7 +580,7 @@ class AbsorberInstance {
|
|
|
193
580
|
|
|
194
581
|
resize() {
|
|
195
582
|
const initialPosition = this.initialPosition;
|
|
196
|
-
this.position = initialPosition && (0,engine_dist.isPointInside)(initialPosition, this.container.canvas.size) ? initialPosition : this.calcPosition();
|
|
583
|
+
this.position = initialPosition && (0,engine_dist.isPointInside)(initialPosition, this.container.canvas.size, engine_dist.Vector.origin) ? initialPosition : this.calcPosition();
|
|
197
584
|
}
|
|
198
585
|
|
|
199
586
|
draw(context) {
|
|
@@ -224,9 +611,10 @@ class AbsorberInstance {
|
|
|
224
611
|
const canvasSize = container.canvas.size;
|
|
225
612
|
|
|
226
613
|
if (particle.needsNewPosition) {
|
|
227
|
-
|
|
228
|
-
particle.position.
|
|
229
|
-
particle.
|
|
614
|
+
particle.position.x = Math.floor(Math.random() * canvasSize.width);
|
|
615
|
+
particle.position.y = Math.floor(Math.random() * canvasSize.height);
|
|
616
|
+
particle.velocity.setTo(particle.initialVelocity);
|
|
617
|
+
particle.absorberOrbit = undefined;
|
|
230
618
|
particle.needsNewPosition = false;
|
|
231
619
|
}
|
|
232
620
|
|
|
@@ -270,14 +658,38 @@ class AbsorberInstance {
|
|
|
270
658
|
}
|
|
271
659
|
// EXTERNAL MODULE: ../../engine/dist/Options/Classes/ValueWithRandom.js
|
|
272
660
|
var ValueWithRandom = __webpack_require__(5572);
|
|
661
|
+
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/Options/Classes/AbsorberSizeLimit.js
|
|
662
|
+
class AbsorberSizeLimit {
|
|
663
|
+
constructor() {
|
|
664
|
+
this.radius = 0;
|
|
665
|
+
this.mass = 0;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
load(data) {
|
|
669
|
+
if (!data) {
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
if (data.mass !== undefined) {
|
|
674
|
+
this.mass = data.mass;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
if (data.radius !== undefined) {
|
|
678
|
+
this.radius = data.radius;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
}
|
|
273
683
|
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/Options/Classes/AbsorberSize.js
|
|
274
684
|
|
|
685
|
+
|
|
275
686
|
class AbsorberSize extends ValueWithRandom.ValueWithRandom {
|
|
276
687
|
constructor() {
|
|
277
688
|
super();
|
|
278
689
|
this.density = 5;
|
|
279
690
|
this.random.minimumValue = 1;
|
|
280
691
|
this.value = 50;
|
|
692
|
+
this.limit = new AbsorberSizeLimit();
|
|
281
693
|
}
|
|
282
694
|
|
|
283
695
|
load(data) {
|
|
@@ -291,12 +703,10 @@ class AbsorberSize extends ValueWithRandom.ValueWithRandom {
|
|
|
291
703
|
this.density = data.density;
|
|
292
704
|
}
|
|
293
705
|
|
|
294
|
-
if (data.limit
|
|
295
|
-
this.limit = data.limit;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
if (data.limit !== undefined) {
|
|
299
|
-
this.limit = data.limit;
|
|
706
|
+
if (typeof data.limit === "number") {
|
|
707
|
+
this.limit.radius = data.limit;
|
|
708
|
+
} else {
|
|
709
|
+
this.limit.load(data.limit);
|
|
300
710
|
}
|
|
301
711
|
}
|
|
302
712
|
|
|
@@ -499,6 +909,38 @@ class Absorbers {
|
|
|
499
909
|
|
|
500
910
|
}
|
|
501
911
|
;// CONCATENATED MODULE: ../../plugins/absorbers/dist/index.js
|
|
912
|
+
var absorbers_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
913
|
+
function adopt(value) {
|
|
914
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
915
|
+
resolve(value);
|
|
916
|
+
});
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
920
|
+
function fulfilled(value) {
|
|
921
|
+
try {
|
|
922
|
+
step(generator.next(value));
|
|
923
|
+
} catch (e) {
|
|
924
|
+
reject(e);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
function rejected(value) {
|
|
929
|
+
try {
|
|
930
|
+
step(generator["throw"](value));
|
|
931
|
+
} catch (e) {
|
|
932
|
+
reject(e);
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
function step(result) {
|
|
937
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
941
|
+
});
|
|
942
|
+
};
|
|
943
|
+
|
|
502
944
|
|
|
503
945
|
|
|
504
946
|
|
|
@@ -587,8 +1029,10 @@ class Index {
|
|
|
587
1029
|
}
|
|
588
1030
|
|
|
589
1031
|
function loadAbsorbersPlugin(tsParticles) {
|
|
590
|
-
|
|
591
|
-
|
|
1032
|
+
return absorbers_dist_awaiter(this, void 0, void 0, function* () {
|
|
1033
|
+
const plugin = new Index();
|
|
1034
|
+
yield tsParticles.addPlugin(plugin);
|
|
1035
|
+
});
|
|
592
1036
|
}
|
|
593
1037
|
;// CONCATENATED MODULE: ../../plugins/emitters/dist/Options/Classes/EmitterSize.js
|
|
594
1038
|
|
|
@@ -655,7 +1099,6 @@ var _EmitterInstance_firstSpawn, _EmitterInstance_startParticlesAdded;
|
|
|
655
1099
|
|
|
656
1100
|
|
|
657
1101
|
|
|
658
|
-
|
|
659
1102
|
class EmitterInstance {
|
|
660
1103
|
constructor(emitters, container, emitterOptions, position) {
|
|
661
1104
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -706,6 +1149,12 @@ class EmitterInstance {
|
|
|
706
1149
|
})();
|
|
707
1150
|
this.lifeCount = (_f = this.emitterOptions.life.count) !== null && _f !== void 0 ? _f : -1;
|
|
708
1151
|
this.immortal = this.lifeCount <= 0;
|
|
1152
|
+
engine_dist.tsParticles.dispatchEvent("emitterCreated", {
|
|
1153
|
+
container,
|
|
1154
|
+
data: {
|
|
1155
|
+
emitter: this
|
|
1156
|
+
}
|
|
1157
|
+
});
|
|
709
1158
|
this.play();
|
|
710
1159
|
}
|
|
711
1160
|
|
|
@@ -748,7 +1197,7 @@ class EmitterInstance {
|
|
|
748
1197
|
|
|
749
1198
|
resize() {
|
|
750
1199
|
const initialPosition = this.initialPosition;
|
|
751
|
-
this.position = initialPosition && (0,engine_dist.isPointInside)(initialPosition, this.container.canvas.size) ? initialPosition : this.calcPosition();
|
|
1200
|
+
this.position = initialPosition && (0,engine_dist.isPointInside)(initialPosition, this.container.canvas.size, engine_dist.Vector.origin) ? initialPosition : this.calcPosition();
|
|
752
1201
|
}
|
|
753
1202
|
|
|
754
1203
|
update(delta) {
|
|
@@ -801,6 +1250,9 @@ class EmitterInstance {
|
|
|
801
1250
|
this.currentSpawnDelay += delta.value;
|
|
802
1251
|
|
|
803
1252
|
if (this.currentSpawnDelay >= this.spawnDelay) {
|
|
1253
|
+
engine_dist.tsParticles.dispatchEvent("emitterPlay", {
|
|
1254
|
+
container: this.container
|
|
1255
|
+
});
|
|
804
1256
|
this.play();
|
|
805
1257
|
this.currentSpawnDelay -= this.currentSpawnDelay;
|
|
806
1258
|
delete this.spawnDelay;
|
|
@@ -833,6 +1285,12 @@ class EmitterInstance {
|
|
|
833
1285
|
|
|
834
1286
|
destroy() {
|
|
835
1287
|
this.emitters.removeEmitter(this);
|
|
1288
|
+
engine_dist.tsParticles.dispatchEvent("emitterDestroyed", {
|
|
1289
|
+
container: this.container,
|
|
1290
|
+
data: {
|
|
1291
|
+
emitter: this
|
|
1292
|
+
}
|
|
1293
|
+
});
|
|
836
1294
|
}
|
|
837
1295
|
|
|
838
1296
|
calcPosition() {
|
|
@@ -1292,6 +1750,38 @@ class SquareShape {
|
|
|
1292
1750
|
|
|
1293
1751
|
}
|
|
1294
1752
|
;// CONCATENATED MODULE: ../../plugins/emitters/dist/index.js
|
|
1753
|
+
var emitters_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
1754
|
+
function adopt(value) {
|
|
1755
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
1756
|
+
resolve(value);
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1761
|
+
function fulfilled(value) {
|
|
1762
|
+
try {
|
|
1763
|
+
step(generator.next(value));
|
|
1764
|
+
} catch (e) {
|
|
1765
|
+
reject(e);
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
function rejected(value) {
|
|
1770
|
+
try {
|
|
1771
|
+
step(generator["throw"](value));
|
|
1772
|
+
} catch (e) {
|
|
1773
|
+
reject(e);
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
function step(result) {
|
|
1778
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1782
|
+
});
|
|
1783
|
+
};
|
|
1784
|
+
|
|
1295
1785
|
|
|
1296
1786
|
|
|
1297
1787
|
|
|
@@ -1371,17 +1861,19 @@ class EmittersPlugin {
|
|
|
1371
1861
|
}
|
|
1372
1862
|
|
|
1373
1863
|
function loadEmittersPlugin(tsParticles) {
|
|
1374
|
-
|
|
1375
|
-
|
|
1864
|
+
return emitters_dist_awaiter(this, void 0, void 0, function* () {
|
|
1865
|
+
const plugin = new EmittersPlugin();
|
|
1866
|
+
yield tsParticles.addPlugin(plugin);
|
|
1376
1867
|
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1868
|
+
if (!tsParticles.addEmitterShape) {
|
|
1869
|
+
tsParticles.addEmitterShape = (name, shape) => {
|
|
1870
|
+
ShapeManager.addShape(name, shape);
|
|
1871
|
+
};
|
|
1872
|
+
}
|
|
1382
1873
|
|
|
1383
|
-
|
|
1384
|
-
|
|
1874
|
+
tsParticles.addEmitterShape(EmitterShapeType.circle, new CircleShape());
|
|
1875
|
+
tsParticles.addEmitterShape(EmitterShapeType.square, new SquareShape());
|
|
1876
|
+
});
|
|
1385
1877
|
}
|
|
1386
1878
|
|
|
1387
1879
|
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/Enums/InlineArrangement.js
|
|
@@ -1776,7 +2268,7 @@ function segmentBounce(start, stop, velocity) {
|
|
|
1776
2268
|
velocity.y -= d * wallNormalY;
|
|
1777
2269
|
}
|
|
1778
2270
|
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/PolygonMaskInstance.js
|
|
1779
|
-
var
|
|
2271
|
+
var PolygonMaskInstance_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
1780
2272
|
function adopt(value) {
|
|
1781
2273
|
return value instanceof P ? value : new P(function (resolve) {
|
|
1782
2274
|
resolve(value);
|
|
@@ -1813,6 +2305,7 @@ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _argument
|
|
|
1813
2305
|
|
|
1814
2306
|
|
|
1815
2307
|
|
|
2308
|
+
|
|
1816
2309
|
class PolygonMaskInstance {
|
|
1817
2310
|
constructor(container) {
|
|
1818
2311
|
this.container = container;
|
|
@@ -1826,7 +2319,7 @@ class PolygonMaskInstance {
|
|
|
1826
2319
|
}
|
|
1827
2320
|
|
|
1828
2321
|
initAsync(options) {
|
|
1829
|
-
return
|
|
2322
|
+
return PolygonMaskInstance_awaiter(this, void 0, void 0, function* () {
|
|
1830
2323
|
this.options.load(options === null || options === void 0 ? void 0 : options.polygon);
|
|
1831
2324
|
const polygonMaskOptions = this.options;
|
|
1832
2325
|
this.polygonMaskMoveRadius = polygonMaskOptions.move.radius * this.container.retina.pixelRatio;
|
|
@@ -1849,7 +2342,7 @@ class PolygonMaskInstance {
|
|
|
1849
2342
|
clearTimeout(this.redrawTimeout);
|
|
1850
2343
|
}
|
|
1851
2344
|
|
|
1852
|
-
this.redrawTimeout = window.setTimeout(() =>
|
|
2345
|
+
this.redrawTimeout = window.setTimeout(() => PolygonMaskInstance_awaiter(this, void 0, void 0, function* () {
|
|
1853
2346
|
yield this.initRawData(true);
|
|
1854
2347
|
container.particles.redraw();
|
|
1855
2348
|
}), 250);
|
|
@@ -1992,7 +2485,7 @@ class PolygonMaskInstance {
|
|
|
1992
2485
|
}
|
|
1993
2486
|
|
|
1994
2487
|
if (!this.raw) {
|
|
1995
|
-
throw new Error(engine_dist.
|
|
2488
|
+
throw new Error(engine_dist.noPolygonFound);
|
|
1996
2489
|
}
|
|
1997
2490
|
|
|
1998
2491
|
const canvasSize = container.canvas.size;
|
|
@@ -2062,7 +2555,7 @@ class PolygonMaskInstance {
|
|
|
2062
2555
|
}
|
|
2063
2556
|
|
|
2064
2557
|
downloadSvgPath(svgUrl, force) {
|
|
2065
|
-
return
|
|
2558
|
+
return PolygonMaskInstance_awaiter(this, void 0, void 0, function* () {
|
|
2066
2559
|
const options = this.options;
|
|
2067
2560
|
const url = svgUrl || options.url;
|
|
2068
2561
|
const forceDownload = force !== null && force !== void 0 ? force : false;
|
|
@@ -2134,7 +2627,7 @@ class PolygonMaskInstance {
|
|
|
2134
2627
|
|
|
2135
2628
|
getRandomPoint() {
|
|
2136
2629
|
if (!this.raw || !this.raw.length) {
|
|
2137
|
-
throw new Error(engine_dist.
|
|
2630
|
+
throw new Error(engine_dist.noPolygonDataLoaded);
|
|
2138
2631
|
}
|
|
2139
2632
|
|
|
2140
2633
|
const coords = (0,engine_dist.itemFromArray)(this.raw);
|
|
@@ -2150,7 +2643,7 @@ class PolygonMaskInstance {
|
|
|
2150
2643
|
const options = this.options;
|
|
2151
2644
|
|
|
2152
2645
|
if (!this.raw || !this.raw.length || !((_a = this.paths) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
2153
|
-
throw new Error(engine_dist.
|
|
2646
|
+
throw new Error(engine_dist.noPolygonDataLoaded);
|
|
2154
2647
|
}
|
|
2155
2648
|
|
|
2156
2649
|
const path = (0,engine_dist.itemFromArray)(this.paths);
|
|
@@ -2167,7 +2660,7 @@ class PolygonMaskInstance {
|
|
|
2167
2660
|
|
|
2168
2661
|
const options = this.container.actualOptions;
|
|
2169
2662
|
const polygonMaskOptions = this.options;
|
|
2170
|
-
if (!this.raw || !this.raw.length || !((_a = this.paths) === null || _a === void 0 ? void 0 : _a.length)) throw new Error(engine_dist.
|
|
2663
|
+
if (!this.raw || !this.raw.length || !((_a = this.paths) === null || _a === void 0 ? void 0 : _a.length)) throw new Error(engine_dist.noPolygonDataLoaded);
|
|
2171
2664
|
let offset = 0;
|
|
2172
2665
|
let point;
|
|
2173
2666
|
const totalLength = this.paths.reduce((tot, path) => tot + path.length, 0);
|
|
@@ -2192,7 +2685,7 @@ class PolygonMaskInstance {
|
|
|
2192
2685
|
|
|
2193
2686
|
getPointByIndex(index) {
|
|
2194
2687
|
if (!this.raw || !this.raw.length) {
|
|
2195
|
-
throw new Error(engine_dist.
|
|
2688
|
+
throw new Error(engine_dist.noPolygonDataLoaded);
|
|
2196
2689
|
}
|
|
2197
2690
|
|
|
2198
2691
|
const coords = this.raw[index % this.raw.length];
|
|
@@ -2248,7 +2741,7 @@ class PolygonMaskInstance {
|
|
|
2248
2741
|
}
|
|
2249
2742
|
|
|
2250
2743
|
initRawData(force) {
|
|
2251
|
-
return
|
|
2744
|
+
return PolygonMaskInstance_awaiter(this, void 0, void 0, function* () {
|
|
2252
2745
|
const options = this.options;
|
|
2253
2746
|
|
|
2254
2747
|
if (options.url) {
|
|
@@ -2269,12 +2762,15 @@ class PolygonMaskInstance {
|
|
|
2269
2762
|
}
|
|
2270
2763
|
|
|
2271
2764
|
this.createPath2D();
|
|
2765
|
+
engine_dist.tsParticles.dispatchEvent("polygonMaskLoaded", {
|
|
2766
|
+
container: this.container
|
|
2767
|
+
});
|
|
2272
2768
|
});
|
|
2273
2769
|
}
|
|
2274
2770
|
|
|
2275
2771
|
}
|
|
2276
2772
|
;// CONCATENATED MODULE: ../../plugins/polygonMask/dist/index.js
|
|
2277
|
-
var
|
|
2773
|
+
var polygonMask_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
2278
2774
|
function adopt(value) {
|
|
2279
2775
|
return value instanceof P ? value : new P(function (resolve) {
|
|
2280
2776
|
resolve(value);
|
|
@@ -2344,33 +2840,73 @@ class Plugin {
|
|
|
2344
2840
|
}
|
|
2345
2841
|
|
|
2346
2842
|
function loadPolygonMaskPlugin(tsParticles) {
|
|
2347
|
-
return
|
|
2843
|
+
return polygonMask_dist_awaiter(this, void 0, void 0, function* () {
|
|
2348
2844
|
if (!(0,engine_dist.isSsr)() && !window.SVGPathSeg) {
|
|
2349
2845
|
yield __webpack_require__.e(/* import() */ 107).then(__webpack_require__.t.bind(__webpack_require__, 9107, 23));
|
|
2350
2846
|
}
|
|
2351
2847
|
|
|
2352
2848
|
const plugin = new Plugin();
|
|
2353
|
-
tsParticles.addPlugin(plugin);
|
|
2849
|
+
yield tsParticles.addPlugin(plugin);
|
|
2354
2850
|
});
|
|
2355
2851
|
}
|
|
2356
2852
|
|
|
2357
2853
|
;// CONCATENATED MODULE: ./dist/index.js
|
|
2854
|
+
var dist_awaiter_0 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
2855
|
+
function adopt(value) {
|
|
2856
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
2857
|
+
resolve(value);
|
|
2858
|
+
});
|
|
2859
|
+
}
|
|
2860
|
+
|
|
2861
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2862
|
+
function fulfilled(value) {
|
|
2863
|
+
try {
|
|
2864
|
+
step(generator.next(value));
|
|
2865
|
+
} catch (e) {
|
|
2866
|
+
reject(e);
|
|
2867
|
+
}
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2870
|
+
function rejected(value) {
|
|
2871
|
+
try {
|
|
2872
|
+
step(generator["throw"](value));
|
|
2873
|
+
} catch (e) {
|
|
2874
|
+
reject(e);
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2877
|
+
|
|
2878
|
+
function step(result) {
|
|
2879
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2883
|
+
});
|
|
2884
|
+
};
|
|
2885
|
+
|
|
2886
|
+
|
|
2887
|
+
|
|
2888
|
+
|
|
2358
2889
|
|
|
2359
2890
|
|
|
2360
2891
|
|
|
2361
2892
|
|
|
2362
2893
|
|
|
2363
2894
|
function loadFull(tsParticles) {
|
|
2364
|
-
(0,
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2895
|
+
return dist_awaiter_0(this, void 0, void 0, function* () {
|
|
2896
|
+
yield (0,dist/* loadSlim */.S)(tsParticles);
|
|
2897
|
+
yield loadTiltUpdater(tsParticles);
|
|
2898
|
+
yield loadRollUpdater(tsParticles);
|
|
2899
|
+
yield loadWobbleUpdater(tsParticles);
|
|
2900
|
+
yield loadExternalTrailInteraction(tsParticles);
|
|
2901
|
+
yield loadAbsorbersPlugin(tsParticles);
|
|
2902
|
+
yield loadEmittersPlugin(tsParticles);
|
|
2903
|
+
yield loadPolygonMaskPlugin(tsParticles);
|
|
2904
|
+
});
|
|
2369
2905
|
}
|
|
2370
2906
|
|
|
2371
2907
|
/***/ }),
|
|
2372
2908
|
|
|
2373
|
-
/***/
|
|
2909
|
+
/***/ 7330:
|
|
2374
2910
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2375
2911
|
|
|
2376
2912
|
|
|
@@ -2431,7 +2967,7 @@ class Attractor extends engine_dist.ExternalInteractorBase {
|
|
|
2431
2967
|
interact() {
|
|
2432
2968
|
const container = this.container,
|
|
2433
2969
|
options = container.actualOptions,
|
|
2434
|
-
mouseMoveStatus = container.interactivity.status === engine_dist.
|
|
2970
|
+
mouseMoveStatus = container.interactivity.status === engine_dist.mouseMoveEvent,
|
|
2435
2971
|
events = options.interactivity.events,
|
|
2436
2972
|
hoverEnabled = events.onHover.enable,
|
|
2437
2973
|
hoverMode = events.onHover.mode,
|
|
@@ -2508,9 +3044,43 @@ class Attractor extends engine_dist.ExternalInteractorBase {
|
|
|
2508
3044
|
|
|
2509
3045
|
}
|
|
2510
3046
|
;// CONCATENATED MODULE: ../../interactions/external/attract/dist/index.js
|
|
3047
|
+
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
3048
|
+
function adopt(value) {
|
|
3049
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
3050
|
+
resolve(value);
|
|
3051
|
+
});
|
|
3052
|
+
}
|
|
3053
|
+
|
|
3054
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3055
|
+
function fulfilled(value) {
|
|
3056
|
+
try {
|
|
3057
|
+
step(generator.next(value));
|
|
3058
|
+
} catch (e) {
|
|
3059
|
+
reject(e);
|
|
3060
|
+
}
|
|
3061
|
+
}
|
|
3062
|
+
|
|
3063
|
+
function rejected(value) {
|
|
3064
|
+
try {
|
|
3065
|
+
step(generator["throw"](value));
|
|
3066
|
+
} catch (e) {
|
|
3067
|
+
reject(e);
|
|
3068
|
+
}
|
|
3069
|
+
}
|
|
3070
|
+
|
|
3071
|
+
function step(result) {
|
|
3072
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
3073
|
+
}
|
|
3074
|
+
|
|
3075
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
3076
|
+
});
|
|
3077
|
+
};
|
|
3078
|
+
|
|
2511
3079
|
|
|
2512
3080
|
function loadExternalAttractInteraction(tsParticles) {
|
|
2513
|
-
|
|
3081
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3082
|
+
yield tsParticles.addInteractor("externalAttract", container => new Attractor(container));
|
|
3083
|
+
});
|
|
2514
3084
|
}
|
|
2515
3085
|
;// CONCATENATED MODULE: ../../interactions/external/bounce/dist/Bouncer.js
|
|
2516
3086
|
|
|
@@ -2532,7 +3102,7 @@ class Bouncer extends engine_dist.ExternalInteractorBase {
|
|
|
2532
3102
|
const container = this.container,
|
|
2533
3103
|
options = container.actualOptions,
|
|
2534
3104
|
events = options.interactivity.events,
|
|
2535
|
-
mouseMoveStatus = container.interactivity.status === engine_dist.
|
|
3105
|
+
mouseMoveStatus = container.interactivity.status === engine_dist.mouseMoveEvent,
|
|
2536
3106
|
hoverEnabled = events.onHover.enable,
|
|
2537
3107
|
hoverMode = events.onHover.mode,
|
|
2538
3108
|
divs = events.onDiv;
|
|
@@ -2583,26 +3153,60 @@ class Bouncer extends engine_dist.ExternalInteractorBase {
|
|
|
2583
3153
|
processBounce(position, radius, area) {
|
|
2584
3154
|
const query = this.container.particles.quadTree.query(area);
|
|
2585
3155
|
|
|
2586
|
-
for (const particle of query) {
|
|
2587
|
-
if (area instanceof engine_dist.Circle) {
|
|
2588
|
-
(0,engine_dist.circleBounce)((0,engine_dist.circleBounceDataFromParticle)(particle), {
|
|
2589
|
-
position,
|
|
2590
|
-
radius,
|
|
2591
|
-
mass: Math.pow(radius, 2) * Math.PI / 2,
|
|
2592
|
-
velocity: engine_dist.Vector.origin,
|
|
2593
|
-
factor: engine_dist.Vector.origin
|
|
2594
|
-
});
|
|
2595
|
-
} else if (area instanceof engine_dist.Rectangle) {
|
|
2596
|
-
(0,engine_dist.rectBounce)(particle, (0,engine_dist.calculateBounds)(position, radius));
|
|
3156
|
+
for (const particle of query) {
|
|
3157
|
+
if (area instanceof engine_dist.Circle) {
|
|
3158
|
+
(0,engine_dist.circleBounce)((0,engine_dist.circleBounceDataFromParticle)(particle), {
|
|
3159
|
+
position,
|
|
3160
|
+
radius,
|
|
3161
|
+
mass: Math.pow(radius, 2) * Math.PI / 2,
|
|
3162
|
+
velocity: engine_dist.Vector.origin,
|
|
3163
|
+
factor: engine_dist.Vector.origin
|
|
3164
|
+
});
|
|
3165
|
+
} else if (area instanceof engine_dist.Rectangle) {
|
|
3166
|
+
(0,engine_dist.rectBounce)(particle, (0,engine_dist.calculateBounds)(position, radius));
|
|
3167
|
+
}
|
|
3168
|
+
}
|
|
3169
|
+
}
|
|
3170
|
+
|
|
3171
|
+
}
|
|
3172
|
+
;// CONCATENATED MODULE: ../../interactions/external/bounce/dist/index.js
|
|
3173
|
+
var dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
3174
|
+
function adopt(value) {
|
|
3175
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
3176
|
+
resolve(value);
|
|
3177
|
+
});
|
|
3178
|
+
}
|
|
3179
|
+
|
|
3180
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3181
|
+
function fulfilled(value) {
|
|
3182
|
+
try {
|
|
3183
|
+
step(generator.next(value));
|
|
3184
|
+
} catch (e) {
|
|
3185
|
+
reject(e);
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
|
|
3189
|
+
function rejected(value) {
|
|
3190
|
+
try {
|
|
3191
|
+
step(generator["throw"](value));
|
|
3192
|
+
} catch (e) {
|
|
3193
|
+
reject(e);
|
|
2597
3194
|
}
|
|
2598
3195
|
}
|
|
2599
|
-
}
|
|
2600
3196
|
|
|
2601
|
-
|
|
2602
|
-
|
|
3197
|
+
function step(result) {
|
|
3198
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
3199
|
+
}
|
|
3200
|
+
|
|
3201
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
3202
|
+
});
|
|
3203
|
+
};
|
|
3204
|
+
|
|
2603
3205
|
|
|
2604
3206
|
function loadExternalBounceInteraction(tsParticles) {
|
|
2605
|
-
|
|
3207
|
+
return dist_awaiter(this, void 0, void 0, function* () {
|
|
3208
|
+
yield tsParticles.addInteractor("externalBounce", container => new Bouncer(container));
|
|
3209
|
+
});
|
|
2606
3210
|
}
|
|
2607
3211
|
;// CONCATENATED MODULE: ../../interactions/external/bubble/dist/ProcessBubbleType.js
|
|
2608
3212
|
var ProcessBubbleType;
|
|
@@ -2870,7 +3474,7 @@ class Bubbler extends engine_dist.ExternalInteractorBase {
|
|
|
2870
3474
|
ratio = 1 - pointDistance / distance;
|
|
2871
3475
|
|
|
2872
3476
|
if (pointDistance <= distance) {
|
|
2873
|
-
if (ratio >= 0 && container.interactivity.status === engine_dist.
|
|
3477
|
+
if (ratio >= 0 && container.interactivity.status === engine_dist.mouseMoveEvent) {
|
|
2874
3478
|
this.hoverBubbleSize(particle, ratio);
|
|
2875
3479
|
this.hoverBubbleOpacity(particle, ratio);
|
|
2876
3480
|
this.hoverBubbleColor(particle, ratio);
|
|
@@ -2879,7 +3483,7 @@ class Bubbler extends engine_dist.ExternalInteractorBase {
|
|
|
2879
3483
|
this.reset(particle);
|
|
2880
3484
|
}
|
|
2881
3485
|
|
|
2882
|
-
if (container.interactivity.status === engine_dist.
|
|
3486
|
+
if (container.interactivity.status === engine_dist.mouseLeaveEvent) {
|
|
2883
3487
|
this.reset(particle);
|
|
2884
3488
|
}
|
|
2885
3489
|
}
|
|
@@ -2952,9 +3556,43 @@ class Bubbler extends engine_dist.ExternalInteractorBase {
|
|
|
2952
3556
|
|
|
2953
3557
|
}
|
|
2954
3558
|
;// CONCATENATED MODULE: ../../interactions/external/bubble/dist/index.js
|
|
3559
|
+
var bubble_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
3560
|
+
function adopt(value) {
|
|
3561
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
3562
|
+
resolve(value);
|
|
3563
|
+
});
|
|
3564
|
+
}
|
|
3565
|
+
|
|
3566
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3567
|
+
function fulfilled(value) {
|
|
3568
|
+
try {
|
|
3569
|
+
step(generator.next(value));
|
|
3570
|
+
} catch (e) {
|
|
3571
|
+
reject(e);
|
|
3572
|
+
}
|
|
3573
|
+
}
|
|
3574
|
+
|
|
3575
|
+
function rejected(value) {
|
|
3576
|
+
try {
|
|
3577
|
+
step(generator["throw"](value));
|
|
3578
|
+
} catch (e) {
|
|
3579
|
+
reject(e);
|
|
3580
|
+
}
|
|
3581
|
+
}
|
|
3582
|
+
|
|
3583
|
+
function step(result) {
|
|
3584
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
3585
|
+
}
|
|
3586
|
+
|
|
3587
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
3588
|
+
});
|
|
3589
|
+
};
|
|
3590
|
+
|
|
2955
3591
|
|
|
2956
3592
|
function loadExternalBubbleInteraction(tsParticles) {
|
|
2957
|
-
|
|
3593
|
+
return bubble_dist_awaiter(this, void 0, void 0, function* () {
|
|
3594
|
+
yield tsParticles.addInteractor("externalBubble", container => new Bubbler(container));
|
|
3595
|
+
});
|
|
2958
3596
|
}
|
|
2959
3597
|
;// CONCATENATED MODULE: ../../interactions/external/connect/dist/Connector.js
|
|
2960
3598
|
|
|
@@ -3013,9 +3651,43 @@ class Connector extends engine_dist.ExternalInteractorBase {
|
|
|
3013
3651
|
|
|
3014
3652
|
}
|
|
3015
3653
|
;// CONCATENATED MODULE: ../../interactions/external/connect/dist/index.js
|
|
3654
|
+
var connect_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
3655
|
+
function adopt(value) {
|
|
3656
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
3657
|
+
resolve(value);
|
|
3658
|
+
});
|
|
3659
|
+
}
|
|
3660
|
+
|
|
3661
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3662
|
+
function fulfilled(value) {
|
|
3663
|
+
try {
|
|
3664
|
+
step(generator.next(value));
|
|
3665
|
+
} catch (e) {
|
|
3666
|
+
reject(e);
|
|
3667
|
+
}
|
|
3668
|
+
}
|
|
3669
|
+
|
|
3670
|
+
function rejected(value) {
|
|
3671
|
+
try {
|
|
3672
|
+
step(generator["throw"](value));
|
|
3673
|
+
} catch (e) {
|
|
3674
|
+
reject(e);
|
|
3675
|
+
}
|
|
3676
|
+
}
|
|
3677
|
+
|
|
3678
|
+
function step(result) {
|
|
3679
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
3680
|
+
}
|
|
3681
|
+
|
|
3682
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
3683
|
+
});
|
|
3684
|
+
};
|
|
3685
|
+
|
|
3016
3686
|
|
|
3017
3687
|
function loadExternalConnectInteraction(tsParticles) {
|
|
3018
|
-
|
|
3688
|
+
return connect_dist_awaiter(this, void 0, void 0, function* () {
|
|
3689
|
+
yield tsParticles.addInteractor("externalConnect", container => new Connector(container));
|
|
3690
|
+
});
|
|
3019
3691
|
}
|
|
3020
3692
|
;// CONCATENATED MODULE: ../../interactions/external/grab/dist/Grabber.js
|
|
3021
3693
|
|
|
@@ -3040,7 +3712,7 @@ class Grabber extends engine_dist.ExternalInteractorBase {
|
|
|
3040
3712
|
options = container.actualOptions,
|
|
3041
3713
|
interactivity = options.interactivity;
|
|
3042
3714
|
|
|
3043
|
-
if (interactivity.events.onHover.enable && container.interactivity.status === engine_dist.
|
|
3715
|
+
if (interactivity.events.onHover.enable && container.interactivity.status === engine_dist.mouseMoveEvent) {
|
|
3044
3716
|
const mousePos = container.interactivity.mouse.position;
|
|
3045
3717
|
|
|
3046
3718
|
if (!mousePos) {
|
|
@@ -3084,9 +3756,43 @@ class Grabber extends engine_dist.ExternalInteractorBase {
|
|
|
3084
3756
|
|
|
3085
3757
|
}
|
|
3086
3758
|
;// CONCATENATED MODULE: ../../interactions/external/grab/dist/index.js
|
|
3759
|
+
var grab_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
3760
|
+
function adopt(value) {
|
|
3761
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
3762
|
+
resolve(value);
|
|
3763
|
+
});
|
|
3764
|
+
}
|
|
3765
|
+
|
|
3766
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3767
|
+
function fulfilled(value) {
|
|
3768
|
+
try {
|
|
3769
|
+
step(generator.next(value));
|
|
3770
|
+
} catch (e) {
|
|
3771
|
+
reject(e);
|
|
3772
|
+
}
|
|
3773
|
+
}
|
|
3774
|
+
|
|
3775
|
+
function rejected(value) {
|
|
3776
|
+
try {
|
|
3777
|
+
step(generator["throw"](value));
|
|
3778
|
+
} catch (e) {
|
|
3779
|
+
reject(e);
|
|
3780
|
+
}
|
|
3781
|
+
}
|
|
3782
|
+
|
|
3783
|
+
function step(result) {
|
|
3784
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
3785
|
+
}
|
|
3786
|
+
|
|
3787
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
3788
|
+
});
|
|
3789
|
+
};
|
|
3790
|
+
|
|
3087
3791
|
|
|
3088
3792
|
function loadExternalGrabInteraction(tsParticles) {
|
|
3089
|
-
|
|
3793
|
+
return grab_dist_awaiter(this, void 0, void 0, function* () {
|
|
3794
|
+
yield tsParticles.addInteractor("externalGrab", container => new Grabber(container));
|
|
3795
|
+
});
|
|
3090
3796
|
}
|
|
3091
3797
|
;// CONCATENATED MODULE: ../../interactions/external/pause/dist/Pauser.js
|
|
3092
3798
|
|
|
@@ -3248,7 +3954,7 @@ class Repulser extends engine_dist.ExternalInteractorBase {
|
|
|
3248
3954
|
interact() {
|
|
3249
3955
|
const container = this.container,
|
|
3250
3956
|
options = container.actualOptions,
|
|
3251
|
-
mouseMoveStatus = container.interactivity.status === engine_dist.
|
|
3957
|
+
mouseMoveStatus = container.interactivity.status === engine_dist.mouseMoveEvent,
|
|
3252
3958
|
events = options.interactivity.events,
|
|
3253
3959
|
hoverEnabled = events.onHover.enable,
|
|
3254
3960
|
hoverMode = events.onHover.mode,
|
|
@@ -3375,9 +4081,43 @@ class Repulser extends engine_dist.ExternalInteractorBase {
|
|
|
3375
4081
|
|
|
3376
4082
|
}
|
|
3377
4083
|
;// CONCATENATED MODULE: ../../interactions/external/repulse/dist/index.js
|
|
4084
|
+
var repulse_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
4085
|
+
function adopt(value) {
|
|
4086
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
4087
|
+
resolve(value);
|
|
4088
|
+
});
|
|
4089
|
+
}
|
|
4090
|
+
|
|
4091
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4092
|
+
function fulfilled(value) {
|
|
4093
|
+
try {
|
|
4094
|
+
step(generator.next(value));
|
|
4095
|
+
} catch (e) {
|
|
4096
|
+
reject(e);
|
|
4097
|
+
}
|
|
4098
|
+
}
|
|
4099
|
+
|
|
4100
|
+
function rejected(value) {
|
|
4101
|
+
try {
|
|
4102
|
+
step(generator["throw"](value));
|
|
4103
|
+
} catch (e) {
|
|
4104
|
+
reject(e);
|
|
4105
|
+
}
|
|
4106
|
+
}
|
|
4107
|
+
|
|
4108
|
+
function step(result) {
|
|
4109
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
4110
|
+
}
|
|
4111
|
+
|
|
4112
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4113
|
+
});
|
|
4114
|
+
};
|
|
4115
|
+
|
|
3378
4116
|
|
|
3379
4117
|
function loadExternalRepulseInteraction(tsParticles) {
|
|
3380
|
-
|
|
4118
|
+
return repulse_dist_awaiter(this, void 0, void 0, function* () {
|
|
4119
|
+
yield tsParticles.addInteractor("externalRepulse", container => new Repulser(container));
|
|
4120
|
+
});
|
|
3381
4121
|
}
|
|
3382
4122
|
;// CONCATENATED MODULE: ../../interactions/particles/attract/dist/Attractor.js
|
|
3383
4123
|
|
|
@@ -3424,16 +4164,79 @@ class Attractor_Attractor extends engine_dist.ParticlesInteractorBase {
|
|
|
3424
4164
|
|
|
3425
4165
|
}
|
|
3426
4166
|
;// CONCATENATED MODULE: ../../interactions/particles/attract/dist/index.js
|
|
4167
|
+
var attract_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
4168
|
+
function adopt(value) {
|
|
4169
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
4170
|
+
resolve(value);
|
|
4171
|
+
});
|
|
4172
|
+
}
|
|
4173
|
+
|
|
4174
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4175
|
+
function fulfilled(value) {
|
|
4176
|
+
try {
|
|
4177
|
+
step(generator.next(value));
|
|
4178
|
+
} catch (e) {
|
|
4179
|
+
reject(e);
|
|
4180
|
+
}
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4183
|
+
function rejected(value) {
|
|
4184
|
+
try {
|
|
4185
|
+
step(generator["throw"](value));
|
|
4186
|
+
} catch (e) {
|
|
4187
|
+
reject(e);
|
|
4188
|
+
}
|
|
4189
|
+
}
|
|
4190
|
+
|
|
4191
|
+
function step(result) {
|
|
4192
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
4193
|
+
}
|
|
4194
|
+
|
|
4195
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4196
|
+
});
|
|
4197
|
+
};
|
|
4198
|
+
|
|
3427
4199
|
|
|
3428
4200
|
function loadParticlesAttractInteraction(tsParticles) {
|
|
3429
|
-
|
|
4201
|
+
return attract_dist_awaiter(this, void 0, void 0, function* () {
|
|
4202
|
+
yield tsParticles.addInteractor("particlesAttract", container => new Attractor_Attractor(container));
|
|
4203
|
+
});
|
|
3430
4204
|
}
|
|
3431
|
-
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/
|
|
4205
|
+
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/Absorb.js
|
|
4206
|
+
|
|
4207
|
+
function absorb(p1, p2, fps, pixelRatio) {
|
|
4208
|
+
if (p1.getRadius() === undefined && p2.getRadius() !== undefined) {
|
|
4209
|
+
p1.destroy();
|
|
4210
|
+
} else if (p1.getRadius() !== undefined && p2.getRadius() === undefined) {
|
|
4211
|
+
p2.destroy();
|
|
4212
|
+
} else if (p1.getRadius() !== undefined && p2.getRadius() !== undefined) {
|
|
4213
|
+
if (p1.getRadius() >= p2.getRadius()) {
|
|
4214
|
+
const factor = (0,engine_dist.clamp)(p1.getRadius() / p2.getRadius(), 0, p2.getRadius()) * fps;
|
|
4215
|
+
p1.size.value += factor;
|
|
4216
|
+
p2.size.value -= factor;
|
|
4217
|
+
|
|
4218
|
+
if (p2.getRadius() <= pixelRatio) {
|
|
4219
|
+
p2.size.value = 0;
|
|
4220
|
+
p2.destroy();
|
|
4221
|
+
}
|
|
4222
|
+
} else {
|
|
4223
|
+
const factor = (0,engine_dist.clamp)(p2.getRadius() / p1.getRadius(), 0, p1.getRadius()) * fps;
|
|
4224
|
+
p1.size.value -= factor;
|
|
4225
|
+
p2.size.value += factor;
|
|
3432
4226
|
|
|
4227
|
+
if (p1.getRadius() <= pixelRatio) {
|
|
4228
|
+
p1.size.value = 0;
|
|
4229
|
+
p1.destroy();
|
|
4230
|
+
}
|
|
4231
|
+
}
|
|
4232
|
+
}
|
|
4233
|
+
}
|
|
4234
|
+
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/Bounce.js
|
|
3433
4235
|
|
|
3434
4236
|
function bounce(p1, p2) {
|
|
3435
4237
|
(0,engine_dist.circleBounce)((0,engine_dist.circleBounceDataFromParticle)(p1), (0,engine_dist.circleBounceDataFromParticle)(p2));
|
|
3436
4238
|
}
|
|
4239
|
+
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/Destroy.js
|
|
3437
4240
|
|
|
3438
4241
|
function destroy(p1, p2) {
|
|
3439
4242
|
if (!p1.unbreakable && !p2.unbreakable) {
|
|
@@ -3452,6 +4255,34 @@ function destroy(p1, p2) {
|
|
|
3452
4255
|
}
|
|
3453
4256
|
}
|
|
3454
4257
|
}
|
|
4258
|
+
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/ResolveCollision.js
|
|
4259
|
+
|
|
4260
|
+
|
|
4261
|
+
|
|
4262
|
+
|
|
4263
|
+
function resolveCollision(p1, p2, fps, pixelRatio) {
|
|
4264
|
+
switch (p1.options.collisions.mode) {
|
|
4265
|
+
case engine_dist.CollisionMode.absorb:
|
|
4266
|
+
{
|
|
4267
|
+
absorb(p1, p2, fps, pixelRatio);
|
|
4268
|
+
break;
|
|
4269
|
+
}
|
|
4270
|
+
|
|
4271
|
+
case engine_dist.CollisionMode.bounce:
|
|
4272
|
+
{
|
|
4273
|
+
bounce(p1, p2);
|
|
4274
|
+
break;
|
|
4275
|
+
}
|
|
4276
|
+
|
|
4277
|
+
case engine_dist.CollisionMode.destroy:
|
|
4278
|
+
{
|
|
4279
|
+
destroy(p1, p2);
|
|
4280
|
+
break;
|
|
4281
|
+
}
|
|
4282
|
+
}
|
|
4283
|
+
}
|
|
4284
|
+
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/Collider.js
|
|
4285
|
+
|
|
3455
4286
|
|
|
3456
4287
|
class Collider extends engine_dist.ParticlesInteractorBase {
|
|
3457
4288
|
constructor(container) {
|
|
@@ -3465,10 +4296,10 @@ class Collider extends engine_dist.ParticlesInteractorBase {
|
|
|
3465
4296
|
reset() {}
|
|
3466
4297
|
|
|
3467
4298
|
interact(p1) {
|
|
3468
|
-
const container = this.container
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
4299
|
+
const container = this.container,
|
|
4300
|
+
pos1 = p1.getPosition(),
|
|
4301
|
+
radius1 = p1.getRadius(),
|
|
4302
|
+
query = container.particles.quadTree.queryCircle(pos1, radius1 * 2);
|
|
3472
4303
|
|
|
3473
4304
|
for (const p2 of query) {
|
|
3474
4305
|
if (p1 === p2 || !p2.options.collisions.enable || p1.options.collisions.mode !== p2.options.collisions.mode || p2.destroyed || p2.spawning) {
|
|
@@ -3476,79 +4307,62 @@ class Collider extends engine_dist.ParticlesInteractorBase {
|
|
|
3476
4307
|
}
|
|
3477
4308
|
|
|
3478
4309
|
const pos2 = p2.getPosition();
|
|
4310
|
+
const radius2 = p2.getRadius();
|
|
3479
4311
|
|
|
3480
|
-
if (Math.round(pos1.z)
|
|
4312
|
+
if (Math.abs(Math.round(pos1.z) - Math.round(pos2.z)) > radius1 + radius2) {
|
|
3481
4313
|
continue;
|
|
3482
4314
|
}
|
|
3483
4315
|
|
|
3484
4316
|
const dist = (0,engine_dist.getDistance)(pos1, pos2);
|
|
3485
|
-
const radius2 = p2.getRadius();
|
|
3486
4317
|
const distP = radius1 + radius2;
|
|
3487
4318
|
|
|
3488
|
-
if (dist
|
|
3489
|
-
|
|
4319
|
+
if (dist > distP) {
|
|
4320
|
+
continue;
|
|
3490
4321
|
}
|
|
4322
|
+
|
|
4323
|
+
resolveCollision(p1, p2, container.fpsLimit / 1000, container.retina.pixelRatio);
|
|
3491
4324
|
}
|
|
3492
4325
|
}
|
|
3493
4326
|
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
case engine_dist.CollisionMode.bounce:
|
|
3503
|
-
{
|
|
3504
|
-
bounce(p1, p2);
|
|
3505
|
-
break;
|
|
3506
|
-
}
|
|
4327
|
+
}
|
|
4328
|
+
;// CONCATENATED MODULE: ../../interactions/particles/collisions/dist/index.js
|
|
4329
|
+
var collisions_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
4330
|
+
function adopt(value) {
|
|
4331
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
4332
|
+
resolve(value);
|
|
4333
|
+
});
|
|
4334
|
+
}
|
|
3507
4335
|
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
4336
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4337
|
+
function fulfilled(value) {
|
|
4338
|
+
try {
|
|
4339
|
+
step(generator.next(value));
|
|
4340
|
+
} catch (e) {
|
|
4341
|
+
reject(e);
|
|
4342
|
+
}
|
|
3513
4343
|
}
|
|
3514
|
-
}
|
|
3515
|
-
|
|
3516
|
-
absorb(p1, p2) {
|
|
3517
|
-
const container = this.container;
|
|
3518
|
-
const fps = container.fpsLimit / 1000;
|
|
3519
|
-
|
|
3520
|
-
if (p1.getRadius() === undefined && p2.getRadius() !== undefined) {
|
|
3521
|
-
p1.destroy();
|
|
3522
|
-
} else if (p1.getRadius() !== undefined && p2.getRadius() === undefined) {
|
|
3523
|
-
p2.destroy();
|
|
3524
|
-
} else if (p1.getRadius() !== undefined && p2.getRadius() !== undefined) {
|
|
3525
|
-
if (p1.getRadius() >= p2.getRadius()) {
|
|
3526
|
-
const factor = (0,engine_dist.clamp)(p1.getRadius() / p2.getRadius(), 0, p2.getRadius()) * fps;
|
|
3527
|
-
p1.size.value += factor;
|
|
3528
|
-
p2.size.value -= factor;
|
|
3529
|
-
|
|
3530
|
-
if (p2.getRadius() <= container.retina.pixelRatio) {
|
|
3531
|
-
p2.size.value = 0;
|
|
3532
|
-
p2.destroy();
|
|
3533
|
-
}
|
|
3534
|
-
} else {
|
|
3535
|
-
const factor = (0,engine_dist.clamp)(p2.getRadius() / p1.getRadius(), 0, p1.getRadius()) * fps;
|
|
3536
|
-
p1.size.value -= factor;
|
|
3537
|
-
p2.size.value += factor;
|
|
3538
4344
|
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
4345
|
+
function rejected(value) {
|
|
4346
|
+
try {
|
|
4347
|
+
step(generator["throw"](value));
|
|
4348
|
+
} catch (e) {
|
|
4349
|
+
reject(e);
|
|
3543
4350
|
}
|
|
3544
4351
|
}
|
|
3545
|
-
}
|
|
3546
4352
|
|
|
3547
|
-
|
|
3548
|
-
|
|
4353
|
+
function step(result) {
|
|
4354
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
4355
|
+
}
|
|
4356
|
+
|
|
4357
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4358
|
+
});
|
|
4359
|
+
};
|
|
4360
|
+
|
|
3549
4361
|
|
|
3550
4362
|
function loadParticlesCollisionsInteraction(tsParticles) {
|
|
3551
|
-
|
|
4363
|
+
return collisions_dist_awaiter(this, void 0, void 0, function* () {
|
|
4364
|
+
yield tsParticles.addInteractor("particlesCollisions", container => new Collider(container));
|
|
4365
|
+
});
|
|
3552
4366
|
}
|
|
3553
4367
|
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/Linker.js
|
|
3554
4368
|
|
|
@@ -3664,8 +4478,116 @@ class Linker extends engine_dist.ParticlesInteractorBase {
|
|
|
3664
4478
|
}
|
|
3665
4479
|
|
|
3666
4480
|
}
|
|
4481
|
+
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/Utils.js
|
|
4482
|
+
|
|
4483
|
+
function drawLinkLine(context, width, begin, end, maxDistance, canvasSize, warp, backgroundMask, composite, colorLine, opacity, shadow) {
|
|
4484
|
+
let drawn = false;
|
|
4485
|
+
|
|
4486
|
+
if ((0,engine_dist.getDistance)(begin, end) <= maxDistance) {
|
|
4487
|
+
(0,engine_dist.drawLine)(context, begin, end);
|
|
4488
|
+
drawn = true;
|
|
4489
|
+
} else if (warp) {
|
|
4490
|
+
let pi1;
|
|
4491
|
+
let pi2;
|
|
4492
|
+
const endNE = {
|
|
4493
|
+
x: end.x - canvasSize.width,
|
|
4494
|
+
y: end.y
|
|
4495
|
+
};
|
|
4496
|
+
const d1 = (0,engine_dist.getDistances)(begin, endNE);
|
|
4497
|
+
|
|
4498
|
+
if (d1.distance <= maxDistance) {
|
|
4499
|
+
const yi = begin.y - d1.dy / d1.dx * begin.x;
|
|
4500
|
+
pi1 = {
|
|
4501
|
+
x: 0,
|
|
4502
|
+
y: yi
|
|
4503
|
+
};
|
|
4504
|
+
pi2 = {
|
|
4505
|
+
x: canvasSize.width,
|
|
4506
|
+
y: yi
|
|
4507
|
+
};
|
|
4508
|
+
} else {
|
|
4509
|
+
const endSW = {
|
|
4510
|
+
x: end.x,
|
|
4511
|
+
y: end.y - canvasSize.height
|
|
4512
|
+
};
|
|
4513
|
+
const d2 = (0,engine_dist.getDistances)(begin, endSW);
|
|
4514
|
+
|
|
4515
|
+
if (d2.distance <= maxDistance) {
|
|
4516
|
+
const yi = begin.y - d2.dy / d2.dx * begin.x;
|
|
4517
|
+
const xi = -yi / (d2.dy / d2.dx);
|
|
4518
|
+
pi1 = {
|
|
4519
|
+
x: xi,
|
|
4520
|
+
y: 0
|
|
4521
|
+
};
|
|
4522
|
+
pi2 = {
|
|
4523
|
+
x: xi,
|
|
4524
|
+
y: canvasSize.height
|
|
4525
|
+
};
|
|
4526
|
+
} else {
|
|
4527
|
+
const endSE = {
|
|
4528
|
+
x: end.x - canvasSize.width,
|
|
4529
|
+
y: end.y - canvasSize.height
|
|
4530
|
+
};
|
|
4531
|
+
const d3 = (0,engine_dist.getDistances)(begin, endSE);
|
|
4532
|
+
|
|
4533
|
+
if (d3.distance <= maxDistance) {
|
|
4534
|
+
const yi = begin.y - d3.dy / d3.dx * begin.x;
|
|
4535
|
+
const xi = -yi / (d3.dy / d3.dx);
|
|
4536
|
+
pi1 = {
|
|
4537
|
+
x: xi,
|
|
4538
|
+
y: yi
|
|
4539
|
+
};
|
|
4540
|
+
pi2 = {
|
|
4541
|
+
x: pi1.x + canvasSize.width,
|
|
4542
|
+
y: pi1.y + canvasSize.height
|
|
4543
|
+
};
|
|
4544
|
+
}
|
|
4545
|
+
}
|
|
4546
|
+
}
|
|
4547
|
+
|
|
4548
|
+
if (pi1 && pi2) {
|
|
4549
|
+
(0,engine_dist.drawLine)(context, begin, pi1);
|
|
4550
|
+
(0,engine_dist.drawLine)(context, end, pi2);
|
|
4551
|
+
drawn = true;
|
|
4552
|
+
}
|
|
4553
|
+
}
|
|
4554
|
+
|
|
4555
|
+
if (!drawn) {
|
|
4556
|
+
return;
|
|
4557
|
+
}
|
|
4558
|
+
|
|
4559
|
+
context.lineWidth = width;
|
|
4560
|
+
|
|
4561
|
+
if (backgroundMask) {
|
|
4562
|
+
context.globalCompositeOperation = composite;
|
|
4563
|
+
}
|
|
4564
|
+
|
|
4565
|
+
context.strokeStyle = (0,engine_dist.getStyleFromRgb)(colorLine, opacity);
|
|
4566
|
+
|
|
4567
|
+
if (shadow.enable) {
|
|
4568
|
+
const shadowColor = (0,engine_dist.colorToRgb)(shadow.color);
|
|
4569
|
+
|
|
4570
|
+
if (shadowColor) {
|
|
4571
|
+
context.shadowBlur = shadow.blur;
|
|
4572
|
+
context.shadowColor = (0,engine_dist.getStyleFromRgb)(shadowColor);
|
|
4573
|
+
}
|
|
4574
|
+
}
|
|
4575
|
+
|
|
4576
|
+
context.stroke();
|
|
4577
|
+
}
|
|
4578
|
+
function drawLinkTriangle(context, pos1, pos2, pos3, backgroundMask, composite, colorTriangle, opacityTriangle) {
|
|
4579
|
+
(0,engine_dist.drawTriangle)(context, pos1, pos2, pos3);
|
|
4580
|
+
|
|
4581
|
+
if (backgroundMask) {
|
|
4582
|
+
context.globalCompositeOperation = composite;
|
|
4583
|
+
}
|
|
4584
|
+
|
|
4585
|
+
context.fillStyle = (0,engine_dist.getStyleFromRgb)(colorTriangle, opacityTriangle);
|
|
4586
|
+
context.fill();
|
|
4587
|
+
}
|
|
3667
4588
|
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/LinkInstance.js
|
|
3668
4589
|
|
|
4590
|
+
|
|
3669
4591
|
class LinkInstance {
|
|
3670
4592
|
constructor(container) {
|
|
3671
4593
|
this.container = container;
|
|
@@ -3741,10 +4663,11 @@ class LinkInstance {
|
|
|
3741
4663
|
return;
|
|
3742
4664
|
}
|
|
3743
4665
|
|
|
3744
|
-
const pos1 = p1.getPosition();
|
|
3745
|
-
const pos2 = p2.getPosition();
|
|
3746
|
-
const pos3 = p3.getPosition();
|
|
3747
4666
|
container.canvas.draw(ctx => {
|
|
4667
|
+
const pos1 = p1.getPosition();
|
|
4668
|
+
const pos2 = p2.getPosition();
|
|
4669
|
+
const pos3 = p3.getPosition();
|
|
4670
|
+
|
|
3748
4671
|
if ((0,engine_dist.getDistance)(pos1, pos2) > container.retina.linksDistance || (0,engine_dist.getDistance)(pos3, pos2) > container.retina.linksDistance || (0,engine_dist.getDistance)(pos3, pos1) > container.retina.linksDistance) {
|
|
3749
4672
|
return;
|
|
3750
4673
|
}
|
|
@@ -3761,7 +4684,7 @@ class LinkInstance {
|
|
|
3761
4684
|
return;
|
|
3762
4685
|
}
|
|
3763
4686
|
|
|
3764
|
-
|
|
4687
|
+
drawLinkTriangle(ctx, pos1, pos2, pos3, options.backgroundMask.enable, options.backgroundMask.composite, colorTriangle, opacityTriangle);
|
|
3765
4688
|
});
|
|
3766
4689
|
}
|
|
3767
4690
|
|
|
@@ -3801,12 +4724,44 @@ class LinkInstance {
|
|
|
3801
4724
|
|
|
3802
4725
|
const width = (_a = p1.retina.linksWidth) !== null && _a !== void 0 ? _a : container.retina.linksWidth;
|
|
3803
4726
|
const maxDistance = (_b = p1.retina.linksDistance) !== null && _b !== void 0 ? _b : container.retina.linksDistance;
|
|
3804
|
-
|
|
4727
|
+
drawLinkLine(ctx, width, pos1, pos2, maxDistance, container.canvas.size, p1.options.links.warp, options.backgroundMask.enable, options.backgroundMask.composite, colorLine, opacity, p1.options.links.shadow);
|
|
3805
4728
|
});
|
|
3806
4729
|
}
|
|
3807
4730
|
|
|
3808
4731
|
}
|
|
3809
4732
|
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/plugin.js
|
|
4733
|
+
var plugin_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
4734
|
+
function adopt(value) {
|
|
4735
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
4736
|
+
resolve(value);
|
|
4737
|
+
});
|
|
4738
|
+
}
|
|
4739
|
+
|
|
4740
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4741
|
+
function fulfilled(value) {
|
|
4742
|
+
try {
|
|
4743
|
+
step(generator.next(value));
|
|
4744
|
+
} catch (e) {
|
|
4745
|
+
reject(e);
|
|
4746
|
+
}
|
|
4747
|
+
}
|
|
4748
|
+
|
|
4749
|
+
function rejected(value) {
|
|
4750
|
+
try {
|
|
4751
|
+
step(generator["throw"](value));
|
|
4752
|
+
} catch (e) {
|
|
4753
|
+
reject(e);
|
|
4754
|
+
}
|
|
4755
|
+
}
|
|
4756
|
+
|
|
4757
|
+
function step(result) {
|
|
4758
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
4759
|
+
}
|
|
4760
|
+
|
|
4761
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4762
|
+
});
|
|
4763
|
+
};
|
|
4764
|
+
|
|
3810
4765
|
|
|
3811
4766
|
|
|
3812
4767
|
class Index {
|
|
@@ -3827,18 +4782,56 @@ class Index {
|
|
|
3827
4782
|
}
|
|
3828
4783
|
|
|
3829
4784
|
function loadPlugin(tsParticles) {
|
|
3830
|
-
|
|
3831
|
-
|
|
4785
|
+
return plugin_awaiter(this, void 0, void 0, function* () {
|
|
4786
|
+
const plugin = new Index();
|
|
4787
|
+
yield tsParticles.addPlugin(plugin);
|
|
4788
|
+
});
|
|
3832
4789
|
}
|
|
3833
4790
|
;// CONCATENATED MODULE: ../../interactions/particles/links/dist/index.js
|
|
4791
|
+
var links_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
4792
|
+
function adopt(value) {
|
|
4793
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
4794
|
+
resolve(value);
|
|
4795
|
+
});
|
|
4796
|
+
}
|
|
4797
|
+
|
|
4798
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4799
|
+
function fulfilled(value) {
|
|
4800
|
+
try {
|
|
4801
|
+
step(generator.next(value));
|
|
4802
|
+
} catch (e) {
|
|
4803
|
+
reject(e);
|
|
4804
|
+
}
|
|
4805
|
+
}
|
|
4806
|
+
|
|
4807
|
+
function rejected(value) {
|
|
4808
|
+
try {
|
|
4809
|
+
step(generator["throw"](value));
|
|
4810
|
+
} catch (e) {
|
|
4811
|
+
reject(e);
|
|
4812
|
+
}
|
|
4813
|
+
}
|
|
4814
|
+
|
|
4815
|
+
function step(result) {
|
|
4816
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
4817
|
+
}
|
|
4818
|
+
|
|
4819
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4820
|
+
});
|
|
4821
|
+
};
|
|
4822
|
+
|
|
3834
4823
|
|
|
3835
4824
|
|
|
3836
4825
|
function loadInteraction(tsParticles) {
|
|
3837
|
-
|
|
4826
|
+
return links_dist_awaiter(this, void 0, void 0, function* () {
|
|
4827
|
+
yield tsParticles.addInteractor("particlesLinks", container => new Linker(container));
|
|
4828
|
+
});
|
|
3838
4829
|
}
|
|
3839
4830
|
function loadParticlesLinksInteraction(tsParticles) {
|
|
3840
|
-
|
|
3841
|
-
|
|
4831
|
+
return links_dist_awaiter(this, void 0, void 0, function* () {
|
|
4832
|
+
yield loadInteraction(tsParticles);
|
|
4833
|
+
yield loadPlugin(tsParticles);
|
|
4834
|
+
});
|
|
3842
4835
|
}
|
|
3843
4836
|
;// CONCATENATED MODULE: ../../shapes/circle/dist/CircleDrawer.js
|
|
3844
4837
|
class CircleDrawer {
|
|
@@ -3852,12 +4845,46 @@ class CircleDrawer {
|
|
|
3852
4845
|
|
|
3853
4846
|
}
|
|
3854
4847
|
;// CONCATENATED MODULE: ../../shapes/circle/dist/index.js
|
|
4848
|
+
var circle_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
4849
|
+
function adopt(value) {
|
|
4850
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
4851
|
+
resolve(value);
|
|
4852
|
+
});
|
|
4853
|
+
}
|
|
4854
|
+
|
|
4855
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4856
|
+
function fulfilled(value) {
|
|
4857
|
+
try {
|
|
4858
|
+
step(generator.next(value));
|
|
4859
|
+
} catch (e) {
|
|
4860
|
+
reject(e);
|
|
4861
|
+
}
|
|
4862
|
+
}
|
|
4863
|
+
|
|
4864
|
+
function rejected(value) {
|
|
4865
|
+
try {
|
|
4866
|
+
step(generator["throw"](value));
|
|
4867
|
+
} catch (e) {
|
|
4868
|
+
reject(e);
|
|
4869
|
+
}
|
|
4870
|
+
}
|
|
4871
|
+
|
|
4872
|
+
function step(result) {
|
|
4873
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
4874
|
+
}
|
|
4875
|
+
|
|
4876
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4877
|
+
});
|
|
4878
|
+
};
|
|
4879
|
+
|
|
3855
4880
|
|
|
3856
4881
|
function loadCircleShape(tsParticles) {
|
|
3857
|
-
|
|
4882
|
+
return circle_dist_awaiter(this, void 0, void 0, function* () {
|
|
4883
|
+
yield tsParticles.addShape("circle", new CircleDrawer());
|
|
4884
|
+
});
|
|
3858
4885
|
}
|
|
3859
4886
|
;// CONCATENATED MODULE: ../../shapes/image/dist/Utils.js
|
|
3860
|
-
var
|
|
4887
|
+
var Utils_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
3861
4888
|
function adopt(value) {
|
|
3862
4889
|
return value instanceof P ? value : new P(function (resolve) {
|
|
3863
4890
|
resolve(value);
|
|
@@ -3913,7 +4940,7 @@ function loadImage(source) {
|
|
|
3913
4940
|
});
|
|
3914
4941
|
}
|
|
3915
4942
|
function downloadSvgImage(source) {
|
|
3916
|
-
return
|
|
4943
|
+
return Utils_awaiter(this, void 0, void 0, function* () {
|
|
3917
4944
|
if (!source) {
|
|
3918
4945
|
throw new Error("Error tsParticles - No image.src");
|
|
3919
4946
|
}
|
|
@@ -4243,11 +5270,45 @@ class ImageDrawer {
|
|
|
4243
5270
|
}
|
|
4244
5271
|
_ImageDrawer_images = new WeakMap();
|
|
4245
5272
|
;// CONCATENATED MODULE: ../../shapes/image/dist/index.js
|
|
5273
|
+
var image_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5274
|
+
function adopt(value) {
|
|
5275
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
5276
|
+
resolve(value);
|
|
5277
|
+
});
|
|
5278
|
+
}
|
|
5279
|
+
|
|
5280
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5281
|
+
function fulfilled(value) {
|
|
5282
|
+
try {
|
|
5283
|
+
step(generator.next(value));
|
|
5284
|
+
} catch (e) {
|
|
5285
|
+
reject(e);
|
|
5286
|
+
}
|
|
5287
|
+
}
|
|
5288
|
+
|
|
5289
|
+
function rejected(value) {
|
|
5290
|
+
try {
|
|
5291
|
+
step(generator["throw"](value));
|
|
5292
|
+
} catch (e) {
|
|
5293
|
+
reject(e);
|
|
5294
|
+
}
|
|
5295
|
+
}
|
|
5296
|
+
|
|
5297
|
+
function step(result) {
|
|
5298
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
5299
|
+
}
|
|
5300
|
+
|
|
5301
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
5302
|
+
});
|
|
5303
|
+
};
|
|
5304
|
+
|
|
4246
5305
|
|
|
4247
5306
|
function loadImageShape(tsParticles) {
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
5307
|
+
return image_dist_awaiter(this, void 0, void 0, function* () {
|
|
5308
|
+
const imageDrawer = new ImageDrawer();
|
|
5309
|
+
yield tsParticles.addShape("image", imageDrawer);
|
|
5310
|
+
yield tsParticles.addShape("images", imageDrawer);
|
|
5311
|
+
});
|
|
4251
5312
|
}
|
|
4252
5313
|
;// CONCATENATED MODULE: ../../shapes/line/dist/LineDrawer.js
|
|
4253
5314
|
class LineDrawer {
|
|
@@ -4262,9 +5323,43 @@ class LineDrawer {
|
|
|
4262
5323
|
|
|
4263
5324
|
}
|
|
4264
5325
|
;// CONCATENATED MODULE: ../../shapes/line/dist/index.js
|
|
5326
|
+
var line_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5327
|
+
function adopt(value) {
|
|
5328
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
5329
|
+
resolve(value);
|
|
5330
|
+
});
|
|
5331
|
+
}
|
|
5332
|
+
|
|
5333
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5334
|
+
function fulfilled(value) {
|
|
5335
|
+
try {
|
|
5336
|
+
step(generator.next(value));
|
|
5337
|
+
} catch (e) {
|
|
5338
|
+
reject(e);
|
|
5339
|
+
}
|
|
5340
|
+
}
|
|
5341
|
+
|
|
5342
|
+
function rejected(value) {
|
|
5343
|
+
try {
|
|
5344
|
+
step(generator["throw"](value));
|
|
5345
|
+
} catch (e) {
|
|
5346
|
+
reject(e);
|
|
5347
|
+
}
|
|
5348
|
+
}
|
|
5349
|
+
|
|
5350
|
+
function step(result) {
|
|
5351
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
5352
|
+
}
|
|
5353
|
+
|
|
5354
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
5355
|
+
});
|
|
5356
|
+
};
|
|
5357
|
+
|
|
4265
5358
|
|
|
4266
5359
|
function loadLineShape(tsParticles) {
|
|
4267
|
-
|
|
5360
|
+
return line_dist_awaiter(this, void 0, void 0, function* () {
|
|
5361
|
+
yield tsParticles.addShape("line", new LineDrawer());
|
|
5362
|
+
});
|
|
4268
5363
|
}
|
|
4269
5364
|
;// CONCATENATED MODULE: ../../shapes/polygon/dist/PolygonDrawerBase.js
|
|
4270
5365
|
class PolygonDrawerBase {
|
|
@@ -4351,17 +5446,55 @@ class TriangleDrawer extends PolygonDrawerBase {
|
|
|
4351
5446
|
|
|
4352
5447
|
}
|
|
4353
5448
|
;// CONCATENATED MODULE: ../../shapes/polygon/dist/index.js
|
|
5449
|
+
var polygon_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5450
|
+
function adopt(value) {
|
|
5451
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
5452
|
+
resolve(value);
|
|
5453
|
+
});
|
|
5454
|
+
}
|
|
5455
|
+
|
|
5456
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5457
|
+
function fulfilled(value) {
|
|
5458
|
+
try {
|
|
5459
|
+
step(generator.next(value));
|
|
5460
|
+
} catch (e) {
|
|
5461
|
+
reject(e);
|
|
5462
|
+
}
|
|
5463
|
+
}
|
|
5464
|
+
|
|
5465
|
+
function rejected(value) {
|
|
5466
|
+
try {
|
|
5467
|
+
step(generator["throw"](value));
|
|
5468
|
+
} catch (e) {
|
|
5469
|
+
reject(e);
|
|
5470
|
+
}
|
|
5471
|
+
}
|
|
5472
|
+
|
|
5473
|
+
function step(result) {
|
|
5474
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
5475
|
+
}
|
|
5476
|
+
|
|
5477
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
5478
|
+
});
|
|
5479
|
+
};
|
|
5480
|
+
|
|
4354
5481
|
|
|
4355
5482
|
|
|
4356
5483
|
function loadGenericPolygonShape(tsParticles) {
|
|
4357
|
-
|
|
5484
|
+
return polygon_dist_awaiter(this, void 0, void 0, function* () {
|
|
5485
|
+
yield tsParticles.addShape("polygon", new PolygonDrawer());
|
|
5486
|
+
});
|
|
4358
5487
|
}
|
|
4359
5488
|
function loadTriangleShape(tsParticles) {
|
|
4360
|
-
|
|
5489
|
+
return polygon_dist_awaiter(this, void 0, void 0, function* () {
|
|
5490
|
+
yield tsParticles.addShape("triangle", new TriangleDrawer());
|
|
5491
|
+
});
|
|
4361
5492
|
}
|
|
4362
5493
|
function loadPolygonShape(tsParticles) {
|
|
4363
|
-
|
|
4364
|
-
|
|
5494
|
+
return polygon_dist_awaiter(this, void 0, void 0, function* () {
|
|
5495
|
+
yield loadGenericPolygonShape(tsParticles);
|
|
5496
|
+
yield loadTriangleShape(tsParticles);
|
|
5497
|
+
});
|
|
4365
5498
|
}
|
|
4366
5499
|
;// CONCATENATED MODULE: ../../shapes/square/dist/SquareDrawer.js
|
|
4367
5500
|
const fixFactor = Math.sqrt(2);
|
|
@@ -4376,11 +5509,45 @@ class SquareDrawer {
|
|
|
4376
5509
|
|
|
4377
5510
|
}
|
|
4378
5511
|
;// CONCATENATED MODULE: ../../shapes/square/dist/index.js
|
|
5512
|
+
var square_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5513
|
+
function adopt(value) {
|
|
5514
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
5515
|
+
resolve(value);
|
|
5516
|
+
});
|
|
5517
|
+
}
|
|
5518
|
+
|
|
5519
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5520
|
+
function fulfilled(value) {
|
|
5521
|
+
try {
|
|
5522
|
+
step(generator.next(value));
|
|
5523
|
+
} catch (e) {
|
|
5524
|
+
reject(e);
|
|
5525
|
+
}
|
|
5526
|
+
}
|
|
5527
|
+
|
|
5528
|
+
function rejected(value) {
|
|
5529
|
+
try {
|
|
5530
|
+
step(generator["throw"](value));
|
|
5531
|
+
} catch (e) {
|
|
5532
|
+
reject(e);
|
|
5533
|
+
}
|
|
5534
|
+
}
|
|
5535
|
+
|
|
5536
|
+
function step(result) {
|
|
5537
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
5538
|
+
}
|
|
5539
|
+
|
|
5540
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
5541
|
+
});
|
|
5542
|
+
};
|
|
5543
|
+
|
|
4379
5544
|
|
|
4380
5545
|
function loadSquareShape(tsParticles) {
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
5546
|
+
return square_dist_awaiter(this, void 0, void 0, function* () {
|
|
5547
|
+
const drawer = new SquareDrawer();
|
|
5548
|
+
yield tsParticles.addShape("edge", drawer);
|
|
5549
|
+
yield tsParticles.addShape("square", drawer);
|
|
5550
|
+
});
|
|
4384
5551
|
}
|
|
4385
5552
|
;// CONCATENATED MODULE: ../../shapes/star/dist/StarDrawer.js
|
|
4386
5553
|
class StarDrawer {
|
|
@@ -4409,9 +5576,43 @@ class StarDrawer {
|
|
|
4409
5576
|
|
|
4410
5577
|
}
|
|
4411
5578
|
;// CONCATENATED MODULE: ../../shapes/star/dist/index.js
|
|
5579
|
+
var star_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5580
|
+
function adopt(value) {
|
|
5581
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
5582
|
+
resolve(value);
|
|
5583
|
+
});
|
|
5584
|
+
}
|
|
5585
|
+
|
|
5586
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5587
|
+
function fulfilled(value) {
|
|
5588
|
+
try {
|
|
5589
|
+
step(generator.next(value));
|
|
5590
|
+
} catch (e) {
|
|
5591
|
+
reject(e);
|
|
5592
|
+
}
|
|
5593
|
+
}
|
|
5594
|
+
|
|
5595
|
+
function rejected(value) {
|
|
5596
|
+
try {
|
|
5597
|
+
step(generator["throw"](value));
|
|
5598
|
+
} catch (e) {
|
|
5599
|
+
reject(e);
|
|
5600
|
+
}
|
|
5601
|
+
}
|
|
5602
|
+
|
|
5603
|
+
function step(result) {
|
|
5604
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
5605
|
+
}
|
|
5606
|
+
|
|
5607
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
5608
|
+
});
|
|
5609
|
+
};
|
|
5610
|
+
|
|
4412
5611
|
|
|
4413
5612
|
function loadStarShape(tsParticles) {
|
|
4414
|
-
|
|
5613
|
+
return star_dist_awaiter(this, void 0, void 0, function* () {
|
|
5614
|
+
yield tsParticles.addShape("star", new StarDrawer());
|
|
5615
|
+
});
|
|
4415
5616
|
}
|
|
4416
5617
|
;// CONCATENATED MODULE: ../../shapes/text/dist/TextDrawer.js
|
|
4417
5618
|
var TextDrawer_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
@@ -4523,13 +5724,47 @@ class TextDrawer {
|
|
|
4523
5724
|
|
|
4524
5725
|
}
|
|
4525
5726
|
;// CONCATENATED MODULE: ../../shapes/text/dist/index.js
|
|
5727
|
+
var text_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5728
|
+
function adopt(value) {
|
|
5729
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
5730
|
+
resolve(value);
|
|
5731
|
+
});
|
|
5732
|
+
}
|
|
5733
|
+
|
|
5734
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5735
|
+
function fulfilled(value) {
|
|
5736
|
+
try {
|
|
5737
|
+
step(generator.next(value));
|
|
5738
|
+
} catch (e) {
|
|
5739
|
+
reject(e);
|
|
5740
|
+
}
|
|
5741
|
+
}
|
|
5742
|
+
|
|
5743
|
+
function rejected(value) {
|
|
5744
|
+
try {
|
|
5745
|
+
step(generator["throw"](value));
|
|
5746
|
+
} catch (e) {
|
|
5747
|
+
reject(e);
|
|
5748
|
+
}
|
|
5749
|
+
}
|
|
5750
|
+
|
|
5751
|
+
function step(result) {
|
|
5752
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
5753
|
+
}
|
|
5754
|
+
|
|
5755
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
5756
|
+
});
|
|
5757
|
+
};
|
|
5758
|
+
|
|
4526
5759
|
|
|
4527
5760
|
function loadTextShape(tsParticles) {
|
|
4528
|
-
|
|
5761
|
+
return text_dist_awaiter(this, void 0, void 0, function* () {
|
|
5762
|
+
const drawer = new TextDrawer();
|
|
4529
5763
|
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
5764
|
+
for (const type of validTypes) {
|
|
5765
|
+
yield tsParticles.addShape(type, drawer);
|
|
5766
|
+
}
|
|
5767
|
+
});
|
|
4533
5768
|
}
|
|
4534
5769
|
;// CONCATENATED MODULE: ../../updaters/life/dist/LifeUpdater.js
|
|
4535
5770
|
|
|
@@ -4610,9 +5845,43 @@ class LifeUpdater {
|
|
|
4610
5845
|
|
|
4611
5846
|
}
|
|
4612
5847
|
;// CONCATENATED MODULE: ../../updaters/life/dist/index.js
|
|
5848
|
+
var life_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5849
|
+
function adopt(value) {
|
|
5850
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
5851
|
+
resolve(value);
|
|
5852
|
+
});
|
|
5853
|
+
}
|
|
5854
|
+
|
|
5855
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5856
|
+
function fulfilled(value) {
|
|
5857
|
+
try {
|
|
5858
|
+
step(generator.next(value));
|
|
5859
|
+
} catch (e) {
|
|
5860
|
+
reject(e);
|
|
5861
|
+
}
|
|
5862
|
+
}
|
|
5863
|
+
|
|
5864
|
+
function rejected(value) {
|
|
5865
|
+
try {
|
|
5866
|
+
step(generator["throw"](value));
|
|
5867
|
+
} catch (e) {
|
|
5868
|
+
reject(e);
|
|
5869
|
+
}
|
|
5870
|
+
}
|
|
5871
|
+
|
|
5872
|
+
function step(result) {
|
|
5873
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
5874
|
+
}
|
|
5875
|
+
|
|
5876
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
5877
|
+
});
|
|
5878
|
+
};
|
|
5879
|
+
|
|
4613
5880
|
|
|
4614
5881
|
function loadLifeUpdater(tsParticles) {
|
|
4615
|
-
|
|
5882
|
+
return life_dist_awaiter(this, void 0, void 0, function* () {
|
|
5883
|
+
yield tsParticles.addParticleUpdater("life", container => new LifeUpdater(container));
|
|
5884
|
+
});
|
|
4616
5885
|
}
|
|
4617
5886
|
;// CONCATENATED MODULE: ../../updaters/opacity/dist/OpacityUpdater.js
|
|
4618
5887
|
|
|
@@ -4753,9 +6022,43 @@ class OpacityUpdater {
|
|
|
4753
6022
|
|
|
4754
6023
|
}
|
|
4755
6024
|
;// CONCATENATED MODULE: ../../updaters/opacity/dist/index.js
|
|
6025
|
+
var opacity_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
6026
|
+
function adopt(value) {
|
|
6027
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
6028
|
+
resolve(value);
|
|
6029
|
+
});
|
|
6030
|
+
}
|
|
6031
|
+
|
|
6032
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6033
|
+
function fulfilled(value) {
|
|
6034
|
+
try {
|
|
6035
|
+
step(generator.next(value));
|
|
6036
|
+
} catch (e) {
|
|
6037
|
+
reject(e);
|
|
6038
|
+
}
|
|
6039
|
+
}
|
|
6040
|
+
|
|
6041
|
+
function rejected(value) {
|
|
6042
|
+
try {
|
|
6043
|
+
step(generator["throw"](value));
|
|
6044
|
+
} catch (e) {
|
|
6045
|
+
reject(e);
|
|
6046
|
+
}
|
|
6047
|
+
}
|
|
6048
|
+
|
|
6049
|
+
function step(result) {
|
|
6050
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
6051
|
+
}
|
|
6052
|
+
|
|
6053
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6054
|
+
});
|
|
6055
|
+
};
|
|
6056
|
+
|
|
4756
6057
|
|
|
4757
6058
|
function loadOpacityUpdater(tsParticles) {
|
|
4758
|
-
|
|
6059
|
+
return opacity_dist_awaiter(this, void 0, void 0, function* () {
|
|
6060
|
+
yield tsParticles.addParticleUpdater("opacity", container => new OpacityUpdater(container));
|
|
6061
|
+
});
|
|
4759
6062
|
}
|
|
4760
6063
|
;// CONCATENATED MODULE: ../../updaters/size/dist/SizeUpdater.js
|
|
4761
6064
|
|
|
@@ -4833,22 +6136,56 @@ class SizeUpdater {
|
|
|
4833
6136
|
isEnabled(particle) {
|
|
4834
6137
|
var _a, _b, _c;
|
|
4835
6138
|
|
|
4836
|
-
return !particle.destroyed && !particle.spawning && particle.size.enable && (((_a = particle.size.loops) !== null && _a !== void 0 ? _a : 0) <= 0 || ((_b = particle.size.loops) !== null && _b !== void 0 ? _b : 0) < ((_c = particle.size.maxLoops) !== null && _c !== void 0 ? _c : 0));
|
|
4837
|
-
}
|
|
6139
|
+
return !particle.destroyed && !particle.spawning && particle.size.enable && (((_a = particle.size.loops) !== null && _a !== void 0 ? _a : 0) <= 0 || ((_b = particle.size.loops) !== null && _b !== void 0 ? _b : 0) < ((_c = particle.size.maxLoops) !== null && _c !== void 0 ? _c : 0));
|
|
6140
|
+
}
|
|
6141
|
+
|
|
6142
|
+
update(particle, delta) {
|
|
6143
|
+
if (!this.isEnabled(particle)) {
|
|
6144
|
+
return;
|
|
6145
|
+
}
|
|
6146
|
+
|
|
6147
|
+
updateSize(particle, delta);
|
|
6148
|
+
}
|
|
6149
|
+
|
|
6150
|
+
}
|
|
6151
|
+
;// CONCATENATED MODULE: ../../updaters/size/dist/index.js
|
|
6152
|
+
var size_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
6153
|
+
function adopt(value) {
|
|
6154
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
6155
|
+
resolve(value);
|
|
6156
|
+
});
|
|
6157
|
+
}
|
|
6158
|
+
|
|
6159
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6160
|
+
function fulfilled(value) {
|
|
6161
|
+
try {
|
|
6162
|
+
step(generator.next(value));
|
|
6163
|
+
} catch (e) {
|
|
6164
|
+
reject(e);
|
|
6165
|
+
}
|
|
6166
|
+
}
|
|
6167
|
+
|
|
6168
|
+
function rejected(value) {
|
|
6169
|
+
try {
|
|
6170
|
+
step(generator["throw"](value));
|
|
6171
|
+
} catch (e) {
|
|
6172
|
+
reject(e);
|
|
6173
|
+
}
|
|
6174
|
+
}
|
|
4838
6175
|
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
return;
|
|
6176
|
+
function step(result) {
|
|
6177
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
4842
6178
|
}
|
|
4843
6179
|
|
|
4844
|
-
|
|
4845
|
-
}
|
|
6180
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6181
|
+
});
|
|
6182
|
+
};
|
|
4846
6183
|
|
|
4847
|
-
}
|
|
4848
|
-
;// CONCATENATED MODULE: ../../updaters/size/dist/index.js
|
|
4849
6184
|
|
|
4850
6185
|
function loadSizeUpdater(tsParticles) {
|
|
4851
|
-
|
|
6186
|
+
return size_dist_awaiter(this, void 0, void 0, function* () {
|
|
6187
|
+
yield tsParticles.addParticleUpdater("size", () => new SizeUpdater());
|
|
6188
|
+
});
|
|
4852
6189
|
}
|
|
4853
6190
|
;// CONCATENATED MODULE: ../../updaters/angle/dist/AngleUpdater.js
|
|
4854
6191
|
|
|
@@ -4915,272 +6252,28 @@ class AngleUpdater {
|
|
|
4915
6252
|
case engine_dist.RotateDirection.counterClockwise:
|
|
4916
6253
|
case "counterClockwise":
|
|
4917
6254
|
particle.rotate.status = engine_dist.AnimationStatus.decreasing;
|
|
4918
|
-
break;
|
|
4919
|
-
|
|
4920
|
-
case engine_dist.RotateDirection.clockwise:
|
|
4921
|
-
particle.rotate.status = engine_dist.AnimationStatus.increasing;
|
|
4922
|
-
break;
|
|
4923
|
-
}
|
|
4924
|
-
|
|
4925
|
-
const rotateAnimation = particle.options.rotate.animation;
|
|
4926
|
-
|
|
4927
|
-
if (rotateAnimation.enable) {
|
|
4928
|
-
particle.rotate.velocity = rotateAnimation.speed / 360 * this.container.retina.reduceFactor;
|
|
4929
|
-
|
|
4930
|
-
if (!rotateAnimation.sync) {
|
|
4931
|
-
particle.rotate.velocity *= Math.random();
|
|
4932
|
-
}
|
|
4933
|
-
}
|
|
4934
|
-
}
|
|
4935
|
-
|
|
4936
|
-
isEnabled(particle) {
|
|
4937
|
-
const rotate = particle.options.rotate;
|
|
4938
|
-
const rotateAnimation = rotate.animation;
|
|
4939
|
-
return !particle.destroyed && !particle.spawning && !rotate.path && rotateAnimation.enable;
|
|
4940
|
-
}
|
|
4941
|
-
|
|
4942
|
-
update(particle, delta) {
|
|
4943
|
-
if (!this.isEnabled(particle)) {
|
|
4944
|
-
return;
|
|
4945
|
-
}
|
|
4946
|
-
|
|
4947
|
-
updateAngle(particle, delta);
|
|
4948
|
-
}
|
|
4949
|
-
|
|
4950
|
-
}
|
|
4951
|
-
;// CONCATENATED MODULE: ../../updaters/angle/dist/index.js
|
|
4952
|
-
|
|
4953
|
-
function loadAngleUpdater(tsParticles) {
|
|
4954
|
-
tsParticles.addParticleUpdater("angle", container => new AngleUpdater(container));
|
|
4955
|
-
}
|
|
4956
|
-
;// CONCATENATED MODULE: ../../updaters/tilt/dist/TiltUpdater.js
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
function updateTilt(particle, delta) {
|
|
4960
|
-
var _a;
|
|
4961
|
-
|
|
4962
|
-
if (!particle.tilt) {
|
|
4963
|
-
return;
|
|
4964
|
-
}
|
|
4965
|
-
|
|
4966
|
-
const tilt = particle.options.tilt;
|
|
4967
|
-
const tiltAnimation = tilt.animation;
|
|
4968
|
-
const speed = ((_a = particle.tilt.velocity) !== null && _a !== void 0 ? _a : 0) * delta.factor;
|
|
4969
|
-
const max = 2 * Math.PI;
|
|
4970
|
-
|
|
4971
|
-
if (!tiltAnimation.enable) {
|
|
4972
|
-
return;
|
|
4973
|
-
}
|
|
4974
|
-
|
|
4975
|
-
switch (particle.tilt.status) {
|
|
4976
|
-
case engine_dist.AnimationStatus.increasing:
|
|
4977
|
-
particle.tilt.value += speed;
|
|
4978
|
-
|
|
4979
|
-
if (particle.tilt.value > max) {
|
|
4980
|
-
particle.tilt.value -= max;
|
|
4981
|
-
}
|
|
4982
|
-
|
|
4983
|
-
break;
|
|
4984
|
-
|
|
4985
|
-
case engine_dist.AnimationStatus.decreasing:
|
|
4986
|
-
default:
|
|
4987
|
-
particle.tilt.value -= speed;
|
|
4988
|
-
|
|
4989
|
-
if (particle.tilt.value < 0) {
|
|
4990
|
-
particle.tilt.value += max;
|
|
4991
|
-
}
|
|
4992
|
-
|
|
4993
|
-
break;
|
|
4994
|
-
}
|
|
4995
|
-
}
|
|
4996
|
-
|
|
4997
|
-
class TiltUpdater {
|
|
4998
|
-
constructor(container) {
|
|
4999
|
-
this.container = container;
|
|
5000
|
-
}
|
|
5001
|
-
|
|
5002
|
-
init(particle) {
|
|
5003
|
-
const tiltOptions = particle.options.tilt;
|
|
5004
|
-
particle.tilt = {
|
|
5005
|
-
enable: tiltOptions.enable,
|
|
5006
|
-
value: (0,engine_dist.getRangeValue)(tiltOptions.value) * Math.PI / 180,
|
|
5007
|
-
sinDirection: Math.random() >= 0.5 ? 1 : -1,
|
|
5008
|
-
cosDirection: Math.random() >= 0.5 ? 1 : -1
|
|
5009
|
-
};
|
|
5010
|
-
let tiltDirection = tiltOptions.direction;
|
|
5011
|
-
|
|
5012
|
-
if (tiltDirection === engine_dist.TiltDirection.random) {
|
|
5013
|
-
const index = Math.floor(Math.random() * 2);
|
|
5014
|
-
tiltDirection = index > 0 ? engine_dist.TiltDirection.counterClockwise : engine_dist.TiltDirection.clockwise;
|
|
5015
|
-
}
|
|
5016
|
-
|
|
5017
|
-
switch (tiltDirection) {
|
|
5018
|
-
case engine_dist.TiltDirection.counterClockwise:
|
|
5019
|
-
case "counterClockwise":
|
|
5020
|
-
particle.tilt.status = engine_dist.AnimationStatus.decreasing;
|
|
5021
|
-
break;
|
|
5022
|
-
|
|
5023
|
-
case engine_dist.TiltDirection.clockwise:
|
|
5024
|
-
particle.tilt.status = engine_dist.AnimationStatus.increasing;
|
|
5025
|
-
break;
|
|
5026
|
-
}
|
|
5027
|
-
|
|
5028
|
-
const tiltAnimation = particle.options.tilt.animation;
|
|
5029
|
-
|
|
5030
|
-
if (tiltAnimation.enable) {
|
|
5031
|
-
particle.tilt.velocity = tiltAnimation.speed / 360 * this.container.retina.reduceFactor;
|
|
5032
|
-
|
|
5033
|
-
if (!tiltAnimation.sync) {
|
|
5034
|
-
particle.tilt.velocity *= Math.random();
|
|
5035
|
-
}
|
|
5036
|
-
}
|
|
5037
|
-
}
|
|
5038
|
-
|
|
5039
|
-
isEnabled(particle) {
|
|
5040
|
-
const tilt = particle.options.tilt;
|
|
5041
|
-
const tiltAnimation = tilt.animation;
|
|
5042
|
-
return !particle.destroyed && !particle.spawning && tiltAnimation.enable;
|
|
5043
|
-
}
|
|
5044
|
-
|
|
5045
|
-
update(particle, delta) {
|
|
5046
|
-
if (!this.isEnabled(particle)) {
|
|
5047
|
-
return;
|
|
5048
|
-
}
|
|
5049
|
-
|
|
5050
|
-
updateTilt(particle, delta);
|
|
5051
|
-
}
|
|
5052
|
-
|
|
5053
|
-
}
|
|
5054
|
-
;// CONCATENATED MODULE: ../../updaters/tilt/dist/index.js
|
|
5055
|
-
|
|
5056
|
-
function loadTiltUpdater(tsParticles) {
|
|
5057
|
-
tsParticles.addParticleUpdater("tilt", container => new TiltUpdater(container));
|
|
5058
|
-
}
|
|
5059
|
-
;// CONCATENATED MODULE: ../../updaters/roll/dist/RollUpdater.js
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
function updateRoll(particle, delta) {
|
|
5063
|
-
const roll = particle.options.roll;
|
|
5064
|
-
|
|
5065
|
-
if (!particle.roll || !roll.enable) {
|
|
5066
|
-
return;
|
|
5067
|
-
}
|
|
5068
|
-
|
|
5069
|
-
const speed = particle.roll.speed * delta.factor;
|
|
5070
|
-
const max = 2 * Math.PI;
|
|
5071
|
-
particle.roll.angle += speed;
|
|
5072
|
-
|
|
5073
|
-
if (particle.roll.angle > max) {
|
|
5074
|
-
particle.roll.angle -= max;
|
|
5075
|
-
}
|
|
5076
|
-
}
|
|
5077
|
-
|
|
5078
|
-
class RollUpdater {
|
|
5079
|
-
init(particle) {
|
|
5080
|
-
const rollOpt = particle.options.roll;
|
|
5081
|
-
|
|
5082
|
-
if (rollOpt.enable) {
|
|
5083
|
-
particle.roll = {
|
|
5084
|
-
angle: Math.random() * Math.PI * 2,
|
|
5085
|
-
speed: (0,engine_dist.getRangeValue)(rollOpt.speed) / 360
|
|
5086
|
-
};
|
|
5087
|
-
|
|
5088
|
-
if (rollOpt.backColor) {
|
|
5089
|
-
particle.backColor = (0,engine_dist.colorToHsl)(rollOpt.backColor);
|
|
5090
|
-
} else if (rollOpt.darken.enable && rollOpt.enlighten.enable) {
|
|
5091
|
-
const alterType = Math.random() >= 0.5 ? engine_dist.AlterType.darken : engine_dist.AlterType.enlighten;
|
|
5092
|
-
particle.roll.alter = {
|
|
5093
|
-
type: alterType,
|
|
5094
|
-
value: alterType === engine_dist.AlterType.darken ? rollOpt.darken.value : rollOpt.enlighten.value
|
|
5095
|
-
};
|
|
5096
|
-
} else if (rollOpt.darken.enable) {
|
|
5097
|
-
particle.roll.alter = {
|
|
5098
|
-
type: engine_dist.AlterType.darken,
|
|
5099
|
-
value: rollOpt.darken.value
|
|
5100
|
-
};
|
|
5101
|
-
} else if (rollOpt.enlighten.enable) {
|
|
5102
|
-
particle.roll.alter = {
|
|
5103
|
-
type: engine_dist.AlterType.enlighten,
|
|
5104
|
-
value: rollOpt.enlighten.value
|
|
5105
|
-
};
|
|
5106
|
-
}
|
|
5107
|
-
} else {
|
|
5108
|
-
particle.roll = {
|
|
5109
|
-
angle: 0,
|
|
5110
|
-
speed: 0
|
|
5111
|
-
};
|
|
5112
|
-
}
|
|
5113
|
-
}
|
|
5114
|
-
|
|
5115
|
-
isEnabled(particle) {
|
|
5116
|
-
const roll = particle.options.roll;
|
|
5117
|
-
return !particle.destroyed && !particle.spawning && roll.enable;
|
|
5118
|
-
}
|
|
5119
|
-
|
|
5120
|
-
update(particle, delta) {
|
|
5121
|
-
if (!this.isEnabled(particle)) {
|
|
5122
|
-
return;
|
|
5123
|
-
}
|
|
5124
|
-
|
|
5125
|
-
updateRoll(particle, delta);
|
|
5126
|
-
}
|
|
5127
|
-
|
|
5128
|
-
}
|
|
5129
|
-
;// CONCATENATED MODULE: ../../updaters/roll/dist/index.js
|
|
5130
|
-
|
|
5131
|
-
function loadRollUpdater(tsParticles) {
|
|
5132
|
-
tsParticles.addParticleUpdater("roll", () => new RollUpdater());
|
|
5133
|
-
}
|
|
5134
|
-
;// CONCATENATED MODULE: ../../updaters/wobble/dist/WobbleUpdater.js
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
function updateWobble(particle, delta) {
|
|
5138
|
-
var _a;
|
|
5139
|
-
|
|
5140
|
-
const wobble = particle.options.wobble;
|
|
5141
|
-
|
|
5142
|
-
if (!wobble.enable || !particle.wobble) {
|
|
5143
|
-
return;
|
|
5144
|
-
}
|
|
5145
|
-
|
|
5146
|
-
const speed = particle.wobble.speed * delta.factor;
|
|
5147
|
-
const distance = ((_a = particle.retina.wobbleDistance) !== null && _a !== void 0 ? _a : 0) * delta.factor / (1000 / 60);
|
|
5148
|
-
const max = 2 * Math.PI;
|
|
5149
|
-
particle.wobble.angle += speed;
|
|
5150
|
-
|
|
5151
|
-
if (particle.wobble.angle > max) {
|
|
5152
|
-
particle.wobble.angle -= max;
|
|
5153
|
-
}
|
|
6255
|
+
break;
|
|
5154
6256
|
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
6257
|
+
case engine_dist.RotateDirection.clockwise:
|
|
6258
|
+
particle.rotate.status = engine_dist.AnimationStatus.increasing;
|
|
6259
|
+
break;
|
|
6260
|
+
}
|
|
5158
6261
|
|
|
5159
|
-
|
|
5160
|
-
constructor(container) {
|
|
5161
|
-
this.container = container;
|
|
5162
|
-
}
|
|
6262
|
+
const rotateAnimation = particle.options.rotate.animation;
|
|
5163
6263
|
|
|
5164
|
-
|
|
5165
|
-
|
|
6264
|
+
if (rotateAnimation.enable) {
|
|
6265
|
+
particle.rotate.velocity = rotateAnimation.speed / 360 * this.container.retina.reduceFactor;
|
|
5166
6266
|
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
speed: (0,engine_dist.getRangeValue)(wobbleOpt.speed) / 360
|
|
5171
|
-
};
|
|
5172
|
-
} else {
|
|
5173
|
-
particle.wobble = {
|
|
5174
|
-
angle: 0,
|
|
5175
|
-
speed: 0
|
|
5176
|
-
};
|
|
6267
|
+
if (!rotateAnimation.sync) {
|
|
6268
|
+
particle.rotate.velocity *= Math.random();
|
|
6269
|
+
}
|
|
5177
6270
|
}
|
|
5178
|
-
|
|
5179
|
-
particle.retina.wobbleDistance = (0,engine_dist.getRangeValue)(wobbleOpt.distance) * this.container.retina.pixelRatio;
|
|
5180
6271
|
}
|
|
5181
6272
|
|
|
5182
6273
|
isEnabled(particle) {
|
|
5183
|
-
|
|
6274
|
+
const rotate = particle.options.rotate;
|
|
6275
|
+
const rotateAnimation = rotate.animation;
|
|
6276
|
+
return !particle.destroyed && !particle.spawning && !rotate.path && rotateAnimation.enable;
|
|
5184
6277
|
}
|
|
5185
6278
|
|
|
5186
6279
|
update(particle, delta) {
|
|
@@ -5188,14 +6281,48 @@ class WobbleUpdater {
|
|
|
5188
6281
|
return;
|
|
5189
6282
|
}
|
|
5190
6283
|
|
|
5191
|
-
|
|
6284
|
+
updateAngle(particle, delta);
|
|
5192
6285
|
}
|
|
5193
6286
|
|
|
5194
6287
|
}
|
|
5195
|
-
;// CONCATENATED MODULE: ../../updaters/
|
|
6288
|
+
;// CONCATENATED MODULE: ../../updaters/angle/dist/index.js
|
|
6289
|
+
var angle_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
6290
|
+
function adopt(value) {
|
|
6291
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
6292
|
+
resolve(value);
|
|
6293
|
+
});
|
|
6294
|
+
}
|
|
5196
6295
|
|
|
5197
|
-
function
|
|
5198
|
-
|
|
6296
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6297
|
+
function fulfilled(value) {
|
|
6298
|
+
try {
|
|
6299
|
+
step(generator.next(value));
|
|
6300
|
+
} catch (e) {
|
|
6301
|
+
reject(e);
|
|
6302
|
+
}
|
|
6303
|
+
}
|
|
6304
|
+
|
|
6305
|
+
function rejected(value) {
|
|
6306
|
+
try {
|
|
6307
|
+
step(generator["throw"](value));
|
|
6308
|
+
} catch (e) {
|
|
6309
|
+
reject(e);
|
|
6310
|
+
}
|
|
6311
|
+
}
|
|
6312
|
+
|
|
6313
|
+
function step(result) {
|
|
6314
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
6315
|
+
}
|
|
6316
|
+
|
|
6317
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6318
|
+
});
|
|
6319
|
+
};
|
|
6320
|
+
|
|
6321
|
+
|
|
6322
|
+
function loadAngleUpdater(tsParticles) {
|
|
6323
|
+
return angle_dist_awaiter(this, void 0, void 0, function* () {
|
|
6324
|
+
yield tsParticles.addParticleUpdater("angle", container => new AngleUpdater(container));
|
|
6325
|
+
});
|
|
5199
6326
|
}
|
|
5200
6327
|
;// CONCATENATED MODULE: ../../updaters/color/dist/ColorUpdater.js
|
|
5201
6328
|
|
|
@@ -5277,9 +6404,43 @@ class ColorUpdater {
|
|
|
5277
6404
|
|
|
5278
6405
|
}
|
|
5279
6406
|
;// CONCATENATED MODULE: ../../updaters/color/dist/index.js
|
|
6407
|
+
var color_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
6408
|
+
function adopt(value) {
|
|
6409
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
6410
|
+
resolve(value);
|
|
6411
|
+
});
|
|
6412
|
+
}
|
|
6413
|
+
|
|
6414
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6415
|
+
function fulfilled(value) {
|
|
6416
|
+
try {
|
|
6417
|
+
step(generator.next(value));
|
|
6418
|
+
} catch (e) {
|
|
6419
|
+
reject(e);
|
|
6420
|
+
}
|
|
6421
|
+
}
|
|
6422
|
+
|
|
6423
|
+
function rejected(value) {
|
|
6424
|
+
try {
|
|
6425
|
+
step(generator["throw"](value));
|
|
6426
|
+
} catch (e) {
|
|
6427
|
+
reject(e);
|
|
6428
|
+
}
|
|
6429
|
+
}
|
|
6430
|
+
|
|
6431
|
+
function step(result) {
|
|
6432
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
6433
|
+
}
|
|
6434
|
+
|
|
6435
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6436
|
+
});
|
|
6437
|
+
};
|
|
6438
|
+
|
|
5280
6439
|
|
|
5281
6440
|
function loadColorUpdater(tsParticles) {
|
|
5282
|
-
|
|
6441
|
+
return color_dist_awaiter(this, void 0, void 0, function* () {
|
|
6442
|
+
yield tsParticles.addParticleUpdater("color", container => new ColorUpdater(container));
|
|
6443
|
+
});
|
|
5283
6444
|
}
|
|
5284
6445
|
;// CONCATENATED MODULE: ../../updaters/strokeColor/dist/StrokeColorUpdater.js
|
|
5285
6446
|
|
|
@@ -5379,9 +6540,43 @@ class StrokeColorUpdater {
|
|
|
5379
6540
|
|
|
5380
6541
|
}
|
|
5381
6542
|
;// CONCATENATED MODULE: ../../updaters/strokeColor/dist/index.js
|
|
6543
|
+
var strokeColor_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
6544
|
+
function adopt(value) {
|
|
6545
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
6546
|
+
resolve(value);
|
|
6547
|
+
});
|
|
6548
|
+
}
|
|
6549
|
+
|
|
6550
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6551
|
+
function fulfilled(value) {
|
|
6552
|
+
try {
|
|
6553
|
+
step(generator.next(value));
|
|
6554
|
+
} catch (e) {
|
|
6555
|
+
reject(e);
|
|
6556
|
+
}
|
|
6557
|
+
}
|
|
6558
|
+
|
|
6559
|
+
function rejected(value) {
|
|
6560
|
+
try {
|
|
6561
|
+
step(generator["throw"](value));
|
|
6562
|
+
} catch (e) {
|
|
6563
|
+
reject(e);
|
|
6564
|
+
}
|
|
6565
|
+
}
|
|
6566
|
+
|
|
6567
|
+
function step(result) {
|
|
6568
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
6569
|
+
}
|
|
6570
|
+
|
|
6571
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6572
|
+
});
|
|
6573
|
+
};
|
|
6574
|
+
|
|
5382
6575
|
|
|
5383
6576
|
function loadStrokeColorUpdater(tsParticles) {
|
|
5384
|
-
|
|
6577
|
+
return strokeColor_dist_awaiter(this, void 0, void 0, function* () {
|
|
6578
|
+
yield tsParticles.addParticleUpdater("strokeColor", container => new StrokeColorUpdater(container));
|
|
6579
|
+
});
|
|
5385
6580
|
}
|
|
5386
6581
|
;// CONCATENATED MODULE: ../../updaters/outModes/dist/Utils.js
|
|
5387
6582
|
|
|
@@ -5443,165 +6638,264 @@ function bounceVertical(data) {
|
|
|
5443
6638
|
}
|
|
5444
6639
|
}
|
|
5445
6640
|
}
|
|
5446
|
-
;// CONCATENATED MODULE: ../../updaters/outModes/dist/
|
|
6641
|
+
;// CONCATENATED MODULE: ../../updaters/outModes/dist/BounceOutMode.js
|
|
5447
6642
|
|
|
5448
6643
|
|
|
5449
|
-
class
|
|
6644
|
+
class BounceOutMode {
|
|
5450
6645
|
constructor(container) {
|
|
5451
6646
|
this.container = container;
|
|
6647
|
+
this.modes = [engine_dist.OutMode.bounce, engine_dist.OutMode.bounceVertical, engine_dist.OutMode.bounceHorizontal, "bounceVertical", "bounceHorizontal", engine_dist.OutMode.split];
|
|
5452
6648
|
}
|
|
5453
6649
|
|
|
5454
|
-
|
|
6650
|
+
update(particle, direction, delta, outMode) {
|
|
6651
|
+
if (!this.modes.includes(outMode)) {
|
|
6652
|
+
return;
|
|
6653
|
+
}
|
|
5455
6654
|
|
|
5456
|
-
|
|
5457
|
-
|
|
6655
|
+
const container = this.container;
|
|
6656
|
+
let handled = false;
|
|
6657
|
+
|
|
6658
|
+
for (const [, plugin] of container.plugins) {
|
|
6659
|
+
if (plugin.particleBounce !== undefined) {
|
|
6660
|
+
handled = plugin.particleBounce(particle, delta, direction);
|
|
6661
|
+
}
|
|
6662
|
+
|
|
6663
|
+
if (handled) {
|
|
6664
|
+
break;
|
|
6665
|
+
}
|
|
6666
|
+
}
|
|
6667
|
+
|
|
6668
|
+
if (handled) {
|
|
6669
|
+
return;
|
|
6670
|
+
}
|
|
6671
|
+
|
|
6672
|
+
const pos = particle.getPosition(),
|
|
6673
|
+
offset = particle.offset,
|
|
6674
|
+
size = particle.getRadius(),
|
|
6675
|
+
bounds = (0,engine_dist.calculateBounds)(pos, size),
|
|
6676
|
+
canvasSize = container.canvas.size;
|
|
6677
|
+
bounceHorizontal({
|
|
6678
|
+
particle,
|
|
6679
|
+
outMode,
|
|
6680
|
+
direction,
|
|
6681
|
+
bounds,
|
|
6682
|
+
canvasSize,
|
|
6683
|
+
offset,
|
|
6684
|
+
size
|
|
6685
|
+
});
|
|
6686
|
+
bounceVertical({
|
|
6687
|
+
particle,
|
|
6688
|
+
outMode,
|
|
6689
|
+
direction,
|
|
6690
|
+
bounds,
|
|
6691
|
+
canvasSize,
|
|
6692
|
+
offset,
|
|
6693
|
+
size
|
|
6694
|
+
});
|
|
5458
6695
|
}
|
|
5459
6696
|
|
|
5460
|
-
|
|
5461
|
-
|
|
6697
|
+
}
|
|
6698
|
+
;// CONCATENATED MODULE: ../../updaters/outModes/dist/DestroyOutMode.js
|
|
5462
6699
|
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
this.
|
|
5466
|
-
this.
|
|
5467
|
-
this.updateOutMode(particle, delta, (_d = outModes.top) !== null && _d !== void 0 ? _d : outModes.default, engine_dist.OutModeDirection.top);
|
|
6700
|
+
class DestroyOutMode {
|
|
6701
|
+
constructor(container) {
|
|
6702
|
+
this.container = container;
|
|
6703
|
+
this.modes = [engine_dist.OutMode.destroy];
|
|
5468
6704
|
}
|
|
5469
6705
|
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
case engine_dist.OutMode.bounceHorizontal:
|
|
5475
|
-
case "bounceVertical":
|
|
5476
|
-
case "bounceHorizontal":
|
|
5477
|
-
case engine_dist.OutMode.split:
|
|
5478
|
-
this.bounce(particle, delta, direction, outMode);
|
|
5479
|
-
break;
|
|
6706
|
+
update(particle, direction, delta, outMode) {
|
|
6707
|
+
if (!this.modes.includes(outMode)) {
|
|
6708
|
+
return;
|
|
6709
|
+
}
|
|
5480
6710
|
|
|
5481
|
-
|
|
5482
|
-
this.destroy(particle, direction);
|
|
5483
|
-
break;
|
|
6711
|
+
const container = this.container;
|
|
5484
6712
|
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
6713
|
+
switch (particle.outType) {
|
|
6714
|
+
case engine_dist.ParticleOutType.normal:
|
|
6715
|
+
case engine_dist.ParticleOutType.outside:
|
|
6716
|
+
if ((0,engine_dist.isPointInside)(particle.position, container.canvas.size, engine_dist.Vector.origin, particle.getRadius(), direction)) {
|
|
6717
|
+
return;
|
|
6718
|
+
}
|
|
5488
6719
|
|
|
5489
|
-
case engine_dist.OutMode.none:
|
|
5490
|
-
default:
|
|
5491
|
-
this.none(particle, direction);
|
|
5492
6720
|
break;
|
|
5493
|
-
}
|
|
5494
|
-
}
|
|
5495
6721
|
|
|
5496
|
-
|
|
5497
|
-
|
|
6722
|
+
case engine_dist.ParticleOutType.inside:
|
|
6723
|
+
{
|
|
6724
|
+
const {
|
|
6725
|
+
dx,
|
|
6726
|
+
dy
|
|
6727
|
+
} = (0,engine_dist.getDistances)(particle.position, particle.moveCenter);
|
|
6728
|
+
const {
|
|
6729
|
+
x: vx,
|
|
6730
|
+
y: vy
|
|
6731
|
+
} = particle.velocity;
|
|
6732
|
+
|
|
6733
|
+
if (vx < 0 && dx > particle.moveCenter.radius || vy < 0 && dy > particle.moveCenter.radius || vx >= 0 && dx < -particle.moveCenter.radius || vy >= 0 && dy < -particle.moveCenter.radius) {
|
|
6734
|
+
return;
|
|
6735
|
+
}
|
|
5498
6736
|
|
|
5499
|
-
|
|
5500
|
-
|
|
6737
|
+
break;
|
|
6738
|
+
}
|
|
5501
6739
|
}
|
|
5502
6740
|
|
|
5503
6741
|
container.particles.remove(particle, undefined, true);
|
|
5504
6742
|
}
|
|
5505
6743
|
|
|
5506
|
-
|
|
5507
|
-
|
|
6744
|
+
}
|
|
6745
|
+
;// CONCATENATED MODULE: ../../updaters/outModes/dist/OutOutMode.js
|
|
6746
|
+
|
|
6747
|
+
class OutOutMode {
|
|
6748
|
+
constructor(container) {
|
|
6749
|
+
this.container = container;
|
|
6750
|
+
this.modes = [engine_dist.OutMode.out];
|
|
6751
|
+
}
|
|
5508
6752
|
|
|
5509
|
-
|
|
6753
|
+
update(particle, direction, delta, outMode) {
|
|
6754
|
+
if (!this.modes.includes(outMode)) {
|
|
5510
6755
|
return;
|
|
5511
6756
|
}
|
|
5512
6757
|
|
|
5513
|
-
const
|
|
5514
|
-
canvasSize = container.canvas.size,
|
|
5515
|
-
newPos = {
|
|
5516
|
-
bottom: canvasSize.height + particle.getRadius() + particle.offset.y,
|
|
5517
|
-
left: -particle.getRadius() - particle.offset.x,
|
|
5518
|
-
right: canvasSize.width + particle.getRadius() + particle.offset.x,
|
|
5519
|
-
top: -particle.getRadius() - particle.offset.y
|
|
5520
|
-
},
|
|
5521
|
-
sizeValue = particle.getRadius(),
|
|
5522
|
-
nextBounds = (0,engine_dist.calculateBounds)(particle.position, sizeValue);
|
|
6758
|
+
const container = this.container;
|
|
5523
6759
|
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
6760
|
+
switch (particle.outType) {
|
|
6761
|
+
case engine_dist.ParticleOutType.inside:
|
|
6762
|
+
{
|
|
6763
|
+
const {
|
|
6764
|
+
x: vx,
|
|
6765
|
+
y: vy
|
|
6766
|
+
} = particle.velocity;
|
|
6767
|
+
const circVec = engine_dist.Vector.origin;
|
|
6768
|
+
circVec.length = particle.moveCenter.radius;
|
|
6769
|
+
circVec.angle = particle.velocity.angle + Math.PI;
|
|
6770
|
+
circVec.addTo(engine_dist.Vector.create(particle.moveCenter));
|
|
6771
|
+
const {
|
|
6772
|
+
dx,
|
|
6773
|
+
dy
|
|
6774
|
+
} = (0,engine_dist.getDistances)(particle.position, circVec);
|
|
6775
|
+
|
|
6776
|
+
if (vx <= 0 && dx >= 0 || vy <= 0 && dy >= 0 || vx >= 0 && dx <= 0 || vy >= 0 && dy <= 0) {
|
|
6777
|
+
return;
|
|
6778
|
+
}
|
|
5527
6779
|
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
6780
|
+
particle.position.x = Math.floor((0,engine_dist.randomInRange)({
|
|
6781
|
+
min: 0,
|
|
6782
|
+
max: container.canvas.size.width
|
|
6783
|
+
}));
|
|
6784
|
+
particle.position.y = Math.floor((0,engine_dist.randomInRange)({
|
|
6785
|
+
min: 0,
|
|
6786
|
+
max: container.canvas.size.height
|
|
6787
|
+
}));
|
|
6788
|
+
const {
|
|
6789
|
+
dx: newDx,
|
|
6790
|
+
dy: newDy
|
|
6791
|
+
} = (0,engine_dist.getDistances)(particle.position, particle.moveCenter);
|
|
6792
|
+
particle.direction = Math.atan2(-newDy, -newDx);
|
|
6793
|
+
particle.velocity.angle = particle.direction;
|
|
6794
|
+
break;
|
|
6795
|
+
}
|
|
5535
6796
|
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
6797
|
+
default:
|
|
6798
|
+
{
|
|
6799
|
+
if ((0,engine_dist.isPointInside)(particle.position, container.canvas.size, engine_dist.Vector.origin, particle.getRadius(), direction)) {
|
|
6800
|
+
return;
|
|
6801
|
+
}
|
|
5541
6802
|
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
6803
|
+
switch (particle.outType) {
|
|
6804
|
+
case engine_dist.ParticleOutType.outside:
|
|
6805
|
+
{
|
|
6806
|
+
particle.position.x = Math.floor((0,engine_dist.randomInRange)({
|
|
6807
|
+
min: -particle.moveCenter.radius,
|
|
6808
|
+
max: particle.moveCenter.radius
|
|
6809
|
+
})) + particle.moveCenter.x;
|
|
6810
|
+
particle.position.y = Math.floor((0,engine_dist.randomInRange)({
|
|
6811
|
+
min: -particle.moveCenter.radius,
|
|
6812
|
+
max: particle.moveCenter.radius
|
|
6813
|
+
})) + particle.moveCenter.y;
|
|
6814
|
+
const {
|
|
6815
|
+
dx,
|
|
6816
|
+
dy
|
|
6817
|
+
} = (0,engine_dist.getDistances)(particle.position, particle.moveCenter);
|
|
6818
|
+
|
|
6819
|
+
if (particle.moveCenter.radius) {
|
|
6820
|
+
particle.direction = Math.atan2(dy, dx);
|
|
6821
|
+
particle.velocity.angle = particle.direction;
|
|
6822
|
+
}
|
|
6823
|
+
|
|
6824
|
+
break;
|
|
6825
|
+
}
|
|
5547
6826
|
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
6827
|
+
case engine_dist.ParticleOutType.normal:
|
|
6828
|
+
{
|
|
6829
|
+
const wrap = particle.options.move.warp,
|
|
6830
|
+
canvasSize = container.canvas.size,
|
|
6831
|
+
newPos = {
|
|
6832
|
+
bottom: canvasSize.height + particle.getRadius() + particle.offset.y,
|
|
6833
|
+
left: -particle.getRadius() - particle.offset.x,
|
|
6834
|
+
right: canvasSize.width + particle.getRadius() + particle.offset.x,
|
|
6835
|
+
top: -particle.getRadius() - particle.offset.y
|
|
6836
|
+
},
|
|
6837
|
+
sizeValue = particle.getRadius(),
|
|
6838
|
+
nextBounds = (0,engine_dist.calculateBounds)(particle.position, sizeValue);
|
|
6839
|
+
|
|
6840
|
+
if (direction === engine_dist.OutModeDirection.right && nextBounds.left > canvasSize.width + particle.offset.x) {
|
|
6841
|
+
particle.position.x = newPos.left;
|
|
6842
|
+
particle.initialPosition.x = particle.position.x;
|
|
6843
|
+
|
|
6844
|
+
if (!wrap) {
|
|
6845
|
+
particle.position.y = Math.random() * canvasSize.height;
|
|
6846
|
+
particle.initialPosition.y = particle.position.y;
|
|
6847
|
+
}
|
|
6848
|
+
} else if (direction === engine_dist.OutModeDirection.left && nextBounds.right < -particle.offset.x) {
|
|
6849
|
+
particle.position.x = newPos.right;
|
|
6850
|
+
particle.initialPosition.x = particle.position.x;
|
|
6851
|
+
|
|
6852
|
+
if (!wrap) {
|
|
6853
|
+
particle.position.y = Math.random() * canvasSize.height;
|
|
6854
|
+
particle.initialPosition.y = particle.position.y;
|
|
6855
|
+
}
|
|
6856
|
+
}
|
|
6857
|
+
|
|
6858
|
+
if (direction === engine_dist.OutModeDirection.bottom && nextBounds.top > canvasSize.height + particle.offset.y) {
|
|
6859
|
+
if (!wrap) {
|
|
6860
|
+
particle.position.x = Math.random() * canvasSize.width;
|
|
6861
|
+
particle.initialPosition.x = particle.position.x;
|
|
6862
|
+
}
|
|
6863
|
+
|
|
6864
|
+
particle.position.y = newPos.top;
|
|
6865
|
+
particle.initialPosition.y = particle.position.y;
|
|
6866
|
+
} else if (direction === engine_dist.OutModeDirection.top && nextBounds.bottom < -particle.offset.y) {
|
|
6867
|
+
if (!wrap) {
|
|
6868
|
+
particle.position.x = Math.random() * canvasSize.width;
|
|
6869
|
+
particle.initialPosition.x = particle.position.x;
|
|
6870
|
+
}
|
|
6871
|
+
|
|
6872
|
+
particle.position.y = newPos.bottom;
|
|
6873
|
+
particle.initialPosition.y = particle.position.y;
|
|
6874
|
+
}
|
|
6875
|
+
|
|
6876
|
+
break;
|
|
6877
|
+
}
|
|
6878
|
+
}
|
|
5555
6879
|
|
|
5556
|
-
|
|
5557
|
-
|
|
6880
|
+
break;
|
|
6881
|
+
}
|
|
5558
6882
|
}
|
|
5559
6883
|
}
|
|
5560
6884
|
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
let handled = false;
|
|
5564
|
-
|
|
5565
|
-
for (const [, plugin] of container.plugins) {
|
|
5566
|
-
if (plugin.particleBounce !== undefined) {
|
|
5567
|
-
handled = plugin.particleBounce(particle, delta, direction);
|
|
5568
|
-
}
|
|
6885
|
+
}
|
|
6886
|
+
;// CONCATENATED MODULE: ../../updaters/outModes/dist/NoneOutMode.js
|
|
5569
6887
|
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
6888
|
+
class NoneOutMode {
|
|
6889
|
+
constructor(container) {
|
|
6890
|
+
this.container = container;
|
|
6891
|
+
this.modes = [engine_dist.OutMode.none];
|
|
6892
|
+
}
|
|
5574
6893
|
|
|
5575
|
-
|
|
6894
|
+
update(particle, direction, delta, outMode) {
|
|
6895
|
+
if (!this.modes.includes(outMode)) {
|
|
5576
6896
|
return;
|
|
5577
6897
|
}
|
|
5578
6898
|
|
|
5579
|
-
const pos = particle.getPosition(),
|
|
5580
|
-
offset = particle.offset,
|
|
5581
|
-
size = particle.getRadius(),
|
|
5582
|
-
bounds = (0,engine_dist.calculateBounds)(pos, size),
|
|
5583
|
-
canvasSize = container.canvas.size;
|
|
5584
|
-
bounceHorizontal({
|
|
5585
|
-
particle,
|
|
5586
|
-
outMode,
|
|
5587
|
-
direction,
|
|
5588
|
-
bounds,
|
|
5589
|
-
canvasSize,
|
|
5590
|
-
offset,
|
|
5591
|
-
size
|
|
5592
|
-
});
|
|
5593
|
-
bounceVertical({
|
|
5594
|
-
particle,
|
|
5595
|
-
outMode,
|
|
5596
|
-
direction,
|
|
5597
|
-
bounds,
|
|
5598
|
-
canvasSize,
|
|
5599
|
-
offset,
|
|
5600
|
-
size
|
|
5601
|
-
});
|
|
5602
|
-
}
|
|
5603
|
-
|
|
5604
|
-
none(particle, direction) {
|
|
5605
6899
|
if (particle.options.move.distance.horizontal && (direction === engine_dist.OutModeDirection.left || direction === engine_dist.OutModeDirection.right) || particle.options.move.distance.vertical && (direction === engine_dist.OutModeDirection.top || direction === engine_dist.OutModeDirection.bottom)) {
|
|
5606
6900
|
return;
|
|
5607
6901
|
}
|
|
@@ -5616,7 +6910,7 @@ class OutOfCanvasUpdater {
|
|
|
5616
6910
|
return;
|
|
5617
6911
|
}
|
|
5618
6912
|
|
|
5619
|
-
if (!(0,engine_dist.isPointInside)(particle.position, container.canvas.size, pRadius, direction)) {
|
|
6913
|
+
if (!(0,engine_dist.isPointInside)(particle.position, container.canvas.size, engine_dist.Vector.origin, pRadius, direction)) {
|
|
5620
6914
|
container.particles.remove(particle);
|
|
5621
6915
|
}
|
|
5622
6916
|
} else {
|
|
@@ -5628,15 +6922,113 @@ class OutOfCanvasUpdater {
|
|
|
5628
6922
|
}
|
|
5629
6923
|
}
|
|
5630
6924
|
|
|
6925
|
+
}
|
|
6926
|
+
;// CONCATENATED MODULE: ../../updaters/outModes/dist/OutOfCanvasUpdater.js
|
|
6927
|
+
|
|
6928
|
+
|
|
6929
|
+
|
|
6930
|
+
|
|
6931
|
+
|
|
6932
|
+
class OutOfCanvasUpdater {
|
|
6933
|
+
constructor(container) {
|
|
6934
|
+
this.container = container;
|
|
6935
|
+
this.updaters = [new BounceOutMode(container), new DestroyOutMode(container), new OutOutMode(container), new NoneOutMode(container)];
|
|
6936
|
+
}
|
|
6937
|
+
|
|
6938
|
+
init() {}
|
|
6939
|
+
|
|
6940
|
+
isEnabled(particle) {
|
|
6941
|
+
return !particle.destroyed && !particle.spawning;
|
|
6942
|
+
}
|
|
6943
|
+
|
|
6944
|
+
update(particle, delta) {
|
|
6945
|
+
var _a, _b, _c, _d;
|
|
6946
|
+
|
|
6947
|
+
const outModes = particle.options.move.outModes;
|
|
6948
|
+
this.updateOutMode(particle, delta, (_a = outModes.bottom) !== null && _a !== void 0 ? _a : outModes.default, engine_dist.OutModeDirection.bottom);
|
|
6949
|
+
this.updateOutMode(particle, delta, (_b = outModes.left) !== null && _b !== void 0 ? _b : outModes.default, engine_dist.OutModeDirection.left);
|
|
6950
|
+
this.updateOutMode(particle, delta, (_c = outModes.right) !== null && _c !== void 0 ? _c : outModes.default, engine_dist.OutModeDirection.right);
|
|
6951
|
+
this.updateOutMode(particle, delta, (_d = outModes.top) !== null && _d !== void 0 ? _d : outModes.default, engine_dist.OutModeDirection.top);
|
|
6952
|
+
}
|
|
6953
|
+
|
|
6954
|
+
updateOutMode(particle, delta, outMode, direction) {
|
|
6955
|
+
for (const updater of this.updaters) {
|
|
6956
|
+
updater.update(particle, direction, delta, outMode);
|
|
6957
|
+
}
|
|
6958
|
+
}
|
|
6959
|
+
|
|
5631
6960
|
}
|
|
5632
6961
|
;// CONCATENATED MODULE: ../../updaters/outModes/dist/index.js
|
|
6962
|
+
var outModes_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
6963
|
+
function adopt(value) {
|
|
6964
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
6965
|
+
resolve(value);
|
|
6966
|
+
});
|
|
6967
|
+
}
|
|
6968
|
+
|
|
6969
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6970
|
+
function fulfilled(value) {
|
|
6971
|
+
try {
|
|
6972
|
+
step(generator.next(value));
|
|
6973
|
+
} catch (e) {
|
|
6974
|
+
reject(e);
|
|
6975
|
+
}
|
|
6976
|
+
}
|
|
6977
|
+
|
|
6978
|
+
function rejected(value) {
|
|
6979
|
+
try {
|
|
6980
|
+
step(generator["throw"](value));
|
|
6981
|
+
} catch (e) {
|
|
6982
|
+
reject(e);
|
|
6983
|
+
}
|
|
6984
|
+
}
|
|
6985
|
+
|
|
6986
|
+
function step(result) {
|
|
6987
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
6988
|
+
}
|
|
6989
|
+
|
|
6990
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6991
|
+
});
|
|
6992
|
+
};
|
|
6993
|
+
|
|
5633
6994
|
|
|
5634
6995
|
function loadOutModesUpdater(tsParticles) {
|
|
5635
|
-
|
|
6996
|
+
return outModes_dist_awaiter(this, void 0, void 0, function* () {
|
|
6997
|
+
yield tsParticles.addParticleUpdater("outModes", container => new OutOfCanvasUpdater(container));
|
|
6998
|
+
});
|
|
5636
6999
|
}
|
|
5637
7000
|
;// CONCATENATED MODULE: ../slim/dist/index.js
|
|
7001
|
+
var slim_dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
7002
|
+
function adopt(value) {
|
|
7003
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
7004
|
+
resolve(value);
|
|
7005
|
+
});
|
|
7006
|
+
}
|
|
7007
|
+
|
|
7008
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7009
|
+
function fulfilled(value) {
|
|
7010
|
+
try {
|
|
7011
|
+
step(generator.next(value));
|
|
7012
|
+
} catch (e) {
|
|
7013
|
+
reject(e);
|
|
7014
|
+
}
|
|
7015
|
+
}
|
|
7016
|
+
|
|
7017
|
+
function rejected(value) {
|
|
7018
|
+
try {
|
|
7019
|
+
step(generator["throw"](value));
|
|
7020
|
+
} catch (e) {
|
|
7021
|
+
reject(e);
|
|
7022
|
+
}
|
|
7023
|
+
}
|
|
5638
7024
|
|
|
7025
|
+
function step(result) {
|
|
7026
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
7027
|
+
}
|
|
5639
7028
|
|
|
7029
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
7030
|
+
});
|
|
7031
|
+
};
|
|
5640
7032
|
|
|
5641
7033
|
|
|
5642
7034
|
|
|
@@ -5665,35 +7057,34 @@ function loadOutModesUpdater(tsParticles) {
|
|
|
5665
7057
|
|
|
5666
7058
|
|
|
5667
7059
|
function loadSlim(tsParticles) {
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
loadOutModesUpdater(tsParticles);
|
|
7060
|
+
return slim_dist_awaiter(this, void 0, void 0, function* () {
|
|
7061
|
+
yield loadExternalAttractInteraction(tsParticles);
|
|
7062
|
+
yield loadExternalBounceInteraction(tsParticles);
|
|
7063
|
+
yield loadExternalBubbleInteraction(tsParticles);
|
|
7064
|
+
yield loadExternalConnectInteraction(tsParticles);
|
|
7065
|
+
yield loadExternalGrabInteraction(tsParticles);
|
|
7066
|
+
yield loadExternalPauseInteraction(tsParticles);
|
|
7067
|
+
yield loadExternalPushInteraction(tsParticles);
|
|
7068
|
+
yield loadExternalRemoveInteraction(tsParticles);
|
|
7069
|
+
yield loadExternalRepulseInteraction(tsParticles);
|
|
7070
|
+
yield loadParticlesAttractInteraction(tsParticles);
|
|
7071
|
+
yield loadParticlesCollisionsInteraction(tsParticles);
|
|
7072
|
+
yield loadParticlesLinksInteraction(tsParticles);
|
|
7073
|
+
yield loadCircleShape(tsParticles);
|
|
7074
|
+
yield loadImageShape(tsParticles);
|
|
7075
|
+
yield loadLineShape(tsParticles);
|
|
7076
|
+
yield loadPolygonShape(tsParticles);
|
|
7077
|
+
yield loadSquareShape(tsParticles);
|
|
7078
|
+
yield loadStarShape(tsParticles);
|
|
7079
|
+
yield loadTextShape(tsParticles);
|
|
7080
|
+
loadLifeUpdater(tsParticles);
|
|
7081
|
+
loadOpacityUpdater(tsParticles);
|
|
7082
|
+
loadSizeUpdater(tsParticles);
|
|
7083
|
+
loadAngleUpdater(tsParticles);
|
|
7084
|
+
loadColorUpdater(tsParticles);
|
|
7085
|
+
loadStrokeColorUpdater(tsParticles);
|
|
7086
|
+
loadOutModesUpdater(tsParticles);
|
|
7087
|
+
});
|
|
5697
7088
|
}
|
|
5698
7089
|
|
|
5699
7090
|
/***/ }),
|
|
@@ -5736,7 +7127,7 @@ class Canvas {
|
|
|
5736
7127
|
var _a;
|
|
5737
7128
|
|
|
5738
7129
|
if (!canvas.className) {
|
|
5739
|
-
canvas.className = Utils_1.
|
|
7130
|
+
canvas.className = Utils_1.canvasClass;
|
|
5740
7131
|
}
|
|
5741
7132
|
|
|
5742
7133
|
if (this.generatedCanvas) {
|
|
@@ -5793,21 +7184,13 @@ class Canvas {
|
|
|
5793
7184
|
}
|
|
5794
7185
|
|
|
5795
7186
|
windowResize() {
|
|
5796
|
-
var _a;
|
|
5797
|
-
|
|
5798
7187
|
if (!this.element) {
|
|
5799
7188
|
return;
|
|
5800
7189
|
}
|
|
5801
7190
|
|
|
5802
7191
|
const container = this.container;
|
|
5803
7192
|
this.resize();
|
|
5804
|
-
|
|
5805
|
-
if (((_a = this.resizeFactor) === null || _a === void 0 ? void 0 : _a.width) === 1 && this.resizeFactor.height === 1) {
|
|
5806
|
-
delete this.resizeFactor;
|
|
5807
|
-
return;
|
|
5808
|
-
}
|
|
5809
|
-
|
|
5810
|
-
container.updateActualOptions();
|
|
7193
|
+
const needsRefresh = container.updateActualOptions();
|
|
5811
7194
|
container.particles.setDensity();
|
|
5812
7195
|
|
|
5813
7196
|
for (const [, plugin] of container.plugins) {
|
|
@@ -5815,6 +7198,10 @@ class Canvas {
|
|
|
5815
7198
|
plugin.resize();
|
|
5816
7199
|
}
|
|
5817
7200
|
}
|
|
7201
|
+
|
|
7202
|
+
if (needsRefresh) {
|
|
7203
|
+
container.refresh();
|
|
7204
|
+
}
|
|
5818
7205
|
}
|
|
5819
7206
|
|
|
5820
7207
|
resize() {
|
|
@@ -6105,7 +7492,9 @@ const Options_1 = __webpack_require__(4075);
|
|
|
6105
7492
|
|
|
6106
7493
|
const Utils_1 = __webpack_require__(6617);
|
|
6107
7494
|
|
|
6108
|
-
const
|
|
7495
|
+
const Enums_1 = __webpack_require__(8678);
|
|
7496
|
+
|
|
7497
|
+
const Loader_1 = __webpack_require__(9662);
|
|
6109
7498
|
|
|
6110
7499
|
class Container {
|
|
6111
7500
|
constructor(id, sourceOptions, ...presets) {
|
|
@@ -6121,15 +7510,16 @@ class Container {
|
|
|
6121
7510
|
this.zLayers = 100;
|
|
6122
7511
|
this.pageHidden = false;
|
|
6123
7512
|
this._sourceOptions = sourceOptions;
|
|
7513
|
+
this._initialSourceOptions = sourceOptions;
|
|
6124
7514
|
this.retina = new Retina_1.Retina(this);
|
|
6125
7515
|
this.canvas = new Canvas_1.Canvas(this);
|
|
6126
7516
|
this.particles = new Particles_1.Particles(this);
|
|
6127
7517
|
this.drawer = new FrameManager_1.FrameManager(this);
|
|
7518
|
+
this.presets = presets;
|
|
6128
7519
|
this.pathGenerator = {
|
|
6129
|
-
generate:
|
|
6130
|
-
const v =
|
|
6131
|
-
v.length
|
|
6132
|
-
v.angle = Math.random() * Math.PI * 2;
|
|
7520
|
+
generate: p => {
|
|
7521
|
+
const v = p.velocity.copy();
|
|
7522
|
+
v.angle += v.length * Math.PI / 180;
|
|
6133
7523
|
return v;
|
|
6134
7524
|
},
|
|
6135
7525
|
init: () => {},
|
|
@@ -6153,28 +7543,15 @@ class Container {
|
|
|
6153
7543
|
this.density = 1;
|
|
6154
7544
|
this._options = new Options_1.Options();
|
|
6155
7545
|
this.actualOptions = new Options_1.Options();
|
|
6156
|
-
|
|
6157
|
-
for (const preset of presets) {
|
|
6158
|
-
this._options.load(Utils_1.Plugins.getPreset(preset));
|
|
6159
|
-
}
|
|
6160
|
-
|
|
6161
|
-
const shapes = Utils_1.Plugins.getSupportedShapes();
|
|
6162
|
-
|
|
6163
|
-
for (const type of shapes) {
|
|
6164
|
-
const drawer = Utils_1.Plugins.getShapeDrawer(type);
|
|
6165
|
-
|
|
6166
|
-
if (drawer) {
|
|
6167
|
-
this.drawers.set(type, drawer);
|
|
6168
|
-
}
|
|
6169
|
-
}
|
|
6170
|
-
|
|
6171
|
-
this._options.load(this._sourceOptions);
|
|
6172
|
-
|
|
6173
7546
|
this.eventListeners = new Utils_1.EventListeners(this);
|
|
6174
7547
|
|
|
6175
7548
|
if (typeof IntersectionObserver !== "undefined" && IntersectionObserver) {
|
|
6176
7549
|
this.intersectionObserver = new IntersectionObserver(entries => this.intersectionManager(entries));
|
|
6177
7550
|
}
|
|
7551
|
+
|
|
7552
|
+
Loader_1.Loader.dispatchEvent(Enums_1.EventType.containerBuilt, {
|
|
7553
|
+
container: this
|
|
7554
|
+
});
|
|
6178
7555
|
}
|
|
6179
7556
|
|
|
6180
7557
|
get options() {
|
|
@@ -6205,6 +7582,9 @@ class Container {
|
|
|
6205
7582
|
}
|
|
6206
7583
|
}
|
|
6207
7584
|
|
|
7585
|
+
Loader_1.Loader.dispatchEvent(Enums_1.EventType.containerPlay, {
|
|
7586
|
+
container: this
|
|
7587
|
+
});
|
|
6208
7588
|
this.draw(needsUpdate || false);
|
|
6209
7589
|
}
|
|
6210
7590
|
|
|
@@ -6227,6 +7607,10 @@ class Container {
|
|
|
6227
7607
|
if (!this.pageHidden) {
|
|
6228
7608
|
this.paused = true;
|
|
6229
7609
|
}
|
|
7610
|
+
|
|
7611
|
+
Loader_1.Loader.dispatchEvent(Enums_1.EventType.containerPaused, {
|
|
7612
|
+
container: this
|
|
7613
|
+
});
|
|
6230
7614
|
}
|
|
6231
7615
|
|
|
6232
7616
|
draw(force) {
|
|
@@ -6294,6 +7678,9 @@ class Container {
|
|
|
6294
7678
|
}
|
|
6295
7679
|
|
|
6296
7680
|
this.destroyed = true;
|
|
7681
|
+
Loader_1.Loader.dispatchEvent(Enums_1.EventType.containerDestroyed, {
|
|
7682
|
+
container: this
|
|
7683
|
+
});
|
|
6297
7684
|
}
|
|
6298
7685
|
|
|
6299
7686
|
exportImg(callback) {
|
|
@@ -6349,6 +7736,10 @@ class Container {
|
|
|
6349
7736
|
this.particles.linksColors = new Map();
|
|
6350
7737
|
delete this.particles.grabLineColor;
|
|
6351
7738
|
delete this.particles.linksColor;
|
|
7739
|
+
this._sourceOptions = this._options;
|
|
7740
|
+
Loader_1.Loader.dispatchEvent(Enums_1.EventType.containerStopped, {
|
|
7741
|
+
container: this
|
|
7742
|
+
});
|
|
6352
7743
|
}
|
|
6353
7744
|
|
|
6354
7745
|
async loadTheme(name) {
|
|
@@ -6377,6 +7768,9 @@ class Container {
|
|
|
6377
7768
|
}
|
|
6378
7769
|
}
|
|
6379
7770
|
|
|
7771
|
+
Loader_1.Loader.dispatchEvent(Enums_1.EventType.containerStarted, {
|
|
7772
|
+
container: this
|
|
7773
|
+
});
|
|
6380
7774
|
this.play();
|
|
6381
7775
|
}
|
|
6382
7776
|
|
|
@@ -6491,11 +7885,39 @@ class Container {
|
|
|
6491
7885
|
}
|
|
6492
7886
|
|
|
6493
7887
|
updateActualOptions() {
|
|
6494
|
-
this.actualOptions.
|
|
7888
|
+
this.actualOptions.responsive = [];
|
|
7889
|
+
const newMaxWidth = this.actualOptions.setResponsive(this.canvas.size.width, this.retina.pixelRatio, this._options);
|
|
6495
7890
|
this.actualOptions.setTheme(this.currentTheme);
|
|
7891
|
+
|
|
7892
|
+
if (this.responsiveMaxWidth != newMaxWidth) {
|
|
7893
|
+
this.responsiveMaxWidth = newMaxWidth;
|
|
7894
|
+
return true;
|
|
7895
|
+
}
|
|
7896
|
+
|
|
7897
|
+
return false;
|
|
6496
7898
|
}
|
|
6497
7899
|
|
|
6498
7900
|
async init() {
|
|
7901
|
+
this._options = new Options_1.Options();
|
|
7902
|
+
|
|
7903
|
+
for (const preset of this.presets) {
|
|
7904
|
+
this._options.load(Utils_1.Plugins.getPreset(preset));
|
|
7905
|
+
}
|
|
7906
|
+
|
|
7907
|
+
const shapes = Utils_1.Plugins.getSupportedShapes();
|
|
7908
|
+
|
|
7909
|
+
for (const type of shapes) {
|
|
7910
|
+
const drawer = Utils_1.Plugins.getShapeDrawer(type);
|
|
7911
|
+
|
|
7912
|
+
if (drawer) {
|
|
7913
|
+
this.drawers.set(type, drawer);
|
|
7914
|
+
}
|
|
7915
|
+
}
|
|
7916
|
+
|
|
7917
|
+
this._options.load(this._initialSourceOptions);
|
|
7918
|
+
|
|
7919
|
+
this._options.load(this._sourceOptions);
|
|
7920
|
+
|
|
6499
7921
|
this.actualOptions = new Options_1.Options();
|
|
6500
7922
|
this.actualOptions.load(this._options);
|
|
6501
7923
|
this.retina.init();
|
|
@@ -6547,6 +7969,9 @@ class Container {
|
|
|
6547
7969
|
}
|
|
6548
7970
|
}
|
|
6549
7971
|
|
|
7972
|
+
Loader_1.Loader.dispatchEvent(Enums_1.EventType.containerInit, {
|
|
7973
|
+
container: this
|
|
7974
|
+
});
|
|
6550
7975
|
this.particles.init();
|
|
6551
7976
|
this.particles.setDensity();
|
|
6552
7977
|
|
|
@@ -6555,6 +7980,10 @@ class Container {
|
|
|
6555
7980
|
plugin.particlesSetup();
|
|
6556
7981
|
}
|
|
6557
7982
|
}
|
|
7983
|
+
|
|
7984
|
+
Loader_1.Loader.dispatchEvent(Enums_1.EventType.particlesSetup, {
|
|
7985
|
+
container: this
|
|
7986
|
+
});
|
|
6558
7987
|
}
|
|
6559
7988
|
|
|
6560
7989
|
intersectionManager(entries) {
|
|
@@ -6683,9 +8112,13 @@ const Enums_1 = __webpack_require__(8678);
|
|
|
6683
8112
|
class InteractionManager {
|
|
6684
8113
|
constructor(container) {
|
|
6685
8114
|
this.container = container;
|
|
6686
|
-
const interactors = Utils_1.Plugins.getInteractors(container);
|
|
6687
8115
|
this.externalInteractors = [];
|
|
6688
8116
|
this.particleInteractors = [];
|
|
8117
|
+
this.init();
|
|
8118
|
+
}
|
|
8119
|
+
|
|
8120
|
+
init() {
|
|
8121
|
+
const interactors = Utils_1.Plugins.getInteractors(this.container, true);
|
|
6689
8122
|
|
|
6690
8123
|
for (const interactor of interactors) {
|
|
6691
8124
|
switch (interactor.type) {
|
|
@@ -7218,7 +8651,10 @@ const Container_1 = __webpack_require__(3515);
|
|
|
7218
8651
|
|
|
7219
8652
|
const Utils_1 = __webpack_require__(6617);
|
|
7220
8653
|
|
|
8654
|
+
const EventDispatcher_1 = __webpack_require__(7917);
|
|
8655
|
+
|
|
7221
8656
|
const tsParticlesDom = [];
|
|
8657
|
+
const eventDispatcher = new EventDispatcher_1.EventDispatcher();
|
|
7222
8658
|
|
|
7223
8659
|
function fetchError(statusCode) {
|
|
7224
8660
|
console.error(`Error tsParticles - fetch status: ${statusCode}`);
|
|
@@ -7283,14 +8719,14 @@ class Loader {
|
|
|
7283
8719
|
canvasEl = existingCanvases[0];
|
|
7284
8720
|
|
|
7285
8721
|
if (!canvasEl.className) {
|
|
7286
|
-
canvasEl.className = Utils_1.
|
|
8722
|
+
canvasEl.className = Utils_1.canvasClass;
|
|
7287
8723
|
}
|
|
7288
8724
|
|
|
7289
8725
|
generatedCanvas = false;
|
|
7290
8726
|
} else {
|
|
7291
8727
|
generatedCanvas = true;
|
|
7292
8728
|
canvasEl = document.createElement("canvas");
|
|
7293
|
-
canvasEl.className = Utils_1.
|
|
8729
|
+
canvasEl.className = Utils_1.canvasClass;
|
|
7294
8730
|
canvasEl.style.width = "100%";
|
|
7295
8731
|
canvasEl.style.height = "100%";
|
|
7296
8732
|
domContainer.appendChild(canvasEl);
|
|
@@ -7434,6 +8870,18 @@ class Loader {
|
|
|
7434
8870
|
}
|
|
7435
8871
|
}
|
|
7436
8872
|
|
|
8873
|
+
static addEventListener(type, listener) {
|
|
8874
|
+
eventDispatcher.addEventListener(type, listener);
|
|
8875
|
+
}
|
|
8876
|
+
|
|
8877
|
+
static removeEventListener(type, listener) {
|
|
8878
|
+
eventDispatcher.removeEventListener(type, listener);
|
|
8879
|
+
}
|
|
8880
|
+
|
|
8881
|
+
static dispatchEvent(type, args) {
|
|
8882
|
+
eventDispatcher.dispatchEvent(type, args);
|
|
8883
|
+
}
|
|
8884
|
+
|
|
7437
8885
|
}
|
|
7438
8886
|
|
|
7439
8887
|
exports.Loader = Loader;
|
|
@@ -7489,6 +8937,7 @@ class Particle {
|
|
|
7489
8937
|
this.retina = {
|
|
7490
8938
|
maxDistance: {}
|
|
7491
8939
|
};
|
|
8940
|
+
this.outType = Enums_1.ParticleOutType.normal;
|
|
7492
8941
|
const pxRatio = container.retina.pixelRatio;
|
|
7493
8942
|
const mainOptions = container.actualOptions;
|
|
7494
8943
|
const particlesOptions = new ParticlesOptions_1.ParticlesOptions();
|
|
@@ -7567,15 +9016,32 @@ class Particle {
|
|
|
7567
9016
|
}
|
|
7568
9017
|
}
|
|
7569
9018
|
|
|
7570
|
-
this.direction = (0, Utils_1.getParticleDirectionAngle)(this.options.move.direction);
|
|
7571
9019
|
this.bubble = {
|
|
7572
9020
|
inRange: false
|
|
7573
9021
|
};
|
|
9022
|
+
this.position = this.calcPosition(container, position, (0, Utils_1.clamp)(zIndexValue, 0, container.zLayers));
|
|
9023
|
+
this.initialPosition = this.position.copy();
|
|
9024
|
+
const canvasSize = container.canvas.size;
|
|
9025
|
+
this.moveCenter = {
|
|
9026
|
+
x: canvasSize.width * this.options.move.center.x / 100,
|
|
9027
|
+
y: canvasSize.height * this.options.move.center.y / 100,
|
|
9028
|
+
radius: this.options.move.center.radius
|
|
9029
|
+
};
|
|
9030
|
+
this.direction = (0, Utils_1.getParticleDirectionAngle)(this.options.move.direction, this.position, this.moveCenter);
|
|
9031
|
+
|
|
9032
|
+
switch (this.options.move.direction) {
|
|
9033
|
+
case Enums_1.MoveDirection.inside:
|
|
9034
|
+
this.outType = Enums_1.ParticleOutType.inside;
|
|
9035
|
+
break;
|
|
9036
|
+
|
|
9037
|
+
case Enums_1.MoveDirection.outside:
|
|
9038
|
+
this.outType = Enums_1.ParticleOutType.outside;
|
|
9039
|
+
break;
|
|
9040
|
+
}
|
|
9041
|
+
|
|
7574
9042
|
this.initialVelocity = this.calculateVelocity();
|
|
7575
9043
|
this.velocity = this.initialVelocity.copy();
|
|
7576
9044
|
this.moveDecay = 1 - (0, Utils_1.getRangeValue)(this.options.move.decay);
|
|
7577
|
-
this.position = this.calcPosition(container, position, (0, Utils_1.clamp)(zIndexValue, 0, container.zLayers));
|
|
7578
|
-
this.initialPosition = this.position.copy();
|
|
7579
9045
|
this.offset = Vector_1.Vector.origin;
|
|
7580
9046
|
const particles = container.particles;
|
|
7581
9047
|
particles.needsSort = particles.needsSort || particles.lastZIndex < this.position.z;
|
|
@@ -7845,6 +9311,11 @@ class Particle {
|
|
|
7845
9311
|
const baseVelocity = (0, Utils_1.getParticleBaseVelocity)(this.direction);
|
|
7846
9312
|
const res = baseVelocity.copy();
|
|
7847
9313
|
const moveOptions = this.options.move;
|
|
9314
|
+
|
|
9315
|
+
if (moveOptions.direction === Enums_1.MoveDirection.inside || moveOptions.direction === Enums_1.MoveDirection.outside) {
|
|
9316
|
+
return res;
|
|
9317
|
+
}
|
|
9318
|
+
|
|
7848
9319
|
const rad = Math.PI / 180 * moveOptions.angle.value;
|
|
7849
9320
|
const radOffset = Math.PI / 180 * moveOptions.angle.offset;
|
|
7850
9321
|
const range = {
|
|
@@ -8396,6 +9867,10 @@ const ParticlesOptions_1 = __webpack_require__(5640);
|
|
|
8396
9867
|
|
|
8397
9868
|
const Mover_1 = __webpack_require__(2682);
|
|
8398
9869
|
|
|
9870
|
+
const Enums_1 = __webpack_require__(8678);
|
|
9871
|
+
|
|
9872
|
+
const Loader_1 = __webpack_require__(9662);
|
|
9873
|
+
|
|
8399
9874
|
class Particles {
|
|
8400
9875
|
constructor(container) {
|
|
8401
9876
|
this.container = container;
|
|
@@ -8414,7 +9889,7 @@ class Particles {
|
|
|
8414
9889
|
const canvasSize = this.container.canvas.size;
|
|
8415
9890
|
this.linksColors = new Map();
|
|
8416
9891
|
this.quadTree = new Utils_1.QuadTree(new Utils_1.Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
8417
|
-
this.updaters = Utils_1.Plugins.getUpdaters(container);
|
|
9892
|
+
this.updaters = Utils_1.Plugins.getUpdaters(container, true);
|
|
8418
9893
|
}
|
|
8419
9894
|
|
|
8420
9895
|
get count() {
|
|
@@ -8431,6 +9906,8 @@ class Particles {
|
|
|
8431
9906
|
this.freqs.links = new Map();
|
|
8432
9907
|
this.freqs.triangles = new Map();
|
|
8433
9908
|
let handled = false;
|
|
9909
|
+
this.updaters = Utils_1.Plugins.getUpdaters(container, true);
|
|
9910
|
+
this.interactionManager.init();
|
|
8434
9911
|
|
|
8435
9912
|
for (const [, plugin] of container.plugins) {
|
|
8436
9913
|
if (plugin.particlesInitialization !== undefined) {
|
|
@@ -8489,6 +9966,12 @@ class Particles {
|
|
|
8489
9966
|
const zIdx = this.zArray.indexOf(particle);
|
|
8490
9967
|
this.zArray.splice(zIdx, 1);
|
|
8491
9968
|
deleted++;
|
|
9969
|
+
Loader_1.Loader.dispatchEvent(Enums_1.EventType.particleRemoved, {
|
|
9970
|
+
container: this.container,
|
|
9971
|
+
data: {
|
|
9972
|
+
particle
|
|
9973
|
+
}
|
|
9974
|
+
});
|
|
8492
9975
|
}
|
|
8493
9976
|
}
|
|
8494
9977
|
|
|
@@ -8767,6 +10250,12 @@ class Particles {
|
|
|
8767
10250
|
this.array.push(particle);
|
|
8768
10251
|
this.zArray.push(particle);
|
|
8769
10252
|
this.nextId++;
|
|
10253
|
+
Loader_1.Loader.dispatchEvent(Enums_1.EventType.particleAdded, {
|
|
10254
|
+
container: this.container,
|
|
10255
|
+
data: {
|
|
10256
|
+
particle
|
|
10257
|
+
}
|
|
10258
|
+
});
|
|
8770
10259
|
return particle;
|
|
8771
10260
|
} catch (e) {
|
|
8772
10261
|
console.warn(`error adding particle: ${e}`);
|
|
@@ -8964,6 +10453,8 @@ var MoveDirection;
|
|
|
8964
10453
|
MoveDirection["top"] = "top";
|
|
8965
10454
|
MoveDirection["topLeft"] = "top-left";
|
|
8966
10455
|
MoveDirection["topRight"] = "top-right";
|
|
10456
|
+
MoveDirection["outside"] = "outside";
|
|
10457
|
+
MoveDirection["inside"] = "inside";
|
|
8967
10458
|
})(MoveDirection = exports.MoveDirection || (exports.MoveDirection = {}));
|
|
8968
10459
|
|
|
8969
10460
|
/***/ }),
|
|
@@ -9208,6 +10699,24 @@ var OutMode;
|
|
|
9208
10699
|
|
|
9209
10700
|
/***/ }),
|
|
9210
10701
|
|
|
10702
|
+
/***/ 857:
|
|
10703
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
10704
|
+
|
|
10705
|
+
|
|
10706
|
+
|
|
10707
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
10708
|
+
value: true
|
|
10709
|
+
}));
|
|
10710
|
+
exports.ResponsiveMode = void 0;
|
|
10711
|
+
var ResponsiveMode;
|
|
10712
|
+
|
|
10713
|
+
(function (ResponsiveMode) {
|
|
10714
|
+
ResponsiveMode["screen"] = "screen";
|
|
10715
|
+
ResponsiveMode["canvas"] = "canvas";
|
|
10716
|
+
})(ResponsiveMode = exports.ResponsiveMode || (exports.ResponsiveMode = {}));
|
|
10717
|
+
|
|
10718
|
+
/***/ }),
|
|
10719
|
+
|
|
9211
10720
|
/***/ 6674:
|
|
9212
10721
|
/***/ ((__unused_webpack_module, exports) => {
|
|
9213
10722
|
|
|
@@ -9308,6 +10817,8 @@ __exportStar(__webpack_require__(7403), exports);
|
|
|
9308
10817
|
|
|
9309
10818
|
__exportStar(__webpack_require__(5305), exports);
|
|
9310
10819
|
|
|
10820
|
+
__exportStar(__webpack_require__(857), exports);
|
|
10821
|
+
|
|
9311
10822
|
/***/ }),
|
|
9312
10823
|
|
|
9313
10824
|
/***/ 399:
|
|
@@ -9328,7 +10839,7 @@ var AlterType;
|
|
|
9328
10839
|
|
|
9329
10840
|
/***/ }),
|
|
9330
10841
|
|
|
9331
|
-
/***/
|
|
10842
|
+
/***/ 8834:
|
|
9332
10843
|
/***/ ((__unused_webpack_module, exports) => {
|
|
9333
10844
|
|
|
9334
10845
|
|
|
@@ -9389,6 +10900,32 @@ var EasingType;
|
|
|
9389
10900
|
|
|
9390
10901
|
/***/ }),
|
|
9391
10902
|
|
|
10903
|
+
/***/ 231:
|
|
10904
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
10905
|
+
|
|
10906
|
+
|
|
10907
|
+
|
|
10908
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
10909
|
+
value: true
|
|
10910
|
+
}));
|
|
10911
|
+
exports.EventType = void 0;
|
|
10912
|
+
var EventType;
|
|
10913
|
+
|
|
10914
|
+
(function (EventType) {
|
|
10915
|
+
EventType["containerInit"] = "containerInit";
|
|
10916
|
+
EventType["particlesSetup"] = "particlesSetup";
|
|
10917
|
+
EventType["containerStarted"] = "containerStarted";
|
|
10918
|
+
EventType["containerStopped"] = "containerStopped";
|
|
10919
|
+
EventType["containerDestroyed"] = "containerDestroyed";
|
|
10920
|
+
EventType["containerPaused"] = "containerPaused";
|
|
10921
|
+
EventType["containerPlay"] = "containerPlay";
|
|
10922
|
+
EventType["containerBuilt"] = "containerBuilt";
|
|
10923
|
+
EventType["particleAdded"] = "particleAdded";
|
|
10924
|
+
EventType["particleRemoved"] = "particleRemoved";
|
|
10925
|
+
})(EventType = exports.EventType || (exports.EventType = {}));
|
|
10926
|
+
|
|
10927
|
+
/***/ }),
|
|
10928
|
+
|
|
9392
10929
|
/***/ 7251:
|
|
9393
10930
|
/***/ ((__unused_webpack_module, exports) => {
|
|
9394
10931
|
|
|
@@ -9444,6 +10981,25 @@ var OrbitType;
|
|
|
9444
10981
|
|
|
9445
10982
|
/***/ }),
|
|
9446
10983
|
|
|
10984
|
+
/***/ 1087:
|
|
10985
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
10986
|
+
|
|
10987
|
+
|
|
10988
|
+
|
|
10989
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
10990
|
+
value: true
|
|
10991
|
+
}));
|
|
10992
|
+
exports.ParticleOutType = void 0;
|
|
10993
|
+
var ParticleOutType;
|
|
10994
|
+
|
|
10995
|
+
(function (ParticleOutType) {
|
|
10996
|
+
ParticleOutType["normal"] = "normal";
|
|
10997
|
+
ParticleOutType["inside"] = "inside";
|
|
10998
|
+
ParticleOutType["outside"] = "outside";
|
|
10999
|
+
})(ParticleOutType = exports.ParticleOutType || (exports.ParticleOutType = {}));
|
|
11000
|
+
|
|
11001
|
+
/***/ }),
|
|
11002
|
+
|
|
9447
11003
|
/***/ 4591:
|
|
9448
11004
|
/***/ ((__unused_webpack_module, exports) => {
|
|
9449
11005
|
|
|
@@ -9518,7 +11074,9 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
9518
11074
|
|
|
9519
11075
|
__exportStar(__webpack_require__(399), exports);
|
|
9520
11076
|
|
|
9521
|
-
__exportStar(__webpack_require__(
|
|
11077
|
+
__exportStar(__webpack_require__(8834), exports);
|
|
11078
|
+
|
|
11079
|
+
__exportStar(__webpack_require__(231), exports);
|
|
9522
11080
|
|
|
9523
11081
|
__exportStar(__webpack_require__(7251), exports);
|
|
9524
11082
|
|
|
@@ -9534,6 +11092,8 @@ __exportStar(__webpack_require__(7990), exports);
|
|
|
9534
11092
|
|
|
9535
11093
|
__exportStar(__webpack_require__(4401), exports);
|
|
9536
11094
|
|
|
11095
|
+
__exportStar(__webpack_require__(1087), exports);
|
|
11096
|
+
|
|
9537
11097
|
/***/ }),
|
|
9538
11098
|
|
|
9539
11099
|
/***/ 8678:
|
|
@@ -10095,8 +11655,8 @@ exports.FullScreen = void 0;
|
|
|
10095
11655
|
|
|
10096
11656
|
class FullScreen {
|
|
10097
11657
|
constructor() {
|
|
10098
|
-
this.enable =
|
|
10099
|
-
this.zIndex =
|
|
11658
|
+
this.enable = true;
|
|
11659
|
+
this.zIndex = 0;
|
|
10100
11660
|
}
|
|
10101
11661
|
|
|
10102
11662
|
load(data) {
|
|
@@ -10454,7 +12014,7 @@ const Modes_1 = __webpack_require__(22);
|
|
|
10454
12014
|
|
|
10455
12015
|
class Interactivity {
|
|
10456
12016
|
constructor() {
|
|
10457
|
-
this.detectsOn = Enums_1.InteractivityDetect.
|
|
12017
|
+
this.detectsOn = Enums_1.InteractivityDetect.window;
|
|
10458
12018
|
this.events = new Events_1.Events();
|
|
10459
12019
|
this.modes = new Modes_1.Modes();
|
|
10460
12020
|
}
|
|
@@ -11800,11 +13360,11 @@ class Options {
|
|
|
11800
13360
|
}
|
|
11801
13361
|
}
|
|
11802
13362
|
|
|
11803
|
-
setResponsive(width, pxRatio, defaultOptions) {
|
|
11804
|
-
var _a;
|
|
11805
|
-
|
|
13363
|
+
setResponsive(width, pxRatio, defaultOptions) {
|
|
11806
13364
|
this.load(defaultOptions);
|
|
11807
|
-
|
|
13365
|
+
const responsiveOptions = this.responsive.find(t => t.mode === Enums_1.ResponsiveMode.screen && screen ? t.maxWidth * pxRatio > screen.availWidth : t.maxWidth * pxRatio > width);
|
|
13366
|
+
this.load(responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.options);
|
|
13367
|
+
return responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.maxWidth;
|
|
11808
13368
|
}
|
|
11809
13369
|
|
|
11810
13370
|
importPreset(preset) {
|
|
@@ -12537,6 +14097,11 @@ class Move {
|
|
|
12537
14097
|
constructor() {
|
|
12538
14098
|
this.angle = new MoveAngle_1.MoveAngle();
|
|
12539
14099
|
this.attract = new Attract_1.Attract();
|
|
14100
|
+
this.center = {
|
|
14101
|
+
x: 50,
|
|
14102
|
+
y: 50,
|
|
14103
|
+
radius: 0
|
|
14104
|
+
};
|
|
12540
14105
|
this.decay = 0;
|
|
12541
14106
|
this.distance = {};
|
|
12542
14107
|
this.direction = Enums_1.MoveDirection.none;
|
|
@@ -12594,7 +14159,7 @@ class Move {
|
|
|
12594
14159
|
}
|
|
12595
14160
|
|
|
12596
14161
|
load(data) {
|
|
12597
|
-
var _a, _b, _c;
|
|
14162
|
+
var _a, _b, _c, _d, _e, _f;
|
|
12598
14163
|
|
|
12599
14164
|
if (data === undefined) {
|
|
12600
14165
|
return;
|
|
@@ -12610,6 +14175,18 @@ class Move {
|
|
|
12610
14175
|
|
|
12611
14176
|
this.attract.load(data.attract);
|
|
12612
14177
|
|
|
14178
|
+
if (((_a = data.center) === null || _a === void 0 ? void 0 : _a.x) !== undefined) {
|
|
14179
|
+
this.center.x = data.center.x;
|
|
14180
|
+
}
|
|
14181
|
+
|
|
14182
|
+
if (((_b = data.center) === null || _b === void 0 ? void 0 : _b.y) !== undefined) {
|
|
14183
|
+
this.center.y = data.center.y;
|
|
14184
|
+
}
|
|
14185
|
+
|
|
14186
|
+
if (((_c = data.center) === null || _c === void 0 ? void 0 : _c.radius) !== undefined) {
|
|
14187
|
+
this.center.radius = data.center.radius;
|
|
14188
|
+
}
|
|
14189
|
+
|
|
12613
14190
|
if (data.decay !== undefined) {
|
|
12614
14191
|
this.decay = data.decay;
|
|
12615
14192
|
}
|
|
@@ -12634,19 +14211,19 @@ class Move {
|
|
|
12634
14211
|
}
|
|
12635
14212
|
|
|
12636
14213
|
this.gravity.load(data.gravity);
|
|
12637
|
-
const outMode = (
|
|
14214
|
+
const outMode = (_d = data.outMode) !== null && _d !== void 0 ? _d : data.out_mode;
|
|
12638
14215
|
|
|
12639
|
-
if (data.outModes
|
|
12640
|
-
if (typeof data.outModes === "string" || data.outModes
|
|
14216
|
+
if (data.outModes || outMode) {
|
|
14217
|
+
if (typeof data.outModes === "string" || !data.outModes && outMode) {
|
|
12641
14218
|
this.outModes.load({
|
|
12642
|
-
default: (
|
|
14219
|
+
default: (_e = data.outModes) !== null && _e !== void 0 ? _e : outMode
|
|
12643
14220
|
});
|
|
12644
14221
|
} else {
|
|
12645
14222
|
this.outModes.load(data.outModes);
|
|
12646
14223
|
}
|
|
12647
14224
|
}
|
|
12648
14225
|
|
|
12649
|
-
this.path.load((
|
|
14226
|
+
this.path.load((_f = data.path) !== null && _f !== void 0 ? _f : data.noise);
|
|
12650
14227
|
|
|
12651
14228
|
if (data.random !== undefined) {
|
|
12652
14229
|
this.random = data.random;
|
|
@@ -14396,10 +15973,13 @@ exports.Responsive = void 0;
|
|
|
14396
15973
|
|
|
14397
15974
|
const Utils_1 = __webpack_require__(6617);
|
|
14398
15975
|
|
|
15976
|
+
const Enums_1 = __webpack_require__(8678);
|
|
15977
|
+
|
|
14399
15978
|
class Responsive {
|
|
14400
15979
|
constructor() {
|
|
14401
15980
|
this.maxWidth = Infinity;
|
|
14402
15981
|
this.options = {};
|
|
15982
|
+
this.mode = Enums_1.ResponsiveMode.canvas;
|
|
14403
15983
|
}
|
|
14404
15984
|
|
|
14405
15985
|
load(data) {
|
|
@@ -14411,6 +15991,14 @@ class Responsive {
|
|
|
14411
15991
|
this.maxWidth = data.maxWidth;
|
|
14412
15992
|
}
|
|
14413
15993
|
|
|
15994
|
+
if (data.mode !== undefined) {
|
|
15995
|
+
if (data.mode === Enums_1.ResponsiveMode.screen) {
|
|
15996
|
+
this.mode = Enums_1.ResponsiveMode.screen;
|
|
15997
|
+
} else {
|
|
15998
|
+
this.mode = Enums_1.ResponsiveMode.canvas;
|
|
15999
|
+
}
|
|
16000
|
+
}
|
|
16001
|
+
|
|
14414
16002
|
if (data.options !== undefined) {
|
|
14415
16003
|
this.options = (0, Utils_1.deepExtend)({}, data.options);
|
|
14416
16004
|
}
|
|
@@ -14549,6 +16137,28 @@ exports.ValueWithRandom = ValueWithRandom;
|
|
|
14549
16137
|
|
|
14550
16138
|
/***/ }),
|
|
14551
16139
|
|
|
16140
|
+
/***/ 3105:
|
|
16141
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
16142
|
+
|
|
16143
|
+
|
|
16144
|
+
|
|
16145
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
16146
|
+
value: true
|
|
16147
|
+
}));
|
|
16148
|
+
|
|
16149
|
+
/***/ }),
|
|
16150
|
+
|
|
16151
|
+
/***/ 3741:
|
|
16152
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
16153
|
+
|
|
16154
|
+
|
|
16155
|
+
|
|
16156
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
16157
|
+
value: true
|
|
16158
|
+
}));
|
|
16159
|
+
|
|
16160
|
+
/***/ }),
|
|
16161
|
+
|
|
14552
16162
|
/***/ 427:
|
|
14553
16163
|
/***/ ((__unused_webpack_module, exports) => {
|
|
14554
16164
|
|
|
@@ -14641,6 +16251,10 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
14641
16251
|
value: true
|
|
14642
16252
|
}));
|
|
14643
16253
|
|
|
16254
|
+
__exportStar(__webpack_require__(3105), exports);
|
|
16255
|
+
|
|
16256
|
+
__exportStar(__webpack_require__(3741), exports);
|
|
16257
|
+
|
|
14644
16258
|
__exportStar(__webpack_require__(7810), exports);
|
|
14645
16259
|
|
|
14646
16260
|
__exportStar(__webpack_require__(3292), exports);
|
|
@@ -14663,11 +16277,9 @@ __exportStar(__webpack_require__(427), exports);
|
|
|
14663
16277
|
Object.defineProperty(exports, "__esModule", ({
|
|
14664
16278
|
value: true
|
|
14665
16279
|
}));
|
|
14666
|
-
exports.alterHsl = exports.drawEllipse = exports.drawParticlePlugin = exports.drawPlugin = exports.drawShapeAfterEffect = exports.drawShape = exports.drawParticle = exports.drawGrabLine = exports.gradient = exports.drawConnectLine = exports.
|
|
16280
|
+
exports.alterHsl = exports.drawEllipse = exports.drawParticlePlugin = exports.drawPlugin = exports.drawShapeAfterEffect = exports.drawShape = exports.drawParticle = exports.drawGrabLine = exports.gradient = exports.drawConnectLine = exports.clear = exports.paintBase = exports.drawTriangle = exports.drawLine = void 0;
|
|
14667
16281
|
|
|
14668
|
-
const
|
|
14669
|
-
|
|
14670
|
-
const ColorUtils_1 = __webpack_require__(4595);
|
|
16282
|
+
const ColorUtils_1 = __webpack_require__(1642);
|
|
14671
16283
|
|
|
14672
16284
|
const Enums_1 = __webpack_require__(8678);
|
|
14673
16285
|
|
|
@@ -14678,6 +16290,8 @@ function drawLine(context, begin, end) {
|
|
|
14678
16290
|
context.closePath();
|
|
14679
16291
|
}
|
|
14680
16292
|
|
|
16293
|
+
exports.drawLine = drawLine;
|
|
16294
|
+
|
|
14681
16295
|
function drawTriangle(context, p1, p2, p3) {
|
|
14682
16296
|
context.beginPath();
|
|
14683
16297
|
context.moveTo(p1.x, p1.y);
|
|
@@ -14686,6 +16300,8 @@ function drawTriangle(context, p1, p2, p3) {
|
|
|
14686
16300
|
context.closePath();
|
|
14687
16301
|
}
|
|
14688
16302
|
|
|
16303
|
+
exports.drawTriangle = drawTriangle;
|
|
16304
|
+
|
|
14689
16305
|
function paintBase(context, dimension, baseColor) {
|
|
14690
16306
|
context.save();
|
|
14691
16307
|
context.fillStyle = baseColor !== null && baseColor !== void 0 ? baseColor : "rgba(0,0,0,0)";
|
|
@@ -14701,117 +16317,6 @@ function clear(context, dimension) {
|
|
|
14701
16317
|
|
|
14702
16318
|
exports.clear = clear;
|
|
14703
16319
|
|
|
14704
|
-
function drawLinkLine(context, width, begin, end, maxDistance, canvasSize, warp, backgroundMask, composite, colorLine, opacity, shadow) {
|
|
14705
|
-
let drawn = false;
|
|
14706
|
-
|
|
14707
|
-
if ((0, NumberUtils_1.getDistance)(begin, end) <= maxDistance) {
|
|
14708
|
-
drawLine(context, begin, end);
|
|
14709
|
-
drawn = true;
|
|
14710
|
-
} else if (warp) {
|
|
14711
|
-
let pi1;
|
|
14712
|
-
let pi2;
|
|
14713
|
-
const endNE = {
|
|
14714
|
-
x: end.x - canvasSize.width,
|
|
14715
|
-
y: end.y
|
|
14716
|
-
};
|
|
14717
|
-
const d1 = (0, NumberUtils_1.getDistances)(begin, endNE);
|
|
14718
|
-
|
|
14719
|
-
if (d1.distance <= maxDistance) {
|
|
14720
|
-
const yi = begin.y - d1.dy / d1.dx * begin.x;
|
|
14721
|
-
pi1 = {
|
|
14722
|
-
x: 0,
|
|
14723
|
-
y: yi
|
|
14724
|
-
};
|
|
14725
|
-
pi2 = {
|
|
14726
|
-
x: canvasSize.width,
|
|
14727
|
-
y: yi
|
|
14728
|
-
};
|
|
14729
|
-
} else {
|
|
14730
|
-
const endSW = {
|
|
14731
|
-
x: end.x,
|
|
14732
|
-
y: end.y - canvasSize.height
|
|
14733
|
-
};
|
|
14734
|
-
const d2 = (0, NumberUtils_1.getDistances)(begin, endSW);
|
|
14735
|
-
|
|
14736
|
-
if (d2.distance <= maxDistance) {
|
|
14737
|
-
const yi = begin.y - d2.dy / d2.dx * begin.x;
|
|
14738
|
-
const xi = -yi / (d2.dy / d2.dx);
|
|
14739
|
-
pi1 = {
|
|
14740
|
-
x: xi,
|
|
14741
|
-
y: 0
|
|
14742
|
-
};
|
|
14743
|
-
pi2 = {
|
|
14744
|
-
x: xi,
|
|
14745
|
-
y: canvasSize.height
|
|
14746
|
-
};
|
|
14747
|
-
} else {
|
|
14748
|
-
const endSE = {
|
|
14749
|
-
x: end.x - canvasSize.width,
|
|
14750
|
-
y: end.y - canvasSize.height
|
|
14751
|
-
};
|
|
14752
|
-
const d3 = (0, NumberUtils_1.getDistances)(begin, endSE);
|
|
14753
|
-
|
|
14754
|
-
if (d3.distance <= maxDistance) {
|
|
14755
|
-
const yi = begin.y - d3.dy / d3.dx * begin.x;
|
|
14756
|
-
const xi = -yi / (d3.dy / d3.dx);
|
|
14757
|
-
pi1 = {
|
|
14758
|
-
x: xi,
|
|
14759
|
-
y: yi
|
|
14760
|
-
};
|
|
14761
|
-
pi2 = {
|
|
14762
|
-
x: pi1.x + canvasSize.width,
|
|
14763
|
-
y: pi1.y + canvasSize.height
|
|
14764
|
-
};
|
|
14765
|
-
}
|
|
14766
|
-
}
|
|
14767
|
-
}
|
|
14768
|
-
|
|
14769
|
-
if (pi1 && pi2) {
|
|
14770
|
-
drawLine(context, begin, pi1);
|
|
14771
|
-
drawLine(context, end, pi2);
|
|
14772
|
-
drawn = true;
|
|
14773
|
-
}
|
|
14774
|
-
}
|
|
14775
|
-
|
|
14776
|
-
if (!drawn) {
|
|
14777
|
-
return;
|
|
14778
|
-
}
|
|
14779
|
-
|
|
14780
|
-
context.lineWidth = width;
|
|
14781
|
-
|
|
14782
|
-
if (backgroundMask) {
|
|
14783
|
-
context.globalCompositeOperation = composite;
|
|
14784
|
-
}
|
|
14785
|
-
|
|
14786
|
-
context.strokeStyle = (0, ColorUtils_1.getStyleFromRgb)(colorLine, opacity);
|
|
14787
|
-
|
|
14788
|
-
if (shadow.enable) {
|
|
14789
|
-
const shadowColor = (0, ColorUtils_1.colorToRgb)(shadow.color);
|
|
14790
|
-
|
|
14791
|
-
if (shadowColor) {
|
|
14792
|
-
context.shadowBlur = shadow.blur;
|
|
14793
|
-
context.shadowColor = (0, ColorUtils_1.getStyleFromRgb)(shadowColor);
|
|
14794
|
-
}
|
|
14795
|
-
}
|
|
14796
|
-
|
|
14797
|
-
context.stroke();
|
|
14798
|
-
}
|
|
14799
|
-
|
|
14800
|
-
exports.drawLinkLine = drawLinkLine;
|
|
14801
|
-
|
|
14802
|
-
function drawLinkTriangle(context, pos1, pos2, pos3, backgroundMask, composite, colorTriangle, opacityTriangle) {
|
|
14803
|
-
drawTriangle(context, pos1, pos2, pos3);
|
|
14804
|
-
|
|
14805
|
-
if (backgroundMask) {
|
|
14806
|
-
context.globalCompositeOperation = composite;
|
|
14807
|
-
}
|
|
14808
|
-
|
|
14809
|
-
context.fillStyle = (0, ColorUtils_1.getStyleFromRgb)(colorTriangle, opacityTriangle);
|
|
14810
|
-
context.fill();
|
|
14811
|
-
}
|
|
14812
|
-
|
|
14813
|
-
exports.drawLinkTriangle = drawLinkTriangle;
|
|
14814
|
-
|
|
14815
16320
|
function drawConnectLine(context, width, lineStyle, begin, end) {
|
|
14816
16321
|
context.save();
|
|
14817
16322
|
drawLine(context, begin, end);
|
|
@@ -15187,7 +16692,7 @@ exports.CircleWarp = CircleWarp;
|
|
|
15187
16692
|
|
|
15188
16693
|
/***/ }),
|
|
15189
16694
|
|
|
15190
|
-
/***/
|
|
16695
|
+
/***/ 1642:
|
|
15191
16696
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
15192
16697
|
|
|
15193
16698
|
|
|
@@ -15288,7 +16793,7 @@ function colorToRgb(input, index, useIndex = true) {
|
|
|
15288
16793
|
let res;
|
|
15289
16794
|
|
|
15290
16795
|
if (typeof color.value === "string") {
|
|
15291
|
-
if (color.value === Constants_1.
|
|
16796
|
+
if (color.value === Constants_1.randomColorValue) {
|
|
15292
16797
|
res = getRandomRgbColor();
|
|
15293
16798
|
} else {
|
|
15294
16799
|
res = stringToRgb(color.value);
|
|
@@ -15645,7 +17150,7 @@ exports.colorMix = colorMix;
|
|
|
15645
17150
|
function getLinkColor(p1, p2, linkColor) {
|
|
15646
17151
|
var _a, _b;
|
|
15647
17152
|
|
|
15648
|
-
if (linkColor === Constants_1.
|
|
17153
|
+
if (linkColor === Constants_1.randomColorValue) {
|
|
15649
17154
|
return getRandomRgbColor();
|
|
15650
17155
|
} else if (linkColor === "mid") {
|
|
15651
17156
|
const sourceColor = (_a = p1.getFillColor()) !== null && _a !== void 0 ? _a : p1.getStrokeColor();
|
|
@@ -15670,15 +17175,15 @@ exports.getLinkColor = getLinkColor;
|
|
|
15670
17175
|
function getLinkRandomColor(optColor, blink, consent) {
|
|
15671
17176
|
const color = typeof optColor === "string" ? optColor : optColor.value;
|
|
15672
17177
|
|
|
15673
|
-
if (color === Constants_1.
|
|
17178
|
+
if (color === Constants_1.randomColorValue) {
|
|
15674
17179
|
if (consent) {
|
|
15675
17180
|
return colorToRgb({
|
|
15676
17181
|
value: color
|
|
15677
17182
|
});
|
|
15678
17183
|
} else if (blink) {
|
|
15679
|
-
return Constants_1.
|
|
17184
|
+
return Constants_1.randomColorValue;
|
|
15680
17185
|
} else {
|
|
15681
|
-
return Constants_1.
|
|
17186
|
+
return Constants_1.midColorValue;
|
|
15682
17187
|
}
|
|
15683
17188
|
} else {
|
|
15684
17189
|
return colorToRgb({
|
|
@@ -15757,27 +17262,113 @@ function setColorAnimation(colorValue, colorAnimation, reduceFactor) {
|
|
|
15757
17262
|
Object.defineProperty(exports, "__esModule", ({
|
|
15758
17263
|
value: true
|
|
15759
17264
|
}));
|
|
15760
|
-
exports.
|
|
15761
|
-
|
|
15762
|
-
|
|
15763
|
-
|
|
15764
|
-
exports.
|
|
15765
|
-
|
|
15766
|
-
|
|
15767
|
-
|
|
15768
|
-
|
|
15769
|
-
|
|
15770
|
-
|
|
15771
|
-
|
|
15772
|
-
|
|
15773
|
-
|
|
15774
|
-
|
|
15775
|
-
|
|
15776
|
-
|
|
15777
|
-
|
|
15778
|
-
|
|
15779
|
-
|
|
15780
|
-
|
|
17265
|
+
exports.noPolygonFound = exports.noPolygonDataLoaded = exports.visibilityChangeEvent = exports.resizeEvent = exports.touchCancelEvent = exports.mouseOutEvent = exports.mouseLeaveEvent = exports.touchMoveEvent = exports.touchStartEvent = exports.mouseMoveEvent = exports.mouseUpEvent = exports.mouseDownEvent = exports.touchEndEvent = exports.midColorValue = exports.randomColorValue = exports.canvasClass = void 0;
|
|
17266
|
+
exports.canvasClass = "tsparticles-canvas-el";
|
|
17267
|
+
exports.randomColorValue = "random";
|
|
17268
|
+
exports.midColorValue = "mid";
|
|
17269
|
+
exports.touchEndEvent = "touchend";
|
|
17270
|
+
exports.mouseDownEvent = "mousedown";
|
|
17271
|
+
exports.mouseUpEvent = "mouseup";
|
|
17272
|
+
exports.mouseMoveEvent = "mousemove";
|
|
17273
|
+
exports.touchStartEvent = "touchstart";
|
|
17274
|
+
exports.touchMoveEvent = "touchmove";
|
|
17275
|
+
exports.mouseLeaveEvent = "mouseleave";
|
|
17276
|
+
exports.mouseOutEvent = "mouseout";
|
|
17277
|
+
exports.touchCancelEvent = "touchcancel";
|
|
17278
|
+
exports.resizeEvent = "resize";
|
|
17279
|
+
exports.visibilityChangeEvent = "visibilitychange";
|
|
17280
|
+
exports.noPolygonDataLoaded = "No polygon data loaded.";
|
|
17281
|
+
exports.noPolygonFound = "No polygon found, you need to specify SVG url in config.";
|
|
17282
|
+
|
|
17283
|
+
/***/ }),
|
|
17284
|
+
|
|
17285
|
+
/***/ 7917:
|
|
17286
|
+
/***/ (function(__unused_webpack_module, exports) {
|
|
17287
|
+
|
|
17288
|
+
|
|
17289
|
+
|
|
17290
|
+
var __classPrivateFieldSet = this && this.__classPrivateFieldSet || function (receiver, state, value, kind, f) {
|
|
17291
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
17292
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
17293
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
17294
|
+
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
17295
|
+
};
|
|
17296
|
+
|
|
17297
|
+
var __classPrivateFieldGet = this && this.__classPrivateFieldGet || function (receiver, state, kind, f) {
|
|
17298
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
17299
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
17300
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
17301
|
+
};
|
|
17302
|
+
|
|
17303
|
+
var _EventDispatcher_listeners;
|
|
17304
|
+
|
|
17305
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
17306
|
+
value: true
|
|
17307
|
+
}));
|
|
17308
|
+
exports.EventDispatcher = void 0;
|
|
17309
|
+
|
|
17310
|
+
class EventDispatcher {
|
|
17311
|
+
constructor() {
|
|
17312
|
+
_EventDispatcher_listeners.set(this, void 0);
|
|
17313
|
+
|
|
17314
|
+
__classPrivateFieldSet(this, _EventDispatcher_listeners, new Map(), "f");
|
|
17315
|
+
}
|
|
17316
|
+
|
|
17317
|
+
addEventListener(type, listener) {
|
|
17318
|
+
var _a;
|
|
17319
|
+
|
|
17320
|
+
this.removeEventListener(type, listener);
|
|
17321
|
+
|
|
17322
|
+
if (!__classPrivateFieldGet(this, _EventDispatcher_listeners, "f").get(type)) {
|
|
17323
|
+
__classPrivateFieldGet(this, _EventDispatcher_listeners, "f").set(type, []);
|
|
17324
|
+
}
|
|
17325
|
+
|
|
17326
|
+
(_a = __classPrivateFieldGet(this, _EventDispatcher_listeners, "f").get(type)) === null || _a === void 0 ? void 0 : _a.push(listener);
|
|
17327
|
+
}
|
|
17328
|
+
|
|
17329
|
+
removeEventListener(type, listener) {
|
|
17330
|
+
const arr = __classPrivateFieldGet(this, _EventDispatcher_listeners, "f").get(type);
|
|
17331
|
+
|
|
17332
|
+
if (!arr) {
|
|
17333
|
+
return;
|
|
17334
|
+
}
|
|
17335
|
+
|
|
17336
|
+
const length = arr.length,
|
|
17337
|
+
idx = arr.indexOf(listener);
|
|
17338
|
+
|
|
17339
|
+
if (idx < 0) {
|
|
17340
|
+
return;
|
|
17341
|
+
}
|
|
17342
|
+
|
|
17343
|
+
if (length === 1) {
|
|
17344
|
+
__classPrivateFieldGet(this, _EventDispatcher_listeners, "f").delete(type);
|
|
17345
|
+
} else {
|
|
17346
|
+
arr.splice(idx, 1);
|
|
17347
|
+
}
|
|
17348
|
+
}
|
|
17349
|
+
|
|
17350
|
+
removeAllEventListeners(type) {
|
|
17351
|
+
if (!type) {
|
|
17352
|
+
__classPrivateFieldSet(this, _EventDispatcher_listeners, new Map(), "f");
|
|
17353
|
+
} else {
|
|
17354
|
+
__classPrivateFieldGet(this, _EventDispatcher_listeners, "f").delete(type);
|
|
17355
|
+
}
|
|
17356
|
+
}
|
|
17357
|
+
|
|
17358
|
+
dispatchEvent(type, args) {
|
|
17359
|
+
var _a;
|
|
17360
|
+
|
|
17361
|
+
(_a = __classPrivateFieldGet(this, _EventDispatcher_listeners, "f").get(type)) === null || _a === void 0 ? void 0 : _a.forEach(handler => handler(args));
|
|
17362
|
+
}
|
|
17363
|
+
|
|
17364
|
+
hasEventListener(type) {
|
|
17365
|
+
return !!__classPrivateFieldGet(this, _EventDispatcher_listeners, "f").get(type);
|
|
17366
|
+
}
|
|
17367
|
+
|
|
17368
|
+
}
|
|
17369
|
+
|
|
17370
|
+
exports.EventDispatcher = EventDispatcher;
|
|
17371
|
+
_EventDispatcher_listeners = new WeakMap();
|
|
15781
17372
|
|
|
15782
17373
|
/***/ }),
|
|
15783
17374
|
|
|
@@ -15795,6 +17386,8 @@ const Enums_1 = __webpack_require__(8678);
|
|
|
15795
17386
|
|
|
15796
17387
|
const Constants_1 = __webpack_require__(9726);
|
|
15797
17388
|
|
|
17389
|
+
const Utils_1 = __webpack_require__(772);
|
|
17390
|
+
|
|
15798
17391
|
function manageListener(element, event, handler, add, options) {
|
|
15799
17392
|
if (add) {
|
|
15800
17393
|
let addOptions = {
|
|
@@ -15841,6 +17434,8 @@ class EventListeners {
|
|
|
15841
17434
|
|
|
15842
17435
|
this.themeChangeHandler = e => this.handleThemeChange(e);
|
|
15843
17436
|
|
|
17437
|
+
this.oldThemeChangeHandler = e => this.handleThemeChange(e);
|
|
17438
|
+
|
|
15844
17439
|
this.resizeHandler = () => this.handleWindowResize();
|
|
15845
17440
|
}
|
|
15846
17441
|
|
|
@@ -15858,11 +17453,11 @@ class EventListeners {
|
|
|
15858
17453
|
const container = this.container;
|
|
15859
17454
|
const options = container.actualOptions;
|
|
15860
17455
|
const detectType = options.interactivity.detectsOn;
|
|
15861
|
-
let
|
|
17456
|
+
let mouseLeaveTmpEvent = Constants_1.mouseLeaveEvent;
|
|
15862
17457
|
|
|
15863
17458
|
if (detectType === Enums_1.InteractivityDetect.window) {
|
|
15864
17459
|
container.interactivity.element = window;
|
|
15865
|
-
|
|
17460
|
+
mouseLeaveTmpEvent = Constants_1.mouseOutEvent;
|
|
15866
17461
|
} else if (detectType === Enums_1.InteractivityDetect.parent && container.canvas.element) {
|
|
15867
17462
|
const canvasEl = container.canvas.element;
|
|
15868
17463
|
container.interactivity.element = (_a = canvasEl.parentElement) !== null && _a !== void 0 ? _a : canvasEl.parentNode;
|
|
@@ -15870,10 +17465,18 @@ class EventListeners {
|
|
|
15870
17465
|
container.interactivity.element = container.canvas.element;
|
|
15871
17466
|
}
|
|
15872
17467
|
|
|
15873
|
-
const mediaMatch = typeof matchMedia !== "undefined" && matchMedia("(prefers-color-scheme: dark)");
|
|
17468
|
+
const mediaMatch = !(0, Utils_1.isSsr)() && typeof matchMedia !== "undefined" && matchMedia("(prefers-color-scheme: dark)");
|
|
15874
17469
|
|
|
15875
17470
|
if (mediaMatch) {
|
|
15876
|
-
|
|
17471
|
+
if (mediaMatch.addEventListener !== undefined) {
|
|
17472
|
+
manageListener(mediaMatch, "change", this.themeChangeHandler, add);
|
|
17473
|
+
} else if (mediaMatch.addListener !== undefined) {
|
|
17474
|
+
if (add) {
|
|
17475
|
+
mediaMatch.addListener(this.oldThemeChangeHandler);
|
|
17476
|
+
} else {
|
|
17477
|
+
mediaMatch.removeListener(this.oldThemeChangeHandler);
|
|
17478
|
+
}
|
|
17479
|
+
}
|
|
15877
17480
|
}
|
|
15878
17481
|
|
|
15879
17482
|
const interactivityEl = container.interactivity.element;
|
|
@@ -15885,20 +17488,20 @@ class EventListeners {
|
|
|
15885
17488
|
const html = interactivityEl;
|
|
15886
17489
|
|
|
15887
17490
|
if (options.interactivity.events.onHover.enable || options.interactivity.events.onClick.enable) {
|
|
15888
|
-
manageListener(interactivityEl, Constants_1.
|
|
15889
|
-
manageListener(interactivityEl, Constants_1.
|
|
15890
|
-
manageListener(interactivityEl, Constants_1.
|
|
17491
|
+
manageListener(interactivityEl, Constants_1.mouseMoveEvent, this.mouseMoveHandler, add);
|
|
17492
|
+
manageListener(interactivityEl, Constants_1.touchStartEvent, this.touchStartHandler, add);
|
|
17493
|
+
manageListener(interactivityEl, Constants_1.touchMoveEvent, this.touchMoveHandler, add);
|
|
15891
17494
|
|
|
15892
17495
|
if (!options.interactivity.events.onClick.enable) {
|
|
15893
|
-
manageListener(interactivityEl, Constants_1.
|
|
17496
|
+
manageListener(interactivityEl, Constants_1.touchEndEvent, this.touchEndHandler, add);
|
|
15894
17497
|
} else {
|
|
15895
|
-
manageListener(interactivityEl, Constants_1.
|
|
15896
|
-
manageListener(interactivityEl, Constants_1.
|
|
15897
|
-
manageListener(interactivityEl, Constants_1.
|
|
17498
|
+
manageListener(interactivityEl, Constants_1.touchEndEvent, this.touchEndClickHandler, add);
|
|
17499
|
+
manageListener(interactivityEl, Constants_1.mouseUpEvent, this.mouseUpHandler, add);
|
|
17500
|
+
manageListener(interactivityEl, Constants_1.mouseDownEvent, this.mouseDownHandler, add);
|
|
15898
17501
|
}
|
|
15899
17502
|
|
|
15900
|
-
manageListener(interactivityEl,
|
|
15901
|
-
manageListener(interactivityEl, Constants_1.
|
|
17503
|
+
manageListener(interactivityEl, mouseLeaveTmpEvent, this.mouseLeaveHandler, add);
|
|
17504
|
+
manageListener(interactivityEl, Constants_1.touchCancelEvent, this.touchCancelHandler, add);
|
|
15902
17505
|
}
|
|
15903
17506
|
|
|
15904
17507
|
if (container.canvas.element) {
|
|
@@ -15927,12 +17530,12 @@ class EventListeners {
|
|
|
15927
17530
|
this.resizeObserver.observe(container.canvas.element);
|
|
15928
17531
|
}
|
|
15929
17532
|
} else {
|
|
15930
|
-
manageListener(window, Constants_1.
|
|
17533
|
+
manageListener(window, Constants_1.resizeEvent, this.resizeHandler, add);
|
|
15931
17534
|
}
|
|
15932
17535
|
}
|
|
15933
17536
|
|
|
15934
17537
|
if (document) {
|
|
15935
|
-
manageListener(document, Constants_1.
|
|
17538
|
+
manageListener(document, Constants_1.visibilityChangeEvent, this.visibilityChangeHandler, add, false);
|
|
15936
17539
|
}
|
|
15937
17540
|
}
|
|
15938
17541
|
|
|
@@ -16054,7 +17657,7 @@ class EventListeners {
|
|
|
16054
17657
|
}
|
|
16055
17658
|
|
|
16056
17659
|
container.interactivity.mouse.position = pos;
|
|
16057
|
-
container.interactivity.status = Constants_1.
|
|
17660
|
+
container.interactivity.status = Constants_1.mouseMoveEvent;
|
|
16058
17661
|
}
|
|
16059
17662
|
|
|
16060
17663
|
mouseTouchFinish() {
|
|
@@ -16068,7 +17671,7 @@ class EventListeners {
|
|
|
16068
17671
|
delete mouse.position;
|
|
16069
17672
|
delete mouse.clickPosition;
|
|
16070
17673
|
delete mouse.downPosition;
|
|
16071
|
-
interactivity.status = Constants_1.
|
|
17674
|
+
interactivity.status = Constants_1.mouseLeaveEvent;
|
|
16072
17675
|
mouse.inside = false;
|
|
16073
17676
|
mouse.clicking = false;
|
|
16074
17677
|
}
|
|
@@ -16259,7 +17862,7 @@ function getDistance(pointA, pointB) {
|
|
|
16259
17862
|
|
|
16260
17863
|
exports.getDistance = getDistance;
|
|
16261
17864
|
|
|
16262
|
-
function getParticleDirectionAngle(direction) {
|
|
17865
|
+
function getParticleDirectionAngle(direction, position, center) {
|
|
16263
17866
|
if (typeof direction === "number") {
|
|
16264
17867
|
return direction * Math.PI / 180;
|
|
16265
17868
|
} else {
|
|
@@ -16288,6 +17891,12 @@ function getParticleDirectionAngle(direction) {
|
|
|
16288
17891
|
case Enums_1.MoveDirection.topLeft:
|
|
16289
17892
|
return -3 * Math.PI / 4;
|
|
16290
17893
|
|
|
17894
|
+
case Enums_1.MoveDirection.inside:
|
|
17895
|
+
return Math.atan2(center.y - position.y, center.x - position.x);
|
|
17896
|
+
|
|
17897
|
+
case Enums_1.MoveDirection.outside:
|
|
17898
|
+
return Math.atan2(position.y - center.y, position.x - center.x);
|
|
17899
|
+
|
|
16291
17900
|
case Enums_1.MoveDirection.none:
|
|
16292
17901
|
default:
|
|
16293
17902
|
return Math.random() * Math.PI * 2;
|
|
@@ -16434,10 +18043,10 @@ class Plugins {
|
|
|
16434
18043
|
}
|
|
16435
18044
|
}
|
|
16436
18045
|
|
|
16437
|
-
static getInteractors(container) {
|
|
18046
|
+
static getInteractors(container, force = false) {
|
|
16438
18047
|
let res = interactors.get(container);
|
|
16439
18048
|
|
|
16440
|
-
if (!res) {
|
|
18049
|
+
if (!res || force) {
|
|
16441
18050
|
res = [...interactorsInitializers.values()].map(t => t(container));
|
|
16442
18051
|
interactors.set(container, res);
|
|
16443
18052
|
}
|
|
@@ -16449,10 +18058,10 @@ class Plugins {
|
|
|
16449
18058
|
interactorsInitializers.set(name, initInteractor);
|
|
16450
18059
|
}
|
|
16451
18060
|
|
|
16452
|
-
static getUpdaters(container) {
|
|
18061
|
+
static getUpdaters(container, force = false) {
|
|
16453
18062
|
let res = updaters.get(container);
|
|
16454
18063
|
|
|
16455
|
-
if (!res) {
|
|
18064
|
+
if (!res || force) {
|
|
16456
18065
|
res = [...updatersInitializers.values()].map(t => t(container));
|
|
16457
18066
|
updaters.set(container, res);
|
|
16458
18067
|
}
|
|
@@ -16767,29 +18376,29 @@ function itemFromArray(array, index, useIndex = true) {
|
|
|
16767
18376
|
|
|
16768
18377
|
exports.itemFromArray = itemFromArray;
|
|
16769
18378
|
|
|
16770
|
-
function isPointInside(point, size, radius, direction) {
|
|
16771
|
-
return areBoundsInside(calculateBounds(point, radius !== null && radius !== void 0 ? radius : 0), size, direction);
|
|
18379
|
+
function isPointInside(point, size, offset, radius, direction) {
|
|
18380
|
+
return areBoundsInside(calculateBounds(point, radius !== null && radius !== void 0 ? radius : 0), size, offset, direction);
|
|
16772
18381
|
}
|
|
16773
18382
|
|
|
16774
18383
|
exports.isPointInside = isPointInside;
|
|
16775
18384
|
|
|
16776
|
-
function areBoundsInside(bounds, size, direction) {
|
|
18385
|
+
function areBoundsInside(bounds, size, offset, direction) {
|
|
16777
18386
|
let inside = true;
|
|
16778
18387
|
|
|
16779
18388
|
if (!direction || direction === Enums_1.OutModeDirection.bottom) {
|
|
16780
|
-
inside = bounds.top < size.height;
|
|
18389
|
+
inside = bounds.top < size.height + offset.x;
|
|
16781
18390
|
}
|
|
16782
18391
|
|
|
16783
18392
|
if (inside && (!direction || direction === Enums_1.OutModeDirection.left)) {
|
|
16784
|
-
inside = bounds.right >
|
|
18393
|
+
inside = bounds.right > offset.x;
|
|
16785
18394
|
}
|
|
16786
18395
|
|
|
16787
18396
|
if (inside && (!direction || direction === Enums_1.OutModeDirection.right)) {
|
|
16788
|
-
inside = bounds.left < size.width;
|
|
18397
|
+
inside = bounds.left < size.width + offset.y;
|
|
16789
18398
|
}
|
|
16790
18399
|
|
|
16791
18400
|
if (inside && (!direction || direction === Enums_1.OutModeDirection.top)) {
|
|
16792
|
-
inside = bounds.bottom >
|
|
18401
|
+
inside = bounds.bottom > offset.y;
|
|
16793
18402
|
}
|
|
16794
18403
|
|
|
16795
18404
|
return inside;
|
|
@@ -16914,15 +18523,18 @@ function circleBounceDataFromParticle(p) {
|
|
|
16914
18523
|
exports.circleBounceDataFromParticle = circleBounceDataFromParticle;
|
|
16915
18524
|
|
|
16916
18525
|
function circleBounce(p1, p2) {
|
|
16917
|
-
const
|
|
16918
|
-
|
|
16919
|
-
|
|
16920
|
-
|
|
16921
|
-
const
|
|
16922
|
-
const
|
|
18526
|
+
const {
|
|
18527
|
+
x: xVelocityDiff,
|
|
18528
|
+
y: yVelocityDiff
|
|
18529
|
+
} = p1.velocity.sub(p2.velocity);
|
|
18530
|
+
const [pos1, pos2] = [p1.position, p2.position];
|
|
18531
|
+
const {
|
|
18532
|
+
dx: xDist,
|
|
18533
|
+
dy: yDist
|
|
18534
|
+
} = (0, NumberUtils_1.getDistances)(pos2, pos1);
|
|
16923
18535
|
|
|
16924
18536
|
if (xVelocityDiff * xDist + yVelocityDiff * yDist >= 0) {
|
|
16925
|
-
const angle = -Math.atan2(
|
|
18537
|
+
const angle = -Math.atan2(yDist, xDist);
|
|
16926
18538
|
const m1 = p1.mass;
|
|
16927
18539
|
const m2 = p2.mass;
|
|
16928
18540
|
const u1 = p1.velocity.rotate(angle);
|
|
@@ -17029,7 +18641,7 @@ __exportStar(__webpack_require__(4410), exports);
|
|
|
17029
18641
|
|
|
17030
18642
|
__exportStar(__webpack_require__(4119), exports);
|
|
17031
18643
|
|
|
17032
|
-
__exportStar(__webpack_require__(
|
|
18644
|
+
__exportStar(__webpack_require__(1642), exports);
|
|
17033
18645
|
|
|
17034
18646
|
__exportStar(__webpack_require__(9726), exports);
|
|
17035
18647
|
|
|
@@ -17076,32 +18688,16 @@ var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
|
17076
18688
|
Object.defineProperty(exports, "__esModule", ({
|
|
17077
18689
|
value: true
|
|
17078
18690
|
}));
|
|
17079
|
-
exports.tsParticles =
|
|
17080
|
-
|
|
17081
|
-
const pjs_1 = __webpack_require__(3533);
|
|
18691
|
+
exports.tsParticles = void 0;
|
|
17082
18692
|
|
|
17083
18693
|
const main_1 = __webpack_require__(1036);
|
|
17084
18694
|
|
|
17085
|
-
Object.defineProperty(exports, "Main", ({
|
|
17086
|
-
enumerable: true,
|
|
17087
|
-
get: function () {
|
|
17088
|
-
return main_1.Main;
|
|
17089
|
-
}
|
|
17090
|
-
}));
|
|
17091
18695
|
const tsParticles = new main_1.Main();
|
|
17092
18696
|
exports.tsParticles = tsParticles;
|
|
17093
18697
|
tsParticles.init();
|
|
17094
|
-
const {
|
|
17095
|
-
particlesJS,
|
|
17096
|
-
pJSDom
|
|
17097
|
-
} = (0, pjs_1.initPjs)(tsParticles);
|
|
17098
|
-
exports.particlesJS = particlesJS;
|
|
17099
|
-
exports.pJSDom = pJSDom;
|
|
17100
18698
|
|
|
17101
18699
|
__exportStar(__webpack_require__(4068), exports);
|
|
17102
18700
|
|
|
17103
|
-
__exportStar(__webpack_require__(3515), exports);
|
|
17104
|
-
|
|
17105
18701
|
__exportStar(__webpack_require__(8678), exports);
|
|
17106
18702
|
|
|
17107
18703
|
__exportStar(__webpack_require__(6617), exports);
|
|
@@ -17110,8 +18706,6 @@ __exportStar(__webpack_require__(2954), exports);
|
|
|
17110
18706
|
|
|
17111
18707
|
__exportStar(__webpack_require__(9238), exports);
|
|
17112
18708
|
|
|
17113
|
-
__exportStar(__webpack_require__(847), exports);
|
|
17114
|
-
|
|
17115
18709
|
__exportStar(__webpack_require__(7981), exports);
|
|
17116
18710
|
|
|
17117
18711
|
__exportStar(__webpack_require__(660), exports);
|
|
@@ -17172,7 +18766,7 @@ class Main {
|
|
|
17172
18766
|
return Loader_1.Loader.set(id, element, options);
|
|
17173
18767
|
}
|
|
17174
18768
|
|
|
17175
|
-
loadJSON(tagId, pathConfigJson, index) {
|
|
18769
|
+
async loadJSON(tagId, pathConfigJson, index) {
|
|
17176
18770
|
return Loader_1.Loader.loadJSON(tagId, pathConfigJson, index);
|
|
17177
18771
|
}
|
|
17178
18772
|
|
|
@@ -17192,7 +18786,13 @@ class Main {
|
|
|
17192
18786
|
return Loader_1.Loader.domItem(index);
|
|
17193
18787
|
}
|
|
17194
18788
|
|
|
17195
|
-
|
|
18789
|
+
async refresh() {
|
|
18790
|
+
for (const instance of this.dom()) {
|
|
18791
|
+
await instance.refresh();
|
|
18792
|
+
}
|
|
18793
|
+
}
|
|
18794
|
+
|
|
18795
|
+
async addShape(shape, drawer, init, afterEffect, destroy) {
|
|
17196
18796
|
let customDrawer;
|
|
17197
18797
|
|
|
17198
18798
|
if (typeof drawer === "function") {
|
|
@@ -17207,72 +18807,50 @@ class Main {
|
|
|
17207
18807
|
}
|
|
17208
18808
|
|
|
17209
18809
|
Utils_1.Plugins.addShapeDrawer(shape, customDrawer);
|
|
18810
|
+
await this.refresh();
|
|
17210
18811
|
}
|
|
17211
18812
|
|
|
17212
|
-
addPreset(preset, options, override = false) {
|
|
18813
|
+
async addPreset(preset, options, override = false) {
|
|
17213
18814
|
Utils_1.Plugins.addPreset(preset, options, override);
|
|
18815
|
+
await this.refresh();
|
|
17214
18816
|
}
|
|
17215
18817
|
|
|
17216
|
-
addPlugin(plugin) {
|
|
18818
|
+
async addPlugin(plugin) {
|
|
17217
18819
|
Utils_1.Plugins.addPlugin(plugin);
|
|
18820
|
+
await this.refresh();
|
|
17218
18821
|
}
|
|
17219
18822
|
|
|
17220
|
-
addPathGenerator(name, generator) {
|
|
18823
|
+
async addPathGenerator(name, generator) {
|
|
17221
18824
|
Utils_1.Plugins.addPathGenerator(name, generator);
|
|
18825
|
+
await this.refresh();
|
|
17222
18826
|
}
|
|
17223
18827
|
|
|
17224
|
-
addInteractor(name, interactorInitializer) {
|
|
18828
|
+
async addInteractor(name, interactorInitializer) {
|
|
17225
18829
|
Utils_1.Plugins.addInteractor(name, interactorInitializer);
|
|
18830
|
+
await this.refresh();
|
|
17226
18831
|
}
|
|
17227
18832
|
|
|
17228
|
-
addParticleUpdater(name, updaterInitializer) {
|
|
18833
|
+
async addParticleUpdater(name, updaterInitializer) {
|
|
17229
18834
|
Utils_1.Plugins.addParticleUpdater(name, updaterInitializer);
|
|
18835
|
+
await this.refresh();
|
|
17230
18836
|
}
|
|
17231
18837
|
|
|
17232
|
-
|
|
17233
|
-
|
|
17234
|
-
|
|
17235
|
-
_Main_initialized = new WeakMap();
|
|
17236
|
-
|
|
17237
|
-
/***/ }),
|
|
17238
|
-
|
|
17239
|
-
/***/ 3533:
|
|
17240
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
17241
|
-
|
|
17242
|
-
|
|
17243
|
-
|
|
17244
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
17245
|
-
value: true
|
|
17246
|
-
}));
|
|
17247
|
-
exports.initPjs = void 0;
|
|
17248
|
-
|
|
17249
|
-
const initPjs = main => {
|
|
17250
|
-
const particlesJS = (tagId, options) => {
|
|
17251
|
-
return main.load(tagId, options);
|
|
17252
|
-
};
|
|
18838
|
+
addEventListener(type, listener) {
|
|
18839
|
+
Loader_1.Loader.addEventListener(type, listener);
|
|
18840
|
+
}
|
|
17253
18841
|
|
|
17254
|
-
|
|
17255
|
-
|
|
17256
|
-
|
|
17257
|
-
callback(container);
|
|
17258
|
-
}
|
|
17259
|
-
}).catch(() => {
|
|
17260
|
-
callback(undefined);
|
|
17261
|
-
});
|
|
17262
|
-
};
|
|
18842
|
+
removeEventListener(type, listener) {
|
|
18843
|
+
Loader_1.Loader.removeEventListener(type, listener);
|
|
18844
|
+
}
|
|
17263
18845
|
|
|
17264
|
-
|
|
17265
|
-
|
|
17266
|
-
}
|
|
18846
|
+
dispatchEvent(type, args) {
|
|
18847
|
+
Loader_1.Loader.dispatchEvent(type, args);
|
|
18848
|
+
}
|
|
17267
18849
|
|
|
17268
|
-
|
|
17269
|
-
return {
|
|
17270
|
-
particlesJS,
|
|
17271
|
-
pJSDom
|
|
17272
|
-
};
|
|
17273
|
-
};
|
|
18850
|
+
}
|
|
17274
18851
|
|
|
17275
|
-
exports.
|
|
18852
|
+
exports.Main = Main;
|
|
18853
|
+
_Main_initialized = new WeakMap();
|
|
17276
18854
|
|
|
17277
18855
|
/***/ })
|
|
17278
18856
|
|
|
@@ -17578,8 +19156,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17578
19156
|
/* harmony export */ });
|
|
17579
19157
|
/* harmony import */ var tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9685);
|
|
17580
19158
|
/* harmony import */ var tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);
|
|
17581
|
-
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
17582
|
-
/* harmony import */ var tsparticles_slim__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
19159
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(967);
|
|
19160
|
+
/* harmony import */ var tsparticles_slim__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7330);
|
|
17583
19161
|
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
17584
19162
|
/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__) if(["default","loadFull","loadSlim"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__[__WEBPACK_IMPORT_KEY__]
|
|
17585
19163
|
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|