@tsparticles/preset-fireworks 3.0.0-beta.1 → 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.
@@ -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.1
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/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/updater-size"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/shape-line"), require("@tsparticles/engine"), require("@tsparticles/plugin-sounds"), require("@tsparticles/updater-stroke-color"));
11
+ module.exports = factory(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"), require("@tsparticles/engine"));
12
12
  else if(typeof define === 'function' && define.amd)
13
- define(["@tsparticles/move-base", "@tsparticles/shape-circle", "@tsparticles/updater-color", "@tsparticles/updater-opacity", "@tsparticles/updater-out-modes", "@tsparticles/updater-size", "@tsparticles/updater-destroy", "@tsparticles/plugin-emitters", "@tsparticles/updater-life", "@tsparticles/shape-line", "@tsparticles/engine", "@tsparticles/plugin-sounds", "@tsparticles/updater-stroke-color"], factory);
13
+ define(["@tsparticles/basic", "@tsparticles/updater-destroy", "@tsparticles/plugin-emitters", "@tsparticles/updater-life", "@tsparticles/shape-line", "@tsparticles/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/updater-stroke-color", "@tsparticles/engine"], factory);
14
14
  else {
15
- var a = typeof exports === 'object' ? factory(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"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/shape-line"), require("@tsparticles/engine"), 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"], root["window"], root["window"], root["window"], root["window"]);
15
+ var a = typeof exports === 'object' ? factory(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"), require("@tsparticles/engine")) : 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__619__, __WEBPACK_EXTERNAL_MODULE__163__, __WEBPACK_EXTERNAL_MODULE__501__, __WEBPACK_EXTERNAL_MODULE__686__, __WEBPACK_EXTERNAL_MODULE__290__, __WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__344__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__137__, __WEBPACK_EXTERNAL_MODULE__533__, __WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__204__) => {
18
+ })(this, (__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__, __WEBPACK_EXTERNAL_MODULE__533__) => {
19
19
  return /******/ (() => { // webpackBootstrap
20
20
  /******/ "use strict";
21
21
  /******/ var __webpack_modules__ = ({
22
22
 
23
- /***/ 533:
23
+ /***/ 574:
24
24
  /***/ ((module) => {
25
25
 
26
- module.exports = __WEBPACK_EXTERNAL_MODULE__533__;
26
+ module.exports = __WEBPACK_EXTERNAL_MODULE__574__;
27
27
 
28
28
  /***/ }),
29
29
 
30
- /***/ 619:
30
+ /***/ 533:
31
31
  /***/ ((module) => {
32
32
 
33
- module.exports = __WEBPACK_EXTERNAL_MODULE__619__;
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
- /***/ 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:
72
+ /***/ 59:
101
73
  /***/ ((module) => {
102
74
 
103
- module.exports = __WEBPACK_EXTERNAL_MODULE__2__;
75
+ module.exports = __WEBPACK_EXTERNAL_MODULE__59__;
104
76
 
105
77
  /***/ }),
106
78
 
@@ -178,35 +150,8 @@ __webpack_require__.d(__webpack_exports__, {
178
150
  loadFireworksPreset: () => (/* binding */ loadFireworksPreset)
179
151
  });
180
152
 
181
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/move-base","commonjs2":"@tsparticles/move-base","amd":"@tsparticles/move-base","root":"window"}
182
- var move_base_root_window_ = __webpack_require__(619);
183
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-circle","commonjs2":"@tsparticles/shape-circle","amd":"@tsparticles/shape-circle","root":"window"}
184
- var shape_circle_root_window_ = __webpack_require__(163);
185
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-color","commonjs2":"@tsparticles/updater-color","amd":"@tsparticles/updater-color","root":"window"}
186
- var updater_color_root_window_ = __webpack_require__(501);
187
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-opacity","commonjs2":"@tsparticles/updater-opacity","amd":"@tsparticles/updater-opacity","root":"window"}
188
- var updater_opacity_root_window_ = __webpack_require__(686);
189
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-out-modes","commonjs2":"@tsparticles/updater-out-modes","amd":"@tsparticles/updater-out-modes","root":"window"}
190
- var updater_out_modes_root_window_ = __webpack_require__(290);
191
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-size","commonjs2":"@tsparticles/updater-size","amd":"@tsparticles/updater-size","root":"window"}
192
- var updater_size_root_window_ = __webpack_require__(2);
193
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+basic@3.0.0-beta.1/node_modules/@tsparticles/basic/browser/index.js
194
-
195
-
196
-
197
-
198
-
199
-
200
- async function loadBasic(engine, refresh = true) {
201
- await (0,move_base_root_window_.loadBaseMover)(engine, false);
202
- await (0,shape_circle_root_window_.loadCircleShape)(engine, false);
203
- await (0,updater_color_root_window_.loadColorUpdater)(engine, false);
204
- await (0,updater_opacity_root_window_.loadOpacityUpdater)(engine, false);
205
- await (0,updater_out_modes_root_window_.loadOutModesUpdater)(engine, false);
206
- await (0,updater_size_root_window_.loadSizeUpdater)(engine, false);
207
- await engine.refresh(refresh);
208
- }
209
-
153
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/basic","commonjs2":"@tsparticles/basic","amd":"@tsparticles/basic","root":"window"}
154
+ var basic_root_window_ = __webpack_require__(574);
210
155
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-destroy","commonjs2":"@tsparticles/updater-destroy","amd":"@tsparticles/updater-destroy","root":"window"}
211
156
  var updater_destroy_root_window_ = __webpack_require__(344);
212
157
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"}
@@ -215,166 +160,14 @@ var plugin_emitters_root_window_ = __webpack_require__(68);
215
160
  var updater_life_root_window_ = __webpack_require__(84);
216
161
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-line","commonjs2":"@tsparticles/shape-line","amd":"@tsparticles/shape-line","root":"window"}
217
162
  var shape_line_root_window_ = __webpack_require__(137);
218
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"}
219
- var engine_root_window_ = __webpack_require__(533);
220
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-rotate@3.0.0-beta.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/RotateAnimation.js
221
-
222
- class RotateAnimation {
223
- constructor() {
224
- this.enable = false;
225
- this.speed = 0;
226
- this.decay = 0;
227
- this.sync = false;
228
- }
229
- load(data) {
230
- if (!data) {
231
- return;
232
- }
233
- if (data.enable !== undefined) {
234
- this.enable = data.enable;
235
- }
236
- if (data.speed !== undefined) {
237
- this.speed = (0,engine_root_window_.setRangeValue)(data.speed);
238
- }
239
- if (data.decay !== undefined) {
240
- this.decay = (0,engine_root_window_.setRangeValue)(data.decay);
241
- }
242
- if (data.sync !== undefined) {
243
- this.sync = data.sync;
244
- }
245
- }
246
- }
247
-
248
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-rotate@3.0.0-beta.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/Rotate.js
249
-
250
-
251
- class Rotate extends engine_root_window_.ValueWithRandom {
252
- constructor() {
253
- super();
254
- this.animation = new RotateAnimation();
255
- this.direction = "clockwise";
256
- this.path = false;
257
- this.value = 0;
258
- }
259
- load(data) {
260
- if (!data) {
261
- return;
262
- }
263
- super.load(data);
264
- if (data.direction !== undefined) {
265
- this.direction = data.direction;
266
- }
267
- this.animation.load(data.animation);
268
- if (data.path !== undefined) {
269
- this.path = data.path;
270
- }
271
- }
272
- }
273
-
274
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-rotate@3.0.0-beta.1/node_modules/@tsparticles/updater-rotate/browser/RotateUpdater.js
275
-
276
-
277
- function updateRotate(particle, delta) {
278
- const rotate = particle.rotate, rotateOptions = particle.options.rotate;
279
- if (!rotate || !rotateOptions) {
280
- return;
281
- }
282
- const rotateAnimation = rotateOptions.animation, speed = (rotate.velocity ?? 0) * delta.factor, max = 2 * Math.PI, decay = rotate.decay ?? 1;
283
- if (!rotateAnimation.enable) {
284
- return;
285
- }
286
- switch (rotate.status) {
287
- case "increasing":
288
- rotate.value += speed;
289
- if (rotate.value > max) {
290
- rotate.value -= max;
291
- }
292
- break;
293
- case "decreasing":
294
- default:
295
- rotate.value -= speed;
296
- if (rotate.value < 0) {
297
- rotate.value += max;
298
- }
299
- break;
300
- }
301
- if (rotate.velocity && decay !== 1) {
302
- rotate.velocity *= decay;
303
- }
304
- }
305
- class RotateUpdater {
306
- constructor(container) {
307
- this.container = container;
308
- }
309
- init(particle) {
310
- const rotateOptions = particle.options.rotate;
311
- if (!rotateOptions) {
312
- return;
313
- }
314
- particle.rotate = {
315
- enable: rotateOptions.animation.enable,
316
- value: ((0,engine_root_window_.getRangeValue)(rotateOptions.value) * Math.PI) / 180,
317
- };
318
- particle.pathRotation = rotateOptions.path;
319
- let rotateDirection = rotateOptions.direction;
320
- if (rotateDirection === "random") {
321
- const index = Math.floor((0,engine_root_window_.getRandom)() * 2);
322
- rotateDirection = index > 0 ? "counter-clockwise" : "clockwise";
323
- }
324
- switch (rotateDirection) {
325
- case "counter-clockwise":
326
- case "counterClockwise":
327
- particle.rotate.status = "decreasing";
328
- break;
329
- case "clockwise":
330
- particle.rotate.status = "increasing";
331
- break;
332
- }
333
- const rotateAnimation = rotateOptions.animation;
334
- if (rotateAnimation.enable) {
335
- particle.rotate.decay = 1 - (0,engine_root_window_.getRangeValue)(rotateAnimation.decay);
336
- particle.rotate.velocity =
337
- ((0,engine_root_window_.getRangeValue)(rotateAnimation.speed) / 360) * this.container.retina.reduceFactor;
338
- if (!rotateAnimation.sync) {
339
- particle.rotate.velocity *= (0,engine_root_window_.getRandom)();
340
- }
341
- }
342
- particle.rotation = particle.rotate.value;
343
- }
344
- isEnabled(particle) {
345
- const rotate = particle.options.rotate;
346
- if (!rotate) {
347
- return false;
348
- }
349
- return !particle.destroyed && !particle.spawning && rotate.animation.enable && !rotate.path;
350
- }
351
- loadOptions(options, ...sources) {
352
- if (!options.rotate) {
353
- options.rotate = new Rotate();
354
- }
355
- for (const source of sources) {
356
- options.rotate.load(source?.rotate);
357
- }
358
- }
359
- update(particle, delta) {
360
- if (!this.isEnabled(particle)) {
361
- return;
362
- }
363
- updateRotate(particle, delta);
364
- particle.rotation = particle.rotate?.value ?? 0;
365
- }
366
- }
367
-
368
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-rotate@3.0.0-beta.1/node_modules/@tsparticles/updater-rotate/browser/index.js
369
-
370
- async function loadRotateUpdater(engine, refresh = true) {
371
- await engine.addParticleUpdater("rotate", (container) => new RotateUpdater(container), refresh);
372
- }
373
-
163
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-rotate","commonjs2":"@tsparticles/updater-rotate","amd":"@tsparticles/updater-rotate","root":"window"}
164
+ var updater_rotate_root_window_ = __webpack_require__(59);
374
165
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-sounds","commonjs2":"@tsparticles/plugin-sounds","amd":"@tsparticles/plugin-sounds","root":"window"}
375
166
  var plugin_sounds_root_window_ = __webpack_require__(490);
376
167
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-stroke-color","commonjs2":"@tsparticles/updater-stroke-color","amd":"@tsparticles/updater-stroke-color","root":"window"}
377
168
  var updater_stroke_color_root_window_ = __webpack_require__(204);
169
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"}
170
+ var engine_root_window_ = __webpack_require__(533);
378
171
  ;// CONCATENATED MODULE: ./dist/browser/options.js
379
172
 
380
173
  const explodeSoundCheck = args => {
@@ -607,11 +400,11 @@ const options = {
607
400
 
608
401
 
609
402
  async function loadFireworksPreset(engine, refresh = true) {
610
- await loadBasic(engine, false);
403
+ await (0,basic_root_window_.loadBasic)(engine, false);
611
404
  await (0,plugin_emitters_root_window_.loadEmittersPlugin)(engine, false);
612
405
  await (0,plugin_sounds_root_window_.loadSoundsPlugin)(engine, false);
613
406
  await (0,shape_line_root_window_.loadLineShape)(engine, false);
614
- await loadRotateUpdater(engine, false);
407
+ await (0,updater_rotate_root_window_.loadRotateUpdater)(engine, false);
615
408
  await (0,updater_destroy_root_window_.loadDestroyUpdater)(engine, false);
616
409
  await (0,updater_life_root_window_.loadLifeUpdater)(engine, false);
617
410
  await (0,updater_stroke_color_root_window_.loadStrokeColorUpdater)(engine, false);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.preset.fireworks.min.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(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"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/engine"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color"));else if("function"==typeof define&&define.amd)define(["@tsparticles/move-base","@tsparticles/shape-circle","@tsparticles/updater-color","@tsparticles/updater-opacity","@tsparticles/updater-out-modes","@tsparticles/updater-size","@tsparticles/updater-destroy","@tsparticles/plugin-emitters","@tsparticles/updater-life","@tsparticles/shape-line","@tsparticles/engine","@tsparticles/plugin-sounds","@tsparticles/updater-stroke-color"],t);else{var a="object"==typeof exports?t(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"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/engine"),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,e.window,e.window,e.window,e.window);for(var i in a)("object"==typeof exports?exports:e)[i]=a[i]}}(this,((e,t,a,i,r,o,s,n,l,c,p,d,u)=>(()=>{"use strict";var m={533:e=>{e.exports=p},619:t=>{t.exports=e},68:e=>{e.exports=n},490:e=>{e.exports=d},163:e=>{e.exports=t},137:e=>{e.exports=c},501:e=>{e.exports=a},344:e=>{e.exports=s},84:e=>{e.exports=l},686:e=>{e.exports=i},290:e=>{e.exports=r},2:e=>{e.exports=o},204:e=>{e.exports=u}},y={};function f(e){var t=y[e];if(void 0!==t)return t.exports;var a=y[e]={exports:{}};return m[e](a,a.exports,f),a.exports}f.d=(e,t)=>{for(var a in t)f.o(t,a)&&!f.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var v={};return(()=>{f.r(v),f.d(v,{loadFireworksPreset:()=>x});var e=f(619),t=f(163),a=f(501),i=f(686),r=f(290),o=f(2);var s=f(344),n=f(68),l=f(84),c=f(137),p=f(533);class d{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(e){e&&(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.speed&&(this.speed=(0,p.setRangeValue)(e.speed)),void 0!==e.decay&&(this.decay=(0,p.setRangeValue)(e.decay)),void 0!==e.sync&&(this.sync=e.sync))}}class u extends p.ValueWithRandom{constructor(){super(),this.animation=new d,this.direction="clockwise",this.path=!1,this.value=0}load(e){e&&(super.load(e),void 0!==e.direction&&(this.direction=e.direction),this.animation.load(e.animation),void 0!==e.path&&(this.path=e.path))}}class m{constructor(e){this.container=e}init(e){const t=e.options.rotate;if(!t)return;e.rotate={enable:t.animation.enable,value:(0,p.getRangeValue)(t.value)*Math.PI/180},e.pathRotation=t.path;let a=t.direction;if("random"===a){a=Math.floor(2*(0,p.getRandom)())>0?"counter-clockwise":"clockwise"}switch(a){case"counter-clockwise":case"counterClockwise":e.rotate.status="decreasing";break;case"clockwise":e.rotate.status="increasing"}const i=t.animation;i.enable&&(e.rotate.decay=1-(0,p.getRangeValue)(i.decay),e.rotate.velocity=(0,p.getRangeValue)(i.speed)/360*this.container.retina.reduceFactor,i.sync||(e.rotate.velocity*=(0,p.getRandom)())),e.rotation=e.rotate.value}isEnabled(e){const t=e.options.rotate;return!!t&&(!e.destroyed&&!e.spawning&&t.animation.enable&&!t.path)}loadOptions(e,...t){e.rotate||(e.rotate=new u);for(const a of t)e.rotate.load(a?.rotate)}update(e,t){this.isEnabled(e)&&(!function(e,t){const a=e.rotate,i=e.options.rotate;if(!a||!i)return;const r=i.animation,o=(a.velocity??0)*t.factor,s=2*Math.PI,n=a.decay??1;r.enable&&("increasing"===a.status?(a.value+=o,a.value>s&&(a.value-=s)):(a.value-=o,a.value<0&&(a.value+=s)),a.velocity&&1!==n&&(a.velocity*=n))}(e,t),e.rotation=e.rotate?.value??0)}}var y=f(490),w=f(204);const h=(e,t,a)=>{const i=e.max>a?e.max-a:0;let r=(0,p.setRangeValue)(e);i&&(r=(0,p.setRangeValue)(e.min-i,a));const o=e.min<t?e.min:0;return o&&(r=(0,p.setRangeValue)(0,e.max+o)),r},g={detectRetina:!0,background:{color:"#000"},fpsLimit:120,emitters:{direction:"top",life:{count:0,duration:.1,delay:.1},rate:{delay:.05,quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},destroy:{mode:"split",bounds:{top:{min:10,max:30}},split:{sizeOffset:!1,count:1,factor:{value:.333333},rate:{value:{min:75,max:150}},particles:["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"].map((e=>{const t=(0,p.stringToRgb)(e);if(!t)return;const a=(0,p.rgbToHsl)(t),i=h({min:a.s-30,max:a.s+30},0,100),r=h({min:a.l-30,max:a.l+30},0,100);return{color:{value:{h:a.h,s:i,l:r}},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:1,max:2}}},move:{decay:{min:.075,max:.1},enable:!0,gravity:{enable:!0,inverse:!1,acceleration:5},speed:{min:5,max:15},direction:"none",outModes:"destroy"}}})).filter((e=>void 0!==e))}},life:{count:1},shape:{type:"line"},size:{value:{min:.1,max:50},animation:{enable:!0,sync:!0,speed:90,startValue:"max",destroy:"min"}},stroke:{color:{value:"#ffffff"},width:1},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:!0,events:[{event:"particleRemoved",filter:e=>"line"===e.data.particle.shape,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}};async function x(p,d=!0){await async function(s,n=!0){await(0,e.loadBaseMover)(s,!1),await(0,t.loadCircleShape)(s,!1),await(0,a.loadColorUpdater)(s,!1),await(0,i.loadOpacityUpdater)(s,!1),await(0,r.loadOutModesUpdater)(s,!1),await(0,o.loadSizeUpdater)(s,!1),await s.refresh(n)}(p,!1),await(0,n.loadEmittersPlugin)(p,!1),await(0,y.loadSoundsPlugin)(p,!1),await(0,c.loadLineShape)(p,!1),await async function(e,t=!0){await e.addParticleUpdater("rotate",(e=>new m(e)),t)}(p,!1),await(0,s.loadDestroyUpdater)(p,!1),await(0,l.loadLifeUpdater)(p,!1),await(0,w.loadStrokeColorUpdater)(p,!1),await p.addPreset("fireworks",g,d)}})(),v})()));
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(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"),require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/basic","@tsparticles/updater-destroy","@tsparticles/plugin-emitters","@tsparticles/updater-life","@tsparticles/shape-line","@tsparticles/updater-rotate","@tsparticles/plugin-sounds","@tsparticles/updater-stroke-color","@tsparticles/engine"],t);else{var r="object"==typeof exports?t(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"),require("@tsparticles/engine")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(this,((e,t,r,a,i,s,o,n,l)=>(()=>{"use strict";var p={574:t=>{t.exports=e},533:e=>{e.exports=l},68:e=>{e.exports=r},490:e=>{e.exports=o},137:e=>{e.exports=i},344:e=>{e.exports=t},84:e=>{e.exports=a},59:e=>{e.exports=s},204:e=>{e.exports=n}},u={};function d(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return p[e](r,r.exports,d),r.exports}d.d=(e,t)=>{for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{d.r(c),d.d(c,{loadFireworksPreset:()=>m});var e=d(574),t=d(344),r=d(68),a=d(84),i=d(137),s=d(59),o=d(490),n=d(204),l=d(533);const p=(e,t,r)=>{const a=e.max>r?e.max-r:0;let i=(0,l.setRangeValue)(e);a&&(i=(0,l.setRangeValue)(e.min-a,r));const s=e.min<t?e.min:0;return s&&(i=(0,l.setRangeValue)(0,e.max+s)),i},u={detectRetina:!0,background:{color:"#000"},fpsLimit:120,emitters:{direction:"top",life:{count:0,duration:.1,delay:.1},rate:{delay:.05,quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},destroy:{mode:"split",bounds:{top:{min:10,max:30}},split:{sizeOffset:!1,count:1,factor:{value:.333333},rate:{value:{min:75,max:150}},particles:["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"].map((e=>{const t=(0,l.stringToRgb)(e);if(!t)return;const r=(0,l.rgbToHsl)(t),a=p({min:r.s-30,max:r.s+30},0,100),i=p({min:r.l-30,max:r.l+30},0,100);return{color:{value:{h:r.h,s:a,l:i}},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:1,max:2}}},move:{decay:{min:.075,max:.1},enable:!0,gravity:{enable:!0,inverse:!1,acceleration:5},speed:{min:5,max:15},direction:"none",outModes:"destroy"}}})).filter((e=>void 0!==e))}},life:{count:1},shape:{type:"line"},size:{value:{min:.1,max:50},animation:{enable:!0,sync:!0,speed:90,startValue:"max",destroy:"min"}},stroke:{color:{value:"#ffffff"},width:1},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:!0,events:[{event:"particleRemoved",filter:e=>"line"===e.data.particle.shape,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}};async function m(l,p=!0){await(0,e.loadBasic)(l,!1),await(0,r.loadEmittersPlugin)(l,!1),await(0,o.loadSoundsPlugin)(l,!1),await(0,i.loadLineShape)(l,!1),await(0,s.loadRotateUpdater)(l,!1),await(0,t.loadDestroyUpdater)(l,!1),await(0,a.loadLifeUpdater)(l,!1),await(0,n.loadStrokeColorUpdater)(l,!1),await l.addPreset("fireworks",u,p)}})(),c})()));
@@ -1 +1 @@
1
- /*! tsParticles Fireworks Preset v3.0.0-beta.1 by Matteo Bruni */
1
+ /*! tsParticles Fireworks Preset v3.0.0-beta.4 by Matteo Bruni */