@tsparticles/confetti 3.0.0-beta.2 → 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.
@@ -1 +1 @@
1
- /*! tsParticles Confetti v3.0.0-beta.2 by Matteo Bruni */
1
+ /*! tsParticles Confetti v3.0.0-beta.4 by Matteo Bruni */
@@ -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.2
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/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/shape-cards"), require("@tsparticles/plugin-emitters"), require("@tsparticles/shape-heart"), require("@tsparticles/shape-image"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/shape-polygon"), require("@tsparticles/updater-roll"), require("@tsparticles/shape-square"), require("@tsparticles/shape-star"), require("@tsparticles/shape-text"), require("@tsparticles/updater-tilt"), require("@tsparticles/updater-wobble"));
11
+ module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/shape-cards"), require("@tsparticles/plugin-emitters"), require("@tsparticles/shape-heart"), require("@tsparticles/shape-image"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/shape-polygon"), require("@tsparticles/updater-roll"), require("@tsparticles/updater-rotate"), require("@tsparticles/shape-square"), require("@tsparticles/shape-star"), require("@tsparticles/shape-text"), require("@tsparticles/updater-tilt"), require("@tsparticles/updater-wobble"));
12
12
  else if(typeof define === 'function' && define.amd)
13
- define(["@tsparticles/engine", "@tsparticles/move-base", "@tsparticles/shape-circle", "@tsparticles/updater-color", "@tsparticles/updater-opacity", "@tsparticles/updater-out-modes", "@tsparticles/updater-size", "@tsparticles/shape-cards", "@tsparticles/plugin-emitters", "@tsparticles/shape-heart", "@tsparticles/shape-image", "@tsparticles/updater-life", "@tsparticles/plugin-motion", "@tsparticles/shape-polygon", "@tsparticles/updater-roll", "@tsparticles/shape-square", "@tsparticles/shape-star", "@tsparticles/shape-text", "@tsparticles/updater-tilt", "@tsparticles/updater-wobble"], factory);
13
+ define(["@tsparticles/engine", "@tsparticles/basic", "@tsparticles/shape-cards", "@tsparticles/plugin-emitters", "@tsparticles/shape-heart", "@tsparticles/shape-image", "@tsparticles/updater-life", "@tsparticles/plugin-motion", "@tsparticles/shape-polygon", "@tsparticles/updater-roll", "@tsparticles/updater-rotate", "@tsparticles/shape-square", "@tsparticles/shape-star", "@tsparticles/shape-text", "@tsparticles/updater-tilt", "@tsparticles/updater-wobble"], factory);
14
14
  else {
15
- var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), 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/shape-cards"), require("@tsparticles/plugin-emitters"), require("@tsparticles/shape-heart"), require("@tsparticles/shape-image"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/shape-polygon"), require("@tsparticles/updater-roll"), require("@tsparticles/shape-square"), require("@tsparticles/shape-star"), require("@tsparticles/shape-text"), 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"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
15
+ var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/shape-cards"), require("@tsparticles/plugin-emitters"), require("@tsparticles/shape-heart"), require("@tsparticles/shape-image"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/shape-polygon"), require("@tsparticles/updater-roll"), require("@tsparticles/updater-rotate"), require("@tsparticles/shape-square"), require("@tsparticles/shape-star"), require("@tsparticles/shape-text"), 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"], 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__, __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__345__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__12__, __WEBPACK_EXTERNAL_MODULE__885__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__82__, __WEBPACK_EXTERNAL_MODULE__907__, __WEBPACK_EXTERNAL_MODULE__734__, __WEBPACK_EXTERNAL_MODULE__652__, __WEBPACK_EXTERNAL_MODULE__960__, __WEBPACK_EXTERNAL_MODULE__727__, __WEBPACK_EXTERNAL_MODULE__448__, __WEBPACK_EXTERNAL_MODULE__83__) => {
18
+ })(this, (__WEBPACK_EXTERNAL_MODULE__533__, __WEBPACK_EXTERNAL_MODULE__574__, __WEBPACK_EXTERNAL_MODULE__686__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__12__, __WEBPACK_EXTERNAL_MODULE__885__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__82__, __WEBPACK_EXTERNAL_MODULE__907__, __WEBPACK_EXTERNAL_MODULE__734__, __WEBPACK_EXTERNAL_MODULE__59__, __WEBPACK_EXTERNAL_MODULE__652__, __WEBPACK_EXTERNAL_MODULE__960__, __WEBPACK_EXTERNAL_MODULE__727__, __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__;
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,17 +48,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__82__;
48
48
 
49
49
  /***/ }),
50
50
 
51
- /***/ 345:
52
- /***/ ((module) => {
53
-
54
- module.exports = __WEBPACK_EXTERNAL_MODULE__345__;
55
-
56
- /***/ }),
57
-
58
- /***/ 163:
51
+ /***/ 686:
59
52
  /***/ ((module) => {
60
53
 
61
- module.exports = __WEBPACK_EXTERNAL_MODULE__163__;
54
+ module.exports = __WEBPACK_EXTERNAL_MODULE__686__;
62
55
 
63
56
  /***/ }),
64
57
 
@@ -104,13 +97,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__727__;
104
97
 
105
98
  /***/ }),
106
99
 
107
- /***/ 501:
108
- /***/ ((module) => {
109
-
110
- module.exports = __WEBPACK_EXTERNAL_MODULE__501__;
111
-
112
- /***/ }),
113
-
114
100
  /***/ 84:
115
101
  /***/ ((module) => {
116
102
 
@@ -118,20 +104,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__84__;
118
104
 
119
105
  /***/ }),
120
106
 
121
- /***/ 686:
122
- /***/ ((module) => {
123
-
124
- module.exports = __WEBPACK_EXTERNAL_MODULE__686__;
125
-
126
- /***/ }),
127
-
128
- /***/ 290:
129
- /***/ ((module) => {
130
-
131
- module.exports = __WEBPACK_EXTERNAL_MODULE__290__;
132
-
133
- /***/ }),
134
-
135
107
  /***/ 734:
136
108
  /***/ ((module) => {
137
109
 
@@ -139,10 +111,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__734__;
139
111
 
140
112
  /***/ }),
141
113
 
142
- /***/ 2:
114
+ /***/ 59:
143
115
  /***/ ((module) => {
144
116
 
145
- module.exports = __WEBPACK_EXTERNAL_MODULE__2__;
117
+ module.exports = __WEBPACK_EXTERNAL_MODULE__59__;
146
118
 
147
119
  /***/ }),
148
120
 
@@ -250,6 +222,7 @@ class ConfettiOptions {
250
222
  this.scalar = 1;
251
223
  this.zIndex = 100;
252
224
  this.disableForReducedMotion = true;
225
+ this.flat = false;
253
226
  this.shapeOptions = {};
254
227
  }
255
228
  get origin() {
@@ -288,6 +261,9 @@ class ConfettiOptions {
288
261
  if (data.decay !== undefined) {
289
262
  this.decay = data.decay;
290
263
  }
264
+ if (data.flat !== undefined) {
265
+ this.flat = data.flat;
266
+ }
291
267
  if (data.gravity !== undefined) {
292
268
  this.gravity = data.gravity;
293
269
  }
@@ -347,36 +323,10 @@ class ConfettiOptions {
347
323
  }
348
324
  }
349
325
  }
350
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/move-base","commonjs2":"@tsparticles/move-base","amd":"@tsparticles/move-base","root":"window"}
351
- var move_base_root_window_ = __webpack_require__(619);
352
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-circle","commonjs2":"@tsparticles/shape-circle","amd":"@tsparticles/shape-circle","root":"window"}
353
- var shape_circle_root_window_ = __webpack_require__(163);
354
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-color","commonjs2":"@tsparticles/updater-color","amd":"@tsparticles/updater-color","root":"window"}
355
- var updater_color_root_window_ = __webpack_require__(501);
356
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-opacity","commonjs2":"@tsparticles/updater-opacity","amd":"@tsparticles/updater-opacity","root":"window"}
357
- var updater_opacity_root_window_ = __webpack_require__(686);
358
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-out-modes","commonjs2":"@tsparticles/updater-out-modes","amd":"@tsparticles/updater-out-modes","root":"window"}
359
- var updater_out_modes_root_window_ = __webpack_require__(290);
360
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-size","commonjs2":"@tsparticles/updater-size","amd":"@tsparticles/updater-size","root":"window"}
361
- var updater_size_root_window_ = __webpack_require__(2);
362
- ;// CONCATENATED MODULE: ../basic/dist/browser/index.js
363
-
364
-
365
-
366
-
367
-
368
-
369
- async function loadBasic(engine, refresh = true) {
370
- await (0,move_base_root_window_.loadBaseMover)(engine, false);
371
- await (0,shape_circle_root_window_.loadCircleShape)(engine, false);
372
- await (0,updater_color_root_window_.loadColorUpdater)(engine, false);
373
- await (0,updater_opacity_root_window_.loadOpacityUpdater)(engine, false);
374
- await (0,updater_out_modes_root_window_.loadOutModesUpdater)(engine, false);
375
- await (0,updater_size_root_window_.loadSizeUpdater)(engine, false);
376
- await engine.refresh(refresh);
377
- }
326
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/basic","commonjs2":"@tsparticles/basic","amd":"@tsparticles/basic","root":"window"}
327
+ var basic_root_window_ = __webpack_require__(574);
378
328
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-cards","commonjs2":"@tsparticles/shape-cards","amd":"@tsparticles/shape-cards","root":"window"}
379
- var shape_cards_root_window_ = __webpack_require__(345);
329
+ var shape_cards_root_window_ = __webpack_require__(686);
380
330
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"}
381
331
  var plugin_emitters_root_window_ = __webpack_require__(68);
382
332
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-heart","commonjs2":"@tsparticles/shape-heart","amd":"@tsparticles/shape-heart","root":"window"}
@@ -391,159 +341,8 @@ var plugin_motion_root_window_ = __webpack_require__(82);
391
341
  var shape_polygon_root_window_ = __webpack_require__(907);
392
342
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-roll","commonjs2":"@tsparticles/updater-roll","amd":"@tsparticles/updater-roll","root":"window"}
393
343
  var updater_roll_root_window_ = __webpack_require__(734);
394
- ;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/Options/Classes/RotateAnimation.js
395
-
396
- class RotateAnimation {
397
- constructor() {
398
- this.enable = false;
399
- this.speed = 0;
400
- this.decay = 0;
401
- this.sync = false;
402
- }
403
- load(data) {
404
- if (!data) {
405
- return;
406
- }
407
- if (data.enable !== undefined) {
408
- this.enable = data.enable;
409
- }
410
- if (data.speed !== undefined) {
411
- this.speed = (0,engine_root_window_.setRangeValue)(data.speed);
412
- }
413
- if (data.decay !== undefined) {
414
- this.decay = (0,engine_root_window_.setRangeValue)(data.decay);
415
- }
416
- if (data.sync !== undefined) {
417
- this.sync = data.sync;
418
- }
419
- }
420
- }
421
- ;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/Options/Classes/Rotate.js
422
-
423
-
424
- class Rotate extends engine_root_window_.ValueWithRandom {
425
- constructor() {
426
- super();
427
- this.animation = new RotateAnimation();
428
- this.direction = "clockwise";
429
- this.path = false;
430
- this.value = 0;
431
- }
432
- load(data) {
433
- if (!data) {
434
- return;
435
- }
436
- super.load(data);
437
- if (data.direction !== undefined) {
438
- this.direction = data.direction;
439
- }
440
- this.animation.load(data.animation);
441
- if (data.path !== undefined) {
442
- this.path = data.path;
443
- }
444
- }
445
- }
446
- ;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/RotateUpdater.js
447
-
448
-
449
- function updateRotate(particle, delta) {
450
- const rotate = particle.rotate,
451
- rotateOptions = particle.options.rotate;
452
- if (!rotate || !rotateOptions) {
453
- return;
454
- }
455
- const rotateAnimation = rotateOptions.animation,
456
- speed = (rotate.velocity ?? 0) * delta.factor,
457
- max = 2 * Math.PI,
458
- decay = rotate.decay ?? 1;
459
- if (!rotateAnimation.enable) {
460
- return;
461
- }
462
- switch (rotate.status) {
463
- case "increasing":
464
- rotate.value += speed;
465
- if (rotate.value > max) {
466
- rotate.value -= max;
467
- }
468
- break;
469
- case "decreasing":
470
- default:
471
- rotate.value -= speed;
472
- if (rotate.value < 0) {
473
- rotate.value += max;
474
- }
475
- break;
476
- }
477
- if (rotate.velocity && decay !== 1) {
478
- rotate.velocity *= decay;
479
- }
480
- }
481
- class RotateUpdater {
482
- constructor(container) {
483
- this.container = container;
484
- }
485
- init(particle) {
486
- const rotateOptions = particle.options.rotate;
487
- if (!rotateOptions) {
488
- return;
489
- }
490
- particle.rotate = {
491
- enable: rotateOptions.animation.enable,
492
- value: (0,engine_root_window_.getRangeValue)(rotateOptions.value) * Math.PI / 180
493
- };
494
- particle.pathRotation = rotateOptions.path;
495
- let rotateDirection = rotateOptions.direction;
496
- if (rotateDirection === "random") {
497
- const index = Math.floor((0,engine_root_window_.getRandom)() * 2);
498
- rotateDirection = index > 0 ? "counter-clockwise" : "clockwise";
499
- }
500
- switch (rotateDirection) {
501
- case "counter-clockwise":
502
- case "counterClockwise":
503
- particle.rotate.status = "decreasing";
504
- break;
505
- case "clockwise":
506
- particle.rotate.status = "increasing";
507
- break;
508
- }
509
- const rotateAnimation = rotateOptions.animation;
510
- if (rotateAnimation.enable) {
511
- particle.rotate.decay = 1 - (0,engine_root_window_.getRangeValue)(rotateAnimation.decay);
512
- particle.rotate.velocity = (0,engine_root_window_.getRangeValue)(rotateAnimation.speed) / 360 * this.container.retina.reduceFactor;
513
- if (!rotateAnimation.sync) {
514
- particle.rotate.velocity *= (0,engine_root_window_.getRandom)();
515
- }
516
- }
517
- particle.rotation = particle.rotate.value;
518
- }
519
- isEnabled(particle) {
520
- const rotate = particle.options.rotate;
521
- if (!rotate) {
522
- return false;
523
- }
524
- return !particle.destroyed && !particle.spawning && rotate.animation.enable && !rotate.path;
525
- }
526
- loadOptions(options, ...sources) {
527
- if (!options.rotate) {
528
- options.rotate = new Rotate();
529
- }
530
- for (const source of sources) {
531
- options.rotate.load(source?.rotate);
532
- }
533
- }
534
- update(particle, delta) {
535
- if (!this.isEnabled(particle)) {
536
- return;
537
- }
538
- updateRotate(particle, delta);
539
- particle.rotation = particle.rotate?.value ?? 0;
540
- }
541
- }
542
- ;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/index.js
543
-
544
- async function loadRotateUpdater(engine, refresh = true) {
545
- await engine.addParticleUpdater("rotate", container => new RotateUpdater(container), refresh);
546
- }
344
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-rotate","commonjs2":"@tsparticles/updater-rotate","amd":"@tsparticles/updater-rotate","root":"window"}
345
+ var updater_rotate_root_window_ = __webpack_require__(59);
547
346
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-square","commonjs2":"@tsparticles/shape-square","amd":"@tsparticles/shape-square","root":"window"}
548
347
  var shape_square_root_window_ = __webpack_require__(652);
549
348
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-star","commonjs2":"@tsparticles/shape-star","amd":"@tsparticles/shape-star","root":"window"}
@@ -600,12 +399,12 @@ async function initPlugins(engine) {
600
399
  await (0,shape_square_root_window_.loadSquareShape)(engine, false);
601
400
  await (0,shape_star_root_window_.loadStarShape)(engine, false);
602
401
  await (0,shape_text_root_window_.loadTextShape)(engine, false);
603
- await loadRotateUpdater(engine, false);
402
+ await (0,updater_rotate_root_window_.loadRotateUpdater)(engine, false);
604
403
  await (0,updater_life_root_window_.loadLifeUpdater)(engine, false);
605
404
  await (0,updater_roll_root_window_.loadRollUpdater)(engine, false);
606
405
  await (0,updater_tilt_root_window_.loadTiltUpdater)(engine, false);
607
406
  await (0,updater_wobble_root_window_.loadWobbleUpdater)(engine, false);
608
- await loadBasic(engine);
407
+ await (0,basic_root_window_.loadBasic)(engine);
609
408
  initializing = false;
610
409
  initialized = true;
611
410
  }
@@ -748,20 +547,20 @@ async function setConfetti(params) {
748
547
  }
749
548
  },
750
549
  rotate: {
751
- value: {
550
+ value: actualOptions.flat ? 0 : {
752
551
  min: 0,
753
552
  max: 360
754
553
  },
755
554
  direction: "random",
756
555
  animation: {
757
- enable: true,
556
+ enable: actualOptions.flat,
758
557
  speed: 60
759
558
  }
760
559
  },
761
560
  tilt: {
762
561
  direction: "random",
763
- enable: true,
764
- value: {
562
+ enable: actualOptions.flat,
563
+ value: actualOptions.flat ? 0 : {
765
564
  min: 0,
766
565
  max: 360
767
566
  },
@@ -775,7 +574,7 @@ async function setConfetti(params) {
775
574
  enable: true,
776
575
  value: 25
777
576
  },
778
- enable: true,
577
+ enable: actualOptions.flat,
779
578
  speed: {
780
579
  min: 15,
781
580
  max: 25
@@ -783,7 +582,7 @@ async function setConfetti(params) {
783
582
  },
784
583
  wobble: {
785
584
  distance: 30,
786
- enable: true,
585
+ enable: actualOptions.flat,
787
586
  speed: {
788
587
  min: -15,
789
588
  max: 15
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.confetti.min.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),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/shape-cards"),require("@tsparticles/plugin-emitters"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/shape-text"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/move-base","@tsparticles/shape-circle","@tsparticles/updater-color","@tsparticles/updater-opacity","@tsparticles/updater-out-modes","@tsparticles/updater-size","@tsparticles/shape-cards","@tsparticles/plugin-emitters","@tsparticles/shape-heart","@tsparticles/shape-image","@tsparticles/updater-life","@tsparticles/plugin-motion","@tsparticles/shape-polygon","@tsparticles/updater-roll","@tsparticles/shape-square","@tsparticles/shape-star","@tsparticles/shape-text","@tsparticles/updater-tilt","@tsparticles/updater-wobble"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine"),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/shape-cards"),require("@tsparticles/plugin-emitters"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/shape-text"),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,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(this,((e,t,i,a,s,r,o,n,l,c,p,d,u,h,y,v,f,w,m,g)=>(()=>{"use strict";var x={533:t=>{t.exports=e},619:e=>{e.exports=t},68:e=>{e.exports=l},82:e=>{e.exports=u},345:e=>{e.exports=n},163:e=>{e.exports=i},12:e=>{e.exports=c},885:e=>{e.exports=p},907:e=>{e.exports=h},652:e=>{e.exports=v},960:e=>{e.exports=f},727:e=>{e.exports=w},501:e=>{e.exports=a},84:e=>{e.exports=d},686:e=>{e.exports=s},290:e=>{e.exports=r},734:e=>{e.exports=y},2:e=>{e.exports=o},448:e=>{e.exports=m},83:e=>{e.exports=g}},b={};function q(e){var t=b[e];if(void 0!==t)return t.exports;var i=b[e]={exports:{}};return x[e](i,i.exports,q),i.exports}q.d=(e,t)=>{for(var i in t)q.o(t,i)&&!q.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},q.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),q.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var S={};return(()=>{q.r(S),q.d(S,{confetti:()=>I});var e=q(533);class t{constructor(){this.angle=90,this.count=50,this.spread=45,this.startVelocity=45,this.decay=.9,this.gravity=1,this.drift=0,this.ticks=200,this.position={x:50,y:50},this.colors=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],this.shapes=["square","circle"],this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0,this.shapeOptions={}}get origin(){return{x:this.position.x/100,y:this.position.y/100}}set origin(e){this.position.x=100*e.x,this.position.y=100*e.y}get particleCount(){return this.count}set particleCount(e){this.count=e}load(t){if(!t)return;void 0!==t.angle&&(this.angle=t.angle);const i=t.count??t.particleCount;void 0!==i&&(this.count=i),void 0!==t.spread&&(this.spread=t.spread),void 0!==t.startVelocity&&(this.startVelocity=t.startVelocity),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.gravity&&(this.gravity=t.gravity),void 0!==t.drift&&(this.drift=t.drift),void 0!==t.ticks&&(this.ticks=t.ticks);const a=t.origin;a&&!t.position&&(t.position={x:void 0!==a.x?100*a.x:void 0,y:void 0!==a.y?100*a.y:void 0});const s=t.position;s&&(void 0!==s.x&&(this.position.x=s.x),void 0!==s.y&&(this.position.y=s.y)),void 0!==t.colors&&((0,e.isArray)(t.colors)?this.colors=[...t.colors]:this.colors=t.colors);const r=t.shapeOptions;if(void 0!==r)for(const t in r){const i=r[t];i&&(this.shapeOptions[t]=(0,e.deepExtend)(this.shapeOptions[t]??{},i))}void 0!==t.shapes&&((0,e.isArray)(t.shapes)?this.shapes=[...t.shapes]:this.shapes=t.shapes),void 0!==t.scalar&&(this.scalar=t.scalar),void 0!==t.zIndex&&(this.zIndex=t.zIndex),void 0!==t.disableForReducedMotion&&(this.disableForReducedMotion=t.disableForReducedMotion)}}var i=q(619),a=q(163),s=q(501),r=q(686),o=q(290),n=q(2);var l=q(345),c=q(68),p=q(12),d=q(885),u=q(84),h=q(82),y=q(907),v=q(734);class f{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=(0,e.setRangeValue)(t.speed)),void 0!==t.decay&&(this.decay=(0,e.setRangeValue)(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class w extends e.ValueWithRandom{constructor(){super(),this.animation=new f,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(t){const i=t.options.rotate;if(!i)return;t.rotate={enable:i.animation.enable,value:(0,e.getRangeValue)(i.value)*Math.PI/180},t.pathRotation=i.path;let a=i.direction;if("random"===a){a=Math.floor(2*(0,e.getRandom)())>0?"counter-clockwise":"clockwise"}switch(a){case"counter-clockwise":case"counterClockwise":t.rotate.status="decreasing";break;case"clockwise":t.rotate.status="increasing"}const s=i.animation;s.enable&&(t.rotate.decay=1-(0,e.getRangeValue)(s.decay),t.rotate.velocity=(0,e.getRangeValue)(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.rotate.velocity*=(0,e.getRandom)())),t.rotation=t.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 w);for(const i of t)e.rotate.load(i?.rotate)}update(e,t){this.isEnabled(e)&&(!function(e,t){const i=e.rotate,a=e.options.rotate;if(!i||!a)return;const s=a.animation,r=(i.velocity??0)*t.factor,o=2*Math.PI,n=i.decay??1;s.enable&&("increasing"===i.status?(i.value+=r,i.value>o&&(i.value-=o)):(i.value-=r,i.value<0&&(i.value+=o)),i.velocity&&1!==n&&(i.velocity*=n))}(e,t),e.rotation=e.rotate?.value??0)}}var g=q(652),x=q(960),b=q(727),R=q(448),M=q(83);let P=!1,k=!1;const z=new Map;async function O(e){if(!P){if(k)return new Promise((e=>{const t=setInterval((()=>{P&&(clearInterval(t),e())}),100)}));k=!0,await(0,c.loadEmittersPlugin)(e,!1),await(0,h.loadMotionPlugin)(e,!1),await(0,l.loadCardsShape)(e,!1),await(0,p.loadHeartShape)(e,!1),await(0,d.loadImageShape)(e,!1),await(0,y.loadPolygonShape)(e,!1),await(0,g.loadSquareShape)(e,!1),await(0,x.loadStarShape)(e,!1),await(0,b.loadTextShape)(e,!1),await async function(e,t=!0){await e.addParticleUpdater("rotate",(e=>new m(e)),t)}(e,!1),await(0,u.loadLifeUpdater)(e,!1),await(0,v.loadRollUpdater)(e,!1),await(0,R.loadTiltUpdater)(e,!1),await(0,M.loadWobbleUpdater)(e,!1),await async function(e,t=!0){await(0,i.loadBaseMover)(e,!1),await(0,a.loadCircleShape)(e,!1),await(0,s.loadColorUpdater)(e,!1),await(0,r.loadOpacityUpdater)(e,!1),await(0,o.loadOutModesUpdater)(e,!1),await(0,n.loadSizeUpdater)(e,!1),await e.refresh(t)}(e),k=!1,P=!0}}async function V(i){const a=new t;let s;a.load(i.options);const r=1e3*a.ticks/432e3;if(z.has(i.id)&&(s=z.get(i.id),s&&!s.destroyed)){const e=s;if(e.addEmitter)return void e.addEmitter({startCount:a.count,position:a.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{color:{value:a.colors},shape:{type:a.shapes,options:a.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:r,startValue:"max",destroy:"min"}},size:{value:5*a.scalar},move:{angle:{value:a.spread,offset:0},drift:{min:-a.drift,max:a.drift},gravity:{acceleration:9.81*a.gravity},speed:3*a.startVelocity,decay:1-a.decay,direction:-a.angle}}})}const o={fullScreen:{enable:!i.canvas,zIndex:a.zIndex},fpsLimit:120,particles:{number:{value:0},color:{value:a.colors},shape:{type:a.shapes,options:a.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:r,startValue:"max",destroy:"min"}},size:{value:5*a.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:a.spread,offset:0},drift:{min:-a.drift,max:a.drift},enable:!0,gravity:{enable:!0,acceleration:9.81*a.gravity},speed:3*a.startVelocity,decay:1-a.decay,direction:-a.angle,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:a.disableForReducedMotion},emitters:{name:"confetti",startCount:a.count,position:a.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}};return s=await e.tsParticles.load({id:i.id,element:i.canvas,options:o}),z.set(i.id,s),s}async function I(t,i){let a,s;return await O(e.tsParticles),(0,e.isString)(t)?(s=t,a=i??{}):(s="confetti",a=t),V({id:s,options:a})}I.create=async(t,i)=>{if(!t)return I;await O(e.tsParticles);const a=t.getAttribute("id")||"confetti";return t.setAttribute("id",a),async(s,r)=>{let o,n;return(0,e.isString)(s)?(n=s,o=r??i):(n=a,o=s),V({id:n,canvas:t,options:o})}},I.version=e.tsParticles.version,(0,e.isSsr)()||(window.confetti=I)})(),S})()));
2
+ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/shape-cards"),require("@tsparticles/plugin-emitters"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/shape-text"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/basic","@tsparticles/shape-cards","@tsparticles/plugin-emitters","@tsparticles/shape-heart","@tsparticles/shape-image","@tsparticles/updater-life","@tsparticles/plugin-motion","@tsparticles/shape-polygon","@tsparticles/updater-roll","@tsparticles/updater-rotate","@tsparticles/shape-square","@tsparticles/shape-star","@tsparticles/shape-text","@tsparticles/updater-tilt","@tsparticles/updater-wobble"],e);else{var i="object"==typeof exports?e(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/shape-cards"),require("@tsparticles/plugin-emitters"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/shape-text"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble")):e(t.window,t.window,t.window,t.window,t.window,t.window,t.window,t.window,t.window,t.window,t.window,t.window,t.window,t.window,t.window,t.window);for(var a in i)("object"==typeof exports?exports:t)[a]=i[a]}}(this,((t,e,i,a,s,r,o,n,l,p,d,c,u,h,f,y)=>(()=>{"use strict";var v={574:t=>{t.exports=e},533:e=>{e.exports=t},68:t=>{t.exports=a},82:t=>{t.exports=n},686:t=>{t.exports=i},12:t=>{t.exports=s},885:t=>{t.exports=r},907:t=>{t.exports=l},652:t=>{t.exports=c},960:t=>{t.exports=u},727:t=>{t.exports=h},84:t=>{t.exports=o},734:t=>{t.exports=p},59:t=>{t.exports=d},448:t=>{t.exports=f},83:t=>{t.exports=y}},w={};function m(t){var e=w[t];if(void 0!==e)return e.exports;var i=w[t]={exports:{}};return v[t](i,i.exports,m),i.exports}m.d=(t,e)=>{for(var i in e)m.o(e,i)&&!m.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},m.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),m.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var x={};return(()=>{m.r(x),m.d(x,{confetti:()=>P});var t=m(533);class e{constructor(){this.angle=90,this.count=50,this.spread=45,this.startVelocity=45,this.decay=.9,this.gravity=1,this.drift=0,this.ticks=200,this.position={x:50,y:50},this.colors=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],this.shapes=["square","circle"],this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0,this.flat=!1,this.shapeOptions={}}get origin(){return{x:this.position.x/100,y:this.position.y/100}}set origin(t){this.position.x=100*t.x,this.position.y=100*t.y}get particleCount(){return this.count}set particleCount(t){this.count=t}load(e){if(!e)return;void 0!==e.angle&&(this.angle=e.angle);const i=e.count??e.particleCount;void 0!==i&&(this.count=i),void 0!==e.spread&&(this.spread=e.spread),void 0!==e.startVelocity&&(this.startVelocity=e.startVelocity),void 0!==e.decay&&(this.decay=e.decay),void 0!==e.flat&&(this.flat=e.flat),void 0!==e.gravity&&(this.gravity=e.gravity),void 0!==e.drift&&(this.drift=e.drift),void 0!==e.ticks&&(this.ticks=e.ticks);const a=e.origin;a&&!e.position&&(e.position={x:void 0!==a.x?100*a.x:void 0,y:void 0!==a.y?100*a.y:void 0});const s=e.position;s&&(void 0!==s.x&&(this.position.x=s.x),void 0!==s.y&&(this.position.y=s.y)),void 0!==e.colors&&((0,t.isArray)(e.colors)?this.colors=[...e.colors]:this.colors=e.colors);const r=e.shapeOptions;if(void 0!==r)for(const e in r){const i=r[e];i&&(this.shapeOptions[e]=(0,t.deepExtend)(this.shapeOptions[e]??{},i))}void 0!==e.shapes&&((0,t.isArray)(e.shapes)?this.shapes=[...e.shapes]:this.shapes=e.shapes),void 0!==e.scalar&&(this.scalar=e.scalar),void 0!==e.zIndex&&(this.zIndex=e.zIndex),void 0!==e.disableForReducedMotion&&(this.disableForReducedMotion=e.disableForReducedMotion)}}var i=m(574),a=m(686),s=m(68),r=m(12),o=m(885),n=m(84),l=m(82),p=m(907),d=m(734),c=m(59),u=m(652),h=m(960),f=m(727),y=m(448),v=m(83);let w=!1,g=!1;const b=new Map;async function q(t){if(!w){if(g)return new Promise((t=>{const e=setInterval((()=>{w&&(clearInterval(e),t())}),100)}));g=!0,await(0,s.loadEmittersPlugin)(t,!1),await(0,l.loadMotionPlugin)(t,!1),await(0,a.loadCardsShape)(t,!1),await(0,r.loadHeartShape)(t,!1),await(0,o.loadImageShape)(t,!1),await(0,p.loadPolygonShape)(t,!1),await(0,u.loadSquareShape)(t,!1),await(0,h.loadStarShape)(t,!1),await(0,f.loadTextShape)(t,!1),await(0,c.loadRotateUpdater)(t,!1),await(0,n.loadLifeUpdater)(t,!1),await(0,d.loadRollUpdater)(t,!1),await(0,y.loadTiltUpdater)(t,!1),await(0,v.loadWobbleUpdater)(t,!1),await(0,i.loadBasic)(t),g=!1,w=!0}}async function S(i){const a=new e;let s;a.load(i.options);const r=1e3*a.ticks/432e3;if(b.has(i.id)&&(s=b.get(i.id),s&&!s.destroyed)){const t=s;if(t.addEmitter)return void t.addEmitter({startCount:a.count,position:a.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{color:{value:a.colors},shape:{type:a.shapes,options:a.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:r,startValue:"max",destroy:"min"}},size:{value:5*a.scalar},move:{angle:{value:a.spread,offset:0},drift:{min:-a.drift,max:a.drift},gravity:{acceleration:9.81*a.gravity},speed:3*a.startVelocity,decay:1-a.decay,direction:-a.angle}}})}const o={fullScreen:{enable:!i.canvas,zIndex:a.zIndex},fpsLimit:120,particles:{number:{value:0},color:{value:a.colors},shape:{type:a.shapes,options:a.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:r,startValue:"max",destroy:"min"}},size:{value:5*a.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:a.spread,offset:0},drift:{min:-a.drift,max:a.drift},enable:!0,gravity:{enable:!0,acceleration:9.81*a.gravity},speed:3*a.startVelocity,decay:1-a.decay,direction:-a.angle,random:!0,straight:!1,outModes:{default:"none",bottom:"destroy"}},rotate:{value:a.flat?0:{min:0,max:360},direction:"random",animation:{enable:a.flat,speed:60}},tilt:{direction:"random",enable:a.flat,value:a.flat?0:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:a.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:a.flat,speed:{min:-15,max:15}}},detectRetina:!0,motion:{disable:a.disableForReducedMotion},emitters:{name:"confetti",startCount:a.count,position:a.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}};return s=await t.tsParticles.load({id:i.id,element:i.canvas,options:o}),b.set(i.id,s),s}async function P(e,i){let a,s;return await q(t.tsParticles),(0,t.isString)(e)?(s=e,a=i??{}):(s="confetti",a=e),S({id:s,options:a})}P.create=async(e,i)=>{if(!e)return P;await q(t.tsParticles);const a=e.getAttribute("id")||"confetti";return e.setAttribute("id",a),async(s,r)=>{let o,n;return(0,t.isString)(s)?(n=s,o=r??i):(n=a,o=s),S({id:n,canvas:e,options:o})}},P.version=t.tsParticles.version,(0,t.isSsr)()||(window.confetti=P)})(),x})()));
@@ -1 +1 @@
1
- /*! tsParticles Confetti v3.0.0-beta.2 by Matteo Bruni */
1
+ /*! tsParticles Confetti v3.0.0-beta.4 by Matteo Bruni */
@@ -7,6 +7,7 @@ export declare class ConfettiOptions implements IConfettiOptions, IOptionLoader<
7
7
  decay: number;
8
8
  disableForReducedMotion: boolean;
9
9
  drift: number;
10
+ flat: boolean;
10
11
  gravity: number;
11
12
  position: ICoordinates;
12
13
  scalar: number;
@@ -6,6 +6,7 @@ export interface IConfettiOptions {
6
6
  decay: number;
7
7
  disableForReducedMotion: boolean;
8
8
  drift: number;
9
+ flat: boolean;
9
10
  gravity: number;
10
11
  origin: ICoordinates;
11
12
  particleCount: number;
@@ -30,6 +30,7 @@
30
30
  this.scalar = 1;
31
31
  this.zIndex = 100;
32
32
  this.disableForReducedMotion = true;
33
+ this.flat = false;
33
34
  this.shapeOptions = {};
34
35
  }
35
36
  get origin() {
@@ -68,6 +69,9 @@
68
69
  if (data.decay !== undefined) {
69
70
  this.decay = data.decay;
70
71
  }
72
+ if (data.flat !== undefined) {
73
+ this.flat = data.flat;
74
+ }
71
75
  if (data.gravity !== undefined) {
72
76
  this.gravity = data.gravity;
73
77
  }
package/umd/confetti.js CHANGED
@@ -196,23 +196,27 @@
196
196
  },
197
197
  },
198
198
  rotate: {
199
- value: {
200
- min: 0,
201
- max: 360,
202
- },
199
+ value: actualOptions.flat
200
+ ? 0
201
+ : {
202
+ min: 0,
203
+ max: 360,
204
+ },
203
205
  direction: "random",
204
206
  animation: {
205
- enable: true,
207
+ enable: actualOptions.flat,
206
208
  speed: 60,
207
209
  },
208
210
  },
209
211
  tilt: {
210
212
  direction: "random",
211
- enable: true,
212
- value: {
213
- min: 0,
214
- max: 360,
215
- },
213
+ enable: actualOptions.flat,
214
+ value: actualOptions.flat
215
+ ? 0
216
+ : {
217
+ min: 0,
218
+ max: 360,
219
+ },
216
220
  animation: {
217
221
  enable: true,
218
222
  speed: 60,
@@ -223,7 +227,7 @@
223
227
  enable: true,
224
228
  value: 25,
225
229
  },
226
- enable: true,
230
+ enable: actualOptions.flat,
227
231
  speed: {
228
232
  min: 15,
229
233
  max: 25,
@@ -231,7 +235,7 @@
231
235
  },
232
236
  wobble: {
233
237
  distance: 30,
234
- enable: true,
238
+ enable: actualOptions.flat,
235
239
  speed: {
236
240
  min: -15,
237
241
  max: 15,