@tsparticles/preset-fireworks 3.0.2 → 3.2.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 +11 -7
- package/browser/bundle.js +0 -1
- package/browser/index.js +3 -2
- package/browser/options.js +197 -191
- package/cjs/bundle.js +0 -1
- package/cjs/index.js +3 -2
- package/cjs/options.js +198 -191
- package/esm/bundle.js +0 -1
- package/esm/index.js +3 -2
- package/esm/options.js +197 -191
- package/package.json +11 -11
- package/report.html +3 -3
- package/tsparticles.preset.fireworks.bundle.js +2818 -8444
- 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 +101 -313
- package/tsparticles.preset.fireworks.min.js +1 -1
- package/tsparticles.preset.fireworks.min.js.LICENSE.txt +1 -1
- package/types/options.d.ts +2 -2
- package/umd/bundle.js +0 -1
- package/umd/index.js +4 -3
- package/umd/options.js +198 -191
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Fireworks Preset v3.0
|
|
1
|
+
/*! tsParticles Fireworks Preset v3.2.0 by Matteo Bruni */
|
|
@@ -4,89 +4,147 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v3.0
|
|
7
|
+
* v3.2.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')
|
|
11
|
-
module.exports = 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")
|
|
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/shape-line"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/updater-stroke-color"));
|
|
12
20
|
else if(typeof define === 'function' && define.amd)
|
|
13
|
-
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"
|
|
21
|
+
define(["@tsparticles/engine", "@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"], factory);
|
|
14
22
|
else {
|
|
15
|
-
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")
|
|
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/shape-line"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/updater-stroke-color")) : 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_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_shape_line__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_rotate__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_sounds__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_stroke_color__) => {
|
|
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 _options_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./options.js */ \"./dist/browser/options.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_shape_line__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @tsparticles/shape-line */ \"@tsparticles/shape-line\");\n/* harmony import */ var _tsparticles_shape_line__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_shape_line__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _tsparticles_updater_rotate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @tsparticles/updater-rotate */ \"@tsparticles/updater-rotate\");\n/* harmony import */ var _tsparticles_updater_rotate__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_updater_rotate__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _tsparticles_plugin_sounds__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @tsparticles/plugin-sounds */ \"@tsparticles/plugin-sounds\");\n/* harmony import */ var _tsparticles_plugin_sounds__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_plugin_sounds__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _tsparticles_updater_stroke_color__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @tsparticles/updater-stroke-color */ \"@tsparticles/updater-stroke-color\");\n/* harmony import */ var _tsparticles_updater_stroke_color__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_updater_stroke_color__WEBPACK_IMPORTED_MODULE_9__);\n\n\n\n\n\n\n\n\n\n\nasync function loadFireworksPreset(engine, refresh = true) {\n await (0,_tsparticles_basic__WEBPACK_IMPORTED_MODULE_1__.loadBasic)(engine, false);\n await (0,_tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_3__.loadEmittersPlugin)(engine, false);\n await (0,_tsparticles_plugin_emitters_shape_square__WEBPACK_IMPORTED_MODULE_4__.loadEmittersShapeSquare)(engine, false);\n await (0,_tsparticles_plugin_sounds__WEBPACK_IMPORTED_MODULE_8__.loadSoundsPlugin)(engine, false);\n await (0,_tsparticles_shape_line__WEBPACK_IMPORTED_MODULE_6__.loadLineShape)(engine, false);\n await (0,_tsparticles_updater_rotate__WEBPACK_IMPORTED_MODULE_7__.loadRotateUpdater)(engine, false);\n await (0,_tsparticles_updater_destroy__WEBPACK_IMPORTED_MODULE_2__.loadDestroyUpdater)(engine, false);\n await (0,_tsparticles_updater_life__WEBPACK_IMPORTED_MODULE_5__.loadLifeUpdater)(engine, false);\n await (0,_tsparticles_updater_stroke_color__WEBPACK_IMPORTED_MODULE_9__.loadStrokeColorUpdater)(engine, false);\n await engine.addPreset(\"fireworks\", (0,_options_js__WEBPACK_IMPORTED_MODULE_0__.initOptions)(engine), 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 */ initOptions: () => (/* binding */ initOptions)\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\nfunction initOptions(engine) {\n const explodeSoundCheck = args => {\n const data = args.data;\n return data.particle.shape === \"line\";\n },\n 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 },\n fireworksOptions = [\"#ff595e\", \"#ffca3a\", \"#8ac926\", \"#1982c4\", \"#6a4c93\"].map(color => {\n const rgb = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.stringToRgb)(engine, 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);\n return {\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\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")
|
|
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/shape-line"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color"));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/shape-line","@tsparticles/updater-rotate","@tsparticles/plugin-sounds","@tsparticles/updater-stroke-color"],t);else{var r="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/shape-line"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color")):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:e=>{e.exports=t},303:t=>{t.exports=e},526:e=>{e.exports=a},140:e=>{e.exports=i},933:e=>{e.exports=l},983:e=>{e.exports=o},173:e=>{e.exports=r},75:e=>{e.exports=s},668:e=>{e.exports=n},227:e=>{e.exports=p}},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:()=>u});var e=c(303);var t=c(145),r=c(173),a=c(526),i=c(140),s=c(75),o=c(983),n=c(668),l=c(933),p=c(227);async function u(u,d=!0){await(0,t.loadBasic)(u,!1),await(0,a.loadEmittersPlugin)(u,!1),await(0,i.loadEmittersShapeSquare)(u,!1),await(0,l.loadSoundsPlugin)(u,!1),await(0,o.loadLineShape)(u,!1),await(0,n.loadRotateUpdater)(u,!1),await(0,r.loadDestroyUpdater)(u,!1),await(0,s.loadLifeUpdater)(u,!1),await(0,p.loadStrokeColorUpdater)(u,!1),await u.addPreset("fireworks",function(t){const r=(t,r,a)=>{const i=t.max>a?t.max-a:0;let s=(0,e.setRangeValue)(t);i&&(s=(0,e.setRangeValue)(t.min-i,a));const o=t.min<r?t.min:0;return o&&(s=(0,e.setRangeValue)(0,t.max+o)),s},a=["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"].map((a=>{const i=(0,e.stringToRgb)(t,a);if(!i)return;const s=(0,e.rgbToHsl)(i),o=0,n=100,l=0,p=100,u=r({min:s.s-30,max:s.s+30},o,n),d=r({min:s.l-30,max:s.l+30},l,p);return{color:{value:{h:s.h,s:u,l:d}},stroke:{width:0},number:{value:0},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:.7,sync:!1,startValue:e.StartValueType.max,destroy:e.DestroyType.min}},shape:{type:"circle"},size:{value:{min:1,max:2},animation:{enable:!0,speed:5,count:1,sync:!1,startValue:e.StartValueType.min,destroy:e.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:e.OutMode.destroy}}})).filter((e=>void 0!==e));return{detectRetina:!0,background:{color:"#000"},fpsLimit:120,emitters:{direction:e.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:a}},life:{count:1},shape:{type:"line"},size:{value:{min:.1,max:50},animation:{enable:!0,sync:!0,speed:90,startValue:e.StartValueType.max,destroy:e.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:e.OutMode.destroy,top:e.OutMode.none},trail:{fill:{color:"#000"},enable:!0,length:10}}},sounds:{enable:!0,events:[{event:e.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}}}(u),!1),await u.refresh(d)}})(),m})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Fireworks Preset v3.0
|
|
1
|
+
/*! tsParticles Fireworks Preset v3.2.0 by Matteo Bruni */
|
package/types/options.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type ISourceOptions } from "@tsparticles/engine";
|
|
2
|
-
export declare
|
|
1
|
+
import { type Engine, type ISourceOptions } from "@tsparticles/engine";
|
|
2
|
+
export declare function initOptions(engine: Engine): ISourceOptions;
|
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
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "@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"
|
|
7
|
+
define(["require", "exports", "./options.js", "@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"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.loadFireworksPreset = void 0;
|
|
13
|
+
const options_js_1 = require("./options.js");
|
|
13
14
|
const basic_1 = require("@tsparticles/basic");
|
|
14
15
|
const updater_destroy_1 = require("@tsparticles/updater-destroy");
|
|
15
16
|
const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
|
|
@@ -19,7 +20,6 @@
|
|
|
19
20
|
const updater_rotate_1 = require("@tsparticles/updater-rotate");
|
|
20
21
|
const plugin_sounds_1 = require("@tsparticles/plugin-sounds");
|
|
21
22
|
const updater_stroke_color_1 = require("@tsparticles/updater-stroke-color");
|
|
22
|
-
const options_js_1 = require("./options.js");
|
|
23
23
|
async function loadFireworksPreset(engine, refresh = true) {
|
|
24
24
|
await (0, basic_1.loadBasic)(engine, false);
|
|
25
25
|
await (0, plugin_emitters_1.loadEmittersPlugin)(engine, false);
|
|
@@ -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.
|
|
33
|
+
await engine.addPreset("fireworks", (0, options_js_1.initOptions)(engine), false);
|
|
34
|
+
await engine.refresh(refresh);
|
|
34
35
|
}
|
|
35
36
|
exports.loadFireworksPreset = loadFireworksPreset;
|
|
36
37
|
});
|