@tsparticles/fireworks 3.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,717 @@
1
+ /*!
2
+ * Author : Matteo Bruni
3
+ * MIT license: https://opensource.org/licenses/MIT
4
+ * Demo / Generator : https://particles.js.org/
5
+ * GitHub : https://www.github.com/matteobruni/tsparticles
6
+ * How to use? : Check the GitHub README
7
+ * v3.0.0-beta.0
8
+ */
9
+ (function webpackUniversalModuleDefinition(root, factory) {
10
+ if(typeof exports === 'object' && typeof module === 'object')
11
+ module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/shape-line"), require("@tsparticles/plugin-sounds"), require("@tsparticles/updater-stroke-color"), require("@tsparticles/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/updater-size"));
12
+ else if(typeof define === 'function' && define.amd)
13
+ define(["@tsparticles/engine", "@tsparticles/updater-destroy", "@tsparticles/plugin-emitters", "@tsparticles/updater-life", "@tsparticles/shape-line", "@tsparticles/plugin-sounds", "@tsparticles/updater-stroke-color", "@tsparticles/move-base", "@tsparticles/shape-circle", "@tsparticles/updater-color", "@tsparticles/updater-opacity", "@tsparticles/updater-out-modes", "@tsparticles/updater-size"], factory);
14
+ else {
15
+ var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/shape-line"), require("@tsparticles/plugin-sounds"), require("@tsparticles/updater-stroke-color"), require("@tsparticles/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/updater-size")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
16
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
17
+ }
18
+ })(this, (__WEBPACK_EXTERNAL_MODULE__533__, __WEBPACK_EXTERNAL_MODULE__344__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__137__, __WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__204__, __WEBPACK_EXTERNAL_MODULE__619__, __WEBPACK_EXTERNAL_MODULE__163__, __WEBPACK_EXTERNAL_MODULE__501__, __WEBPACK_EXTERNAL_MODULE__686__, __WEBPACK_EXTERNAL_MODULE__290__, __WEBPACK_EXTERNAL_MODULE__2__) => {
19
+ return /******/ (() => { // webpackBootstrap
20
+ /******/ "use strict";
21
+ /******/ var __webpack_modules__ = ({
22
+
23
+ /***/ 533:
24
+ /***/ ((module) => {
25
+
26
+ module.exports = __WEBPACK_EXTERNAL_MODULE__533__;
27
+
28
+ /***/ }),
29
+
30
+ /***/ 619:
31
+ /***/ ((module) => {
32
+
33
+ module.exports = __WEBPACK_EXTERNAL_MODULE__619__;
34
+
35
+ /***/ }),
36
+
37
+ /***/ 68:
38
+ /***/ ((module) => {
39
+
40
+ module.exports = __WEBPACK_EXTERNAL_MODULE__68__;
41
+
42
+ /***/ }),
43
+
44
+ /***/ 490:
45
+ /***/ ((module) => {
46
+
47
+ module.exports = __WEBPACK_EXTERNAL_MODULE__490__;
48
+
49
+ /***/ }),
50
+
51
+ /***/ 163:
52
+ /***/ ((module) => {
53
+
54
+ module.exports = __WEBPACK_EXTERNAL_MODULE__163__;
55
+
56
+ /***/ }),
57
+
58
+ /***/ 137:
59
+ /***/ ((module) => {
60
+
61
+ module.exports = __WEBPACK_EXTERNAL_MODULE__137__;
62
+
63
+ /***/ }),
64
+
65
+ /***/ 501:
66
+ /***/ ((module) => {
67
+
68
+ module.exports = __WEBPACK_EXTERNAL_MODULE__501__;
69
+
70
+ /***/ }),
71
+
72
+ /***/ 344:
73
+ /***/ ((module) => {
74
+
75
+ module.exports = __WEBPACK_EXTERNAL_MODULE__344__;
76
+
77
+ /***/ }),
78
+
79
+ /***/ 84:
80
+ /***/ ((module) => {
81
+
82
+ module.exports = __WEBPACK_EXTERNAL_MODULE__84__;
83
+
84
+ /***/ }),
85
+
86
+ /***/ 686:
87
+ /***/ ((module) => {
88
+
89
+ module.exports = __WEBPACK_EXTERNAL_MODULE__686__;
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__;
104
+
105
+ /***/ }),
106
+
107
+ /***/ 204:
108
+ /***/ ((module) => {
109
+
110
+ module.exports = __WEBPACK_EXTERNAL_MODULE__204__;
111
+
112
+ /***/ })
113
+
114
+ /******/ });
115
+ /************************************************************************/
116
+ /******/ // The module cache
117
+ /******/ var __webpack_module_cache__ = {};
118
+ /******/
119
+ /******/ // The require function
120
+ /******/ function __webpack_require__(moduleId) {
121
+ /******/ // Check if module is in cache
122
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
123
+ /******/ if (cachedModule !== undefined) {
124
+ /******/ return cachedModule.exports;
125
+ /******/ }
126
+ /******/ // Create a new module (and put it into the cache)
127
+ /******/ var module = __webpack_module_cache__[moduleId] = {
128
+ /******/ // no module.id needed
129
+ /******/ // no module.loaded needed
130
+ /******/ exports: {}
131
+ /******/ };
132
+ /******/
133
+ /******/ // Execute the module function
134
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
135
+ /******/
136
+ /******/ // Return the exports of the module
137
+ /******/ return module.exports;
138
+ /******/ }
139
+ /******/
140
+ /************************************************************************/
141
+ /******/ /* webpack/runtime/define property getters */
142
+ /******/ (() => {
143
+ /******/ // define getter functions for harmony exports
144
+ /******/ __webpack_require__.d = (exports, definition) => {
145
+ /******/ for(var key in definition) {
146
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
147
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
148
+ /******/ }
149
+ /******/ }
150
+ /******/ };
151
+ /******/ })();
152
+ /******/
153
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
154
+ /******/ (() => {
155
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
156
+ /******/ })();
157
+ /******/
158
+ /******/ /* webpack/runtime/make namespace object */
159
+ /******/ (() => {
160
+ /******/ // define __esModule on exports
161
+ /******/ __webpack_require__.r = (exports) => {
162
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
163
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
164
+ /******/ }
165
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
166
+ /******/ };
167
+ /******/ })();
168
+ /******/
169
+ /************************************************************************/
170
+ var __webpack_exports__ = {};
171
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
172
+ (() => {
173
+ // ESM COMPAT FLAG
174
+ __webpack_require__.r(__webpack_exports__);
175
+
176
+ // EXPORTS
177
+ __webpack_require__.d(__webpack_exports__, {
178
+ fireworks: () => (/* reexport */ fireworks)
179
+ });
180
+
181
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"}
182
+ var engine_root_window_ = __webpack_require__(533);
183
+ ;// CONCATENATED MODULE: ./dist/browser/FireworkOptions.js
184
+
185
+ class FireworkOptions {
186
+ constructor() {
187
+ this.brightness = {
188
+ min: -30,
189
+ max: 30
190
+ };
191
+ this.colors = ["#ff595e", "#ffca3a", "#8ac926", "#1982c4", "#6a4c93"];
192
+ this.gravity = 5;
193
+ this.minHeight = {
194
+ min: 10,
195
+ max: 30
196
+ };
197
+ this.rate = 20;
198
+ this.saturation = {
199
+ min: -30,
200
+ max: 30
201
+ };
202
+ this.sounds = true;
203
+ this.speed = {
204
+ min: 5,
205
+ max: 15
206
+ };
207
+ this.splitCount = {
208
+ min: 75,
209
+ max: 150
210
+ };
211
+ }
212
+ load(data) {
213
+ if (!data) {
214
+ return;
215
+ }
216
+ if (data.colors !== undefined) {
217
+ if ((0,engine_root_window_.isArray)(data.colors)) {
218
+ this.colors = [...data.colors];
219
+ } else {
220
+ this.colors = data.colors;
221
+ }
222
+ }
223
+ if (data.brightness !== undefined) {
224
+ this.brightness = (0,engine_root_window_.setRangeValue)(data.brightness);
225
+ }
226
+ if (data.gravity !== undefined) {
227
+ this.gravity = (0,engine_root_window_.setRangeValue)(data.gravity);
228
+ }
229
+ if (data.minHeight !== undefined) {
230
+ this.minHeight = (0,engine_root_window_.setRangeValue)(data.minHeight);
231
+ }
232
+ if (data.rate !== undefined) {
233
+ this.rate = (0,engine_root_window_.setRangeValue)(data.rate);
234
+ }
235
+ if (data.saturation !== undefined) {
236
+ this.saturation = (0,engine_root_window_.setRangeValue)(data.saturation);
237
+ }
238
+ if (data.sounds !== undefined) {
239
+ this.sounds = data.sounds;
240
+ }
241
+ if (data.speed !== undefined) {
242
+ this.speed = (0,engine_root_window_.setRangeValue)(data.speed);
243
+ }
244
+ if (data.splitCount !== undefined) {
245
+ this.splitCount = (0,engine_root_window_.setRangeValue)(data.splitCount);
246
+ }
247
+ }
248
+ }
249
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/move-base","commonjs2":"@tsparticles/move-base","amd":"@tsparticles/move-base","root":"window"}
250
+ var move_base_root_window_ = __webpack_require__(619);
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/esm/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
+ }
277
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-destroy","commonjs2":"@tsparticles/updater-destroy","amd":"@tsparticles/updater-destroy","root":"window"}
278
+ var updater_destroy_root_window_ = __webpack_require__(344);
279
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"}
280
+ var plugin_emitters_root_window_ = __webpack_require__(68);
281
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-life","commonjs2":"@tsparticles/updater-life","amd":"@tsparticles/updater-life","root":"window"}
282
+ var updater_life_root_window_ = __webpack_require__(84);
283
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-line","commonjs2":"@tsparticles/shape-line","amd":"@tsparticles/shape-line","root":"window"}
284
+ var shape_line_root_window_ = __webpack_require__(137);
285
+ ;// CONCATENATED MODULE: ../../updaters/rotate/dist/esm/Options/Classes/RotateAnimation.js
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/esm/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/esm/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/esm/index.js
434
+
435
+ async function loadRotateUpdater(engine, refresh = true) {
436
+ await engine.addParticleUpdater("rotate", container => new RotateUpdater(container), refresh);
437
+ }
438
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-sounds","commonjs2":"@tsparticles/plugin-sounds","amd":"@tsparticles/plugin-sounds","root":"window"}
439
+ var plugin_sounds_root_window_ = __webpack_require__(490);
440
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-stroke-color","commonjs2":"@tsparticles/updater-stroke-color","amd":"@tsparticles/updater-stroke-color","root":"window"}
441
+ var updater_stroke_color_root_window_ = __webpack_require__(204);
442
+ ;// CONCATENATED MODULE: ./dist/browser/fireworks.js
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+ let initialized = false;
454
+ let initializing = false;
455
+ const explodeSoundCheck = args => {
456
+ const data = args.data;
457
+ return data.particle.shape === "line";
458
+ };
459
+ class FireworksInstance {
460
+ constructor(container) {
461
+ this._container = container;
462
+ }
463
+ pause() {
464
+ this._container.pause();
465
+ }
466
+ play() {
467
+ this._container.play();
468
+ }
469
+ stop() {
470
+ this._container.stop();
471
+ }
472
+ }
473
+ async function initPlugins() {
474
+ if (initialized) {
475
+ return;
476
+ }
477
+ if (initializing) {
478
+ return new Promise(resolve => {
479
+ const interval = setInterval(() => {
480
+ if (!initialized) {
481
+ return;
482
+ }
483
+ clearInterval(interval);
484
+ resolve();
485
+ }, 100);
486
+ });
487
+ }
488
+ initializing = true;
489
+ await (0,plugin_emitters_root_window_.loadEmittersPlugin)(engine_root_window_.tsParticles, false);
490
+ await (0,plugin_sounds_root_window_.loadSoundsPlugin)(engine_root_window_.tsParticles, false);
491
+ await (0,shape_line_root_window_.loadLineShape)(engine_root_window_.tsParticles, false);
492
+ await loadRotateUpdater(engine_root_window_.tsParticles, false);
493
+ await (0,updater_destroy_root_window_.loadDestroyUpdater)(engine_root_window_.tsParticles, false);
494
+ await (0,updater_life_root_window_.loadLifeUpdater)(engine_root_window_.tsParticles, false);
495
+ await (0,updater_stroke_color_root_window_.loadStrokeColorUpdater)(engine_root_window_.tsParticles, false);
496
+ await loadBasic(engine_root_window_.tsParticles, false);
497
+ initializing = false;
498
+ initialized = true;
499
+ }
500
+ async function fireworks(idOrOptions, sourceOptions) {
501
+ await initPlugins();
502
+ let id;
503
+ const options = new FireworkOptions();
504
+ if ((0,engine_root_window_.isString)(idOrOptions)) {
505
+ id = idOrOptions;
506
+ options.load(sourceOptions);
507
+ } else {
508
+ id = "fireworks";
509
+ options.load(idOrOptions);
510
+ }
511
+ const particlesOptions = {
512
+ detectRetina: true,
513
+ background: {
514
+ color: "#000"
515
+ },
516
+ fpsLimit: 120,
517
+ emitters: {
518
+ direction: "top",
519
+ life: {
520
+ count: 0,
521
+ duration: 0.1,
522
+ delay: 0.1
523
+ },
524
+ rate: {
525
+ delay: (0,engine_root_window_.isNumber)(options.rate) ? 1 / options.rate : {
526
+ min: 1 / (0,engine_root_window_.getRangeMin)(options.rate),
527
+ max: 1 / (0,engine_root_window_.getRangeMax)(options.rate)
528
+ },
529
+ quantity: 1
530
+ },
531
+ size: {
532
+ width: 100,
533
+ height: 0
534
+ },
535
+ position: {
536
+ y: 100,
537
+ x: 50
538
+ }
539
+ },
540
+ particles: {
541
+ number: {
542
+ value: 0
543
+ },
544
+ color: {
545
+ value: options.colors
546
+ },
547
+ destroy: {
548
+ mode: "split",
549
+ bounds: {
550
+ top: (0,engine_root_window_.setRangeValue)(options.minHeight)
551
+ },
552
+ split: {
553
+ sizeOffset: false,
554
+ count: 1,
555
+ factor: {
556
+ value: 0.333333
557
+ },
558
+ rate: {
559
+ value: options.splitCount
560
+ },
561
+ colorOffset: {
562
+ s: options.saturation,
563
+ l: options.brightness
564
+ },
565
+ particles: {
566
+ stroke: {
567
+ width: 0
568
+ },
569
+ number: {
570
+ value: 0
571
+ },
572
+ opacity: {
573
+ value: {
574
+ min: 0.1,
575
+ max: 1
576
+ },
577
+ animation: {
578
+ enable: true,
579
+ speed: 0.7,
580
+ sync: false,
581
+ startValue: "max",
582
+ destroy: "min"
583
+ }
584
+ },
585
+ shape: {
586
+ type: "circle"
587
+ },
588
+ size: {
589
+ value: {
590
+ min: 1,
591
+ max: 2
592
+ },
593
+ animation: {
594
+ enable: true,
595
+ speed: 5,
596
+ count: 1,
597
+ sync: false,
598
+ startValue: "min",
599
+ destroy: "none"
600
+ }
601
+ },
602
+ life: {
603
+ count: 1,
604
+ duration: {
605
+ value: {
606
+ min: 0.25,
607
+ max: 0.5
608
+ }
609
+ }
610
+ },
611
+ move: {
612
+ decay: {
613
+ min: 0.05,
614
+ max: 0.1
615
+ },
616
+ enable: true,
617
+ gravity: {
618
+ enable: true,
619
+ inverse: false,
620
+ acceleration: (0,engine_root_window_.setRangeValue)(options.gravity)
621
+ },
622
+ speed: (0,engine_root_window_.setRangeValue)(options.speed),
623
+ direction: "none",
624
+ outModes: "destroy"
625
+ }
626
+ }
627
+ }
628
+ },
629
+ life: {
630
+ count: 1
631
+ },
632
+ shape: {
633
+ type: "line",
634
+ options: {
635
+ line: {
636
+ cap: "round"
637
+ }
638
+ }
639
+ },
640
+ size: {
641
+ value: {
642
+ min: 0.1,
643
+ max: 50
644
+ },
645
+ animation: {
646
+ enable: true,
647
+ sync: true,
648
+ speed: 90,
649
+ startValue: "max",
650
+ destroy: "min"
651
+ }
652
+ },
653
+ stroke: {
654
+ color: {
655
+ value: "#ffffff"
656
+ },
657
+ width: 0.5
658
+ },
659
+ rotate: {
660
+ path: true
661
+ },
662
+ move: {
663
+ enable: true,
664
+ gravity: {
665
+ acceleration: 15,
666
+ enable: true,
667
+ inverse: true,
668
+ maxSpeed: 100
669
+ },
670
+ speed: {
671
+ min: 10,
672
+ max: 20
673
+ },
674
+ outModes: {
675
+ default: "destroy",
676
+ top: "none"
677
+ },
678
+ trail: {
679
+ fill: {
680
+ color: "#000"
681
+ },
682
+ enable: true,
683
+ length: 10
684
+ }
685
+ }
686
+ },
687
+ sounds: {
688
+ enable: options.sounds,
689
+ events: [{
690
+ event: "particleRemoved",
691
+ filter: explodeSoundCheck,
692
+ audio: ["https://particles.js.org/audio/explosion0.mp3", "https://particles.js.org/audio/explosion1.mp3", "https://particles.js.org/audio/explosion2.mp3"]
693
+ }],
694
+ volume: 50
695
+ }
696
+ };
697
+ const container = await engine_root_window_.tsParticles.load({
698
+ id,
699
+ options: particlesOptions
700
+ });
701
+ if (!container) {
702
+ return;
703
+ }
704
+ return new FireworksInstance(container);
705
+ }
706
+ fireworks.version = engine_root_window_.tsParticles.version;
707
+ if (!(0,engine_root_window_.isSsr)()) {
708
+ window.fireworks = fireworks;
709
+ }
710
+ ;// CONCATENATED MODULE: ./dist/browser/index.js
711
+
712
+ })();
713
+
714
+ /******/ return __webpack_exports__;
715
+ /******/ })()
716
+ ;
717
+ });