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.1.0 to 3.2.0

108.min.js

9

browser/fireworks.js
import { getRangeMax, getRangeMin, isNumber, isSsr, isString, setRangeValue, tsParticles, } from "@tsparticles/engine";
import { FireworkOptions } from "./FireworkOptions.js";
import { loadBasic } from "@tsparticles/basic";
import { loadDestroyUpdater } from "@tsparticles/updater-destroy";
import { loadEmittersPlugin } from "@tsparticles/plugin-emitters";
import { loadEmittersShapeSquare } from "@tsparticles/plugin-emitters-shape-square";
import { loadLifeUpdater } from "@tsparticles/updater-life";
import { loadRotateUpdater } from "@tsparticles/updater-rotate";
import { loadSoundsPlugin } from "@tsparticles/plugin-sounds";
import { loadTrailEffect } from "@tsparticles/effect-trail";
const minSplitCount = 2;

@@ -48,2 +40,3 @@ let initialized = false;

initializing = true;
const { loadEmittersPlugin } = await import("@tsparticles/plugin-emitters"), { loadEmittersShapeSquare } = await import("@tsparticles/plugin-emitters-shape-square"), { loadSoundsPlugin } = await import("@tsparticles/plugin-sounds"), { loadRotateUpdater } = await import("@tsparticles/updater-rotate"), { loadDestroyUpdater } = await import("@tsparticles/updater-destroy"), { loadLifeUpdater } = await import("@tsparticles/updater-life"), { loadTrailEffect } = await import("@tsparticles/effect-trail"), { loadBasic } = await import("@tsparticles/basic");
await loadEmittersPlugin(tsParticles, false);

@@ -50,0 +43,0 @@ await loadEmittersShapeSquare(tsParticles, false);

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -6,10 +29,2 @@ exports.fireworks = void 0;

const FireworkOptions_js_1 = require("./FireworkOptions.js");
const basic_1 = require("@tsparticles/basic");
const updater_destroy_1 = require("@tsparticles/updater-destroy");
const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
const plugin_emitters_shape_square_1 = require("@tsparticles/plugin-emitters-shape-square");
const updater_life_1 = require("@tsparticles/updater-life");
const updater_rotate_1 = require("@tsparticles/updater-rotate");
const plugin_sounds_1 = require("@tsparticles/plugin-sounds");
const effect_trail_1 = require("@tsparticles/effect-trail");
const minSplitCount = 2;

@@ -52,10 +67,11 @@ let initialized = false;

initializing = true;
await (0, plugin_emitters_1.loadEmittersPlugin)(engine_1.tsParticles, false);
await (0, plugin_emitters_shape_square_1.loadEmittersShapeSquare)(engine_1.tsParticles, false);
await (0, plugin_sounds_1.loadSoundsPlugin)(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, effect_trail_1.loadTrailEffect)(engine_1.tsParticles, false);
await (0, basic_1.loadBasic)(engine_1.tsParticles, false);
const { loadEmittersPlugin } = await Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-emitters"))), { loadEmittersShapeSquare } = await Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-emitters-shape-square"))), { loadSoundsPlugin } = await Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-sounds"))), { loadRotateUpdater } = await Promise.resolve().then(() => __importStar(require("@tsparticles/updater-rotate"))), { loadDestroyUpdater } = await Promise.resolve().then(() => __importStar(require("@tsparticles/updater-destroy"))), { loadLifeUpdater } = await Promise.resolve().then(() => __importStar(require("@tsparticles/updater-life"))), { loadTrailEffect } = await Promise.resolve().then(() => __importStar(require("@tsparticles/effect-trail"))), { loadBasic } = await Promise.resolve().then(() => __importStar(require("@tsparticles/basic")));
await loadEmittersPlugin(engine_1.tsParticles, false);
await loadEmittersShapeSquare(engine_1.tsParticles, false);
await loadSoundsPlugin(engine_1.tsParticles, false);
await loadRotateUpdater(engine_1.tsParticles, false);
await loadDestroyUpdater(engine_1.tsParticles, false);
await loadLifeUpdater(engine_1.tsParticles, false);
await loadTrailEffect(engine_1.tsParticles, false);
await loadBasic(engine_1.tsParticles, false);
initializing = false;

@@ -62,0 +78,0 @@ initialized = true;

import { getRangeMax, getRangeMin, isNumber, isSsr, isString, setRangeValue, tsParticles, } from "@tsparticles/engine";
import { FireworkOptions } from "./FireworkOptions.js";
import { loadBasic } from "@tsparticles/basic";
import { loadDestroyUpdater } from "@tsparticles/updater-destroy";
import { loadEmittersPlugin } from "@tsparticles/plugin-emitters";
import { loadEmittersShapeSquare } from "@tsparticles/plugin-emitters-shape-square";
import { loadLifeUpdater } from "@tsparticles/updater-life";
import { loadRotateUpdater } from "@tsparticles/updater-rotate";
import { loadSoundsPlugin } from "@tsparticles/plugin-sounds";
import { loadTrailEffect } from "@tsparticles/effect-trail";
const minSplitCount = 2;

@@ -48,2 +40,3 @@ let initialized = false;

initializing = true;
const { loadEmittersPlugin } = await import("@tsparticles/plugin-emitters"), { loadEmittersShapeSquare } = await import("@tsparticles/plugin-emitters-shape-square"), { loadSoundsPlugin } = await import("@tsparticles/plugin-sounds"), { loadRotateUpdater } = await import("@tsparticles/updater-rotate"), { loadDestroyUpdater } = await import("@tsparticles/updater-destroy"), { loadLifeUpdater } = await import("@tsparticles/updater-life"), { loadTrailEffect } = await import("@tsparticles/effect-trail"), { loadBasic } = await import("@tsparticles/basic");
await loadEmittersPlugin(tsParticles, false);

@@ -50,0 +43,0 @@ await loadEmittersShapeSquare(tsParticles, false);

{
"name": "@tsparticles/fireworks",
"version": "3.1.0",
"version": "3.2.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,11 +102,11 @@ "homepage": "https://particles.js.org",

"dependencies": {
"@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"
"@tsparticles/basic": "^3.2.0",
"@tsparticles/effect-trail": "^3.2.0",
"@tsparticles/engine": "^3.2.0",
"@tsparticles/plugin-emitters": "^3.2.0",
"@tsparticles/plugin-emitters-shape-square": "^3.2.0",
"@tsparticles/plugin-sounds": "^3.2.0",
"@tsparticles/updater-destroy": "^3.2.0",
"@tsparticles/updater-life": "^3.2.0",
"@tsparticles/updater-rotate": "^3.2.0"
},

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

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

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

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

* How to use? : Check the GitHub README
* v3.1.0
* v3.2.0
*/
/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
(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/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/effect-trail"));
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/effect-trail"), require("@tsparticles/updater-life"), require("@tsparticles/updater-destroy"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/plugin-emitters"));
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/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/effect-trail"], factory);
define(["@tsparticles/engine", "@tsparticles/basic", "@tsparticles/effect-trail", "@tsparticles/updater-life", "@tsparticles/updater-destroy", "@tsparticles/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/plugin-emitters-shape-square", "@tsparticles/plugin-emitters"], 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/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"]);
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/effect-trail"), require("@tsparticles/updater-life"), require("@tsparticles/updater-destroy"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/plugin-emitters")) : 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__59__, __WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__4__) => {
})(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__, __WEBPACK_EXTERNAL_MODULE__tsparticles_basic__, __WEBPACK_EXTERNAL_MODULE__tsparticles_effect_trail__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_life__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_destroy__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_rotate__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_sounds__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters_shape_square__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters__) => {
return /******/ (() => { // webpackBootstrap

@@ -24,62 +32,119 @@ /******/ "use strict";

/***/ 574:
/***/ "./dist/browser/FireworkOptions.js":
/*!*****************************************!*\
!*** ./dist/browser/FireworkOptions.js ***!
\*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FireworkOptions: () => (/* binding */ FireworkOptions)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass FireworkOptions {\n constructor() {\n this.background = \"none\";\n this.brightness = {\n min: -30,\n max: 30\n };\n this.colors = [\"#ff595e\", \"#ffca3a\", \"#8ac926\", \"#1982c4\", \"#6a4c93\"];\n this.gravity = 5;\n this.minHeight = {\n min: 10,\n max: 30\n };\n this.rate = 10;\n this.saturation = {\n min: -30,\n max: 30\n };\n this.sounds = true;\n this.speed = {\n min: 5,\n max: 15\n };\n this.splitCount = {\n min: 75,\n max: 150\n };\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.background !== undefined) {\n this.background = data.background;\n }\n if (data.colors !== undefined) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isArray)(data.colors)) {\n this.colors = [...data.colors];\n } else {\n this.colors = data.colors;\n }\n }\n if (data.brightness !== undefined) {\n this.brightness = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.brightness);\n }\n if (data.gravity !== undefined) {\n this.gravity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.gravity);\n }\n if (data.minHeight !== undefined) {\n this.minHeight = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.minHeight);\n }\n if (data.rate !== undefined) {\n this.rate = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.rate);\n }\n if (data.saturation !== undefined) {\n this.saturation = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.saturation);\n }\n if (data.sounds !== undefined) {\n this.sounds = data.sounds;\n }\n if (data.speed !== undefined) {\n this.speed = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.speed);\n }\n if (data.splitCount !== undefined) {\n this.splitCount = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.splitCount);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/./dist/browser/FireworkOptions.js?");
/***/ }),
/***/ "./dist/browser/fireworks.js":
/*!***********************************!*\
!*** ./dist/browser/fireworks.js ***!
\***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fireworks: () => (/* binding */ fireworks)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FireworkOptions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FireworkOptions.js */ \"./dist/browser/FireworkOptions.js\");\n\n\nconst minSplitCount = 2;\nlet initialized = false;\nlet initializing = false;\nconst explodeSoundCheck = args => {\n const data = args.data;\n return data.particle.shape === \"circle\" && !!data.particle.splitCount && data.particle.splitCount < minSplitCount;\n};\nclass FireworksInstance {\n constructor(container) {\n this._container = container;\n }\n pause() {\n this._container.pause();\n }\n play() {\n this._container.play();\n }\n stop() {\n this._container.stop();\n }\n}\nasync function initPlugins() {\n if (initialized) {\n return;\n }\n if (initializing) {\n return new Promise(resolve => {\n const timeout = 100,\n interval = setInterval(() => {\n if (!initialized) {\n return;\n }\n clearInterval(interval);\n resolve();\n }, timeout);\n });\n }\n initializing = true;\n const {\n loadEmittersPlugin\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-emitters */ \"@tsparticles/plugin-emitters\", 23)),\n {\n loadEmittersShapeSquare\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-emitters-shape-square */ \"@tsparticles/plugin-emitters-shape-square\", 23)),\n {\n loadSoundsPlugin\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-sounds */ \"@tsparticles/plugin-sounds\", 23)),\n {\n loadRotateUpdater\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-rotate */ \"@tsparticles/updater-rotate\", 23)),\n {\n loadDestroyUpdater\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-destroy */ \"@tsparticles/updater-destroy\", 23)),\n {\n loadLifeUpdater\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-life */ \"@tsparticles/updater-life\", 23)),\n {\n loadTrailEffect\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/effect-trail */ \"@tsparticles/effect-trail\", 23)),\n {\n loadBasic\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/basic */ \"@tsparticles/basic\", 23));\n await loadEmittersPlugin(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadEmittersShapeSquare(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadSoundsPlugin(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadRotateUpdater(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadDestroyUpdater(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadLifeUpdater(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadTrailEffect(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadBasic(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n initializing = false;\n initialized = true;\n}\nasync function fireworks(idOrOptions, sourceOptions) {\n await initPlugins();\n let id;\n const options = new _FireworkOptions_js__WEBPACK_IMPORTED_MODULE_1__.FireworkOptions();\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isString)(idOrOptions)) {\n id = idOrOptions;\n options.load(sourceOptions);\n } else {\n id = \"fireworks\";\n options.load(idOrOptions);\n }\n const identity = 1,\n particlesOptions = {\n detectRetina: true,\n background: {\n color: options.background\n },\n fpsLimit: 60,\n emitters: {\n direction: \"top\",\n life: {\n count: 0,\n duration: 0.1,\n delay: 0.1\n },\n rate: {\n delay: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNumber)(options.rate) ? identity / options.rate : {\n min: identity / (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeMin)(options.rate),\n max: identity / (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeMax)(options.rate)\n },\n quantity: 1\n },\n size: {\n width: 100,\n height: 0\n },\n position: {\n y: 100,\n x: 50\n }\n },\n particles: {\n number: {\n value: 0\n },\n color: {\n value: \"#fff\"\n },\n destroy: {\n mode: \"split\",\n bounds: {\n top: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.minHeight)\n },\n split: {\n sizeOffset: false,\n count: 1,\n factor: {\n value: 0.333333\n },\n rate: {\n value: options.splitCount\n },\n colorOffset: {\n s: options.saturation,\n l: options.brightness\n },\n particles: {\n color: {\n value: options.colors\n },\n number: {\n value: 0\n },\n opacity: {\n value: {\n min: 0.1,\n max: 1\n },\n animation: {\n enable: true,\n speed: 1,\n sync: false,\n startValue: \"max\",\n destroy: \"min\"\n }\n },\n effect: {\n type: \"trail\",\n options: {\n trail: {\n length: {\n min: 5,\n max: 10\n }\n }\n }\n },\n shape: {\n type: \"circle\"\n },\n size: {\n value: {\n min: 1,\n max: 2\n },\n animation: {\n enable: true,\n speed: 5,\n count: 1,\n sync: false,\n startValue: \"min\",\n destroy: \"none\"\n }\n },\n life: {\n count: 1,\n duration: {\n value: {\n min: 0.25,\n max: 0.5\n }\n }\n },\n move: {\n decay: {\n min: 0.05,\n max: 0.1\n },\n enable: true,\n gravity: {\n enable: true,\n inverse: false,\n acceleration: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.gravity)\n },\n speed: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.speed),\n direction: \"none\",\n outModes: \"destroy\"\n }\n }\n }\n },\n life: {\n count: 1\n },\n effect: {\n type: \"trail\",\n options: {\n trail: {\n length: {\n min: 10,\n max: 30\n },\n minWidth: 1,\n maxWidth: 1\n }\n }\n },\n shape: {\n type: \"circle\"\n },\n size: {\n value: 1\n },\n opacity: {\n value: 0.5\n },\n rotate: {\n path: true\n },\n move: {\n enable: true,\n gravity: {\n acceleration: 15,\n enable: true,\n inverse: true,\n maxSpeed: 100\n },\n speed: {\n min: 10,\n max: 20\n },\n outModes: {\n default: \"destroy\",\n top: \"none\"\n }\n }\n },\n sounds: {\n enable: options.sounds,\n events: [{\n event: \"particleRemoved\",\n filter: explodeSoundCheck,\n audio: [\"https://particles.js.org/audio/explosion0.mp3\", \"https://particles.js.org/audio/explosion1.mp3\", \"https://particles.js.org/audio/explosion2.mp3\"]\n }],\n volume: 50\n }\n };\n const container = await _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles.load({\n id,\n options: particlesOptions\n });\n if (!container) {\n return;\n }\n return new FireworksInstance(container);\n}\nfireworks.version = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles.version;\nif (!(0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isSsr)()) {\n window.fireworks = fireworks;\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/./dist/browser/fireworks.js?");
/***/ }),
/***/ "./dist/browser/index.js":
/*!*******************************!*\
!*** ./dist/browser/index.js ***!
\*******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fireworks: () => (/* reexport safe */ _fireworks_js__WEBPACK_IMPORTED_MODULE_0__.fireworks)\n/* harmony export */ });\n/* harmony import */ var _fireworks_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fireworks.js */ \"./dist/browser/fireworks.js\");\n\n\n//# sourceURL=webpack://@tsparticles/fireworks/./dist/browser/index.js?");
/***/ }),
/***/ "@tsparticles/basic":
/*!******************************************************************************************************************************!*\
!*** external {"commonjs":"@tsparticles/basic","commonjs2":"@tsparticles/basic","amd":"@tsparticles/basic","root":"window"} ***!
\******************************************************************************************************************************/
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__574__;
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_basic__;
/***/ }),
/***/ 4:
/***/ "@tsparticles/effect-trail":
/*!***************************************************************************************************************************************************!*\
!*** external {"commonjs":"@tsparticles/effect-trail","commonjs2":"@tsparticles/effect-trail","amd":"@tsparticles/effect-trail","root":"window"} ***!
\***************************************************************************************************************************************************/
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__4__;
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_effect_trail__;
/***/ }),
/***/ 533:
/***/ "@tsparticles/engine":
/*!*********************************************************************************************************************************!*\
!*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
\*********************************************************************************************************************************/
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__533__;
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
/***/ }),
/***/ 68:
/***/ "@tsparticles/plugin-emitters":
/*!************************************************************************************************************************************************************!*\
!*** external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"} ***!
\************************************************************************************************************************************************************/
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__68__;
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters__;
/***/ }),
/***/ 787:
/***/ "@tsparticles/plugin-emitters-shape-square":
/*!***************************************************************************************************************************************************************************************************!*\
!*** external {"commonjs":"@tsparticles/plugin-emitters-shape-square","commonjs2":"@tsparticles/plugin-emitters-shape-square","amd":"@tsparticles/plugin-emitters-shape-square","root":"window"} ***!
\***************************************************************************************************************************************************************************************************/
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters_shape_square__;
/***/ }),
/***/ 490:
/***/ "@tsparticles/plugin-sounds":
/*!******************************************************************************************************************************************************!*\
!*** external {"commonjs":"@tsparticles/plugin-sounds","commonjs2":"@tsparticles/plugin-sounds","amd":"@tsparticles/plugin-sounds","root":"window"} ***!
\******************************************************************************************************************************************************/
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__490__;
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_sounds__;
/***/ }),
/***/ 344:
/***/ "@tsparticles/updater-destroy":
/*!************************************************************************************************************************************************************!*\
!*** external {"commonjs":"@tsparticles/updater-destroy","commonjs2":"@tsparticles/updater-destroy","amd":"@tsparticles/updater-destroy","root":"window"} ***!
\************************************************************************************************************************************************************/
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__344__;
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_destroy__;
/***/ }),
/***/ 84:
/***/ "@tsparticles/updater-life":
/*!***************************************************************************************************************************************************!*\
!*** external {"commonjs":"@tsparticles/updater-life","commonjs2":"@tsparticles/updater-life","amd":"@tsparticles/updater-life","root":"window"} ***!
\***************************************************************************************************************************************************/
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__84__;
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_life__;
/***/ }),
/***/ 59:
/***/ "@tsparticles/updater-rotate":
/*!*********************************************************************************************************************************************************!*\
!*** external {"commonjs":"@tsparticles/updater-rotate","commonjs2":"@tsparticles/updater-rotate","amd":"@tsparticles/updater-rotate","root":"window"} ***!
\*********************************************************************************************************************************************************/
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__59__;
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_rotate__;

@@ -115,2 +180,44 @@ /***/ })

/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/create fake namespace object */
/******/ (() => {
/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
/******/ var leafPrototypes;
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 16: return value when it's Promise-like
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = this(value);
/******/ if(mode & 8) return value;
/******/ if(typeof value === 'object' && value) {
/******/ if((mode & 4) && value.__esModule) return value;
/******/ if((mode & 16) && typeof value.then === 'function') return value;
/******/ }
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ var def = {};
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
/******/ }
/******/ def['default'] = () => (value);
/******/ __webpack_require__.d(ns, def);
/******/ return ns;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */

@@ -145,375 +252,8 @@ /******/ (() => {

/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
fireworks: () => (/* reexport */ fireworks)
});
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"}
var engine_root_window_ = __webpack_require__(533);
;// CONCATENATED MODULE: ./dist/browser/FireworkOptions.js
class FireworkOptions {
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 = true;
this.speed = {
min: 5,
max: 15
};
this.splitCount = {
min: 75,
max: 150
};
}
load(data) {
if (!data) {
return;
}
if (data.background !== undefined) {
this.background = data.background;
}
if (data.colors !== undefined) {
if ((0,engine_root_window_.isArray)(data.colors)) {
this.colors = [...data.colors];
} else {
this.colors = data.colors;
}
}
if (data.brightness !== undefined) {
this.brightness = (0,engine_root_window_.setRangeValue)(data.brightness);
}
if (data.gravity !== undefined) {
this.gravity = (0,engine_root_window_.setRangeValue)(data.gravity);
}
if (data.minHeight !== undefined) {
this.minHeight = (0,engine_root_window_.setRangeValue)(data.minHeight);
}
if (data.rate !== undefined) {
this.rate = (0,engine_root_window_.setRangeValue)(data.rate);
}
if (data.saturation !== undefined) {
this.saturation = (0,engine_root_window_.setRangeValue)(data.saturation);
}
if (data.sounds !== undefined) {
this.sounds = data.sounds;
}
if (data.speed !== undefined) {
this.speed = (0,engine_root_window_.setRangeValue)(data.speed);
}
if (data.splitCount !== undefined) {
this.splitCount = (0,engine_root_window_.setRangeValue)(data.splitCount);
}
}
}
// 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"}
var updater_destroy_root_window_ = __webpack_require__(344);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"}
var plugin_emitters_root_window_ = __webpack_require__(68);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters-shape-square","commonjs2":"@tsparticles/plugin-emitters-shape-square","amd":"@tsparticles/plugin-emitters-shape-square","root":"window"}
var plugin_emitters_shape_square_root_window_ = __webpack_require__(787);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-life","commonjs2":"@tsparticles/updater-life","amd":"@tsparticles/updater-life","root":"window"}
var updater_life_root_window_ = __webpack_require__(84);
// 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"}
var plugin_sounds_root_window_ = __webpack_require__(490);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/effect-trail","commonjs2":"@tsparticles/effect-trail","amd":"@tsparticles/effect-trail","root":"window"}
var effect_trail_root_window_ = __webpack_require__(4);
;// CONCATENATED MODULE: ./dist/browser/fireworks.js
const minSplitCount = 2;
let initialized = false;
let initializing = false;
const explodeSoundCheck = args => {
const data = args.data;
return data.particle.shape === "circle" && !!data.particle.splitCount && data.particle.splitCount < minSplitCount;
};
class FireworksInstance {
constructor(container) {
this._container = container;
}
pause() {
this._container.pause();
}
play() {
this._container.play();
}
stop() {
this._container.stop();
}
}
async function initPlugins() {
if (initialized) {
return;
}
if (initializing) {
return new Promise(resolve => {
const timeout = 100,
interval = setInterval(() => {
if (!initialized) {
return;
}
clearInterval(interval);
resolve();
}, timeout);
});
}
initializing = true;
await (0,plugin_emitters_root_window_.loadEmittersPlugin)(engine_root_window_.tsParticles, false);
await (0,plugin_emitters_shape_square_root_window_.loadEmittersShapeSquare)(engine_root_window_.tsParticles, false);
await (0,plugin_sounds_root_window_.loadSoundsPlugin)(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,effect_trail_root_window_.loadTrailEffect)(engine_root_window_.tsParticles, false);
await (0,basic_root_window_.loadBasic)(engine_root_window_.tsParticles, false);
initializing = false;
initialized = true;
}
async function fireworks(idOrOptions, sourceOptions) {
await initPlugins();
let id;
const options = new FireworkOptions();
if ((0,engine_root_window_.isString)(idOrOptions)) {
id = idOrOptions;
options.load(sourceOptions);
} else {
id = "fireworks";
options.load(idOrOptions);
}
const identity = 1,
particlesOptions = {
detectRetina: true,
background: {
color: options.background
},
fpsLimit: 60,
emitters: {
direction: "top",
life: {
count: 0,
duration: 0.1,
delay: 0.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
}
},
particles: {
number: {
value: 0
},
color: {
value: "#fff"
},
destroy: {
mode: "split",
bounds: {
top: (0,engine_root_window_.setRangeValue)(options.minHeight)
},
split: {
sizeOffset: false,
count: 1,
factor: {
value: 0.333333
},
rate: {
value: options.splitCount
},
colorOffset: {
s: options.saturation,
l: options.brightness
},
particles: {
color: {
value: options.colors
},
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: {
value: {
min: 0.25,
max: 0.5
}
}
},
move: {
decay: {
min: 0.05,
max: 0.1
},
enable: true,
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
},
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"
}
}
},
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
}
};
const container = await engine_root_window_.tsParticles.load({
id,
options: particlesOptions
});
if (!container) {
return;
}
return new FireworksInstance(container);
}
fireworks.version = engine_root_window_.tsParticles.version;
if (!(0,engine_root_window_.isSsr)()) {
window.fireworks = fireworks;
}
;// CONCATENATED MODULE: ./dist/browser/index.js
})();
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval devtool is used.
/******/ var __webpack_exports__ = __webpack_require__("./dist/browser/index.js");
/******/
/******/ return __webpack_exports__;

@@ -520,0 +260,0 @@ /******/ })()

/*! 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/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})()));
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/effect-trail"),require("@tsparticles/updater-life"),require("@tsparticles/updater-destroy"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/plugin-emitters"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/basic","@tsparticles/effect-trail","@tsparticles/updater-life","@tsparticles/updater-destroy","@tsparticles/updater-rotate","@tsparticles/plugin-sounds","@tsparticles/plugin-emitters-shape-square","@tsparticles/plugin-emitters"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/effect-trail"),require("@tsparticles/updater-life"),require("@tsparticles/updater-destroy"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/plugin-emitters")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(this,((e,t,i,r,s,a,o,n,l)=>(()=>{var p,u,c={574:e=>{e.exports=t},4:e=>{e.exports=i},533:t=>{t.exports=e},68:e=>{e.exports=l},787:e=>{e.exports=n},490:e=>{e.exports=o},344:e=>{e.exports=s},84:e=>{e.exports=r},59:e=>{e.exports=a}},d={};function f(e){var t=d[e];if(void 0!==t)return t.exports;var i=d[e]={exports:{}};return c[e](i,i.exports,f),i.exports}u=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var i=Object.create(null);f.r(i);var r={};p=p||[null,u({}),u([]),u(u)];for(var s=2&t&&e;"object"==typeof s&&!~p.indexOf(s);s=u(s))Object.getOwnPropertyNames(s).forEach((t=>r[t]=()=>e[t]));return r.default=()=>e,f.d(i,r),i},f.d=(e,t)=>{for(var i in t)f.o(t,i)&&!f.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var m={};return(()=>{f.r(m),f.d(m,{fireworks:()=>o});var e=f(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)))}}let i=!1,r=!1;const s=e=>{const t=e.data;return"circle"===t.particle.shape&&!!t.particle.splitCount&&t.particle.splitCount<2};class a{constructor(e){this._container=e}pause(){this._container.pause()}play(){this._container.play()}stop(){this._container.stop()}}async function o(o,n){let l;await async function(){if(i)return;if(r)return new Promise((e=>{const t=setInterval((()=>{i&&(clearInterval(t),e())}),100)}));r=!0;const{loadEmittersPlugin:t}=await Promise.resolve().then(f.t.bind(f,68,23)),{loadEmittersShapeSquare:s}=await Promise.resolve().then(f.t.bind(f,787,23)),{loadSoundsPlugin:a}=await Promise.resolve().then(f.t.bind(f,490,23)),{loadRotateUpdater:o}=await Promise.resolve().then(f.t.bind(f,59,23)),{loadDestroyUpdater:n}=await Promise.resolve().then(f.t.bind(f,344,23)),{loadLifeUpdater:l}=await Promise.resolve().then(f.t.bind(f,84,23)),{loadTrailEffect:p}=await Promise.resolve().then(f.t.bind(f,4,23)),{loadBasic:u}=await Promise.resolve().then(f.t.bind(f,574,23));await t(e.tsParticles,!1),await s(e.tsParticles,!1),await a(e.tsParticles,!1),await o(e.tsParticles,!1),await n(e.tsParticles,!1),await l(e.tsParticles,!1),await p(e.tsParticles,!1),await u(e.tsParticles,!1),r=!1,i=!0}();const p=new t;(0,e.isString)(o)?(l=o,p.load(n)):(l="fireworks",p.load(o));const u={detectRetina:!0,background:{color:p.background},fpsLimit:60,emitters:{direction:"top",life:{count:0,duration:.1,delay:.1},rate:{delay:(0,e.isNumber)(p.rate)?1/p.rate:{min:1/(0,e.getRangeMin)(p.rate),max:1/(0,e.getRangeMax)(p.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)(p.minHeight)},split:{sizeOffset:!1,count:1,factor:{value:.333333},rate:{value:p.splitCount},colorOffset:{s:p.saturation,l:p.brightness},particles:{color:{value:p.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)(p.gravity)},speed:(0,e.setRangeValue)(p.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:p.sounds,events:[{event:"particleRemoved",filter:s,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}},c=await e.tsParticles.load({id:l,options:u});if(c)return new a(c)}o.version=e.tsParticles.version,(0,e.isSsr)()||(window.fireworks=o)})(),m})()));

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

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

@@ -17,2 +17,3 @@ import { type Container, type RecursivePartial } from "@tsparticles/engine";

}
export type { FireworksInstance };
export declare function fireworks(idOrOptions: string | RecursivePartial<IFireworkOptions>, sourceOptions?: RecursivePartial<IFireworkOptions>): Promise<FireworksInstance | undefined>;

@@ -22,2 +23,1 @@ export declare namespace fireworks {

}
export {};

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

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
(function (factory) {

@@ -7,6 +30,7 @@ if (typeof module === "object" && typeof module.exports === "object") {

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/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/effect-trail"], factory);
define(["require", "exports", "@tsparticles/engine", "./FireworkOptions.js"], factory);
}
})(function (require, exports) {
"use strict";
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -16,10 +40,2 @@ exports.fireworks = void 0;

const FireworkOptions_js_1 = require("./FireworkOptions.js");
const basic_1 = require("@tsparticles/basic");
const updater_destroy_1 = require("@tsparticles/updater-destroy");
const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
const plugin_emitters_shape_square_1 = require("@tsparticles/plugin-emitters-shape-square");
const updater_life_1 = require("@tsparticles/updater-life");
const updater_rotate_1 = require("@tsparticles/updater-rotate");
const plugin_sounds_1 = require("@tsparticles/plugin-sounds");
const effect_trail_1 = require("@tsparticles/effect-trail");
const minSplitCount = 2;

@@ -62,10 +78,11 @@ let initialized = false;

initializing = true;
await (0, plugin_emitters_1.loadEmittersPlugin)(engine_1.tsParticles, false);
await (0, plugin_emitters_shape_square_1.loadEmittersShapeSquare)(engine_1.tsParticles, false);
await (0, plugin_sounds_1.loadSoundsPlugin)(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, effect_trail_1.loadTrailEffect)(engine_1.tsParticles, false);
await (0, basic_1.loadBasic)(engine_1.tsParticles, false);
const { loadEmittersPlugin } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-emitters"))) : new Promise((resolve_1, reject_1) => { require(["@tsparticles/plugin-emitters"], resolve_1, reject_1); }).then(__importStar)), { loadEmittersShapeSquare } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-emitters-shape-square"))) : new Promise((resolve_2, reject_2) => { require(["@tsparticles/plugin-emitters-shape-square"], resolve_2, reject_2); }).then(__importStar)), { loadSoundsPlugin } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-sounds"))) : new Promise((resolve_3, reject_3) => { require(["@tsparticles/plugin-sounds"], resolve_3, reject_3); }).then(__importStar)), { loadRotateUpdater } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-rotate"))) : new Promise((resolve_4, reject_4) => { require(["@tsparticles/updater-rotate"], resolve_4, reject_4); }).then(__importStar)), { loadDestroyUpdater } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-destroy"))) : new Promise((resolve_5, reject_5) => { require(["@tsparticles/updater-destroy"], resolve_5, reject_5); }).then(__importStar)), { loadLifeUpdater } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-life"))) : new Promise((resolve_6, reject_6) => { require(["@tsparticles/updater-life"], resolve_6, reject_6); }).then(__importStar)), { loadTrailEffect } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/effect-trail"))) : new Promise((resolve_7, reject_7) => { require(["@tsparticles/effect-trail"], resolve_7, reject_7); }).then(__importStar)), { loadBasic } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/basic"))) : new Promise((resolve_8, reject_8) => { require(["@tsparticles/basic"], resolve_8, reject_8); }).then(__importStar));
await loadEmittersPlugin(engine_1.tsParticles, false);
await loadEmittersShapeSquare(engine_1.tsParticles, false);
await loadSoundsPlugin(engine_1.tsParticles, false);
await loadRotateUpdater(engine_1.tsParticles, false);
await loadDestroyUpdater(engine_1.tsParticles, false);
await loadLifeUpdater(engine_1.tsParticles, false);
await loadTrailEffect(engine_1.tsParticles, false);
await loadBasic(engine_1.tsParticles, false);
initializing = false;

@@ -72,0 +89,0 @@ initialized = true;

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