@tsparticles/fireworks 3.0.0-beta.3 → 3.0.0-beta.4
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/package.json +10 -10
- package/report.html +4 -22
- package/tsparticles.fireworks.bundle.js +595 -473
- package/tsparticles.fireworks.bundle.min.js +1 -1
- package/tsparticles.fireworks.bundle.min.js.LICENSE.txt +1 -1
- package/tsparticles.fireworks.js +17 -222
- package/tsparticles.fireworks.min.js +1 -1
- package/tsparticles.fireworks.min.js.LICENSE.txt +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.0.0-beta.
|
|
1
|
+
/*! tsParticles Fireworks v3.0.0-beta.4 by Matteo Bruni */
|
package/tsparticles.fireworks.js
CHANGED
|
@@ -4,33 +4,33 @@
|
|
|
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
|
-
* v3.0.0-beta.
|
|
7
|
+
* v3.0.0-beta.4
|
|
8
8
|
*/
|
|
9
9
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
10
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
11
|
-
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/
|
|
11
|
+
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/shape-line"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/updater-stroke-color"));
|
|
12
12
|
else if(typeof define === 'function' && define.amd)
|
|
13
|
-
define(["@tsparticles/engine", "@tsparticles/
|
|
13
|
+
define(["@tsparticles/engine", "@tsparticles/basic", "@tsparticles/updater-destroy", "@tsparticles/plugin-emitters", "@tsparticles/updater-life", "@tsparticles/shape-line", "@tsparticles/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/updater-stroke-color"], factory);
|
|
14
14
|
else {
|
|
15
|
-
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/
|
|
15
|
+
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/shape-line"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/updater-stroke-color")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
|
|
16
16
|
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
17
17
|
}
|
|
18
|
-
})(this, (__WEBPACK_EXTERNAL_MODULE__533__,
|
|
18
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__533__, __WEBPACK_EXTERNAL_MODULE__574__, __WEBPACK_EXTERNAL_MODULE__344__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__137__, __WEBPACK_EXTERNAL_MODULE__59__, __WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__204__) => {
|
|
19
19
|
return /******/ (() => { // webpackBootstrap
|
|
20
20
|
/******/ "use strict";
|
|
21
21
|
/******/ var __webpack_modules__ = ({
|
|
22
22
|
|
|
23
|
-
/***/
|
|
23
|
+
/***/ 574:
|
|
24
24
|
/***/ ((module) => {
|
|
25
25
|
|
|
26
|
-
module.exports =
|
|
26
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__574__;
|
|
27
27
|
|
|
28
28
|
/***/ }),
|
|
29
29
|
|
|
30
|
-
/***/
|
|
30
|
+
/***/ 533:
|
|
31
31
|
/***/ ((module) => {
|
|
32
32
|
|
|
33
|
-
module.exports =
|
|
33
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__533__;
|
|
34
34
|
|
|
35
35
|
/***/ }),
|
|
36
36
|
|
|
@@ -48,13 +48,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__490__;
|
|
|
48
48
|
|
|
49
49
|
/***/ }),
|
|
50
50
|
|
|
51
|
-
/***/ 163:
|
|
52
|
-
/***/ ((module) => {
|
|
53
|
-
|
|
54
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__163__;
|
|
55
|
-
|
|
56
|
-
/***/ }),
|
|
57
|
-
|
|
58
51
|
/***/ 137:
|
|
59
52
|
/***/ ((module) => {
|
|
60
53
|
|
|
@@ -62,13 +55,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__137__;
|
|
|
62
55
|
|
|
63
56
|
/***/ }),
|
|
64
57
|
|
|
65
|
-
/***/ 501:
|
|
66
|
-
/***/ ((module) => {
|
|
67
|
-
|
|
68
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__501__;
|
|
69
|
-
|
|
70
|
-
/***/ }),
|
|
71
|
-
|
|
72
58
|
/***/ 344:
|
|
73
59
|
/***/ ((module) => {
|
|
74
60
|
|
|
@@ -83,24 +69,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__84__;
|
|
|
83
69
|
|
|
84
70
|
/***/ }),
|
|
85
71
|
|
|
86
|
-
/***/
|
|
72
|
+
/***/ 59:
|
|
87
73
|
/***/ ((module) => {
|
|
88
74
|
|
|
89
|
-
module.exports =
|
|
90
|
-
|
|
91
|
-
/***/ }),
|
|
92
|
-
|
|
93
|
-
/***/ 290:
|
|
94
|
-
/***/ ((module) => {
|
|
95
|
-
|
|
96
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__290__;
|
|
97
|
-
|
|
98
|
-
/***/ }),
|
|
99
|
-
|
|
100
|
-
/***/ 2:
|
|
101
|
-
/***/ ((module) => {
|
|
102
|
-
|
|
103
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__2__;
|
|
75
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__59__;
|
|
104
76
|
|
|
105
77
|
/***/ }),
|
|
106
78
|
|
|
@@ -246,34 +218,8 @@ class FireworkOptions {
|
|
|
246
218
|
}
|
|
247
219
|
}
|
|
248
220
|
}
|
|
249
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/
|
|
250
|
-
var
|
|
251
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-circle","commonjs2":"@tsparticles/shape-circle","amd":"@tsparticles/shape-circle","root":"window"}
|
|
252
|
-
var shape_circle_root_window_ = __webpack_require__(163);
|
|
253
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-color","commonjs2":"@tsparticles/updater-color","amd":"@tsparticles/updater-color","root":"window"}
|
|
254
|
-
var updater_color_root_window_ = __webpack_require__(501);
|
|
255
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-opacity","commonjs2":"@tsparticles/updater-opacity","amd":"@tsparticles/updater-opacity","root":"window"}
|
|
256
|
-
var updater_opacity_root_window_ = __webpack_require__(686);
|
|
257
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-out-modes","commonjs2":"@tsparticles/updater-out-modes","amd":"@tsparticles/updater-out-modes","root":"window"}
|
|
258
|
-
var updater_out_modes_root_window_ = __webpack_require__(290);
|
|
259
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-size","commonjs2":"@tsparticles/updater-size","amd":"@tsparticles/updater-size","root":"window"}
|
|
260
|
-
var updater_size_root_window_ = __webpack_require__(2);
|
|
261
|
-
;// CONCATENATED MODULE: ../basic/dist/browser/index.js
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
async function loadBasic(engine, refresh = true) {
|
|
269
|
-
await (0,move_base_root_window_.loadBaseMover)(engine, false);
|
|
270
|
-
await (0,shape_circle_root_window_.loadCircleShape)(engine, false);
|
|
271
|
-
await (0,updater_color_root_window_.loadColorUpdater)(engine, false);
|
|
272
|
-
await (0,updater_opacity_root_window_.loadOpacityUpdater)(engine, false);
|
|
273
|
-
await (0,updater_out_modes_root_window_.loadOutModesUpdater)(engine, false);
|
|
274
|
-
await (0,updater_size_root_window_.loadSizeUpdater)(engine, false);
|
|
275
|
-
await engine.refresh(refresh);
|
|
276
|
-
}
|
|
221
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/basic","commonjs2":"@tsparticles/basic","amd":"@tsparticles/basic","root":"window"}
|
|
222
|
+
var basic_root_window_ = __webpack_require__(574);
|
|
277
223
|
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-destroy","commonjs2":"@tsparticles/updater-destroy","amd":"@tsparticles/updater-destroy","root":"window"}
|
|
278
224
|
var updater_destroy_root_window_ = __webpack_require__(344);
|
|
279
225
|
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"}
|
|
@@ -282,159 +228,8 @@ var plugin_emitters_root_window_ = __webpack_require__(68);
|
|
|
282
228
|
var updater_life_root_window_ = __webpack_require__(84);
|
|
283
229
|
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-line","commonjs2":"@tsparticles/shape-line","amd":"@tsparticles/shape-line","root":"window"}
|
|
284
230
|
var shape_line_root_window_ = __webpack_require__(137);
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
class RotateAnimation {
|
|
288
|
-
constructor() {
|
|
289
|
-
this.enable = false;
|
|
290
|
-
this.speed = 0;
|
|
291
|
-
this.decay = 0;
|
|
292
|
-
this.sync = false;
|
|
293
|
-
}
|
|
294
|
-
load(data) {
|
|
295
|
-
if (!data) {
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
if (data.enable !== undefined) {
|
|
299
|
-
this.enable = data.enable;
|
|
300
|
-
}
|
|
301
|
-
if (data.speed !== undefined) {
|
|
302
|
-
this.speed = (0,engine_root_window_.setRangeValue)(data.speed);
|
|
303
|
-
}
|
|
304
|
-
if (data.decay !== undefined) {
|
|
305
|
-
this.decay = (0,engine_root_window_.setRangeValue)(data.decay);
|
|
306
|
-
}
|
|
307
|
-
if (data.sync !== undefined) {
|
|
308
|
-
this.sync = data.sync;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/Options/Classes/Rotate.js
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
class Rotate extends engine_root_window_.ValueWithRandom {
|
|
316
|
-
constructor() {
|
|
317
|
-
super();
|
|
318
|
-
this.animation = new RotateAnimation();
|
|
319
|
-
this.direction = "clockwise";
|
|
320
|
-
this.path = false;
|
|
321
|
-
this.value = 0;
|
|
322
|
-
}
|
|
323
|
-
load(data) {
|
|
324
|
-
if (!data) {
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
|
-
super.load(data);
|
|
328
|
-
if (data.direction !== undefined) {
|
|
329
|
-
this.direction = data.direction;
|
|
330
|
-
}
|
|
331
|
-
this.animation.load(data.animation);
|
|
332
|
-
if (data.path !== undefined) {
|
|
333
|
-
this.path = data.path;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/RotateUpdater.js
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
function updateRotate(particle, delta) {
|
|
341
|
-
const rotate = particle.rotate,
|
|
342
|
-
rotateOptions = particle.options.rotate;
|
|
343
|
-
if (!rotate || !rotateOptions) {
|
|
344
|
-
return;
|
|
345
|
-
}
|
|
346
|
-
const rotateAnimation = rotateOptions.animation,
|
|
347
|
-
speed = (rotate.velocity ?? 0) * delta.factor,
|
|
348
|
-
max = 2 * Math.PI,
|
|
349
|
-
decay = rotate.decay ?? 1;
|
|
350
|
-
if (!rotateAnimation.enable) {
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
switch (rotate.status) {
|
|
354
|
-
case "increasing":
|
|
355
|
-
rotate.value += speed;
|
|
356
|
-
if (rotate.value > max) {
|
|
357
|
-
rotate.value -= max;
|
|
358
|
-
}
|
|
359
|
-
break;
|
|
360
|
-
case "decreasing":
|
|
361
|
-
default:
|
|
362
|
-
rotate.value -= speed;
|
|
363
|
-
if (rotate.value < 0) {
|
|
364
|
-
rotate.value += max;
|
|
365
|
-
}
|
|
366
|
-
break;
|
|
367
|
-
}
|
|
368
|
-
if (rotate.velocity && decay !== 1) {
|
|
369
|
-
rotate.velocity *= decay;
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
class RotateUpdater {
|
|
373
|
-
constructor(container) {
|
|
374
|
-
this.container = container;
|
|
375
|
-
}
|
|
376
|
-
init(particle) {
|
|
377
|
-
const rotateOptions = particle.options.rotate;
|
|
378
|
-
if (!rotateOptions) {
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
particle.rotate = {
|
|
382
|
-
enable: rotateOptions.animation.enable,
|
|
383
|
-
value: (0,engine_root_window_.getRangeValue)(rotateOptions.value) * Math.PI / 180
|
|
384
|
-
};
|
|
385
|
-
particle.pathRotation = rotateOptions.path;
|
|
386
|
-
let rotateDirection = rotateOptions.direction;
|
|
387
|
-
if (rotateDirection === "random") {
|
|
388
|
-
const index = Math.floor((0,engine_root_window_.getRandom)() * 2);
|
|
389
|
-
rotateDirection = index > 0 ? "counter-clockwise" : "clockwise";
|
|
390
|
-
}
|
|
391
|
-
switch (rotateDirection) {
|
|
392
|
-
case "counter-clockwise":
|
|
393
|
-
case "counterClockwise":
|
|
394
|
-
particle.rotate.status = "decreasing";
|
|
395
|
-
break;
|
|
396
|
-
case "clockwise":
|
|
397
|
-
particle.rotate.status = "increasing";
|
|
398
|
-
break;
|
|
399
|
-
}
|
|
400
|
-
const rotateAnimation = rotateOptions.animation;
|
|
401
|
-
if (rotateAnimation.enable) {
|
|
402
|
-
particle.rotate.decay = 1 - (0,engine_root_window_.getRangeValue)(rotateAnimation.decay);
|
|
403
|
-
particle.rotate.velocity = (0,engine_root_window_.getRangeValue)(rotateAnimation.speed) / 360 * this.container.retina.reduceFactor;
|
|
404
|
-
if (!rotateAnimation.sync) {
|
|
405
|
-
particle.rotate.velocity *= (0,engine_root_window_.getRandom)();
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
particle.rotation = particle.rotate.value;
|
|
409
|
-
}
|
|
410
|
-
isEnabled(particle) {
|
|
411
|
-
const rotate = particle.options.rotate;
|
|
412
|
-
if (!rotate) {
|
|
413
|
-
return false;
|
|
414
|
-
}
|
|
415
|
-
return !particle.destroyed && !particle.spawning && rotate.animation.enable && !rotate.path;
|
|
416
|
-
}
|
|
417
|
-
loadOptions(options, ...sources) {
|
|
418
|
-
if (!options.rotate) {
|
|
419
|
-
options.rotate = new Rotate();
|
|
420
|
-
}
|
|
421
|
-
for (const source of sources) {
|
|
422
|
-
options.rotate.load(source?.rotate);
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
update(particle, delta) {
|
|
426
|
-
if (!this.isEnabled(particle)) {
|
|
427
|
-
return;
|
|
428
|
-
}
|
|
429
|
-
updateRotate(particle, delta);
|
|
430
|
-
particle.rotation = particle.rotate?.value ?? 0;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/index.js
|
|
434
|
-
|
|
435
|
-
async function loadRotateUpdater(engine, refresh = true) {
|
|
436
|
-
await engine.addParticleUpdater("rotate", container => new RotateUpdater(container), refresh);
|
|
437
|
-
}
|
|
231
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-rotate","commonjs2":"@tsparticles/updater-rotate","amd":"@tsparticles/updater-rotate","root":"window"}
|
|
232
|
+
var updater_rotate_root_window_ = __webpack_require__(59);
|
|
438
233
|
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-sounds","commonjs2":"@tsparticles/plugin-sounds","amd":"@tsparticles/plugin-sounds","root":"window"}
|
|
439
234
|
var plugin_sounds_root_window_ = __webpack_require__(490);
|
|
440
235
|
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-stroke-color","commonjs2":"@tsparticles/updater-stroke-color","amd":"@tsparticles/updater-stroke-color","root":"window"}
|
|
@@ -489,11 +284,11 @@ async function initPlugins() {
|
|
|
489
284
|
await (0,plugin_emitters_root_window_.loadEmittersPlugin)(engine_root_window_.tsParticles, false);
|
|
490
285
|
await (0,plugin_sounds_root_window_.loadSoundsPlugin)(engine_root_window_.tsParticles, false);
|
|
491
286
|
await (0,shape_line_root_window_.loadLineShape)(engine_root_window_.tsParticles, false);
|
|
492
|
-
await loadRotateUpdater(engine_root_window_.tsParticles, false);
|
|
287
|
+
await (0,updater_rotate_root_window_.loadRotateUpdater)(engine_root_window_.tsParticles, false);
|
|
493
288
|
await (0,updater_destroy_root_window_.loadDestroyUpdater)(engine_root_window_.tsParticles, false);
|
|
494
289
|
await (0,updater_life_root_window_.loadLifeUpdater)(engine_root_window_.tsParticles, false);
|
|
495
290
|
await (0,updater_stroke_color_root_window_.loadStrokeColorUpdater)(engine_root_window_.tsParticles, false);
|
|
496
|
-
await loadBasic(engine_root_window_.tsParticles, false);
|
|
291
|
+
await (0,basic_root_window_.loadBasic)(engine_root_window_.tsParticles, false);
|
|
497
292
|
initializing = false;
|
|
498
293
|
initialized = true;
|
|
499
294
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.fireworks.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/basic","@tsparticles/updater-destroy","@tsparticles/plugin-emitters","@tsparticles/updater-life","@tsparticles/shape-line","@tsparticles/updater-rotate","@tsparticles/plugin-sounds","@tsparticles/updater-stroke-color"],t);else{var s="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var i in s)("object"==typeof exports?exports:e)[i]=s[i]}}(this,((e,t,s,i,r,a,o,n,l)=>(()=>{"use strict";var p={574:e=>{e.exports=t},533:t=>{t.exports=e},68:e=>{e.exports=i},490:e=>{e.exports=n},137:e=>{e.exports=a},344:e=>{e.exports=s},84:e=>{e.exports=r},59:e=>{e.exports=o},204:e=>{e.exports=l}},u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var s=u[e]={exports:{}};return p[e](s,s.exports,c),s.exports}c.d=(e,t)=>{for(var s in t)c.o(t,s)&&!c.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return(()=>{c.r(d),c.d(d,{fireworks:()=>h});var e=c(533);class t{constructor(){this.brightness={min:-30,max:30},this.colors=["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"],this.gravity=5,this.minHeight={min:10,max:30},this.rate=20,this.saturation={min:-30,max:30},this.sounds=!0,this.speed={min:5,max:15},this.splitCount={min:75,max:150}}load(t){t&&(void 0!==t.colors&&((0,e.isArray)(t.colors)?this.colors=[...t.colors]:this.colors=t.colors),void 0!==t.brightness&&(this.brightness=(0,e.setRangeValue)(t.brightness)),void 0!==t.gravity&&(this.gravity=(0,e.setRangeValue)(t.gravity)),void 0!==t.minHeight&&(this.minHeight=(0,e.setRangeValue)(t.minHeight)),void 0!==t.rate&&(this.rate=(0,e.setRangeValue)(t.rate)),void 0!==t.saturation&&(this.saturation=(0,e.setRangeValue)(t.saturation)),void 0!==t.sounds&&(this.sounds=t.sounds),void 0!==t.speed&&(this.speed=(0,e.setRangeValue)(t.speed)),void 0!==t.splitCount&&(this.splitCount=(0,e.setRangeValue)(t.splitCount)))}}var s=c(574),i=c(344),r=c(68),a=c(84),o=c(137),n=c(59),l=c(490),p=c(204);let u=!1,m=!1;const f=e=>"line"===e.data.particle.shape;class g{constructor(e){this._container=e}pause(){this._container.pause()}play(){this._container.play()}stop(){this._container.stop()}}async function h(c,d){let h;await async function(){if(!u){if(m)return new Promise((e=>{const t=setInterval((()=>{u&&(clearInterval(t),e())}),100)}));m=!0,await(0,r.loadEmittersPlugin)(e.tsParticles,!1),await(0,l.loadSoundsPlugin)(e.tsParticles,!1),await(0,o.loadLineShape)(e.tsParticles,!1),await(0,n.loadRotateUpdater)(e.tsParticles,!1),await(0,i.loadDestroyUpdater)(e.tsParticles,!1),await(0,a.loadLifeUpdater)(e.tsParticles,!1),await(0,p.loadStrokeColorUpdater)(e.tsParticles,!1),await(0,s.loadBasic)(e.tsParticles,!1),m=!1,u=!0}}();const v=new t;(0,e.isString)(c)?(h=c,v.load(d)):(h="fireworks",v.load(c));const y={detectRetina:!0,background:{color:"#000"},fpsLimit:120,emitters:{direction:"top",life:{count:0,duration:.1,delay:.1},rate:{delay:(0,e.isNumber)(v.rate)?1/v.rate:{min:1/(0,e.getRangeMin)(v.rate),max:1/(0,e.getRangeMax)(v.rate)},quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},color:{value:v.colors},destroy:{mode:"split",bounds:{top:(0,e.setRangeValue)(v.minHeight)},split:{sizeOffset:!1,count:1,factor:{value:.333333},rate:{value:v.splitCount},colorOffset:{s:v.saturation,l:v.brightness},particles:{stroke:{width:0},number:{value:0},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:.7,sync:!1,startValue:"max",destroy:"min"}},shape:{type:"circle"},size:{value:{min:1,max:2},animation:{enable:!0,speed:5,count:1,sync:!1,startValue:"min",destroy:"none"}},life:{count:1,duration:{value:{min:.25,max:.5}}},move:{decay:{min:.05,max:.1},enable:!0,gravity:{enable:!0,inverse:!1,acceleration:(0,e.setRangeValue)(v.gravity)},speed:(0,e.setRangeValue)(v.speed),direction:"none",outModes:"destroy"}}}},life:{count:1},shape:{type:"line",options:{line:{cap:"round"}}},size:{value:{min:.1,max:50},animation:{enable:!0,sync:!0,speed:90,startValue:"max",destroy:"min"}},stroke:{color:{value:"#ffffff"},width:.5},rotate:{path:!0},move:{enable:!0,gravity:{acceleration:15,enable:!0,inverse:!0,maxSpeed:100},speed:{min:10,max:20},outModes:{default:"destroy",top:"none"},trail:{fill:{color:"#000"},enable:!0,length:10}}},sounds:{enable:v.sounds,events:[{event:"particleRemoved",filter:f,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}},w=await e.tsParticles.load({id:h,options:y});if(w)return new g(w)}h.version=e.tsParticles.version,(0,e.isSsr)()||(window.fireworks=h)})(),d})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.0.0-beta.
|
|
1
|
+
/*! tsParticles Fireworks v3.0.0-beta.4 by Matteo Bruni */
|