Socket
Socket
Sign inDemoInstall

@tsparticles/fireworks

Package Overview
Dependencies
15
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-beta.0 to 3.0.0-beta.1

browser/package.json

2

browser/fireworks.js
import { getRangeMax, getRangeMin, isNumber, isSsr, isString, setRangeValue, tsParticles, } from "@tsparticles/engine";
import { FireworkOptions } from "./FireworkOptions";
import { FireworkOptions } from "./FireworkOptions.js";
import { loadBasic } from "@tsparticles/basic";

@@ -4,0 +4,0 @@ import { loadDestroyUpdater } from "@tsparticles/updater-destroy";

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

export * from "./fireworks";
export * from "./fireworks.js";

@@ -5,3 +5,3 @@ "use strict";

const engine_1 = require("@tsparticles/engine");
const FireworkOptions_1 = require("./FireworkOptions");
const FireworkOptions_js_1 = require("./FireworkOptions.js");
const basic_1 = require("@tsparticles/basic");

@@ -65,3 +65,3 @@ const updater_destroy_1 = require("@tsparticles/updater-destroy");

let id;
const options = new FireworkOptions_1.FireworkOptions();
const options = new FireworkOptions_js_1.FireworkOptions();
if ((0, engine_1.isString)(idOrOptions)) {

@@ -68,0 +68,0 @@ id = idOrOptions;

@@ -17,2 +17,2 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./fireworks"), exports);
__exportStar(require("./fireworks.js"), exports);
import { getRangeMax, getRangeMin, isNumber, isSsr, isString, setRangeValue, tsParticles, } from "@tsparticles/engine";
import { FireworkOptions } from "./FireworkOptions";
import { FireworkOptions } from "./FireworkOptions.js";
import { loadBasic } from "@tsparticles/basic";

@@ -4,0 +4,0 @@ import { loadDestroyUpdater } from "@tsparticles/updater-destroy";

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

export * from "./fireworks";
export * from "./fireworks.js";
{
"name": "@tsparticles/fireworks",
"version": "3.0.0-beta.0",
"version": "3.0.0-beta.1",
"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.",

@@ -83,18 +83,30 @@ "homepage": "https://particles.js.org",

],
"jsdelivr": "tsparticles.fireworks.bundle.min.js",
"unpkg": "tsparticles.fireworks.bundle.min.js",
"sideEffects": false,
"browser": "browser/index.js",
"main": "cjs/index.js",
"module": "esm/index.js",
"jsdelivr": "tsparticles.fireworks.bundle.min.js",
"unpkg": "tsparticles.fireworks.bundle.min.js",
"types": "types/index.d.ts",
"sideEffects": false,
"exports": {
".": {
"types": "./types/index.d.ts",
"browser": "./browser/index.js",
"import": "./esm/index.js",
"require": "./cjs/index.js",
"umd": "./umd/index.js",
"default": "./cjs/index.js"
},
"./package.json": "./package.json"
},
"dependencies": {
"@tsparticles/basic": "^3.0.0-beta.0",
"@tsparticles/engine": "^3.0.0-beta.0",
"@tsparticles/plugin-emitters": "^3.0.0-beta.0",
"@tsparticles/plugin-sounds": "^3.0.0-beta.0",
"@tsparticles/shape-line": "^3.0.0-beta.0",
"@tsparticles/updater-destroy": "^3.0.0-beta.0",
"@tsparticles/updater-life": "^3.0.0-beta.0",
"@tsparticles/updater-rotate": "^3.0.0-beta.0",
"@tsparticles/updater-stroke-color": "^3.0.0-beta.0"
"@tsparticles/basic": "^3.0.0-beta.1",
"@tsparticles/engine": "^3.0.0-beta.1",
"@tsparticles/plugin-emitters": "^3.0.0-beta.1",
"@tsparticles/plugin-sounds": "^3.0.0-beta.1",
"@tsparticles/shape-line": "^3.0.0-beta.1",
"@tsparticles/updater-destroy": "^3.0.0-beta.1",
"@tsparticles/updater-life": "^3.0.0-beta.1",
"@tsparticles/updater-rotate": "^3.0.0-beta.1",
"@tsparticles/updater-stroke-color": "^3.0.0-beta.1"
},

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

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

/*! tsParticles Fireworks v3.0.0-beta.0 by Matteo Bruni */
/*! tsParticles Fireworks v3.0.0-beta.1 by Matteo Bruni */

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

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

@@ -262,3 +262,3 @@ /******/ "use strict";

var updater_size_root_window_ = __webpack_require__(2);
;// CONCATENATED MODULE: ../basic/dist/esm/index.js
;// CONCATENATED MODULE: ../basic/dist/browser/index.js

@@ -287,3 +287,3 @@

var shape_line_root_window_ = __webpack_require__(137);
;// CONCATENATED MODULE: ../../updaters/rotate/dist/esm/Options/Classes/RotateAnimation.js
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/Options/Classes/RotateAnimation.js

@@ -315,3 +315,3 @@ class RotateAnimation {

}
;// CONCATENATED MODULE: ../../updaters/rotate/dist/esm/Options/Classes/Rotate.js
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/Options/Classes/Rotate.js

@@ -341,3 +341,3 @@

}
;// CONCATENATED MODULE: ../../updaters/rotate/dist/esm/RotateUpdater.js
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/RotateUpdater.js

@@ -438,3 +438,3 @@

}
;// CONCATENATED MODULE: ../../updaters/rotate/dist/esm/index.js
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/index.js

@@ -441,0 +441,0 @@ async function loadRotateUpdater(engine, refresh = 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/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/plugin-sounds"),require("@tsparticles/updater-stroke-color"),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"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/updater-destroy","@tsparticles/plugin-emitters","@tsparticles/updater-life","@tsparticles/shape-line","@tsparticles/plugin-sounds","@tsparticles/updater-stroke-color","@tsparticles/move-base","@tsparticles/shape-circle","@tsparticles/updater-color","@tsparticles/updater-opacity","@tsparticles/updater-out-modes","@tsparticles/updater-size"],t);else{var a="object"==typeof exports?t(require("@tsparticles/engine"),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"),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")):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=n},68:e=>{e.exports=a},490:e=>{e.exports=r},163:e=>{e.exports=l},137:e=>{e.exports=s},501:e=>{e.exports=c},344:e=>{e.exports=t},84:e=>{e.exports=i},686:e=>{e.exports=p},290:e=>{e.exports=d},2:e=>{e.exports=u},204:e=>{e.exports=o}},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/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})()));

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

/*! tsParticles Fireworks v3.0.0-beta.0 by Matteo Bruni */
/*! tsParticles Fireworks v3.0.0-beta.1 by Matteo Bruni */
import { type IOptionLoader, type RangeValue, type RecursivePartial, type SingleOrMultiple } from "@tsparticles/engine";
import type { IFireworkOptions } from "./IFireworkOptions";
import type { IFireworkOptions } from "./IFireworkOptions.js";
export declare class FireworkOptions implements IFireworkOptions, IOptionLoader<IFireworkOptions> {

@@ -4,0 +4,0 @@ brightness: RangeValue;

import { type Container, type RecursivePartial } from "@tsparticles/engine";
import type { IFireworkOptions } from "./IFireworkOptions";
import type { IFireworkOptions } from "./IFireworkOptions.js";
declare global {

@@ -4,0 +4,0 @@ interface Window {

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

import type { IFireworkOptions } from "./IFireworkOptions";
import type { IFireworkOptions } from "./IFireworkOptions.js";
import type { RecursivePartial } from "@tsparticles/engine";
export type FireworkOptions = RecursivePartial<IFireworkOptions>;
export * from "./fireworks";
export * from "./fireworks.js";

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

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@tsparticles/engine", "./FireworkOptions", "@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);
define(["require", "exports", "@tsparticles/engine", "./FireworkOptions.js", "@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);
}

@@ -15,3 +15,3 @@ })(function (require, exports) {

const engine_1 = require("@tsparticles/engine");
const FireworkOptions_1 = require("./FireworkOptions");
const FireworkOptions_js_1 = require("./FireworkOptions.js");
const basic_1 = require("@tsparticles/basic");

@@ -75,3 +75,3 @@ const updater_destroy_1 = require("@tsparticles/updater-destroy");

let id;
const options = new FireworkOptions_1.FireworkOptions();
const options = new FireworkOptions_js_1.FireworkOptions();
if ((0, engine_1.isString)(idOrOptions)) {

@@ -78,0 +78,0 @@ id = idOrOptions;

@@ -21,3 +21,3 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./fireworks"], factory);
define(["require", "exports", "./fireworks.js"], factory);
}

@@ -27,3 +27,3 @@ })(function (require, exports) {

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./fireworks"), exports);
__exportStar(require("./fireworks.js"), exports);
});

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