@tsparticles/fireworks 3.3.0 → 3.5.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.
- package/browser/fireworks.js +22 -12
- package/cjs/fireworks.js +30 -21
- package/esm/fireworks.js +22 -12
- package/package.json +10 -10
- package/report.html +1 -1
- package/tsparticles.fireworks.bundle.js +944 -302
- package/tsparticles.fireworks.bundle.min.js +1 -1
- package/tsparticles.fireworks.bundle.min.js.LICENSE.txt +1 -1
- package/tsparticles.fireworks.js +6 -36
- package/tsparticles.fireworks.min.js +1 -1
- package/tsparticles.fireworks.min.js.LICENSE.txt +1 -1
- package/types/fireworks.d.ts +6 -1
- package/umd/fireworks.js +31 -46
- package/112.min.js +0 -2
- package/112.min.js.LICENSE.txt +0 -1
- package/119.min.js +0 -2
- package/119.min.js.LICENSE.txt +0 -1
- package/151.min.js +0 -2
- package/151.min.js.LICENSE.txt +0 -1
- package/154.min.js +0 -2
- package/154.min.js.LICENSE.txt +0 -1
- package/192.min.js +0 -2
- package/192.min.js.LICENSE.txt +0 -1
- package/201.min.js +0 -2
- package/201.min.js.LICENSE.txt +0 -1
- package/231.min.js +0 -2
- package/231.min.js.LICENSE.txt +0 -1
- package/250.min.js +0 -2
- package/250.min.js.LICENSE.txt +0 -1
- package/264.min.js +0 -2
- package/264.min.js.LICENSE.txt +0 -1
- package/294.min.js +0 -2
- package/294.min.js.LICENSE.txt +0 -1
- package/344.min.js +0 -2
- package/344.min.js.LICENSE.txt +0 -1
- package/347.min.js +0 -2
- package/347.min.js.LICENSE.txt +0 -1
- package/357.min.js +0 -2
- package/357.min.js.LICENSE.txt +0 -1
- package/36.min.js +0 -2
- package/36.min.js.LICENSE.txt +0 -1
- package/369.min.js +0 -2
- package/369.min.js.LICENSE.txt +0 -1
- package/370.min.js +0 -2
- package/370.min.js.LICENSE.txt +0 -1
- package/43.min.js +0 -2
- package/43.min.js.LICENSE.txt +0 -1
- package/444.min.js +0 -2
- package/444.min.js.LICENSE.txt +0 -1
- package/469.min.js +0 -2
- package/469.min.js.LICENSE.txt +0 -1
- package/493.min.js +0 -2
- package/493.min.js.LICENSE.txt +0 -1
- package/512.min.js +0 -2
- package/512.min.js.LICENSE.txt +0 -1
- package/551.min.js +0 -2
- package/551.min.js.LICENSE.txt +0 -1
- package/561.min.js +0 -2
- package/561.min.js.LICENSE.txt +0 -1
- package/732.min.js +0 -2
- package/732.min.js.LICENSE.txt +0 -1
- package/774.min.js +0 -2
- package/774.min.js.LICENSE.txt +0 -1
- package/775.min.js +0 -2
- package/775.min.js.LICENSE.txt +0 -1
- package/823.min.js +0 -2
- package/823.min.js.LICENSE.txt +0 -1
- package/924.min.js +0 -2
- package/924.min.js.LICENSE.txt +0 -1
- package/94.min.js +0 -2
- package/94.min.js.LICENSE.txt +0 -1
- package/955.min.js +0 -2
- package/955.min.js.LICENSE.txt +0 -1
- package/969.min.js +0 -2
- package/969.min.js.LICENSE.txt +0 -1
- package/974.min.js +0 -2
- package/974.min.js.LICENSE.txt +0 -1
- package/basic_dist_browser_index_js.js +0 -30
- package/effects_trail_dist_browser_TrailDrawer_js.js +0 -30
- package/effects_trail_dist_browser_index_js.js +0 -30
- package/engine_dist_browser_Core_Container_js.js +0 -100
- package/move_base_dist_browser_BaseMover_js.js +0 -40
- package/move_base_dist_browser_index_js.js +0 -30
- package/plugins_emittersShapes_square_dist_browser_EmittersSquareShapeGenerator_js.js +0 -120
- package/plugins_emittersShapes_square_dist_browser_index_js.js +0 -30
- package/plugins_emitters_dist_browser_EmitterInstance_js.js +0 -30
- package/plugins_emitters_dist_browser_EmittersPlugin_js.js +0 -90
- package/plugins_emitters_dist_browser_Emitters_js.js +0 -30
- package/plugins_emitters_dist_browser_ShapeManager_js.js +0 -30
- package/plugins_emitters_dist_browser_index_js.js +0 -100
- package/plugins_sounds_dist_browser_SoundsInstance_js.js +0 -30
- package/plugins_sounds_dist_browser_SoundsPlugin_js.js +0 -120
- package/plugins_sounds_dist_browser_index_js.js +0 -30
- package/shapes_circle_dist_browser_CircleDrawer_js.js +0 -40
- package/shapes_circle_dist_browser_index_js.js +0 -30
- package/updaters_color_dist_browser_ColorUpdater_js.js +0 -30
- package/updaters_color_dist_browser_index_js.js +0 -30
- package/updaters_destroy_dist_browser_DestroyUpdater_js.js +0 -90
- package/updaters_destroy_dist_browser_index_js.js +0 -30
- package/updaters_life_dist_browser_LifeUpdater_js.js +0 -70
- package/updaters_life_dist_browser_index_js.js +0 -30
- package/updaters_opacity_dist_browser_OpacityUpdater_js.js +0 -30
- package/updaters_opacity_dist_browser_index_js.js +0 -30
- package/updaters_outModes_dist_browser_OutOfCanvasUpdater_js.js +0 -80
- package/updaters_outModes_dist_browser_index_js.js +0 -30
- package/updaters_rotate_dist_browser_RotateUpdater_js.js +0 -50
- package/updaters_rotate_dist_browser_index_js.js +0 -30
- package/updaters_size_dist_browser_SizeUpdater_js.js +0 -30
- package/updaters_size_dist_browser_index_js.js +0 -30
package/tsparticles.fireworks.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v3.
|
|
7
|
+
* v3.5.0
|
|
8
8
|
*/
|
|
9
9
|
/*
|
|
10
10
|
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
*/
|
|
17
17
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
18
18
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
19
|
-
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/
|
|
19
|
+
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/updater-life"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/effect-trail"));
|
|
20
20
|
else if(typeof define === 'function' && define.amd)
|
|
21
|
-
define(["@tsparticles/engine", "@tsparticles/basic", "@tsparticles/
|
|
21
|
+
define(["@tsparticles/engine", "@tsparticles/basic", "@tsparticles/updater-destroy", "@tsparticles/plugin-emitters", "@tsparticles/plugin-emitters-shape-square", "@tsparticles/updater-life", "@tsparticles/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/effect-trail"], factory);
|
|
22
22
|
else {
|
|
23
|
-
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/
|
|
23
|
+
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/updater-life"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/effect-trail")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
|
|
24
24
|
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
25
25
|
}
|
|
26
|
-
})(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__, __WEBPACK_EXTERNAL_MODULE__tsparticles_basic__,
|
|
26
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__, __WEBPACK_EXTERNAL_MODULE__tsparticles_basic__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_destroy__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters_shape_square__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_life__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_rotate__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_sounds__, __WEBPACK_EXTERNAL_MODULE__tsparticles_effect_trail__) => {
|
|
27
27
|
return /******/ (() => { // webpackBootstrap
|
|
28
28
|
/******/ "use strict";
|
|
29
29
|
/******/ var __webpack_modules__ = ({
|
|
@@ -44,7 +44,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
44
44
|
\***********************************/
|
|
45
45
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
46
46
|
|
|
47
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fireworks: () => (/* binding */ fireworks)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FireworkOptions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FireworkOptions.js */ \"./dist/browser/FireworkOptions.js\");\n\n\nconst minSplitCount = 2;\nlet initialized = false;\nlet initializing = false;\nconst explodeSoundCheck = args => {\n const data = args.data;\n return data.particle.shape === \"circle\" && !!data.particle.splitCount && data.particle.splitCount < minSplitCount;\n};\nclass FireworksInstance {\n constructor(container) {\n this._container = container;\n }\n pause() {\n this._container.pause();\n }\n play() {\n this._container.play();\n }\n stop() {\n this._container.stop();\n }\n}\nasync function initPlugins() {\n if (initialized) {\n return;\n }\n if (initializing) {\n return new Promise(resolve => {\n const timeout = 100,\n interval = setInterval(() => {\n if (!initialized) {\n return;\n }\n clearInterval(interval);\n resolve();\n }, timeout);\n });\n }\n initializing = true;\n const {\n loadEmittersPlugin\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-emitters */ \"@tsparticles/plugin-emitters\", 23)),\n {\n loadEmittersShapeSquare\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-emitters-shape-square */ \"@tsparticles/plugin-emitters-shape-square\", 23)),\n {\n loadSoundsPlugin\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-sounds */ \"@tsparticles/plugin-sounds\", 23)),\n {\n loadRotateUpdater\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-rotate */ \"@tsparticles/updater-rotate\", 23)),\n {\n loadDestroyUpdater\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-destroy */ \"@tsparticles/updater-destroy\", 23)),\n {\n loadLifeUpdater\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-life */ \"@tsparticles/updater-life\", 23)),\n {\n loadTrailEffect\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/effect-trail */ \"@tsparticles/effect-trail\", 23)),\n {\n loadBasic\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/basic */ \"@tsparticles/basic\", 23));\n await loadEmittersPlugin(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadEmittersShapeSquare(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadSoundsPlugin(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadRotateUpdater(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadDestroyUpdater(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadLifeUpdater(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadTrailEffect(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadBasic(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n initializing = false;\n initialized = true;\n}\nasync function fireworks(idOrOptions, sourceOptions) {\n await initPlugins();\n let id;\n const options = new _FireworkOptions_js__WEBPACK_IMPORTED_MODULE_1__.FireworkOptions();\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isString)(idOrOptions)) {\n id = idOrOptions;\n options.load(sourceOptions);\n } else {\n id = \"fireworks\";\n options.load(idOrOptions);\n }\n const identity = 1,\n particlesOptions = {\n detectRetina: true,\n background: {\n color: options.background\n },\n fpsLimit: 60,\n emitters: {\n direction: \"top\",\n life: {\n count: 0,\n duration: 0.1,\n delay: 0.1\n },\n rate: {\n delay: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNumber)(options.rate) ? identity / options.rate : {\n min: identity / (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeMin)(options.rate),\n max: identity / (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeMax)(options.rate)\n },\n quantity: 1\n },\n size: {\n width: 100,\n height: 0\n },\n position: {\n y: 100,\n x: 50\n }\n },\n particles: {\n number: {\n value: 0\n },\n color: {\n value: \"#fff\"\n },\n destroy: {\n mode: \"split\",\n bounds: {\n top: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.minHeight)\n },\n split: {\n sizeOffset: false,\n count: 1,\n factor: {\n value: 0.333333\n },\n rate: {\n value: options.splitCount\n },\n colorOffset: {\n s: options.saturation,\n l: options.brightness\n },\n particles: {\n color: {\n value: options.colors\n },\n number: {\n value: 0\n },\n opacity: {\n value: {\n min: 0.1,\n max: 1\n },\n animation: {\n enable: true,\n speed: 1,\n sync: false,\n startValue: \"max\",\n destroy: \"min\"\n }\n },\n effect: {\n type: \"trail\",\n options: {\n trail: {\n length: {\n min: 5,\n max: 10\n }\n }\n }\n },\n shape: {\n type: \"circle\"\n },\n size: {\n value: {\n min: 1,\n max: 2\n },\n animation: {\n enable: true,\n speed: 5,\n count: 1,\n sync: false,\n startValue: \"min\",\n destroy: \"none\"\n }\n },\n life: {\n count: 1,\n duration: {\n value: {\n min: 0.25,\n max: 0.5\n }\n }\n },\n move: {\n decay: {\n min: 0.05,\n max: 0.1\n },\n enable: true,\n gravity: {\n enable: true,\n inverse: false,\n acceleration: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.gravity)\n },\n speed: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.speed),\n direction: \"none\",\n outModes: \"destroy\"\n }\n }\n }\n },\n life: {\n count: 1\n },\n effect: {\n type: \"trail\",\n options: {\n trail: {\n length: {\n min: 10,\n max: 30\n },\n minWidth: 1,\n maxWidth: 1\n }\n }\n },\n shape: {\n type: \"circle\"\n },\n size: {\n value: 1\n },\n opacity: {\n value: 0.5\n },\n rotate: {\n path: true\n },\n move: {\n enable: true,\n gravity: {\n acceleration: 15,\n enable: true,\n inverse: true,\n maxSpeed: 100\n },\n speed: {\n min: 10,\n max: 20\n },\n outModes: {\n default: \"destroy\",\n top: \"none\"\n }\n }\n },\n sounds: {\n enable: options.sounds,\n events: [{\n event: \"particleRemoved\",\n filter: explodeSoundCheck,\n audio: [\"https://particles.js.org/audio/explosion0.mp3\", \"https://particles.js.org/audio/explosion1.mp3\", \"https://particles.js.org/audio/explosion2.mp3\"]\n }],\n volume: 50\n }\n };\n const container = await _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles.load({\n id,\n options: particlesOptions\n });\n if (!container) {\n return;\n }\n return new FireworksInstance(container);\n}\nfireworks.version = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles.version;\nif (!(0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isSsr)()) {\n window.fireworks = fireworks;\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/./dist/browser/fireworks.js?");
|
|
47
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fireworks: () => (/* binding */ fireworks)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FireworkOptions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FireworkOptions.js */ \"./dist/browser/FireworkOptions.js\");\n/* harmony import */ var _tsparticles_basic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tsparticles/basic */ \"@tsparticles/basic\");\n/* harmony import */ var _tsparticles_basic__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_basic__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _tsparticles_updater_destroy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tsparticles/updater-destroy */ \"@tsparticles/updater-destroy\");\n/* harmony import */ var _tsparticles_updater_destroy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_updater_destroy__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tsparticles/plugin-emitters */ \"@tsparticles/plugin-emitters\");\n/* harmony import */ var _tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _tsparticles_plugin_emitters_shape_square__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @tsparticles/plugin-emitters-shape-square */ \"@tsparticles/plugin-emitters-shape-square\");\n/* harmony import */ var _tsparticles_plugin_emitters_shape_square__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_plugin_emitters_shape_square__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _tsparticles_updater_life__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @tsparticles/updater-life */ \"@tsparticles/updater-life\");\n/* harmony import */ var _tsparticles_updater_life__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_updater_life__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _tsparticles_updater_rotate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @tsparticles/updater-rotate */ \"@tsparticles/updater-rotate\");\n/* harmony import */ var _tsparticles_updater_rotate__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_updater_rotate__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _tsparticles_plugin_sounds__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @tsparticles/plugin-sounds */ \"@tsparticles/plugin-sounds\");\n/* harmony import */ var _tsparticles_plugin_sounds__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_plugin_sounds__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _tsparticles_effect_trail__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @tsparticles/effect-trail */ \"@tsparticles/effect-trail\");\n/* harmony import */ var _tsparticles_effect_trail__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_effect_trail__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n\n\n\n\n\n\nconst minSplitCount = 2;\nlet initialized = false;\nlet initializing = false;\nconst explodeSoundCheck = args => {\n const data = args.data;\n return data.particle.shape === \"circle\" && !!data.particle.splitCount && data.particle.splitCount < minSplitCount;\n};\nclass FireworksInstance {\n constructor(container) {\n this._container = container;\n }\n pause() {\n this._container.pause();\n }\n play() {\n this._container.play();\n }\n stop() {\n this._container.stop();\n }\n}\nasync function initPlugins() {\n if (initialized) {\n return;\n }\n if (initializing) {\n return new Promise(resolve => {\n const timeout = 100,\n interval = setInterval(() => {\n if (!initialized) {\n return;\n }\n clearInterval(interval);\n resolve();\n }, timeout);\n });\n }\n initializing = true;\n await (0,_tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_3__.loadEmittersPlugin)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await (0,_tsparticles_plugin_emitters_shape_square__WEBPACK_IMPORTED_MODULE_4__.loadEmittersShapeSquare)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await (0,_tsparticles_plugin_sounds__WEBPACK_IMPORTED_MODULE_7__.loadSoundsPlugin)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await (0,_tsparticles_updater_rotate__WEBPACK_IMPORTED_MODULE_6__.loadRotateUpdater)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await (0,_tsparticles_updater_destroy__WEBPACK_IMPORTED_MODULE_2__.loadDestroyUpdater)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await (0,_tsparticles_updater_life__WEBPACK_IMPORTED_MODULE_5__.loadLifeUpdater)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await (0,_tsparticles_effect_trail__WEBPACK_IMPORTED_MODULE_8__.loadTrailEffect)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await (0,_tsparticles_basic__WEBPACK_IMPORTED_MODULE_1__.loadBasic)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n initializing = false;\n initialized = true;\n}\nasync function fireworks(idOrOptions, sourceOptions) {\n await initPlugins();\n let id;\n const options = new _FireworkOptions_js__WEBPACK_IMPORTED_MODULE_9__.FireworkOptions();\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isString)(idOrOptions)) {\n id = idOrOptions;\n options.load(sourceOptions);\n } else {\n id = \"fireworks\";\n options.load(idOrOptions);\n }\n const identity = 1,\n particlesOptions = {\n detectRetina: true,\n background: {\n color: options.background\n },\n fpsLimit: 60,\n emitters: {\n direction: _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 color: {\n value: \"#fff\"\n },\n destroy: {\n mode: \"split\",\n bounds: {\n top: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.minHeight)\n },\n split: {\n sizeOffset: false,\n count: 1,\n factor: {\n value: 0.333333\n },\n rate: {\n value: options.splitCount\n },\n colorOffset: {\n s: options.saturation,\n l: options.brightness\n },\n particles: {\n color: {\n value: options.colors\n },\n number: {\n value: 0\n },\n opacity: {\n value: {\n min: 0.1,\n max: 1\n },\n animation: {\n enable: true,\n speed: 1,\n sync: false,\n startValue: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.StartValueType.max,\n destroy: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.DestroyType.min\n }\n },\n effect: {\n type: \"trail\",\n options: {\n trail: {\n length: {\n min: 5,\n max: 10\n }\n }\n }\n },\n shape: {\n type: \"circle\"\n },\n size: {\n value: {\n min: 1,\n max: 2\n },\n animation: {\n enable: true,\n speed: 5,\n count: 1,\n sync: false,\n startValue: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.StartValueType.min,\n destroy: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.DestroyType.none\n }\n },\n life: {\n count: 1,\n duration: {\n value: {\n min: 0.25,\n max: 0.5\n }\n }\n },\n move: {\n decay: {\n min: 0.05,\n max: 0.1\n },\n enable: true,\n gravity: {\n enable: true,\n inverse: false,\n acceleration: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.gravity)\n },\n speed: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.speed),\n direction: \"none\",\n outModes: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.destroy\n }\n }\n }\n },\n life: {\n count: 1\n },\n effect: {\n type: \"trail\",\n options: {\n trail: {\n length: {\n min: 10,\n max: 30\n },\n minWidth: 1,\n maxWidth: 1\n }\n }\n },\n shape: {\n type: \"circle\"\n },\n size: {\n value: 1\n },\n opacity: {\n value: 0.5\n },\n rotate: {\n path: true\n },\n move: {\n enable: true,\n gravity: {\n acceleration: 15,\n enable: true,\n inverse: true,\n maxSpeed: 100\n },\n speed: {\n min: 10,\n max: 20\n },\n outModes: {\n default: _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 event: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.EventType.particleRemoved,\n filter: explodeSoundCheck,\n audio: [\"https://particles.js.org/audio/explosion0.mp3\", \"https://particles.js.org/audio/explosion1.mp3\", \"https://particles.js.org/audio/explosion2.mp3\"]\n }],\n volume: 50\n }\n };\n const container = await _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles.load({\n id,\n options: particlesOptions\n });\n if (!container) {\n return;\n }\n return new FireworksInstance(container);\n}\nfireworks.init = async () => {\n await initPlugins();\n};\nfireworks.version = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles.version;\nif (!(0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isSsr)()) {\n window.fireworks = fireworks;\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/./dist/browser/fireworks.js?");
|
|
48
48
|
|
|
49
49
|
/***/ }),
|
|
50
50
|
|
|
@@ -187,36 +187,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_rotate__;
|
|
|
187
187
|
/******/ };
|
|
188
188
|
/******/ })();
|
|
189
189
|
/******/
|
|
190
|
-
/******/ /* webpack/runtime/create fake namespace object */
|
|
191
|
-
/******/ (() => {
|
|
192
|
-
/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
|
|
193
|
-
/******/ var leafPrototypes;
|
|
194
|
-
/******/ // create a fake namespace object
|
|
195
|
-
/******/ // mode & 1: value is a module id, require it
|
|
196
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
197
|
-
/******/ // mode & 4: return value when already ns object
|
|
198
|
-
/******/ // mode & 16: return value when it's Promise-like
|
|
199
|
-
/******/ // mode & 8|1: behave like require
|
|
200
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
201
|
-
/******/ if(mode & 1) value = this(value);
|
|
202
|
-
/******/ if(mode & 8) return value;
|
|
203
|
-
/******/ if(typeof value === 'object' && value) {
|
|
204
|
-
/******/ if((mode & 4) && value.__esModule) return value;
|
|
205
|
-
/******/ if((mode & 16) && typeof value.then === 'function') return value;
|
|
206
|
-
/******/ }
|
|
207
|
-
/******/ var ns = Object.create(null);
|
|
208
|
-
/******/ __webpack_require__.r(ns);
|
|
209
|
-
/******/ var def = {};
|
|
210
|
-
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
|
|
211
|
-
/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
|
212
|
-
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
|
|
213
|
-
/******/ }
|
|
214
|
-
/******/ def['default'] = () => (value);
|
|
215
|
-
/******/ __webpack_require__.d(ns, def);
|
|
216
|
-
/******/ return ns;
|
|
217
|
-
/******/ };
|
|
218
|
-
/******/ })();
|
|
219
|
-
/******/
|
|
220
190
|
/******/ /* webpack/runtime/define property getters */
|
|
221
191
|
/******/ (() => {
|
|
222
192
|
/******/ // define getter functions for harmony exports
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.fireworks.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/updater-life"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/effect-trail"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/basic","@tsparticles/updater-destroy","@tsparticles/plugin-emitters","@tsparticles/plugin-emitters-shape-square","@tsparticles/updater-life","@tsparticles/updater-rotate","@tsparticles/plugin-sounds","@tsparticles/effect-trail"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/updater-life"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/effect-trail")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(this,((e,t,i,s,a,r,o,n,l)=>(()=>{var p={145:e=>{e.exports=t},637:e=>{e.exports=l},303:t=>{t.exports=e},526:e=>{e.exports=s},140:e=>{e.exports=a},933:e=>{e.exports=n},173:e=>{e.exports=i},75:e=>{e.exports=r},668:e=>{e.exports=o}},u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var i=u[e]={exports:{}};return p[e](i,i.exports,c),i.exports}c.d=(e,t)=>{for(var i in t)c.o(t,i)&&!c.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};c.r(d),c.d(d,{fireworks:()=>M});var m=c(303);class f{constructor(){this.background="none",this.brightness={min:-30,max:30},this.colors=["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"],this.gravity=5,this.minHeight={min:10,max:30},this.rate=10,this.saturation={min:-30,max:30},this.sounds=!0,this.speed={min:5,max:15},this.splitCount={min:75,max:150}}load(e){e&&(void 0!==e.background&&(this.background=e.background),void 0!==e.colors&&((0,m.isArray)(e.colors)?this.colors=[...e.colors]:this.colors=e.colors),void 0!==e.brightness&&(this.brightness=(0,m.setRangeValue)(e.brightness)),void 0!==e.gravity&&(this.gravity=(0,m.setRangeValue)(e.gravity)),void 0!==e.minHeight&&(this.minHeight=(0,m.setRangeValue)(e.minHeight)),void 0!==e.rate&&(this.rate=(0,m.setRangeValue)(e.rate)),void 0!==e.saturation&&(this.saturation=(0,m.setRangeValue)(e.saturation)),void 0!==e.sounds&&(this.sounds=e.sounds),void 0!==e.speed&&(this.speed=(0,m.setRangeValue)(e.speed)),void 0!==e.splitCount&&(this.splitCount=(0,m.setRangeValue)(e.splitCount)))}}var g=c(145),y=c(173),h=c(526),v=c(140),w=c(75),x=c(668),b=c(933),q=c(637);let P=!1,R=!1;const V=e=>{const t=e.data;return"circle"===t.particle.shape&&!!t.particle.splitCount&&t.particle.splitCount<2};class S{constructor(e){this._container=e}pause(){this._container.pause()}play(){this._container.play()}stop(){this._container.stop()}}async function j(){if(!P){if(R)return new Promise((e=>{const t=setInterval((()=>{P&&(clearInterval(t),e())}),100)}));R=!0,await(0,h.loadEmittersPlugin)(m.tsParticles,!1),await(0,v.loadEmittersShapeSquare)(m.tsParticles,!1),await(0,b.loadSoundsPlugin)(m.tsParticles,!1),await(0,x.loadRotateUpdater)(m.tsParticles,!1),await(0,y.loadDestroyUpdater)(m.tsParticles,!1),await(0,w.loadLifeUpdater)(m.tsParticles,!1),await(0,q.loadTrailEffect)(m.tsParticles,!1),await(0,g.loadBasic)(m.tsParticles,!1),R=!1,P=!0}}async function M(e,t){let i;await j();const s=new f;(0,m.isString)(e)?(i=e,s.load(t)):(i="fireworks",s.load(e));const a={detectRetina:!0,background:{color:s.background},fpsLimit:60,emitters:{direction:m.MoveDirection.top,life:{count:0,duration:.1,delay:.1},rate:{delay:(0,m.isNumber)(s.rate)?1/s.rate:{min:1/(0,m.getRangeMin)(s.rate),max:1/(0,m.getRangeMax)(s.rate)},quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},color:{value:"#fff"},destroy:{mode:"split",bounds:{top:(0,m.setRangeValue)(s.minHeight)},split:{sizeOffset:!1,count:1,factor:{value:.333333},rate:{value:s.splitCount},colorOffset:{s:s.saturation,l:s.brightness},particles:{color:{value:s.colors},number:{value:0},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:1,sync:!1,startValue:m.StartValueType.max,destroy:m.DestroyType.min}},effect:{type:"trail",options:{trail:{length:{min:5,max:10}}}},shape:{type:"circle"},size:{value:{min:1,max:2},animation:{enable:!0,speed:5,count:1,sync:!1,startValue:m.StartValueType.min,destroy:m.DestroyType.none}},life:{count:1,duration:{value:{min:.25,max:.5}}},move:{decay:{min:.05,max:.1},enable:!0,gravity:{enable:!0,inverse:!1,acceleration:(0,m.setRangeValue)(s.gravity)},speed:(0,m.setRangeValue)(s.speed),direction:"none",outModes:m.OutMode.destroy}}}},life:{count:1},effect:{type:"trail",options:{trail:{length:{min:10,max:30},minWidth:1,maxWidth:1}}},shape:{type:"circle"},size:{value:1},opacity:{value:.5},rotate:{path:!0},move:{enable:!0,gravity:{acceleration:15,enable:!0,inverse:!0,maxSpeed:100},speed:{min:10,max:20},outModes:{default:m.OutMode.destroy,top:m.OutMode.none}}},sounds:{enable:s.sounds,events:[{event:m.EventType.particleRemoved,filter:V,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}},r=await m.tsParticles.load({id:i,options:a});if(r)return new S(r)}return M.init=async()=>{await j()},M.version=m.tsParticles.version,(0,m.isSsr)()||(window.fireworks=M),d})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.
|
|
1
|
+
/*! tsParticles Fireworks v3.5.0 by Matteo Bruni */
|
package/types/fireworks.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { type Container, type RecursivePartial } from "@tsparticles/engine";
|
|
2
2
|
import type { IFireworkOptions } from "./IFireworkOptions.js";
|
|
3
|
+
type FireworksFunc = ((idOrOptions: string | RecursivePartial<IFireworkOptions>, sourceOptions?: RecursivePartial<IFireworkOptions>) => Promise<FireworksInstance | undefined>) & {
|
|
4
|
+
version: string;
|
|
5
|
+
};
|
|
3
6
|
declare global {
|
|
4
7
|
interface Window {
|
|
5
|
-
fireworks:
|
|
8
|
+
fireworks: FireworksFunc & {
|
|
9
|
+
init: () => Promise<void>;
|
|
6
10
|
version: string;
|
|
7
11
|
};
|
|
8
12
|
}
|
|
@@ -17,5 +21,6 @@ declare class FireworksInstance {
|
|
|
17
21
|
export type { FireworksInstance };
|
|
18
22
|
export declare function fireworks(idOrOptions: string | RecursivePartial<IFireworkOptions>, sourceOptions?: RecursivePartial<IFireworkOptions>): Promise<FireworksInstance | undefined>;
|
|
19
23
|
export declare namespace fireworks {
|
|
24
|
+
var init: () => Promise<void>;
|
|
20
25
|
var version: string;
|
|
21
26
|
}
|
package/umd/fireworks.js
CHANGED
|
@@ -1,41 +1,25 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
-
}) : function(o, v) {
|
|
15
|
-
o["default"] = v;
|
|
16
|
-
});
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
1
|
(function (factory) {
|
|
25
2
|
if (typeof module === "object" && typeof module.exports === "object") {
|
|
26
3
|
var v = factory(require, exports);
|
|
27
4
|
if (v !== undefined) module.exports = v;
|
|
28
5
|
}
|
|
29
6
|
else if (typeof define === "function" && define.amd) {
|
|
30
|
-
define(["require", "exports", "@tsparticles/engine", "./FireworkOptions.js"], factory);
|
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./FireworkOptions.js", "@tsparticles/basic", "@tsparticles/updater-destroy", "@tsparticles/plugin-emitters", "@tsparticles/plugin-emitters-shape-square", "@tsparticles/updater-life", "@tsparticles/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/effect-trail"], factory);
|
|
31
8
|
}
|
|
32
9
|
})(function (require, exports) {
|
|
33
10
|
"use strict";
|
|
34
|
-
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
|
|
35
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.fireworks =
|
|
12
|
+
exports.fireworks = fireworks;
|
|
37
13
|
const engine_1 = require("@tsparticles/engine");
|
|
38
14
|
const FireworkOptions_js_1 = require("./FireworkOptions.js");
|
|
15
|
+
const basic_1 = require("@tsparticles/basic");
|
|
16
|
+
const updater_destroy_1 = require("@tsparticles/updater-destroy");
|
|
17
|
+
const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
|
|
18
|
+
const plugin_emitters_shape_square_1 = require("@tsparticles/plugin-emitters-shape-square");
|
|
19
|
+
const updater_life_1 = require("@tsparticles/updater-life");
|
|
20
|
+
const updater_rotate_1 = require("@tsparticles/updater-rotate");
|
|
21
|
+
const plugin_sounds_1 = require("@tsparticles/plugin-sounds");
|
|
22
|
+
const effect_trail_1 = require("@tsparticles/effect-trail");
|
|
39
23
|
const minSplitCount = 2;
|
|
40
24
|
let initialized = false;
|
|
41
25
|
let initializing = false;
|
|
@@ -62,7 +46,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
62
46
|
return;
|
|
63
47
|
}
|
|
64
48
|
if (initializing) {
|
|
65
|
-
return new Promise(
|
|
49
|
+
return new Promise(resolve => {
|
|
66
50
|
const timeout = 100, interval = setInterval(() => {
|
|
67
51
|
if (!initialized) {
|
|
68
52
|
return;
|
|
@@ -73,15 +57,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
73
57
|
});
|
|
74
58
|
}
|
|
75
59
|
initializing = true;
|
|
76
|
-
|
|
77
|
-
await
|
|
78
|
-
await
|
|
79
|
-
await
|
|
80
|
-
await
|
|
81
|
-
await
|
|
82
|
-
await
|
|
83
|
-
await
|
|
84
|
-
await loadBasic(engine_1.tsParticles, false);
|
|
60
|
+
await (0, plugin_emitters_1.loadEmittersPlugin)(engine_1.tsParticles, false);
|
|
61
|
+
await (0, plugin_emitters_shape_square_1.loadEmittersShapeSquare)(engine_1.tsParticles, false);
|
|
62
|
+
await (0, plugin_sounds_1.loadSoundsPlugin)(engine_1.tsParticles, false);
|
|
63
|
+
await (0, updater_rotate_1.loadRotateUpdater)(engine_1.tsParticles, false);
|
|
64
|
+
await (0, updater_destroy_1.loadDestroyUpdater)(engine_1.tsParticles, false);
|
|
65
|
+
await (0, updater_life_1.loadLifeUpdater)(engine_1.tsParticles, false);
|
|
66
|
+
await (0, effect_trail_1.loadTrailEffect)(engine_1.tsParticles, false);
|
|
67
|
+
await (0, basic_1.loadBasic)(engine_1.tsParticles, false);
|
|
85
68
|
initializing = false;
|
|
86
69
|
initialized = true;
|
|
87
70
|
}
|
|
@@ -104,7 +87,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
104
87
|
},
|
|
105
88
|
fpsLimit: 60,
|
|
106
89
|
emitters: {
|
|
107
|
-
direction:
|
|
90
|
+
direction: engine_1.MoveDirection.top,
|
|
108
91
|
life: {
|
|
109
92
|
count: 0,
|
|
110
93
|
duration: 0.1,
|
|
@@ -166,8 +149,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
166
149
|
enable: true,
|
|
167
150
|
speed: 1,
|
|
168
151
|
sync: false,
|
|
169
|
-
startValue:
|
|
170
|
-
destroy:
|
|
152
|
+
startValue: engine_1.StartValueType.max,
|
|
153
|
+
destroy: engine_1.DestroyType.min,
|
|
171
154
|
},
|
|
172
155
|
},
|
|
173
156
|
effect: {
|
|
@@ -191,8 +174,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
191
174
|
speed: 5,
|
|
192
175
|
count: 1,
|
|
193
176
|
sync: false,
|
|
194
|
-
startValue:
|
|
195
|
-
destroy:
|
|
177
|
+
startValue: engine_1.StartValueType.min,
|
|
178
|
+
destroy: engine_1.DestroyType.none,
|
|
196
179
|
},
|
|
197
180
|
},
|
|
198
181
|
life: {
|
|
@@ -214,7 +197,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
214
197
|
},
|
|
215
198
|
speed: (0, engine_1.setRangeValue)(options.speed),
|
|
216
199
|
direction: "none",
|
|
217
|
-
outModes:
|
|
200
|
+
outModes: engine_1.OutMode.destroy,
|
|
218
201
|
},
|
|
219
202
|
},
|
|
220
203
|
},
|
|
@@ -260,8 +243,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
260
243
|
max: 20,
|
|
261
244
|
},
|
|
262
245
|
outModes: {
|
|
263
|
-
default:
|
|
264
|
-
top:
|
|
246
|
+
default: engine_1.OutMode.destroy,
|
|
247
|
+
top: engine_1.OutMode.none,
|
|
265
248
|
},
|
|
266
249
|
},
|
|
267
250
|
},
|
|
@@ -269,7 +252,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
269
252
|
enable: options.sounds,
|
|
270
253
|
events: [
|
|
271
254
|
{
|
|
272
|
-
event:
|
|
255
|
+
event: engine_1.EventType.particleRemoved,
|
|
273
256
|
filter: explodeSoundCheck,
|
|
274
257
|
audio: [
|
|
275
258
|
"https://particles.js.org/audio/explosion0.mp3",
|
|
@@ -287,7 +270,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
287
270
|
}
|
|
288
271
|
return new FireworksInstance(container);
|
|
289
272
|
}
|
|
290
|
-
|
|
273
|
+
fireworks.init = async () => {
|
|
274
|
+
await initPlugins();
|
|
275
|
+
};
|
|
291
276
|
fireworks.version = engine_1.tsParticles.version;
|
|
292
277
|
if (!(0, engine_1.isSsr)()) {
|
|
293
278
|
window.fireworks = fireworks;
|
package/112.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 112.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[112],{2112:(t,i,e)=>{e.d(i,{EmittersPlugin:()=>n});var o=e(5540),s=e(6491);class n{constructor(t){this._engine=t,this.id="emitters"}async getPlugin(t){const{Emitters:i}=await e.e(823).then(e.bind(e,823));return new i(this._engine,t)}loadOptions(t,i){if(!this.needsPlugin(t)&&!this.needsPlugin(i))return;i?.emitters&&(t.emitters=(0,o.wJ)(i.emitters,(t=>{const i=new s.Emitter;return i.load(t),i})));const e=i?.interactivity?.modes?.emitters;if(e)if((0,o.cy)(e))t.interactivity.modes.emitters={random:{count:1,enable:!0},value:e.map((t=>{const i=new s.Emitter;return i.load(t),i}))};else{const i=e;if(void 0!==i.value){const e=1;if((0,o.cy)(i.value))t.interactivity.modes.emitters={random:{count:i.random.count??e,enable:i.random.enable??!1},value:i.value.map((t=>{const i=new s.Emitter;return i.load(t),i}))};else{const o=new s.Emitter;o.load(i.value),t.interactivity.modes.emitters={random:{count:i.random.count??e,enable:i.random.enable??!1},value:o}}}else{(t.interactivity.modes.emitters={random:{count:1,enable:!1},value:new s.Emitter}).value.load(e)}}}needsPlugin(t){if(!t)return!1;const i=t.emitters;return(0,o.cy)(i)&&!!i.length||void 0!==i||!!t.interactivity?.events?.onClick?.mode&&(0,o.hn)("emitter",t.interactivity.events.onClick.mode)}}},6491:(t,i,e)=>{e.d(i,{Emitter:()=>l});var o=e(5540);class s{constructor(){this.wait=!1}load(t){t&&(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=(0,o.DT)(t.delay)),void 0!==t.duration&&(this.duration=(0,o.DT)(t.duration)),void 0!==t.wait&&(this.wait=t.wait))}}class n{constructor(){this.quantity=1,this.delay=.1}load(t){void 0!==t&&(void 0!==t.quantity&&(this.quantity=(0,o.DT)(t.quantity)),void 0!==t.delay&&(this.delay=(0,o.DT)(t.delay)))}}class a{constructor(){this.color=!1,this.opacity=!1}load(t){t&&(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class r{constructor(){this.options={},this.replace=new a,this.type="square"}load(t){t&&(void 0!==t.options&&(this.options=(0,o.zw)({},t.options??{})),this.replace.load(t.replace),void 0!==t.type&&(this.type=t.type))}}var d=e(3839);class l{constructor(){this.autoPlay=!0,this.fill=!0,this.life=new s,this.rate=new n,this.shape=new r,this.startCount=0}load(t){t&&(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(this.size||(this.size=new d.G),this.size.load(t.size)),void 0!==t.direction&&(this.direction=t.direction),this.domId=t.domId,void 0!==t.fill&&(this.fill=t.fill),this.life.load(t.life),this.name=t.name,this.particles=(0,o.wJ)(t.particles,(t=>(0,o.zw)({},t))),this.rate.load(t.rate),this.shape.load(t.shape),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=(0,o.DT)(t.position.x)),void 0!==t.position.y&&(this.position.y=(0,o.DT)(t.position.y))),void 0!==t.spawnColor&&(void 0===this.spawnColor&&(this.spawnColor=new o.A9),this.spawnColor.load(t.spawnColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}},3839:(t,i,e)=>{e.d(i,{G:()=>o});class o{constructor(){this.mode="percent",this.height=0,this.width=0}load(t){void 0!==t&&(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.height&&(this.height=t.height),void 0!==t.width&&(this.width=t.width))}}}}]);
|
package/112.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/119.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 119.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[119],{6119:(e,i,t)=>{t.d(i,{BaseMover:()=>s});var n=t(5540);const a=1;function o(e,i,t,o,s,c){!function(e,i){const t=e.options,o=t.move.path;if(!o.enable)return;if(e.lastPathTime<=e.pathDelay)return void(e.lastPathTime+=i.value);const s=e.pathGenerator?.generate(e,i);s&&e.velocity.addTo(s);o.clamp&&(e.velocity.x=(0,n.qE)(e.velocity.x,-a,a),e.velocity.y=(0,n.qE)(e.velocity.y,-a,a));e.lastPathTime-=e.pathDelay}(e,c);const r=e.gravity,l=r?.enable&&r.inverse?-a:a;s&&t&&(e.velocity.x+=s*c.factor/(60*t)),r?.enable&&t&&(e.velocity.y+=l*(r.acceleration*c.factor)/(60*t));const p=e.moveDecay;e.velocity.multTo(p);const y=e.velocity.mult(t);r?.enable&&o>0&&(!r.inverse&&y.y>=0&&y.y>=o||r.inverse&&y.y<=0&&y.y<=-o)&&(y.y=l*o,t&&(e.velocity.y=y.y/t));const v=e.options.zIndex,d=(a-e.zIndexFactor)**v.velocityRate;y.multTo(d);const{position:u}=e;u.addTo(y),i.vibrate&&(u.x+=Math.sin(u.x*Math.cos(u.y)),u.y+=Math.cos(u.y*Math.sin(u.x)))}class s{init(e){const i=e.options.move.gravity;e.gravity={enable:i.enable,acceleration:(0,n.VG)(i.acceleration),inverse:i.inverse},function(e){const i=e.container,t=e.options.move.spin;if(!t.enable)return;const a=t.position??{x:50,y:50},o={x:.01*a.x*i.canvas.size.width,y:.01*a.y*i.canvas.size.height},s=e.getPosition(),c=(0,n.Yf)(s,o),r=(0,n.VG)(t.acceleration);e.retina.spinAcceleration=r*i.retina.pixelRatio,e.spin={center:o,direction:e.velocity.x>=0?"clockwise":"counter-clockwise",angle:e.velocity.angle,radius:c,acceleration:e.retina.spinAcceleration}}(e)}isEnabled(e){return!e.destroyed&&e.options.move.enable}move(e,i){const t=e.options,s=t.move;if(!s.enable)return;const c=e.container,r=c.retina.pixelRatio;e.retina.moveSpeed??=(0,n.VG)(s.speed)*r,e.retina.moveDrift??=(0,n.VG)(e.options.move.drift)*r;const l=function(e){return e.slow.inRange?e.slow.factor:a}(e),p=e.retina.moveSpeed*c.retina.reduceFactor,y=e.retina.moveDrift,v=(0,n.W9)(t.size.value)*r,d=p*(s.size?e.getRadius()/v:1)*l*(i.factor||1)/2,u=e.retina.maxSpeed??c.retina.maxSpeed;s.spin.enable?function(e,i){const t=e.container;if(!e.spin)return;const n={x:"clockwise"===e.spin.direction?Math.cos:Math.sin,y:"clockwise"===e.spin.direction?Math.sin:Math.cos};e.position.x=e.spin.center.x+e.spin.radius*n.x(e.spin.angle),e.position.y=e.spin.center.y+e.spin.radius*n.y(e.spin.angle),e.spin.radius+=e.spin.acceleration;const o=Math.max(t.canvas.size.width,t.canvas.size.height),s=.5*o;e.spin.radius>s?(e.spin.radius=s,e.spin.acceleration*=-a):e.spin.radius<0&&(e.spin.radius=0,e.spin.acceleration*=-a),e.spin.angle+=.01*i*(a-e.spin.radius/o)}(e,d):o(e,s,d,u,y,i),function(e){const i=e.initialPosition,{dx:t,dy:a}=(0,n.vr)(i,e.position),o=Math.abs(t),s=Math.abs(a),{maxDistance:c}=e.retina,r=c.horizontal,l=c.vertical;if(!r&&!l)return;if((r&&o>=r||l&&s>=l)&&!e.misplaced)e.misplaced=!!r&&o>r||!!l&&s>l,r&&(e.velocity.x=.5*e.velocity.y-e.velocity.x),l&&(e.velocity.y=.5*e.velocity.x-e.velocity.y);else if((!r||o<r)&&(!l||s<l)&&e.misplaced)e.misplaced=!1;else if(e.misplaced){const t=e.position,a=e.velocity;r&&(t.x<i.x&&a.x<0||t.x>i.x&&a.x>0)&&(a.x*=-(0,n.G0)()),l&&(t.y<i.y&&a.y<0||t.y>i.y&&a.y>0)&&(a.y*=-(0,n.G0)())}}(e)}}}}]);
|
package/119.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/151.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 151.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[151],{9151:(t,i,s)=>{s.d(i,{EmitterInstance:()=>h});var e=s(5540),o=s(6491),n=s(3839);function a(t,i){t.color?t.color.value=i:t.color={value:i}}class h{constructor(t,i,s,n,a){this.emitters=i,this.container=s,this._destroy=()=>{this._mutationObserver?.disconnect(),this._mutationObserver=void 0,this._resizeObserver?.disconnect(),this._resizeObserver=void 0,this.emitters.removeEmitter(this),this._engine.dispatchEvent("emitterDestroyed",{container:this.container,data:{emitter:this}})},this._prepareToDie=()=>{if(this._paused)return;const t=void 0!==this.options.life?.duration?(0,e.VG)(this.options.life.duration):void 0;this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal)&&void 0!==t&&t>0&&(this._duration=t*e.Xu)},this._setColorAnimation=(t,i,s,o=1)=>{const n=this.container;if(!t.enable)return i;const a=(0,e.BH)(t.offset),h=(0,e.VG)(this.options.rate.delay)*e.Xu/n.retina.reduceFactor;return(i+(0,e.VG)(t.speed??0)*n.fpsLimit/h+a*o)%s},this._engine=t,this._currentDuration=0,this._currentEmitDelay=0,this._currentSpawnDelay=0,this._initialPosition=a,n instanceof o.Emitter?this.options=n:(this.options=new o.Emitter,this.options.load(n)),this._spawnDelay=(0,e.VG)(this.options.life.delay??0)*e.Xu/this.container.retina.reduceFactor,this.position=this._initialPosition??this._calcPosition(),this.name=this.options.name,this.fill=this.options.fill,this._firstSpawn=!this.options.life.wait,this._startParticlesAdded=!1;let h=(0,e.zw)({},this.options.particles);if(h??={},h.move??={},h.move.direction??=this.options.direction,this.options.spawnColor&&(this.spawnColor=(0,e.R5)(this.options.spawnColor)),this._paused=!this.options.autoPlay,this._particlesOptions=h,this._size=this._calcSize(),this.size=(0,e.YC)(this._size,this.container.canvas.size),this._lifeCount=this.options.life.count??-1,this._immortal=this._lifeCount<=0,this.options.domId){const t=document.getElementById(this.options.domId);t&&(this._mutationObserver=new MutationObserver((()=>{this.resize()})),this._resizeObserver=new ResizeObserver((()=>{this.resize()})),this._mutationObserver.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this._resizeObserver.observe(t))}const r=this.options.shape,l=this._engine.emitterShapeManager?.getShapeGenerator(r.type);l&&(this._shape=l.generate(this.position,this.size,this.fill,r.options)),this._engine.dispatchEvent("emitterCreated",{container:s,data:{emitter:this}}),this.play()}externalPause(){this._paused=!0,this.pause()}externalPlay(){this._paused=!1,this.play()}async init(){await(this._shape?.init())}pause(){this._paused||delete this._emitDelay}play(){if(!this._paused&&this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal||!this.options.life.count)&&(this._firstSpawn||this._currentSpawnDelay>=(this._spawnDelay??0))){if(void 0===this._emitDelay){const t=(0,e.VG)(this.options.rate.delay);this._emitDelay=t*e.Xu/this.container.retina.reduceFactor}(this._lifeCount>0||this._immortal)&&this._prepareToDie()}}resize(){const t=this._initialPosition;this.position=t&&(0,e.Tj)(t,this.container.canvas.size,e.Mi.origin)?t:this._calcPosition(),this._size=this._calcSize(),this.size=(0,e.YC)(this._size,this.container.canvas.size),this._shape?.resize(this.position,this.size)}update(t){this._paused||(this._firstSpawn&&(this._firstSpawn=!1,this._currentSpawnDelay=this._spawnDelay??0,this._currentEmitDelay=this._emitDelay??0),this._startParticlesAdded||(this._startParticlesAdded=!0,this._emitParticles(this.options.startCount)),void 0!==this._duration&&(this._currentDuration+=t.value,this._currentDuration>=this._duration&&(this.pause(),void 0!==this._spawnDelay&&delete this._spawnDelay,this._immortal||this._lifeCount--,this._lifeCount>0||this._immortal?(this.position=this._calcPosition(),this._shape?.resize(this.position,this.size),this._spawnDelay=(0,e.VG)(this.options.life.delay??0)*e.Xu/this.container.retina.reduceFactor):this._destroy(),this._currentDuration-=this._duration,delete this._duration)),void 0!==this._spawnDelay&&(this._currentSpawnDelay+=t.value,this._currentSpawnDelay>=this._spawnDelay&&(this._engine.dispatchEvent("emitterPlay",{container:this.container}),this.play(),this._currentSpawnDelay-=this._currentSpawnDelay,delete this._spawnDelay)),void 0!==this._emitDelay&&(this._currentEmitDelay+=t.value,this._currentEmitDelay>=this._emitDelay&&(this._emit(),this._currentEmitDelay-=this._emitDelay)))}_calcPosition(){if(this.options.domId){const t=document.getElementById(this.options.domId);if(t){const i=t.getBoundingClientRect(),s=this.container.retina.pixelRatio;return{x:(i.x+.5*i.width)*s,y:(i.y+.5*i.height)*s}}}return(0,e.l1)({size:this.container.canvas.size,position:this.options.position})}_calcSize(){const t=this.container;if(this.options.domId){const i=document.getElementById(this.options.domId);if(i){const s=i.getBoundingClientRect();return{width:s.width*t.retina.pixelRatio,height:s.height*t.retina.pixelRatio,mode:"precise"}}}return this.options.size??(()=>{const t=new n.G;return t.load({height:0,mode:"percent",width:0}),t})()}_emit(){if(this._paused)return;const t=(0,e.VG)(this.options.rate.quantity);this._emitParticles(t)}_emitParticles(t){const i=(0,e.TA)(this._particlesOptions);for(let s=0;s<t;s++){const t=(0,e.zw)({},i);if(this.spawnColor){const i=this.options.spawnColor?.animation;if(i){const t={h:360,s:100,l:100},s=3.6;this.spawnColor.h=this._setColorAnimation(i.h,this.spawnColor.h,t.h,s),this.spawnColor.s=this._setColorAnimation(i.s,this.spawnColor.s,t.s),this.spawnColor.l=this._setColorAnimation(i.l,this.spawnColor.l,t.l)}a(t,this.spawnColor)}const s=this.options.shape;let o=this.position;if(this._shape){const i=this._shape.randomPosition();if(i){o=i.position;const e=s.replace;e.color&&i.color&&a(t,i.color),e.opacity&&(t.opacity?t.opacity.value=i.opacity:t.opacity={value:i.opacity})}else o=null}o&&this.container.particles.addParticle(o,t)}}}}}]);
|
package/151.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/154.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 154.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[154],{4154:(e,a,t)=>{async function i(e,a=!0){await e.addParticleUpdater("size",(async()=>{const{SizeUpdater:e}=await t.e(344).then(t.bind(t,344));return new e}),a)}t.d(a,{loadSizeUpdater:()=>i})}}]);
|
package/154.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/192.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 192.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[192],{5192:(t,e,i)=>{i.d(e,{SoundsInstance:()=>c});var n=i(5540),s=i(7434);const o=1;function a(t){const e=document.createElement("img"),{clickCb:i,container:n,display:s,iconOptions:a,margin:u,options:c,pos:r,rightOffsets:l}=t,{width:h,path:d,style:_,svg:m}=a;!function(t,e,i,n,s,a,u,c){t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.position="absolute",t.style.top=`${e+u}px`,t.style.left=i-u-a+"px",t.style.display=n,t.style.zIndex=`${s+o}`,t.style.cssText+=c}(e,r.top+u,r.right-(u*(l.length+1)+h+l.reduce(((t,e)=>t+e),0)),s,c.fullScreen.zIndex+o,h,u,_),e.src=d??(m?`data:image/svg+xml;base64,${btoa(m)}`:"");return(n.canvas.element?.parentNode??document.body).append(e),e.addEventListener("click",(()=>{i()})),e}function u(t){t&&t.remove()}class c{constructor(t,e){this._addBuffer=t=>{const e=t.createBufferSource();return this._audioSources.push(e),e},this._addOscillator=t=>{const e=t.createOscillator();return this._audioSources.push(e),e},this._initEvents=()=>{const t=this._container,e=t.actualOptions.sounds;if(e?.enable&&t.canvas.element)for(const t of e.events){const e=i=>{(async()=>{const s=t.filter&&!t.filter(i);if(this._container!==i.container)return;if(!this._container||this._container.muted||this._container.destroyed)return void(0,n.wJ)(t.event,(t=>{this._engine.removeEventListener(t,e)}));if(s)return;if(t.audio)this._playBuffer((0,n.TA)(t.audio));else if(t.melodies){const e=(0,n.Vh)(t.melodies);e.melodies.length?await Promise.allSettled(e.melodies.map((t=>this._playNote(t.notes,0,e.loop)))):await this._playNote(e.notes,0,e.loop)}else if(t.notes){const e=(0,n.Vh)(t.notes);await this._playNote([e],0,!1)}})()};(0,n.wJ)(t.event,(t=>{this._engine.addEventListener(t,e)}))}},this._mute=async()=>{const t=this._container,e=this._getAudioContext();for(const t of this._audioSources)this._removeAudioSource(t);this._gain&&this._gain.disconnect(),await e.close(),t.audioContext=void 0,this._engine.dispatchEvent("soundsMuted",{container:this._container})},this._playBuffer=t=>{const e=this._audioMap.get(t.source);if(!e)return;const i=this._container.audioContext;if(!i)return;const n=this._addBuffer(i);n.loop=t.loop,n.buffer=e,n.connect(this._gain??i.destination),n.start()},this._playFrequency=async(t,e)=>{if(!this._gain||this._container.muted)return;const i=this._getAudioContext(),n=this._addOscillator(i);return n.connect(this._gain),n.type="sine",n.frequency.value=t,n.start(),new Promise((t=>{setTimeout((()=>{this._removeAudioSource(n),t()}),e)}))},this._playMuteSound=()=>{if(this._container.muted)return;const t=this._getAudioContext(),e=t.createGain();e.connect(t.destination),e.gain.value=0;const i=t.createOscillator();i.connect(e),i.type="sine",i.frequency.value=1,i.start(),setTimeout((()=>{i.stop(),i.disconnect(),e.disconnect()}))},this._playNote=async(t,e,i)=>{if(this._container.muted)return;const s=t[e];if(!s)return;const o=s.value,a=(0,n.wJ)(o,(async(i,n)=>this._playNoteValue(t,e,n)));await((0,n.cy)(a)?Promise.allSettled(a):a);let u=e+1;i&&u>=t.length&&(u%=t.length),this._container.muted||await this._playNote(t,u,i)},this._playNoteValue=async(t,e,i)=>{const o=t[e];if(!o)return;const a=(0,n.TA)(o.value,i,!0);try{const t=(0,s.jE)(a);if(!(0,n.Et)(t))return;await this._playFrequency(t,o.duration)}catch(t){(0,n.tZ)().error(t)}},this._removeAudioSource=t=>{t.stop(),t.disconnect();this._audioSources.splice(this._audioSources.indexOf(t),1)},this._unmute=()=>{const t=this._container.actualOptions.sounds;if(!t)return;const e=this._getAudioContext();this._audioSources||(this._audioSources=[]);const i=e.createGain();i.connect(e.destination),i.gain.value=t.volume.value/n.a5,this._gain=i,this._initEvents(),this._engine.dispatchEvent("soundsUnmuted",{container:this._container})},this._updateMuteIcons=()=>{const t=this._container,e=t.actualOptions.sounds;if(!e?.enable||!e.icons.enable)return;const i=this._muteImg,n=this._unmuteImg;i&&(i.style.display=t.muted?"block":"none"),n&&(n.style.display=t.muted?"none":"block")},this._updateMuteStatus=async()=>{const t=this._container,e=this._getAudioContext();t.muted?(await(e?.suspend()),await this._mute()):(await(e?.resume()),this._unmute(),this._playMuteSound())},this._updateVolume=async()=>{const t=this._container,e=t.actualOptions.sounds;if(!e?.enable)return;(0,n.qE)(this._volume,e.volume.min,e.volume.max);let i=!1;this._volume<=0&&!t.muted?(this._volume=0,t.muted=!0,i=!0):this._volume>0&&t.muted&&(t.muted=!1,i=!0),i&&(this._updateMuteIcons(),await this._updateMuteStatus()),this._gain?.gain&&(this._gain.gain.value=this._volume/n.a5)},this._container=t,this._engine=e,this._volume=0,this._audioSources=[],this._audioMap=new Map}async init(){const t=this._container.actualOptions.sounds;if(!t?.enable)return;if(t.autoPlay&&(0,s.E3)()){const t=()=>{removeEventListener(n.ms,t),removeEventListener(n.s7,t),(0,s.XK)(),this.unmute()},e={capture:!0,once:!0};addEventListener(n.ms,t,e),addEventListener(n.s7,t,e)}this._volume=t.volume.value;const e=t.events;this._audioMap=new Map;for(const t of e){if(!t.audio)continue;const e=(0,n.wJ)(t.audio,(async t=>{const e=await fetch(t.source);if(!e.ok)return;const i=await e.arrayBuffer(),n=this._getAudioContext(),s=await n.decodeAudioData(i);this._audioMap.set(t.source,s)}));e instanceof Promise?await e:await Promise.allSettled(e)}}async mute(){this._container.muted||await this.toggleMute()}async start(){const t=this._container,e=t.actualOptions,i=e.sounds;if(!i?.enable||!t.canvas.element)return;t.muted=!0;const n=t.canvas.element,o={top:n.offsetTop,right:n.offsetLeft+n.offsetWidth},{mute:u,unmute:c,volumeDown:r,volumeUp:l}=i.icons,h=async()=>{await this.toggleMute()},d=i.icons.enable?"block":"none";this._muteImg=a({container:t,options:e,pos:o,display:d,iconOptions:u,margin:10,rightOffsets:[r.width,l.width],clickCb:h}),this._unmuteImg=a({container:t,options:e,pos:o,display:"none",iconOptions:c,margin:10,rightOffsets:[r.width,l.width],clickCb:h}),this._volumeDownImg=a({container:t,options:e,pos:o,display:d,iconOptions:r,margin:10,rightOffsets:[l.width],clickCb:async()=>{await this.volumeDown()}}),this._volumeUpImg=a({container:t,options:e,pos:o,display:d,iconOptions:l,margin:10,rightOffsets:[],clickCb:async()=>{await this.volumeUp()}}),!(0,s.E3)()&&i.autoPlay&&await this.unmute()}stop(){this._container.muted=!0,(async()=>{await this._mute(),u(this._muteImg),u(this._unmuteImg),u(this._volumeDownImg),u(this._volumeUpImg)})()}async toggleMute(){const t=this._container;t.muted=!t.muted,this._updateMuteIcons(),await this._updateMuteStatus()}async unmute(){this._container.muted&&await this.toggleMute()}async volumeDown(){const t=this._container,e=t.actualOptions.sounds;e?.enable&&(t.muted&&(this._volume=0),this._volume-=e.volume.step,await this._updateVolume())}async volumeUp(){const t=this._container.actualOptions.sounds;t?.enable&&(this._volume+=t.volume.step,await this._updateVolume())}_getAudioContext(){const t=this._container;return t.audioContext||(t.audioContext=new AudioContext),t.audioContext}}}}]);
|
package/192.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/201.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 201.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[201],{5201:(e,a,i)=>{async function c(e,a=!0){const{CircleDrawer:c}=await i.e(774).then(i.bind(i,7774));await e.addShape("circle",new c,a)}i.d(a,{loadCircleShape:()=>c})}}]);
|
package/201.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/231.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 231.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[231],{9231:(n,i,s)=>{async function a(n,i=!0){const{SoundsPlugin:a}=await s.e(444).then(s.bind(s,1444));await n.addPlugin(new a(n),i)}s.d(i,{loadSoundsPlugin:()=>a})}}]);
|
package/231.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/250.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 250.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[250],{250:(e,a,t)=>{async function r(e,a=!0){const r=e,{EmittersSquareShapeGenerator:s}=await t.e(347).then(t.bind(t,8347));r.addEmitterShapeGenerator?.("square",new s),await r.refresh(a)}t.d(a,{loadEmittersShapeSquare:()=>r})}}]);
|
package/250.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/264.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 264.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[264],{4264:(a,t,e)=>{async function i(a,t=!0){await a.addParticleUpdater("opacity",(async a=>{const{OpacityUpdater:t}=await e.e(924).then(e.bind(e,4924));return new t(a)}),t)}e.d(t,{loadOpacityUpdater:()=>i})}}]);
|
package/264.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/294.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 294.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[294],{6294:(t,i,a)=>{a.d(i,{TrailDrawer:()=>l});var r=a(5540);const e=.5;class l{draw(t){const{context:i,radius:a,particle:r}=t,l=2*a,n=r.container.retina.pixelRatio,o=r.getPosition();if(!r.trail||!r.trailLength)return;const s=r.trailLength+a;if(r.trail.push({color:i.fillStyle??i.strokeStyle,position:{x:o.x,y:o.y}}),r.trail.length<2)return;for(;r.trail.length>s;)r.trail.shift();const h=Math.min(r.trail.length,s),c=o.x,x=o.y,d=r.container.canvas.size.width+l,p=r.container.canvas.size.height+l;let y=r.trail[h-1].position;const f=1,g=0,M=0,b=1;i.setTransform(f,g,M,b,o.x,o.y);for(let t=h;t>0;t--){const a=r.trail[t-1],o=a.position;i.beginPath(),i.moveTo(y.x-c,y.y-x);const s={x:(y.x+d)%d,y:(y.y+p)%p};if(Math.abs(y.x-o.x)>d*e||Math.abs(y.y-o.y)>p*e){y=o;continue}i.lineTo((Math.abs(y.x-o.x)>d*e?s.x:o.x)-c,(Math.abs(y.y-o.y)>p*e?s.y:o.y)-x);const f=Math.max(t/h*l,n,r.trailMinWidth??-1),g=i.globalAlpha;i.globalAlpha=r.trailFade?t/h:1,i.lineWidth=r.trailMaxWidth?Math.min(f,r.trailMaxWidth):f,i.strokeStyle=a.color,i.stroke(),i.globalAlpha=g,y=o}const{transformData:m}=t;i.setTransform(m.a,m.b,m.c,m.d,o.x,o.y)}particleInit(t,i){i.trail=[];const a=i.effectData;i.trailFade=a?.fade??!0,i.trailLength=(0,r.VG)(a?.length??10)*t.retina.pixelRatio,i.trailMaxWidth=a?.maxWidth?(0,r.VG)(a.maxWidth)*t.retina.pixelRatio:void 0,i.trailMinWidth=a?.minWidth?(0,r.VG)(a.minWidth)*t.retina.pixelRatio:void 0}}}}]);
|
package/294.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/344.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 344.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[344],{344:(e,i,s)=>{s.d(i,{SizeUpdater:()=>t});var a=s(5540);class t{init(e){const i=e.container,s=e.options.size.animation;s.enable&&(e.size.velocity=(e.retina.sizeAnimationSpeed??i.retina.sizeAnimationSpeed)/a.a5*i.retina.reduceFactor,s.sync||(e.size.velocity*=(0,a.G0)()))}isEnabled(e){return!e.destroyed&&!e.spawning&&e.size.enable&&((e.size.maxLoops??0)<=0||(e.size.maxLoops??0)>0&&(e.size.loops??0)<(e.size.maxLoops??0))}reset(e){e.size.loops=0}update(e,i){this.isEnabled(e)&&(0,a.UC)(e,e.size,!0,e.options.size.animation.destroy,i)}}}}]);
|
package/344.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/347.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 347.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[347],{8347:(t,i,s)=>{s.d(i,{EmittersSquareShapeGenerator:()=>h});class e{constructor(t,i,s,e){this.position=t,this.size=i,this.fill=s,this.options=e}resize(t,i){this.position=t,this.size=i}}var r=s(5540);function o(t,i){return t+i*((0,r.G0)()-r.N3)}class n extends e{constructor(t,i,s,e){super(t,i,s,e)}async init(){}randomPosition(){const t=this.fill,i=this.position,s=this.size;if(t)return{position:{x:o(i.x,s.width),y:o(i.y,s.height)}};{const t=.5*s.width,e=.5*s.height,o=Math.floor(4*(0,r.G0)()),n=2*((0,r.G0)()-r.N3);switch(o){case 0:return{position:{x:i.x+n*t,y:i.y-e}};case 1:return{position:{x:i.x-t,y:i.y+n*e}};case 2:return{position:{x:i.x+n*t,y:i.y+e}};default:return{position:{x:i.x+t,y:i.y+n*e}}}}}}class h{generate(t,i,s,e){return new n(t,i,s,e)}}}}]);
|
package/347.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/357.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 357.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[357],{357:(a,t,e)=>{async function i(a,t=!0){const{loadBaseMover:i}=await e.e(561).then(e.bind(e,561)),{loadCircleShape:d}=await e.e(201).then(e.bind(e,5201)),{loadColorUpdater:n}=await e.e(974).then(e.bind(e,6974)),{loadOpacityUpdater:w}=await e.e(264).then(e.bind(e,4264)),{loadOutModesUpdater:o}=await e.e(469).then(e.bind(e,8469)),{loadSizeUpdater:r}=await e.e(154).then(e.bind(e,4154));await i(a,!1),await d(a,!1),await n(a,!1),await w(a,!1),await o(a,!1),await r(a,!1),await a.refresh(t)}e.d(t,{loadBasic:()=>i})}}]);
|
package/357.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/36.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 36.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[36],{4036:(t,a,e)=>{async function r(t,a=!0){await t.addParticleUpdater("rotate",(async t=>{const{RotateUpdater:a}=await e.e(369).then(e.bind(e,5369));return new a(t)}),a)}e.d(a,{loadRotateUpdater:()=>r})}}]);
|
package/36.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/369.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 369.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[369],{5369:(t,e,a)=>{a.d(e,{RotateUpdater:()=>c});var o=a(5540);class i{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=(0,o.DT)(t.speed)),void 0!==t.decay&&(this.decay=(0,o.DT)(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class s extends o.PV{constructor(){super(),this.animation=new i,this.direction="clockwise",this.path=!1,this.value=0}load(t){t&&(super.load(t),void 0!==t.direction&&(this.direction=t.direction),this.animation.load(t.animation),void 0!==t.path&&(this.path=t.path))}}const n=2*Math.PI;class c{constructor(t){this.container=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:(0,o.pu)((0,o.VG)(e.value)),min:0,max:n},t.pathRotation=e.path;let a=e.direction;if("random"===a){a=Math.floor(2*(0,o.G0)())>0?"counter-clockwise":"clockwise"}switch(a){case"counter-clockwise":case"counterClockwise":t.rotate.status="decreasing";break;case"clockwise":t.rotate.status="increasing"}const i=e.animation;i.enable&&(t.rotate.decay=1-(0,o.VG)(i.decay),t.rotate.velocity=(0,o.VG)(i.speed)/360*this.container.retina.reduceFactor,i.sync||(t.rotate.velocity*=(0,o.G0)())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&e.animation.enable&&!e.path)}loadOptions(t,...e){t.rotate||(t.rotate=new s);for(const a of e)t.rotate.load(a?.rotate)}update(t,e){this.isEnabled(t)&&t.rotate&&((0,o.UC)(t,t.rotate,!1,"none",e),t.rotation=t.rotate.value)}}}}]);
|
package/369.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|
package/370.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 370.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[370],{2370:(e,a,t)=>{async function i(e,a=!0){if(!e.emitterShapeManager){const{ShapeManager:a}=await t.e(512).then(t.bind(t,4512));e.emitterShapeManager=new a(e)}e.addEmitterShapeGenerator||(e.addEmitterShapeGenerator=(a,t)=>{e.emitterShapeManager?.addShapeGenerator(a,t)});const{EmittersPlugin:i}=await t.e(112).then(t.bind(t,2112)),n=new i(e);await e.addPlugin(n,a)}t.d(a,{loadEmittersPlugin:()=>i})}}]);
|
package/370.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
|