@tsparticles/fireworks 4.0.0-beta.9 → 4.0.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 (141) hide show
  1. package/README.md +98 -45
  2. package/browser/browser.js +5 -0
  3. package/browser/bundle.js +4 -0
  4. package/browser/fireworks.js +32 -216
  5. package/browser/fireworks.lazy.js +64 -0
  6. package/browser/index.lazy.js +1 -0
  7. package/browser/types.js +1 -0
  8. package/browser/utils.js +195 -0
  9. package/cjs/browser.js +5 -0
  10. package/cjs/bundle.js +4 -0
  11. package/cjs/fireworks.js +32 -216
  12. package/cjs/fireworks.lazy.js +64 -0
  13. package/cjs/index.lazy.js +1 -0
  14. package/cjs/types.js +1 -0
  15. package/cjs/utils.js +195 -0
  16. package/esm/browser.js +5 -0
  17. package/esm/bundle.js +4 -0
  18. package/esm/fireworks.js +32 -216
  19. package/esm/fireworks.lazy.js +64 -0
  20. package/esm/index.lazy.js +1 -0
  21. package/esm/types.js +1 -0
  22. package/esm/utils.js +195 -0
  23. package/package.json +19 -12
  24. package/report.html +4949 -94
  25. package/tsparticles.fireworks.bundle.js +9132 -977
  26. package/tsparticles.fireworks.bundle.min.js +1 -2
  27. package/tsparticles.fireworks.js +395 -467
  28. package/tsparticles.fireworks.min.js +1 -2
  29. package/types/browser.d.ts +1 -0
  30. package/types/fireworks.d.ts +3 -6
  31. package/types/fireworks.lazy.d.ts +17 -0
  32. package/types/index.lazy.d.ts +4 -0
  33. package/types/types.d.ts +6 -0
  34. package/types/utils.d.ts +6 -0
  35. package/1241.min.js +0 -1
  36. package/1581.min.js +0 -1
  37. package/2049.min.js +0 -1
  38. package/2066.min.js +0 -1
  39. package/2127.min.js +0 -1
  40. package/218.min.js +0 -1
  41. package/2191.min.js +0 -1
  42. package/2270.min.js +0 -1
  43. package/2556.min.js +0 -1
  44. package/2602.min.js +0 -1
  45. package/2760.min.js +0 -1
  46. package/2865.min.js +0 -33
  47. package/3047.min.js +0 -1
  48. package/3073.min.js +0 -1
  49. package/3384.min.js +0 -1
  50. package/3443.min.js +0 -1
  51. package/3583.min.js +0 -1
  52. package/374.min.js +0 -1
  53. package/382.min.js +0 -1
  54. package/4068.min.js +0 -1
  55. package/4186.min.js +0 -1
  56. package/4217.min.js +0 -1
  57. package/4427.min.js +0 -1
  58. package/4519.min.js +0 -1
  59. package/4626.min.js +0 -1
  60. package/5048.min.js +0 -1
  61. package/5218.min.js +0 -1
  62. package/5294.min.js +0 -1
  63. package/5344.min.js +0 -1
  64. package/5445.min.js +0 -1
  65. package/5492.min.js +0 -1
  66. package/5629.min.js +0 -1
  67. package/5675.min.js +0 -1
  68. package/6055.min.js +0 -1
  69. package/6067.min.js +0 -1
  70. package/6099.min.js +0 -1
  71. package/6171.min.js +0 -1
  72. package/648.min.js +0 -1
  73. package/6602.min.js +0 -1
  74. package/6943.min.js +0 -1
  75. package/6996.min.js +0 -1
  76. package/7162.min.js +0 -1
  77. package/7698.min.js +0 -1
  78. package/7711.min.js +0 -1
  79. package/7757.min.js +0 -1
  80. package/7792.min.js +0 -1
  81. package/8272.min.js +0 -1
  82. package/8386.min.js +0 -1
  83. package/8529.min.js +0 -1
  84. package/8607.min.js +0 -1
  85. package/8656.min.js +0 -1
  86. package/8731.min.js +0 -1
  87. package/9407.min.js +0 -1
  88. package/9674.min.js +0 -1
  89. package/basic_dist_browser_index_js.js +0 -30
  90. package/dist_browser_FireworksInstance_js.js +0 -30
  91. package/engine_dist_browser_Core_Container_js.js +0 -100
  92. package/plugins_blend_dist_browser_BlendPluginInstance_js.js +0 -30
  93. package/plugins_blend_dist_browser_BlendPlugin_js.js +0 -40
  94. package/plugins_blend_dist_browser_index_js.js +0 -30
  95. package/plugins_colors_hex_dist_browser_HexColorManager_js.js +0 -30
  96. package/plugins_colors_hex_dist_browser_index_js.js +0 -30
  97. package/plugins_colors_hsl_dist_browser_HslColorManager_js.js +0 -30
  98. package/plugins_colors_hsl_dist_browser_index_js.js +0 -30
  99. package/plugins_colors_rgb_dist_browser_RgbColorManager_js.js +0 -30
  100. package/plugins_colors_rgb_dist_browser_index_js.js +0 -30
  101. package/plugins_emittersShapes_square_dist_browser_EmittersSquareShapeGenerator_js.js +0 -100
  102. package/plugins_emittersShapes_square_dist_browser_index_js.js +0 -30
  103. package/plugins_emitters_dist_browser_EmitterInstance_js.js +0 -30
  104. package/plugins_emitters_dist_browser_EmittersInstancesManager_js.js +0 -100
  105. package/plugins_emitters_dist_browser_EmittersInteractor_js.js +0 -210
  106. package/plugins_emitters_dist_browser_EmittersPluginInstance_js.js +0 -30
  107. package/plugins_emitters_dist_browser_EmittersPlugin_js.js +0 -100
  108. package/plugins_emitters_dist_browser_ShapeManager_js.js +0 -30
  109. package/plugins_emitters_dist_browser_addEmittersShapesManager_js.js +0 -30
  110. package/plugins_emitters_dist_browser_getEmittersInstancesManager_js.js +0 -30
  111. package/plugins_emitters_dist_browser_index_js.js +0 -80
  112. package/plugins_emitters_dist_browser_plugin_js.js +0 -50
  113. package/plugins_interactivity_dist_browser_InteractivityPluginInstance_js.js +0 -50
  114. package/plugins_interactivity_dist_browser_InteractivityPlugin_js.js +0 -70
  115. package/plugins_interactivity_dist_browser_index_js.js +0 -120
  116. package/plugins_move_dist_browser_MovePluginInstance_js.js +0 -40
  117. package/plugins_move_dist_browser_MovePlugin_js.js +0 -30
  118. package/plugins_move_dist_browser_index_js.js +0 -30
  119. package/plugins_sounds_dist_browser_SoundsPluginInstance_js.js +0 -40
  120. package/plugins_sounds_dist_browser_SoundsPlugin_js.js +0 -130
  121. package/plugins_sounds_dist_browser_index_js.js +0 -30
  122. package/shapes_circle_dist_browser_CircleDrawer_js.js +0 -40
  123. package/shapes_circle_dist_browser_index_js.js +0 -30
  124. package/shapes_line_dist_browser_LineDrawer_js.js +0 -40
  125. package/shapes_line_dist_browser_index_js.js +0 -30
  126. package/updaters_destroy_dist_browser_DestroyUpdater_js.js +0 -100
  127. package/updaters_destroy_dist_browser_index_js.js +0 -30
  128. package/updaters_fillColor_dist_browser_FillColorUpdater_js.js +0 -30
  129. package/updaters_fillColor_dist_browser_index_js.js +0 -30
  130. package/updaters_life_dist_browser_LifeUpdater_js.js +0 -70
  131. package/updaters_life_dist_browser_index_js.js +0 -30
  132. package/updaters_opacity_dist_browser_OpacityUpdater_js.js +0 -30
  133. package/updaters_opacity_dist_browser_index_js.js +0 -30
  134. package/updaters_outModes_dist_browser_OutOfCanvasUpdater_js.js +0 -80
  135. package/updaters_outModes_dist_browser_index_js.js +0 -30
  136. package/updaters_rotate_dist_browser_RotateUpdater_js.js +0 -50
  137. package/updaters_rotate_dist_browser_index_js.js +0 -30
  138. package/updaters_size_dist_browser_SizeUpdater_js.js +0 -30
  139. package/updaters_size_dist_browser_index_js.js +0 -30
  140. package/updaters_strokeColor_dist_browser_StrokeColorUpdater_js.js +0 -30
  141. package/updaters_strokeColor_dist_browser_index_js.js +0 -30
@@ -1,467 +1,395 @@
1
- /*!
2
- * Author : Matteo Bruni
3
- * MIT license: https://opensource.org/licenses/MIT
4
- * Demo / Generator : https://particles.js.org/
5
- * GitHub : https://www.github.com/matteobruni/tsparticles
6
- * How to use? : Check the GitHub README
7
- * v4.0.0-beta.9
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/).
16
- */
17
- (function webpackUniversalModuleDefinition(root, factory) {
18
- if(typeof exports === 'object' && typeof module === 'object')
19
- module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/updater-stroke-color"), 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/plugin"), require("@tsparticles/plugin-blend"), require("@tsparticles/shape-line"), require("@tsparticles/basic"));
20
- else if(typeof define === 'function' && define.amd)
21
- define(["@tsparticles/engine", "@tsparticles/updater-stroke-color", "@tsparticles/updater-life", "@tsparticles/updater-destroy", "@tsparticles/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/plugin-emitters-shape-square", "@tsparticles/plugin-emitters/plugin", "@tsparticles/plugin-blend", "@tsparticles/shape-line", "@tsparticles/basic"], factory);
22
- else {
23
- var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/updater-stroke-color"), 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/plugin"), require("@tsparticles/plugin-blend"), require("@tsparticles/shape-line"), require("@tsparticles/basic")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
24
- for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
25
- }
26
- })(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_stroke_color__, __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_plugin__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_blend__, __WEBPACK_EXTERNAL_MODULE__tsparticles_shape_line__, __WEBPACK_EXTERNAL_MODULE__tsparticles_basic__) => {
27
- return /******/ (() => { // webpackBootstrap
28
- /******/ "use strict";
29
- /******/ var __webpack_modules__ = ({
30
-
31
- /***/ "@tsparticles/basic"
32
- /*!******************************************************************************************************************************!*\
33
- !*** external {"commonjs":"@tsparticles/basic","commonjs2":"@tsparticles/basic","amd":"@tsparticles/basic","root":"window"} ***!
34
- \******************************************************************************************************************************/
35
- (module) {
36
-
37
- module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_basic__;
38
-
39
- /***/ },
40
-
41
- /***/ "@tsparticles/engine"
42
- /*!*********************************************************************************************************************************!*\
43
- !*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
44
- \*********************************************************************************************************************************/
45
- (module) {
46
-
47
- module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
48
-
49
- /***/ },
50
-
51
- /***/ "@tsparticles/plugin-blend"
52
- /*!***************************************************************************************************************************************************!*\
53
- !*** external {"commonjs":"@tsparticles/plugin-blend","commonjs2":"@tsparticles/plugin-blend","amd":"@tsparticles/plugin-blend","root":"window"} ***!
54
- \***************************************************************************************************************************************************/
55
- (module) {
56
-
57
- module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_blend__;
58
-
59
- /***/ },
60
-
61
- /***/ "@tsparticles/plugin-emitters-shape-square"
62
- /*!***************************************************************************************************************************************************************************************************!*\
63
- !*** external {"commonjs":"@tsparticles/plugin-emitters-shape-square","commonjs2":"@tsparticles/plugin-emitters-shape-square","amd":"@tsparticles/plugin-emitters-shape-square","root":"window"} ***!
64
- \***************************************************************************************************************************************************************************************************/
65
- (module) {
66
-
67
- module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters_shape_square__;
68
-
69
- /***/ },
70
-
71
- /***/ "@tsparticles/plugin-emitters/plugin"
72
- /*!*********************************************************************************************************************************************************************************!*\
73
- !*** external {"commonjs":"@tsparticles/plugin-emitters/plugin","commonjs2":"@tsparticles/plugin-emitters/plugin","amd":"@tsparticles/plugin-emitters/plugin","root":"window"} ***!
74
- \*********************************************************************************************************************************************************************************/
75
- (module) {
76
-
77
- module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters_plugin__;
78
-
79
- /***/ },
80
-
81
- /***/ "@tsparticles/plugin-sounds"
82
- /*!******************************************************************************************************************************************************!*\
83
- !*** external {"commonjs":"@tsparticles/plugin-sounds","commonjs2":"@tsparticles/plugin-sounds","amd":"@tsparticles/plugin-sounds","root":"window"} ***!
84
- \******************************************************************************************************************************************************/
85
- (module) {
86
-
87
- module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_sounds__;
88
-
89
- /***/ },
90
-
91
- /***/ "@tsparticles/shape-line"
92
- /*!*********************************************************************************************************************************************!*\
93
- !*** external {"commonjs":"@tsparticles/shape-line","commonjs2":"@tsparticles/shape-line","amd":"@tsparticles/shape-line","root":"window"} ***!
94
- \*********************************************************************************************************************************************/
95
- (module) {
96
-
97
- module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_shape_line__;
98
-
99
- /***/ },
100
-
101
- /***/ "@tsparticles/updater-destroy"
102
- /*!************************************************************************************************************************************************************!*\
103
- !*** external {"commonjs":"@tsparticles/updater-destroy","commonjs2":"@tsparticles/updater-destroy","amd":"@tsparticles/updater-destroy","root":"window"} ***!
104
- \************************************************************************************************************************************************************/
105
- (module) {
106
-
107
- module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_destroy__;
108
-
109
- /***/ },
110
-
111
- /***/ "@tsparticles/updater-life"
112
- /*!***************************************************************************************************************************************************!*\
113
- !*** external {"commonjs":"@tsparticles/updater-life","commonjs2":"@tsparticles/updater-life","amd":"@tsparticles/updater-life","root":"window"} ***!
114
- \***************************************************************************************************************************************************/
115
- (module) {
116
-
117
- module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_life__;
118
-
119
- /***/ },
120
-
121
- /***/ "@tsparticles/updater-rotate"
122
- /*!*********************************************************************************************************************************************************!*\
123
- !*** external {"commonjs":"@tsparticles/updater-rotate","commonjs2":"@tsparticles/updater-rotate","amd":"@tsparticles/updater-rotate","root":"window"} ***!
124
- \*********************************************************************************************************************************************************/
125
- (module) {
126
-
127
- module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_rotate__;
128
-
129
- /***/ },
130
-
131
- /***/ "@tsparticles/updater-stroke-color"
132
- /*!***************************************************************************************************************************************************************************!*\
133
- !*** external {"commonjs":"@tsparticles/updater-stroke-color","commonjs2":"@tsparticles/updater-stroke-color","amd":"@tsparticles/updater-stroke-color","root":"window"} ***!
134
- \***************************************************************************************************************************************************************************/
135
- (module) {
136
-
137
- module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_stroke_color__;
138
-
139
- /***/ },
140
-
141
- /***/ "./dist/browser/FireworkOptions.js"
142
- /*!*****************************************!*\
143
- !*** ./dist/browser/FireworkOptions.js ***!
144
- \*****************************************/
145
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
146
-
147
- 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\nclass FireworkOptions {\n background;\n brightness;\n colors;\n gravity;\n minHeight;\n rate;\n saturation;\n sounds;\n speed;\n splitCount;\n constructor(){\n this.background = \"none\";\n this.brightness = {\n min: -30,\n max: 30\n };\n this.colors = [\n \"#FF0000\",\n \"#FF2A00\",\n \"#FF5500\",\n \"#FF8000\",\n \"#FFAA00\",\n \"#FFD400\",\n \"#FFFF00\",\n \"#D4FF00\",\n \"#AAFF00\",\n \"#80FF00\",\n \"#55FF00\",\n \"#2AFF00\",\n \"#00FF00\",\n \"#00FF2A\",\n \"#00FF55\",\n \"#00FF80\",\n \"#00FFAA\",\n \"#00FFD4\",\n \"#00FFFF\",\n \"#00D4FF\",\n \"#00AAFF\",\n \"#0080FF\",\n \"#0055FF\",\n \"#002AFF\",\n \"#0000FF\",\n \"#2A00FF\",\n \"#5500FF\",\n \"#8000FF\",\n \"#AA00FF\",\n \"#D400FF\",\n \"#FF00FF\",\n \"#FF00D4\",\n \"#FF00AA\",\n \"#FF0080\",\n \"#FF0055\",\n \"#FF002A\"\n ];\n this.gravity = 30;\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: 20,\n max: 40\n };\n this.splitCount = 100;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(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 = [\n ...data.colors\n ];\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\n//# sourceURL=webpack://@tsparticles/fireworks/./dist/browser/FireworkOptions.js?\n}");
148
-
149
- /***/ },
150
-
151
- /***/ "./dist/browser/fireworks.js"
152
- /*!***********************************!*\
153
- !*** ./dist/browser/fireworks.js ***!
154
- \***********************************/
155
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
156
-
157
- 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 _FireworkOptions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FireworkOptions.js */ \"./dist/browser/FireworkOptions.js\");\n\n\nlet initialized = false, initializing = false;\nconst explodeSoundCheck = (args)=>{\n const data = args.data;\n return data?.particle?.options.move.gravity.enable ?? false;\n};\nasync function initPlugins(engine) {\n if (initialized) {\n return;\n }\n if (initializing) {\n return new Promise((resolve)=>{\n const timeout = 100, interval = setInterval(()=>{\n if (!initialized) {\n return;\n }\n clearInterval(interval);\n resolve();\n }, timeout);\n });\n }\n initializing = true;\n engine.checkVersion(\"4.0.0-beta.9\");\n await engine.pluginManager.register(async (e)=>{\n const [{ loadBasic }, { loadLineShape }, { loadBlendPlugin }, { loadEmittersPluginSimple }, { loadEmittersShapeSquare }, { loadSoundsPlugin }, { loadRotateUpdater }, { loadDestroyUpdater }, { loadLifeUpdater }, { loadStrokeColorUpdater }] = await Promise.all([\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/basic */ \"@tsparticles/basic\", 19)),\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/shape-line */ \"@tsparticles/shape-line\", 19)),\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-blend */ \"@tsparticles/plugin-blend\", 19)),\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-emitters/plugin */ \"@tsparticles/plugin-emitters/plugin\", 19)),\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-emitters-shape-square */ \"@tsparticles/plugin-emitters-shape-square\", 19)),\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-sounds */ \"@tsparticles/plugin-sounds\", 19)),\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-rotate */ \"@tsparticles/updater-rotate\", 19)),\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-destroy */ \"@tsparticles/updater-destroy\", 19)),\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-life */ \"@tsparticles/updater-life\", 19)),\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-stroke-color */ \"@tsparticles/updater-stroke-color\", 19))\n ]);\n await Promise.all([\n loadBasic(e),\n loadLineShape(e),\n loadBlendPlugin(e),\n (async ()=>{\n await loadEmittersPluginSimple(e);\n await loadEmittersShapeSquare(e);\n })(),\n loadSoundsPlugin(e),\n loadRotateUpdater(e),\n loadDestroyUpdater(e),\n loadLifeUpdater(e),\n loadStrokeColorUpdater(e)\n ]);\n });\n initializing = false;\n initialized = true;\n}\nfunction getOptions(options, canvas) {\n const identity = 1;\n return {\n detectRetina: true,\n background: {\n color: options.background\n },\n blend: {\n enable: true,\n mode: \"lighter\"\n },\n fullScreen: {\n enable: !canvas\n },\n fpsLimit: 60,\n emitters: {\n direction: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.MoveDirection.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 stroke: {\n color: {\n value: options.colors\n },\n width: 2\n },\n destroy: {\n mode: \"split\",\n bounds: {\n top: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.minHeight)\n },\n split: {\n count: 1,\n factor: {\n value: 0.333333\n },\n rate: {\n value: options.splitCount\n },\n strokeColorOffset: {\n s: options.saturation,\n l: options.brightness\n },\n particles: {\n group: \"split\",\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: {\n min: 2,\n max: 4\n },\n sync: true,\n startValue: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.StartValueType.max,\n destroy: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.DestroyType.min,\n count: 1\n }\n },\n size: {\n value: {\n min: 5,\n max: 10\n }\n },\n life: {\n count: 1,\n duration: {\n value: {\n min: 0.5,\n max: 1\n }\n }\n },\n move: {\n decay: 0.05,\n enable: true,\n gravity: {\n enable: false\n },\n speed: {\n min: 10,\n max: 25\n },\n direction: \"outside\",\n outModes: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.destroy\n }\n }\n }\n },\n life: {\n count: 1\n },\n shape: {\n type: \"line\",\n options: {\n line: {\n cap: \"round\"\n }\n }\n },\n size: {\n value: {\n min: 10,\n max: 20\n }\n },\n rotate: {\n path: true\n },\n move: {\n enable: true,\n gravity: {\n acceleration: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.gravity),\n enable: true,\n inverse: true,\n maxSpeed: 150\n },\n speed: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.speed),\n outModes: {\n default: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.destroy,\n top: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.none\n }\n }\n },\n sounds: {\n enable: options.sounds,\n events: [\n {\n event: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.EventType.particleRemoved,\n filter: explodeSoundCheck,\n audio: [\n \"https://particles.js.org/audio/explosion0.mp3\",\n \"https://particles.js.org/audio/explosion1.mp3\",\n \"https://particles.js.org/audio/explosion2.mp3\"\n ]\n }\n ],\n volume: 50\n }\n };\n}\nasync function getFireworksInstance(id, sourceOptions, canvas) {\n await initPlugins(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles);\n const options = new _FireworkOptions_js__WEBPACK_IMPORTED_MODULE_1__.FireworkOptions();\n options.load(sourceOptions);\n const particlesOptions = getOptions(options, canvas), container = await _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles.load({\n id,\n element: canvas,\n options: particlesOptions\n });\n if (!container) {\n return;\n }\n const { FireworksInstance } = await __webpack_require__.e(/*! import() */ \"dist_browser_FireworksInstance_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./FireworksInstance.js */ \"./dist/browser/FireworksInstance.js\"));\n return new FireworksInstance(container);\n}\nasync function fireworks(idOrOptions, sourceOptions) {\n let id, options;\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isString)(idOrOptions)) {\n id = idOrOptions;\n options = sourceOptions ?? {};\n } else {\n id = \"fireworks\";\n options = idOrOptions ?? {};\n }\n return getFireworksInstance(id, options);\n}\nfireworks.create = async (canvas, options)=>{\n const id = canvas.id || \"fireworks\";\n return getFireworksInstance(id, options ?? {}, canvas);\n};\nfireworks.init = async ()=>{\n await initPlugins(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles);\n};\nfireworks.version = \"4.0.0-beta.9\";\nglobalThis.fireworks = fireworks;\n\n\n//# sourceURL=webpack://@tsparticles/fireworks/./dist/browser/fireworks.js?\n}");
158
-
159
- /***/ },
160
-
161
- /***/ "./dist/browser/index.js"
162
- /*!*******************************!*\
163
- !*** ./dist/browser/index.js ***!
164
- \*******************************/
165
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
166
-
167
- 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\n//# sourceURL=webpack://@tsparticles/fireworks/./dist/browser/index.js?\n}");
168
-
169
- /***/ }
170
-
171
- /******/ });
172
- /************************************************************************/
173
- /******/ // The module cache
174
- /******/ var __webpack_module_cache__ = {};
175
- /******/
176
- /******/ // The require function
177
- /******/ function __webpack_require__(moduleId) {
178
- /******/ // Check if module is in cache
179
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
180
- /******/ if (cachedModule !== undefined) {
181
- /******/ return cachedModule.exports;
182
- /******/ }
183
- /******/ // Create a new module (and put it into the cache)
184
- /******/ var module = __webpack_module_cache__[moduleId] = {
185
- /******/ // no module.id needed
186
- /******/ // no module.loaded needed
187
- /******/ exports: {}
188
- /******/ };
189
- /******/
190
- /******/ // Execute the module function
191
- /******/ if (!(moduleId in __webpack_modules__)) {
192
- /******/ delete __webpack_module_cache__[moduleId];
193
- /******/ var e = new Error("Cannot find module '" + moduleId + "'");
194
- /******/ e.code = 'MODULE_NOT_FOUND';
195
- /******/ throw e;
196
- /******/ }
197
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
198
- /******/
199
- /******/ // Return the exports of the module
200
- /******/ return module.exports;
201
- /******/ }
202
- /******/
203
- /******/ // expose the modules object (__webpack_modules__)
204
- /******/ __webpack_require__.m = __webpack_modules__;
205
- /******/
206
- /************************************************************************/
207
- /******/ /* webpack/runtime/create fake namespace object */
208
- /******/ (() => {
209
- /******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
210
- /******/ var leafPrototypes;
211
- /******/ // create a fake namespace object
212
- /******/ // mode & 1: value is a module id, require it
213
- /******/ // mode & 2: merge all properties of value into the ns
214
- /******/ // mode & 4: return value when already ns object
215
- /******/ // mode & 16: return value when it's Promise-like
216
- /******/ // mode & 8|1: behave like require
217
- /******/ __webpack_require__.t = function(value, mode) {
218
- /******/ if(mode & 1) value = this(value);
219
- /******/ if(mode & 8) return value;
220
- /******/ if(typeof value === 'object' && value) {
221
- /******/ if((mode & 4) && value.__esModule) return value;
222
- /******/ if((mode & 16) && typeof value.then === 'function') return value;
223
- /******/ }
224
- /******/ var ns = Object.create(null);
225
- /******/ __webpack_require__.r(ns);
226
- /******/ var def = {};
227
- /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
228
- /******/ for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {
229
- /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
230
- /******/ }
231
- /******/ def['default'] = () => (value);
232
- /******/ __webpack_require__.d(ns, def);
233
- /******/ return ns;
234
- /******/ };
235
- /******/ })();
236
- /******/
237
- /******/ /* webpack/runtime/define property getters */
238
- /******/ (() => {
239
- /******/ // define getter functions for harmony exports
240
- /******/ __webpack_require__.d = (exports, definition) => {
241
- /******/ for(var key in definition) {
242
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
243
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
244
- /******/ }
245
- /******/ }
246
- /******/ };
247
- /******/ })();
248
- /******/
249
- /******/ /* webpack/runtime/ensure chunk */
250
- /******/ (() => {
251
- /******/ __webpack_require__.f = {};
252
- /******/ // This file contains only the entry chunk.
253
- /******/ // The chunk loading function for additional chunks
254
- /******/ __webpack_require__.e = (chunkId) => {
255
- /******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
256
- /******/ __webpack_require__.f[key](chunkId, promises);
257
- /******/ return promises;
258
- /******/ }, []));
259
- /******/ };
260
- /******/ })();
261
- /******/
262
- /******/ /* webpack/runtime/get javascript chunk filename */
263
- /******/ (() => {
264
- /******/ // This function allow to reference async chunks
265
- /******/ __webpack_require__.u = (chunkId) => {
266
- /******/ // return url for filenames based on template
267
- /******/ return "" + chunkId + ".js";
268
- /******/ };
269
- /******/ })();
270
- /******/
271
- /******/ /* webpack/runtime/global */
272
- /******/ (() => {
273
- /******/ __webpack_require__.g = (function() {
274
- /******/ if (typeof globalThis === 'object') return globalThis;
275
- /******/ try {
276
- /******/ return this || new Function('return this')();
277
- /******/ } catch (e) {
278
- /******/ if (typeof window === 'object') return window;
279
- /******/ }
280
- /******/ })();
281
- /******/ })();
282
- /******/
283
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
284
- /******/ (() => {
285
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
286
- /******/ })();
287
- /******/
288
- /******/ /* webpack/runtime/load script */
289
- /******/ (() => {
290
- /******/ var inProgress = {};
291
- /******/ var dataWebpackPrefix = "@tsparticles/fireworks:";
292
- /******/ // loadScript function to load a script via script tag
293
- /******/ __webpack_require__.l = (url, done, key, chunkId) => {
294
- /******/ if(inProgress[url]) { inProgress[url].push(done); return; }
295
- /******/ var script, needAttach;
296
- /******/ if(key !== undefined) {
297
- /******/ var scripts = document.getElementsByTagName("script");
298
- /******/ for(var i = 0; i < scripts.length; i++) {
299
- /******/ var s = scripts[i];
300
- /******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
301
- /******/ }
302
- /******/ }
303
- /******/ if(!script) {
304
- /******/ needAttach = true;
305
- /******/ script = document.createElement('script');
306
- /******/
307
- /******/ script.charset = 'utf-8';
308
- /******/ if (__webpack_require__.nc) {
309
- /******/ script.setAttribute("nonce", __webpack_require__.nc);
310
- /******/ }
311
- /******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
312
- /******/
313
- /******/ script.src = url;
314
- /******/ }
315
- /******/ inProgress[url] = [done];
316
- /******/ var onScriptComplete = (prev, event) => {
317
- /******/ // avoid mem leaks in IE.
318
- /******/ script.onerror = script.onload = null;
319
- /******/ clearTimeout(timeout);
320
- /******/ var doneFns = inProgress[url];
321
- /******/ delete inProgress[url];
322
- /******/ script.parentNode && script.parentNode.removeChild(script);
323
- /******/ doneFns && doneFns.forEach((fn) => (fn(event)));
324
- /******/ if(prev) return prev(event);
325
- /******/ }
326
- /******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
327
- /******/ script.onerror = onScriptComplete.bind(null, script.onerror);
328
- /******/ script.onload = onScriptComplete.bind(null, script.onload);
329
- /******/ needAttach && document.head.appendChild(script);
330
- /******/ };
331
- /******/ })();
332
- /******/
333
- /******/ /* webpack/runtime/make namespace object */
334
- /******/ (() => {
335
- /******/ // define __esModule on exports
336
- /******/ __webpack_require__.r = (exports) => {
337
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
338
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
339
- /******/ }
340
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
341
- /******/ };
342
- /******/ })();
343
- /******/
344
- /******/ /* webpack/runtime/publicPath */
345
- /******/ (() => {
346
- /******/ var scriptUrl;
347
- /******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
348
- /******/ var document = __webpack_require__.g.document;
349
- /******/ if (!scriptUrl && document) {
350
- /******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
351
- /******/ scriptUrl = document.currentScript.src;
352
- /******/ if (!scriptUrl) {
353
- /******/ var scripts = document.getElementsByTagName("script");
354
- /******/ if(scripts.length) {
355
- /******/ var i = scripts.length - 1;
356
- /******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
357
- /******/ }
358
- /******/ }
359
- /******/ }
360
- /******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
361
- /******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
362
- /******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
363
- /******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
364
- /******/ __webpack_require__.p = scriptUrl;
365
- /******/ })();
366
- /******/
367
- /******/ /* webpack/runtime/jsonp chunk loading */
368
- /******/ (() => {
369
- /******/ // no baseURI
370
- /******/
371
- /******/ // object to store loaded and loading chunks
372
- /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
373
- /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
374
- /******/ var installedChunks = {
375
- /******/ "tsparticles.fireworks": 0
376
- /******/ };
377
- /******/
378
- /******/ __webpack_require__.f.j = (chunkId, promises) => {
379
- /******/ // JSONP chunk loading for javascript
380
- /******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
381
- /******/ if(installedChunkData !== 0) { // 0 means "already installed".
382
- /******/
383
- /******/ // a Promise means "currently loading".
384
- /******/ if(installedChunkData) {
385
- /******/ promises.push(installedChunkData[2]);
386
- /******/ } else {
387
- /******/ if(true) { // all chunks have JS
388
- /******/ // setup Promise in chunk cache
389
- /******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
390
- /******/ promises.push(installedChunkData[2] = promise);
391
- /******/
392
- /******/ // start chunk loading
393
- /******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId);
394
- /******/ // create error before stack unwound to get useful stacktrace later
395
- /******/ var error = new Error();
396
- /******/ var loadingEnded = (event) => {
397
- /******/ if(__webpack_require__.o(installedChunks, chunkId)) {
398
- /******/ installedChunkData = installedChunks[chunkId];
399
- /******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
400
- /******/ if(installedChunkData) {
401
- /******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
402
- /******/ var realSrc = event && event.target && event.target.src;
403
- /******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
404
- /******/ error.name = 'ChunkLoadError';
405
- /******/ error.type = errorType;
406
- /******/ error.request = realSrc;
407
- /******/ installedChunkData[1](error);
408
- /******/ }
409
- /******/ }
410
- /******/ };
411
- /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
412
- /******/ }
413
- /******/ }
414
- /******/ }
415
- /******/ };
416
- /******/
417
- /******/ // no prefetching
418
- /******/
419
- /******/ // no preloaded
420
- /******/
421
- /******/ // no HMR
422
- /******/
423
- /******/ // no HMR manifest
424
- /******/
425
- /******/ // no on chunks loaded
426
- /******/
427
- /******/ // install a JSONP callback for chunk loading
428
- /******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
429
- /******/ var [chunkIds, moreModules, runtime] = data;
430
- /******/ // add "moreModules" to the modules object,
431
- /******/ // then flag all "chunkIds" as loaded and fire callback
432
- /******/ var moduleId, chunkId, i = 0;
433
- /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
434
- /******/ for(moduleId in moreModules) {
435
- /******/ if(__webpack_require__.o(moreModules, moduleId)) {
436
- /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
437
- /******/ }
438
- /******/ }
439
- /******/ if(runtime) var result = runtime(__webpack_require__);
440
- /******/ }
441
- /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
442
- /******/ for(;i < chunkIds.length; i++) {
443
- /******/ chunkId = chunkIds[i];
444
- /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
445
- /******/ installedChunks[chunkId][0]();
446
- /******/ }
447
- /******/ installedChunks[chunkId] = 0;
448
- /******/ }
449
- /******/
450
- /******/ }
451
- /******/
452
- /******/ var chunkLoadingGlobal = this["webpackChunk_tsparticles_fireworks"] = this["webpackChunk_tsparticles_fireworks"] || [];
453
- /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
454
- /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
455
- /******/ })();
456
- /******/
457
- /************************************************************************/
458
- /******/
459
- /******/ // startup
460
- /******/ // Load entry module and return exports
461
- /******/ // This entry module can't be inlined because the eval devtool is used.
462
- /******/ var __webpack_exports__ = __webpack_require__("./dist/browser/index.js");
463
- /******/
464
- /******/ return __webpack_exports__;
465
- /******/ })()
466
- ;
467
- });
1
+ (function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
2
+ /* tsParticles v4.0.1 */
3
+ (function (global, factory) {
4
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/engine'), require('@tsparticles/basic'), require('@tsparticles/plugin-blend'), require('@tsparticles/updater-destroy'), require('@tsparticles/plugin-emitters/plugin'), require('@tsparticles/plugin-emitters-shape-square'), require('@tsparticles/updater-life'), require('@tsparticles/shape-line'), require('@tsparticles/updater-paint'), require('@tsparticles/updater-rotate'), require('@tsparticles/plugin-sounds')) :
5
+ typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/engine', '@tsparticles/basic', '@tsparticles/plugin-blend', '@tsparticles/updater-destroy', '@tsparticles/plugin-emitters/plugin', '@tsparticles/plugin-emitters-shape-square', '@tsparticles/updater-life', '@tsparticles/shape-line', '@tsparticles/updater-paint', '@tsparticles/updater-rotate', '@tsparticles/plugin-sounds'], factory) :
6
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.__tsParticlesInternals = global.__tsParticlesInternals || {}, global.__tsParticlesInternals.bundles = global.__tsParticlesInternals.bundles || {}, global.__tsParticlesInternals.bundles.fireworks = global.__tsParticlesInternals.bundles.fireworks || {}), global.__tsParticlesInternals.engine, global.__tsParticlesInternals.bundles.basic, global.__tsParticlesInternals.plugins.blend, global.__tsParticlesInternals.updaters.destroy, global.__tsParticlesInternals.plugins["emitters/plugin"], global.__tsParticlesInternals.plugins.emittersShapes.square, global.__tsParticlesInternals.updaters.life, global.__tsParticlesInternals.shapes.line, global.__tsParticlesInternals.updaters.paint, global.__tsParticlesInternals.updaters.rotate, global.__tsParticlesInternals.plugins.sounds));
7
+ })(this, (function (exports, engine, basic, pluginBlend, updaterDestroy, plugin, pluginEmittersShapeSquare, updaterLife, shapeLine, updaterPaint, updaterRotate, pluginSounds) { 'use strict';
8
+
9
+ class FireworkOptions {
10
+ background;
11
+ brightness;
12
+ colors;
13
+ gravity;
14
+ minHeight;
15
+ rate;
16
+ saturation;
17
+ sounds;
18
+ speed;
19
+ splitCount;
20
+ constructor() {
21
+ this.background = "none";
22
+ this.brightness = {
23
+ min: -30,
24
+ max: 30,
25
+ };
26
+ this.colors = [
27
+ "#FF0000",
28
+ "#FF2A00",
29
+ "#FF5500",
30
+ "#FF8000",
31
+ "#FFAA00",
32
+ "#FFD400",
33
+ "#FFFF00",
34
+ "#D4FF00",
35
+ "#AAFF00",
36
+ "#80FF00",
37
+ "#55FF00",
38
+ "#2AFF00",
39
+ "#00FF00",
40
+ "#00FF2A",
41
+ "#00FF55",
42
+ "#00FF80",
43
+ "#00FFAA",
44
+ "#00FFD4",
45
+ "#00FFFF",
46
+ "#00D4FF",
47
+ "#00AAFF",
48
+ "#0080FF",
49
+ "#0055FF",
50
+ "#002AFF",
51
+ "#0000FF",
52
+ "#2A00FF",
53
+ "#5500FF",
54
+ "#8000FF",
55
+ "#AA00FF",
56
+ "#D400FF",
57
+ "#FF00FF",
58
+ "#FF00D4",
59
+ "#FF00AA",
60
+ "#FF0080",
61
+ "#FF0055",
62
+ "#FF002A",
63
+ ];
64
+ this.gravity = 30;
65
+ this.minHeight = {
66
+ min: 10,
67
+ max: 30,
68
+ };
69
+ this.rate = 10;
70
+ this.saturation = {
71
+ min: -30,
72
+ max: 30,
73
+ };
74
+ this.sounds = true;
75
+ this.speed = { min: 20, max: 40 };
76
+ this.splitCount = 100;
77
+ }
78
+ load(data) {
79
+ if (engine.isNull(data)) {
80
+ return;
81
+ }
82
+ if (data.background !== undefined) {
83
+ this.background = data.background;
84
+ }
85
+ if (data.colors !== undefined) {
86
+ if (engine.isArray(data.colors)) {
87
+ this.colors = [...data.colors];
88
+ }
89
+ else {
90
+ this.colors = data.colors;
91
+ }
92
+ }
93
+ if (data.brightness !== undefined) {
94
+ this.brightness = engine.setRangeValue(data.brightness);
95
+ }
96
+ if (data.gravity !== undefined) {
97
+ this.gravity = engine.setRangeValue(data.gravity);
98
+ }
99
+ if (data.minHeight !== undefined) {
100
+ this.minHeight = engine.setRangeValue(data.minHeight);
101
+ }
102
+ if (data.rate !== undefined) {
103
+ this.rate = engine.setRangeValue(data.rate);
104
+ }
105
+ if (data.saturation !== undefined) {
106
+ this.saturation = engine.setRangeValue(data.saturation);
107
+ }
108
+ if (data.sounds !== undefined) {
109
+ this.sounds = data.sounds;
110
+ }
111
+ if (data.speed !== undefined) {
112
+ this.speed = engine.setRangeValue(data.speed);
113
+ }
114
+ if (data.splitCount !== undefined) {
115
+ this.splitCount = engine.setRangeValue(data.splitCount);
116
+ }
117
+ }
118
+ }
119
+
120
+ const instances = new Map();
121
+ const explodeSoundCheck = (args) => {
122
+ const data = args.data;
123
+ return data?.particle?.options.move.gravity.enable ?? false;
124
+ };
125
+ function getOptions(options, canvas) {
126
+ const identity = 1;
127
+ return {
128
+ detectRetina: true,
129
+ background: {
130
+ color: options.background,
131
+ },
132
+ blend: {
133
+ enable: true,
134
+ mode: "lighter",
135
+ },
136
+ fullScreen: {
137
+ enable: !canvas,
138
+ },
139
+ fpsLimit: 60,
140
+ emitters: {
141
+ direction: engine.MoveDirection.top,
142
+ life: {
143
+ count: 0,
144
+ duration: 0.1,
145
+ delay: 0.1,
146
+ },
147
+ rate: {
148
+ delay: engine.isNumber(options.rate)
149
+ ? identity / options.rate
150
+ : { min: identity / engine.getRangeMin(options.rate), max: identity / engine.getRangeMax(options.rate) },
151
+ quantity: 1,
152
+ },
153
+ size: {
154
+ width: 100,
155
+ height: 0,
156
+ },
157
+ position: {
158
+ y: 100,
159
+ x: 50,
160
+ },
161
+ },
162
+ particles: {
163
+ number: {
164
+ value: 0,
165
+ },
166
+ paint: {
167
+ fill: {
168
+ enable: false,
169
+ },
170
+ stroke: {
171
+ color: {
172
+ value: options.colors,
173
+ },
174
+ width: 2,
175
+ },
176
+ },
177
+ destroy: {
178
+ mode: "split",
179
+ bounds: {
180
+ top: engine.setRangeValue(options.minHeight),
181
+ },
182
+ split: {
183
+ count: 1,
184
+ factor: {
185
+ value: 0.333333,
186
+ },
187
+ rate: {
188
+ value: options.splitCount,
189
+ },
190
+ strokeColorOffset: {
191
+ s: options.saturation,
192
+ l: options.brightness,
193
+ },
194
+ particles: {
195
+ group: "split",
196
+ number: {
197
+ value: 0,
198
+ },
199
+ opacity: {
200
+ value: {
201
+ min: 0.1,
202
+ max: 1,
203
+ },
204
+ animation: {
205
+ enable: true,
206
+ speed: { min: 2, max: 4 },
207
+ sync: true,
208
+ startValue: engine.StartValueType.max,
209
+ destroy: engine.DestroyType.min,
210
+ count: 1,
211
+ },
212
+ },
213
+ size: {
214
+ value: { min: 5, max: 10 },
215
+ },
216
+ life: {
217
+ count: 1,
218
+ duration: {
219
+ value: {
220
+ min: 0.5,
221
+ max: 1,
222
+ },
223
+ },
224
+ },
225
+ move: {
226
+ decay: 0.05,
227
+ enable: true,
228
+ gravity: {
229
+ enable: false,
230
+ },
231
+ speed: {
232
+ min: 10,
233
+ max: 25,
234
+ },
235
+ direction: "outside",
236
+ outModes: engine.OutMode.destroy,
237
+ },
238
+ },
239
+ },
240
+ },
241
+ life: {
242
+ count: 1,
243
+ },
244
+ shape: {
245
+ type: "line",
246
+ options: {
247
+ line: {
248
+ cap: "round",
249
+ },
250
+ },
251
+ },
252
+ size: {
253
+ value: { min: 10, max: 20 },
254
+ },
255
+ rotate: {
256
+ path: true,
257
+ },
258
+ move: {
259
+ enable: true,
260
+ gravity: {
261
+ acceleration: engine.setRangeValue(options.gravity),
262
+ enable: true,
263
+ inverse: true,
264
+ maxSpeed: 150,
265
+ },
266
+ speed: engine.setRangeValue(options.speed),
267
+ outModes: {
268
+ default: engine.OutMode.destroy,
269
+ top: engine.OutMode.none,
270
+ },
271
+ },
272
+ },
273
+ sounds: {
274
+ enable: options.sounds,
275
+ events: [
276
+ {
277
+ event: engine.EventType.particleRemoved,
278
+ filter: explodeSoundCheck,
279
+ audio: [
280
+ "https://particles.js.org/audio/explosion0.mp3",
281
+ "https://particles.js.org/audio/explosion1.mp3",
282
+ "https://particles.js.org/audio/explosion2.mp3",
283
+ ],
284
+ },
285
+ ],
286
+ volume: 50,
287
+ },
288
+ };
289
+ }
290
+ async function getFireworksInstance(engine, id, sourceOptions, canvas) {
291
+ const existing = instances.get(id);
292
+ if (existing instanceof Promise) {
293
+ return existing;
294
+ }
295
+ if (existing) {
296
+ return existing;
297
+ }
298
+ const create = async () => {
299
+ const options = new FireworkOptions();
300
+ options.load(sourceOptions);
301
+ const particlesOptions = getOptions(options, canvas), container = await engine.load({ id, element: canvas, options: particlesOptions });
302
+ if (!container) {
303
+ instances.delete(id);
304
+ return;
305
+ }
306
+ const { FireworksInstance } = await Promise.resolve().then(function () { return FireworksInstance$1; }), instance = new FireworksInstance(container);
307
+ instances.set(id, instance);
308
+ return instance;
309
+ }, createPromise = create();
310
+ instances.set(id, createPromise);
311
+ return createPromise;
312
+ }
313
+
314
+ let initPromise = null;
315
+ async function doInitPlugins(engine) {
316
+ engine.checkVersion("4.0.1");
317
+ await engine.pluginManager.register(async (e) => {
318
+ const loadEmittersForFireworks = async (e) => {
319
+ await plugin.loadEmittersPluginSimple(e);
320
+ await pluginEmittersShapeSquare.loadEmittersShapeSquare(e);
321
+ };
322
+ await Promise.all([
323
+ basic.loadBasic(e),
324
+ shapeLine.loadLineShape(e),
325
+ pluginBlend.loadBlendPlugin(e),
326
+ loadEmittersForFireworks(e),
327
+ pluginSounds.loadSoundsPlugin(e),
328
+ updaterRotate.loadRotateUpdater(e),
329
+ updaterDestroy.loadDestroyUpdater(e),
330
+ updaterLife.loadLifeUpdater(e),
331
+ updaterPaint.loadPaintUpdater(e),
332
+ ]);
333
+ });
334
+ }
335
+ async function initPlugins(engine) {
336
+ if (initPromise) {
337
+ return initPromise;
338
+ }
339
+ initPromise = doInitPlugins(engine);
340
+ return initPromise;
341
+ }
342
+ async function fireworks(idOrOptions, sourceOptions) {
343
+ await initPlugins(engine.tsParticles);
344
+ let id, options;
345
+ if (engine.isString(idOrOptions)) {
346
+ id = idOrOptions;
347
+ options = sourceOptions ?? {};
348
+ }
349
+ else {
350
+ id = "fireworks";
351
+ options = idOrOptions ?? {};
352
+ }
353
+ return getFireworksInstance(engine.tsParticles, id, options);
354
+ }
355
+ fireworks.create = async (canvas, options) => {
356
+ await initPlugins(engine.tsParticles);
357
+ const id = canvas?.id ?? "fireworks";
358
+ return getFireworksInstance(engine.tsParticles, id, options ?? {}, canvas ?? undefined);
359
+ };
360
+ fireworks.init = async () => {
361
+ await initPlugins(engine.tsParticles);
362
+ };
363
+ fireworks.version = "4.0.1";
364
+ globalThis.fireworks = fireworks;
365
+
366
+ const globalObject = globalThis;
367
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
368
+ globalObject.fireworks = fireworks;
369
+
370
+ class FireworksInstance {
371
+ _container;
372
+ constructor(container) {
373
+ this._container = container;
374
+ }
375
+ pause() {
376
+ this._container.pause();
377
+ }
378
+ play() {
379
+ this._container.play();
380
+ }
381
+ stop() {
382
+ this._container.stop();
383
+ }
384
+ }
385
+
386
+ var FireworksInstance$1 = /*#__PURE__*/Object.freeze({
387
+ __proto__: null,
388
+ FireworksInstance: FireworksInstance
389
+ });
390
+
391
+ exports.fireworks = fireworks;
392
+
393
+ }));
394
+ Object.assign(globalThis.window || globalThis, { fireworks: (globalThis.__tsParticlesInternals.bundles.fireworks || {}).fireworks });
395
+ delete (globalThis.window || globalThis).tsparticlesInternalExports;