Socket
Socket
Sign inDemoInstall

@tsparticles/fireworks

Package Overview
Dependencies
9
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.3 to 3.1.0

19

browser/fireworks.js

@@ -8,7 +8,6 @@ import { getRangeMax, getRangeMin, isNumber, isSsr, isString, setRangeValue, tsParticles, } from "@tsparticles/engine";

import { loadLifeUpdater } from "@tsparticles/updater-life";
import { loadLineShape } from "@tsparticles/shape-line";
import { loadRotateUpdater } from "@tsparticles/updater-rotate";
import { loadSoundsPlugin } from "@tsparticles/plugin-sounds";
import { loadStrokeColorUpdater } from "@tsparticles/updater-stroke-color";
import { loadTrailEffect } from "@tsparticles/effect-trail";
const minSplitCount = 2;
let initialized = false;

@@ -18,3 +17,3 @@ let initializing = false;

const data = args.data;
return data.particle.shape === "circle" && !!data.particle.splitCount && data.particle.splitCount < 2;
return data.particle.shape === "circle" && !!data.particle.splitCount && data.particle.splitCount < minSplitCount;
};

@@ -41,3 +40,3 @@ class FireworksInstance {

return new Promise((resolve) => {
const interval = setInterval(() => {
const timeout = 100, interval = setInterval(() => {
if (!initialized) {

@@ -48,3 +47,3 @@ return;

resolve();
}, 100);
}, timeout);
});

@@ -56,7 +55,5 @@ }

await loadSoundsPlugin(tsParticles, false);
await loadLineShape(tsParticles, false);
await loadRotateUpdater(tsParticles, false);
await loadDestroyUpdater(tsParticles, false);
await loadLifeUpdater(tsParticles, false);
await loadStrokeColorUpdater(tsParticles, false);
await loadTrailEffect(tsParticles, false);

@@ -79,3 +76,3 @@ await loadBasic(tsParticles, false);

}
const particlesOptions = {
const identity = 1, particlesOptions = {
detectRetina: true,

@@ -95,4 +92,4 @@ background: {

delay: isNumber(options.rate)
? 1 / options.rate
: { min: 1 / getRangeMin(options.rate), max: 1 / getRangeMax(options.rate) },
? identity / options.rate
: { min: identity / getRangeMin(options.rate), max: identity / getRangeMax(options.rate) },
quantity: 1,

@@ -253,3 +250,3 @@ },

{
event: "particleDestroyed",
event: "particleRemoved",
filter: explodeSoundCheck,

@@ -256,0 +253,0 @@ audio: [

@@ -11,7 +11,6 @@ "use strict";

const updater_life_1 = require("@tsparticles/updater-life");
const shape_line_1 = require("@tsparticles/shape-line");
const updater_rotate_1 = require("@tsparticles/updater-rotate");
const plugin_sounds_1 = require("@tsparticles/plugin-sounds");
const updater_stroke_color_1 = require("@tsparticles/updater-stroke-color");
const effect_trail_1 = require("@tsparticles/effect-trail");
const minSplitCount = 2;
let initialized = false;

@@ -21,3 +20,3 @@ let initializing = false;

const data = args.data;
return data.particle.shape === "circle" && !!data.particle.splitCount && data.particle.splitCount < 2;
return data.particle.shape === "circle" && !!data.particle.splitCount && data.particle.splitCount < minSplitCount;
};

@@ -44,3 +43,3 @@ class FireworksInstance {

return new Promise((resolve) => {
const interval = setInterval(() => {
const timeout = 100, interval = setInterval(() => {
if (!initialized) {

@@ -51,3 +50,3 @@ return;

resolve();
}, 100);
}, timeout);
});

@@ -59,7 +58,5 @@ }

await (0, plugin_sounds_1.loadSoundsPlugin)(engine_1.tsParticles, false);
await (0, shape_line_1.loadLineShape)(engine_1.tsParticles, false);
await (0, updater_rotate_1.loadRotateUpdater)(engine_1.tsParticles, false);
await (0, updater_destroy_1.loadDestroyUpdater)(engine_1.tsParticles, false);
await (0, updater_life_1.loadLifeUpdater)(engine_1.tsParticles, false);
await (0, updater_stroke_color_1.loadStrokeColorUpdater)(engine_1.tsParticles, false);
await (0, effect_trail_1.loadTrailEffect)(engine_1.tsParticles, false);

@@ -82,3 +79,3 @@ await (0, basic_1.loadBasic)(engine_1.tsParticles, false);

}
const particlesOptions = {
const identity = 1, particlesOptions = {
detectRetina: true,

@@ -98,4 +95,4 @@ background: {

delay: (0, engine_1.isNumber)(options.rate)
? 1 / options.rate
: { min: 1 / (0, engine_1.getRangeMin)(options.rate), max: 1 / (0, engine_1.getRangeMax)(options.rate) },
? identity / options.rate
: { min: identity / (0, engine_1.getRangeMin)(options.rate), max: identity / (0, engine_1.getRangeMax)(options.rate) },
quantity: 1,

@@ -256,3 +253,3 @@ },

{
event: "particleDestroyed",
event: "particleRemoved",
filter: explodeSoundCheck,

@@ -259,0 +256,0 @@ audio: [

@@ -8,7 +8,6 @@ import { getRangeMax, getRangeMin, isNumber, isSsr, isString, setRangeValue, tsParticles, } from "@tsparticles/engine";

import { loadLifeUpdater } from "@tsparticles/updater-life";
import { loadLineShape } from "@tsparticles/shape-line";
import { loadRotateUpdater } from "@tsparticles/updater-rotate";
import { loadSoundsPlugin } from "@tsparticles/plugin-sounds";
import { loadStrokeColorUpdater } from "@tsparticles/updater-stroke-color";
import { loadTrailEffect } from "@tsparticles/effect-trail";
const minSplitCount = 2;
let initialized = false;

@@ -18,3 +17,3 @@ let initializing = false;

const data = args.data;
return data.particle.shape === "circle" && !!data.particle.splitCount && data.particle.splitCount < 2;
return data.particle.shape === "circle" && !!data.particle.splitCount && data.particle.splitCount < minSplitCount;
};

@@ -41,3 +40,3 @@ class FireworksInstance {

return new Promise((resolve) => {
const interval = setInterval(() => {
const timeout = 100, interval = setInterval(() => {
if (!initialized) {

@@ -48,3 +47,3 @@ return;

resolve();
}, 100);
}, timeout);
});

@@ -56,7 +55,5 @@ }

await loadSoundsPlugin(tsParticles, false);
await loadLineShape(tsParticles, false);
await loadRotateUpdater(tsParticles, false);
await loadDestroyUpdater(tsParticles, false);
await loadLifeUpdater(tsParticles, false);
await loadStrokeColorUpdater(tsParticles, false);
await loadTrailEffect(tsParticles, false);

@@ -79,3 +76,3 @@ await loadBasic(tsParticles, false);

}
const particlesOptions = {
const identity = 1, particlesOptions = {
detectRetina: true,

@@ -95,4 +92,4 @@ background: {

delay: isNumber(options.rate)
? 1 / options.rate
: { min: 1 / getRangeMin(options.rate), max: 1 / getRangeMax(options.rate) },
? identity / options.rate
: { min: identity / getRangeMin(options.rate), max: identity / getRangeMax(options.rate) },
quantity: 1,

@@ -253,3 +250,3 @@ },

{
event: "particleDestroyed",
event: "particleRemoved",
filter: explodeSoundCheck,

@@ -256,0 +253,0 @@ audio: [

{
"name": "@tsparticles/fireworks",
"version": "3.0.3",
"version": "3.1.0",
"description": "Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.",

@@ -102,13 +102,11 @@ "homepage": "https://particles.js.org",

"dependencies": {
"@tsparticles/basic": "^3.0.3",
"@tsparticles/effect-trail": "^3.0.3",
"@tsparticles/engine": "^3.0.3",
"@tsparticles/plugin-emitters": "^3.0.3",
"@tsparticles/plugin-emitters-shape-square": "^3.0.3",
"@tsparticles/plugin-sounds": "^3.0.3",
"@tsparticles/shape-line": "^3.0.3",
"@tsparticles/updater-destroy": "^3.0.3",
"@tsparticles/updater-life": "^3.0.3",
"@tsparticles/updater-rotate": "^3.0.3",
"@tsparticles/updater-stroke-color": "^3.0.3"
"@tsparticles/basic": "^3.1.0",
"@tsparticles/effect-trail": "^3.1.0",
"@tsparticles/engine": "^3.1.0",
"@tsparticles/plugin-emitters": "^3.1.0",
"@tsparticles/plugin-emitters-shape-square": "^3.1.0",
"@tsparticles/plugin-sounds": "^3.1.0",
"@tsparticles/updater-destroy": "^3.1.0",
"@tsparticles/updater-life": "^3.1.0",
"@tsparticles/updater-rotate": "^3.1.0"
},

@@ -115,0 +113,0 @@ "publishConfig": {

@@ -1,1 +0,1 @@

/*! tsParticles Fireworks v3.0.3 by Matteo Bruni */
/*! tsParticles Fireworks v3.1.0 by Matteo Bruni */

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

* How to use? : Check the GitHub README
* v3.0.3
* v3.1.0
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
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"), require("@tsparticles/effect-trail"));
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/updater-life"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/effect-trail"));
else if(typeof define === 'function' && 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", "@tsparticles/effect-trail"], factory);
define(["@tsparticles/engine", "@tsparticles/basic", "@tsparticles/updater-destroy", "@tsparticles/plugin-emitters", "@tsparticles/plugin-emitters-shape-square", "@tsparticles/updater-life", "@tsparticles/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/effect-trail"], factory);
else {
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"), require("@tsparticles/effect-trail")) : factory(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/engine"), require("@tsparticles/basic"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/updater-life"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/effect-trail")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(this, (__WEBPACK_EXTERNAL_MODULE__533__, __WEBPACK_EXTERNAL_MODULE__574__, __WEBPACK_EXTERNAL_MODULE__344__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__137__, __WEBPACK_EXTERNAL_MODULE__59__, __WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__204__, __WEBPACK_EXTERNAL_MODULE__20__) => {
})(this, (__WEBPACK_EXTERNAL_MODULE__533__, __WEBPACK_EXTERNAL_MODULE__574__, __WEBPACK_EXTERNAL_MODULE__344__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__59__, __WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__4__) => {
return /******/ (() => { // webpackBootstrap

@@ -31,6 +31,6 @@ /******/ "use strict";

/***/ 20:
/***/ 4:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__20__;
module.exports = __WEBPACK_EXTERNAL_MODULE__4__;

@@ -67,9 +67,2 @@ /***/ }),

/***/ 137:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__137__;
/***/ }),
/***/ 344:

@@ -94,9 +87,2 @@ /***/ ((module) => {

/***/ }),
/***/ 204:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__204__;
/***/ })

@@ -253,4 +239,2 @@

var updater_life_root_window_ = __webpack_require__(84);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-line","commonjs2":"@tsparticles/shape-line","amd":"@tsparticles/shape-line","root":"window"}
var shape_line_root_window_ = __webpack_require__(137);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-rotate","commonjs2":"@tsparticles/updater-rotate","amd":"@tsparticles/updater-rotate","root":"window"}

@@ -260,6 +244,4 @@ var updater_rotate_root_window_ = __webpack_require__(59);

var plugin_sounds_root_window_ = __webpack_require__(490);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-stroke-color","commonjs2":"@tsparticles/updater-stroke-color","amd":"@tsparticles/updater-stroke-color","root":"window"}
var updater_stroke_color_root_window_ = __webpack_require__(204);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/effect-trail","commonjs2":"@tsparticles/effect-trail","amd":"@tsparticles/effect-trail","root":"window"}
var effect_trail_root_window_ = __webpack_require__(20);
var effect_trail_root_window_ = __webpack_require__(4);
;// CONCATENATED MODULE: ./dist/browser/fireworks.js

@@ -276,4 +258,3 @@

const minSplitCount = 2;
let initialized = false;

@@ -283,3 +264,3 @@ let initializing = false;

const data = args.data;
return data.particle.shape === "circle" && !!data.particle.splitCount && data.particle.splitCount < 2;
return data.particle.shape === "circle" && !!data.particle.splitCount && data.particle.splitCount < minSplitCount;
};

@@ -306,9 +287,10 @@ class FireworksInstance {

return new Promise(resolve => {
const interval = setInterval(() => {
if (!initialized) {
return;
}
clearInterval(interval);
resolve();
}, 100);
const timeout = 100,
interval = setInterval(() => {
if (!initialized) {
return;
}
clearInterval(interval);
resolve();
}, timeout);
});

@@ -320,7 +302,5 @@ }

await (0,plugin_sounds_root_window_.loadSoundsPlugin)(engine_root_window_.tsParticles, false);
await (0,shape_line_root_window_.loadLineShape)(engine_root_window_.tsParticles, false);
await (0,updater_rotate_root_window_.loadRotateUpdater)(engine_root_window_.tsParticles, false);
await (0,updater_destroy_root_window_.loadDestroyUpdater)(engine_root_window_.tsParticles, false);
await (0,updater_life_root_window_.loadLifeUpdater)(engine_root_window_.tsParticles, false);
await (0,updater_stroke_color_root_window_.loadStrokeColorUpdater)(engine_root_window_.tsParticles, false);
await (0,effect_trail_root_window_.loadTrailEffect)(engine_root_window_.tsParticles, false);

@@ -342,187 +322,188 @@ await (0,basic_root_window_.loadBasic)(engine_root_window_.tsParticles, false);

}
const particlesOptions = {
detectRetina: true,
background: {
color: options.background
},
fpsLimit: 60,
emitters: {
direction: "top",
life: {
count: 0,
duration: 0.1,
delay: 0.1
const identity = 1,
particlesOptions = {
detectRetina: true,
background: {
color: options.background
},
rate: {
delay: (0,engine_root_window_.isNumber)(options.rate) ? 1 / options.rate : {
min: 1 / (0,engine_root_window_.getRangeMin)(options.rate),
max: 1 / (0,engine_root_window_.getRangeMax)(options.rate)
fpsLimit: 60,
emitters: {
direction: "top",
life: {
count: 0,
duration: 0.1,
delay: 0.1
},
quantity: 1
rate: {
delay: (0,engine_root_window_.isNumber)(options.rate) ? identity / options.rate : {
min: identity / (0,engine_root_window_.getRangeMin)(options.rate),
max: identity / (0,engine_root_window_.getRangeMax)(options.rate)
},
quantity: 1
},
size: {
width: 100,
height: 0
},
position: {
y: 100,
x: 50
}
},
size: {
width: 100,
height: 0
},
position: {
y: 100,
x: 50
}
},
particles: {
number: {
value: 0
},
color: {
value: "#fff"
},
destroy: {
mode: "split",
bounds: {
top: (0,engine_root_window_.setRangeValue)(options.minHeight)
particles: {
number: {
value: 0
},
split: {
sizeOffset: false,
count: 1,
factor: {
value: 0.333333
color: {
value: "#fff"
},
destroy: {
mode: "split",
bounds: {
top: (0,engine_root_window_.setRangeValue)(options.minHeight)
},
rate: {
value: options.splitCount
},
colorOffset: {
s: options.saturation,
l: options.brightness
},
particles: {
color: {
value: options.colors
split: {
sizeOffset: false,
count: 1,
factor: {
value: 0.333333
},
number: {
value: 0
rate: {
value: options.splitCount
},
opacity: {
value: {
min: 0.1,
max: 1
colorOffset: {
s: options.saturation,
l: options.brightness
},
particles: {
color: {
value: options.colors
},
animation: {
enable: true,
speed: 1,
sync: false,
startValue: "max",
destroy: "min"
}
},
effect: {
type: "trail",
options: {
trail: {
length: {
min: 5,
max: 10
number: {
value: 0
},
opacity: {
value: {
min: 0.1,
max: 1
},
animation: {
enable: true,
speed: 1,
sync: false,
startValue: "max",
destroy: "min"
}
},
effect: {
type: "trail",
options: {
trail: {
length: {
min: 5,
max: 10
}
}
}
}
},
shape: {
type: "circle"
},
size: {
value: {
min: 1,
max: 2
},
animation: {
enable: true,
speed: 5,
count: 1,
sync: false,
startValue: "min",
destroy: "none"
}
},
life: {
count: 1,
duration: {
shape: {
type: "circle"
},
size: {
value: {
min: 0.25,
max: 0.5
min: 1,
max: 2
},
animation: {
enable: true,
speed: 5,
count: 1,
sync: false,
startValue: "min",
destroy: "none"
}
}
},
move: {
decay: {
min: 0.05,
max: 0.1
},
enable: true,
gravity: {
life: {
count: 1,
duration: {
value: {
min: 0.25,
max: 0.5
}
}
},
move: {
decay: {
min: 0.05,
max: 0.1
},
enable: true,
inverse: false,
acceleration: (0,engine_root_window_.setRangeValue)(options.gravity)
gravity: {
enable: true,
inverse: false,
acceleration: (0,engine_root_window_.setRangeValue)(options.gravity)
},
speed: (0,engine_root_window_.setRangeValue)(options.speed),
direction: "none",
outModes: "destroy"
}
}
}
},
life: {
count: 1
},
effect: {
type: "trail",
options: {
trail: {
length: {
min: 10,
max: 30
},
speed: (0,engine_root_window_.setRangeValue)(options.speed),
direction: "none",
outModes: "destroy"
minWidth: 1,
maxWidth: 1
}
}
}
},
life: {
count: 1
},
effect: {
type: "trail",
options: {
trail: {
length: {
min: 10,
max: 30
},
minWidth: 1,
maxWidth: 1
},
shape: {
type: "circle"
},
size: {
value: 1
},
opacity: {
value: 0.5
},
rotate: {
path: true
},
move: {
enable: true,
gravity: {
acceleration: 15,
enable: true,
inverse: true,
maxSpeed: 100
},
speed: {
min: 10,
max: 20
},
outModes: {
default: "destroy",
top: "none"
}
}
},
shape: {
type: "circle"
},
size: {
value: 1
},
opacity: {
value: 0.5
},
rotate: {
path: true
},
move: {
enable: true,
gravity: {
acceleration: 15,
enable: true,
inverse: true,
maxSpeed: 100
},
speed: {
min: 10,
max: 20
},
outModes: {
default: "destroy",
top: "none"
}
sounds: {
enable: options.sounds,
events: [{
event: "particleRemoved",
filter: explodeSoundCheck,
audio: ["https://particles.js.org/audio/explosion0.mp3", "https://particles.js.org/audio/explosion1.mp3", "https://particles.js.org/audio/explosion2.mp3"]
}],
volume: 50
}
},
sounds: {
enable: options.sounds,
events: [{
event: "particleDestroyed",
filter: explodeSoundCheck,
audio: ["https://particles.js.org/audio/explosion0.mp3", "https://particles.js.org/audio/explosion1.mp3", "https://particles.js.org/audio/explosion2.mp3"]
}],
volume: 50
}
};
};
const container = await engine_root_window_.tsParticles.load({

@@ -529,0 +510,0 @@ id,

/*! For license information please see tsparticles.fireworks.min.js.LICENSE.txt */
!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"),require("@tsparticles/effect-trail"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/basic","@tsparticles/updater-destroy","@tsparticles/plugin-emitters","@tsparticles/plugin-emitters-shape-square","@tsparticles/updater-life","@tsparticles/shape-line","@tsparticles/updater-rotate","@tsparticles/plugin-sounds","@tsparticles/updater-stroke-color","@tsparticles/effect-trail"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color"),require("@tsparticles/effect-trail")):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 s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(this,((e,t,i,s,r,a,o,n,l,p,c)=>(()=>{"use strict";var u={574:e=>{e.exports=t},20:e=>{e.exports=c},533:t=>{t.exports=e},68:e=>{e.exports=s},787:e=>{e.exports=r},490:e=>{e.exports=l},137:e=>{e.exports=o},344:e=>{e.exports=i},84:e=>{e.exports=a},59:e=>{e.exports=n},204:e=>{e.exports=p}},d={};function m(e){var t=d[e];if(void 0!==t)return t.exports;var i=d[e]={exports:{}};return u[e](i,i.exports,m),i.exports}m.d=(e,t)=>{for(var i in t)m.o(t,i)&&!m.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},m.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),m.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var f={};return(()=>{m.r(f),m.d(f,{fireworks:()=>y});var e=m(533);class t{constructor(){this.background="none",this.brightness={min:-30,max:30},this.colors=["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"],this.gravity=5,this.minHeight={min:10,max:30},this.rate=10,this.saturation={min:-30,max:30},this.sounds=!0,this.speed={min:5,max:15},this.splitCount={min:75,max:150}}load(t){t&&(void 0!==t.background&&(this.background=t.background),void 0!==t.colors&&((0,e.isArray)(t.colors)?this.colors=[...t.colors]:this.colors=t.colors),void 0!==t.brightness&&(this.brightness=(0,e.setRangeValue)(t.brightness)),void 0!==t.gravity&&(this.gravity=(0,e.setRangeValue)(t.gravity)),void 0!==t.minHeight&&(this.minHeight=(0,e.setRangeValue)(t.minHeight)),void 0!==t.rate&&(this.rate=(0,e.setRangeValue)(t.rate)),void 0!==t.saturation&&(this.saturation=(0,e.setRangeValue)(t.saturation)),void 0!==t.sounds&&(this.sounds=t.sounds),void 0!==t.speed&&(this.speed=(0,e.setRangeValue)(t.speed)),void 0!==t.splitCount&&(this.splitCount=(0,e.setRangeValue)(t.splitCount)))}}var i=m(574),s=m(344),r=m(68),a=m(787),o=m(84),n=m(137),l=m(59),p=m(490),c=m(204),u=m(20);let d=!1,g=!1;const h=e=>{const t=e.data;return"circle"===t.particle.shape&&!!t.particle.splitCount&&t.particle.splitCount<2};class v{constructor(e){this._container=e}pause(){this._container.pause()}play(){this._container.play()}stop(){this._container.stop()}}async function y(m,f){let y;await async function(){if(!d){if(g)return new Promise((e=>{const t=setInterval((()=>{d&&(clearInterval(t),e())}),100)}));g=!0,await(0,r.loadEmittersPlugin)(e.tsParticles,!1),await(0,a.loadEmittersShapeSquare)(e.tsParticles,!1),await(0,p.loadSoundsPlugin)(e.tsParticles,!1),await(0,n.loadLineShape)(e.tsParticles,!1),await(0,l.loadRotateUpdater)(e.tsParticles,!1),await(0,s.loadDestroyUpdater)(e.tsParticles,!1),await(0,o.loadLifeUpdater)(e.tsParticles,!1),await(0,c.loadStrokeColorUpdater)(e.tsParticles,!1),await(0,u.loadTrailEffect)(e.tsParticles,!1),await(0,i.loadBasic)(e.tsParticles,!1),g=!1,d=!0}}();const w=new t;(0,e.isString)(m)?(y=m,w.load(f)):(y="fireworks",w.load(m));const x={detectRetina:!0,background:{color:w.background},fpsLimit:60,emitters:{direction:"top",life:{count:0,duration:.1,delay:.1},rate:{delay:(0,e.isNumber)(w.rate)?1/w.rate:{min:1/(0,e.getRangeMin)(w.rate),max:1/(0,e.getRangeMax)(w.rate)},quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},color:{value:"#fff"},destroy:{mode:"split",bounds:{top:(0,e.setRangeValue)(w.minHeight)},split:{sizeOffset:!1,count:1,factor:{value:.333333},rate:{value:w.splitCount},colorOffset:{s:w.saturation,l:w.brightness},particles:{color:{value:w.colors},number:{value:0},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:1,sync:!1,startValue:"max",destroy:"min"}},effect:{type:"trail",options:{trail:{length:{min:5,max:10}}}},shape:{type:"circle"},size:{value:{min:1,max:2},animation:{enable:!0,speed:5,count:1,sync:!1,startValue:"min",destroy:"none"}},life:{count:1,duration:{value:{min:.25,max:.5}}},move:{decay:{min:.05,max:.1},enable:!0,gravity:{enable:!0,inverse:!1,acceleration:(0,e.setRangeValue)(w.gravity)},speed:(0,e.setRangeValue)(w.speed),direction:"none",outModes:"destroy"}}}},life:{count:1},effect:{type:"trail",options:{trail:{length:{min:10,max:30},minWidth:1,maxWidth:1}}},shape:{type:"circle"},size:{value:1},opacity:{value:.5},rotate:{path:!0},move:{enable:!0,gravity:{acceleration:15,enable:!0,inverse:!0,maxSpeed:100},speed:{min:10,max:20},outModes:{default:"destroy",top:"none"}}},sounds:{enable:w.sounds,events:[{event:"particleDestroyed",filter:h,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}},b=await e.tsParticles.load({id:y,options:x});if(b)return new v(b)}y.version=e.tsParticles.version,(0,e.isSsr)()||(window.fireworks=y)})(),f})()));
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/updater-life"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/effect-trail"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/basic","@tsparticles/updater-destroy","@tsparticles/plugin-emitters","@tsparticles/plugin-emitters-shape-square","@tsparticles/updater-life","@tsparticles/updater-rotate","@tsparticles/plugin-sounds","@tsparticles/effect-trail"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/updater-life"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/effect-trail")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(this,((e,t,i,s,a,r,o,n,l)=>(()=>{"use strict";var p={574:e=>{e.exports=t},4:e=>{e.exports=l},533:t=>{t.exports=e},68:e=>{e.exports=s},787:e=>{e.exports=a},490:e=>{e.exports=n},344:e=>{e.exports=i},84:e=>{e.exports=r},59:e=>{e.exports=o}},u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var i=u[e]={exports:{}};return p[e](i,i.exports,c),i.exports}c.d=(e,t)=>{for(var i in t)c.o(t,i)&&!c.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return(()=>{c.r(d),c.d(d,{fireworks:()=>h});var e=c(533);class t{constructor(){this.background="none",this.brightness={min:-30,max:30},this.colors=["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"],this.gravity=5,this.minHeight={min:10,max:30},this.rate=10,this.saturation={min:-30,max:30},this.sounds=!0,this.speed={min:5,max:15},this.splitCount={min:75,max:150}}load(t){t&&(void 0!==t.background&&(this.background=t.background),void 0!==t.colors&&((0,e.isArray)(t.colors)?this.colors=[...t.colors]:this.colors=t.colors),void 0!==t.brightness&&(this.brightness=(0,e.setRangeValue)(t.brightness)),void 0!==t.gravity&&(this.gravity=(0,e.setRangeValue)(t.gravity)),void 0!==t.minHeight&&(this.minHeight=(0,e.setRangeValue)(t.minHeight)),void 0!==t.rate&&(this.rate=(0,e.setRangeValue)(t.rate)),void 0!==t.saturation&&(this.saturation=(0,e.setRangeValue)(t.saturation)),void 0!==t.sounds&&(this.sounds=t.sounds),void 0!==t.speed&&(this.speed=(0,e.setRangeValue)(t.speed)),void 0!==t.splitCount&&(this.splitCount=(0,e.setRangeValue)(t.splitCount)))}}var i=c(574),s=c(344),a=c(68),r=c(787),o=c(84),n=c(59),l=c(490),p=c(4);let u=!1,m=!1;const f=e=>{const t=e.data;return"circle"===t.particle.shape&&!!t.particle.splitCount&&t.particle.splitCount<2};class g{constructor(e){this._container=e}pause(){this._container.pause()}play(){this._container.play()}stop(){this._container.stop()}}async function h(c,d){let h;await async function(){if(!u){if(m)return new Promise((e=>{const t=setInterval((()=>{u&&(clearInterval(t),e())}),100)}));m=!0,await(0,a.loadEmittersPlugin)(e.tsParticles,!1),await(0,r.loadEmittersShapeSquare)(e.tsParticles,!1),await(0,l.loadSoundsPlugin)(e.tsParticles,!1),await(0,n.loadRotateUpdater)(e.tsParticles,!1),await(0,s.loadDestroyUpdater)(e.tsParticles,!1),await(0,o.loadLifeUpdater)(e.tsParticles,!1),await(0,p.loadTrailEffect)(e.tsParticles,!1),await(0,i.loadBasic)(e.tsParticles,!1),m=!1,u=!0}}();const v=new t;(0,e.isString)(c)?(h=c,v.load(d)):(h="fireworks",v.load(c));const y={detectRetina:!0,background:{color:v.background},fpsLimit:60,emitters:{direction:"top",life:{count:0,duration:.1,delay:.1},rate:{delay:(0,e.isNumber)(v.rate)?1/v.rate:{min:1/(0,e.getRangeMin)(v.rate),max:1/(0,e.getRangeMax)(v.rate)},quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},color:{value:"#fff"},destroy:{mode:"split",bounds:{top:(0,e.setRangeValue)(v.minHeight)},split:{sizeOffset:!1,count:1,factor:{value:.333333},rate:{value:v.splitCount},colorOffset:{s:v.saturation,l:v.brightness},particles:{color:{value:v.colors},number:{value:0},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:1,sync:!1,startValue:"max",destroy:"min"}},effect:{type:"trail",options:{trail:{length:{min:5,max:10}}}},shape:{type:"circle"},size:{value:{min:1,max:2},animation:{enable:!0,speed:5,count:1,sync:!1,startValue:"min",destroy:"none"}},life:{count:1,duration:{value:{min:.25,max:.5}}},move:{decay:{min:.05,max:.1},enable:!0,gravity:{enable:!0,inverse:!1,acceleration:(0,e.setRangeValue)(v.gravity)},speed:(0,e.setRangeValue)(v.speed),direction:"none",outModes:"destroy"}}}},life:{count:1},effect:{type:"trail",options:{trail:{length:{min:10,max:30},minWidth:1,maxWidth:1}}},shape:{type:"circle"},size:{value:1},opacity:{value:.5},rotate:{path:!0},move:{enable:!0,gravity:{acceleration:15,enable:!0,inverse:!0,maxSpeed:100},speed:{min:10,max:20},outModes:{default:"destroy",top:"none"}}},sounds:{enable:v.sounds,events:[{event:"particleRemoved",filter:f,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}},x=await e.tsParticles.load({id:h,options:y});if(x)return new g(x)}h.version=e.tsParticles.version,(0,e.isSsr)()||(window.fireworks=h)})(),d})()));

@@ -1,1 +0,1 @@

/*! tsParticles Fireworks v3.0.3 by Matteo Bruni */
/*! tsParticles Fireworks v3.1.0 by Matteo Bruni */

@@ -7,3 +7,3 @@ (function (factory) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@tsparticles/engine", "./FireworkOptions.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", "@tsparticles/effect-trail"], factory);
define(["require", "exports", "@tsparticles/engine", "./FireworkOptions.js", "@tsparticles/basic", "@tsparticles/updater-destroy", "@tsparticles/plugin-emitters", "@tsparticles/plugin-emitters-shape-square", "@tsparticles/updater-life", "@tsparticles/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/effect-trail"], factory);
}

@@ -21,7 +21,6 @@ })(function (require, exports) {

const updater_life_1 = require("@tsparticles/updater-life");
const shape_line_1 = require("@tsparticles/shape-line");
const updater_rotate_1 = require("@tsparticles/updater-rotate");
const plugin_sounds_1 = require("@tsparticles/plugin-sounds");
const updater_stroke_color_1 = require("@tsparticles/updater-stroke-color");
const effect_trail_1 = require("@tsparticles/effect-trail");
const minSplitCount = 2;
let initialized = false;

@@ -31,3 +30,3 @@ let initializing = false;

const data = args.data;
return data.particle.shape === "circle" && !!data.particle.splitCount && data.particle.splitCount < 2;
return data.particle.shape === "circle" && !!data.particle.splitCount && data.particle.splitCount < minSplitCount;
};

@@ -54,3 +53,3 @@ class FireworksInstance {

return new Promise((resolve) => {
const interval = setInterval(() => {
const timeout = 100, interval = setInterval(() => {
if (!initialized) {

@@ -61,3 +60,3 @@ return;

resolve();
}, 100);
}, timeout);
});

@@ -69,7 +68,5 @@ }

await (0, plugin_sounds_1.loadSoundsPlugin)(engine_1.tsParticles, false);
await (0, shape_line_1.loadLineShape)(engine_1.tsParticles, false);
await (0, updater_rotate_1.loadRotateUpdater)(engine_1.tsParticles, false);
await (0, updater_destroy_1.loadDestroyUpdater)(engine_1.tsParticles, false);
await (0, updater_life_1.loadLifeUpdater)(engine_1.tsParticles, false);
await (0, updater_stroke_color_1.loadStrokeColorUpdater)(engine_1.tsParticles, false);
await (0, effect_trail_1.loadTrailEffect)(engine_1.tsParticles, false);

@@ -92,3 +89,3 @@ await (0, basic_1.loadBasic)(engine_1.tsParticles, false);

}
const particlesOptions = {
const identity = 1, particlesOptions = {
detectRetina: true,

@@ -108,4 +105,4 @@ background: {

delay: (0, engine_1.isNumber)(options.rate)
? 1 / options.rate
: { min: 1 / (0, engine_1.getRangeMin)(options.rate), max: 1 / (0, engine_1.getRangeMax)(options.rate) },
? identity / options.rate
: { min: identity / (0, engine_1.getRangeMin)(options.rate), max: identity / (0, engine_1.getRangeMax)(options.rate) },
quantity: 1,

@@ -266,3 +263,3 @@ },

{
event: "particleDestroyed",
event: "particleRemoved",
filter: explodeSoundCheck,

@@ -269,0 +266,0 @@ audio: [

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