@tsparticles/preset-fireworks 3.0.1 → 3.1.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/README.md +20 -120
- package/browser/bundle.js +0 -1
- package/browser/index.js +2 -1
- package/browser/options.js +14 -14
- package/cjs/bundle.js +0 -1
- package/cjs/index.js +2 -1
- package/cjs/options.js +13 -13
- package/esm/bundle.js +0 -1
- package/esm/index.js +2 -1
- package/esm/options.js +14 -14
- package/package.json +11 -11
- package/report.html +3 -3
- package/tsparticles.preset.fireworks.bundle.js +2778 -8419
- package/tsparticles.preset.fireworks.bundle.min.js +1 -1
- package/tsparticles.preset.fireworks.bundle.min.js.LICENSE.txt +1 -1
- package/tsparticles.preset.fireworks.js +98 -310
- package/tsparticles.preset.fireworks.min.js +1 -1
- package/tsparticles.preset.fireworks.min.js.LICENSE.txt +1 -1
- package/umd/bundle.js +0 -1
- package/umd/index.js +2 -1
- package/umd/options.js +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Fireworks Preset v3.0
|
|
1
|
+
/*! tsParticles Fireworks Preset v3.1.0 by Matteo Bruni */
|
|
@@ -4,7 +4,15 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v3.0
|
|
7
|
+
* v3.1.0
|
|
8
|
+
*/
|
|
9
|
+
/*
|
|
10
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
11
|
+
* This devtool is neither made for production nor for readable output files.
|
|
12
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
13
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
14
|
+
* or disable the default devtool with "devtool: false".
|
|
15
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
16
|
*/
|
|
9
17
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
18
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -15,78 +23,128 @@
|
|
|
15
23
|
var a = typeof exports === 'object' ? factory(require("@tsparticles/basic"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/updater-life"), require("@tsparticles/shape-line"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/updater-stroke-color"), require("@tsparticles/engine")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
|
|
16
24
|
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
17
25
|
}
|
|
18
|
-
})(this, (
|
|
26
|
+
})(this, (__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_shape_line__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_rotate__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_sounds__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_stroke_color__, __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__) => {
|
|
19
27
|
return /******/ (() => { // webpackBootstrap
|
|
20
28
|
/******/ "use strict";
|
|
21
29
|
/******/ var __webpack_modules__ = ({
|
|
22
30
|
|
|
23
|
-
/***/
|
|
31
|
+
/***/ "./dist/browser/index.js":
|
|
32
|
+
/*!*******************************!*\
|
|
33
|
+
!*** ./dist/browser/index.js ***!
|
|
34
|
+
\*******************************/
|
|
35
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
36
|
+
|
|
37
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadFireworksPreset: () => (/* binding */ loadFireworksPreset)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_basic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/basic */ \"@tsparticles/basic\");\n/* harmony import */ var _tsparticles_basic__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_basic__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _tsparticles_updater_destroy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tsparticles/updater-destroy */ \"@tsparticles/updater-destroy\");\n/* harmony import */ var _tsparticles_updater_destroy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_updater_destroy__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tsparticles/plugin-emitters */ \"@tsparticles/plugin-emitters\");\n/* harmony import */ var _tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _tsparticles_plugin_emitters_shape_square__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tsparticles/plugin-emitters-shape-square */ \"@tsparticles/plugin-emitters-shape-square\");\n/* harmony import */ var _tsparticles_plugin_emitters_shape_square__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_plugin_emitters_shape_square__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _tsparticles_updater_life__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @tsparticles/updater-life */ \"@tsparticles/updater-life\");\n/* harmony import */ var _tsparticles_updater_life__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_updater_life__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _tsparticles_shape_line__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @tsparticles/shape-line */ \"@tsparticles/shape-line\");\n/* harmony import */ var _tsparticles_shape_line__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_shape_line__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_updater_stroke_color__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @tsparticles/updater-stroke-color */ \"@tsparticles/updater-stroke-color\");\n/* harmony import */ var _tsparticles_updater_stroke_color__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_updater_stroke_color__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _options_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./options.js */ \"./dist/browser/options.js\");\n\n\n\n\n\n\n\n\n\n\nasync function loadFireworksPreset(engine, refresh = true) {\n await (0,_tsparticles_basic__WEBPACK_IMPORTED_MODULE_0__.loadBasic)(engine, false);\n await (0,_tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_2__.loadEmittersPlugin)(engine, false);\n await (0,_tsparticles_plugin_emitters_shape_square__WEBPACK_IMPORTED_MODULE_3__.loadEmittersShapeSquare)(engine, false);\n await (0,_tsparticles_plugin_sounds__WEBPACK_IMPORTED_MODULE_7__.loadSoundsPlugin)(engine, false);\n await (0,_tsparticles_shape_line__WEBPACK_IMPORTED_MODULE_5__.loadLineShape)(engine, false);\n await (0,_tsparticles_updater_rotate__WEBPACK_IMPORTED_MODULE_6__.loadRotateUpdater)(engine, false);\n await (0,_tsparticles_updater_destroy__WEBPACK_IMPORTED_MODULE_1__.loadDestroyUpdater)(engine, false);\n await (0,_tsparticles_updater_life__WEBPACK_IMPORTED_MODULE_4__.loadLifeUpdater)(engine, false);\n await (0,_tsparticles_updater_stroke_color__WEBPACK_IMPORTED_MODULE_8__.loadStrokeColorUpdater)(engine, false);\n await engine.addPreset(\"fireworks\", _options_js__WEBPACK_IMPORTED_MODULE_9__.options, false);\n await engine.refresh(refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/preset-fireworks/./dist/browser/index.js?");
|
|
38
|
+
|
|
39
|
+
/***/ }),
|
|
40
|
+
|
|
41
|
+
/***/ "./dist/browser/options.js":
|
|
42
|
+
/*!*********************************!*\
|
|
43
|
+
!*** ./dist/browser/options.js ***!
|
|
44
|
+
\*********************************/
|
|
45
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
46
|
+
|
|
47
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ options: () => (/* binding */ options)\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\nconst explodeSoundCheck = args => {\n const data = args.data;\n return data.particle.shape === \"line\";\n};\nconst fixRange = (value, min, max) => {\n const minValue = 0,\n diffSMax = value.max > max ? value.max - max : minValue;\n let res = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(value);\n if (diffSMax) {\n res = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(value.min - diffSMax, max);\n }\n const diffSMin = value.min < min ? value.min : minValue;\n if (diffSMin) {\n res = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(minValue, value.max + diffSMin);\n }\n return res;\n};\nconst fireworksOptions = [\"#ff595e\", \"#ffca3a\", \"#8ac926\", \"#1982c4\", \"#6a4c93\"].map(color => {\n const rgb = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.stringToRgb)(color);\n if (!rgb) {\n return undefined;\n }\n const hsl = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rgbToHsl)(rgb),\n sOffset = 30,\n lOffset = 30,\n sBounds = {\n min: 0,\n max: 100\n },\n lBounds = {\n min: 0,\n max: 100\n },\n sRange = fixRange({\n min: hsl.s - sOffset,\n max: hsl.s + sOffset\n }, sBounds.min, sBounds.max),\n lRange = fixRange({\n min: hsl.l - lOffset,\n max: hsl.l + lOffset\n }, lBounds.min, lBounds.max);\n return {\n color: {\n value: {\n h: hsl.h,\n s: sRange,\n l: lRange\n }\n },\n stroke: {\n width: 0\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: 0.7,\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 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: 1,\n max: 2\n }\n }\n },\n move: {\n decay: {\n min: 0.075,\n max: 0.1\n },\n enable: true,\n gravity: {\n enable: true,\n inverse: false,\n acceleration: 5\n },\n speed: {\n min: 5,\n max: 15\n },\n direction: \"none\",\n outModes: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.destroy\n }\n };\n}).filter(t => t !== undefined);\nconst options = {\n detectRetina: true,\n background: {\n color: \"#000\"\n },\n fpsLimit: 120,\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.05,\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 destroy: {\n mode: \"split\",\n bounds: {\n top: {\n min: 10,\n max: 30\n }\n },\n split: {\n sizeOffset: false,\n count: 1,\n factor: {\n value: 0.333333\n },\n rate: {\n value: {\n min: 75,\n max: 150\n }\n },\n particles: fireworksOptions\n }\n },\n life: {\n count: 1\n },\n shape: {\n type: \"line\"\n },\n size: {\n value: {\n min: 0.1,\n max: 50\n },\n animation: {\n enable: true,\n sync: true,\n speed: 90,\n startValue: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.StartValueType.max,\n destroy: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.DestroyType.min\n }\n },\n stroke: {\n color: {\n value: \"#ffffff\"\n },\n width: 1\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 trail: {\n fill: {\n color: \"#000\"\n },\n enable: true,\n length: 10\n }\n }\n },\n sounds: {\n enable: true,\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\n//# sourceURL=webpack://@tsparticles/preset-fireworks/./dist/browser/options.js?");
|
|
48
|
+
|
|
49
|
+
/***/ }),
|
|
50
|
+
|
|
51
|
+
/***/ "@tsparticles/basic":
|
|
52
|
+
/*!******************************************************************************************************************************!*\
|
|
53
|
+
!*** external {"commonjs":"@tsparticles/basic","commonjs2":"@tsparticles/basic","amd":"@tsparticles/basic","root":"window"} ***!
|
|
54
|
+
\******************************************************************************************************************************/
|
|
24
55
|
/***/ ((module) => {
|
|
25
56
|
|
|
26
|
-
module.exports =
|
|
57
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_basic__;
|
|
27
58
|
|
|
28
59
|
/***/ }),
|
|
29
60
|
|
|
30
|
-
/***/
|
|
61
|
+
/***/ "@tsparticles/engine":
|
|
62
|
+
/*!*********************************************************************************************************************************!*\
|
|
63
|
+
!*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
|
|
64
|
+
\*********************************************************************************************************************************/
|
|
31
65
|
/***/ ((module) => {
|
|
32
66
|
|
|
33
|
-
module.exports =
|
|
67
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
34
68
|
|
|
35
69
|
/***/ }),
|
|
36
70
|
|
|
37
|
-
/***/
|
|
71
|
+
/***/ "@tsparticles/plugin-emitters":
|
|
72
|
+
/*!************************************************************************************************************************************************************!*\
|
|
73
|
+
!*** external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"} ***!
|
|
74
|
+
\************************************************************************************************************************************************************/
|
|
38
75
|
/***/ ((module) => {
|
|
39
76
|
|
|
40
|
-
module.exports =
|
|
77
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters__;
|
|
41
78
|
|
|
42
79
|
/***/ }),
|
|
43
80
|
|
|
44
|
-
/***/
|
|
81
|
+
/***/ "@tsparticles/plugin-emitters-shape-square":
|
|
82
|
+
/*!***************************************************************************************************************************************************************************************************!*\
|
|
83
|
+
!*** external {"commonjs":"@tsparticles/plugin-emitters-shape-square","commonjs2":"@tsparticles/plugin-emitters-shape-square","amd":"@tsparticles/plugin-emitters-shape-square","root":"window"} ***!
|
|
84
|
+
\***************************************************************************************************************************************************************************************************/
|
|
45
85
|
/***/ ((module) => {
|
|
46
86
|
|
|
47
|
-
module.exports =
|
|
87
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters_shape_square__;
|
|
48
88
|
|
|
49
89
|
/***/ }),
|
|
50
90
|
|
|
51
|
-
/***/
|
|
91
|
+
/***/ "@tsparticles/plugin-sounds":
|
|
92
|
+
/*!******************************************************************************************************************************************************!*\
|
|
93
|
+
!*** external {"commonjs":"@tsparticles/plugin-sounds","commonjs2":"@tsparticles/plugin-sounds","amd":"@tsparticles/plugin-sounds","root":"window"} ***!
|
|
94
|
+
\******************************************************************************************************************************************************/
|
|
52
95
|
/***/ ((module) => {
|
|
53
96
|
|
|
54
|
-
module.exports =
|
|
97
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_sounds__;
|
|
55
98
|
|
|
56
99
|
/***/ }),
|
|
57
100
|
|
|
58
|
-
/***/
|
|
101
|
+
/***/ "@tsparticles/shape-line":
|
|
102
|
+
/*!*********************************************************************************************************************************************!*\
|
|
103
|
+
!*** external {"commonjs":"@tsparticles/shape-line","commonjs2":"@tsparticles/shape-line","amd":"@tsparticles/shape-line","root":"window"} ***!
|
|
104
|
+
\*********************************************************************************************************************************************/
|
|
59
105
|
/***/ ((module) => {
|
|
60
106
|
|
|
61
|
-
module.exports =
|
|
107
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_shape_line__;
|
|
62
108
|
|
|
63
109
|
/***/ }),
|
|
64
110
|
|
|
65
|
-
/***/
|
|
111
|
+
/***/ "@tsparticles/updater-destroy":
|
|
112
|
+
/*!************************************************************************************************************************************************************!*\
|
|
113
|
+
!*** external {"commonjs":"@tsparticles/updater-destroy","commonjs2":"@tsparticles/updater-destroy","amd":"@tsparticles/updater-destroy","root":"window"} ***!
|
|
114
|
+
\************************************************************************************************************************************************************/
|
|
66
115
|
/***/ ((module) => {
|
|
67
116
|
|
|
68
|
-
module.exports =
|
|
117
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_destroy__;
|
|
69
118
|
|
|
70
119
|
/***/ }),
|
|
71
120
|
|
|
72
|
-
/***/
|
|
121
|
+
/***/ "@tsparticles/updater-life":
|
|
122
|
+
/*!***************************************************************************************************************************************************!*\
|
|
123
|
+
!*** external {"commonjs":"@tsparticles/updater-life","commonjs2":"@tsparticles/updater-life","amd":"@tsparticles/updater-life","root":"window"} ***!
|
|
124
|
+
\***************************************************************************************************************************************************/
|
|
73
125
|
/***/ ((module) => {
|
|
74
126
|
|
|
75
|
-
module.exports =
|
|
127
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_life__;
|
|
76
128
|
|
|
77
129
|
/***/ }),
|
|
78
130
|
|
|
79
|
-
/***/
|
|
131
|
+
/***/ "@tsparticles/updater-rotate":
|
|
132
|
+
/*!*********************************************************************************************************************************************************!*\
|
|
133
|
+
!*** external {"commonjs":"@tsparticles/updater-rotate","commonjs2":"@tsparticles/updater-rotate","amd":"@tsparticles/updater-rotate","root":"window"} ***!
|
|
134
|
+
\*********************************************************************************************************************************************************/
|
|
80
135
|
/***/ ((module) => {
|
|
81
136
|
|
|
82
|
-
module.exports =
|
|
137
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_rotate__;
|
|
83
138
|
|
|
84
139
|
/***/ }),
|
|
85
140
|
|
|
86
|
-
/***/
|
|
141
|
+
/***/ "@tsparticles/updater-stroke-color":
|
|
142
|
+
/*!***************************************************************************************************************************************************************************!*\
|
|
143
|
+
!*** external {"commonjs":"@tsparticles/updater-stroke-color","commonjs2":"@tsparticles/updater-stroke-color","amd":"@tsparticles/updater-stroke-color","root":"window"} ***!
|
|
144
|
+
\***************************************************************************************************************************************************************************/
|
|
87
145
|
/***/ ((module) => {
|
|
88
146
|
|
|
89
|
-
module.exports =
|
|
147
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_stroke_color__;
|
|
90
148
|
|
|
91
149
|
/***/ })
|
|
92
150
|
|
|
@@ -117,6 +175,18 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__204__;
|
|
|
117
175
|
/******/ }
|
|
118
176
|
/******/
|
|
119
177
|
/************************************************************************/
|
|
178
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
179
|
+
/******/ (() => {
|
|
180
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
181
|
+
/******/ __webpack_require__.n = (module) => {
|
|
182
|
+
/******/ var getter = module && module.__esModule ?
|
|
183
|
+
/******/ () => (module['default']) :
|
|
184
|
+
/******/ () => (module);
|
|
185
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
186
|
+
/******/ return getter;
|
|
187
|
+
/******/ };
|
|
188
|
+
/******/ })();
|
|
189
|
+
/******/
|
|
120
190
|
/******/ /* webpack/runtime/define property getters */
|
|
121
191
|
/******/ (() => {
|
|
122
192
|
/******/ // define getter functions for harmony exports
|
|
@@ -146,294 +216,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__204__;
|
|
|
146
216
|
/******/ })();
|
|
147
217
|
/******/
|
|
148
218
|
/************************************************************************/
|
|
149
|
-
|
|
150
|
-
//
|
|
151
|
-
|
|
152
|
-
//
|
|
153
|
-
__webpack_require__.
|
|
154
|
-
|
|
155
|
-
// EXPORTS
|
|
156
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
157
|
-
loadFireworksPreset: () => (/* binding */ loadFireworksPreset)
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/basic","commonjs2":"@tsparticles/basic","amd":"@tsparticles/basic","root":"window"}
|
|
161
|
-
var basic_root_window_ = __webpack_require__(574);
|
|
162
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-destroy","commonjs2":"@tsparticles/updater-destroy","amd":"@tsparticles/updater-destroy","root":"window"}
|
|
163
|
-
var updater_destroy_root_window_ = __webpack_require__(344);
|
|
164
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"}
|
|
165
|
-
var plugin_emitters_root_window_ = __webpack_require__(68);
|
|
166
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters-shape-square","commonjs2":"@tsparticles/plugin-emitters-shape-square","amd":"@tsparticles/plugin-emitters-shape-square","root":"window"}
|
|
167
|
-
var plugin_emitters_shape_square_root_window_ = __webpack_require__(787);
|
|
168
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-life","commonjs2":"@tsparticles/updater-life","amd":"@tsparticles/updater-life","root":"window"}
|
|
169
|
-
var updater_life_root_window_ = __webpack_require__(84);
|
|
170
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-line","commonjs2":"@tsparticles/shape-line","amd":"@tsparticles/shape-line","root":"window"}
|
|
171
|
-
var shape_line_root_window_ = __webpack_require__(137);
|
|
172
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-rotate","commonjs2":"@tsparticles/updater-rotate","amd":"@tsparticles/updater-rotate","root":"window"}
|
|
173
|
-
var updater_rotate_root_window_ = __webpack_require__(59);
|
|
174
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-sounds","commonjs2":"@tsparticles/plugin-sounds","amd":"@tsparticles/plugin-sounds","root":"window"}
|
|
175
|
-
var plugin_sounds_root_window_ = __webpack_require__(490);
|
|
176
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-stroke-color","commonjs2":"@tsparticles/updater-stroke-color","amd":"@tsparticles/updater-stroke-color","root":"window"}
|
|
177
|
-
var updater_stroke_color_root_window_ = __webpack_require__(204);
|
|
178
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"}
|
|
179
|
-
var engine_root_window_ = __webpack_require__(533);
|
|
180
|
-
;// CONCATENATED MODULE: ./dist/browser/options.js
|
|
181
|
-
|
|
182
|
-
const explodeSoundCheck = args => {
|
|
183
|
-
const data = args.data;
|
|
184
|
-
return data.particle.shape === "line";
|
|
185
|
-
};
|
|
186
|
-
const fixRange = (value, min, max) => {
|
|
187
|
-
const minValue = 0,
|
|
188
|
-
diffSMax = value.max > max ? value.max - max : minValue;
|
|
189
|
-
let res = (0,engine_root_window_.setRangeValue)(value);
|
|
190
|
-
if (diffSMax) {
|
|
191
|
-
res = (0,engine_root_window_.setRangeValue)(value.min - diffSMax, max);
|
|
192
|
-
}
|
|
193
|
-
const diffSMin = value.min < min ? value.min : minValue;
|
|
194
|
-
if (diffSMin) {
|
|
195
|
-
res = (0,engine_root_window_.setRangeValue)(minValue, value.max + diffSMin);
|
|
196
|
-
}
|
|
197
|
-
return res;
|
|
198
|
-
};
|
|
199
|
-
const fireworksOptions = ["#ff595e", "#ffca3a", "#8ac926", "#1982c4", "#6a4c93"].map(color => {
|
|
200
|
-
const rgb = (0,engine_root_window_.stringToRgb)(color);
|
|
201
|
-
if (!rgb) {
|
|
202
|
-
return undefined;
|
|
203
|
-
}
|
|
204
|
-
const hsl = (0,engine_root_window_.rgbToHsl)(rgb),
|
|
205
|
-
sOffset = 30,
|
|
206
|
-
lOffset = 30,
|
|
207
|
-
sBounds = {
|
|
208
|
-
min: 0,
|
|
209
|
-
max: 100
|
|
210
|
-
},
|
|
211
|
-
lBounds = {
|
|
212
|
-
min: 0,
|
|
213
|
-
max: 100
|
|
214
|
-
},
|
|
215
|
-
sRange = fixRange({
|
|
216
|
-
min: hsl.s - sOffset,
|
|
217
|
-
max: hsl.s + sOffset
|
|
218
|
-
}, sBounds.min, sBounds.max),
|
|
219
|
-
lRange = fixRange({
|
|
220
|
-
min: hsl.l - lOffset,
|
|
221
|
-
max: hsl.l + lOffset
|
|
222
|
-
}, lBounds.min, lBounds.max);
|
|
223
|
-
return {
|
|
224
|
-
color: {
|
|
225
|
-
value: {
|
|
226
|
-
h: hsl.h,
|
|
227
|
-
s: sRange,
|
|
228
|
-
l: lRange
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
stroke: {
|
|
232
|
-
width: 0
|
|
233
|
-
},
|
|
234
|
-
number: {
|
|
235
|
-
value: 0
|
|
236
|
-
},
|
|
237
|
-
opacity: {
|
|
238
|
-
value: {
|
|
239
|
-
min: 0.1,
|
|
240
|
-
max: 1
|
|
241
|
-
},
|
|
242
|
-
animation: {
|
|
243
|
-
enable: true,
|
|
244
|
-
speed: 0.7,
|
|
245
|
-
sync: false,
|
|
246
|
-
startValue: "max",
|
|
247
|
-
destroy: "min"
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
shape: {
|
|
251
|
-
type: "circle"
|
|
252
|
-
},
|
|
253
|
-
size: {
|
|
254
|
-
value: {
|
|
255
|
-
min: 1,
|
|
256
|
-
max: 2
|
|
257
|
-
},
|
|
258
|
-
animation: {
|
|
259
|
-
enable: true,
|
|
260
|
-
speed: 5,
|
|
261
|
-
count: 1,
|
|
262
|
-
sync: false,
|
|
263
|
-
startValue: "min",
|
|
264
|
-
destroy: "none"
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
life: {
|
|
268
|
-
count: 1,
|
|
269
|
-
duration: {
|
|
270
|
-
value: {
|
|
271
|
-
min: 1,
|
|
272
|
-
max: 2
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
move: {
|
|
277
|
-
decay: {
|
|
278
|
-
min: 0.075,
|
|
279
|
-
max: 0.1
|
|
280
|
-
},
|
|
281
|
-
enable: true,
|
|
282
|
-
gravity: {
|
|
283
|
-
enable: true,
|
|
284
|
-
inverse: false,
|
|
285
|
-
acceleration: 5
|
|
286
|
-
},
|
|
287
|
-
speed: {
|
|
288
|
-
min: 5,
|
|
289
|
-
max: 15
|
|
290
|
-
},
|
|
291
|
-
direction: "none",
|
|
292
|
-
outModes: "destroy"
|
|
293
|
-
}
|
|
294
|
-
};
|
|
295
|
-
}).filter(t => t !== undefined);
|
|
296
|
-
const options = {
|
|
297
|
-
detectRetina: true,
|
|
298
|
-
background: {
|
|
299
|
-
color: "#000"
|
|
300
|
-
},
|
|
301
|
-
fpsLimit: 120,
|
|
302
|
-
emitters: {
|
|
303
|
-
direction: "top",
|
|
304
|
-
life: {
|
|
305
|
-
count: 0,
|
|
306
|
-
duration: 0.1,
|
|
307
|
-
delay: 0.1
|
|
308
|
-
},
|
|
309
|
-
rate: {
|
|
310
|
-
delay: 0.05,
|
|
311
|
-
quantity: 1
|
|
312
|
-
},
|
|
313
|
-
size: {
|
|
314
|
-
width: 100,
|
|
315
|
-
height: 0
|
|
316
|
-
},
|
|
317
|
-
position: {
|
|
318
|
-
y: 100,
|
|
319
|
-
x: 50
|
|
320
|
-
}
|
|
321
|
-
},
|
|
322
|
-
particles: {
|
|
323
|
-
number: {
|
|
324
|
-
value: 0
|
|
325
|
-
},
|
|
326
|
-
destroy: {
|
|
327
|
-
mode: "split",
|
|
328
|
-
bounds: {
|
|
329
|
-
top: {
|
|
330
|
-
min: 10,
|
|
331
|
-
max: 30
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
split: {
|
|
335
|
-
sizeOffset: false,
|
|
336
|
-
count: 1,
|
|
337
|
-
factor: {
|
|
338
|
-
value: 0.333333
|
|
339
|
-
},
|
|
340
|
-
rate: {
|
|
341
|
-
value: {
|
|
342
|
-
min: 75,
|
|
343
|
-
max: 150
|
|
344
|
-
}
|
|
345
|
-
},
|
|
346
|
-
particles: fireworksOptions
|
|
347
|
-
}
|
|
348
|
-
},
|
|
349
|
-
life: {
|
|
350
|
-
count: 1
|
|
351
|
-
},
|
|
352
|
-
shape: {
|
|
353
|
-
type: "line"
|
|
354
|
-
},
|
|
355
|
-
size: {
|
|
356
|
-
value: {
|
|
357
|
-
min: 0.1,
|
|
358
|
-
max: 50
|
|
359
|
-
},
|
|
360
|
-
animation: {
|
|
361
|
-
enable: true,
|
|
362
|
-
sync: true,
|
|
363
|
-
speed: 90,
|
|
364
|
-
startValue: "max",
|
|
365
|
-
destroy: "min"
|
|
366
|
-
}
|
|
367
|
-
},
|
|
368
|
-
stroke: {
|
|
369
|
-
color: {
|
|
370
|
-
value: "#ffffff"
|
|
371
|
-
},
|
|
372
|
-
width: 1
|
|
373
|
-
},
|
|
374
|
-
rotate: {
|
|
375
|
-
path: true
|
|
376
|
-
},
|
|
377
|
-
move: {
|
|
378
|
-
enable: true,
|
|
379
|
-
gravity: {
|
|
380
|
-
acceleration: 15,
|
|
381
|
-
enable: true,
|
|
382
|
-
inverse: true,
|
|
383
|
-
maxSpeed: 100
|
|
384
|
-
},
|
|
385
|
-
speed: {
|
|
386
|
-
min: 10,
|
|
387
|
-
max: 20
|
|
388
|
-
},
|
|
389
|
-
outModes: {
|
|
390
|
-
default: "destroy",
|
|
391
|
-
top: "none"
|
|
392
|
-
},
|
|
393
|
-
trail: {
|
|
394
|
-
fill: {
|
|
395
|
-
color: "#000"
|
|
396
|
-
},
|
|
397
|
-
enable: true,
|
|
398
|
-
length: 10
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
},
|
|
402
|
-
sounds: {
|
|
403
|
-
enable: true,
|
|
404
|
-
events: [{
|
|
405
|
-
event: "particleRemoved",
|
|
406
|
-
filter: explodeSoundCheck,
|
|
407
|
-
audio: ["https://particles.js.org/audio/explosion0.mp3", "https://particles.js.org/audio/explosion1.mp3", "https://particles.js.org/audio/explosion2.mp3"]
|
|
408
|
-
}],
|
|
409
|
-
volume: 50
|
|
410
|
-
}
|
|
411
|
-
};
|
|
412
|
-
;// CONCATENATED MODULE: ./dist/browser/index.js
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
async function loadFireworksPreset(engine, refresh = true) {
|
|
424
|
-
await (0,basic_root_window_.loadBasic)(engine, false);
|
|
425
|
-
await (0,plugin_emitters_root_window_.loadEmittersPlugin)(engine, false);
|
|
426
|
-
await (0,plugin_emitters_shape_square_root_window_.loadEmittersShapeSquare)(engine, false);
|
|
427
|
-
await (0,plugin_sounds_root_window_.loadSoundsPlugin)(engine, false);
|
|
428
|
-
await (0,shape_line_root_window_.loadLineShape)(engine, false);
|
|
429
|
-
await (0,updater_rotate_root_window_.loadRotateUpdater)(engine, false);
|
|
430
|
-
await (0,updater_destroy_root_window_.loadDestroyUpdater)(engine, false);
|
|
431
|
-
await (0,updater_life_root_window_.loadLifeUpdater)(engine, false);
|
|
432
|
-
await (0,updater_stroke_color_root_window_.loadStrokeColorUpdater)(engine, false);
|
|
433
|
-
await engine.addPreset("fireworks", options, refresh);
|
|
434
|
-
}
|
|
435
|
-
})();
|
|
436
|
-
|
|
219
|
+
/******/
|
|
220
|
+
/******/ // startup
|
|
221
|
+
/******/ // Load entry module and return exports
|
|
222
|
+
/******/ // This entry module can't be inlined because the eval devtool is used.
|
|
223
|
+
/******/ var __webpack_exports__ = __webpack_require__("./dist/browser/index.js");
|
|
224
|
+
/******/
|
|
437
225
|
/******/ return __webpack_exports__;
|
|
438
226
|
/******/ })()
|
|
439
227
|
;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.preset.fireworks.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/basic"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color"),require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/basic","@tsparticles/updater-destroy","@tsparticles/plugin-emitters","@tsparticles/plugin-emitters-shape-square","@tsparticles/updater-life","@tsparticles/shape-line","@tsparticles/updater-rotate","@tsparticles/plugin-sounds","@tsparticles/updater-stroke-color","@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/basic"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color"),require("@tsparticles/engine")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(this,((e,t,r,a,i,s,o,n,l,p)=>(()=>{
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/basic"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color"),require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/basic","@tsparticles/updater-destroy","@tsparticles/plugin-emitters","@tsparticles/plugin-emitters-shape-square","@tsparticles/updater-life","@tsparticles/shape-line","@tsparticles/updater-rotate","@tsparticles/plugin-sounds","@tsparticles/updater-stroke-color","@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/basic"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color"),require("@tsparticles/engine")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(this,((e,t,r,a,i,s,o,n,l,p)=>(()=>{var u={145:t=>{t.exports=e},303:e=>{e.exports=p},526:e=>{e.exports=r},140:e=>{e.exports=a},933:e=>{e.exports=n},983:e=>{e.exports=s},173:e=>{e.exports=t},75:e=>{e.exports=i},668:e=>{e.exports=o},227:e=>{e.exports=l}},d={};function c(e){var t=d[e];if(void 0!==t)return t.exports;var r=d[e]={exports:{}};return u[e](r,r.exports,c),r.exports}c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},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 m={};return(()=>{c.r(m),c.d(m,{loadFireworksPreset:()=>y});var e=c(145),t=c(173),r=c(526),a=c(140),i=c(75),s=c(983),o=c(668),n=c(933),l=c(227),p=c(303);const u=(e,t,r)=>{const a=e.max>r?e.max-r:0;let i=(0,p.setRangeValue)(e);a&&(i=(0,p.setRangeValue)(e.min-a,r));const s=e.min<t?e.min:0;return s&&(i=(0,p.setRangeValue)(0,e.max+s)),i},d=["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"].map((e=>{const t=(0,p.stringToRgb)(e);if(!t)return;const r=(0,p.rgbToHsl)(t),a=0,i=100,s=0,o=100,n=u({min:r.s-30,max:r.s+30},a,i),l=u({min:r.l-30,max:r.l+30},s,o);return{color:{value:{h:r.h,s:n,l}},stroke:{width:0},number:{value:0},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:.7,sync:!1,startValue:p.StartValueType.max,destroy:p.DestroyType.min}},shape:{type:"circle"},size:{value:{min:1,max:2},animation:{enable:!0,speed:5,count:1,sync:!1,startValue:p.StartValueType.min,destroy:p.DestroyType.none}},life:{count:1,duration:{value:{min:1,max:2}}},move:{decay:{min:.075,max:.1},enable:!0,gravity:{enable:!0,inverse:!1,acceleration:5},speed:{min:5,max:15},direction:"none",outModes:p.OutMode.destroy}}})).filter((e=>void 0!==e)),f={detectRetina:!0,background:{color:"#000"},fpsLimit:120,emitters:{direction:p.MoveDirection.top,life:{count:0,duration:.1,delay:.1},rate:{delay:.05,quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},destroy:{mode:"split",bounds:{top:{min:10,max:30}},split:{sizeOffset:!1,count:1,factor:{value:.333333},rate:{value:{min:75,max:150}},particles:d}},life:{count:1},shape:{type:"line"},size:{value:{min:.1,max:50},animation:{enable:!0,sync:!0,speed:90,startValue:p.StartValueType.max,destroy:p.DestroyType.min}},stroke:{color:{value:"#ffffff"},width:1},rotate:{path:!0},move:{enable:!0,gravity:{acceleration:15,enable:!0,inverse:!0,maxSpeed:100},speed:{min:10,max:20},outModes:{default:p.OutMode.destroy,top:p.OutMode.none},trail:{fill:{color:"#000"},enable:!0,length:10}}},sounds:{enable:!0,events:[{event:p.EventType.particleRemoved,filter:e=>"line"===e.data.particle.shape,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}};async function y(p,u=!0){await(0,e.loadBasic)(p,!1),await(0,r.loadEmittersPlugin)(p,!1),await(0,a.loadEmittersShapeSquare)(p,!1),await(0,n.loadSoundsPlugin)(p,!1),await(0,s.loadLineShape)(p,!1),await(0,o.loadRotateUpdater)(p,!1),await(0,t.loadDestroyUpdater)(p,!1),await(0,i.loadLifeUpdater)(p,!1),await(0,l.loadStrokeColorUpdater)(p,!1),await p.addPreset("fireworks",f,!1),await p.refresh(u)}})(),m})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Fireworks Preset v3.0
|
|
1
|
+
/*! tsParticles Fireworks Preset v3.1.0 by Matteo Bruni */
|
package/umd/bundle.js
CHANGED
|
@@ -14,5 +14,4 @@
|
|
|
14
14
|
Object.defineProperty(exports, "loadFireworksPreset", { enumerable: true, get: function () { return index_js_1.loadFireworksPreset; } });
|
|
15
15
|
const engine_1 = require("@tsparticles/engine");
|
|
16
16
|
Object.defineProperty(exports, "tsParticles", { enumerable: true, get: function () { return engine_1.tsParticles; } });
|
|
17
|
-
void (0, index_js_1.loadFireworksPreset)(engine_1.tsParticles);
|
|
18
17
|
});
|
package/umd/index.js
CHANGED
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
await (0, updater_destroy_1.loadDestroyUpdater)(engine, false);
|
|
31
31
|
await (0, updater_life_1.loadLifeUpdater)(engine, false);
|
|
32
32
|
await (0, updater_stroke_color_1.loadStrokeColorUpdater)(engine, false);
|
|
33
|
-
await engine.addPreset("fireworks", options_js_1.options,
|
|
33
|
+
await engine.addPreset("fireworks", options_js_1.options, false);
|
|
34
|
+
await engine.refresh(refresh);
|
|
34
35
|
}
|
|
35
36
|
exports.loadFireworksPreset = loadFireworksPreset;
|
|
36
37
|
});
|
package/umd/options.js
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
return res;
|
|
29
29
|
};
|
|
30
30
|
const fireworksOptions = ["#ff595e", "#ffca3a", "#8ac926", "#1982c4", "#6a4c93"]
|
|
31
|
-
.map(
|
|
31
|
+
.map(color => {
|
|
32
32
|
const rgb = (0, engine_1.stringToRgb)(color);
|
|
33
33
|
if (!rgb) {
|
|
34
34
|
return undefined;
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
enable: true,
|
|
64
64
|
speed: 0.7,
|
|
65
65
|
sync: false,
|
|
66
|
-
startValue:
|
|
67
|
-
destroy:
|
|
66
|
+
startValue: engine_1.StartValueType.max,
|
|
67
|
+
destroy: engine_1.DestroyType.min,
|
|
68
68
|
},
|
|
69
69
|
},
|
|
70
70
|
shape: {
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
speed: 5,
|
|
78
78
|
count: 1,
|
|
79
79
|
sync: false,
|
|
80
|
-
startValue:
|
|
81
|
-
destroy:
|
|
80
|
+
startValue: engine_1.StartValueType.min,
|
|
81
|
+
destroy: engine_1.DestroyType.none,
|
|
82
82
|
},
|
|
83
83
|
},
|
|
84
84
|
life: {
|
|
@@ -100,11 +100,11 @@
|
|
|
100
100
|
},
|
|
101
101
|
speed: { min: 5, max: 15 },
|
|
102
102
|
direction: "none",
|
|
103
|
-
outModes:
|
|
103
|
+
outModes: engine_1.OutMode.destroy,
|
|
104
104
|
},
|
|
105
105
|
};
|
|
106
106
|
})
|
|
107
|
-
.filter(
|
|
107
|
+
.filter(t => t !== undefined);
|
|
108
108
|
exports.options = {
|
|
109
109
|
detectRetina: true,
|
|
110
110
|
background: {
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
},
|
|
113
113
|
fpsLimit: 120,
|
|
114
114
|
emitters: {
|
|
115
|
-
direction:
|
|
115
|
+
direction: engine_1.MoveDirection.top,
|
|
116
116
|
life: {
|
|
117
117
|
count: 0,
|
|
118
118
|
duration: 0.1,
|
|
@@ -167,8 +167,8 @@
|
|
|
167
167
|
enable: true,
|
|
168
168
|
sync: true,
|
|
169
169
|
speed: 90,
|
|
170
|
-
startValue:
|
|
171
|
-
destroy:
|
|
170
|
+
startValue: engine_1.StartValueType.max,
|
|
171
|
+
destroy: engine_1.DestroyType.min,
|
|
172
172
|
},
|
|
173
173
|
},
|
|
174
174
|
stroke: {
|
|
@@ -193,8 +193,8 @@
|
|
|
193
193
|
max: 20,
|
|
194
194
|
},
|
|
195
195
|
outModes: {
|
|
196
|
-
default:
|
|
197
|
-
top:
|
|
196
|
+
default: engine_1.OutMode.destroy,
|
|
197
|
+
top: engine_1.OutMode.none,
|
|
198
198
|
},
|
|
199
199
|
trail: {
|
|
200
200
|
fill: {
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
enable: true,
|
|
210
210
|
events: [
|
|
211
211
|
{
|
|
212
|
-
event:
|
|
212
|
+
event: engine_1.EventType.particleRemoved,
|
|
213
213
|
filter: explodeSoundCheck,
|
|
214
214
|
audio: [
|
|
215
215
|
"https://particles.js.org/audio/explosion0.mp3",
|