@tsparticles/fireworks 3.1.0 → 3.2.1

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.
Files changed (136) hide show
  1. package/108.min.js +2 -0
  2. package/108.min.js.LICENSE.txt +1 -0
  3. package/120.min.js +2 -0
  4. package/120.min.js.LICENSE.txt +1 -0
  5. package/126.min.js +2 -0
  6. package/126.min.js.LICENSE.txt +1 -0
  7. package/132.min.js +2 -0
  8. package/132.min.js.LICENSE.txt +1 -0
  9. package/141.min.js +2 -0
  10. package/141.min.js.LICENSE.txt +1 -0
  11. package/163.min.js +2 -0
  12. package/163.min.js.LICENSE.txt +1 -0
  13. package/173.min.js +2 -0
  14. package/173.min.js.LICENSE.txt +1 -0
  15. package/196.min.js +2 -0
  16. package/196.min.js.LICENSE.txt +1 -0
  17. package/245.min.js +2 -0
  18. package/245.min.js.LICENSE.txt +1 -0
  19. package/274.min.js +2 -0
  20. package/274.min.js.LICENSE.txt +1 -0
  21. package/30.min.js +2 -0
  22. package/30.min.js.LICENSE.txt +1 -0
  23. package/308.min.js +2 -0
  24. package/308.min.js.LICENSE.txt +1 -0
  25. package/31.min.js +2 -0
  26. package/31.min.js.LICENSE.txt +1 -0
  27. package/328.min.js +2 -0
  28. package/328.min.js.LICENSE.txt +1 -0
  29. package/329.min.js +2 -0
  30. package/329.min.js.LICENSE.txt +1 -0
  31. package/376.min.js +2 -0
  32. package/376.min.js.LICENSE.txt +1 -0
  33. package/468.min.js +2 -0
  34. package/468.min.js.LICENSE.txt +1 -0
  35. package/49.min.js +2 -0
  36. package/49.min.js.LICENSE.txt +1 -0
  37. package/547.min.js +2 -0
  38. package/547.min.js.LICENSE.txt +1 -0
  39. package/560.min.js +2 -0
  40. package/560.min.js.LICENSE.txt +1 -0
  41. package/580.min.js +2 -0
  42. package/580.min.js.LICENSE.txt +1 -0
  43. package/610.min.js +2 -0
  44. package/610.min.js.LICENSE.txt +1 -0
  45. package/647.min.js +2 -0
  46. package/647.min.js.LICENSE.txt +1 -0
  47. package/648.min.js +2 -0
  48. package/648.min.js.LICENSE.txt +1 -0
  49. package/720.min.js +2 -0
  50. package/720.min.js.LICENSE.txt +1 -0
  51. package/725.min.js +2 -0
  52. package/725.min.js.LICENSE.txt +1 -0
  53. package/749.min.js +2 -0
  54. package/749.min.js.LICENSE.txt +1 -0
  55. package/757.min.js +2 -0
  56. package/757.min.js.LICENSE.txt +1 -0
  57. package/81.min.js +2 -0
  58. package/81.min.js.LICENSE.txt +1 -0
  59. package/835.min.js +2 -0
  60. package/835.min.js.LICENSE.txt +1 -0
  61. package/837.min.js +2 -0
  62. package/837.min.js.LICENSE.txt +1 -0
  63. package/859.min.js +2 -0
  64. package/859.min.js.LICENSE.txt +1 -0
  65. package/866.min.js +2 -0
  66. package/866.min.js.LICENSE.txt +1 -0
  67. package/88.min.js +2 -0
  68. package/88.min.js.LICENSE.txt +1 -0
  69. package/886.min.js +2 -0
  70. package/886.min.js.LICENSE.txt +1 -0
  71. package/921.min.js +2 -0
  72. package/921.min.js.LICENSE.txt +1 -0
  73. package/929.min.js +2 -0
  74. package/929.min.js.LICENSE.txt +1 -0
  75. package/937.min.js +2 -0
  76. package/937.min.js.LICENSE.txt +1 -0
  77. package/952.min.js +2 -0
  78. package/952.min.js.LICENSE.txt +1 -0
  79. package/973.min.js +2 -0
  80. package/973.min.js.LICENSE.txt +1 -0
  81. package/994.min.js +2 -0
  82. package/994.min.js.LICENSE.txt +1 -0
  83. package/basic_dist_browser_index_js.js +30 -0
  84. package/browser/fireworks.js +1 -8
  85. package/cjs/fireworks.js +32 -16
  86. package/effects_trail_dist_browser_TrailDrawer_js.js +30 -0
  87. package/effects_trail_dist_browser_index_js.js +30 -0
  88. package/engine_dist_browser_Core_Container_js.js +90 -0
  89. package/engine_dist_browser_Core_Particle_js.js +30 -0
  90. package/esm/fireworks.js +1 -8
  91. package/move_base_dist_browser_BaseMover_js.js +30 -0
  92. package/move_base_dist_browser_Utils_js.js +30 -0
  93. package/move_base_dist_browser_index_js.js +30 -0
  94. package/package.json +10 -10
  95. package/plugins_emittersShapes_square_dist_browser_EmittersSquareShapeGenerator_js.js +120 -0
  96. package/plugins_emittersShapes_square_dist_browser_index_js.js +30 -0
  97. package/plugins_emitters_dist_browser_EmitterInstance_js.js +30 -0
  98. package/plugins_emitters_dist_browser_EmittersPlugin_js.js +90 -0
  99. package/plugins_emitters_dist_browser_Emitters_js.js +30 -0
  100. package/plugins_emitters_dist_browser_ShapeManager_js.js +30 -0
  101. package/plugins_emitters_dist_browser_index_js.js +100 -0
  102. package/plugins_sounds_dist_browser_SoundsInstance_js.js +30 -0
  103. package/plugins_sounds_dist_browser_SoundsPlugin_js.js +120 -0
  104. package/plugins_sounds_dist_browser_index_js.js +30 -0
  105. package/report.html +3 -3
  106. package/shapes_circle_dist_browser_CircleDrawer_js.js +30 -0
  107. package/shapes_circle_dist_browser_Utils_js.js +30 -0
  108. package/shapes_circle_dist_browser_index_js.js +30 -0
  109. package/tsparticles.fireworks.bundle.js +2141 -9178
  110. package/tsparticles.fireworks.bundle.min.js +1 -1
  111. package/tsparticles.fireworks.bundle.min.js.LICENSE.txt +1 -1
  112. package/tsparticles.fireworks.js +136 -396
  113. package/tsparticles.fireworks.min.js +1 -1
  114. package/tsparticles.fireworks.min.js.LICENSE.txt +1 -1
  115. package/types/fireworks.d.ts +1 -1
  116. package/umd/fireworks.js +34 -17
  117. package/updaters_color_dist_browser_ColorUpdater_js.js +30 -0
  118. package/updaters_color_dist_browser_index_js.js +30 -0
  119. package/updaters_destroy_dist_browser_DestroyUpdater_js.js +90 -0
  120. package/updaters_destroy_dist_browser_index_js.js +30 -0
  121. package/updaters_life_dist_browser_LifeUpdater_js.js +60 -0
  122. package/updaters_life_dist_browser_Utils_js.js +30 -0
  123. package/updaters_life_dist_browser_index_js.js +30 -0
  124. package/updaters_opacity_dist_browser_OpacityUpdater_js.js +30 -0
  125. package/updaters_opacity_dist_browser_index_js.js +30 -0
  126. package/updaters_outModes_dist_browser_BounceOutMode_js.js +30 -0
  127. package/updaters_outModes_dist_browser_DestroyOutMode_js.js +30 -0
  128. package/updaters_outModes_dist_browser_NoneOutMode_js.js +30 -0
  129. package/updaters_outModes_dist_browser_OutOfCanvasUpdater_js.js +30 -0
  130. package/updaters_outModes_dist_browser_OutOutMode_js.js +30 -0
  131. package/updaters_outModes_dist_browser_Utils_js.js +30 -0
  132. package/updaters_outModes_dist_browser_index_js.js +30 -0
  133. package/updaters_rotate_dist_browser_RotateUpdater_js.js +50 -0
  134. package/updaters_rotate_dist_browser_index_js.js +30 -0
  135. package/updaters_size_dist_browser_SizeUpdater_js.js +30 -0
  136. package/updaters_size_dist_browser_index_js.js +30 -0
@@ -4,82 +4,147 @@
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.1.0
7
+ * v3.2.1
8
+ */
9
+ /*
10
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
11
+ * This devtool is neither made for production nor for readable output files.
12
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
13
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
14
+ * or disable the default devtool with "devtool: false".
15
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8
16
  */
9
17
  (function webpackUniversalModuleDefinition(root, factory) {
10
18
  if(typeof exports === 'object' && typeof module === 'object')
11
- module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/updater-life"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/effect-trail"));
19
+ module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/effect-trail"), require("@tsparticles/updater-life"), require("@tsparticles/updater-destroy"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/plugin-emitters"));
12
20
  else if(typeof define === 'function' && define.amd)
13
- define(["@tsparticles/engine", "@tsparticles/basic", "@tsparticles/updater-destroy", "@tsparticles/plugin-emitters", "@tsparticles/plugin-emitters-shape-square", "@tsparticles/updater-life", "@tsparticles/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/effect-trail"], factory);
21
+ define(["@tsparticles/engine", "@tsparticles/basic", "@tsparticles/effect-trail", "@tsparticles/updater-life", "@tsparticles/updater-destroy", "@tsparticles/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/plugin-emitters-shape-square", "@tsparticles/plugin-emitters"], factory);
14
22
  else {
15
- var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/updater-life"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/effect-trail")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
23
+ var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/effect-trail"), require("@tsparticles/updater-life"), require("@tsparticles/updater-destroy"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/plugin-emitters")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
16
24
  for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
17
25
  }
18
- })(this, (__WEBPACK_EXTERNAL_MODULE__533__, __WEBPACK_EXTERNAL_MODULE__574__, __WEBPACK_EXTERNAL_MODULE__344__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__59__, __WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__4__) => {
26
+ })(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__, __WEBPACK_EXTERNAL_MODULE__tsparticles_basic__, __WEBPACK_EXTERNAL_MODULE__tsparticles_effect_trail__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_life__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_destroy__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_rotate__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_sounds__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters_shape_square__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters__) => {
19
27
  return /******/ (() => { // webpackBootstrap
20
28
  /******/ "use strict";
21
29
  /******/ var __webpack_modules__ = ({
22
30
 
23
- /***/ 574:
31
+ /***/ "./dist/browser/FireworkOptions.js":
32
+ /*!*****************************************!*\
33
+ !*** ./dist/browser/FireworkOptions.js ***!
34
+ \*****************************************/
35
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
36
+
37
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FireworkOptions: () => (/* binding */ FireworkOptions)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass FireworkOptions {\n constructor() {\n this.background = \"none\";\n this.brightness = {\n min: -30,\n max: 30\n };\n this.colors = [\"#ff595e\", \"#ffca3a\", \"#8ac926\", \"#1982c4\", \"#6a4c93\"];\n this.gravity = 5;\n this.minHeight = {\n min: 10,\n max: 30\n };\n this.rate = 10;\n this.saturation = {\n min: -30,\n max: 30\n };\n this.sounds = true;\n this.speed = {\n min: 5,\n max: 15\n };\n this.splitCount = {\n min: 75,\n max: 150\n };\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.background !== undefined) {\n this.background = data.background;\n }\n if (data.colors !== undefined) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isArray)(data.colors)) {\n this.colors = [...data.colors];\n } else {\n this.colors = data.colors;\n }\n }\n if (data.brightness !== undefined) {\n this.brightness = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.brightness);\n }\n if (data.gravity !== undefined) {\n this.gravity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.gravity);\n }\n if (data.minHeight !== undefined) {\n this.minHeight = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.minHeight);\n }\n if (data.rate !== undefined) {\n this.rate = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.rate);\n }\n if (data.saturation !== undefined) {\n this.saturation = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.saturation);\n }\n if (data.sounds !== undefined) {\n this.sounds = data.sounds;\n }\n if (data.speed !== undefined) {\n this.speed = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.speed);\n }\n if (data.splitCount !== undefined) {\n this.splitCount = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.splitCount);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/./dist/browser/FireworkOptions.js?");
38
+
39
+ /***/ }),
40
+
41
+ /***/ "./dist/browser/fireworks.js":
42
+ /*!***********************************!*\
43
+ !*** ./dist/browser/fireworks.js ***!
44
+ \***********************************/
45
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
46
+
47
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fireworks: () => (/* binding */ fireworks)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FireworkOptions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FireworkOptions.js */ \"./dist/browser/FireworkOptions.js\");\n\n\nconst minSplitCount = 2;\nlet initialized = false;\nlet initializing = false;\nconst explodeSoundCheck = args => {\n const data = args.data;\n return data.particle.shape === \"circle\" && !!data.particle.splitCount && data.particle.splitCount < minSplitCount;\n};\nclass FireworksInstance {\n constructor(container) {\n this._container = container;\n }\n pause() {\n this._container.pause();\n }\n play() {\n this._container.play();\n }\n stop() {\n this._container.stop();\n }\n}\nasync function initPlugins() {\n if (initialized) {\n return;\n }\n if (initializing) {\n return new Promise(resolve => {\n const timeout = 100,\n interval = setInterval(() => {\n if (!initialized) {\n return;\n }\n clearInterval(interval);\n resolve();\n }, timeout);\n });\n }\n initializing = true;\n const {\n loadEmittersPlugin\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-emitters */ \"@tsparticles/plugin-emitters\", 23)),\n {\n loadEmittersShapeSquare\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-emitters-shape-square */ \"@tsparticles/plugin-emitters-shape-square\", 23)),\n {\n loadSoundsPlugin\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-sounds */ \"@tsparticles/plugin-sounds\", 23)),\n {\n loadRotateUpdater\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-rotate */ \"@tsparticles/updater-rotate\", 23)),\n {\n loadDestroyUpdater\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-destroy */ \"@tsparticles/updater-destroy\", 23)),\n {\n loadLifeUpdater\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-life */ \"@tsparticles/updater-life\", 23)),\n {\n loadTrailEffect\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/effect-trail */ \"@tsparticles/effect-trail\", 23)),\n {\n loadBasic\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/basic */ \"@tsparticles/basic\", 23));\n await loadEmittersPlugin(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadEmittersShapeSquare(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadSoundsPlugin(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadRotateUpdater(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadDestroyUpdater(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadLifeUpdater(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadTrailEffect(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadBasic(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n initializing = false;\n initialized = true;\n}\nasync function fireworks(idOrOptions, sourceOptions) {\n await initPlugins();\n let id;\n const options = new _FireworkOptions_js__WEBPACK_IMPORTED_MODULE_1__.FireworkOptions();\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isString)(idOrOptions)) {\n id = idOrOptions;\n options.load(sourceOptions);\n } else {\n id = \"fireworks\";\n options.load(idOrOptions);\n }\n const identity = 1,\n particlesOptions = {\n detectRetina: true,\n background: {\n color: options.background\n },\n fpsLimit: 60,\n emitters: {\n direction: \"top\",\n life: {\n count: 0,\n duration: 0.1,\n delay: 0.1\n },\n rate: {\n delay: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNumber)(options.rate) ? identity / options.rate : {\n min: identity / (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeMin)(options.rate),\n max: identity / (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeMax)(options.rate)\n },\n quantity: 1\n },\n size: {\n width: 100,\n height: 0\n },\n position: {\n y: 100,\n x: 50\n }\n },\n particles: {\n number: {\n value: 0\n },\n color: {\n value: \"#fff\"\n },\n destroy: {\n mode: \"split\",\n bounds: {\n top: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.minHeight)\n },\n split: {\n sizeOffset: false,\n count: 1,\n factor: {\n value: 0.333333\n },\n rate: {\n value: options.splitCount\n },\n colorOffset: {\n s: options.saturation,\n l: options.brightness\n },\n particles: {\n color: {\n value: options.colors\n },\n number: {\n value: 0\n },\n opacity: {\n value: {\n min: 0.1,\n max: 1\n },\n animation: {\n enable: true,\n speed: 1,\n sync: false,\n startValue: \"max\",\n destroy: \"min\"\n }\n },\n effect: {\n type: \"trail\",\n options: {\n trail: {\n length: {\n min: 5,\n max: 10\n }\n }\n }\n },\n shape: {\n type: \"circle\"\n },\n size: {\n value: {\n min: 1,\n max: 2\n },\n animation: {\n enable: true,\n speed: 5,\n count: 1,\n sync: false,\n startValue: \"min\",\n destroy: \"none\"\n }\n },\n life: {\n count: 1,\n duration: {\n value: {\n min: 0.25,\n max: 0.5\n }\n }\n },\n move: {\n decay: {\n min: 0.05,\n max: 0.1\n },\n enable: true,\n gravity: {\n enable: true,\n inverse: false,\n acceleration: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.gravity)\n },\n speed: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.speed),\n direction: \"none\",\n outModes: \"destroy\"\n }\n }\n }\n },\n life: {\n count: 1\n },\n effect: {\n type: \"trail\",\n options: {\n trail: {\n length: {\n min: 10,\n max: 30\n },\n minWidth: 1,\n maxWidth: 1\n }\n }\n },\n shape: {\n type: \"circle\"\n },\n size: {\n value: 1\n },\n opacity: {\n value: 0.5\n },\n rotate: {\n path: true\n },\n move: {\n enable: true,\n gravity: {\n acceleration: 15,\n enable: true,\n inverse: true,\n maxSpeed: 100\n },\n speed: {\n min: 10,\n max: 20\n },\n outModes: {\n default: \"destroy\",\n top: \"none\"\n }\n }\n },\n sounds: {\n enable: options.sounds,\n events: [{\n event: \"particleRemoved\",\n filter: explodeSoundCheck,\n audio: [\"https://particles.js.org/audio/explosion0.mp3\", \"https://particles.js.org/audio/explosion1.mp3\", \"https://particles.js.org/audio/explosion2.mp3\"]\n }],\n volume: 50\n }\n };\n const container = await _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles.load({\n id,\n options: particlesOptions\n });\n if (!container) {\n return;\n }\n return new FireworksInstance(container);\n}\nfireworks.version = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles.version;\nif (!(0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isSsr)()) {\n window.fireworks = fireworks;\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/./dist/browser/fireworks.js?");
48
+
49
+ /***/ }),
50
+
51
+ /***/ "./dist/browser/index.js":
52
+ /*!*******************************!*\
53
+ !*** ./dist/browser/index.js ***!
54
+ \*******************************/
55
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
56
+
57
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fireworks: () => (/* reexport safe */ _fireworks_js__WEBPACK_IMPORTED_MODULE_0__.fireworks)\n/* harmony export */ });\n/* harmony import */ var _fireworks_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fireworks.js */ \"./dist/browser/fireworks.js\");\n\n\n//# sourceURL=webpack://@tsparticles/fireworks/./dist/browser/index.js?");
58
+
59
+ /***/ }),
60
+
61
+ /***/ "@tsparticles/basic":
62
+ /*!******************************************************************************************************************************!*\
63
+ !*** external {"commonjs":"@tsparticles/basic","commonjs2":"@tsparticles/basic","amd":"@tsparticles/basic","root":"window"} ***!
64
+ \******************************************************************************************************************************/
24
65
  /***/ ((module) => {
25
66
 
26
- module.exports = __WEBPACK_EXTERNAL_MODULE__574__;
67
+ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_basic__;
27
68
 
28
69
  /***/ }),
29
70
 
30
- /***/ 4:
71
+ /***/ "@tsparticles/effect-trail":
72
+ /*!***************************************************************************************************************************************************!*\
73
+ !*** external {"commonjs":"@tsparticles/effect-trail","commonjs2":"@tsparticles/effect-trail","amd":"@tsparticles/effect-trail","root":"window"} ***!
74
+ \***************************************************************************************************************************************************/
31
75
  /***/ ((module) => {
32
76
 
33
- module.exports = __WEBPACK_EXTERNAL_MODULE__4__;
77
+ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_effect_trail__;
34
78
 
35
79
  /***/ }),
36
80
 
37
- /***/ 533:
81
+ /***/ "@tsparticles/engine":
82
+ /*!*********************************************************************************************************************************!*\
83
+ !*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
84
+ \*********************************************************************************************************************************/
38
85
  /***/ ((module) => {
39
86
 
40
- module.exports = __WEBPACK_EXTERNAL_MODULE__533__;
87
+ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
41
88
 
42
89
  /***/ }),
43
90
 
44
- /***/ 68:
91
+ /***/ "@tsparticles/plugin-emitters":
92
+ /*!************************************************************************************************************************************************************!*\
93
+ !*** external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"} ***!
94
+ \************************************************************************************************************************************************************/
45
95
  /***/ ((module) => {
46
96
 
47
- module.exports = __WEBPACK_EXTERNAL_MODULE__68__;
97
+ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters__;
48
98
 
49
99
  /***/ }),
50
100
 
51
- /***/ 787:
101
+ /***/ "@tsparticles/plugin-emitters-shape-square":
102
+ /*!***************************************************************************************************************************************************************************************************!*\
103
+ !*** external {"commonjs":"@tsparticles/plugin-emitters-shape-square","commonjs2":"@tsparticles/plugin-emitters-shape-square","amd":"@tsparticles/plugin-emitters-shape-square","root":"window"} ***!
104
+ \***************************************************************************************************************************************************************************************************/
52
105
  /***/ ((module) => {
53
106
 
54
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
107
+ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters_shape_square__;
55
108
 
56
109
  /***/ }),
57
110
 
58
- /***/ 490:
111
+ /***/ "@tsparticles/plugin-sounds":
112
+ /*!******************************************************************************************************************************************************!*\
113
+ !*** external {"commonjs":"@tsparticles/plugin-sounds","commonjs2":"@tsparticles/plugin-sounds","amd":"@tsparticles/plugin-sounds","root":"window"} ***!
114
+ \******************************************************************************************************************************************************/
59
115
  /***/ ((module) => {
60
116
 
61
- module.exports = __WEBPACK_EXTERNAL_MODULE__490__;
117
+ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_sounds__;
62
118
 
63
119
  /***/ }),
64
120
 
65
- /***/ 344:
121
+ /***/ "@tsparticles/updater-destroy":
122
+ /*!************************************************************************************************************************************************************!*\
123
+ !*** external {"commonjs":"@tsparticles/updater-destroy","commonjs2":"@tsparticles/updater-destroy","amd":"@tsparticles/updater-destroy","root":"window"} ***!
124
+ \************************************************************************************************************************************************************/
66
125
  /***/ ((module) => {
67
126
 
68
- module.exports = __WEBPACK_EXTERNAL_MODULE__344__;
127
+ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_destroy__;
69
128
 
70
129
  /***/ }),
71
130
 
72
- /***/ 84:
131
+ /***/ "@tsparticles/updater-life":
132
+ /*!***************************************************************************************************************************************************!*\
133
+ !*** external {"commonjs":"@tsparticles/updater-life","commonjs2":"@tsparticles/updater-life","amd":"@tsparticles/updater-life","root":"window"} ***!
134
+ \***************************************************************************************************************************************************/
73
135
  /***/ ((module) => {
74
136
 
75
- module.exports = __WEBPACK_EXTERNAL_MODULE__84__;
137
+ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_life__;
76
138
 
77
139
  /***/ }),
78
140
 
79
- /***/ 59:
141
+ /***/ "@tsparticles/updater-rotate":
142
+ /*!*********************************************************************************************************************************************************!*\
143
+ !*** external {"commonjs":"@tsparticles/updater-rotate","commonjs2":"@tsparticles/updater-rotate","amd":"@tsparticles/updater-rotate","root":"window"} ***!
144
+ \*********************************************************************************************************************************************************/
80
145
  /***/ ((module) => {
81
146
 
82
- module.exports = __WEBPACK_EXTERNAL_MODULE__59__;
147
+ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_rotate__;
83
148
 
84
149
  /***/ })
85
150
 
@@ -110,6 +175,48 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__59__;
110
175
  /******/ }
111
176
  /******/
112
177
  /************************************************************************/
178
+ /******/ /* webpack/runtime/compat get default export */
179
+ /******/ (() => {
180
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
181
+ /******/ __webpack_require__.n = (module) => {
182
+ /******/ var getter = module && module.__esModule ?
183
+ /******/ () => (module['default']) :
184
+ /******/ () => (module);
185
+ /******/ __webpack_require__.d(getter, { a: getter });
186
+ /******/ return getter;
187
+ /******/ };
188
+ /******/ })();
189
+ /******/
190
+ /******/ /* webpack/runtime/create fake namespace object */
191
+ /******/ (() => {
192
+ /******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
193
+ /******/ var leafPrototypes;
194
+ /******/ // create a fake namespace object
195
+ /******/ // mode & 1: value is a module id, require it
196
+ /******/ // mode & 2: merge all properties of value into the ns
197
+ /******/ // mode & 4: return value when already ns object
198
+ /******/ // mode & 16: return value when it's Promise-like
199
+ /******/ // mode & 8|1: behave like require
200
+ /******/ __webpack_require__.t = function(value, mode) {
201
+ /******/ if(mode & 1) value = this(value);
202
+ /******/ if(mode & 8) return value;
203
+ /******/ if(typeof value === 'object' && value) {
204
+ /******/ if((mode & 4) && value.__esModule) return value;
205
+ /******/ if((mode & 16) && typeof value.then === 'function') return value;
206
+ /******/ }
207
+ /******/ var ns = Object.create(null);
208
+ /******/ __webpack_require__.r(ns);
209
+ /******/ var def = {};
210
+ /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
211
+ /******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
212
+ /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
213
+ /******/ }
214
+ /******/ def['default'] = () => (value);
215
+ /******/ __webpack_require__.d(ns, def);
216
+ /******/ return ns;
217
+ /******/ };
218
+ /******/ })();
219
+ /******/
113
220
  /******/ /* webpack/runtime/define property getters */
114
221
  /******/ (() => {
115
222
  /******/ // define getter functions for harmony exports
@@ -139,379 +246,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__59__;
139
246
  /******/ })();
140
247
  /******/
141
248
  /************************************************************************/
142
- var __webpack_exports__ = {};
143
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
144
- (() => {
145
- // ESM COMPAT FLAG
146
- __webpack_require__.r(__webpack_exports__);
147
-
148
- // EXPORTS
149
- __webpack_require__.d(__webpack_exports__, {
150
- fireworks: () => (/* reexport */ fireworks)
151
- });
152
-
153
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"}
154
- var engine_root_window_ = __webpack_require__(533);
155
- ;// CONCATENATED MODULE: ./dist/browser/FireworkOptions.js
156
-
157
- class FireworkOptions {
158
- constructor() {
159
- this.background = "none";
160
- this.brightness = {
161
- min: -30,
162
- max: 30
163
- };
164
- this.colors = ["#ff595e", "#ffca3a", "#8ac926", "#1982c4", "#6a4c93"];
165
- this.gravity = 5;
166
- this.minHeight = {
167
- min: 10,
168
- max: 30
169
- };
170
- this.rate = 10;
171
- this.saturation = {
172
- min: -30,
173
- max: 30
174
- };
175
- this.sounds = true;
176
- this.speed = {
177
- min: 5,
178
- max: 15
179
- };
180
- this.splitCount = {
181
- min: 75,
182
- max: 150
183
- };
184
- }
185
- load(data) {
186
- if (!data) {
187
- return;
188
- }
189
- if (data.background !== undefined) {
190
- this.background = data.background;
191
- }
192
- if (data.colors !== undefined) {
193
- if ((0,engine_root_window_.isArray)(data.colors)) {
194
- this.colors = [...data.colors];
195
- } else {
196
- this.colors = data.colors;
197
- }
198
- }
199
- if (data.brightness !== undefined) {
200
- this.brightness = (0,engine_root_window_.setRangeValue)(data.brightness);
201
- }
202
- if (data.gravity !== undefined) {
203
- this.gravity = (0,engine_root_window_.setRangeValue)(data.gravity);
204
- }
205
- if (data.minHeight !== undefined) {
206
- this.minHeight = (0,engine_root_window_.setRangeValue)(data.minHeight);
207
- }
208
- if (data.rate !== undefined) {
209
- this.rate = (0,engine_root_window_.setRangeValue)(data.rate);
210
- }
211
- if (data.saturation !== undefined) {
212
- this.saturation = (0,engine_root_window_.setRangeValue)(data.saturation);
213
- }
214
- if (data.sounds !== undefined) {
215
- this.sounds = data.sounds;
216
- }
217
- if (data.speed !== undefined) {
218
- this.speed = (0,engine_root_window_.setRangeValue)(data.speed);
219
- }
220
- if (data.splitCount !== undefined) {
221
- this.splitCount = (0,engine_root_window_.setRangeValue)(data.splitCount);
222
- }
223
- }
224
- }
225
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/basic","commonjs2":"@tsparticles/basic","amd":"@tsparticles/basic","root":"window"}
226
- var basic_root_window_ = __webpack_require__(574);
227
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-destroy","commonjs2":"@tsparticles/updater-destroy","amd":"@tsparticles/updater-destroy","root":"window"}
228
- var updater_destroy_root_window_ = __webpack_require__(344);
229
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"}
230
- var plugin_emitters_root_window_ = __webpack_require__(68);
231
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters-shape-square","commonjs2":"@tsparticles/plugin-emitters-shape-square","amd":"@tsparticles/plugin-emitters-shape-square","root":"window"}
232
- var plugin_emitters_shape_square_root_window_ = __webpack_require__(787);
233
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-life","commonjs2":"@tsparticles/updater-life","amd":"@tsparticles/updater-life","root":"window"}
234
- var updater_life_root_window_ = __webpack_require__(84);
235
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-rotate","commonjs2":"@tsparticles/updater-rotate","amd":"@tsparticles/updater-rotate","root":"window"}
236
- var updater_rotate_root_window_ = __webpack_require__(59);
237
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-sounds","commonjs2":"@tsparticles/plugin-sounds","amd":"@tsparticles/plugin-sounds","root":"window"}
238
- var plugin_sounds_root_window_ = __webpack_require__(490);
239
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/effect-trail","commonjs2":"@tsparticles/effect-trail","amd":"@tsparticles/effect-trail","root":"window"}
240
- var effect_trail_root_window_ = __webpack_require__(4);
241
- ;// CONCATENATED MODULE: ./dist/browser/fireworks.js
242
-
243
-
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
-
252
- const minSplitCount = 2;
253
- let initialized = false;
254
- let initializing = false;
255
- const explodeSoundCheck = args => {
256
- const data = args.data;
257
- return data.particle.shape === "circle" && !!data.particle.splitCount && data.particle.splitCount < minSplitCount;
258
- };
259
- class FireworksInstance {
260
- constructor(container) {
261
- this._container = container;
262
- }
263
- pause() {
264
- this._container.pause();
265
- }
266
- play() {
267
- this._container.play();
268
- }
269
- stop() {
270
- this._container.stop();
271
- }
272
- }
273
- async function initPlugins() {
274
- if (initialized) {
275
- return;
276
- }
277
- if (initializing) {
278
- return new Promise(resolve => {
279
- const timeout = 100,
280
- interval = setInterval(() => {
281
- if (!initialized) {
282
- return;
283
- }
284
- clearInterval(interval);
285
- resolve();
286
- }, timeout);
287
- });
288
- }
289
- initializing = true;
290
- await (0,plugin_emitters_root_window_.loadEmittersPlugin)(engine_root_window_.tsParticles, false);
291
- await (0,plugin_emitters_shape_square_root_window_.loadEmittersShapeSquare)(engine_root_window_.tsParticles, false);
292
- await (0,plugin_sounds_root_window_.loadSoundsPlugin)(engine_root_window_.tsParticles, false);
293
- await (0,updater_rotate_root_window_.loadRotateUpdater)(engine_root_window_.tsParticles, false);
294
- await (0,updater_destroy_root_window_.loadDestroyUpdater)(engine_root_window_.tsParticles, false);
295
- await (0,updater_life_root_window_.loadLifeUpdater)(engine_root_window_.tsParticles, false);
296
- await (0,effect_trail_root_window_.loadTrailEffect)(engine_root_window_.tsParticles, false);
297
- await (0,basic_root_window_.loadBasic)(engine_root_window_.tsParticles, false);
298
- initializing = false;
299
- initialized = true;
300
- }
301
- async function fireworks(idOrOptions, sourceOptions) {
302
- await initPlugins();
303
- let id;
304
- const options = new FireworkOptions();
305
- if ((0,engine_root_window_.isString)(idOrOptions)) {
306
- id = idOrOptions;
307
- options.load(sourceOptions);
308
- } else {
309
- id = "fireworks";
310
- options.load(idOrOptions);
311
- }
312
- const identity = 1,
313
- particlesOptions = {
314
- detectRetina: true,
315
- background: {
316
- color: options.background
317
- },
318
- fpsLimit: 60,
319
- emitters: {
320
- direction: "top",
321
- life: {
322
- count: 0,
323
- duration: 0.1,
324
- delay: 0.1
325
- },
326
- rate: {
327
- delay: (0,engine_root_window_.isNumber)(options.rate) ? identity / options.rate : {
328
- min: identity / (0,engine_root_window_.getRangeMin)(options.rate),
329
- max: identity / (0,engine_root_window_.getRangeMax)(options.rate)
330
- },
331
- quantity: 1
332
- },
333
- size: {
334
- width: 100,
335
- height: 0
336
- },
337
- position: {
338
- y: 100,
339
- x: 50
340
- }
341
- },
342
- particles: {
343
- number: {
344
- value: 0
345
- },
346
- color: {
347
- value: "#fff"
348
- },
349
- destroy: {
350
- mode: "split",
351
- bounds: {
352
- top: (0,engine_root_window_.setRangeValue)(options.minHeight)
353
- },
354
- split: {
355
- sizeOffset: false,
356
- count: 1,
357
- factor: {
358
- value: 0.333333
359
- },
360
- rate: {
361
- value: options.splitCount
362
- },
363
- colorOffset: {
364
- s: options.saturation,
365
- l: options.brightness
366
- },
367
- particles: {
368
- color: {
369
- value: options.colors
370
- },
371
- number: {
372
- value: 0
373
- },
374
- opacity: {
375
- value: {
376
- min: 0.1,
377
- max: 1
378
- },
379
- animation: {
380
- enable: true,
381
- speed: 1,
382
- sync: false,
383
- startValue: "max",
384
- destroy: "min"
385
- }
386
- },
387
- effect: {
388
- type: "trail",
389
- options: {
390
- trail: {
391
- length: {
392
- min: 5,
393
- max: 10
394
- }
395
- }
396
- }
397
- },
398
- shape: {
399
- type: "circle"
400
- },
401
- size: {
402
- value: {
403
- min: 1,
404
- max: 2
405
- },
406
- animation: {
407
- enable: true,
408
- speed: 5,
409
- count: 1,
410
- sync: false,
411
- startValue: "min",
412
- destroy: "none"
413
- }
414
- },
415
- life: {
416
- count: 1,
417
- duration: {
418
- value: {
419
- min: 0.25,
420
- max: 0.5
421
- }
422
- }
423
- },
424
- move: {
425
- decay: {
426
- min: 0.05,
427
- max: 0.1
428
- },
429
- enable: true,
430
- gravity: {
431
- enable: true,
432
- inverse: false,
433
- acceleration: (0,engine_root_window_.setRangeValue)(options.gravity)
434
- },
435
- speed: (0,engine_root_window_.setRangeValue)(options.speed),
436
- direction: "none",
437
- outModes: "destroy"
438
- }
439
- }
440
- }
441
- },
442
- life: {
443
- count: 1
444
- },
445
- effect: {
446
- type: "trail",
447
- options: {
448
- trail: {
449
- length: {
450
- min: 10,
451
- max: 30
452
- },
453
- minWidth: 1,
454
- maxWidth: 1
455
- }
456
- }
457
- },
458
- shape: {
459
- type: "circle"
460
- },
461
- size: {
462
- value: 1
463
- },
464
- opacity: {
465
- value: 0.5
466
- },
467
- rotate: {
468
- path: true
469
- },
470
- move: {
471
- enable: true,
472
- gravity: {
473
- acceleration: 15,
474
- enable: true,
475
- inverse: true,
476
- maxSpeed: 100
477
- },
478
- speed: {
479
- min: 10,
480
- max: 20
481
- },
482
- outModes: {
483
- default: "destroy",
484
- top: "none"
485
- }
486
- }
487
- },
488
- sounds: {
489
- enable: options.sounds,
490
- events: [{
491
- event: "particleRemoved",
492
- filter: explodeSoundCheck,
493
- audio: ["https://particles.js.org/audio/explosion0.mp3", "https://particles.js.org/audio/explosion1.mp3", "https://particles.js.org/audio/explosion2.mp3"]
494
- }],
495
- volume: 50
496
- }
497
- };
498
- const container = await engine_root_window_.tsParticles.load({
499
- id,
500
- options: particlesOptions
501
- });
502
- if (!container) {
503
- return;
504
- }
505
- return new FireworksInstance(container);
506
- }
507
- fireworks.version = engine_root_window_.tsParticles.version;
508
- if (!(0,engine_root_window_.isSsr)()) {
509
- window.fireworks = fireworks;
510
- }
511
- ;// CONCATENATED MODULE: ./dist/browser/index.js
512
-
513
- })();
514
-
249
+ /******/
250
+ /******/ // startup
251
+ /******/ // Load entry module and return exports
252
+ /******/ // This entry module can't be inlined because the eval devtool is used.
253
+ /******/ var __webpack_exports__ = __webpack_require__("./dist/browser/index.js");
254
+ /******/
515
255
  /******/ return __webpack_exports__;
516
256
  /******/ })()
517
257
  ;