tsparticles 3.9.0 → 4.0.0-alpha.0

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 (315) hide show
  1. package/1392.min.js +2 -0
  2. package/1392.min.js.LICENSE.txt +1 -0
  3. package/1406.min.js +2 -0
  4. package/1406.min.js.LICENSE.txt +1 -0
  5. package/1761.min.js +2 -0
  6. package/1761.min.js.LICENSE.txt +1 -0
  7. package/1878.min.js +2 -0
  8. package/1878.min.js.LICENSE.txt +1 -0
  9. package/198.min.js +2 -0
  10. package/198.min.js.LICENSE.txt +1 -0
  11. package/2058.min.js +2 -0
  12. package/2058.min.js.LICENSE.txt +1 -0
  13. package/2124.min.js +2 -0
  14. package/2124.min.js.LICENSE.txt +1 -0
  15. package/2142.min.js +2 -0
  16. package/2142.min.js.LICENSE.txt +1 -0
  17. package/2243.min.js +2 -0
  18. package/2243.min.js.LICENSE.txt +1 -0
  19. package/2422.min.js +2 -0
  20. package/2422.min.js.LICENSE.txt +1 -0
  21. package/2636.min.js +2 -0
  22. package/2636.min.js.LICENSE.txt +1 -0
  23. package/2739.min.js +2 -0
  24. package/2739.min.js.LICENSE.txt +1 -0
  25. package/2885.min.js +2 -0
  26. package/2885.min.js.LICENSE.txt +1 -0
  27. package/29.min.js +2 -0
  28. package/29.min.js.LICENSE.txt +1 -0
  29. package/2953.min.js +2 -0
  30. package/2953.min.js.LICENSE.txt +1 -0
  31. package/303.min.js +2 -0
  32. package/303.min.js.LICENSE.txt +1 -0
  33. package/3101.min.js +2 -0
  34. package/3101.min.js.LICENSE.txt +1 -0
  35. package/3206.min.js +2 -0
  36. package/3206.min.js.LICENSE.txt +1 -0
  37. package/3241.min.js +2 -0
  38. package/3241.min.js.LICENSE.txt +1 -0
  39. package/3309.min.js +2 -0
  40. package/3309.min.js.LICENSE.txt +1 -0
  41. package/3435.min.js +2 -0
  42. package/3435.min.js.LICENSE.txt +1 -0
  43. package/3493.min.js +2 -0
  44. package/3493.min.js.LICENSE.txt +1 -0
  45. package/350.min.js +2 -0
  46. package/350.min.js.LICENSE.txt +1 -0
  47. package/3522.min.js +2 -0
  48. package/3522.min.js.LICENSE.txt +1 -0
  49. package/3561.min.js +2 -0
  50. package/3561.min.js.LICENSE.txt +1 -0
  51. package/3636.min.js +2 -0
  52. package/3636.min.js.LICENSE.txt +1 -0
  53. package/3710.min.js +2 -0
  54. package/3710.min.js.LICENSE.txt +1 -0
  55. package/3753.min.js +2 -0
  56. package/3753.min.js.LICENSE.txt +1 -0
  57. package/3853.min.js +2 -0
  58. package/3853.min.js.LICENSE.txt +1 -0
  59. package/3872.min.js +2 -0
  60. package/3872.min.js.LICENSE.txt +1 -0
  61. package/3897.min.js +2 -0
  62. package/3897.min.js.LICENSE.txt +1 -0
  63. package/3922.min.js +2 -0
  64. package/3922.min.js.LICENSE.txt +1 -0
  65. package/404.min.js +2 -0
  66. package/404.min.js.LICENSE.txt +1 -0
  67. package/4204.min.js +2 -0
  68. package/4204.min.js.LICENSE.txt +1 -0
  69. package/4231.min.js +2 -0
  70. package/4231.min.js.LICENSE.txt +1 -0
  71. package/4242.min.js +2 -0
  72. package/4242.min.js.LICENSE.txt +1 -0
  73. package/4339.min.js +2 -0
  74. package/4339.min.js.LICENSE.txt +1 -0
  75. package/4398.min.js +2 -0
  76. package/4398.min.js.LICENSE.txt +1 -0
  77. package/4493.min.js +2 -0
  78. package/4493.min.js.LICENSE.txt +1 -0
  79. package/4510.min.js +2 -0
  80. package/4510.min.js.LICENSE.txt +1 -0
  81. package/4565.min.js +2 -0
  82. package/4565.min.js.LICENSE.txt +1 -0
  83. package/4606.min.js +2 -0
  84. package/4606.min.js.LICENSE.txt +1 -0
  85. package/4620.min.js +2 -0
  86. package/4620.min.js.LICENSE.txt +1 -0
  87. package/4743.min.js +2 -0
  88. package/4743.min.js.LICENSE.txt +1 -0
  89. package/491.min.js +2 -0
  90. package/491.min.js.LICENSE.txt +1 -0
  91. package/508.min.js +2 -0
  92. package/508.min.js.LICENSE.txt +1 -0
  93. package/5082.min.js +2 -0
  94. package/5082.min.js.LICENSE.txt +1 -0
  95. package/5243.min.js +2 -0
  96. package/5243.min.js.LICENSE.txt +1 -0
  97. package/5322.min.js +2 -0
  98. package/5322.min.js.LICENSE.txt +1 -0
  99. package/5433.min.js +2 -0
  100. package/5433.min.js.LICENSE.txt +1 -0
  101. package/5504.min.js +2 -0
  102. package/5504.min.js.LICENSE.txt +1 -0
  103. package/5563.min.js +2 -0
  104. package/5563.min.js.LICENSE.txt +1 -0
  105. package/5635.min.js +2 -0
  106. package/5635.min.js.LICENSE.txt +1 -0
  107. package/5689.min.js +2 -0
  108. package/5689.min.js.LICENSE.txt +1 -0
  109. package/5693.min.js +2 -0
  110. package/5693.min.js.LICENSE.txt +1 -0
  111. package/5728.min.js +2 -0
  112. package/5728.min.js.LICENSE.txt +1 -0
  113. package/5749.min.js +2 -0
  114. package/5749.min.js.LICENSE.txt +1 -0
  115. package/5770.min.js +2 -0
  116. package/5770.min.js.LICENSE.txt +1 -0
  117. package/582.min.js +2 -0
  118. package/582.min.js.LICENSE.txt +1 -0
  119. package/5885.min.js +2 -0
  120. package/5885.min.js.LICENSE.txt +1 -0
  121. package/590.min.js +2 -0
  122. package/590.min.js.LICENSE.txt +1 -0
  123. package/5917.min.js +2 -0
  124. package/5917.min.js.LICENSE.txt +1 -0
  125. package/6024.min.js +2 -0
  126. package/6024.min.js.LICENSE.txt +1 -0
  127. package/6137.min.js +2 -0
  128. package/6137.min.js.LICENSE.txt +1 -0
  129. package/617.min.js +2 -0
  130. package/617.min.js.LICENSE.txt +1 -0
  131. package/6416.min.js +2 -0
  132. package/6416.min.js.LICENSE.txt +1 -0
  133. package/6560.min.js +2 -0
  134. package/6560.min.js.LICENSE.txt +1 -0
  135. package/6674.min.js +2 -0
  136. package/6674.min.js.LICENSE.txt +1 -0
  137. package/6866.min.js +2 -0
  138. package/6866.min.js.LICENSE.txt +1 -0
  139. package/704.min.js +2 -0
  140. package/704.min.js.LICENSE.txt +1 -0
  141. package/731.min.js +2 -0
  142. package/731.min.js.LICENSE.txt +1 -0
  143. package/7321.min.js +2 -0
  144. package/7321.min.js.LICENSE.txt +1 -0
  145. package/7489.min.js +2 -0
  146. package/7489.min.js.LICENSE.txt +1 -0
  147. package/7571.min.js +2 -0
  148. package/7571.min.js.LICENSE.txt +1 -0
  149. package/7753.min.js +2 -0
  150. package/7753.min.js.LICENSE.txt +1 -0
  151. package/8127.min.js +2 -0
  152. package/8127.min.js.LICENSE.txt +1 -0
  153. package/8182.min.js +2 -0
  154. package/8182.min.js.LICENSE.txt +1 -0
  155. package/8191.min.js +2 -0
  156. package/8191.min.js.LICENSE.txt +1 -0
  157. package/8230.min.js +2 -0
  158. package/8230.min.js.LICENSE.txt +1 -0
  159. package/8245.min.js +2 -0
  160. package/8245.min.js.LICENSE.txt +1 -0
  161. package/8365.min.js +2 -0
  162. package/8365.min.js.LICENSE.txt +1 -0
  163. package/8420.min.js +2 -0
  164. package/8420.min.js.LICENSE.txt +1 -0
  165. package/8440.min.js +2 -0
  166. package/8440.min.js.LICENSE.txt +1 -0
  167. package/8470.min.js +2 -0
  168. package/8470.min.js.LICENSE.txt +1 -0
  169. package/8484.min.js +2 -0
  170. package/8484.min.js.LICENSE.txt +1 -0
  171. package/869.min.js +2 -0
  172. package/869.min.js.LICENSE.txt +1 -0
  173. package/8770.min.js +2 -0
  174. package/8770.min.js.LICENSE.txt +1 -0
  175. package/8848.min.js +2 -0
  176. package/8848.min.js.LICENSE.txt +1 -0
  177. package/8930.min.js +2 -0
  178. package/8930.min.js.LICENSE.txt +1 -0
  179. package/9149.min.js +2 -0
  180. package/9149.min.js.LICENSE.txt +1 -0
  181. package/917.min.js +2 -0
  182. package/917.min.js.LICENSE.txt +1 -0
  183. package/9287.min.js +2 -0
  184. package/9287.min.js.LICENSE.txt +1 -0
  185. package/9754.min.js +2 -0
  186. package/9754.min.js.LICENSE.txt +1 -0
  187. package/9825.min.js +2 -0
  188. package/9825.min.js.LICENSE.txt +1 -0
  189. package/9907.min.js +2 -0
  190. package/9907.min.js.LICENSE.txt +1 -0
  191. package/9915.min.js +2 -0
  192. package/9915.min.js.LICENSE.txt +1 -0
  193. package/9944.min.js +2 -0
  194. package/9944.min.js.LICENSE.txt +1 -0
  195. package/9950.min.js +2 -0
  196. package/9950.min.js.LICENSE.txt +1 -0
  197. package/9965.min.js +2 -0
  198. package/9965.min.js.LICENSE.txt +1 -0
  199. package/basic_dist_browser_index_js.js +30 -0
  200. package/browser/bundle.js +1 -1
  201. package/browser/index.js +17 -26
  202. package/cjs/bundle.js +3 -20
  203. package/cjs/index.js +17 -29
  204. package/engine_dist_browser_Core_Container_js.js +100 -0
  205. package/esm/bundle.js +1 -1
  206. package/esm/index.js +17 -26
  207. package/interactions_external_attract_dist_browser_Attractor_js.js +40 -0
  208. package/interactions_external_attract_dist_browser_index_js.js +40 -0
  209. package/interactions_external_bounce_dist_browser_Bouncer_js.js +40 -0
  210. package/interactions_external_bounce_dist_browser_index_js.js +40 -0
  211. package/interactions_external_bubble_dist_browser_Bubbler_js.js +50 -0
  212. package/interactions_external_bubble_dist_browser_index_js.js +60 -0
  213. package/interactions_external_connect_dist_browser_Connector_js.js +40 -0
  214. package/interactions_external_connect_dist_browser_index_js.js +50 -0
  215. package/interactions_external_grab_dist_browser_Grabber_js.js +40 -0
  216. package/interactions_external_grab_dist_browser_index_js.js +50 -0
  217. package/interactions_external_pause_dist_browser_Pauser_js.js +30 -0
  218. package/interactions_external_pause_dist_browser_index_js.js +30 -0
  219. package/interactions_external_push_dist_browser_Pusher_js.js +30 -0
  220. package/interactions_external_push_dist_browser_index_js.js +40 -0
  221. package/interactions_external_remove_dist_browser_Remover_js.js +30 -0
  222. package/interactions_external_remove_dist_browser_index_js.js +40 -0
  223. package/interactions_external_repulse_dist_browser_Repulser_js.js +30 -0
  224. package/interactions_external_repulse_dist_browser_index_js.js +60 -0
  225. package/interactions_external_slow_dist_browser_Slower_js.js +30 -0
  226. package/interactions_external_slow_dist_browser_index_js.js +40 -0
  227. package/interactions_external_trail_dist_browser_TrailMaker_js.js +30 -0
  228. package/interactions_external_trail_dist_browser_index_js.js +40 -0
  229. package/interactions_particles_attract_dist_browser_Attractor_js.js +30 -0
  230. package/interactions_particles_attract_dist_browser_index_js.js +30 -0
  231. package/interactions_particles_collisions_dist_browser_Collider_js.js +110 -0
  232. package/interactions_particles_collisions_dist_browser_OverlapPlugin_js.js +40 -0
  233. package/interactions_particles_collisions_dist_browser_index_js.js +30 -0
  234. package/interactions_particles_links_dist_browser_Linker_js.js +40 -0
  235. package/interactions_particles_links_dist_browser_LinksPlugin_js.js +50 -0
  236. package/interactions_particles_links_dist_browser_index_js.js +60 -0
  237. package/interactions_particles_links_dist_browser_interaction_js.js +30 -0
  238. package/interactions_particles_links_dist_browser_plugin_js.js +30 -0
  239. package/move_base_dist_browser_BaseMover_js.js +40 -0
  240. package/move_base_dist_browser_index_js.js +30 -0
  241. package/move_parallax_dist_browser_ParallaxMover_js.js +30 -0
  242. package/move_parallax_dist_browser_index_js.js +30 -0
  243. package/package.json +16 -15
  244. package/plugins_absorbers_dist_browser_AbsorbersPlugin_js.js +80 -0
  245. package/plugins_absorbers_dist_browser_index_js.js +40 -0
  246. package/plugins_colors_hex_dist_browser_HexColorManager_js.js +30 -0
  247. package/plugins_colors_hex_dist_browser_index_js.js +30 -0
  248. package/plugins_colors_hsl_dist_browser_HslColorManager_js.js +30 -0
  249. package/plugins_colors_hsl_dist_browser_index_js.js +30 -0
  250. package/plugins_colors_rgb_dist_browser_RgbColorManager_js.js +30 -0
  251. package/plugins_colors_rgb_dist_browser_index_js.js +30 -0
  252. package/plugins_easings_quad_dist_browser_index_js.js +30 -0
  253. package/plugins_emittersShapes_circle_dist_browser_EmittersCircleShapeGenerator_js.js +70 -0
  254. package/plugins_emittersShapes_circle_dist_browser_index_js.js +30 -0
  255. package/plugins_emittersShapes_square_dist_browser_EmittersSquareShapeGenerator_js.js +70 -0
  256. package/plugins_emittersShapes_square_dist_browser_index_js.js +30 -0
  257. package/plugins_emitters_dist_browser_EmittersPlugin_js.js +110 -0
  258. package/plugins_emitters_dist_browser_ShapeManager_js.js +30 -0
  259. package/plugins_emitters_dist_browser_index_js.js +50 -0
  260. package/report.html +5 -4
  261. package/shapes_circle_dist_browser_CircleDrawer_js.js +40 -0
  262. package/shapes_circle_dist_browser_index_js.js +30 -0
  263. package/shapes_emoji_dist_browser_EmojiDrawer_js.js +40 -0
  264. package/shapes_emoji_dist_browser_index_js.js +30 -0
  265. package/shapes_image_dist_browser_GifUtils_Utils_js.js +80 -0
  266. package/shapes_image_dist_browser_ImageDrawer_js.js +30 -0
  267. package/shapes_image_dist_browser_ImagePreloader_js.js +40 -0
  268. package/shapes_image_dist_browser_Utils_js.js +30 -0
  269. package/shapes_image_dist_browser_index_js.js +30 -0
  270. package/shapes_line_dist_browser_LineDrawer_js.js +40 -0
  271. package/shapes_line_dist_browser_index_js.js +30 -0
  272. package/shapes_polygon_dist_browser_PolygonDrawer_js.js +50 -0
  273. package/shapes_polygon_dist_browser_TriangleDrawer_js.js +50 -0
  274. package/shapes_polygon_dist_browser_index_js.js +30 -0
  275. package/shapes_square_dist_browser_SquareDrawer_js.js +40 -0
  276. package/shapes_square_dist_browser_index_js.js +30 -0
  277. package/shapes_star_dist_browser_StarDrawer_js.js +40 -0
  278. package/shapes_star_dist_browser_index_js.js +30 -0
  279. package/shapes_text_dist_browser_TextDrawer_js.js +40 -0
  280. package/shapes_text_dist_browser_index_js.js +30 -0
  281. package/slim_dist_browser_index_js.js +30 -0
  282. package/tsparticles.bundle.js +543 -3662
  283. package/tsparticles.bundle.min.js +1 -1
  284. package/tsparticles.bundle.min.js.LICENSE.txt +1 -1
  285. package/tsparticles.js +77 -53
  286. package/tsparticles.min.js +1 -1
  287. package/tsparticles.min.js.LICENSE.txt +1 -1
  288. package/types/bundle.d.ts +1 -1
  289. package/types/index.d.ts +1 -1
  290. package/umd/bundle.js +3 -3
  291. package/umd/index.js +52 -27
  292. package/updaters_color_dist_browser_ColorUpdater_js.js +30 -0
  293. package/updaters_color_dist_browser_index_js.js +30 -0
  294. package/updaters_destroy_dist_browser_DestroyUpdater_js.js +100 -0
  295. package/updaters_destroy_dist_browser_index_js.js +30 -0
  296. package/updaters_life_dist_browser_LifeUpdater_js.js +70 -0
  297. package/updaters_life_dist_browser_index_js.js +30 -0
  298. package/updaters_opacity_dist_browser_OpacityUpdater_js.js +30 -0
  299. package/updaters_opacity_dist_browser_index_js.js +30 -0
  300. package/updaters_outModes_dist_browser_OutOfCanvasUpdater_js.js +80 -0
  301. package/updaters_outModes_dist_browser_index_js.js +30 -0
  302. package/updaters_roll_dist_browser_RollUpdater_js.js +70 -0
  303. package/updaters_roll_dist_browser_index_js.js +30 -0
  304. package/updaters_rotate_dist_browser_RotateUpdater_js.js +50 -0
  305. package/updaters_rotate_dist_browser_index_js.js +30 -0
  306. package/updaters_size_dist_browser_SizeUpdater_js.js +30 -0
  307. package/updaters_size_dist_browser_index_js.js +30 -0
  308. package/updaters_strokeColor_dist_browser_StrokeColorUpdater_js.js +30 -0
  309. package/updaters_strokeColor_dist_browser_index_js.js +30 -0
  310. package/updaters_tilt_dist_browser_TiltUpdater_js.js +60 -0
  311. package/updaters_tilt_dist_browser_index_js.js +30 -0
  312. package/updaters_twinkle_dist_browser_TwinkleUpdater_js.js +50 -0
  313. package/updaters_twinkle_dist_browser_index_js.js +30 -0
  314. package/updaters_wobble_dist_browser_WobbleUpdater_js.js +60 -0
  315. package/updaters_wobble_dist_browser_index_js.js +30 -0
@@ -0,0 +1,100 @@
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-alpha.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunktsparticles"] = this["webpackChunktsparticles"] || []).push([["updaters_destroy_dist_browser_DestroyUpdater_js"],{
19
+
20
+ /***/ "../../updaters/destroy/dist/browser/DestroyUpdater.js"
21
+ /*!*************************************************************!*\
22
+ !*** ../../updaters/destroy/dist/browser/DestroyUpdater.js ***!
23
+ \*************************************************************/
24
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
+
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DestroyUpdater: () => (/* binding */ DestroyUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _Options_Classes_Destroy_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/Destroy.js */ \"../../updaters/destroy/dist/browser/Options/Classes/Destroy.js\");\n/* harmony import */ var _Enums_DestroyMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Enums/DestroyMode.js */ \"../../updaters/destroy/dist/browser/Enums/DestroyMode.js\");\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Utils.js */ \"../../updaters/destroy/dist/browser/Utils.js\");\n\n\n\n\nclass DestroyUpdater {\n constructor(engine, container) {\n this.container = container;\n this.engine = engine;\n }\n init(particle) {\n const container = this.container,\n particlesOptions = particle.options,\n destroyOptions = particlesOptions.destroy;\n if (!destroyOptions) {\n return;\n }\n particle.splitCount = 0;\n const destroyBoundsOptions = destroyOptions.bounds;\n particle.destroyBounds ??= {};\n const {\n bottom,\n left,\n right,\n top\n } = destroyBoundsOptions,\n {\n destroyBounds\n } = particle,\n canvasSize = container.canvas.size;\n if (bottom) {\n destroyBounds.bottom = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(bottom) * canvasSize.height / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator;\n }\n if (left) {\n destroyBounds.left = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(left) * canvasSize.width / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator;\n }\n if (right) {\n destroyBounds.right = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(right) * canvasSize.width / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator;\n }\n if (top) {\n destroyBounds.top = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(top) * canvasSize.height / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator;\n }\n }\n isEnabled(particle) {\n return !particle.destroyed;\n }\n loadOptions(options, ...sources) {\n options.destroy ??= new _Options_Classes_Destroy_js__WEBPACK_IMPORTED_MODULE_1__.Destroy();\n for (const source of sources) {\n options.destroy.load(source?.destroy);\n }\n }\n particleDestroyed(particle, override) {\n if (override) {\n return;\n }\n const destroyOptions = particle.options.destroy;\n if (destroyOptions?.mode === _Enums_DestroyMode_js__WEBPACK_IMPORTED_MODULE_2__.DestroyMode.split) {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__.split)(this.engine, this.container, particle);\n }\n }\n update(particle) {\n if (!this.isEnabled(particle)) {\n return;\n }\n const position = particle.getPosition(),\n bounds = particle.destroyBounds;\n if (!bounds) {\n return;\n }\n if (bounds.bottom !== undefined && position.y >= bounds.bottom || bounds.left !== undefined && position.x <= bounds.left || bounds.right !== undefined && position.x >= bounds.right || bounds.top !== undefined && position.y <= bounds.top) {\n particle.destroy();\n }\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/destroy/dist/browser/DestroyUpdater.js?\n}");
27
+
28
+ /***/ },
29
+
30
+ /***/ "../../updaters/destroy/dist/browser/Enums/DestroyMode.js"
31
+ /*!****************************************************************!*\
32
+ !*** ../../updaters/destroy/dist/browser/Enums/DestroyMode.js ***!
33
+ \****************************************************************/
34
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
35
+
36
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DestroyMode: () => (/* binding */ DestroyMode)\n/* harmony export */ });\nvar DestroyMode;\n(function (DestroyMode) {\n DestroyMode[\"none\"] = \"none\";\n DestroyMode[\"split\"] = \"split\";\n})(DestroyMode || (DestroyMode = {}));\n\n//# sourceURL=webpack://tsparticles/../../updaters/destroy/dist/browser/Enums/DestroyMode.js?\n}");
37
+
38
+ /***/ },
39
+
40
+ /***/ "../../updaters/destroy/dist/browser/Options/Classes/Destroy.js"
41
+ /*!**********************************************************************!*\
42
+ !*** ../../updaters/destroy/dist/browser/Options/Classes/Destroy.js ***!
43
+ \**********************************************************************/
44
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
45
+
46
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Destroy: () => (/* binding */ Destroy)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _DestroyBounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DestroyBounds.js */ \"../../updaters/destroy/dist/browser/Options/Classes/DestroyBounds.js\");\n/* harmony import */ var _Enums_DestroyMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Enums/DestroyMode.js */ \"../../updaters/destroy/dist/browser/Enums/DestroyMode.js\");\n/* harmony import */ var _Split_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Split.js */ \"../../updaters/destroy/dist/browser/Options/Classes/Split.js\");\n\n\n\n\nclass Destroy {\n constructor() {\n this.bounds = new _DestroyBounds_js__WEBPACK_IMPORTED_MODULE_1__.DestroyBounds();\n this.mode = _Enums_DestroyMode_js__WEBPACK_IMPORTED_MODULE_2__.DestroyMode.none;\n this.split = new _Split_js__WEBPACK_IMPORTED_MODULE_3__.Split();\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.mode) {\n this.mode = data.mode;\n }\n if (data.bounds) {\n this.bounds.load(data.bounds);\n }\n this.split.load(data.split);\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/destroy/dist/browser/Options/Classes/Destroy.js?\n}");
47
+
48
+ /***/ },
49
+
50
+ /***/ "../../updaters/destroy/dist/browser/Options/Classes/DestroyBounds.js"
51
+ /*!****************************************************************************!*\
52
+ !*** ../../updaters/destroy/dist/browser/Options/Classes/DestroyBounds.js ***!
53
+ \****************************************************************************/
54
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
55
+
56
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DestroyBounds: () => (/* binding */ DestroyBounds)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass DestroyBounds {\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.bottom !== undefined) {\n this.bottom = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.bottom);\n }\n if (data.left !== undefined) {\n this.left = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.left);\n }\n if (data.right !== undefined) {\n this.right = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.right);\n }\n if (data.top !== undefined) {\n this.top = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.top);\n }\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/destroy/dist/browser/Options/Classes/DestroyBounds.js?\n}");
57
+
58
+ /***/ },
59
+
60
+ /***/ "../../updaters/destroy/dist/browser/Options/Classes/Split.js"
61
+ /*!********************************************************************!*\
62
+ !*** ../../updaters/destroy/dist/browser/Options/Classes/Split.js ***!
63
+ \********************************************************************/
64
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
65
+
66
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Split: () => (/* binding */ Split)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _SplitFactor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SplitFactor.js */ \"../../updaters/destroy/dist/browser/Options/Classes/SplitFactor.js\");\n/* harmony import */ var _SplitRate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SplitRate.js */ \"../../updaters/destroy/dist/browser/Options/Classes/SplitRate.js\");\n\n\n\nclass Split {\n constructor() {\n this.count = 1;\n this.factor = new _SplitFactor_js__WEBPACK_IMPORTED_MODULE_1__.SplitFactor();\n this.rate = new _SplitRate_js__WEBPACK_IMPORTED_MODULE_2__.SplitRate();\n this.sizeOffset = true;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.color !== undefined) {\n this.color = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OptionsColor.create(this.color, data.color);\n }\n if (data.count !== undefined) {\n this.count = data.count;\n }\n this.factor.load(data.factor);\n this.rate.load(data.rate);\n this.particles = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.executeOnSingleOrMultiple)(data.particles, particles => {\n return (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, particles);\n });\n if (data.sizeOffset !== undefined) {\n this.sizeOffset = data.sizeOffset;\n }\n if (data.colorOffset) {\n this.colorOffset = this.colorOffset ?? {};\n if (data.colorOffset.h !== undefined) {\n this.colorOffset.h = data.colorOffset.h;\n }\n if (data.colorOffset.s !== undefined) {\n this.colorOffset.s = data.colorOffset.s;\n }\n if (data.colorOffset.l !== undefined) {\n this.colorOffset.l = data.colorOffset.l;\n }\n }\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/destroy/dist/browser/Options/Classes/Split.js?\n}");
67
+
68
+ /***/ },
69
+
70
+ /***/ "../../updaters/destroy/dist/browser/Options/Classes/SplitFactor.js"
71
+ /*!**************************************************************************!*\
72
+ !*** ../../updaters/destroy/dist/browser/Options/Classes/SplitFactor.js ***!
73
+ \**************************************************************************/
74
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
75
+
76
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SplitFactor: () => (/* binding */ SplitFactor)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass SplitFactor extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ValueWithRandom {\n constructor() {\n super();\n this.value = 3;\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/destroy/dist/browser/Options/Classes/SplitFactor.js?\n}");
77
+
78
+ /***/ },
79
+
80
+ /***/ "../../updaters/destroy/dist/browser/Options/Classes/SplitRate.js"
81
+ /*!************************************************************************!*\
82
+ !*** ../../updaters/destroy/dist/browser/Options/Classes/SplitRate.js ***!
83
+ \************************************************************************/
84
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
85
+
86
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SplitRate: () => (/* binding */ SplitRate)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass SplitRate extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ValueWithRandom {\n constructor() {\n super();\n this.value = {\n min: 4,\n max: 9\n };\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/destroy/dist/browser/Options/Classes/SplitRate.js?\n}");
87
+
88
+ /***/ },
89
+
90
+ /***/ "../../updaters/destroy/dist/browser/Utils.js"
91
+ /*!****************************************************!*\
92
+ !*** ../../updaters/destroy/dist/browser/Utils.js ***!
93
+ \****************************************************/
94
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
95
+
96
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ split: () => (/* binding */ split)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst defaultOffset = 0,\n minDestroySize = 0.5,\n defaultSplitCount = 0,\n increment = 1,\n unbreakableTime = 500,\n minSplitCount = 0;\nfunction addSplitParticle(engine, container, parent, splitParticlesOptions) {\n const destroyOptions = parent.options.destroy;\n if (!destroyOptions) {\n return;\n }\n const splitOptions = destroyOptions.split,\n options = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.loadParticlesOptions)(engine, container, parent.options),\n factor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(splitOptions.factor.value),\n parentColor = parent.getFillColor();\n if (splitOptions.color) {\n options.color.load(splitOptions.color);\n } else if (splitOptions.colorOffset && parentColor) {\n options.color.load({\n value: {\n hsl: {\n h: parentColor.h + (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(splitOptions.colorOffset.h ?? defaultOffset),\n s: parentColor.s + (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(splitOptions.colorOffset.s ?? defaultOffset),\n l: parentColor.l + (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(splitOptions.colorOffset.l ?? defaultOffset)\n }\n }\n });\n } else {\n options.color.load({\n value: {\n hsl: parent.getFillColor()\n }\n });\n }\n options.move.load({\n center: {\n x: parent.position.x,\n y: parent.position.y,\n mode: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.PixelMode.precise\n }\n });\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNumber)(options.size.value)) {\n options.size.value /= factor;\n } else {\n options.size.value.min /= factor;\n options.size.value.max /= factor;\n }\n options.load(splitParticlesOptions);\n const offset = splitOptions.sizeOffset ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(-parent.size.value, parent.size.value) : defaultOffset,\n position = {\n x: parent.position.x + (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)(offset),\n y: parent.position.y + (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)(offset)\n };\n return container.particles.addParticle(position, options, parent.group, particle => {\n if (particle.size.value < minDestroySize) {\n return false;\n }\n particle.velocity.length = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(parent.velocity.length, particle.velocity.length));\n particle.splitCount = (parent.splitCount ?? defaultSplitCount) + increment;\n particle.unbreakable = true;\n setTimeout(() => {\n particle.unbreakable = false;\n }, unbreakableTime);\n return true;\n });\n}\nfunction split(engine, container, particle) {\n const destroyOptions = particle.options.destroy;\n if (!destroyOptions) {\n return;\n }\n const splitOptions = destroyOptions.split;\n if (splitOptions.count >= minSplitCount && (particle.splitCount === undefined || particle.splitCount++ > splitOptions.count)) {\n return;\n }\n const rate = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(splitOptions.rate.value),\n particlesSplitOptions = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.itemFromSingleOrMultiple)(splitOptions.particles);\n for (let i = 0; i < rate; i++) {\n addSplitParticle(engine, container, particle, particlesSplitOptions);\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/destroy/dist/browser/Utils.js?\n}");
97
+
98
+ /***/ }
99
+
100
+ }]);
@@ -0,0 +1,30 @@
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-alpha.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunktsparticles"] = this["webpackChunktsparticles"] || []).push([["updaters_destroy_dist_browser_index_js"],{
19
+
20
+ /***/ "../../updaters/destroy/dist/browser/index.js"
21
+ /*!****************************************************!*\
22
+ !*** ../../updaters/destroy/dist/browser/index.js ***!
23
+ \****************************************************/
24
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
+
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadDestroyUpdater: () => (/* binding */ loadDestroyUpdater)\n/* harmony export */ });\nfunction loadDestroyUpdater(engine) {\n engine.checkVersion(\"4.0.0-alpha.0\");\n engine.register(e => {\n e.addParticleUpdater(\"destroy\", async container => {\n const {\n DestroyUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_destroy_dist_browser_DestroyUpdater_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./DestroyUpdater.js */ \"../../updaters/destroy/dist/browser/DestroyUpdater.js\"));\n return new DestroyUpdater(e, container);\n });\n });\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/destroy/dist/browser/index.js?\n}");
27
+
28
+ /***/ }
29
+
30
+ }]);
@@ -0,0 +1,70 @@
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-alpha.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunktsparticles"] = this["webpackChunktsparticles"] || []).push([["updaters_life_dist_browser_LifeUpdater_js"],{
19
+
20
+ /***/ "../../updaters/life/dist/browser/LifeUpdater.js"
21
+ /*!*******************************************************!*\
22
+ !*** ../../updaters/life/dist/browser/LifeUpdater.js ***!
23
+ \*******************************************************/
24
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
+
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LifeUpdater: () => (/* binding */ LifeUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _Options_Classes_Life_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/Life.js */ \"../../updaters/life/dist/browser/Options/Classes/Life.js\");\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Utils.js */ \"../../updaters/life/dist/browser/Utils.js\");\n\n\n\nconst noTime = 0,\n identity = 1,\n infiniteValue = -1;\nclass LifeUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const container = this.container,\n particlesOptions = particle.options,\n lifeOptions = particlesOptions.life;\n if (!lifeOptions) {\n return;\n }\n particle.life = {\n delay: container.retina.reduceFactor ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(lifeOptions.delay.value) * (lifeOptions.delay.sync ? identity : (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)()) / container.retina.reduceFactor * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds : noTime,\n delayTime: noTime,\n duration: container.retina.reduceFactor ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(lifeOptions.duration.value) * (lifeOptions.duration.sync ? identity : (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)()) / container.retina.reduceFactor * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds : noTime,\n time: noTime,\n count: lifeOptions.count\n };\n if (particle.life.duration <= noTime) {\n particle.life.duration = infiniteValue;\n }\n if (particle.life.count <= noTime) {\n particle.life.count = infiniteValue;\n }\n particle.spawning = particle.life.delay > noTime;\n }\n isEnabled(particle) {\n return !particle.destroyed;\n }\n loadOptions(options, ...sources) {\n options.life ??= new _Options_Classes_Life_js__WEBPACK_IMPORTED_MODULE_1__.Life();\n for (const source of sources) {\n options.life.load(source?.life);\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle) || !particle.life) {\n return;\n }\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_2__.updateLife)(particle, delta, this.container.canvas.size);\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/life/dist/browser/LifeUpdater.js?\n}");
27
+
28
+ /***/ },
29
+
30
+ /***/ "../../updaters/life/dist/browser/Options/Classes/Life.js"
31
+ /*!****************************************************************!*\
32
+ !*** ../../updaters/life/dist/browser/Options/Classes/Life.js ***!
33
+ \****************************************************************/
34
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
35
+
36
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Life: () => (/* binding */ Life)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _LifeDelay_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LifeDelay.js */ \"../../updaters/life/dist/browser/Options/Classes/LifeDelay.js\");\n/* harmony import */ var _LifeDuration_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LifeDuration.js */ \"../../updaters/life/dist/browser/Options/Classes/LifeDuration.js\");\n\n\n\nclass Life {\n constructor() {\n this.count = 0;\n this.delay = new _LifeDelay_js__WEBPACK_IMPORTED_MODULE_1__.LifeDelay();\n this.duration = new _LifeDuration_js__WEBPACK_IMPORTED_MODULE_2__.LifeDuration();\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.count !== undefined) {\n this.count = data.count;\n }\n this.delay.load(data.delay);\n this.duration.load(data.duration);\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/life/dist/browser/Options/Classes/Life.js?\n}");
37
+
38
+ /***/ },
39
+
40
+ /***/ "../../updaters/life/dist/browser/Options/Classes/LifeDelay.js"
41
+ /*!*********************************************************************!*\
42
+ !*** ../../updaters/life/dist/browser/Options/Classes/LifeDelay.js ***!
43
+ \*********************************************************************/
44
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
45
+
46
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LifeDelay: () => (/* binding */ LifeDelay)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass LifeDelay extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ValueWithRandom {\n constructor() {\n super();\n this.sync = false;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n super.load(data);\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/life/dist/browser/Options/Classes/LifeDelay.js?\n}");
47
+
48
+ /***/ },
49
+
50
+ /***/ "../../updaters/life/dist/browser/Options/Classes/LifeDuration.js"
51
+ /*!************************************************************************!*\
52
+ !*** ../../updaters/life/dist/browser/Options/Classes/LifeDuration.js ***!
53
+ \************************************************************************/
54
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
55
+
56
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LifeDuration: () => (/* binding */ LifeDuration)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass LifeDuration extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ValueWithRandom {\n constructor() {\n super();\n this.sync = false;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n super.load(data);\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/life/dist/browser/Options/Classes/LifeDuration.js?\n}");
57
+
58
+ /***/ },
59
+
60
+ /***/ "../../updaters/life/dist/browser/Utils.js"
61
+ /*!*************************************************!*\
62
+ !*** ../../updaters/life/dist/browser/Utils.js ***!
63
+ \*************************************************/
64
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
65
+
66
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ updateLife: () => (/* binding */ updateLife)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst noTime = 0,\n infiniteValue = -1,\n noLife = 0,\n minCanvasSize = 0;\nfunction updateLife(particle, delta, canvasSize) {\n if (!particle.life) {\n return;\n }\n const life = particle.life;\n let justSpawned = false;\n if (particle.spawning) {\n life.delayTime += delta.value;\n if (life.delayTime >= particle.life.delay) {\n justSpawned = true;\n particle.spawning = false;\n life.delayTime = noTime;\n life.time = noTime;\n } else {\n return;\n }\n }\n if (life.duration === infiniteValue) {\n return;\n }\n if (justSpawned) {\n life.time = noTime;\n } else {\n life.time += delta.value;\n }\n if (life.time < life.duration) {\n return;\n }\n life.time = noTime;\n if (particle.life.count > noLife) {\n particle.life.count--;\n }\n if (particle.life.count === noLife) {\n particle.destroy();\n return;\n }\n const widthRange = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(minCanvasSize, canvasSize.width),\n heightRange = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(minCanvasSize, canvasSize.width);\n particle.position.x = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)(widthRange);\n particle.position.y = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)(heightRange);\n particle.spawning = true;\n life.delayTime = noTime;\n life.time = noTime;\n particle.reset();\n const lifeOptions = particle.options.life;\n if (lifeOptions) {\n life.delay = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(lifeOptions.delay.value) * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds;\n life.duration = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(lifeOptions.duration.value) * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds;\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/life/dist/browser/Utils.js?\n}");
67
+
68
+ /***/ }
69
+
70
+ }]);
@@ -0,0 +1,30 @@
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-alpha.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunktsparticles"] = this["webpackChunktsparticles"] || []).push([["updaters_life_dist_browser_index_js"],{
19
+
20
+ /***/ "../../updaters/life/dist/browser/index.js"
21
+ /*!*************************************************!*\
22
+ !*** ../../updaters/life/dist/browser/index.js ***!
23
+ \*************************************************/
24
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
+
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadLifeUpdater: () => (/* binding */ loadLifeUpdater)\n/* harmony export */ });\nfunction loadLifeUpdater(engine) {\n engine.checkVersion(\"4.0.0-alpha.0\");\n engine.register(e => {\n e.addParticleUpdater(\"life\", async container => {\n const {\n LifeUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_life_dist_browser_LifeUpdater_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./LifeUpdater.js */ \"../../updaters/life/dist/browser/LifeUpdater.js\"));\n return new LifeUpdater(container);\n });\n });\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/life/dist/browser/index.js?\n}");
27
+
28
+ /***/ }
29
+
30
+ }]);
@@ -0,0 +1,30 @@
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-alpha.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunktsparticles"] = this["webpackChunktsparticles"] || []).push([["updaters_opacity_dist_browser_OpacityUpdater_js"],{
19
+
20
+ /***/ "../../updaters/opacity/dist/browser/OpacityUpdater.js"
21
+ /*!*************************************************************!*\
22
+ !*** ../../updaters/opacity/dist/browser/OpacityUpdater.js ***!
23
+ \*************************************************************/
24
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
+
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OpacityUpdater: () => (/* binding */ OpacityUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass OpacityUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const opacityOptions = particle.options.opacity,\n pxRatio = 1;\n particle.opacity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.initParticleNumericAnimationValue)(opacityOptions, pxRatio);\n const opacityAnimation = opacityOptions.animation;\n if (opacityAnimation.enable) {\n particle.opacity.velocity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(opacityAnimation.speed) / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator * this.container.retina.reduceFactor;\n if (!opacityAnimation.sync) {\n particle.opacity.velocity *= (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)();\n }\n }\n }\n isEnabled(particle) {\n const none = 0;\n return !particle.destroyed && !particle.spawning && !!particle.opacity && particle.opacity.enable && ((particle.opacity.maxLoops ?? none) <= none || (particle.opacity.maxLoops ?? none) > none && (particle.opacity.loops ?? none) < (particle.opacity.maxLoops ?? none));\n }\n reset(particle) {\n if (particle.opacity) {\n particle.opacity.time = 0;\n particle.opacity.loops = 0;\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle) || !particle.opacity) {\n return;\n }\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.updateAnimation)(particle, particle.opacity, true, particle.options.opacity.animation.destroy, delta);\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/opacity/dist/browser/OpacityUpdater.js?\n}");
27
+
28
+ /***/ }
29
+
30
+ }]);
@@ -0,0 +1,30 @@
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-alpha.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunktsparticles"] = this["webpackChunktsparticles"] || []).push([["updaters_opacity_dist_browser_index_js"],{
19
+
20
+ /***/ "../../updaters/opacity/dist/browser/index.js"
21
+ /*!****************************************************!*\
22
+ !*** ../../updaters/opacity/dist/browser/index.js ***!
23
+ \****************************************************/
24
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
+
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadOpacityUpdater: () => (/* binding */ loadOpacityUpdater)\n/* harmony export */ });\nfunction loadOpacityUpdater(engine) {\n engine.checkVersion(\"4.0.0-alpha.0\");\n engine.register(e => {\n e.addParticleUpdater(\"opacity\", async container => {\n const {\n OpacityUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_opacity_dist_browser_OpacityUpdater_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./OpacityUpdater.js */ \"../../updaters/opacity/dist/browser/OpacityUpdater.js\"));\n return new OpacityUpdater(container);\n });\n });\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/opacity/dist/browser/index.js?\n}");
27
+
28
+ /***/ }
29
+
30
+ }]);
@@ -0,0 +1,80 @@
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-alpha.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunktsparticles"] = this["webpackChunktsparticles"] || []).push([["updaters_outModes_dist_browser_OutOfCanvasUpdater_js"],{
19
+
20
+ /***/ "../../updaters/outModes/dist/browser/BounceOutMode.js"
21
+ /*!*************************************************************!*\
22
+ !*** ../../updaters/outModes/dist/browser/BounceOutMode.js ***!
23
+ \*************************************************************/
24
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
+
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BounceOutMode: () => (/* binding */ BounceOutMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Utils.js */ \"../../updaters/outModes/dist/browser/Utils.js\");\n\n\nclass BounceOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.bounce, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.split];\n }\n update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n let handled = false;\n for (const plugin of container.plugins.values()) {\n if (plugin.particleBounce !== undefined) {\n handled = plugin.particleBounce(particle, delta, direction);\n }\n if (handled) {\n break;\n }\n }\n if (handled) {\n return;\n }\n const pos = particle.getPosition(),\n offset = particle.offset,\n size = particle.getRadius(),\n bounds = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.calculateBounds)(pos, size),\n canvasSize = container.canvas.size;\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__.bounceHorizontal)({\n particle,\n outMode,\n direction,\n bounds,\n canvasSize,\n offset,\n size\n });\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__.bounceVertical)({\n particle,\n outMode,\n direction,\n bounds,\n canvasSize,\n offset,\n size\n });\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/outModes/dist/browser/BounceOutMode.js?\n}");
27
+
28
+ /***/ },
29
+
30
+ /***/ "../../updaters/outModes/dist/browser/DestroyOutMode.js"
31
+ /*!**************************************************************!*\
32
+ !*** ../../updaters/outModes/dist/browser/DestroyOutMode.js ***!
33
+ \**************************************************************/
34
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
35
+
36
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DestroyOutMode: () => (/* binding */ DestroyOutMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst minVelocity = 0;\nclass DestroyOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.destroy];\n }\n update(particle, direction, _delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n switch (particle.outType) {\n case _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticleOutType.normal:\n case _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticleOutType.outside:\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isPointInside)(particle.position, container.canvas.size, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.origin, particle.getRadius(), direction)) {\n return;\n }\n break;\n case _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticleOutType.inside:\n {\n const {\n dx,\n dy\n } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(particle.position, particle.moveCenter),\n {\n x: vx,\n y: vy\n } = particle.velocity;\n if (vx < minVelocity && dx > particle.moveCenter.radius || vy < minVelocity && dy > particle.moveCenter.radius || vx >= minVelocity && dx < -particle.moveCenter.radius || vy >= minVelocity && dy < -particle.moveCenter.radius) {\n return;\n }\n break;\n }\n }\n container.particles.remove(particle, particle.group, true);\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/outModes/dist/browser/DestroyOutMode.js?\n}");
37
+
38
+ /***/ },
39
+
40
+ /***/ "../../updaters/outModes/dist/browser/NoneOutMode.js"
41
+ /*!***********************************************************!*\
42
+ !*** ../../updaters/outModes/dist/browser/NoneOutMode.js ***!
43
+ \***********************************************************/
44
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
45
+
46
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ NoneOutMode: () => (/* binding */ NoneOutMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst minVelocity = 0;\nclass NoneOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.none];\n }\n update(particle, direction, _delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n if ((particle.options.move.distance.horizontal && (direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left || direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right)) ?? (particle.options.move.distance.vertical && (direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top || direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom))) {\n return;\n }\n const gravityOptions = particle.options.move.gravity,\n container = this.container,\n canvasSize = container.canvas.size,\n pRadius = particle.getRadius();\n if (!gravityOptions.enable) {\n if (particle.velocity.y > minVelocity && particle.position.y <= canvasSize.height + pRadius || particle.velocity.y < minVelocity && particle.position.y >= -pRadius || particle.velocity.x > minVelocity && particle.position.x <= canvasSize.width + pRadius || particle.velocity.x < minVelocity && particle.position.x >= -pRadius) {\n return;\n }\n if (!(0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isPointInside)(particle.position, container.canvas.size, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.origin, pRadius, direction)) {\n container.particles.remove(particle);\n }\n } else {\n const position = particle.position;\n if (!gravityOptions.inverse && position.y > canvasSize.height + pRadius && direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom || gravityOptions.inverse && position.y < -pRadius && direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top) {\n container.particles.remove(particle);\n }\n }\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/outModes/dist/browser/NoneOutMode.js?\n}");
47
+
48
+ /***/ },
49
+
50
+ /***/ "../../updaters/outModes/dist/browser/OutOfCanvasUpdater.js"
51
+ /*!******************************************************************!*\
52
+ !*** ../../updaters/outModes/dist/browser/OutOfCanvasUpdater.js ***!
53
+ \******************************************************************/
54
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
55
+
56
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OutOfCanvasUpdater: () => (/* binding */ OutOfCanvasUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _BounceOutMode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BounceOutMode.js */ \"../../updaters/outModes/dist/browser/BounceOutMode.js\");\n/* harmony import */ var _DestroyOutMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DestroyOutMode.js */ \"../../updaters/outModes/dist/browser/DestroyOutMode.js\");\n/* harmony import */ var _NoneOutMode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./NoneOutMode.js */ \"../../updaters/outModes/dist/browser/NoneOutMode.js\");\n/* harmony import */ var _OutOutMode_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./OutOutMode.js */ \"../../updaters/outModes/dist/browser/OutOutMode.js\");\n\n\n\n\n\nconst checkOutMode = (outModes, outMode) => {\n return outModes.default === outMode || outModes.bottom === outMode || outModes.left === outMode || outModes.right === outMode || outModes.top === outMode;\n};\nclass OutOfCanvasUpdater {\n constructor(container) {\n this._addUpdaterIfMissing = (particle, outMode, getUpdater) => {\n const outModes = particle.options.move.outModes;\n if (!this.updaters.has(outMode) && checkOutMode(outModes, outMode)) {\n this.updaters.set(outMode, getUpdater(this.container));\n }\n };\n this._updateOutMode = (particle, delta, outMode, direction) => {\n for (const updater of this.updaters.values()) {\n updater.update(particle, direction, delta, outMode);\n }\n };\n this.container = container;\n this.updaters = new Map();\n }\n init(particle) {\n this._addUpdaterIfMissing(particle, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.bounce, container => new _BounceOutMode_js__WEBPACK_IMPORTED_MODULE_1__.BounceOutMode(container));\n this._addUpdaterIfMissing(particle, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.out, container => new _OutOutMode_js__WEBPACK_IMPORTED_MODULE_4__.OutOutMode(container));\n this._addUpdaterIfMissing(particle, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.destroy, container => new _DestroyOutMode_js__WEBPACK_IMPORTED_MODULE_2__.DestroyOutMode(container));\n this._addUpdaterIfMissing(particle, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.none, container => new _NoneOutMode_js__WEBPACK_IMPORTED_MODULE_3__.NoneOutMode(container));\n }\n isEnabled(particle) {\n return !particle.destroyed && !particle.spawning;\n }\n update(particle, delta) {\n const outModes = particle.options.move.outModes;\n this._updateOutMode(particle, delta, outModes.bottom ?? outModes.default, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom);\n this._updateOutMode(particle, delta, outModes.left ?? outModes.default, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left);\n this._updateOutMode(particle, delta, outModes.right ?? outModes.default, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right);\n this._updateOutMode(particle, delta, outModes.top ?? outModes.default, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top);\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/outModes/dist/browser/OutOfCanvasUpdater.js?\n}");
57
+
58
+ /***/ },
59
+
60
+ /***/ "../../updaters/outModes/dist/browser/OutOutMode.js"
61
+ /*!**********************************************************!*\
62
+ !*** ../../updaters/outModes/dist/browser/OutOutMode.js ***!
63
+ \**********************************************************/
64
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
65
+
66
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OutOutMode: () => (/* binding */ OutOutMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst minVelocity = 0,\n minDistance = 0;\nclass OutOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.out];\n }\n update(particle, direction, _delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n switch (particle.outType) {\n case _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticleOutType.inside:\n {\n const {\n x: vx,\n y: vy\n } = particle.velocity;\n const circVec = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.origin;\n circVec.length = particle.moveCenter.radius;\n circVec.angle = particle.velocity.angle + Math.PI;\n circVec.addTo(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.create(particle.moveCenter));\n const {\n dx,\n dy\n } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(particle.position, circVec);\n if (vx <= minVelocity && dx >= minDistance || vy <= minVelocity && dy >= minDistance || vx >= minVelocity && dx <= minDistance || vy >= minVelocity && dy <= minDistance) {\n return;\n }\n particle.position.x = Math.floor((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)({\n min: 0,\n max: container.canvas.size.width\n }));\n particle.position.y = Math.floor((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)({\n min: 0,\n max: container.canvas.size.height\n }));\n const {\n dx: newDx,\n dy: newDy\n } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(particle.position, particle.moveCenter);\n particle.direction = Math.atan2(-newDy, -newDx);\n particle.velocity.angle = particle.direction;\n break;\n }\n default:\n {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isPointInside)(particle.position, container.canvas.size, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.origin, particle.getRadius(), direction)) {\n return;\n }\n switch (particle.outType) {\n case _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticleOutType.outside:\n {\n particle.position.x = Math.floor((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)({\n min: -particle.moveCenter.radius,\n max: particle.moveCenter.radius\n })) + particle.moveCenter.x;\n particle.position.y = Math.floor((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)({\n min: -particle.moveCenter.radius,\n max: particle.moveCenter.radius\n })) + particle.moveCenter.y;\n const {\n dx,\n dy\n } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(particle.position, particle.moveCenter);\n if (particle.moveCenter.radius) {\n particle.direction = Math.atan2(dy, dx);\n particle.velocity.angle = particle.direction;\n }\n break;\n }\n case _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticleOutType.normal:\n {\n const warp = particle.options.move.warp,\n canvasSize = container.canvas.size,\n newPos = {\n bottom: canvasSize.height + particle.getRadius() + particle.offset.y,\n left: -particle.getRadius() - particle.offset.x,\n right: canvasSize.width + particle.getRadius() + particle.offset.x,\n top: -particle.getRadius() - particle.offset.y\n },\n sizeValue = particle.getRadius(),\n nextBounds = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.calculateBounds)(particle.position, sizeValue);\n if (direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right && nextBounds.left > canvasSize.width + particle.offset.x) {\n particle.position.x = newPos.left;\n particle.initialPosition.x = particle.position.x;\n if (!warp) {\n particle.position.y = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.height;\n particle.initialPosition.y = particle.position.y;\n }\n } else if (direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left && nextBounds.right < -particle.offset.x) {\n particle.position.x = newPos.right;\n particle.initialPosition.x = particle.position.x;\n if (!warp) {\n particle.position.y = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.height;\n particle.initialPosition.y = particle.position.y;\n }\n }\n if (direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom && nextBounds.top > canvasSize.height + particle.offset.y) {\n if (!warp) {\n particle.position.x = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.width;\n particle.initialPosition.x = particle.position.x;\n }\n particle.position.y = newPos.top;\n particle.initialPosition.y = particle.position.y;\n } else if (direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top && nextBounds.bottom < -particle.offset.y) {\n if (!warp) {\n particle.position.x = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.width;\n particle.initialPosition.x = particle.position.x;\n }\n particle.position.y = newPos.bottom;\n particle.initialPosition.y = particle.position.y;\n }\n break;\n }\n }\n break;\n }\n }\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/outModes/dist/browser/OutOutMode.js?\n}");
67
+
68
+ /***/ },
69
+
70
+ /***/ "../../updaters/outModes/dist/browser/Utils.js"
71
+ /*!*****************************************************!*\
72
+ !*** ../../updaters/outModes/dist/browser/Utils.js ***!
73
+ \*****************************************************/
74
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
75
+
76
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ bounceHorizontal: () => (/* binding */ bounceHorizontal),\n/* harmony export */ bounceVertical: () => (/* binding */ bounceVertical)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst minVelocity = 0,\n boundsMin = 0;\nfunction bounceHorizontal(data) {\n if (data.outMode !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.bounce && data.outMode !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.split || data.direction !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left && data.direction !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right) {\n return;\n }\n if (data.bounds.right < boundsMin && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left) {\n data.particle.position.x = data.size + data.offset.x;\n } else if (data.bounds.left > data.canvasSize.width && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right) {\n data.particle.position.x = data.canvasSize.width - data.size - data.offset.x;\n }\n const velocity = data.particle.velocity.x;\n let bounced = false;\n if (data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right && data.bounds.right >= data.canvasSize.width && velocity > minVelocity || data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left && data.bounds.left <= boundsMin && velocity < minVelocity) {\n const newVelocity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(data.particle.options.bounce.horizontal.value);\n data.particle.velocity.x *= -newVelocity;\n bounced = true;\n }\n if (!bounced) {\n return;\n }\n const minPos = data.offset.x + data.size;\n if (data.bounds.right >= data.canvasSize.width && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right) {\n data.particle.position.x = data.canvasSize.width - minPos;\n } else if (data.bounds.left <= boundsMin && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left) {\n data.particle.position.x = minPos;\n }\n if (data.outMode === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.split) {\n data.particle.destroy();\n }\n}\nfunction bounceVertical(data) {\n if (data.outMode !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.bounce && data.outMode !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.split || data.direction !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom && data.direction !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top) {\n return;\n }\n if (data.bounds.bottom < boundsMin && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top) {\n data.particle.position.y = data.size + data.offset.y;\n } else if (data.bounds.top > data.canvasSize.height && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom) {\n data.particle.position.y = data.canvasSize.height - data.size - data.offset.y;\n }\n const velocity = data.particle.velocity.y;\n let bounced = false;\n if (data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom && data.bounds.bottom >= data.canvasSize.height && velocity > minVelocity || data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top && data.bounds.top <= boundsMin && velocity < minVelocity) {\n const newVelocity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(data.particle.options.bounce.vertical.value);\n data.particle.velocity.y *= -newVelocity;\n bounced = true;\n }\n if (!bounced) {\n return;\n }\n const minPos = data.offset.y + data.size;\n if (data.bounds.bottom >= data.canvasSize.height && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom) {\n data.particle.position.y = data.canvasSize.height - minPos;\n } else if (data.bounds.top <= boundsMin && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top) {\n data.particle.position.y = minPos;\n }\n if (data.outMode === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.split) {\n data.particle.destroy();\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/outModes/dist/browser/Utils.js?\n}");
77
+
78
+ /***/ }
79
+
80
+ }]);
@@ -0,0 +1,30 @@
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-alpha.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunktsparticles"] = this["webpackChunktsparticles"] || []).push([["updaters_outModes_dist_browser_index_js"],{
19
+
20
+ /***/ "../../updaters/outModes/dist/browser/index.js"
21
+ /*!*****************************************************!*\
22
+ !*** ../../updaters/outModes/dist/browser/index.js ***!
23
+ \*****************************************************/
24
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
+
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadOutModesUpdater: () => (/* binding */ loadOutModesUpdater)\n/* harmony export */ });\nfunction loadOutModesUpdater(engine) {\n engine.checkVersion(\"4.0.0-alpha.0\");\n engine.register(e => {\n e.addParticleUpdater(\"outModes\", async container => {\n const {\n OutOfCanvasUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_outModes_dist_browser_OutOfCanvasUpdater_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./OutOfCanvasUpdater.js */ \"../../updaters/outModes/dist/browser/OutOfCanvasUpdater.js\"));\n return new OutOfCanvasUpdater(container);\n });\n });\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/outModes/dist/browser/index.js?\n}");
27
+
28
+ /***/ }
29
+
30
+ }]);
@@ -0,0 +1,70 @@
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-alpha.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunktsparticles"] = this["webpackChunktsparticles"] || []).push([["updaters_roll_dist_browser_RollUpdater_js"],{
19
+
20
+ /***/ "../../updaters/roll/dist/browser/Options/Classes/Roll.js"
21
+ /*!****************************************************************!*\
22
+ !*** ../../updaters/roll/dist/browser/Options/Classes/Roll.js ***!
23
+ \****************************************************************/
24
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
+
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Roll: () => (/* binding */ Roll)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _RollLight_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RollLight.js */ \"../../updaters/roll/dist/browser/Options/Classes/RollLight.js\");\n/* harmony import */ var _RollMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../RollMode.js */ \"../../updaters/roll/dist/browser/RollMode.js\");\n\n\n\nclass Roll {\n constructor() {\n this.darken = new _RollLight_js__WEBPACK_IMPORTED_MODULE_1__.RollLight();\n this.enable = false;\n this.enlighten = new _RollLight_js__WEBPACK_IMPORTED_MODULE_1__.RollLight();\n this.mode = _RollMode_js__WEBPACK_IMPORTED_MODULE_2__.RollMode.vertical;\n this.speed = 25;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.backColor !== undefined) {\n this.backColor = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OptionsColor.create(this.backColor, data.backColor);\n }\n this.darken.load(data.darken);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n this.enlighten.load(data.enlighten);\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.speed !== undefined) {\n this.speed = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.speed);\n }\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/roll/dist/browser/Options/Classes/Roll.js?\n}");
27
+
28
+ /***/ },
29
+
30
+ /***/ "../../updaters/roll/dist/browser/Options/Classes/RollLight.js"
31
+ /*!*********************************************************************!*\
32
+ !*** ../../updaters/roll/dist/browser/Options/Classes/RollLight.js ***!
33
+ \*********************************************************************/
34
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
35
+
36
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RollLight: () => (/* binding */ RollLight)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass RollLight {\n constructor() {\n this.enable = false;\n this.value = 0;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.value !== undefined) {\n this.value = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.value);\n }\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/roll/dist/browser/Options/Classes/RollLight.js?\n}");
37
+
38
+ /***/ },
39
+
40
+ /***/ "../../updaters/roll/dist/browser/RollMode.js"
41
+ /*!****************************************************!*\
42
+ !*** ../../updaters/roll/dist/browser/RollMode.js ***!
43
+ \****************************************************/
44
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
45
+
46
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RollMode: () => (/* binding */ RollMode)\n/* harmony export */ });\nvar RollMode;\n(function (RollMode) {\n RollMode[\"both\"] = \"both\";\n RollMode[\"horizontal\"] = \"horizontal\";\n RollMode[\"vertical\"] = \"vertical\";\n})(RollMode || (RollMode = {}));\n\n//# sourceURL=webpack://tsparticles/../../updaters/roll/dist/browser/RollMode.js?\n}");
47
+
48
+ /***/ },
49
+
50
+ /***/ "../../updaters/roll/dist/browser/RollUpdater.js"
51
+ /*!*******************************************************!*\
52
+ !*** ../../updaters/roll/dist/browser/RollUpdater.js ***!
53
+ \*******************************************************/
54
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
55
+
56
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RollUpdater: () => (/* binding */ RollUpdater)\n/* harmony export */ });\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Utils.js */ \"../../updaters/roll/dist/browser/Utils.js\");\n/* harmony import */ var _Options_Classes_Roll_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/Roll.js */ \"../../updaters/roll/dist/browser/Options/Classes/Roll.js\");\n\n\nclass RollUpdater {\n constructor(engine) {\n this._engine = engine;\n }\n getTransformValues(particle) {\n const roll = particle.roll?.enable && particle.roll,\n rollHorizontal = roll && roll.horizontal,\n rollVertical = roll && roll.vertical;\n return {\n a: rollHorizontal ? Math.cos(roll.angle) : undefined,\n d: rollVertical ? Math.sin(roll.angle) : undefined\n };\n }\n init(particle) {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__.initParticle)(this._engine, particle);\n }\n isEnabled(particle) {\n const roll = particle.options.roll;\n return !particle.destroyed && !particle.spawning && !!roll?.enable;\n }\n loadOptions(options, ...sources) {\n options.roll ??= new _Options_Classes_Roll_js__WEBPACK_IMPORTED_MODULE_1__.Roll();\n for (const source of sources) {\n options.roll.load(source?.roll);\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle)) {\n return;\n }\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__.updateRoll)(particle, delta);\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/roll/dist/browser/RollUpdater.js?\n}");
57
+
58
+ /***/ },
59
+
60
+ /***/ "../../updaters/roll/dist/browser/Utils.js"
61
+ /*!*************************************************!*\
62
+ !*** ../../updaters/roll/dist/browser/Utils.js ***!
63
+ \*************************************************/
64
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
65
+
66
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ initParticle: () => (/* binding */ initParticle),\n/* harmony export */ updateRoll: () => (/* binding */ updateRoll)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _RollMode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RollMode.js */ \"../../updaters/roll/dist/browser/RollMode.js\");\n\n\nconst double = 2,\n doublePI = Math.PI * double,\n maxAngle = 360;\nfunction initParticle(engine, particle) {\n const rollOpt = particle.options.roll;\n if (!rollOpt?.enable) {\n particle.roll = {\n enable: false,\n horizontal: false,\n vertical: false,\n angle: 0,\n speed: 0\n };\n return;\n }\n particle.roll = {\n enable: rollOpt.enable,\n horizontal: rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.horizontal || rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.both,\n vertical: rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.vertical || rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.both,\n angle: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * doublePI,\n speed: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(rollOpt.speed) / maxAngle\n };\n if (rollOpt.backColor) {\n particle.backColor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToHsl)(engine, rollOpt.backColor);\n } else if (rollOpt.darken.enable && rollOpt.enlighten.enable) {\n const alterType = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() >= _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half ? _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.darken : _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.enlighten;\n particle.roll.alter = {\n type: alterType,\n value: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(alterType === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.darken ? rollOpt.darken.value : rollOpt.enlighten.value)\n };\n } else if (rollOpt.darken.enable) {\n particle.roll.alter = {\n type: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.darken,\n value: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(rollOpt.darken.value)\n };\n } else if (rollOpt.enlighten.enable) {\n particle.roll.alter = {\n type: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.enlighten,\n value: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(rollOpt.enlighten.value)\n };\n }\n}\nfunction updateRoll(particle, delta) {\n const roll = particle.options.roll,\n data = particle.roll;\n if (!data || !roll?.enable) {\n return;\n }\n const speed = data.speed * delta.factor,\n max = doublePI;\n data.angle += speed;\n if (data.angle > max) {\n data.angle -= max;\n }\n}\n\n//# sourceURL=webpack://tsparticles/../../updaters/roll/dist/browser/Utils.js?\n}");
67
+
68
+ /***/ }
69
+
70
+ }]);