tsparticles-preset-fireworks
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -1,4 +0,8 @@ | ||
import { loadFireworksPreset } from "."; | ||
import { tsParticles } from "tsparticles-engine"; | ||
loadFireworksPreset(tsParticles); | ||
export { loadFireworksPreset, tsParticles }; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.tsParticles = exports.loadFireworksPreset = void 0; | ||
const _1 = require("."); | ||
Object.defineProperty(exports, "loadFireworksPreset", { enumerable: true, get: function () { return _1.loadFireworksPreset; } }); | ||
const tsparticles_engine_1 = require("tsparticles-engine"); | ||
Object.defineProperty(exports, "tsParticles", { enumerable: true, get: function () { return tsparticles_engine_1.tsParticles; } }); | ||
(0, _1.loadFireworksPreset)(tsparticles_engine_1.tsParticles); |
54
index.js
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -10,29 +11,32 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
import { loadAngleUpdater } from "tsparticles-updater-angle"; | ||
import { loadBaseMover } from "tsparticles-move-base"; | ||
import { loadCircleShape } from "tsparticles-shape-circle"; | ||
import { loadColorUpdater } from "tsparticles-updater-color"; | ||
import { loadEmittersPlugin } from "tsparticles-plugin-emitters"; | ||
import { loadLifeUpdater } from "tsparticles-updater-life"; | ||
import { loadLineShape } from "tsparticles-shape-line"; | ||
import { loadOpacityUpdater } from "tsparticles-updater-opacity"; | ||
import { loadOutModesUpdater } from "tsparticles-updater-out-modes"; | ||
import { loadSizeUpdater } from "tsparticles-updater-size"; | ||
import { loadStrokeColorUpdater } from "tsparticles-updater-stroke-color"; | ||
import { options } from "./options"; | ||
export function loadFireworksPreset(engine) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadFireworksPreset = void 0; | ||
const tsparticles_updater_angle_1 = require("tsparticles-updater-angle"); | ||
const tsparticles_move_base_1 = require("tsparticles-move-base"); | ||
const tsparticles_shape_circle_1 = require("tsparticles-shape-circle"); | ||
const tsparticles_updater_color_1 = require("tsparticles-updater-color"); | ||
const tsparticles_plugin_emitters_1 = require("tsparticles-plugin-emitters"); | ||
const tsparticles_updater_life_1 = require("tsparticles-updater-life"); | ||
const tsparticles_shape_line_1 = require("tsparticles-shape-line"); | ||
const tsparticles_updater_opacity_1 = require("tsparticles-updater-opacity"); | ||
const tsparticles_updater_out_modes_1 = require("tsparticles-updater-out-modes"); | ||
const tsparticles_updater_size_1 = require("tsparticles-updater-size"); | ||
const tsparticles_updater_stroke_color_1 = require("tsparticles-updater-stroke-color"); | ||
const options_1 = require("./options"); | ||
function loadFireworksPreset(engine) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
yield loadBaseMover(engine); | ||
yield loadEmittersPlugin(engine); | ||
yield loadCircleShape(engine); | ||
yield loadLineShape(engine); | ||
yield loadAngleUpdater(engine); | ||
yield loadColorUpdater(engine); | ||
yield loadLifeUpdater(engine); | ||
yield loadOpacityUpdater(engine); | ||
yield loadOutModesUpdater(engine); | ||
yield loadSizeUpdater(engine); | ||
yield loadStrokeColorUpdater(engine); | ||
yield engine.addPreset("fireworks", options); | ||
yield (0, tsparticles_move_base_1.loadBaseMover)(engine); | ||
yield (0, tsparticles_plugin_emitters_1.loadEmittersPlugin)(engine); | ||
yield (0, tsparticles_shape_circle_1.loadCircleShape)(engine); | ||
yield (0, tsparticles_shape_line_1.loadLineShape)(engine); | ||
yield (0, tsparticles_updater_angle_1.loadAngleUpdater)(engine); | ||
yield (0, tsparticles_updater_color_1.loadColorUpdater)(engine); | ||
yield (0, tsparticles_updater_life_1.loadLifeUpdater)(engine); | ||
yield (0, tsparticles_updater_opacity_1.loadOpacityUpdater)(engine); | ||
yield (0, tsparticles_updater_out_modes_1.loadOutModesUpdater)(engine); | ||
yield (0, tsparticles_updater_size_1.loadSizeUpdater)(engine); | ||
yield (0, tsparticles_updater_stroke_color_1.loadStrokeColorUpdater)(engine); | ||
yield engine.addPreset("fireworks", options_1.options); | ||
}); | ||
} | ||
exports.loadFireworksPreset = loadFireworksPreset; |
@@ -1,2 +0,5 @@ | ||
export const options = { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.options = void 0; | ||
exports.options = { | ||
detectRetina: true, | ||
@@ -3,0 +6,0 @@ background: { |
{ | ||
"name": "tsparticles-preset-fireworks", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "tsParticles fireworks preset", | ||
@@ -84,15 +84,15 @@ "homepage": "https://particles.js.org/", | ||
"dependencies": { | ||
"tsparticles-engine": "^2.0.3", | ||
"tsparticles-move-base": "^2.0.3", | ||
"tsparticles-plugin-emitters": "^2.0.3", | ||
"tsparticles-shape-circle": "^2.0.3", | ||
"tsparticles-shape-line": "^2.0.3", | ||
"tsparticles-updater-angle": "^2.0.3", | ||
"tsparticles-updater-color": "^2.0.3", | ||
"tsparticles-updater-life": "^2.0.3", | ||
"tsparticles-updater-opacity": "^2.0.3", | ||
"tsparticles-updater-out-modes": "^2.0.3", | ||
"tsparticles-updater-size": "^2.0.3", | ||
"tsparticles-updater-stroke-color": "^2.0.3" | ||
"tsparticles-engine": "^2.0.4", | ||
"tsparticles-move-base": "^2.0.4", | ||
"tsparticles-plugin-emitters": "^2.0.4", | ||
"tsparticles-shape-circle": "^2.0.4", | ||
"tsparticles-shape-line": "^2.0.4", | ||
"tsparticles-updater-angle": "^2.0.4", | ||
"tsparticles-updater-color": "^2.0.4", | ||
"tsparticles-updater-life": "^2.0.4", | ||
"tsparticles-updater-opacity": "^2.0.4", | ||
"tsparticles-updater-out-modes": "^2.0.4", | ||
"tsparticles-updater-size": "^2.0.4", | ||
"tsparticles-updater-stroke-color": "^2.0.4" | ||
} | ||
} |
@@ -28,4 +28,4 @@ [![banner](https://particles.js.org/images/banner3.png)](https://particles.js.org) | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/tsparticles@2/tsparticles.bundle.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/tsparticles-preset-fireworks@2/tsparticles.preset.fireworks.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/tsparticles@1/tsparticles.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/tsparticles-preset-fireworks@1/tsparticles.preset.fireworks.min.js"></script> | ||
``` | ||
@@ -40,3 +40,3 @@ | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/tsparticles-preset-fireworks@2/tsparticles.preset.fireworks.bundle.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/tsparticles-preset-fireworks@1/tsparticles.preset.fireworks.bundle.min.js"></script> | ||
``` | ||
@@ -80,5 +80,5 @@ | ||
```javascript | ||
```typescript jsx | ||
import Particles from "react-tsparticles"; | ||
import { Engine } from "tsparticles-engine"; | ||
import type { Engine } from "tsparticles-engine"; | ||
import { loadFireworksPreset } from "tsparticles-preset-fireworks"; | ||
@@ -85,0 +85,0 @@ |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v2.0.3 | ||
* v2.0.4 | ||
*/ | ||
@@ -24,267 +24,8 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
/***/ 818: | ||
/***/ (function(module) { | ||
/***/ 153: | ||
/***/ (function(__unused_webpack_module, exports, __webpack_require__) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__818__; | ||
/***/ }), | ||
/***/ 919: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__919__; | ||
/***/ }), | ||
/***/ 949: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__949__; | ||
/***/ }), | ||
/***/ 941: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__941__; | ||
/***/ }), | ||
/***/ 45: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__45__; | ||
/***/ }), | ||
/***/ 1: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__1__; | ||
/***/ }), | ||
/***/ 841: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__841__; | ||
/***/ }), | ||
/***/ 489: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__489__; | ||
/***/ }), | ||
/***/ 838: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__838__; | ||
/***/ }), | ||
/***/ 364: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__364__; | ||
/***/ }), | ||
/***/ 328: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__328__; | ||
/***/ }) | ||
/******/ }); | ||
/************************************************************************/ | ||
/******/ // The module cache | ||
/******/ var __webpack_module_cache__ = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ // Check if module is in cache | ||
/******/ var cachedModule = __webpack_module_cache__[moduleId]; | ||
/******/ if (cachedModule !== undefined) { | ||
/******/ return cachedModule.exports; | ||
/******/ } | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = __webpack_module_cache__[moduleId] = { | ||
/******/ // no module.id needed | ||
/******/ // no module.loaded needed | ||
/******/ exports: {} | ||
/******/ }; | ||
/******/ | ||
/******/ // Execute the module function | ||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | ||
/******/ | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ | ||
/************************************************************************/ | ||
/******/ /* webpack/runtime/define property getters */ | ||
/******/ !function() { | ||
/******/ // define getter functions for harmony exports | ||
/******/ __webpack_require__.d = function(exports, definition) { | ||
/******/ for(var key in definition) { | ||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
/******/ } | ||
/******/ } | ||
/******/ }; | ||
/******/ }(); | ||
/******/ | ||
/******/ /* webpack/runtime/hasOwnProperty shorthand */ | ||
/******/ !function() { | ||
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } | ||
/******/ }(); | ||
/******/ | ||
/******/ /* webpack/runtime/make namespace object */ | ||
/******/ !function() { | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = function(exports) { | ||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | ||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
/******/ } | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ }(); | ||
/******/ | ||
/************************************************************************/ | ||
var __webpack_exports__ = {}; | ||
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. | ||
!function() { | ||
// ESM COMPAT FLAG | ||
__webpack_require__.r(__webpack_exports__); | ||
// EXPORTS | ||
__webpack_require__.d(__webpack_exports__, { | ||
"loadFireworksPreset": function() { return /* binding */ loadFireworksPreset; } | ||
}); | ||
// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-angle","commonjs2":"tsparticles-updater-angle","amd":"tsparticles-updater-angle","root":"window"} | ||
var external_commonjs_tsparticles_updater_angle_commonjs2_tsparticles_updater_angle_amd_tsparticles_updater_angle_root_window_ = __webpack_require__(1); | ||
// EXTERNAL MODULE: external {"commonjs":"tsparticles-move-base","commonjs2":"tsparticles-move-base","amd":"tsparticles-move-base","root":"window"} | ||
var external_commonjs_tsparticles_move_base_commonjs2_tsparticles_move_base_amd_tsparticles_move_base_root_window_ = __webpack_require__(919); | ||
// EXTERNAL MODULE: external {"commonjs":"tsparticles-shape-circle","commonjs2":"tsparticles-shape-circle","amd":"tsparticles-shape-circle","root":"window"} | ||
var external_commonjs_tsparticles_shape_circle_commonjs2_tsparticles_shape_circle_amd_tsparticles_shape_circle_root_window_ = __webpack_require__(941); | ||
// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-color","commonjs2":"tsparticles-updater-color","amd":"tsparticles-updater-color","root":"window"} | ||
var external_commonjs_tsparticles_updater_color_commonjs2_tsparticles_updater_color_amd_tsparticles_updater_color_root_window_ = __webpack_require__(841); | ||
// EXTERNAL MODULE: external {"commonjs":"tsparticles-plugin-emitters","commonjs2":"tsparticles-plugin-emitters","amd":"tsparticles-plugin-emitters","root":"window"} | ||
var external_commonjs_tsparticles_plugin_emitters_commonjs2_tsparticles_plugin_emitters_amd_tsparticles_plugin_emitters_root_window_ = __webpack_require__(949); | ||
// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-life","commonjs2":"tsparticles-updater-life","amd":"tsparticles-updater-life","root":"window"} | ||
var external_commonjs_tsparticles_updater_life_commonjs2_tsparticles_updater_life_amd_tsparticles_updater_life_root_window_ = __webpack_require__(489); | ||
// EXTERNAL MODULE: external {"commonjs":"tsparticles-shape-line","commonjs2":"tsparticles-shape-line","amd":"tsparticles-shape-line","root":"window"} | ||
var external_commonjs_tsparticles_shape_line_commonjs2_tsparticles_shape_line_amd_tsparticles_shape_line_root_window_ = __webpack_require__(45); | ||
// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-opacity","commonjs2":"tsparticles-updater-opacity","amd":"tsparticles-updater-opacity","root":"window"} | ||
var external_commonjs_tsparticles_updater_opacity_commonjs2_tsparticles_updater_opacity_amd_tsparticles_updater_opacity_root_window_ = __webpack_require__(838); | ||
// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-out-modes","commonjs2":"tsparticles-updater-out-modes","amd":"tsparticles-updater-out-modes","root":"window"} | ||
var external_commonjs_tsparticles_updater_out_modes_commonjs2_tsparticles_updater_out_modes_amd_tsparticles_updater_out_modes_root_window_ = __webpack_require__(364); | ||
// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-size","commonjs2":"tsparticles-updater-size","amd":"tsparticles-updater-size","root":"window"} | ||
var external_commonjs_tsparticles_updater_size_commonjs2_tsparticles_updater_size_amd_tsparticles_updater_size_root_window_ = __webpack_require__(328); | ||
// EXTERNAL MODULE: external {"commonjs":"tsparticles-engine","commonjs2":"tsparticles-engine","amd":"tsparticles-engine","root":"window"} | ||
var external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_ = __webpack_require__(818); | ||
;// CONCATENATED MODULE: ../../updaters/strokeColor/dist/StrokeColorUpdater.js | ||
function updateColorValue(delta, value, valueAnimation, max, decrease) { | ||
var _a; | ||
const colorValue = value; | ||
if (!colorValue || !colorValue.enable) { | ||
return; | ||
} | ||
const offset = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.randomInRange)(valueAnimation.offset); | ||
const velocity = ((_a = value.velocity) !== null && _a !== void 0 ? _a : 0) * delta.factor + offset * 3.6; | ||
if (!decrease || colorValue.status === 0) { | ||
colorValue.value += velocity; | ||
if (decrease && colorValue.value > max) { | ||
colorValue.status = 1; | ||
colorValue.value -= colorValue.value % max; | ||
} | ||
} else { | ||
colorValue.value -= velocity; | ||
if (colorValue.value < 0) { | ||
colorValue.status = 0; | ||
colorValue.value += colorValue.value; | ||
} | ||
} | ||
if (colorValue.value > max) { | ||
colorValue.value %= max; | ||
} | ||
} | ||
function updateStrokeColor(particle, delta) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; | ||
if (!((_a = particle.stroke) === null || _a === void 0 ? void 0 : _a.color)) { | ||
return; | ||
} | ||
const animationOptions = particle.stroke.color.animation; | ||
const h = (_c = (_b = particle.strokeColor) === null || _b === void 0 ? void 0 : _b.h) !== null && _c !== void 0 ? _c : (_d = particle.color) === null || _d === void 0 ? void 0 : _d.h; | ||
if (h) { | ||
updateColorValue(delta, h, animationOptions.h, 360, false); | ||
} | ||
const s = (_f = (_e = particle.strokeColor) === null || _e === void 0 ? void 0 : _e.s) !== null && _f !== void 0 ? _f : (_g = particle.color) === null || _g === void 0 ? void 0 : _g.s; | ||
if (s) { | ||
updateColorValue(delta, s, animationOptions.s, 100, true); | ||
} | ||
const l = (_j = (_h = particle.strokeColor) === null || _h === void 0 ? void 0 : _h.l) !== null && _j !== void 0 ? _j : (_k = particle.color) === null || _k === void 0 ? void 0 : _k.l; | ||
if (l) { | ||
updateColorValue(delta, l, animationOptions.l, 100, true); | ||
} | ||
} | ||
class StrokeColorUpdater { | ||
constructor(container) { | ||
this.container = container; | ||
} | ||
init(particle) { | ||
var _a, _b; | ||
const container = this.container; | ||
particle.stroke = particle.options.stroke instanceof Array ? (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.itemFromArray)(particle.options.stroke, particle.id, particle.options.reduceDuplicates) : particle.options.stroke; | ||
particle.strokeWidth = particle.stroke.width * container.retina.pixelRatio; | ||
const strokeHslColor = (_a = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.colorToHsl)(particle.stroke.color)) !== null && _a !== void 0 ? _a : particle.getFillColor(); | ||
if (strokeHslColor) { | ||
particle.strokeColor = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.getHslAnimationFromHsl)(strokeHslColor, (_b = particle.stroke.color) === null || _b === void 0 ? void 0 : _b.animation, container.retina.reduceFactor); | ||
} | ||
} | ||
isEnabled(particle) { | ||
var _a, _b, _c, _d; | ||
const color = (_a = particle.stroke) === null || _a === void 0 ? void 0 : _a.color; | ||
return !particle.destroyed && !particle.spawning && !!color && (((_b = particle.strokeColor) === null || _b === void 0 ? void 0 : _b.h.value) !== undefined && color.animation.h.enable || ((_c = particle.strokeColor) === null || _c === void 0 ? void 0 : _c.s.value) !== undefined && color.animation.s.enable || ((_d = particle.strokeColor) === null || _d === void 0 ? void 0 : _d.l.value) !== undefined && color.animation.l.enable); | ||
} | ||
update(particle, delta) { | ||
if (!this.isEnabled(particle)) { | ||
return; | ||
} | ||
updateStrokeColor(particle, delta); | ||
} | ||
} | ||
;// CONCATENATED MODULE: ../../updaters/strokeColor/dist/index.js | ||
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { | ||
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { | ||
@@ -321,10 +62,62 @@ return value instanceof P ? value : new P(function (resolve) { | ||
Object.defineProperty(exports, "__esModule", ({ | ||
value: true | ||
})); | ||
exports.loadFireworksPreset = void 0; | ||
function loadStrokeColorUpdater(engine) { | ||
const tsparticles_updater_angle_1 = __webpack_require__(1); | ||
const tsparticles_move_base_1 = __webpack_require__(919); | ||
const tsparticles_shape_circle_1 = __webpack_require__(941); | ||
const tsparticles_updater_color_1 = __webpack_require__(841); | ||
const tsparticles_plugin_emitters_1 = __webpack_require__(949); | ||
const tsparticles_updater_life_1 = __webpack_require__(489); | ||
const tsparticles_shape_line_1 = __webpack_require__(45); | ||
const tsparticles_updater_opacity_1 = __webpack_require__(838); | ||
const tsparticles_updater_out_modes_1 = __webpack_require__(364); | ||
const tsparticles_updater_size_1 = __webpack_require__(328); | ||
const tsparticles_updater_stroke_color_1 = __webpack_require__(856); | ||
const options_1 = __webpack_require__(689); | ||
function loadFireworksPreset(engine) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
yield engine.addParticleUpdater("strokeColor", container => new StrokeColorUpdater(container)); | ||
yield (0, tsparticles_move_base_1.loadBaseMover)(engine); | ||
yield (0, tsparticles_plugin_emitters_1.loadEmittersPlugin)(engine); | ||
yield (0, tsparticles_shape_circle_1.loadCircleShape)(engine); | ||
yield (0, tsparticles_shape_line_1.loadLineShape)(engine); | ||
yield (0, tsparticles_updater_angle_1.loadAngleUpdater)(engine); | ||
yield (0, tsparticles_updater_color_1.loadColorUpdater)(engine); | ||
yield (0, tsparticles_updater_life_1.loadLifeUpdater)(engine); | ||
yield (0, tsparticles_updater_opacity_1.loadOpacityUpdater)(engine); | ||
yield (0, tsparticles_updater_out_modes_1.loadOutModesUpdater)(engine); | ||
yield (0, tsparticles_updater_size_1.loadSizeUpdater)(engine); | ||
yield (0, tsparticles_updater_stroke_color_1.loadStrokeColorUpdater)(engine); | ||
yield engine.addPreset("fireworks", options_1.options); | ||
}); | ||
} | ||
;// CONCATENATED MODULE: ./dist/options.js | ||
const options = { | ||
exports.loadFireworksPreset = loadFireworksPreset; | ||
/***/ }), | ||
/***/ 689: | ||
/***/ (function(__unused_webpack_module, exports) { | ||
Object.defineProperty(exports, "__esModule", ({ | ||
value: true | ||
})); | ||
exports.options = void 0; | ||
exports.options = { | ||
detectRetina: true, | ||
@@ -479,4 +272,117 @@ background: { | ||
}; | ||
;// CONCATENATED MODULE: ./dist/index.js | ||
var dist_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { | ||
/***/ }), | ||
/***/ 856: | ||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | ||
// ESM COMPAT FLAG | ||
__webpack_require__.r(__webpack_exports__); | ||
// EXPORTS | ||
__webpack_require__.d(__webpack_exports__, { | ||
"loadStrokeColorUpdater": function() { return /* binding */ loadStrokeColorUpdater; } | ||
}); | ||
// EXTERNAL MODULE: external {"commonjs":"tsparticles-engine","commonjs2":"tsparticles-engine","amd":"tsparticles-engine","root":"window"} | ||
var external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_ = __webpack_require__(818); | ||
;// CONCATENATED MODULE: ../../updaters/strokeColor/dist/StrokeColorUpdater.js | ||
function updateColorValue(delta, value, valueAnimation, max, decrease) { | ||
var _a; | ||
const colorValue = value; | ||
if (!colorValue || !colorValue.enable) { | ||
return; | ||
} | ||
const offset = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.randomInRange)(valueAnimation.offset); | ||
const velocity = ((_a = value.velocity) !== null && _a !== void 0 ? _a : 0) * delta.factor + offset * 3.6; | ||
if (!decrease || colorValue.status === 0) { | ||
colorValue.value += velocity; | ||
if (decrease && colorValue.value > max) { | ||
colorValue.status = 1; | ||
colorValue.value -= colorValue.value % max; | ||
} | ||
} else { | ||
colorValue.value -= velocity; | ||
if (colorValue.value < 0) { | ||
colorValue.status = 0; | ||
colorValue.value += colorValue.value; | ||
} | ||
} | ||
if (colorValue.value > max) { | ||
colorValue.value %= max; | ||
} | ||
} | ||
function updateStrokeColor(particle, delta) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; | ||
if (!((_a = particle.stroke) === null || _a === void 0 ? void 0 : _a.color)) { | ||
return; | ||
} | ||
const animationOptions = particle.stroke.color.animation; | ||
const h = (_c = (_b = particle.strokeColor) === null || _b === void 0 ? void 0 : _b.h) !== null && _c !== void 0 ? _c : (_d = particle.color) === null || _d === void 0 ? void 0 : _d.h; | ||
if (h) { | ||
updateColorValue(delta, h, animationOptions.h, 360, false); | ||
} | ||
const s = (_f = (_e = particle.strokeColor) === null || _e === void 0 ? void 0 : _e.s) !== null && _f !== void 0 ? _f : (_g = particle.color) === null || _g === void 0 ? void 0 : _g.s; | ||
if (s) { | ||
updateColorValue(delta, s, animationOptions.s, 100, true); | ||
} | ||
const l = (_j = (_h = particle.strokeColor) === null || _h === void 0 ? void 0 : _h.l) !== null && _j !== void 0 ? _j : (_k = particle.color) === null || _k === void 0 ? void 0 : _k.l; | ||
if (l) { | ||
updateColorValue(delta, l, animationOptions.l, 100, true); | ||
} | ||
} | ||
class StrokeColorUpdater { | ||
constructor(container) { | ||
this.container = container; | ||
} | ||
init(particle) { | ||
var _a, _b; | ||
const container = this.container; | ||
particle.stroke = particle.options.stroke instanceof Array ? (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.itemFromArray)(particle.options.stroke, particle.id, particle.options.reduceDuplicates) : particle.options.stroke; | ||
particle.strokeWidth = particle.stroke.width * container.retina.pixelRatio; | ||
const strokeHslColor = (_a = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.colorToHsl)(particle.stroke.color)) !== null && _a !== void 0 ? _a : particle.getFillColor(); | ||
if (strokeHslColor) { | ||
particle.strokeColor = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.getHslAnimationFromHsl)(strokeHslColor, (_b = particle.stroke.color) === null || _b === void 0 ? void 0 : _b.animation, container.retina.reduceFactor); | ||
} | ||
} | ||
isEnabled(particle) { | ||
var _a, _b, _c, _d; | ||
const color = (_a = particle.stroke) === null || _a === void 0 ? void 0 : _a.color; | ||
return !particle.destroyed && !particle.spawning && !!color && (((_b = particle.strokeColor) === null || _b === void 0 ? void 0 : _b.h.value) !== undefined && color.animation.h.enable || ((_c = particle.strokeColor) === null || _c === void 0 ? void 0 : _c.s.value) !== undefined && color.animation.s.enable || ((_d = particle.strokeColor) === null || _d === void 0 ? void 0 : _d.l.value) !== undefined && color.animation.l.enable); | ||
} | ||
update(particle, delta) { | ||
if (!this.isEnabled(particle)) { | ||
return; | ||
} | ||
updateStrokeColor(particle, delta); | ||
} | ||
} | ||
;// CONCATENATED MODULE: ../../updaters/strokeColor/dist/index.js | ||
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { | ||
@@ -514,30 +420,149 @@ return value instanceof P ? value : new P(function (resolve) { | ||
function loadStrokeColorUpdater(engine) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
yield engine.addParticleUpdater("strokeColor", container => new StrokeColorUpdater(container)); | ||
}); | ||
} | ||
/***/ }), | ||
/***/ 818: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__818__; | ||
/***/ }), | ||
/***/ 919: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__919__; | ||
/***/ }), | ||
/***/ 949: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__949__; | ||
/***/ }), | ||
function loadFireworksPreset(engine) { | ||
return dist_awaiter(this, void 0, void 0, function* () { | ||
yield (0,external_commonjs_tsparticles_move_base_commonjs2_tsparticles_move_base_amd_tsparticles_move_base_root_window_.loadBaseMover)(engine); | ||
yield (0,external_commonjs_tsparticles_plugin_emitters_commonjs2_tsparticles_plugin_emitters_amd_tsparticles_plugin_emitters_root_window_.loadEmittersPlugin)(engine); | ||
yield (0,external_commonjs_tsparticles_shape_circle_commonjs2_tsparticles_shape_circle_amd_tsparticles_shape_circle_root_window_.loadCircleShape)(engine); | ||
yield (0,external_commonjs_tsparticles_shape_line_commonjs2_tsparticles_shape_line_amd_tsparticles_shape_line_root_window_.loadLineShape)(engine); | ||
yield (0,external_commonjs_tsparticles_updater_angle_commonjs2_tsparticles_updater_angle_amd_tsparticles_updater_angle_root_window_.loadAngleUpdater)(engine); | ||
yield (0,external_commonjs_tsparticles_updater_color_commonjs2_tsparticles_updater_color_amd_tsparticles_updater_color_root_window_.loadColorUpdater)(engine); | ||
yield (0,external_commonjs_tsparticles_updater_life_commonjs2_tsparticles_updater_life_amd_tsparticles_updater_life_root_window_.loadLifeUpdater)(engine); | ||
yield (0,external_commonjs_tsparticles_updater_opacity_commonjs2_tsparticles_updater_opacity_amd_tsparticles_updater_opacity_root_window_.loadOpacityUpdater)(engine); | ||
yield (0,external_commonjs_tsparticles_updater_out_modes_commonjs2_tsparticles_updater_out_modes_amd_tsparticles_updater_out_modes_root_window_.loadOutModesUpdater)(engine); | ||
yield (0,external_commonjs_tsparticles_updater_size_commonjs2_tsparticles_updater_size_amd_tsparticles_updater_size_root_window_.loadSizeUpdater)(engine); | ||
yield loadStrokeColorUpdater(engine); | ||
yield engine.addPreset("fireworks", options); | ||
}); | ||
} | ||
}(); | ||
/***/ 941: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__941__; | ||
/***/ }), | ||
/***/ 45: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__45__; | ||
/***/ }), | ||
/***/ 1: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__1__; | ||
/***/ }), | ||
/***/ 841: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__841__; | ||
/***/ }), | ||
/***/ 489: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__489__; | ||
/***/ }), | ||
/***/ 838: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__838__; | ||
/***/ }), | ||
/***/ 364: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__364__; | ||
/***/ }), | ||
/***/ 328: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__328__; | ||
/***/ }) | ||
/******/ }); | ||
/************************************************************************/ | ||
/******/ // The module cache | ||
/******/ var __webpack_module_cache__ = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ // Check if module is in cache | ||
/******/ var cachedModule = __webpack_module_cache__[moduleId]; | ||
/******/ if (cachedModule !== undefined) { | ||
/******/ return cachedModule.exports; | ||
/******/ } | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = __webpack_module_cache__[moduleId] = { | ||
/******/ // no module.id needed | ||
/******/ // no module.loaded needed | ||
/******/ exports: {} | ||
/******/ }; | ||
/******/ | ||
/******/ // Execute the module function | ||
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
/******/ | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ | ||
/************************************************************************/ | ||
/******/ /* webpack/runtime/define property getters */ | ||
/******/ !function() { | ||
/******/ // define getter functions for harmony exports | ||
/******/ __webpack_require__.d = function(exports, definition) { | ||
/******/ for(var key in definition) { | ||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
/******/ } | ||
/******/ } | ||
/******/ }; | ||
/******/ }(); | ||
/******/ | ||
/******/ /* webpack/runtime/hasOwnProperty shorthand */ | ||
/******/ !function() { | ||
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } | ||
/******/ }(); | ||
/******/ | ||
/******/ /* webpack/runtime/make namespace object */ | ||
/******/ !function() { | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = function(exports) { | ||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | ||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
/******/ } | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ }(); | ||
/******/ | ||
/************************************************************************/ | ||
/******/ | ||
/******/ // startup | ||
/******/ // Load entry module and return exports | ||
/******/ // This entry module is referenced by other modules so it can't be inlined | ||
/******/ var __webpack_exports__ = __webpack_require__(153); | ||
/******/ | ||
/******/ return __webpack_exports__; | ||
@@ -544,0 +569,0 @@ /******/ })() |
@@ -1,2 +0,2 @@ | ||
/*! tsParticles Fireworks Preset v2.0.3 by Matteo Bruni */ | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("tsparticles-updater-angle"),require("tsparticles-move-base"),require("tsparticles-shape-circle"),require("tsparticles-updater-color"),require("tsparticles-plugin-emitters"),require("tsparticles-updater-life"),require("tsparticles-shape-line"),require("tsparticles-updater-opacity"),require("tsparticles-updater-out-modes"),require("tsparticles-updater-size"),require("tsparticles-engine"));else if("function"==typeof define&&define.amd)define(["tsparticles-updater-angle","tsparticles-move-base","tsparticles-shape-circle","tsparticles-updater-color","tsparticles-plugin-emitters","tsparticles-updater-life","tsparticles-shape-line","tsparticles-updater-opacity","tsparticles-updater-out-modes","tsparticles-updater-size","tsparticles-engine"],t);else{var o="object"==typeof exports?t(require("tsparticles-updater-angle"),require("tsparticles-move-base"),require("tsparticles-shape-circle"),require("tsparticles-updater-color"),require("tsparticles-plugin-emitters"),require("tsparticles-updater-life"),require("tsparticles-shape-line"),require("tsparticles-updater-opacity"),require("tsparticles-updater-out-modes"),require("tsparticles-updater-size"),require("tsparticles-engine")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var i in o)("object"==typeof exports?exports:e)[i]=o[i]}}(this,(function(e,t,o,i,r,n,a,l,s,u,c){return function(){"use strict";var d={818:function(e){e.exports=c},919:function(e){e.exports=t},949:function(e){e.exports=r},941:function(e){e.exports=o},45:function(e){e.exports=a},1:function(t){t.exports=e},841:function(e){e.exports=i},489:function(e){e.exports=n},838:function(e){e.exports=l},364:function(e){e.exports=s},328:function(e){e.exports=u}},p={};function v(e){var t=p[e];if(void 0!==t)return t.exports;var o=p[e]={exports:{}};return d[e](o,o.exports,v),o.exports}v.d=function(e,t){for(var o in t)v.o(t,o)&&!v.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},v.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},v.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var f={};return function(){v.r(f),v.d(f,{loadFireworksPreset:function(){return w}});var e=v(1),t=v(919),o=v(941),i=v(841),r=v(949),n=v(489),a=v(45),l=v(838),s=v(364),u=v(328),c=v(818);function d(e,t,o,i,r){var n;const a=t;if(!a||!a.enable)return;const l=(0,c.randomInRange)(o.offset),s=(null!==(n=t.velocity)&&void 0!==n?n:0)*e.factor+3.6*l;r&&0!==a.status?(a.value-=s,a.value<0&&(a.status=0,a.value+=a.value)):(a.value+=s,r&&a.value>i&&(a.status=1,a.value-=a.value%i)),a.value>i&&(a.value%=i)}class p{constructor(e){this.container=e}init(e){var t,o;const i=this.container;e.stroke=e.options.stroke instanceof Array?(0,c.itemFromArray)(e.options.stroke,e.id,e.options.reduceDuplicates):e.options.stroke,e.strokeWidth=e.stroke.width*i.retina.pixelRatio;const r=null!==(t=(0,c.colorToHsl)(e.stroke.color))&&void 0!==t?t:e.getFillColor();r&&(e.strokeColor=(0,c.getHslAnimationFromHsl)(r,null===(o=e.stroke.color)||void 0===o?void 0:o.animation,i.retina.reduceFactor))}isEnabled(e){var t,o,i,r;const n=null===(t=e.stroke)||void 0===t?void 0:t.color;return!e.destroyed&&!e.spawning&&!!n&&(void 0!==(null===(o=e.strokeColor)||void 0===o?void 0:o.h.value)&&n.animation.h.enable||void 0!==(null===(i=e.strokeColor)||void 0===i?void 0:i.s.value)&&n.animation.s.enable||void 0!==(null===(r=e.strokeColor)||void 0===r?void 0:r.l.value)&&n.animation.l.enable)}update(e,t){this.isEnabled(e)&&function(e,t){var o,i,r,n,a,l,s,u,c,p;if(!(null===(o=e.stroke)||void 0===o?void 0:o.color))return;const v=e.stroke.color.animation,f=null!==(r=null===(i=e.strokeColor)||void 0===i?void 0:i.h)&&void 0!==r?r:null===(n=e.color)||void 0===n?void 0:n.h;f&&d(t,f,v.h,360,!1);const y=null!==(l=null===(a=e.strokeColor)||void 0===a?void 0:a.s)&&void 0!==l?l:null===(s=e.color)||void 0===s?void 0:s.s;y&&d(t,y,v.s,100,!0);const m=null!==(c=null===(u=e.strokeColor)||void 0===u?void 0:u.l)&&void 0!==c?c:null===(p=e.color)||void 0===p?void 0:p.l;m&&d(t,m,v.l,100,!0)}(e,t)}}var y=function(e,t,o,i){return new(o||(o=Promise))((function(r,n){function a(e){try{s(i.next(e))}catch(e){n(e)}}function l(e){try{s(i.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,l)}s((i=i.apply(e,t||[])).next())}))};const m={detectRetina:!0,background:{color:"#000"},fpsLimit:120,emitters:{direction:"top",life:{count:0,duration:.1,delay:.1},rate:{delay:.5,quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},destroy:{mode:"split",split:{count:1,factor:{value:.333333},rate:{value:100},particles:{color:{value:["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"]},stroke:{width:0},number:{value:0},collisions:{enable:!1},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:.7,sync:!1,startValue:"max",destroy:"min"}},shape:{type:"circle"},size:{value:2,animation:{enable:!1}},life:{count:1,duration:{value:{min:1,max:2}}},move:{enable:!0,gravity:{enable:!1},speed:2,direction:"none",random:!0,straight:!1,outModes:"destroy"}}}},life:{count:1},shape:{type:"line"},size:{value:{min:.1,max:50},animation:{enable:!0,sync:!0,speed:90,startValue:"max",destroy:"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:"destroy",top:"none"},trail:{fillColor:"#000",enable:!0,length:10}}}};var h=function(e,t,o,i){return new(o||(o=Promise))((function(r,n){function a(e){try{s(i.next(e))}catch(e){n(e)}}function l(e){try{s(i.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,l)}s((i=i.apply(e,t||[])).next())}))};function w(c){return h(this,void 0,void 0,(function*(){yield(0,t.loadBaseMover)(c),yield(0,r.loadEmittersPlugin)(c),yield(0,o.loadCircleShape)(c),yield(0,a.loadLineShape)(c),yield(0,e.loadAngleUpdater)(c),yield(0,i.loadColorUpdater)(c),yield(0,n.loadLifeUpdater)(c),yield(0,l.loadOpacityUpdater)(c),yield(0,s.loadOutModesUpdater)(c),yield(0,u.loadSizeUpdater)(c),yield function(e){return y(this,void 0,void 0,(function*(){yield e.addParticleUpdater("strokeColor",(e=>new p(e)))}))}(c),yield c.addPreset("fireworks",m)}))}}(),f}()})); | ||
/*! tsParticles Fireworks Preset v2.0.4 by Matteo Bruni */ | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("tsparticles-updater-angle"),require("tsparticles-move-base"),require("tsparticles-shape-circle"),require("tsparticles-updater-color"),require("tsparticles-plugin-emitters"),require("tsparticles-updater-life"),require("tsparticles-shape-line"),require("tsparticles-updater-opacity"),require("tsparticles-updater-out-modes"),require("tsparticles-updater-size"),require("tsparticles-engine"));else if("function"==typeof define&&define.amd)define(["tsparticles-updater-angle","tsparticles-move-base","tsparticles-shape-circle","tsparticles-updater-color","tsparticles-plugin-emitters","tsparticles-updater-life","tsparticles-shape-line","tsparticles-updater-opacity","tsparticles-updater-out-modes","tsparticles-updater-size","tsparticles-engine"],t);else{var o="object"==typeof exports?t(require("tsparticles-updater-angle"),require("tsparticles-move-base"),require("tsparticles-shape-circle"),require("tsparticles-updater-color"),require("tsparticles-plugin-emitters"),require("tsparticles-updater-life"),require("tsparticles-shape-line"),require("tsparticles-updater-opacity"),require("tsparticles-updater-out-modes"),require("tsparticles-updater-size"),require("tsparticles-engine")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var i in o)("object"==typeof exports?exports:e)[i]=o[i]}}(this,(function(e,t,o,i,r,n,a,l,s,u,d){return function(){"use strict";var c={153:function(e,t,o){var i=this&&this.__awaiter||function(e,t,o,i){return new(o||(o=Promise))((function(r,n){function a(e){try{s(i.next(e))}catch(e){n(e)}}function l(e){try{s(i.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,l)}s((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.loadFireworksPreset=void 0;const r=o(1),n=o(919),a=o(941),l=o(841),s=o(949),u=o(489),d=o(45),c=o(838),p=o(364),v=o(328),f=o(856),y=o(689);t.loadFireworksPreset=function(e){return i(this,void 0,void 0,(function*(){yield(0,n.loadBaseMover)(e),yield(0,s.loadEmittersPlugin)(e),yield(0,a.loadCircleShape)(e),yield(0,d.loadLineShape)(e),yield(0,r.loadAngleUpdater)(e),yield(0,l.loadColorUpdater)(e),yield(0,u.loadLifeUpdater)(e),yield(0,c.loadOpacityUpdater)(e),yield(0,p.loadOutModesUpdater)(e),yield(0,v.loadSizeUpdater)(e),yield(0,f.loadStrokeColorUpdater)(e),yield e.addPreset("fireworks",y.options)}))}},689:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.options=void 0,t.options={detectRetina:!0,background:{color:"#000"},fpsLimit:120,emitters:{direction:"top",life:{count:0,duration:.1,delay:.1},rate:{delay:.5,quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},destroy:{mode:"split",split:{count:1,factor:{value:.333333},rate:{value:100},particles:{color:{value:["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"]},stroke:{width:0},number:{value:0},collisions:{enable:!1},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:.7,sync:!1,startValue:"max",destroy:"min"}},shape:{type:"circle"},size:{value:2,animation:{enable:!1}},life:{count:1,duration:{value:{min:1,max:2}}},move:{enable:!0,gravity:{enable:!1},speed:2,direction:"none",random:!0,straight:!1,outModes:"destroy"}}}},life:{count:1},shape:{type:"line"},size:{value:{min:.1,max:50},animation:{enable:!0,sync:!0,speed:90,startValue:"max",destroy:"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:"destroy",top:"none"},trail:{fillColor:"#000",enable:!0,length:10}}}}},856:function(e,t,o){o.r(t),o.d(t,{loadStrokeColorUpdater:function(){return l}});var i=o(818);function r(e,t,o,r,n){var a;const l=t;if(!l||!l.enable)return;const s=(0,i.randomInRange)(o.offset),u=(null!==(a=t.velocity)&&void 0!==a?a:0)*e.factor+3.6*s;n&&0!==l.status?(l.value-=u,l.value<0&&(l.status=0,l.value+=l.value)):(l.value+=u,n&&l.value>r&&(l.status=1,l.value-=l.value%r)),l.value>r&&(l.value%=r)}class n{constructor(e){this.container=e}init(e){var t,o;const r=this.container;e.stroke=e.options.stroke instanceof Array?(0,i.itemFromArray)(e.options.stroke,e.id,e.options.reduceDuplicates):e.options.stroke,e.strokeWidth=e.stroke.width*r.retina.pixelRatio;const n=null!==(t=(0,i.colorToHsl)(e.stroke.color))&&void 0!==t?t:e.getFillColor();n&&(e.strokeColor=(0,i.getHslAnimationFromHsl)(n,null===(o=e.stroke.color)||void 0===o?void 0:o.animation,r.retina.reduceFactor))}isEnabled(e){var t,o,i,r;const n=null===(t=e.stroke)||void 0===t?void 0:t.color;return!e.destroyed&&!e.spawning&&!!n&&(void 0!==(null===(o=e.strokeColor)||void 0===o?void 0:o.h.value)&&n.animation.h.enable||void 0!==(null===(i=e.strokeColor)||void 0===i?void 0:i.s.value)&&n.animation.s.enable||void 0!==(null===(r=e.strokeColor)||void 0===r?void 0:r.l.value)&&n.animation.l.enable)}update(e,t){this.isEnabled(e)&&function(e,t){var o,i,n,a,l,s,u,d,c,p;if(!(null===(o=e.stroke)||void 0===o?void 0:o.color))return;const v=e.stroke.color.animation,f=null!==(n=null===(i=e.strokeColor)||void 0===i?void 0:i.h)&&void 0!==n?n:null===(a=e.color)||void 0===a?void 0:a.h;f&&r(t,f,v.h,360,!1);const y=null!==(s=null===(l=e.strokeColor)||void 0===l?void 0:l.s)&&void 0!==s?s:null===(u=e.color)||void 0===u?void 0:u.s;y&&r(t,y,v.s,100,!0);const m=null!==(c=null===(d=e.strokeColor)||void 0===d?void 0:d.l)&&void 0!==c?c:null===(p=e.color)||void 0===p?void 0:p.l;m&&r(t,m,v.l,100,!0)}(e,t)}}var a=function(e,t,o,i){return new(o||(o=Promise))((function(r,n){function a(e){try{s(i.next(e))}catch(e){n(e)}}function l(e){try{s(i.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,l)}s((i=i.apply(e,t||[])).next())}))};function l(e){return a(this,void 0,void 0,(function*(){yield e.addParticleUpdater("strokeColor",(e=>new n(e)))}))}},818:function(e){e.exports=d},919:function(e){e.exports=t},949:function(e){e.exports=r},941:function(e){e.exports=o},45:function(e){e.exports=a},1:function(t){t.exports=e},841:function(e){e.exports=i},489:function(e){e.exports=n},838:function(e){e.exports=l},364:function(e){e.exports=s},328:function(e){e.exports=u}},p={};function v(e){var t=p[e];if(void 0!==t)return t.exports;var o=p[e]={exports:{}};return c[e].call(o.exports,o,o.exports,v),o.exports}return v.d=function(e,t){for(var o in t)v.o(t,o)&&!v.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},v.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},v.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},v(153)}()})); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
853212
9866
Updatedtsparticles-engine@^2.0.4
Updatedtsparticles-move-base@^2.0.4