Socket
Socket
Sign inDemoInstall

tsparticles-preset-fireworks

Package Overview
Dependencies
13
Maintainers
2
Versions
97
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.4 to 2.4.0

20

browser/options.js

@@ -47,4 +47,4 @@ import { rgbToHsl, setRangeValue, stringToRgb, } from "tsparticles-engine";

sync: false,
startValue: "max" /* StartValueType.max */,
destroy: "min" /* DestroyType.min */,
startValue: "max",
destroy: "min",
},

@@ -62,4 +62,4 @@ },

sync: false,
startValue: "min" /* StartValueType.min */,
destroy: "none" /* DestroyType.none */,
startValue: "min",
destroy: "none",
},

@@ -86,3 +86,3 @@ },

direction: "none",
outModes: "destroy" /* OutMode.destroy */,
outModes: "destroy",
},

@@ -99,3 +99,3 @@ };

emitters: {
direction: "top" /* MoveDirection.top */,
direction: "top",
life: {

@@ -151,4 +151,4 @@ count: 0,

speed: 90,
startValue: "max" /* StartValueType.max */,
destroy: "min" /* DestroyType.min */,
startValue: "max",
destroy: "min",
},

@@ -178,4 +178,4 @@ },

outModes: {
default: "destroy" /* OutMode.destroy */,
top: "none" /* OutMode.none */,
default: "destroy",
top: "none",
},

@@ -182,0 +182,0 @@ trail: {

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -17,17 +26,19 @@ exports.loadFireworksPreset = void 0;

const options_1 = require("./options");
async function loadFireworksPreset(engine) {
await (0, tsparticles_move_base_1.loadBaseMover)(engine);
await (0, tsparticles_plugin_emitters_1.loadEmittersPlugin)(engine);
await (0, tsparticles_shape_circle_1.loadCircleShape)(engine);
await (0, tsparticles_shape_line_1.loadLineShape)(engine);
await (0, tsparticles_updater_angle_1.loadAngleUpdater)(engine);
await (0, tsparticles_updater_color_1.loadColorUpdater)(engine);
await (0, tsparticles_updater_destroy_1.loadDestroyUpdater)(engine);
await (0, tsparticles_updater_life_1.loadLifeUpdater)(engine);
await (0, tsparticles_updater_opacity_1.loadOpacityUpdater)(engine);
await (0, tsparticles_updater_out_modes_1.loadOutModesUpdater)(engine);
await (0, tsparticles_updater_size_1.loadSizeUpdater)(engine);
await (0, tsparticles_updater_stroke_color_1.loadStrokeColorUpdater)(engine);
await engine.addPreset("fireworks", options_1.options);
function loadFireworksPreset(engine) {
return __awaiter(this, void 0, void 0, function* () {
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_destroy_1.loadDestroyUpdater)(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;
{
"name": "tsparticles-preset-fireworks",
"version": "2.3.4",
"version": "2.4.0",
"description": "tsParticles fireworks preset",

@@ -86,16 +86,16 @@ "homepage": "https://particles.js.org",

"dependencies": {
"tsparticles-engine": "^2.3.3",
"tsparticles-move-base": "^2.3.3",
"tsparticles-plugin-emitters": "^2.3.4",
"tsparticles-shape-circle": "^2.3.3",
"tsparticles-shape-line": "^2.3.3",
"tsparticles-updater-angle": "^2.3.3",
"tsparticles-updater-color": "^2.3.3",
"tsparticles-updater-destroy": "^2.3.3",
"tsparticles-updater-life": "^2.3.3",
"tsparticles-updater-opacity": "^2.3.3",
"tsparticles-updater-out-modes": "^2.3.3",
"tsparticles-updater-size": "^2.3.3",
"tsparticles-updater-stroke-color": "^2.3.3"
"tsparticles-engine": "^2.4.0",
"tsparticles-move-base": "^2.4.0",
"tsparticles-plugin-emitters": "^2.4.0",
"tsparticles-shape-circle": "^2.4.0",
"tsparticles-shape-line": "^2.4.0",
"tsparticles-updater-angle": "^2.4.0",
"tsparticles-updater-color": "^2.4.0",
"tsparticles-updater-destroy": "^2.4.0",
"tsparticles-updater-life": "^2.4.0",
"tsparticles-updater-opacity": "^2.4.0",
"tsparticles-updater-out-modes": "^2.4.0",
"tsparticles-updater-size": "^2.4.0",
"tsparticles-updater-stroke-color": "^2.4.0"
}
}

@@ -7,3 +7,3 @@ /*!

* How to use? : Check the GitHub README
* v2.3.4
* v2.4.0
*/

@@ -7,15 +7,15 @@ /*!

* How to use? : Check the GitHub README
* v2.3.4
* v2.4.0
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("tsparticles-updater-angle"), require("tsparticles-move-base"), require("tsparticles-shape-circle"), require("tsparticles-updater-color"), require("tsparticles-updater-destroy"), 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"));
module.exports = factory(require("tsparticles-updater-angle"), require("tsparticles-move-base"), require("tsparticles-shape-circle"), require("tsparticles-updater-color"), require("tsparticles-updater-destroy"), 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-updater-stroke-color"), require("tsparticles-engine"));
else if(typeof define === 'function' && define.amd)
define(["tsparticles-updater-angle", "tsparticles-move-base", "tsparticles-shape-circle", "tsparticles-updater-color", "tsparticles-updater-destroy", "tsparticles-plugin-emitters", "tsparticles-updater-life", "tsparticles-shape-line", "tsparticles-updater-opacity", "tsparticles-updater-out-modes", "tsparticles-updater-size", "tsparticles-engine"], factory);
define(["tsparticles-updater-angle", "tsparticles-move-base", "tsparticles-shape-circle", "tsparticles-updater-color", "tsparticles-updater-destroy", "tsparticles-plugin-emitters", "tsparticles-updater-life", "tsparticles-shape-line", "tsparticles-updater-opacity", "tsparticles-updater-out-modes", "tsparticles-updater-size", "tsparticles-updater-stroke-color", "tsparticles-engine"], factory);
else {
var a = typeof exports === 'object' ? factory(require("tsparticles-updater-angle"), require("tsparticles-move-base"), require("tsparticles-shape-circle"), require("tsparticles-updater-color"), require("tsparticles-updater-destroy"), 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")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
var a = typeof exports === 'object' ? factory(require("tsparticles-updater-angle"), require("tsparticles-move-base"), require("tsparticles-shape-circle"), require("tsparticles-updater-color"), require("tsparticles-updater-destroy"), 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-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"], root["window"], root["window"], root["window"]);
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(this, function(__WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__565__, __WEBPACK_EXTERNAL_MODULE__851__, __WEBPACK_EXTERNAL_MODULE__613__, __WEBPACK_EXTERNAL_MODULE__731__, __WEBPACK_EXTERNAL_MODULE__716__, __WEBPACK_EXTERNAL_MODULE__86__, __WEBPACK_EXTERNAL_MODULE__598__, __WEBPACK_EXTERNAL_MODULE__515__, __WEBPACK_EXTERNAL_MODULE__509__, __WEBPACK_EXTERNAL_MODULE__694__, __WEBPACK_EXTERNAL_MODULE__961__) {
return /******/ (function() { // webpackBootstrap
})(this, (__WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__565__, __WEBPACK_EXTERNAL_MODULE__851__, __WEBPACK_EXTERNAL_MODULE__613__, __WEBPACK_EXTERNAL_MODULE__731__, __WEBPACK_EXTERNAL_MODULE__716__, __WEBPACK_EXTERNAL_MODULE__86__, __WEBPACK_EXTERNAL_MODULE__598__, __WEBPACK_EXTERNAL_MODULE__515__, __WEBPACK_EXTERNAL_MODULE__509__, __WEBPACK_EXTERNAL_MODULE__694__, __WEBPACK_EXTERNAL_MODULE__226__, __WEBPACK_EXTERNAL_MODULE__961__) => {
return /******/ (() => { // webpackBootstrap
/******/ "use strict";

@@ -25,3 +25,3 @@ /******/ var __webpack_modules__ = ({

/***/ 961:
/***/ (function(module) {
/***/ ((module) => {

@@ -33,3 +33,3 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__961__;

/***/ 565:
/***/ (function(module) {
/***/ ((module) => {

@@ -41,3 +41,3 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__565__;

/***/ 716:
/***/ (function(module) {
/***/ ((module) => {

@@ -49,3 +49,3 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__716__;

/***/ 851:
/***/ (function(module) {
/***/ ((module) => {

@@ -57,3 +57,3 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__851__;

/***/ 598:
/***/ (function(module) {
/***/ ((module) => {

@@ -65,3 +65,3 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__598__;

/***/ 490:
/***/ (function(module) {
/***/ ((module) => {

@@ -73,3 +73,3 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__490__;

/***/ 613:
/***/ (function(module) {
/***/ ((module) => {

@@ -81,3 +81,3 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__613__;

/***/ 731:
/***/ (function(module) {
/***/ ((module) => {

@@ -89,3 +89,3 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__731__;

/***/ 86:
/***/ (function(module) {
/***/ ((module) => {

@@ -97,3 +97,3 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__86__;

/***/ 515:
/***/ (function(module) {
/***/ ((module) => {

@@ -105,3 +105,3 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__515__;

/***/ 509:
/***/ (function(module) {
/***/ ((module) => {

@@ -113,6 +113,13 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__509__;

/***/ 694:
/***/ (function(module) {
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__694__;
/***/ }),
/***/ 226:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__226__;
/***/ })

@@ -148,5 +155,5 @@

/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {

@@ -158,13 +165,13 @@ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {

/******/ };
/******/ }();
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {

@@ -175,3 +182,3 @@ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });

/******/ };
/******/ }();
/******/ })();
/******/

@@ -181,3 +188,3 @@ /************************************************************************/

// 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

@@ -188,3 +195,3 @@ __webpack_require__.r(__webpack_exports__);

__webpack_require__.d(__webpack_exports__, {
"loadFireworksPreset": function() { return /* binding */ loadFireworksPreset; }
"loadFireworksPreset": () => (/* binding */ loadFireworksPreset)
});

@@ -214,147 +221,34 @@

var external_commonjs_tsparticles_updater_size_commonjs2_tsparticles_updater_size_amd_tsparticles_updater_size_root_window_ = __webpack_require__(694);
// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-stroke-color","commonjs2":"tsparticles-updater-stroke-color","amd":"tsparticles-updater-stroke-color","root":"window"}
var external_commonjs_tsparticles_updater_stroke_color_commonjs2_tsparticles_updater_stroke_color_amd_tsparticles_updater_stroke_color_root_window_ = __webpack_require__(226);
// 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__(961);
;// CONCATENATED MODULE: ../../updaters/strokeColor/dist/esm/StrokeColorUpdater.js
function updateColorValue(delta, value, valueAnimation, max, decrease) {
var _a, _b;
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),
velocity = ((_a = value.velocity) !== null && _a !== void 0 ? _a : 0) * delta.factor + offset * 3.6,
decay = (_b = value.decay) !== null && _b !== void 0 ? _b : 1;
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.velocity && decay !== 1) {
colorValue.velocity *= decay;
}
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,
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 = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.itemFromSingleOrMultiple)(particle.options.stroke, particle.id, particle.options.reduceDuplicates);
particle.strokeWidth = particle.stroke.width * container.retina.pixelRatio;
const strokeHslColor = (_a = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.rangeColorToHsl)(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/esm/index.js
async function loadStrokeColorUpdater(engine) {
await engine.addParticleUpdater("strokeColor", container => new StrokeColorUpdater(container));
}
;// CONCATENATED MODULE: ./dist/browser/options.js
const fixRange = (value, min, max) => {
const diffSMax = value.max > max ? value.max - max : 0;
let res = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.setRangeValue)(value);
if (diffSMax) {
res = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.setRangeValue)(value.min - diffSMax, max);
}
const diffSMin = value.min < min ? value.min : 0;
if (diffSMin) {
res = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.setRangeValue)(0, value.max + diffSMin);
}
return res;
};
const fireworksOptions = ["#ff595e", "#ffca3a", "#8ac926", "#1982c4", "#6a4c93"].map(color => {
const rgb = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.stringToRgb)(color);
if (!rgb) {
return undefined;
}
const hsl = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.rgbToHsl)(rgb),
sRange = fixRange({
min: hsl.s - 20,
max: hsl.s + 20
}, 0, 100),
lRange = fixRange({
min: hsl.l - 20,
max: hsl.l + 20
}, 0, 100);
sRange = fixRange({
min: hsl.s - 20,
max: hsl.s + 20
}, 0, 100),
lRange = fixRange({
min: hsl.l - 20,
max: hsl.l + 20
}, 0, 100);
return {

@@ -386,8 +280,4 @@ color: {

sync: false,
startValue: "max"
/* StartValueType.max */
,
startValue: "max",
destroy: "min"
/* DestroyType.min */
}

@@ -408,8 +298,4 @@ },

sync: false,
startValue: "min"
/* StartValueType.min */
,
startValue: "min",
destroy: "none"
/* DestroyType.none */
}

@@ -440,4 +326,2 @@ },

outModes: "destroy"
/* OutMode.destroy */
}

@@ -453,5 +337,3 @@ };

emitters: {
direction: "top"
/* MoveDirection.top */
,
direction: "top",
life: {

@@ -507,8 +389,4 @@ count: 0,

speed: 90,
startValue: "max"
/* StartValueType.max */
,
startValue: "max",
destroy: "min"
/* DestroyType.min */
}

@@ -538,8 +416,4 @@ },

outModes: {
default: "destroy"
/* OutMode.destroy */
,
default: "destroy",
top: "none"
/* OutMode.none */
},

@@ -580,6 +454,7 @@ trail: {

await (0,external_commonjs_tsparticles_updater_size_commonjs2_tsparticles_updater_size_amd_tsparticles_updater_size_root_window_.loadSizeUpdater)(engine);
await loadStrokeColorUpdater(engine);
await (0,external_commonjs_tsparticles_updater_stroke_color_commonjs2_tsparticles_updater_stroke_color_amd_tsparticles_updater_stroke_color_root_window_.loadStrokeColorUpdater)(engine);
await engine.addPreset("fireworks", options);
}
}();
})();
/******/ return __webpack_exports__;

@@ -586,0 +461,0 @@ /******/ })()

/*! For license information please see tsparticles.preset.fireworks.min.js.LICENSE.txt */
!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-updater-destroy"),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-updater-destroy","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-updater-destroy"),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,e.window);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(this,(function(e,t,o,r,i,a,n,s,l,u,c,d){return function(){"use strict";var p={961:function(e){e.exports=d},565:function(e){e.exports=t},716:function(e){e.exports=a},851:function(e){e.exports=o},598:function(e){e.exports=s},490:function(t){t.exports=e},613:function(e){e.exports=r},731:function(e){e.exports=i},86:function(e){e.exports=n},515:function(e){e.exports=l},509:function(e){e.exports=u},694:function(e){e.exports=c}},v={};function f(e){var t=v[e];if(void 0!==t)return t.exports;var o=v[e]={exports:{}};return p[e](o,o.exports,f),o.exports}f.d=function(e,t){for(var o in t)f.o(t,o)&&!f.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var m={};return function(){f.r(m),f.d(m,{loadFireworksPreset:function(){return x}});var e=f(490),t=f(565),o=f(851),r=f(613),i=f(731),a=f(716),n=f(86),s=f(598),l=f(515),u=f(509),c=f(694),d=f(961);function p(e,t,o,r,i){var a,n;const s=t;if(!s||!s.enable)return;const l=(0,d.randomInRange)(o.offset),u=(null!==(a=t.velocity)&&void 0!==a?a:0)*e.factor+3.6*l,c=null!==(n=t.decay)&&void 0!==n?n:1;i&&0!==s.status?(s.value-=u,s.value<0&&(s.status=0,s.value+=s.value)):(s.value+=u,i&&s.value>r&&(s.status=1,s.value-=s.value%r)),s.velocity&&1!==c&&(s.velocity*=c),s.value>r&&(s.value%=r)}class v{constructor(e){this.container=e}init(e){var t,o;const r=this.container;e.stroke=(0,d.itemFromSingleOrMultiple)(e.options.stroke,e.id,e.options.reduceDuplicates),e.strokeWidth=e.stroke.width*r.retina.pixelRatio;const i=null!==(t=(0,d.rangeColorToHsl)(e.stroke.color))&&void 0!==t?t:e.getFillColor();i&&(e.strokeColor=(0,d.getHslAnimationFromHsl)(i,null===(o=e.stroke.color)||void 0===o?void 0:o.animation,r.retina.reduceFactor))}isEnabled(e){var t,o,r,i;const a=null===(t=e.stroke)||void 0===t?void 0:t.color;return!e.destroyed&&!e.spawning&&!!a&&(void 0!==(null===(o=e.strokeColor)||void 0===o?void 0:o.h.value)&&a.animation.h.enable||void 0!==(null===(r=e.strokeColor)||void 0===r?void 0:r.s.value)&&a.animation.s.enable||void 0!==(null===(i=e.strokeColor)||void 0===i?void 0:i.l.value)&&a.animation.l.enable)}update(e,t){this.isEnabled(e)&&function(e,t){var o,r,i,a,n,s,l,u,c,d;if(!(null===(o=e.stroke)||void 0===o?void 0:o.color))return;const v=e.stroke.color.animation,f=null!==(i=null===(r=e.strokeColor)||void 0===r?void 0:r.h)&&void 0!==i?i:null===(a=e.color)||void 0===a?void 0:a.h;f&&p(t,f,v.h,360,!1);const m=null!==(s=null===(n=e.strokeColor)||void 0===n?void 0:n.s)&&void 0!==s?s:null===(l=e.color)||void 0===l?void 0:l.s;m&&p(t,m,v.s,100,!0);const y=null!==(c=null===(u=e.strokeColor)||void 0===u?void 0:u.l)&&void 0!==c?c:null===(d=e.color)||void 0===d?void 0:d.l;y&&p(t,y,v.l,100,!0)}(e,t)}}const y=(e,t,o)=>{const r=e.max>o?e.max-o:0;let i=(0,d.setRangeValue)(e);r&&(i=(0,d.setRangeValue)(e.min-r,o));const a=e.min<t?e.min:0;return a&&(i=(0,d.setRangeValue)(0,e.max+a)),i},w={detectRetina:!0,background:{color:"#000"},fpsLimit:120,emitters:{direction:"top",life:{count:0,duration:.1,delay:.1},rate:{delay:.15,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:["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"].map((e=>{const t=(0,d.stringToRgb)(e);if(!t)return;const o=(0,d.rgbToHsl)(t),r=y({min:o.s-20,max:o.s+20},0,100),i=y({min:o.l-20,max:o.l+20},0,100);return{color:{value:{h:o.h,s:r,l:i}},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:{min:1,max:2},animation:{enable:!0,speed:5,count:1,sync:!1,startValue:"min",destroy:"none"}},life:{count:1,duration:{value:{min:1,max:2}}},move:{decay:.05,enable:!0,gravity:{enable:!0,inverse:!1,acceleration:5},speed:{min:5,max:10},direction:"none",outModes:"destroy"}}})).filter((e=>void 0!==e))}},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}}}};async function x(d){await(0,t.loadBaseMover)(d),await(0,a.loadEmittersPlugin)(d),await(0,o.loadCircleShape)(d),await(0,s.loadLineShape)(d),await(0,e.loadAngleUpdater)(d),await(0,r.loadColorUpdater)(d),await(0,i.loadDestroyUpdater)(d),await(0,n.loadLifeUpdater)(d),await(0,l.loadOpacityUpdater)(d),await(0,u.loadOutModesUpdater)(d),await(0,c.loadSizeUpdater)(d),await async function(e){await e.addParticleUpdater("strokeColor",(e=>new v(e)))}(d),await d.addPreset("fireworks",w)}}(),m}()}));
!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-updater-destroy"),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-updater-stroke-color"),require("tsparticles-engine"));else if("function"==typeof define&&define.amd)define(["tsparticles-updater-angle","tsparticles-move-base","tsparticles-shape-circle","tsparticles-updater-color","tsparticles-updater-destroy","tsparticles-plugin-emitters","tsparticles-updater-life","tsparticles-shape-line","tsparticles-updater-opacity","tsparticles-updater-out-modes","tsparticles-updater-size","tsparticles-updater-stroke-color","tsparticles-engine"],t);else{var r="object"==typeof exports?t(require("tsparticles-updater-angle"),require("tsparticles-move-base"),require("tsparticles-shape-circle"),require("tsparticles-updater-color"),require("tsparticles-updater-destroy"),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-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,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,l,p,n,d,c,u)=>(()=>{"use strict";var m={961:e=>{e.exports=u},565:e=>{e.exports=t},716:e=>{e.exports=s},851:e=>{e.exports=r},598:e=>{e.exports=l},490:t=>{t.exports=e},613:e=>{e.exports=a},731:e=>{e.exports=i},86:e=>{e.exports=o},515:e=>{e.exports=p},509:e=>{e.exports=n},694:e=>{e.exports=d},226:e=>{e.exports=c}},f={};function w(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={exports:{}};return m[e](r,r.exports,w),r.exports}w.d=(e,t)=>{for(var r in t)w.o(t,r)&&!w.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},w.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),w.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return(()=>{w.r(y),w.d(y,{loadFireworksPreset:()=>x});var e=w(490),t=w(565),r=w(851),a=w(613),i=w(731),s=w(716),o=w(86),l=w(598),p=w(515),n=w(509),d=w(694),c=w(226),u=w(961);const m=(e,t,r)=>{const a=e.max>r?e.max-r:0;let i=(0,u.setRangeValue)(e);a&&(i=(0,u.setRangeValue)(e.min-a,r));const s=e.min<t?e.min:0;return s&&(i=(0,u.setRangeValue)(0,e.max+s)),i},f={detectRetina:!0,background:{color:"#000"},fpsLimit:120,emitters:{direction:"top",life:{count:0,duration:.1,delay:.1},rate:{delay:.15,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:["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"].map((e=>{const t=(0,u.stringToRgb)(e);if(!t)return;const r=(0,u.rgbToHsl)(t),a=m({min:r.s-20,max:r.s+20},0,100),i=m({min:r.l-20,max:r.l+20},0,100);return{color:{value:{h:r.h,s:a,l:i}},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:{min:1,max:2},animation:{enable:!0,speed:5,count:1,sync:!1,startValue:"min",destroy:"none"}},life:{count:1,duration:{value:{min:1,max:2}}},move:{decay:.05,enable:!0,gravity:{enable:!0,inverse:!1,acceleration:5},speed:{min:5,max:10},direction:"none",outModes:"destroy"}}})).filter((e=>void 0!==e))}},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}}}};async function x(u){await(0,t.loadBaseMover)(u),await(0,s.loadEmittersPlugin)(u),await(0,r.loadCircleShape)(u),await(0,l.loadLineShape)(u),await(0,e.loadAngleUpdater)(u),await(0,a.loadColorUpdater)(u),await(0,i.loadDestroyUpdater)(u),await(0,o.loadLifeUpdater)(u),await(0,p.loadOpacityUpdater)(u),await(0,n.loadOutModesUpdater)(u),await(0,d.loadSizeUpdater)(u),await(0,c.loadStrokeColorUpdater)(u),await u.addPreset("fireworks",f)}})(),y})()));

@@ -7,3 +7,3 @@ /*!

* How to use? : Check the GitHub README
* v2.3.4
* v2.4.0
*/

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc