@tsparticles/preset-confetti 3.0.0-beta.1 → 3.0.0-beta.2

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,26 @@
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.2
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/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/updater-roll"), require("@tsparticles/engine"), require("@tsparticles/shape-square"), require("@tsparticles/updater-tilt"), require("@tsparticles/updater-wobble"));
11
+ module.exports = factory(require("@tsparticles/basic"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/updater-roll"), require("@tsparticles/updater-rotate"), require("@tsparticles/shape-square"), require("@tsparticles/updater-tilt"), require("@tsparticles/updater-wobble"));
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/plugin-emitters", "@tsparticles/updater-life", "@tsparticles/plugin-motion", "@tsparticles/updater-roll", "@tsparticles/engine", "@tsparticles/shape-square", "@tsparticles/updater-tilt", "@tsparticles/updater-wobble"], factory);
13
+ define(["@tsparticles/basic", "@tsparticles/plugin-emitters", "@tsparticles/updater-life", "@tsparticles/plugin-motion", "@tsparticles/updater-roll", "@tsparticles/updater-rotate", "@tsparticles/shape-square", "@tsparticles/updater-tilt", "@tsparticles/updater-wobble"], 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/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/updater-roll"), require("@tsparticles/engine"), require("@tsparticles/shape-square"), require("@tsparticles/updater-tilt"), require("@tsparticles/updater-wobble")) : 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"], root["window"]);
15
+ var a = typeof exports === 'object' ? factory(require("@tsparticles/basic"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/updater-roll"), require("@tsparticles/updater-rotate"), require("@tsparticles/shape-square"), require("@tsparticles/updater-tilt"), require("@tsparticles/updater-wobble")) : 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__68__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__82__, __WEBPACK_EXTERNAL_MODULE__734__, __WEBPACK_EXTERNAL_MODULE__533__, __WEBPACK_EXTERNAL_MODULE__652__, __WEBPACK_EXTERNAL_MODULE__448__, __WEBPACK_EXTERNAL_MODULE__83__) => {
18
+ })(this, (__WEBPACK_EXTERNAL_MODULE__574__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__433__, __WEBPACK_EXTERNAL_MODULE__734__, __WEBPACK_EXTERNAL_MODULE__59__, __WEBPACK_EXTERNAL_MODULE__652__, __WEBPACK_EXTERNAL_MODULE__448__, __WEBPACK_EXTERNAL_MODULE__83__) => {
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__;
27
-
28
- /***/ }),
29
-
30
- /***/ 619:
31
- /***/ ((module) => {
32
-
33
- module.exports = __WEBPACK_EXTERNAL_MODULE__619__;
26
+ module.exports = __WEBPACK_EXTERNAL_MODULE__574__;
34
27
 
35
28
  /***/ }),
36
29
 
@@ -41,17 +34,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__68__;
41
34
 
42
35
  /***/ }),
43
36
 
44
- /***/ 82:
37
+ /***/ 433:
45
38
  /***/ ((module) => {
46
39
 
47
- module.exports = __WEBPACK_EXTERNAL_MODULE__82__;
48
-
49
- /***/ }),
50
-
51
- /***/ 163:
52
- /***/ ((module) => {
53
-
54
- module.exports = __WEBPACK_EXTERNAL_MODULE__163__;
40
+ module.exports = __WEBPACK_EXTERNAL_MODULE__433__;
55
41
 
56
42
  /***/ }),
57
43
 
@@ -62,13 +48,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__652__;
62
48
 
63
49
  /***/ }),
64
50
 
65
- /***/ 501:
66
- /***/ ((module) => {
67
-
68
- module.exports = __WEBPACK_EXTERNAL_MODULE__501__;
69
-
70
- /***/ }),
71
-
72
51
  /***/ 84:
73
52
  /***/ ((module) => {
74
53
 
@@ -76,20 +55,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__84__;
76
55
 
77
56
  /***/ }),
78
57
 
79
- /***/ 686:
80
- /***/ ((module) => {
81
-
82
- module.exports = __WEBPACK_EXTERNAL_MODULE__686__;
83
-
84
- /***/ }),
85
-
86
- /***/ 290:
87
- /***/ ((module) => {
88
-
89
- module.exports = __WEBPACK_EXTERNAL_MODULE__290__;
90
-
91
- /***/ }),
92
-
93
58
  /***/ 734:
94
59
  /***/ ((module) => {
95
60
 
@@ -97,10 +62,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__734__;
97
62
 
98
63
  /***/ }),
99
64
 
100
- /***/ 2:
65
+ /***/ 59:
101
66
  /***/ ((module) => {
102
67
 
103
- module.exports = __WEBPACK_EXTERNAL_MODULE__2__;
68
+ module.exports = __WEBPACK_EXTERNAL_MODULE__59__;
104
69
 
105
70
  /***/ }),
106
71
 
@@ -185,199 +150,18 @@ __webpack_require__.d(__webpack_exports__, {
185
150
  loadConfettiPreset: () => (/* binding */ loadConfettiPreset)
186
151
  });
187
152
 
188
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/move-base","commonjs2":"@tsparticles/move-base","amd":"@tsparticles/move-base","root":"window"}
189
- var move_base_root_window_ = __webpack_require__(619);
190
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-circle","commonjs2":"@tsparticles/shape-circle","amd":"@tsparticles/shape-circle","root":"window"}
191
- var shape_circle_root_window_ = __webpack_require__(163);
192
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-color","commonjs2":"@tsparticles/updater-color","amd":"@tsparticles/updater-color","root":"window"}
193
- var updater_color_root_window_ = __webpack_require__(501);
194
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-opacity","commonjs2":"@tsparticles/updater-opacity","amd":"@tsparticles/updater-opacity","root":"window"}
195
- var updater_opacity_root_window_ = __webpack_require__(686);
196
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-out-modes","commonjs2":"@tsparticles/updater-out-modes","amd":"@tsparticles/updater-out-modes","root":"window"}
197
- var updater_out_modes_root_window_ = __webpack_require__(290);
198
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-size","commonjs2":"@tsparticles/updater-size","amd":"@tsparticles/updater-size","root":"window"}
199
- var updater_size_root_window_ = __webpack_require__(2);
200
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+basic@3.0.0-beta.1/node_modules/@tsparticles/basic/browser/index.js
201
-
202
-
203
-
204
-
205
-
206
-
207
- async function loadBasic(engine, refresh = true) {
208
- await (0,move_base_root_window_.loadBaseMover)(engine, false);
209
- await (0,shape_circle_root_window_.loadCircleShape)(engine, false);
210
- await (0,updater_color_root_window_.loadColorUpdater)(engine, false);
211
- await (0,updater_opacity_root_window_.loadOpacityUpdater)(engine, false);
212
- await (0,updater_out_modes_root_window_.loadOutModesUpdater)(engine, false);
213
- await (0,updater_size_root_window_.loadSizeUpdater)(engine, false);
214
- await engine.refresh(refresh);
215
- }
216
-
153
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/basic","commonjs2":"@tsparticles/basic","amd":"@tsparticles/basic","root":"window"}
154
+ var basic_root_window_ = __webpack_require__(574);
217
155
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"}
218
156
  var plugin_emitters_root_window_ = __webpack_require__(68);
219
157
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-life","commonjs2":"@tsparticles/updater-life","amd":"@tsparticles/updater-life","root":"window"}
220
158
  var updater_life_root_window_ = __webpack_require__(84);
221
159
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-motion","commonjs2":"@tsparticles/plugin-motion","amd":"@tsparticles/plugin-motion","root":"window"}
222
- var plugin_motion_root_window_ = __webpack_require__(82);
160
+ var plugin_motion_root_window_ = __webpack_require__(433);
223
161
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-roll","commonjs2":"@tsparticles/updater-roll","amd":"@tsparticles/updater-roll","root":"window"}
224
162
  var updater_roll_root_window_ = __webpack_require__(734);
225
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"}
226
- var engine_root_window_ = __webpack_require__(533);
227
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-rotate@3.0.0-beta.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/RotateAnimation.js
228
-
229
- class RotateAnimation {
230
- constructor() {
231
- this.enable = false;
232
- this.speed = 0;
233
- this.decay = 0;
234
- this.sync = false;
235
- }
236
- load(data) {
237
- if (!data) {
238
- return;
239
- }
240
- if (data.enable !== undefined) {
241
- this.enable = data.enable;
242
- }
243
- if (data.speed !== undefined) {
244
- this.speed = (0,engine_root_window_.setRangeValue)(data.speed);
245
- }
246
- if (data.decay !== undefined) {
247
- this.decay = (0,engine_root_window_.setRangeValue)(data.decay);
248
- }
249
- if (data.sync !== undefined) {
250
- this.sync = data.sync;
251
- }
252
- }
253
- }
254
-
255
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-rotate@3.0.0-beta.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/Rotate.js
256
-
257
-
258
- class Rotate extends engine_root_window_.ValueWithRandom {
259
- constructor() {
260
- super();
261
- this.animation = new RotateAnimation();
262
- this.direction = "clockwise";
263
- this.path = false;
264
- this.value = 0;
265
- }
266
- load(data) {
267
- if (!data) {
268
- return;
269
- }
270
- super.load(data);
271
- if (data.direction !== undefined) {
272
- this.direction = data.direction;
273
- }
274
- this.animation.load(data.animation);
275
- if (data.path !== undefined) {
276
- this.path = data.path;
277
- }
278
- }
279
- }
280
-
281
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-rotate@3.0.0-beta.1/node_modules/@tsparticles/updater-rotate/browser/RotateUpdater.js
282
-
283
-
284
- function updateRotate(particle, delta) {
285
- const rotate = particle.rotate, rotateOptions = particle.options.rotate;
286
- if (!rotate || !rotateOptions) {
287
- return;
288
- }
289
- const rotateAnimation = rotateOptions.animation, speed = (rotate.velocity ?? 0) * delta.factor, max = 2 * Math.PI, decay = rotate.decay ?? 1;
290
- if (!rotateAnimation.enable) {
291
- return;
292
- }
293
- switch (rotate.status) {
294
- case "increasing":
295
- rotate.value += speed;
296
- if (rotate.value > max) {
297
- rotate.value -= max;
298
- }
299
- break;
300
- case "decreasing":
301
- default:
302
- rotate.value -= speed;
303
- if (rotate.value < 0) {
304
- rotate.value += max;
305
- }
306
- break;
307
- }
308
- if (rotate.velocity && decay !== 1) {
309
- rotate.velocity *= decay;
310
- }
311
- }
312
- class RotateUpdater {
313
- constructor(container) {
314
- this.container = container;
315
- }
316
- init(particle) {
317
- const rotateOptions = particle.options.rotate;
318
- if (!rotateOptions) {
319
- return;
320
- }
321
- particle.rotate = {
322
- enable: rotateOptions.animation.enable,
323
- value: ((0,engine_root_window_.getRangeValue)(rotateOptions.value) * Math.PI) / 180,
324
- };
325
- particle.pathRotation = rotateOptions.path;
326
- let rotateDirection = rotateOptions.direction;
327
- if (rotateDirection === "random") {
328
- const index = Math.floor((0,engine_root_window_.getRandom)() * 2);
329
- rotateDirection = index > 0 ? "counter-clockwise" : "clockwise";
330
- }
331
- switch (rotateDirection) {
332
- case "counter-clockwise":
333
- case "counterClockwise":
334
- particle.rotate.status = "decreasing";
335
- break;
336
- case "clockwise":
337
- particle.rotate.status = "increasing";
338
- break;
339
- }
340
- const rotateAnimation = rotateOptions.animation;
341
- if (rotateAnimation.enable) {
342
- particle.rotate.decay = 1 - (0,engine_root_window_.getRangeValue)(rotateAnimation.decay);
343
- particle.rotate.velocity =
344
- ((0,engine_root_window_.getRangeValue)(rotateAnimation.speed) / 360) * this.container.retina.reduceFactor;
345
- if (!rotateAnimation.sync) {
346
- particle.rotate.velocity *= (0,engine_root_window_.getRandom)();
347
- }
348
- }
349
- particle.rotation = particle.rotate.value;
350
- }
351
- isEnabled(particle) {
352
- const rotate = particle.options.rotate;
353
- if (!rotate) {
354
- return false;
355
- }
356
- return !particle.destroyed && !particle.spawning && rotate.animation.enable && !rotate.path;
357
- }
358
- loadOptions(options, ...sources) {
359
- if (!options.rotate) {
360
- options.rotate = new Rotate();
361
- }
362
- for (const source of sources) {
363
- options.rotate.load(source?.rotate);
364
- }
365
- }
366
- update(particle, delta) {
367
- if (!this.isEnabled(particle)) {
368
- return;
369
- }
370
- updateRotate(particle, delta);
371
- particle.rotation = particle.rotate?.value ?? 0;
372
- }
373
- }
374
-
375
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-rotate@3.0.0-beta.1/node_modules/@tsparticles/updater-rotate/browser/index.js
376
-
377
- async function loadRotateUpdater(engine, refresh = true) {
378
- await engine.addParticleUpdater("rotate", (container) => new RotateUpdater(container), refresh);
379
- }
380
-
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);
381
165
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-square","commonjs2":"@tsparticles/shape-square","amd":"@tsparticles/shape-square","root":"window"}
382
166
  var shape_square_root_window_ = __webpack_require__(652);
383
167
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-tilt","commonjs2":"@tsparticles/updater-tilt","amd":"@tsparticles/updater-tilt","root":"window"}
@@ -527,13 +311,13 @@ const options = {
527
311
 
528
312
 
529
313
  async function loadPreset(engine, refresh = true) {
530
- await loadBasic(engine, false);
314
+ await (0,basic_root_window_.loadBasic)(engine, false);
531
315
  await (0,shape_square_root_window_.loadSquareShape)(engine, false);
532
316
  await (0,plugin_emitters_root_window_.loadEmittersPlugin)(engine, false);
533
317
  await (0,plugin_motion_root_window_.loadMotionPlugin)(engine, false);
534
318
  await (0,updater_wobble_root_window_.loadWobbleUpdater)(engine, false);
535
319
  await (0,updater_roll_root_window_.loadRollUpdater)(engine, false);
536
- await loadRotateUpdater(engine, false);
320
+ await (0,updater_rotate_root_window_.loadRotateUpdater)(engine, false);
537
321
  await (0,updater_tilt_root_window_.loadTiltUpdater)(engine, false);
538
322
  await (0,updater_life_root_window_.loadLifeUpdater)(engine, false);
539
323
  await engine.addPreset("confetti", options, refresh);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.preset.confetti.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/plugin-emitters"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/updater-roll"),require("@tsparticles/engine"),require("@tsparticles/shape-square"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble"));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/plugin-emitters","@tsparticles/updater-life","@tsparticles/plugin-motion","@tsparticles/updater-roll","@tsparticles/engine","@tsparticles/shape-square","@tsparticles/updater-tilt","@tsparticles/updater-wobble"],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/plugin-emitters"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/updater-roll"),require("@tsparticles/engine"),require("@tsparticles/shape-square"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble")):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,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,f)=>(()=>{"use strict";var w={533:e=>{e.exports=p},619:t=>{t.exports=e},68:e=>{e.exports=s},82:e=>{e.exports=l},163:e=>{e.exports=t},652:e=>{e.exports=d},501:e=>{e.exports=a},84:e=>{e.exports=n},686:e=>{e.exports=i},290:e=>{e.exports=r},734:e=>{e.exports=c},2:e=>{e.exports=o},448:e=>{e.exports=u},83:e=>{e.exports=f}},m={};function b(e){var t=m[e];if(void 0!==t)return t.exports;var a=m[e]={exports:{}};return w[e](a,a.exports,b),a.exports}b.d=(e,t)=>{for(var a in t)b.o(t,a)&&!b.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},b.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var v={};return(()=>{b.r(v),b.d(v,{loadConfettiPreset:()=>q});var e=b(619),t=b(163),a=b(501),i=b(686),r=b(290),o=b(2);var s=b(68),n=b(84),l=b(82),c=b(734),p=b(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 f{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 w=b(652),m=b(448),y=b(83);const h={fullScreen:{enable:!0,zIndex:100},fpsLimit:120,particles:{number:{value:0},color:{value:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"]},shape:{type:["square","circle"]},opacity:{value:{min:0,max:1},animation:{enable:!0,speed:.5,startValue:"max",destroy:"min"}},size:{value:5},links:{enable:!1},life:{duration:{sync:!0,value:20/6},count:1},move:{angle:{value:45,offset:0},drift:0,enable:!0,gravity:{enable:!0,acceleration:9.81},speed:45,decay:.1,direction:-90,random:!0,straight:!1,outModes:{default:"none",bottom:"destroy"}},rotate:{value:{min:0,max:360},direction:"random",animation:{enable:!0,speed:60}},tilt:{direction:"random",enable:!0,value:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!0,speed:{min:15,max:25}},wobble:{distance:30,enable:!0,speed:{min:-15,max:15}}},detectRetina:!0,motion:{disable:!0},emitters:{name:"confetti",startCount:50,position:{x:50,y:50},size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}};async function g(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,w.loadSquareShape)(p,!1),await(0,s.loadEmittersPlugin)(p,!1),await(0,l.loadMotionPlugin)(p,!1),await(0,y.loadWobbleUpdater)(p,!1),await(0,c.loadRollUpdater)(p,!1),await async function(e,t=!0){await e.addParticleUpdater("rotate",(e=>new f(e)),t)}(p,!1),await(0,m.loadTiltUpdater)(p,!1),await(0,n.loadLifeUpdater)(p,!1),await p.addPreset("confetti",h,d)}async function q(e){await g(e)}})(),v})()));
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/basic"),require("@tsparticles/plugin-emitters"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble"));else if("function"==typeof define&&define.amd)define(["@tsparticles/basic","@tsparticles/plugin-emitters","@tsparticles/updater-life","@tsparticles/plugin-motion","@tsparticles/updater-roll","@tsparticles/updater-rotate","@tsparticles/shape-square","@tsparticles/updater-tilt","@tsparticles/updater-wobble"],t);else{var a="object"==typeof exports?t(require("@tsparticles/basic"),require("@tsparticles/plugin-emitters"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(this,((e,t,a,r,i,o,s,l,n)=>(()=>{"use strict";var p={574:t=>{t.exports=e},68:e=>{e.exports=t},433:e=>{e.exports=r},652:e=>{e.exports=s},84:e=>{e.exports=a},734:e=>{e.exports=i},59:e=>{e.exports=o},448:e=>{e.exports=l},83:e=>{e.exports=n}},d={};function u(e){var t=d[e];if(void 0!==t)return t.exports;var a=d[e]={exports:{}};return p[e](a,a.exports,u),a.exports}u.d=(e,t)=>{for(var a in t)u.o(t,a)&&!u.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{u.r(c),u.d(c,{loadConfettiPreset:()=>d});var e=u(574),t=u(68),a=u(84),r=u(433),i=u(734),o=u(59),s=u(652),l=u(448),n=u(83);const p={fullScreen:{enable:!0,zIndex:100},fpsLimit:120,particles:{number:{value:0},color:{value:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"]},shape:{type:["square","circle"]},opacity:{value:{min:0,max:1},animation:{enable:!0,speed:.5,startValue:"max",destroy:"min"}},size:{value:5},links:{enable:!1},life:{duration:{sync:!0,value:20/6},count:1},move:{angle:{value:45,offset:0},drift:0,enable:!0,gravity:{enable:!0,acceleration:9.81},speed:45,decay:.1,direction:-90,random:!0,straight:!1,outModes:{default:"none",bottom:"destroy"}},rotate:{value:{min:0,max:360},direction:"random",animation:{enable:!0,speed:60}},tilt:{direction:"random",enable:!0,value:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!0,speed:{min:15,max:25}},wobble:{distance:30,enable:!0,speed:{min:-15,max:15}}},detectRetina:!0,motion:{disable:!0},emitters:{name:"confetti",startCount:50,position:{x:50,y:50},size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}};async function d(d){await async function(d,u=!0){await(0,e.loadBasic)(d,!1),await(0,s.loadSquareShape)(d,!1),await(0,t.loadEmittersPlugin)(d,!1),await(0,r.loadMotionPlugin)(d,!1),await(0,n.loadWobbleUpdater)(d,!1),await(0,i.loadRollUpdater)(d,!1),await(0,o.loadRotateUpdater)(d,!1),await(0,l.loadTiltUpdater)(d,!1),await(0,a.loadLifeUpdater)(d,!1),await d.addPreset("confetti",p,u)}(d)}})(),c})()));
@@ -1 +1 @@
1
- /*! tsParticles Confetti Preset v3.0.0-beta.1 by Matteo Bruni */
1
+ /*! tsParticles Confetti Preset v3.0.0-beta.2 by Matteo Bruni */