tsparticles-preset-fireworks
Advanced tools
Comparing version 2.6.0 to 2.7.0
@@ -12,2 +12,3 @@ import { loadAngleUpdater } from "tsparticles-updater-angle"; | ||
import { loadSizeUpdater } from "tsparticles-updater-size"; | ||
import { loadSoundsPlugin } from "tsparticles-plugin-sounds"; | ||
import { loadStrokeColorUpdater } from "tsparticles-updater-stroke-color"; | ||
@@ -18,2 +19,3 @@ import { options } from "./options"; | ||
await loadEmittersPlugin(engine); | ||
await loadSoundsPlugin(engine); | ||
await loadCircleShape(engine); | ||
@@ -20,0 +22,0 @@ await loadLineShape(engine); |
import { rgbToHsl, setRangeValue, stringToRgb, } from "tsparticles-engine"; | ||
const explodeSoundCheck = (args) => { | ||
const data = args.data; | ||
return data.particle.shape === "line"; | ||
}; | ||
const fixRange = (value, min, max) => { | ||
@@ -20,3 +24,3 @@ const diffSMax = value.max > max ? value.max - max : 0; | ||
} | ||
const hsl = rgbToHsl(rgb), sRange = fixRange({ min: hsl.s - 20, max: hsl.s + 20 }, 0, 100), lRange = fixRange({ min: hsl.l - 20, max: hsl.l + 20 }, 0, 100); | ||
const hsl = rgbToHsl(rgb), sRange = fixRange({ min: hsl.s - 30, max: hsl.s + 30 }, 0, 100), lRange = fixRange({ min: hsl.l - 30, max: hsl.l + 30 }, 0, 100); | ||
return { | ||
@@ -36,5 +40,2 @@ color: { | ||
}, | ||
collisions: { | ||
enable: false, | ||
}, | ||
opacity: { | ||
@@ -77,3 +78,3 @@ value: { | ||
move: { | ||
decay: 0.05, | ||
decay: { min: 0.075, max: 0.1 }, | ||
enable: true, | ||
@@ -85,3 +86,3 @@ gravity: { | ||
}, | ||
speed: { min: 5, max: 10 }, | ||
speed: { min: 5, max: 15 }, | ||
direction: "none", | ||
@@ -107,3 +108,3 @@ outModes: "destroy", | ||
rate: { | ||
delay: 0.15, | ||
delay: 0.05, | ||
quantity: 1, | ||
@@ -126,3 +127,7 @@ }, | ||
mode: "split", | ||
bounds: { | ||
top: { min: 10, max: 30 }, | ||
}, | ||
split: { | ||
sizeOffset: false, | ||
count: 1, | ||
@@ -133,3 +138,3 @@ factor: { | ||
rate: { | ||
value: 100, | ||
value: { min: 75, max: 150 }, | ||
}, | ||
@@ -190,2 +195,17 @@ particles: fireworksOptions, | ||
}, | ||
sounds: { | ||
enable: true, | ||
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, | ||
}, | ||
}; |
@@ -24,2 +24,3 @@ "use strict"; | ||
const tsparticles_updater_size_1 = require("tsparticles-updater-size"); | ||
const tsparticles_plugin_sounds_1 = require("tsparticles-plugin-sounds"); | ||
const tsparticles_updater_stroke_color_1 = require("tsparticles-updater-stroke-color"); | ||
@@ -31,2 +32,3 @@ const options_1 = require("./options"); | ||
yield (0, tsparticles_plugin_emitters_1.loadEmittersPlugin)(engine); | ||
yield (0, tsparticles_plugin_sounds_1.loadSoundsPlugin)(engine); | ||
yield (0, tsparticles_shape_circle_1.loadCircleShape)(engine); | ||
@@ -33,0 +35,0 @@ yield (0, tsparticles_shape_line_1.loadLineShape)(engine); |
@@ -5,2 +5,6 @@ "use strict"; | ||
const tsparticles_engine_1 = require("tsparticles-engine"); | ||
const explodeSoundCheck = (args) => { | ||
const data = args.data; | ||
return data.particle.shape === "line"; | ||
}; | ||
const fixRange = (value, min, max) => { | ||
@@ -24,3 +28,3 @@ const diffSMax = value.max > max ? value.max - max : 0; | ||
} | ||
const hsl = (0, tsparticles_engine_1.rgbToHsl)(rgb), sRange = fixRange({ min: hsl.s - 20, max: hsl.s + 20 }, 0, 100), lRange = fixRange({ min: hsl.l - 20, max: hsl.l + 20 }, 0, 100); | ||
const hsl = (0, tsparticles_engine_1.rgbToHsl)(rgb), sRange = fixRange({ min: hsl.s - 30, max: hsl.s + 30 }, 0, 100), lRange = fixRange({ min: hsl.l - 30, max: hsl.l + 30 }, 0, 100); | ||
return { | ||
@@ -40,5 +44,2 @@ color: { | ||
}, | ||
collisions: { | ||
enable: false, | ||
}, | ||
opacity: { | ||
@@ -81,3 +82,3 @@ value: { | ||
move: { | ||
decay: 0.05, | ||
decay: { min: 0.075, max: 0.1 }, | ||
enable: true, | ||
@@ -89,3 +90,3 @@ gravity: { | ||
}, | ||
speed: { min: 5, max: 10 }, | ||
speed: { min: 5, max: 15 }, | ||
direction: "none", | ||
@@ -111,3 +112,3 @@ outModes: "destroy", | ||
rate: { | ||
delay: 0.15, | ||
delay: 0.05, | ||
quantity: 1, | ||
@@ -130,3 +131,7 @@ }, | ||
mode: "split", | ||
bounds: { | ||
top: { min: 10, max: 30 }, | ||
}, | ||
split: { | ||
sizeOffset: false, | ||
count: 1, | ||
@@ -137,3 +142,3 @@ factor: { | ||
rate: { | ||
value: 100, | ||
value: { min: 75, max: 150 }, | ||
}, | ||
@@ -194,2 +199,17 @@ particles: fireworksOptions, | ||
}, | ||
sounds: { | ||
enable: true, | ||
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, | ||
}, | ||
}; |
@@ -12,2 +12,3 @@ import { loadAngleUpdater } from "tsparticles-updater-angle"; | ||
import { loadSizeUpdater } from "tsparticles-updater-size"; | ||
import { loadSoundsPlugin } from "tsparticles-plugin-sounds"; | ||
import { loadStrokeColorUpdater } from "tsparticles-updater-stroke-color"; | ||
@@ -18,2 +19,3 @@ import { options } from "./options"; | ||
await loadEmittersPlugin(engine); | ||
await loadSoundsPlugin(engine); | ||
await loadCircleShape(engine); | ||
@@ -20,0 +22,0 @@ await loadLineShape(engine); |
import { rgbToHsl, setRangeValue, stringToRgb, } from "tsparticles-engine"; | ||
const explodeSoundCheck = (args) => { | ||
const data = args.data; | ||
return data.particle.shape === "line"; | ||
}; | ||
const fixRange = (value, min, max) => { | ||
@@ -20,3 +24,3 @@ const diffSMax = value.max > max ? value.max - max : 0; | ||
} | ||
const hsl = rgbToHsl(rgb), sRange = fixRange({ min: hsl.s - 20, max: hsl.s + 20 }, 0, 100), lRange = fixRange({ min: hsl.l - 20, max: hsl.l + 20 }, 0, 100); | ||
const hsl = rgbToHsl(rgb), sRange = fixRange({ min: hsl.s - 30, max: hsl.s + 30 }, 0, 100), lRange = fixRange({ min: hsl.l - 30, max: hsl.l + 30 }, 0, 100); | ||
return { | ||
@@ -36,5 +40,2 @@ color: { | ||
}, | ||
collisions: { | ||
enable: false, | ||
}, | ||
opacity: { | ||
@@ -77,3 +78,3 @@ value: { | ||
move: { | ||
decay: 0.05, | ||
decay: { min: 0.075, max: 0.1 }, | ||
enable: true, | ||
@@ -85,3 +86,3 @@ gravity: { | ||
}, | ||
speed: { min: 5, max: 10 }, | ||
speed: { min: 5, max: 15 }, | ||
direction: "none", | ||
@@ -107,3 +108,3 @@ outModes: "destroy", | ||
rate: { | ||
delay: 0.15, | ||
delay: 0.05, | ||
quantity: 1, | ||
@@ -126,3 +127,7 @@ }, | ||
mode: "split", | ||
bounds: { | ||
top: { min: 10, max: 30 }, | ||
}, | ||
split: { | ||
sizeOffset: false, | ||
count: 1, | ||
@@ -133,3 +138,3 @@ factor: { | ||
rate: { | ||
value: 100, | ||
value: { min: 75, max: 150 }, | ||
}, | ||
@@ -190,2 +195,17 @@ particles: fireworksOptions, | ||
}, | ||
sounds: { | ||
enable: true, | ||
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, | ||
}, | ||
}; |
{ | ||
"name": "tsparticles-preset-fireworks", | ||
"version": "2.6.0", | ||
"version": "2.7.0", | ||
"description": "tsParticles fireworks preset", | ||
@@ -86,16 +86,17 @@ "homepage": "https://particles.js.org", | ||
"dependencies": { | ||
"tsparticles-engine": "^2.6.0", | ||
"tsparticles-move-base": "^2.6.0", | ||
"tsparticles-plugin-emitters": "^2.6.0", | ||
"tsparticles-shape-circle": "^2.6.0", | ||
"tsparticles-shape-line": "^2.6.0", | ||
"tsparticles-updater-angle": "^2.6.0", | ||
"tsparticles-updater-color": "^2.6.0", | ||
"tsparticles-updater-destroy": "^2.6.0", | ||
"tsparticles-updater-life": "^2.6.0", | ||
"tsparticles-updater-opacity": "^2.6.0", | ||
"tsparticles-updater-out-modes": "^2.6.0", | ||
"tsparticles-updater-size": "^2.6.0", | ||
"tsparticles-updater-stroke-color": "^2.6.0" | ||
"tsparticles-engine": "^2.7.0", | ||
"tsparticles-move-base": "^2.7.0", | ||
"tsparticles-plugin-emitters": "^2.7.0", | ||
"tsparticles-plugin-sounds": "^2.7.0", | ||
"tsparticles-shape-circle": "^2.7.0", | ||
"tsparticles-shape-line": "^2.7.0", | ||
"tsparticles-updater-angle": "^2.7.0", | ||
"tsparticles-updater-color": "^2.7.0", | ||
"tsparticles-updater-destroy": "^2.7.0", | ||
"tsparticles-updater-life": "^2.7.0", | ||
"tsparticles-updater-opacity": "^2.7.0", | ||
"tsparticles-updater-out-modes": "^2.7.0", | ||
"tsparticles-updater-size": "^2.7.0", | ||
"tsparticles-updater-stroke-color": "^2.7.0" | ||
} | ||
} |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v2.6.0 | ||
* v2.7.0 | ||
*/ |
@@ -7,14 +7,14 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v2.6.0 | ||
* v2.7.0 | ||
*/ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
module.exports = factory(require("tsparticles-updater-angle"), require("tsparticles-move-base"), require("tsparticles-shape-circle"), require("tsparticles-updater-color"), require("tsparticles-updater-destroy"), require("tsparticles-plugin-emitters"), require("tsparticles-updater-life"), require("tsparticles-shape-line"), require("tsparticles-updater-opacity"), require("tsparticles-updater-out-modes"), require("tsparticles-updater-size"), require("tsparticles-updater-stroke-color"), require("tsparticles-engine")); | ||
module.exports = factory(require("tsparticles-updater-angle"), require("tsparticles-move-base"), require("tsparticles-shape-circle"), require("tsparticles-updater-color"), require("tsparticles-updater-destroy"), require("tsparticles-plugin-emitters"), require("tsparticles-updater-life"), require("tsparticles-shape-line"), require("tsparticles-updater-opacity"), require("tsparticles-updater-out-modes"), require("tsparticles-updater-size"), require("tsparticles-plugin-sounds"), require("tsparticles-updater-stroke-color"), require("tsparticles-engine")); | ||
else if(typeof define === 'function' && define.amd) | ||
define(["tsparticles-updater-angle", "tsparticles-move-base", "tsparticles-shape-circle", "tsparticles-updater-color", "tsparticles-updater-destroy", "tsparticles-plugin-emitters", "tsparticles-updater-life", "tsparticles-shape-line", "tsparticles-updater-opacity", "tsparticles-updater-out-modes", "tsparticles-updater-size", "tsparticles-updater-stroke-color", "tsparticles-engine"], factory); | ||
define(["tsparticles-updater-angle", "tsparticles-move-base", "tsparticles-shape-circle", "tsparticles-updater-color", "tsparticles-updater-destroy", "tsparticles-plugin-emitters", "tsparticles-updater-life", "tsparticles-shape-line", "tsparticles-updater-opacity", "tsparticles-updater-out-modes", "tsparticles-updater-size", "tsparticles-plugin-sounds", "tsparticles-updater-stroke-color", "tsparticles-engine"], factory); | ||
else { | ||
var a = typeof exports === 'object' ? factory(require("tsparticles-updater-angle"), require("tsparticles-move-base"), require("tsparticles-shape-circle"), require("tsparticles-updater-color"), require("tsparticles-updater-destroy"), require("tsparticles-plugin-emitters"), require("tsparticles-updater-life"), require("tsparticles-shape-line"), require("tsparticles-updater-opacity"), require("tsparticles-updater-out-modes"), require("tsparticles-updater-size"), require("tsparticles-updater-stroke-color"), require("tsparticles-engine")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]); | ||
var a = typeof exports === 'object' ? factory(require("tsparticles-updater-angle"), require("tsparticles-move-base"), require("tsparticles-shape-circle"), require("tsparticles-updater-color"), require("tsparticles-updater-destroy"), require("tsparticles-plugin-emitters"), require("tsparticles-updater-life"), require("tsparticles-shape-line"), require("tsparticles-updater-opacity"), require("tsparticles-updater-out-modes"), require("tsparticles-updater-size"), require("tsparticles-plugin-sounds"), require("tsparticles-updater-stroke-color"), require("tsparticles-engine")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]); | ||
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; | ||
} | ||
})(this, (__WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__565__, __WEBPACK_EXTERNAL_MODULE__851__, __WEBPACK_EXTERNAL_MODULE__613__, __WEBPACK_EXTERNAL_MODULE__731__, __WEBPACK_EXTERNAL_MODULE__716__, __WEBPACK_EXTERNAL_MODULE__86__, __WEBPACK_EXTERNAL_MODULE__598__, __WEBPACK_EXTERNAL_MODULE__515__, __WEBPACK_EXTERNAL_MODULE__509__, __WEBPACK_EXTERNAL_MODULE__694__, __WEBPACK_EXTERNAL_MODULE__226__, __WEBPACK_EXTERNAL_MODULE__961__) => { | ||
})(this, (__WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__565__, __WEBPACK_EXTERNAL_MODULE__851__, __WEBPACK_EXTERNAL_MODULE__613__, __WEBPACK_EXTERNAL_MODULE__731__, __WEBPACK_EXTERNAL_MODULE__716__, __WEBPACK_EXTERNAL_MODULE__86__, __WEBPACK_EXTERNAL_MODULE__598__, __WEBPACK_EXTERNAL_MODULE__515__, __WEBPACK_EXTERNAL_MODULE__509__, __WEBPACK_EXTERNAL_MODULE__694__, __WEBPACK_EXTERNAL_MODULE__415__, __WEBPACK_EXTERNAL_MODULE__226__, __WEBPACK_EXTERNAL_MODULE__961__) => { | ||
return /******/ (() => { // webpackBootstrap | ||
@@ -45,2 +45,9 @@ /******/ "use strict"; | ||
/***/ 415: | ||
/***/ ((module) => { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__415__; | ||
/***/ }), | ||
/***/ 851: | ||
@@ -205,2 +212,4 @@ /***/ ((module) => { | ||
var external_commonjs_tsparticles_updater_size_commonjs2_tsparticles_updater_size_amd_tsparticles_updater_size_root_window_ = __webpack_require__(694); | ||
// EXTERNAL MODULE: external {"commonjs":"tsparticles-plugin-sounds","commonjs2":"tsparticles-plugin-sounds","amd":"tsparticles-plugin-sounds","root":"window"} | ||
var external_commonjs_tsparticles_plugin_sounds_commonjs2_tsparticles_plugin_sounds_amd_tsparticles_plugin_sounds_root_window_ = __webpack_require__(415); | ||
// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-stroke-color","commonjs2":"tsparticles-updater-stroke-color","amd":"tsparticles-updater-stroke-color","root":"window"} | ||
@@ -212,2 +221,6 @@ var external_commonjs_tsparticles_updater_stroke_color_commonjs2_tsparticles_updater_stroke_color_amd_tsparticles_updater_stroke_color_root_window_ = __webpack_require__(226); | ||
const explodeSoundCheck = args => { | ||
const data = args.data; | ||
return data.particle.shape === "line"; | ||
}; | ||
const fixRange = (value, min, max) => { | ||
@@ -232,8 +245,8 @@ const diffSMax = value.max > max ? value.max - max : 0; | ||
sRange = fixRange({ | ||
min: hsl.s - 20, | ||
max: hsl.s + 20 | ||
min: hsl.s - 30, | ||
max: hsl.s + 30 | ||
}, 0, 100), | ||
lRange = fixRange({ | ||
min: hsl.l - 20, | ||
max: hsl.l + 20 | ||
min: hsl.l - 30, | ||
max: hsl.l + 30 | ||
}, 0, 100); | ||
@@ -254,5 +267,2 @@ return { | ||
}, | ||
collisions: { | ||
enable: false | ||
}, | ||
opacity: { | ||
@@ -298,3 +308,6 @@ value: { | ||
move: { | ||
decay: 0.05, | ||
decay: { | ||
min: 0.075, | ||
max: 0.1 | ||
}, | ||
enable: true, | ||
@@ -308,3 +321,3 @@ gravity: { | ||
min: 5, | ||
max: 10 | ||
max: 15 | ||
}, | ||
@@ -330,3 +343,3 @@ direction: "none", | ||
rate: { | ||
delay: 0.15, | ||
delay: 0.05, | ||
quantity: 1 | ||
@@ -349,3 +362,10 @@ }, | ||
mode: "split", | ||
bounds: { | ||
top: { | ||
min: 10, | ||
max: 30 | ||
} | ||
}, | ||
split: { | ||
sizeOffset: false, | ||
count: 1, | ||
@@ -356,3 +376,6 @@ factor: { | ||
rate: { | ||
value: 100 | ||
value: { | ||
min: 75, | ||
max: 150 | ||
} | ||
}, | ||
@@ -412,2 +435,11 @@ particles: fireworksOptions | ||
} | ||
}, | ||
sounds: { | ||
enable: true, | ||
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 | ||
} | ||
@@ -429,5 +461,7 @@ }; | ||
async function loadFireworksPreset(engine) { | ||
await (0,external_commonjs_tsparticles_move_base_commonjs2_tsparticles_move_base_amd_tsparticles_move_base_root_window_.loadBaseMover)(engine); | ||
await (0,external_commonjs_tsparticles_plugin_emitters_commonjs2_tsparticles_plugin_emitters_amd_tsparticles_plugin_emitters_root_window_.loadEmittersPlugin)(engine); | ||
await (0,external_commonjs_tsparticles_plugin_sounds_commonjs2_tsparticles_plugin_sounds_amd_tsparticles_plugin_sounds_root_window_.loadSoundsPlugin)(engine); | ||
await (0,external_commonjs_tsparticles_shape_circle_commonjs2_tsparticles_shape_circle_amd_tsparticles_shape_circle_root_window_.loadCircleShape)(engine); | ||
@@ -434,0 +468,0 @@ await (0,external_commonjs_tsparticles_shape_line_commonjs2_tsparticles_shape_line_amd_tsparticles_shape_line_root_window_.loadLineShape)(engine); |
/*! For license information please see tsparticles.preset.fireworks.min.js.LICENSE.txt */ | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("tsparticles-updater-angle"),require("tsparticles-move-base"),require("tsparticles-shape-circle"),require("tsparticles-updater-color"),require("tsparticles-updater-destroy"),require("tsparticles-plugin-emitters"),require("tsparticles-updater-life"),require("tsparticles-shape-line"),require("tsparticles-updater-opacity"),require("tsparticles-updater-out-modes"),require("tsparticles-updater-size"),require("tsparticles-updater-stroke-color"),require("tsparticles-engine"));else if("function"==typeof define&&define.amd)define(["tsparticles-updater-angle","tsparticles-move-base","tsparticles-shape-circle","tsparticles-updater-color","tsparticles-updater-destroy","tsparticles-plugin-emitters","tsparticles-updater-life","tsparticles-shape-line","tsparticles-updater-opacity","tsparticles-updater-out-modes","tsparticles-updater-size","tsparticles-updater-stroke-color","tsparticles-engine"],t);else{var r="object"==typeof exports?t(require("tsparticles-updater-angle"),require("tsparticles-move-base"),require("tsparticles-shape-circle"),require("tsparticles-updater-color"),require("tsparticles-updater-destroy"),require("tsparticles-plugin-emitters"),require("tsparticles-updater-life"),require("tsparticles-shape-line"),require("tsparticles-updater-opacity"),require("tsparticles-updater-out-modes"),require("tsparticles-updater-size"),require("tsparticles-updater-stroke-color"),require("tsparticles-engine")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(this,((e,t,r,a,i,s,o,l,p,n,d,c,u)=>(()=>{"use strict";var m={961:e=>{e.exports=u},565:e=>{e.exports=t},716:e=>{e.exports=s},851:e=>{e.exports=r},598:e=>{e.exports=l},490:t=>{t.exports=e},613:e=>{e.exports=a},731:e=>{e.exports=i},86:e=>{e.exports=o},515:e=>{e.exports=p},509:e=>{e.exports=n},694:e=>{e.exports=d},226:e=>{e.exports=c}},f={};function w(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={exports:{}};return m[e](r,r.exports,w),r.exports}w.d=(e,t)=>{for(var r in t)w.o(t,r)&&!w.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},w.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),w.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return(()=>{w.r(y),w.d(y,{loadFireworksPreset:()=>x});var e=w(490),t=w(565),r=w(851),a=w(613),i=w(731),s=w(716),o=w(86),l=w(598),p=w(515),n=w(509),d=w(694),c=w(226),u=w(961);const m=(e,t,r)=>{const a=e.max>r?e.max-r:0;let i=(0,u.setRangeValue)(e);a&&(i=(0,u.setRangeValue)(e.min-a,r));const s=e.min<t?e.min:0;return s&&(i=(0,u.setRangeValue)(0,e.max+s)),i},f={detectRetina:!0,background:{color:"#000"},fpsLimit:120,emitters:{direction:"top",life:{count:0,duration:.1,delay:.1},rate:{delay:.15,quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},destroy:{mode:"split",split:{count:1,factor:{value:.333333},rate:{value:100},particles:["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"].map((e=>{const t=(0,u.stringToRgb)(e);if(!t)return;const r=(0,u.rgbToHsl)(t),a=m({min:r.s-20,max:r.s+20},0,100),i=m({min:r.l-20,max:r.l+20},0,100);return{color:{value:{h:r.h,s:a,l:i}},stroke:{width:0},number:{value:0},collisions:{enable:!1},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:.7,sync:!1,startValue:"max",destroy:"min"}},shape:{type:"circle"},size:{value:{min:1,max:2},animation:{enable:!0,speed:5,count:1,sync:!1,startValue:"min",destroy:"none"}},life:{count:1,duration:{value:{min:1,max:2}}},move:{decay:.05,enable:!0,gravity:{enable:!0,inverse:!1,acceleration:5},speed:{min:5,max:10},direction:"none",outModes:"destroy"}}})).filter((e=>void 0!==e))}},life:{count:1},shape:{type:"line"},size:{value:{min:.1,max:50},animation:{enable:!0,sync:!0,speed:90,startValue:"max",destroy:"min"}},stroke:{color:{value:"#ffffff"},width:1},rotate:{path:!0},move:{enable:!0,gravity:{acceleration:15,enable:!0,inverse:!0,maxSpeed:100},speed:{min:10,max:20},outModes:{default:"destroy",top:"none"},trail:{fillColor:"#000",enable:!0,length:10}}}};async function x(u){await(0,t.loadBaseMover)(u),await(0,s.loadEmittersPlugin)(u),await(0,r.loadCircleShape)(u),await(0,l.loadLineShape)(u),await(0,e.loadAngleUpdater)(u),await(0,a.loadColorUpdater)(u),await(0,i.loadDestroyUpdater)(u),await(0,o.loadLifeUpdater)(u),await(0,p.loadOpacityUpdater)(u),await(0,n.loadOutModesUpdater)(u),await(0,d.loadSizeUpdater)(u),await(0,c.loadStrokeColorUpdater)(u),await u.addPreset("fireworks",f)}})(),y})())); | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("tsparticles-updater-angle"),require("tsparticles-move-base"),require("tsparticles-shape-circle"),require("tsparticles-updater-color"),require("tsparticles-updater-destroy"),require("tsparticles-plugin-emitters"),require("tsparticles-updater-life"),require("tsparticles-shape-line"),require("tsparticles-updater-opacity"),require("tsparticles-updater-out-modes"),require("tsparticles-updater-size"),require("tsparticles-plugin-sounds"),require("tsparticles-updater-stroke-color"),require("tsparticles-engine"));else if("function"==typeof define&&define.amd)define(["tsparticles-updater-angle","tsparticles-move-base","tsparticles-shape-circle","tsparticles-updater-color","tsparticles-updater-destroy","tsparticles-plugin-emitters","tsparticles-updater-life","tsparticles-shape-line","tsparticles-updater-opacity","tsparticles-updater-out-modes","tsparticles-updater-size","tsparticles-plugin-sounds","tsparticles-updater-stroke-color","tsparticles-engine"],t);else{var r="object"==typeof exports?t(require("tsparticles-updater-angle"),require("tsparticles-move-base"),require("tsparticles-shape-circle"),require("tsparticles-updater-color"),require("tsparticles-updater-destroy"),require("tsparticles-plugin-emitters"),require("tsparticles-updater-life"),require("tsparticles-shape-line"),require("tsparticles-updater-opacity"),require("tsparticles-updater-out-modes"),require("tsparticles-updater-size"),require("tsparticles-plugin-sounds"),require("tsparticles-updater-stroke-color"),require("tsparticles-engine")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(this,((e,t,r,a,i,s,o,l,p,n,d,u,c,m)=>(()=>{"use strict";var f={961:e=>{e.exports=m},565:e=>{e.exports=t},716:e=>{e.exports=s},415:e=>{e.exports=u},851:e=>{e.exports=r},598:e=>{e.exports=l},490:t=>{t.exports=e},613:e=>{e.exports=a},731:e=>{e.exports=i},86:e=>{e.exports=o},515:e=>{e.exports=p},509:e=>{e.exports=n},694:e=>{e.exports=d},226:e=>{e.exports=c}},w={};function x(e){var t=w[e];if(void 0!==t)return t.exports;var r=w[e]={exports:{}};return f[e](r,r.exports,x),r.exports}x.d=(e,t)=>{for(var r in t)x.o(t,r)&&!x.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},x.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),x.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return(()=>{x.r(y),x.d(y,{loadFireworksPreset:()=>v});var e=x(490),t=x(565),r=x(851),a=x(613),i=x(731),s=x(716),o=x(86),l=x(598),p=x(515),n=x(509),d=x(694),u=x(415),c=x(226),m=x(961);const f=(e,t,r)=>{const a=e.max>r?e.max-r:0;let i=(0,m.setRangeValue)(e);a&&(i=(0,m.setRangeValue)(e.min-a,r));const s=e.min<t?e.min:0;return s&&(i=(0,m.setRangeValue)(0,e.max+s)),i},w={detectRetina:!0,background:{color:"#000"},fpsLimit:120,emitters:{direction:"top",life:{count:0,duration:.1,delay:.1},rate:{delay:.05,quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},destroy:{mode:"split",bounds:{top:{min:10,max:30}},split:{sizeOffset:!1,count:1,factor:{value:.333333},rate:{value:{min:75,max:150}},particles:["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"].map((e=>{const t=(0,m.stringToRgb)(e);if(!t)return;const r=(0,m.rgbToHsl)(t),a=f({min:r.s-30,max:r.s+30},0,100),i=f({min:r.l-30,max:r.l+30},0,100);return{color:{value:{h:r.h,s:a,l:i}},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:1,max:2}}},move:{decay:{min:.075,max:.1},enable:!0,gravity:{enable:!0,inverse:!1,acceleration:5},speed:{min:5,max:15},direction:"none",outModes:"destroy"}}})).filter((e=>void 0!==e))}},life:{count:1},shape:{type:"line"},size:{value:{min:.1,max:50},animation:{enable:!0,sync:!0,speed:90,startValue:"max",destroy:"min"}},stroke:{color:{value:"#ffffff"},width:1},rotate:{path:!0},move:{enable:!0,gravity:{acceleration:15,enable:!0,inverse:!0,maxSpeed:100},speed:{min:10,max:20},outModes:{default:"destroy",top:"none"},trail:{fillColor:"#000",enable:!0,length:10}}},sounds:{enable:!0,events:[{event:"particleRemoved",filter:e=>"line"===e.data.particle.shape,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}};async function v(m){await(0,t.loadBaseMover)(m),await(0,s.loadEmittersPlugin)(m),await(0,u.loadSoundsPlugin)(m),await(0,r.loadCircleShape)(m),await(0,l.loadLineShape)(m),await(0,e.loadAngleUpdater)(m),await(0,a.loadColorUpdater)(m),await(0,i.loadDestroyUpdater)(m),await(0,o.loadLifeUpdater)(m),await(0,p.loadOpacityUpdater)(m),await(0,n.loadOutModesUpdater)(m),await(0,d.loadSizeUpdater)(m),await(0,c.loadStrokeColorUpdater)(m),await m.addPreset("fireworks",w)}})(),y})())); |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v2.6.0 | ||
* v2.7.0 | ||
*/ |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports", "tsparticles-updater-angle", "tsparticles-move-base", "tsparticles-shape-circle", "tsparticles-updater-color", "tsparticles-updater-destroy", "tsparticles-plugin-emitters", "tsparticles-updater-life", "tsparticles-shape-line", "tsparticles-updater-opacity", "tsparticles-updater-out-modes", "tsparticles-updater-size", "tsparticles-updater-stroke-color", "./options"], factory); | ||
define(["require", "exports", "tsparticles-updater-angle", "tsparticles-move-base", "tsparticles-shape-circle", "tsparticles-updater-color", "tsparticles-updater-destroy", "tsparticles-plugin-emitters", "tsparticles-updater-life", "tsparticles-shape-line", "tsparticles-updater-opacity", "tsparticles-updater-out-modes", "tsparticles-updater-size", "tsparticles-plugin-sounds", "tsparticles-updater-stroke-color", "./options"], factory); | ||
} | ||
@@ -25,2 +25,3 @@ })(function (require, exports) { | ||
const tsparticles_updater_size_1 = require("tsparticles-updater-size"); | ||
const tsparticles_plugin_sounds_1 = require("tsparticles-plugin-sounds"); | ||
const tsparticles_updater_stroke_color_1 = require("tsparticles-updater-stroke-color"); | ||
@@ -31,2 +32,3 @@ const options_1 = require("./options"); | ||
await (0, tsparticles_plugin_emitters_1.loadEmittersPlugin)(engine); | ||
await (0, tsparticles_plugin_sounds_1.loadSoundsPlugin)(engine); | ||
await (0, tsparticles_shape_circle_1.loadCircleShape)(engine); | ||
@@ -33,0 +35,0 @@ await (0, tsparticles_shape_line_1.loadLineShape)(engine); |
@@ -14,2 +14,6 @@ (function (factory) { | ||
const tsparticles_engine_1 = require("tsparticles-engine"); | ||
const explodeSoundCheck = (args) => { | ||
const data = args.data; | ||
return data.particle.shape === "line"; | ||
}; | ||
const fixRange = (value, min, max) => { | ||
@@ -33,3 +37,3 @@ const diffSMax = value.max > max ? value.max - max : 0; | ||
} | ||
const hsl = (0, tsparticles_engine_1.rgbToHsl)(rgb), sRange = fixRange({ min: hsl.s - 20, max: hsl.s + 20 }, 0, 100), lRange = fixRange({ min: hsl.l - 20, max: hsl.l + 20 }, 0, 100); | ||
const hsl = (0, tsparticles_engine_1.rgbToHsl)(rgb), sRange = fixRange({ min: hsl.s - 30, max: hsl.s + 30 }, 0, 100), lRange = fixRange({ min: hsl.l - 30, max: hsl.l + 30 }, 0, 100); | ||
return { | ||
@@ -49,5 +53,2 @@ color: { | ||
}, | ||
collisions: { | ||
enable: false, | ||
}, | ||
opacity: { | ||
@@ -90,3 +91,3 @@ value: { | ||
move: { | ||
decay: 0.05, | ||
decay: { min: 0.075, max: 0.1 }, | ||
enable: true, | ||
@@ -98,3 +99,3 @@ gravity: { | ||
}, | ||
speed: { min: 5, max: 10 }, | ||
speed: { min: 5, max: 15 }, | ||
direction: "none", | ||
@@ -120,3 +121,3 @@ outModes: "destroy", | ||
rate: { | ||
delay: 0.15, | ||
delay: 0.05, | ||
quantity: 1, | ||
@@ -139,3 +140,7 @@ }, | ||
mode: "split", | ||
bounds: { | ||
top: { min: 10, max: 30 }, | ||
}, | ||
split: { | ||
sizeOffset: false, | ||
count: 1, | ||
@@ -146,3 +151,3 @@ factor: { | ||
rate: { | ||
value: 100, | ||
value: { min: 75, max: 150 }, | ||
}, | ||
@@ -203,3 +208,18 @@ particles: fireworksOptions, | ||
}, | ||
sounds: { | ||
enable: true, | ||
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, | ||
}, | ||
}; | ||
}); |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
753053
9346
14
4
+ Addedtsparticles-plugin-sounds@2.12.0(transitive)
Updatedtsparticles-engine@^2.7.0
Updatedtsparticles-move-base@^2.7.0