Socket
Socket
Sign inDemoInstall

@tsparticles/fireworks

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tsparticles/fireworks - npm Package Compare versions

Comparing version 3.0.0-beta.3 to 3.0.0-beta.4

20

package.json
{
"name": "@tsparticles/fireworks",
"version": "3.0.0-beta.3",
"version": "3.0.0-beta.4",
"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,11 +102,11 @@ "homepage": "https://particles.js.org",

"dependencies": {
"@tsparticles/basic": "^3.0.0-beta.3",
"@tsparticles/engine": "^3.0.0-beta.3",
"@tsparticles/plugin-emitters": "^3.0.0-beta.3",
"@tsparticles/plugin-sounds": "^3.0.0-beta.3",
"@tsparticles/shape-line": "^3.0.0-beta.3",
"@tsparticles/updater-destroy": "^3.0.0-beta.3",
"@tsparticles/updater-life": "^3.0.0-beta.3",
"@tsparticles/updater-rotate": "^3.0.0-beta.3",
"@tsparticles/updater-stroke-color": "^3.0.0-beta.3"
"@tsparticles/basic": "^3.0.0-beta.4",
"@tsparticles/engine": "^3.0.0-beta.4",
"@tsparticles/plugin-emitters": "^3.0.0-beta.4",
"@tsparticles/plugin-sounds": "^3.0.0-beta.4",
"@tsparticles/shape-line": "^3.0.0-beta.4",
"@tsparticles/updater-destroy": "^3.0.0-beta.4",
"@tsparticles/updater-life": "^3.0.0-beta.4",
"@tsparticles/updater-rotate": "^3.0.0-beta.4",
"@tsparticles/updater-stroke-color": "^3.0.0-beta.4"
},

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

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

/*! tsParticles Fireworks v3.0.0-beta.3 by Matteo Bruni */
/*! tsParticles Fireworks v3.0.0-beta.4 by Matteo Bruni */

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

* How to use? : Check the GitHub README
* v3.0.0-beta.3
* v3.0.0-beta.4
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/updater-size"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/shape-line"), require("@tsparticles/plugin-sounds"), require("@tsparticles/updater-stroke-color"));
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/shape-line"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/updater-stroke-color"));
else if(typeof define === 'function' && define.amd)
define(["@tsparticles/engine", "@tsparticles/move-base", "@tsparticles/shape-circle", "@tsparticles/updater-color", "@tsparticles/updater-opacity", "@tsparticles/updater-out-modes", "@tsparticles/updater-size", "@tsparticles/updater-destroy", "@tsparticles/plugin-emitters", "@tsparticles/updater-life", "@tsparticles/shape-line", "@tsparticles/plugin-sounds", "@tsparticles/updater-stroke-color"], factory);
define(["@tsparticles/engine", "@tsparticles/basic", "@tsparticles/updater-destroy", "@tsparticles/plugin-emitters", "@tsparticles/updater-life", "@tsparticles/shape-line", "@tsparticles/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/updater-stroke-color"], factory);
else {
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/updater-size"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/shape-line"), require("@tsparticles/plugin-sounds"), require("@tsparticles/updater-stroke-color")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], 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/updater-life"), require("@tsparticles/shape-line"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/updater-stroke-color")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(this, (__WEBPACK_EXTERNAL_MODULE__533__, __WEBPACK_EXTERNAL_MODULE__619__, __WEBPACK_EXTERNAL_MODULE__163__, __WEBPACK_EXTERNAL_MODULE__501__, __WEBPACK_EXTERNAL_MODULE__686__, __WEBPACK_EXTERNAL_MODULE__290__, __WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__344__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__137__, __WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__204__) => {
})(this, (__WEBPACK_EXTERNAL_MODULE__533__, __WEBPACK_EXTERNAL_MODULE__574__, __WEBPACK_EXTERNAL_MODULE__344__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__137__, __WEBPACK_EXTERNAL_MODULE__59__, __WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__204__) => {
return /******/ (() => { // webpackBootstrap

@@ -24,13 +24,13 @@ /******/ "use strict";

/***/ 533:
/***/ 574:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__533__;
module.exports = __WEBPACK_EXTERNAL_MODULE__574__;
/***/ }),
/***/ 619:
/***/ 533:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__619__;
module.exports = __WEBPACK_EXTERNAL_MODULE__533__;

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

/***/ 163:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__163__;
/***/ }),
/***/ 137:

@@ -68,9 +61,2 @@ /***/ ((module) => {

/***/ 501:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__501__;
/***/ }),
/***/ 344:

@@ -90,23 +76,9 @@ /***/ ((module) => {

/***/ 686:
/***/ 59:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__686__;
module.exports = __WEBPACK_EXTERNAL_MODULE__59__;
/***/ }),
/***/ 290:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__290__;
/***/ }),
/***/ 2:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__2__;
/***/ }),
/***/ 204:

@@ -254,30 +226,4 @@ /***/ ((module) => {

}
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/move-base","commonjs2":"@tsparticles/move-base","amd":"@tsparticles/move-base","root":"window"}
var move_base_root_window_ = __webpack_require__(619);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-circle","commonjs2":"@tsparticles/shape-circle","amd":"@tsparticles/shape-circle","root":"window"}
var shape_circle_root_window_ = __webpack_require__(163);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-color","commonjs2":"@tsparticles/updater-color","amd":"@tsparticles/updater-color","root":"window"}
var updater_color_root_window_ = __webpack_require__(501);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-opacity","commonjs2":"@tsparticles/updater-opacity","amd":"@tsparticles/updater-opacity","root":"window"}
var updater_opacity_root_window_ = __webpack_require__(686);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-out-modes","commonjs2":"@tsparticles/updater-out-modes","amd":"@tsparticles/updater-out-modes","root":"window"}
var updater_out_modes_root_window_ = __webpack_require__(290);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-size","commonjs2":"@tsparticles/updater-size","amd":"@tsparticles/updater-size","root":"window"}
var updater_size_root_window_ = __webpack_require__(2);
;// CONCATENATED MODULE: ../basic/dist/browser/index.js
async function loadBasic(engine, refresh = true) {
await (0,move_base_root_window_.loadBaseMover)(engine, false);
await (0,shape_circle_root_window_.loadCircleShape)(engine, false);
await (0,updater_color_root_window_.loadColorUpdater)(engine, false);
await (0,updater_opacity_root_window_.loadOpacityUpdater)(engine, false);
await (0,updater_out_modes_root_window_.loadOutModesUpdater)(engine, false);
await (0,updater_size_root_window_.loadSizeUpdater)(engine, false);
await engine.refresh(refresh);
}
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/basic","commonjs2":"@tsparticles/basic","amd":"@tsparticles/basic","root":"window"}
var basic_root_window_ = __webpack_require__(574);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-destroy","commonjs2":"@tsparticles/updater-destroy","amd":"@tsparticles/updater-destroy","root":"window"}

@@ -291,155 +237,4 @@ var updater_destroy_root_window_ = __webpack_require__(344);

var shape_line_root_window_ = __webpack_require__(137);
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/Options/Classes/RotateAnimation.js
class RotateAnimation {
constructor() {
this.enable = false;
this.speed = 0;
this.decay = 0;
this.sync = false;
}
load(data) {
if (!data) {
return;
}
if (data.enable !== undefined) {
this.enable = data.enable;
}
if (data.speed !== undefined) {
this.speed = (0,engine_root_window_.setRangeValue)(data.speed);
}
if (data.decay !== undefined) {
this.decay = (0,engine_root_window_.setRangeValue)(data.decay);
}
if (data.sync !== undefined) {
this.sync = data.sync;
}
}
}
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/Options/Classes/Rotate.js
class Rotate extends engine_root_window_.ValueWithRandom {
constructor() {
super();
this.animation = new RotateAnimation();
this.direction = "clockwise";
this.path = false;
this.value = 0;
}
load(data) {
if (!data) {
return;
}
super.load(data);
if (data.direction !== undefined) {
this.direction = data.direction;
}
this.animation.load(data.animation);
if (data.path !== undefined) {
this.path = data.path;
}
}
}
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/RotateUpdater.js
function updateRotate(particle, delta) {
const rotate = particle.rotate,
rotateOptions = particle.options.rotate;
if (!rotate || !rotateOptions) {
return;
}
const rotateAnimation = rotateOptions.animation,
speed = (rotate.velocity ?? 0) * delta.factor,
max = 2 * Math.PI,
decay = rotate.decay ?? 1;
if (!rotateAnimation.enable) {
return;
}
switch (rotate.status) {
case "increasing":
rotate.value += speed;
if (rotate.value > max) {
rotate.value -= max;
}
break;
case "decreasing":
default:
rotate.value -= speed;
if (rotate.value < 0) {
rotate.value += max;
}
break;
}
if (rotate.velocity && decay !== 1) {
rotate.velocity *= decay;
}
}
class RotateUpdater {
constructor(container) {
this.container = container;
}
init(particle) {
const rotateOptions = particle.options.rotate;
if (!rotateOptions) {
return;
}
particle.rotate = {
enable: rotateOptions.animation.enable,
value: (0,engine_root_window_.getRangeValue)(rotateOptions.value) * Math.PI / 180
};
particle.pathRotation = rotateOptions.path;
let rotateDirection = rotateOptions.direction;
if (rotateDirection === "random") {
const index = Math.floor((0,engine_root_window_.getRandom)() * 2);
rotateDirection = index > 0 ? "counter-clockwise" : "clockwise";
}
switch (rotateDirection) {
case "counter-clockwise":
case "counterClockwise":
particle.rotate.status = "decreasing";
break;
case "clockwise":
particle.rotate.status = "increasing";
break;
}
const rotateAnimation = rotateOptions.animation;
if (rotateAnimation.enable) {
particle.rotate.decay = 1 - (0,engine_root_window_.getRangeValue)(rotateAnimation.decay);
particle.rotate.velocity = (0,engine_root_window_.getRangeValue)(rotateAnimation.speed) / 360 * this.container.retina.reduceFactor;
if (!rotateAnimation.sync) {
particle.rotate.velocity *= (0,engine_root_window_.getRandom)();
}
}
particle.rotation = particle.rotate.value;
}
isEnabled(particle) {
const rotate = particle.options.rotate;
if (!rotate) {
return false;
}
return !particle.destroyed && !particle.spawning && rotate.animation.enable && !rotate.path;
}
loadOptions(options, ...sources) {
if (!options.rotate) {
options.rotate = new Rotate();
}
for (const source of sources) {
options.rotate.load(source?.rotate);
}
}
update(particle, delta) {
if (!this.isEnabled(particle)) {
return;
}
updateRotate(particle, delta);
particle.rotation = particle.rotate?.value ?? 0;
}
}
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/index.js
async function loadRotateUpdater(engine, refresh = true) {
await engine.addParticleUpdater("rotate", container => new RotateUpdater(container), refresh);
}
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-rotate","commonjs2":"@tsparticles/updater-rotate","amd":"@tsparticles/updater-rotate","root":"window"}
var updater_rotate_root_window_ = __webpack_require__(59);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-sounds","commonjs2":"@tsparticles/plugin-sounds","amd":"@tsparticles/plugin-sounds","root":"window"}

@@ -499,7 +294,7 @@ var plugin_sounds_root_window_ = __webpack_require__(490);

await (0,shape_line_root_window_.loadLineShape)(engine_root_window_.tsParticles, false);
await loadRotateUpdater(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 loadBasic(engine_root_window_.tsParticles, false);
await (0,basic_root_window_.loadBasic)(engine_root_window_.tsParticles, false);
initializing = false;

@@ -506,0 +301,0 @@ initialized = true;

/*! 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/move-base"),require("@tsparticles/shape-circle"),require("@tsparticles/updater-color"),require("@tsparticles/updater-opacity"),require("@tsparticles/updater-out-modes"),require("@tsparticles/updater-size"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/move-base","@tsparticles/shape-circle","@tsparticles/updater-color","@tsparticles/updater-opacity","@tsparticles/updater-out-modes","@tsparticles/updater-size","@tsparticles/updater-destroy","@tsparticles/plugin-emitters","@tsparticles/updater-life","@tsparticles/shape-line","@tsparticles/plugin-sounds","@tsparticles/updater-stroke-color"],t);else{var a="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/move-base"),require("@tsparticles/shape-circle"),require("@tsparticles/updater-color"),require("@tsparticles/updater-opacity"),require("@tsparticles/updater-out-modes"),require("@tsparticles/updater-size"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var i in a)("object"==typeof exports?exports:e)[i]=a[i]}}(this,((e,t,a,i,s,r,o,n,l,c,p,d,u)=>(()=>{"use strict";var h={533:t=>{t.exports=e},619:e=>{e.exports=t},68:e=>{e.exports=l},490:e=>{e.exports=d},163:e=>{e.exports=a},137:e=>{e.exports=p},501:e=>{e.exports=i},344:e=>{e.exports=n},84:e=>{e.exports=c},686:e=>{e.exports=s},290:e=>{e.exports=r},2:e=>{e.exports=o},204:e=>{e.exports=u}},m={};function v(e){var t=m[e];if(void 0!==t)return t.exports;var a=m[e]={exports:{}};return h[e](a,a.exports,v),a.exports}v.d=(e,t)=>{for(var a in t)v.o(t,a)&&!v.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},v.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),v.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return(()=>{v.r(y),v.d(y,{fireworks:()=>P});var e=v(533);class t{constructor(){this.brightness={min:-30,max:30},this.colors=["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"],this.gravity=5,this.minHeight={min:10,max:30},this.rate=20,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.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 a=v(619),i=v(163),s=v(501),r=v(686),o=v(290),n=v(2);var l=v(344),c=v(68),p=v(84),d=v(137);class u{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=(0,e.setRangeValue)(t.speed)),void 0!==t.decay&&(this.decay=(0,e.setRangeValue)(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class h extends e.ValueWithRandom{constructor(){super(),this.animation=new u,this.direction="clockwise",this.path=!1,this.value=0}load(e){e&&(super.load(e),void 0!==e.direction&&(this.direction=e.direction),this.animation.load(e.animation),void 0!==e.path&&(this.path=e.path))}}class m{constructor(e){this.container=e}init(t){const a=t.options.rotate;if(!a)return;t.rotate={enable:a.animation.enable,value:(0,e.getRangeValue)(a.value)*Math.PI/180},t.pathRotation=a.path;let i=a.direction;if("random"===i){i=Math.floor(2*(0,e.getRandom)())>0?"counter-clockwise":"clockwise"}switch(i){case"counter-clockwise":case"counterClockwise":t.rotate.status="decreasing";break;case"clockwise":t.rotate.status="increasing"}const s=a.animation;s.enable&&(t.rotate.decay=1-(0,e.getRangeValue)(s.decay),t.rotate.velocity=(0,e.getRangeValue)(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.rotate.velocity*=(0,e.getRandom)())),t.rotation=t.rotate.value}isEnabled(e){const t=e.options.rotate;return!!t&&(!e.destroyed&&!e.spawning&&t.animation.enable&&!t.path)}loadOptions(e,...t){e.rotate||(e.rotate=new h);for(const a of t)e.rotate.load(a?.rotate)}update(e,t){this.isEnabled(e)&&(!function(e,t){const a=e.rotate,i=e.options.rotate;if(!a||!i)return;const s=i.animation,r=(a.velocity??0)*t.factor,o=2*Math.PI,n=a.decay??1;s.enable&&("increasing"===a.status?(a.value+=r,a.value>o&&(a.value-=o)):(a.value-=r,a.value<0&&(a.value+=o)),a.velocity&&1!==n&&(a.velocity*=n))}(e,t),e.rotation=e.rotate?.value??0)}}var g=v(490),w=v(204);let f=!1,b=!1;const x=e=>"line"===e.data.particle.shape;class q{constructor(e){this._container=e}pause(){this._container.pause()}play(){this._container.play()}stop(){this._container.stop()}}async function R(){if(!f){if(b)return new Promise((e=>{const t=setInterval((()=>{f&&(clearInterval(t),e())}),100)}));b=!0,await(0,c.loadEmittersPlugin)(e.tsParticles,!1),await(0,g.loadSoundsPlugin)(e.tsParticles,!1),await(0,d.loadLineShape)(e.tsParticles,!1),await async function(e,t=!0){await e.addParticleUpdater("rotate",(e=>new m(e)),t)}(e.tsParticles,!1),await(0,l.loadDestroyUpdater)(e.tsParticles,!1),await(0,p.loadLifeUpdater)(e.tsParticles,!1),await(0,w.loadStrokeColorUpdater)(e.tsParticles,!1),await async function(e,t=!0){await(0,a.loadBaseMover)(e,!1),await(0,i.loadCircleShape)(e,!1),await(0,s.loadColorUpdater)(e,!1),await(0,r.loadOpacityUpdater)(e,!1),await(0,o.loadOutModesUpdater)(e,!1),await(0,n.loadSizeUpdater)(e,!1),await e.refresh(t)}(e.tsParticles,!1),b=!1,f=!0}}async function P(a,i){let s;await R();const r=new t;(0,e.isString)(a)?(s=a,r.load(i)):(s="fireworks",r.load(a));const o={detectRetina:!0,background:{color:"#000"},fpsLimit:120,emitters:{direction:"top",life:{count:0,duration:.1,delay:.1},rate:{delay:(0,e.isNumber)(r.rate)?1/r.rate:{min:1/(0,e.getRangeMin)(r.rate),max:1/(0,e.getRangeMax)(r.rate)},quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},color:{value:r.colors},destroy:{mode:"split",bounds:{top:(0,e.setRangeValue)(r.minHeight)},split:{sizeOffset:!1,count:1,factor:{value:.333333},rate:{value:r.splitCount},colorOffset:{s:r.saturation,l:r.brightness},particles:{stroke:{width:0},number:{value:0},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:.25,max:.5}}},move:{decay:{min:.05,max:.1},enable:!0,gravity:{enable:!0,inverse:!1,acceleration:(0,e.setRangeValue)(r.gravity)},speed:(0,e.setRangeValue)(r.speed),direction:"none",outModes:"destroy"}}}},life:{count:1},shape:{type:"line",options:{line:{cap:"round"}}},size:{value:{min:.1,max:50},animation:{enable:!0,sync:!0,speed:90,startValue:"max",destroy:"min"}},stroke:{color:{value:"#ffffff"},width:.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"},trail:{fill:{color:"#000"},enable:!0,length:10}}},sounds:{enable:r.sounds,events:[{event:"particleRemoved",filter:x,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}},n=await e.tsParticles.load({id:s,options:o});if(n)return new q(n)}P.version=e.tsParticles.version,(0,e.isSsr)()||(window.fireworks=P)})(),y})()));
!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/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/basic","@tsparticles/updater-destroy","@tsparticles/plugin-emitters","@tsparticles/updater-life","@tsparticles/shape-line","@tsparticles/updater-rotate","@tsparticles/plugin-sounds","@tsparticles/updater-stroke-color"],t);else{var s="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var i in s)("object"==typeof exports?exports:e)[i]=s[i]}}(this,((e,t,s,i,r,a,o,n,l)=>(()=>{"use strict";var p={574:e=>{e.exports=t},533:t=>{t.exports=e},68:e=>{e.exports=i},490:e=>{e.exports=n},137:e=>{e.exports=a},344:e=>{e.exports=s},84:e=>{e.exports=r},59:e=>{e.exports=o},204:e=>{e.exports=l}},u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var s=u[e]={exports:{}};return p[e](s,s.exports,c),s.exports}c.d=(e,t)=>{for(var s in t)c.o(t,s)&&!c.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},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.brightness={min:-30,max:30},this.colors=["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"],this.gravity=5,this.minHeight={min:10,max:30},this.rate=20,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.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 s=c(574),i=c(344),r=c(68),a=c(84),o=c(137),n=c(59),l=c(490),p=c(204);let u=!1,m=!1;const f=e=>"line"===e.data.particle.shape;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,r.loadEmittersPlugin)(e.tsParticles,!1),await(0,l.loadSoundsPlugin)(e.tsParticles,!1),await(0,o.loadLineShape)(e.tsParticles,!1),await(0,n.loadRotateUpdater)(e.tsParticles,!1),await(0,i.loadDestroyUpdater)(e.tsParticles,!1),await(0,a.loadLifeUpdater)(e.tsParticles,!1),await(0,p.loadStrokeColorUpdater)(e.tsParticles,!1),await(0,s.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:"#000"},fpsLimit:120,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:v.colors},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:{stroke:{width:0},number:{value:0},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:.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},shape:{type:"line",options:{line:{cap:"round"}}},size:{value:{min:.1,max:50},animation:{enable:!0,sync:!0,speed:90,startValue:"max",destroy:"min"}},stroke:{color:{value:"#ffffff"},width:.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"},trail:{fill:{color:"#000"},enable:!0,length:10}}},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}},w=await e.tsParticles.load({id:h,options:y});if(w)return new g(w)}h.version=e.tsParticles.version,(0,e.isSsr)()||(window.fireworks=h)})(),d})()));

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

/*! tsParticles Fireworks v3.0.0-beta.3 by Matteo Bruni */
/*! tsParticles Fireworks v3.0.0-beta.4 by Matteo Bruni */

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc