@tsparticles/fireworks 3.0.3 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/108.min.js +2 -0
- package/108.min.js.LICENSE.txt +1 -0
- package/120.min.js +2 -0
- package/120.min.js.LICENSE.txt +1 -0
- package/126.min.js +2 -0
- package/126.min.js.LICENSE.txt +1 -0
- package/132.min.js +2 -0
- package/132.min.js.LICENSE.txt +1 -0
- package/141.min.js +2 -0
- package/141.min.js.LICENSE.txt +1 -0
- package/163.min.js +2 -0
- package/163.min.js.LICENSE.txt +1 -0
- package/173.min.js +2 -0
- package/173.min.js.LICENSE.txt +1 -0
- package/196.min.js +2 -0
- package/196.min.js.LICENSE.txt +1 -0
- package/245.min.js +2 -0
- package/245.min.js.LICENSE.txt +1 -0
- package/274.min.js +2 -0
- package/274.min.js.LICENSE.txt +1 -0
- package/30.min.js +2 -0
- package/30.min.js.LICENSE.txt +1 -0
- package/308.min.js +2 -0
- package/308.min.js.LICENSE.txt +1 -0
- package/31.min.js +2 -0
- package/31.min.js.LICENSE.txt +1 -0
- package/328.min.js +2 -0
- package/328.min.js.LICENSE.txt +1 -0
- package/329.min.js +2 -0
- package/329.min.js.LICENSE.txt +1 -0
- package/376.min.js +2 -0
- package/376.min.js.LICENSE.txt +1 -0
- package/468.min.js +2 -0
- package/468.min.js.LICENSE.txt +1 -0
- package/49.min.js +2 -0
- package/49.min.js.LICENSE.txt +1 -0
- package/547.min.js +2 -0
- package/547.min.js.LICENSE.txt +1 -0
- package/560.min.js +2 -0
- package/560.min.js.LICENSE.txt +1 -0
- package/580.min.js +2 -0
- package/580.min.js.LICENSE.txt +1 -0
- package/610.min.js +2 -0
- package/610.min.js.LICENSE.txt +1 -0
- package/647.min.js +2 -0
- package/647.min.js.LICENSE.txt +1 -0
- package/648.min.js +2 -0
- package/648.min.js.LICENSE.txt +1 -0
- package/720.min.js +2 -0
- package/720.min.js.LICENSE.txt +1 -0
- package/725.min.js +2 -0
- package/725.min.js.LICENSE.txt +1 -0
- package/749.min.js +2 -0
- package/749.min.js.LICENSE.txt +1 -0
- package/757.min.js +2 -0
- package/757.min.js.LICENSE.txt +1 -0
- package/81.min.js +2 -0
- package/81.min.js.LICENSE.txt +1 -0
- package/835.min.js +2 -0
- package/835.min.js.LICENSE.txt +1 -0
- package/837.min.js +2 -0
- package/837.min.js.LICENSE.txt +1 -0
- package/859.min.js +2 -0
- package/859.min.js.LICENSE.txt +1 -0
- package/866.min.js +2 -0
- package/866.min.js.LICENSE.txt +1 -0
- package/88.min.js +2 -0
- package/88.min.js.LICENSE.txt +1 -0
- package/886.min.js +2 -0
- package/886.min.js.LICENSE.txt +1 -0
- package/921.min.js +2 -0
- package/921.min.js.LICENSE.txt +1 -0
- package/929.min.js +2 -0
- package/929.min.js.LICENSE.txt +1 -0
- package/937.min.js +2 -0
- package/937.min.js.LICENSE.txt +1 -0
- package/952.min.js +2 -0
- package/952.min.js.LICENSE.txt +1 -0
- package/973.min.js +2 -0
- package/973.min.js.LICENSE.txt +1 -0
- package/994.min.js +2 -0
- package/994.min.js.LICENSE.txt +1 -0
- package/basic_dist_browser_index_js.js +30 -0
- package/browser/fireworks.js +9 -19
- package/cjs/fireworks.js +40 -27
- package/effects_trail_dist_browser_TrailDrawer_js.js +30 -0
- package/effects_trail_dist_browser_index_js.js +30 -0
- package/engine_dist_browser_Core_Container_js.js +90 -0
- package/engine_dist_browser_Core_Particle_js.js +30 -0
- package/esm/fireworks.js +9 -19
- package/move_base_dist_browser_BaseMover_js.js +30 -0
- package/move_base_dist_browser_Utils_js.js +30 -0
- package/move_base_dist_browser_index_js.js +30 -0
- package/package.json +10 -12
- package/plugins_emittersShapes_square_dist_browser_EmittersSquareShapeGenerator_js.js +120 -0
- package/plugins_emittersShapes_square_dist_browser_index_js.js +30 -0
- package/plugins_emitters_dist_browser_EmitterInstance_js.js +30 -0
- package/plugins_emitters_dist_browser_EmittersPlugin_js.js +90 -0
- package/plugins_emitters_dist_browser_Emitters_js.js +30 -0
- package/plugins_emitters_dist_browser_ShapeManager_js.js +30 -0
- package/plugins_emitters_dist_browser_index_js.js +100 -0
- package/plugins_sounds_dist_browser_SoundsInstance_js.js +30 -0
- package/plugins_sounds_dist_browser_SoundsPlugin_js.js +120 -0
- package/plugins_sounds_dist_browser_index_js.js +30 -0
- package/report.html +3 -3
- package/shapes_circle_dist_browser_CircleDrawer_js.js +30 -0
- package/shapes_circle_dist_browser_Utils_js.js +30 -0
- package/shapes_circle_dist_browser_index_js.js +30 -0
- package/tsparticles.fireworks.bundle.js +2141 -8995
- package/tsparticles.fireworks.bundle.min.js +1 -1
- package/tsparticles.fireworks.bundle.min.js.LICENSE.txt +1 -1
- package/tsparticles.fireworks.js +128 -407
- package/tsparticles.fireworks.min.js +1 -1
- package/tsparticles.fireworks.min.js.LICENSE.txt +1 -1
- package/types/fireworks.d.ts +1 -1
- package/umd/fireworks.js +42 -28
- package/updaters_color_dist_browser_ColorUpdater_js.js +30 -0
- package/updaters_color_dist_browser_index_js.js +30 -0
- package/updaters_destroy_dist_browser_DestroyUpdater_js.js +90 -0
- package/updaters_destroy_dist_browser_index_js.js +30 -0
- package/updaters_life_dist_browser_LifeUpdater_js.js +60 -0
- package/updaters_life_dist_browser_Utils_js.js +30 -0
- package/updaters_life_dist_browser_index_js.js +30 -0
- package/updaters_opacity_dist_browser_OpacityUpdater_js.js +30 -0
- package/updaters_opacity_dist_browser_index_js.js +30 -0
- package/updaters_outModes_dist_browser_BounceOutMode_js.js +30 -0
- package/updaters_outModes_dist_browser_DestroyOutMode_js.js +30 -0
- package/updaters_outModes_dist_browser_NoneOutMode_js.js +30 -0
- package/updaters_outModes_dist_browser_OutOfCanvasUpdater_js.js +30 -0
- package/updaters_outModes_dist_browser_OutOutMode_js.js +30 -0
- package/updaters_outModes_dist_browser_Utils_js.js +30 -0
- package/updaters_outModes_dist_browser_index_js.js +30 -0
- package/updaters_rotate_dist_browser_RotateUpdater_js.js +50 -0
- package/updaters_rotate_dist_browser_index_js.js +30 -0
- package/updaters_size_dist_browser_SizeUpdater_js.js +30 -0
- package/updaters_size_dist_browser_index_js.js +30 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.fireworks.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/
|
|
2
|
+
!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 @@
|
|
|
1
|
-
/*! tsParticles Fireworks v3.0
|
|
1
|
+
/*! tsParticles Fireworks v3.2.0 by Matteo Bruni */
|
package/types/fireworks.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ declare class FireworksInstance {
|
|
|
14
14
|
play(): void;
|
|
15
15
|
stop(): void;
|
|
16
16
|
}
|
|
17
|
+
export type { FireworksInstance };
|
|
17
18
|
export declare function fireworks(idOrOptions: string | RecursivePartial<IFireworkOptions>, sourceOptions?: RecursivePartial<IFireworkOptions>): Promise<FireworksInstance | undefined>;
|
|
18
19
|
export declare namespace fireworks {
|
|
19
20
|
var version: string;
|
|
20
21
|
}
|
|
21
|
-
export {};
|
package/umd/fireworks.js
CHANGED
|
@@ -1,32 +1,47 @@
|
|
|
1
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
+
if (k2 === undefined) k2 = k;
|
|
3
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(o, k2, desc);
|
|
8
|
+
}) : (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
o[k2] = m[k];
|
|
11
|
+
}));
|
|
12
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
+
}) : function(o, v) {
|
|
15
|
+
o["default"] = v;
|
|
16
|
+
});
|
|
17
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
+
if (mod && mod.__esModule) return mod;
|
|
19
|
+
var result = {};
|
|
20
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
__setModuleDefault(result, mod);
|
|
22
|
+
return result;
|
|
23
|
+
};
|
|
1
24
|
(function (factory) {
|
|
2
25
|
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
26
|
var v = factory(require, exports);
|
|
4
27
|
if (v !== undefined) module.exports = v;
|
|
5
28
|
}
|
|
6
29
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "@tsparticles/engine", "./FireworkOptions.js"
|
|
30
|
+
define(["require", "exports", "@tsparticles/engine", "./FireworkOptions.js"], factory);
|
|
8
31
|
}
|
|
9
32
|
})(function (require, exports) {
|
|
10
33
|
"use strict";
|
|
34
|
+
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
|
|
11
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
36
|
exports.fireworks = void 0;
|
|
13
37
|
const engine_1 = require("@tsparticles/engine");
|
|
14
38
|
const FireworkOptions_js_1 = require("./FireworkOptions.js");
|
|
15
|
-
const
|
|
16
|
-
const updater_destroy_1 = require("@tsparticles/updater-destroy");
|
|
17
|
-
const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
|
|
18
|
-
const plugin_emitters_shape_square_1 = require("@tsparticles/plugin-emitters-shape-square");
|
|
19
|
-
const updater_life_1 = require("@tsparticles/updater-life");
|
|
20
|
-
const shape_line_1 = require("@tsparticles/shape-line");
|
|
21
|
-
const updater_rotate_1 = require("@tsparticles/updater-rotate");
|
|
22
|
-
const plugin_sounds_1 = require("@tsparticles/plugin-sounds");
|
|
23
|
-
const updater_stroke_color_1 = require("@tsparticles/updater-stroke-color");
|
|
24
|
-
const effect_trail_1 = require("@tsparticles/effect-trail");
|
|
39
|
+
const minSplitCount = 2;
|
|
25
40
|
let initialized = false;
|
|
26
41
|
let initializing = false;
|
|
27
42
|
const explodeSoundCheck = (args) => {
|
|
28
43
|
const data = args.data;
|
|
29
|
-
return data.particle.shape === "circle" && !!data.particle.splitCount && data.particle.splitCount <
|
|
44
|
+
return data.particle.shape === "circle" && !!data.particle.splitCount && data.particle.splitCount < minSplitCount;
|
|
30
45
|
};
|
|
31
46
|
class FireworksInstance {
|
|
32
47
|
constructor(container) {
|
|
@@ -48,26 +63,25 @@
|
|
|
48
63
|
}
|
|
49
64
|
if (initializing) {
|
|
50
65
|
return new Promise((resolve) => {
|
|
51
|
-
const interval = setInterval(() => {
|
|
66
|
+
const timeout = 100, interval = setInterval(() => {
|
|
52
67
|
if (!initialized) {
|
|
53
68
|
return;
|
|
54
69
|
}
|
|
55
70
|
clearInterval(interval);
|
|
56
71
|
resolve();
|
|
57
|
-
},
|
|
72
|
+
}, timeout);
|
|
58
73
|
});
|
|
59
74
|
}
|
|
60
75
|
initializing = true;
|
|
61
|
-
await (
|
|
62
|
-
await (
|
|
63
|
-
await (
|
|
64
|
-
await (
|
|
65
|
-
await
|
|
66
|
-
await
|
|
67
|
-
await
|
|
68
|
-
await (
|
|
69
|
-
await (
|
|
70
|
-
await (0, basic_1.loadBasic)(engine_1.tsParticles, false);
|
|
76
|
+
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));
|
|
77
|
+
await loadEmittersPlugin(engine_1.tsParticles, false);
|
|
78
|
+
await loadEmittersShapeSquare(engine_1.tsParticles, false);
|
|
79
|
+
await loadSoundsPlugin(engine_1.tsParticles, false);
|
|
80
|
+
await loadRotateUpdater(engine_1.tsParticles, false);
|
|
81
|
+
await loadDestroyUpdater(engine_1.tsParticles, false);
|
|
82
|
+
await loadLifeUpdater(engine_1.tsParticles, false);
|
|
83
|
+
await loadTrailEffect(engine_1.tsParticles, false);
|
|
84
|
+
await loadBasic(engine_1.tsParticles, false);
|
|
71
85
|
initializing = false;
|
|
72
86
|
initialized = true;
|
|
73
87
|
}
|
|
@@ -83,7 +97,7 @@
|
|
|
83
97
|
id = "fireworks";
|
|
84
98
|
options.load(idOrOptions);
|
|
85
99
|
}
|
|
86
|
-
const particlesOptions = {
|
|
100
|
+
const identity = 1, particlesOptions = {
|
|
87
101
|
detectRetina: true,
|
|
88
102
|
background: {
|
|
89
103
|
color: options.background,
|
|
@@ -98,8 +112,8 @@
|
|
|
98
112
|
},
|
|
99
113
|
rate: {
|
|
100
114
|
delay: (0, engine_1.isNumber)(options.rate)
|
|
101
|
-
?
|
|
102
|
-
: { min:
|
|
115
|
+
? identity / options.rate
|
|
116
|
+
: { min: identity / (0, engine_1.getRangeMin)(options.rate), max: identity / (0, engine_1.getRangeMax)(options.rate) },
|
|
103
117
|
quantity: 1,
|
|
104
118
|
},
|
|
105
119
|
size: {
|
|
@@ -255,7 +269,7 @@
|
|
|
255
269
|
enable: options.sounds,
|
|
256
270
|
events: [
|
|
257
271
|
{
|
|
258
|
-
event: "
|
|
272
|
+
event: "particleRemoved",
|
|
259
273
|
filter: explodeSoundCheck,
|
|
260
274
|
audio: [
|
|
261
275
|
"https://particles.js.org/audio/explosion0.mp3",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v3.2.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_fireworks"] = this["webpackChunk_tsparticles_fireworks"] || []).push([["updaters_color_dist_browser_ColorUpdater_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../updaters/color/dist/browser/ColorUpdater.js":
|
|
21
|
+
/*!*********************************************************!*\
|
|
22
|
+
!*** ../../updaters/color/dist/browser/ColorUpdater.js ***!
|
|
23
|
+
\*********************************************************/
|
|
24
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
25
|
+
|
|
26
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ColorUpdater: () => (/* binding */ ColorUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass ColorUpdater {\n constructor(container) {\n this.container = container;\n }\n async init(particle) {\n const hslColor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToHsl)(particle.options.color, particle.id, particle.options.reduceDuplicates);\n if (hslColor) {\n particle.color = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getHslAnimationFromHsl)(hslColor, particle.options.color.animation, this.container.retina.reduceFactor);\n }\n await Promise.resolve();\n }\n isEnabled(particle) {\n const {\n h: hAnimation,\n s: sAnimation,\n l: lAnimation\n } = particle.options.color.animation,\n {\n color\n } = particle;\n return !particle.destroyed && !particle.spawning && (color?.h.value !== undefined && hAnimation.enable || color?.s.value !== undefined && sAnimation.enable || color?.l.value !== undefined && lAnimation.enable);\n }\n async update(particle, delta) {\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.updateColor)(particle.color, delta);\n await Promise.resolve();\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/color/dist/browser/ColorUpdater.js?");
|
|
27
|
+
|
|
28
|
+
/***/ })
|
|
29
|
+
|
|
30
|
+
}]);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v3.2.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_fireworks"] = this["webpackChunk_tsparticles_fireworks"] || []).push([["updaters_color_dist_browser_index_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../updaters/color/dist/browser/index.js":
|
|
21
|
+
/*!**************************************************!*\
|
|
22
|
+
!*** ../../updaters/color/dist/browser/index.js ***!
|
|
23
|
+
\**************************************************/
|
|
24
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
25
|
+
|
|
26
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadColorUpdater: () => (/* binding */ loadColorUpdater)\n/* harmony export */ });\nasync function loadColorUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"color\", async container => {\n const {\n ColorUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_color_dist_browser_ColorUpdater_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ColorUpdater.js */ \"../../updaters/color/dist/browser/ColorUpdater.js\"));\n return new ColorUpdater(container);\n }, refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/color/dist/browser/index.js?");
|
|
27
|
+
|
|
28
|
+
/***/ })
|
|
29
|
+
|
|
30
|
+
}]);
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v3.2.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_fireworks"] = this["webpackChunk_tsparticles_fireworks"] || []).push([["updaters_destroy_dist_browser_DestroyUpdater_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../updaters/destroy/dist/browser/DestroyUpdater.js":
|
|
21
|
+
/*!*************************************************************!*\
|
|
22
|
+
!*** ../../updaters/destroy/dist/browser/DestroyUpdater.js ***!
|
|
23
|
+
\*************************************************************/
|
|
24
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
25
|
+
|
|
26
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DestroyUpdater: () => (/* binding */ DestroyUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _Options_Classes_Destroy_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/Destroy.js */ \"../../updaters/destroy/dist/browser/Options/Classes/Destroy.js\");\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Utils.js */ \"../../updaters/destroy/dist/browser/Utils.js\");\n\n\n\nclass DestroyUpdater {\n constructor(engine, container) {\n this.container = container;\n this.engine = engine;\n }\n async init(particle) {\n const container = this.container,\n particlesOptions = particle.options,\n destroyOptions = particlesOptions.destroy;\n if (!destroyOptions) {\n return;\n }\n particle.splitCount = 0;\n const destroyBoundsOptions = destroyOptions.bounds;\n if (!particle.destroyBounds) {\n particle.destroyBounds = {};\n }\n const {\n bottom,\n left,\n right,\n top\n } = destroyBoundsOptions,\n {\n destroyBounds\n } = particle,\n canvasSize = container.canvas.size;\n if (bottom) {\n destroyBounds.bottom = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(bottom) * canvasSize.height / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator;\n }\n if (left) {\n destroyBounds.left = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(left) * canvasSize.width / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator;\n }\n if (right) {\n destroyBounds.right = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(right) * canvasSize.width / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator;\n }\n if (top) {\n destroyBounds.top = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(top) * canvasSize.height / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator;\n }\n await Promise.resolve();\n }\n isEnabled(particle) {\n return !particle.destroyed;\n }\n loadOptions(options, ...sources) {\n if (!options.destroy) {\n options.destroy = new _Options_Classes_Destroy_js__WEBPACK_IMPORTED_MODULE_1__.Destroy();\n }\n for (const source of sources) {\n options.destroy.load(source?.destroy);\n }\n }\n particleDestroyed(particle, override) {\n if (override) {\n return;\n }\n const destroyOptions = particle.options.destroy;\n if (destroyOptions && destroyOptions.mode === \"split\") {\n void (0,_Utils_js__WEBPACK_IMPORTED_MODULE_2__.split)(this.engine, this.container, particle);\n }\n }\n async update(particle) {\n if (!this.isEnabled(particle)) {\n return;\n }\n const position = particle.getPosition(),\n bounds = particle.destroyBounds;\n if (!bounds) {\n return;\n }\n if (bounds.bottom !== undefined && position.y >= bounds.bottom || bounds.left !== undefined && position.x <= bounds.left || bounds.right !== undefined && position.x >= bounds.right || bounds.top !== undefined && position.y <= bounds.top) {\n particle.destroy();\n }\n await Promise.resolve();\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/destroy/dist/browser/DestroyUpdater.js?");
|
|
27
|
+
|
|
28
|
+
/***/ }),
|
|
29
|
+
|
|
30
|
+
/***/ "../../updaters/destroy/dist/browser/Options/Classes/Destroy.js":
|
|
31
|
+
/*!**********************************************************************!*\
|
|
32
|
+
!*** ../../updaters/destroy/dist/browser/Options/Classes/Destroy.js ***!
|
|
33
|
+
\**********************************************************************/
|
|
34
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
35
|
+
|
|
36
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Destroy: () => (/* binding */ Destroy)\n/* harmony export */ });\n/* harmony import */ var _DestroyBounds_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DestroyBounds.js */ \"../../updaters/destroy/dist/browser/Options/Classes/DestroyBounds.js\");\n/* harmony import */ var _Split_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Split.js */ \"../../updaters/destroy/dist/browser/Options/Classes/Split.js\");\n\n\nclass Destroy {\n constructor() {\n this.bounds = new _DestroyBounds_js__WEBPACK_IMPORTED_MODULE_0__.DestroyBounds();\n this.mode = \"none\";\n this.split = new _Split_js__WEBPACK_IMPORTED_MODULE_1__.Split();\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.mode) {\n this.mode = data.mode;\n }\n if (data.bounds) {\n this.bounds.load(data.bounds);\n }\n this.split.load(data.split);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/destroy/dist/browser/Options/Classes/Destroy.js?");
|
|
37
|
+
|
|
38
|
+
/***/ }),
|
|
39
|
+
|
|
40
|
+
/***/ "../../updaters/destroy/dist/browser/Options/Classes/DestroyBounds.js":
|
|
41
|
+
/*!****************************************************************************!*\
|
|
42
|
+
!*** ../../updaters/destroy/dist/browser/Options/Classes/DestroyBounds.js ***!
|
|
43
|
+
\****************************************************************************/
|
|
44
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
45
|
+
|
|
46
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DestroyBounds: () => (/* binding */ DestroyBounds)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass DestroyBounds {\n load(data) {\n if (!data) {\n return;\n }\n if (data.bottom !== undefined) {\n this.bottom = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.bottom);\n }\n if (data.left !== undefined) {\n this.left = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.left);\n }\n if (data.right !== undefined) {\n this.right = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.right);\n }\n if (data.top !== undefined) {\n this.top = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.top);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/destroy/dist/browser/Options/Classes/DestroyBounds.js?");
|
|
47
|
+
|
|
48
|
+
/***/ }),
|
|
49
|
+
|
|
50
|
+
/***/ "../../updaters/destroy/dist/browser/Options/Classes/Split.js":
|
|
51
|
+
/*!********************************************************************!*\
|
|
52
|
+
!*** ../../updaters/destroy/dist/browser/Options/Classes/Split.js ***!
|
|
53
|
+
\********************************************************************/
|
|
54
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
55
|
+
|
|
56
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Split: () => (/* binding */ Split)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _SplitFactor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SplitFactor.js */ \"../../updaters/destroy/dist/browser/Options/Classes/SplitFactor.js\");\n/* harmony import */ var _SplitRate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SplitRate.js */ \"../../updaters/destroy/dist/browser/Options/Classes/SplitRate.js\");\n\n\n\nclass Split {\n constructor() {\n this.count = 1;\n this.factor = new _SplitFactor_js__WEBPACK_IMPORTED_MODULE_1__.SplitFactor();\n this.rate = new _SplitRate_js__WEBPACK_IMPORTED_MODULE_2__.SplitRate();\n this.sizeOffset = true;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.color !== undefined) {\n this.color = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OptionsColor.create(this.color, data.color);\n }\n if (data.count !== undefined) {\n this.count = data.count;\n }\n this.factor.load(data.factor);\n this.rate.load(data.rate);\n this.particles = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.executeOnSingleOrMultiple)(data.particles, particles => {\n return (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, particles);\n });\n if (data.sizeOffset !== undefined) {\n this.sizeOffset = data.sizeOffset;\n }\n if (data.colorOffset) {\n this.colorOffset = this.colorOffset ?? {};\n if (data.colorOffset.h !== undefined) {\n this.colorOffset.h = data.colorOffset.h;\n }\n if (data.colorOffset.s !== undefined) {\n this.colorOffset.s = data.colorOffset.s;\n }\n if (data.colorOffset.l !== undefined) {\n this.colorOffset.l = data.colorOffset.l;\n }\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/destroy/dist/browser/Options/Classes/Split.js?");
|
|
57
|
+
|
|
58
|
+
/***/ }),
|
|
59
|
+
|
|
60
|
+
/***/ "../../updaters/destroy/dist/browser/Options/Classes/SplitFactor.js":
|
|
61
|
+
/*!**************************************************************************!*\
|
|
62
|
+
!*** ../../updaters/destroy/dist/browser/Options/Classes/SplitFactor.js ***!
|
|
63
|
+
\**************************************************************************/
|
|
64
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
65
|
+
|
|
66
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SplitFactor: () => (/* binding */ SplitFactor)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass SplitFactor extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ValueWithRandom {\n constructor() {\n super();\n this.value = 3;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/destroy/dist/browser/Options/Classes/SplitFactor.js?");
|
|
67
|
+
|
|
68
|
+
/***/ }),
|
|
69
|
+
|
|
70
|
+
/***/ "../../updaters/destroy/dist/browser/Options/Classes/SplitRate.js":
|
|
71
|
+
/*!************************************************************************!*\
|
|
72
|
+
!*** ../../updaters/destroy/dist/browser/Options/Classes/SplitRate.js ***!
|
|
73
|
+
\************************************************************************/
|
|
74
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
75
|
+
|
|
76
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SplitRate: () => (/* binding */ SplitRate)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass SplitRate extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ValueWithRandom {\n constructor() {\n super();\n this.value = {\n min: 4,\n max: 9\n };\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/destroy/dist/browser/Options/Classes/SplitRate.js?");
|
|
77
|
+
|
|
78
|
+
/***/ }),
|
|
79
|
+
|
|
80
|
+
/***/ "../../updaters/destroy/dist/browser/Utils.js":
|
|
81
|
+
/*!****************************************************!*\
|
|
82
|
+
!*** ../../updaters/destroy/dist/browser/Utils.js ***!
|
|
83
|
+
\****************************************************/
|
|
84
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
85
|
+
|
|
86
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ split: () => (/* binding */ split)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst defaultOffset = 0,\n minDestroySize = 0.5,\n defaultSplitCount = 0,\n increment = 1,\n unbreakableTime = 500,\n minSplitCount = 0;\nasync function addSplitParticle(engine, container, parent, splitParticlesOptions) {\n const destroyOptions = parent.options.destroy;\n if (!destroyOptions) {\n return;\n }\n const splitOptions = destroyOptions.split,\n options = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.loadParticlesOptions)(engine, container, parent.options),\n factor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(splitOptions.factor.value),\n parentColor = parent.getFillColor();\n if (splitOptions.color) {\n options.color.load(splitOptions.color);\n } else if (splitOptions.colorOffset && parentColor) {\n options.color.load({\n value: {\n hsl: {\n h: parentColor.h + (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(splitOptions.colorOffset.h ?? defaultOffset),\n s: parentColor.s + (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(splitOptions.colorOffset.s ?? defaultOffset),\n l: parentColor.l + (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(splitOptions.colorOffset.l ?? defaultOffset)\n }\n }\n });\n } else {\n options.color.load({\n value: {\n hsl: parent.getFillColor()\n }\n });\n }\n options.move.load({\n center: {\n x: parent.position.x,\n y: parent.position.y,\n mode: \"precise\"\n }\n });\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNumber)(options.size.value)) {\n options.size.value /= factor;\n } else {\n options.size.value.min /= factor;\n options.size.value.max /= factor;\n }\n options.load(splitParticlesOptions);\n const offset = splitOptions.sizeOffset ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(-parent.size.value, parent.size.value) : defaultOffset,\n position = {\n x: parent.position.x + (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRange)(offset),\n y: parent.position.y + (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRange)(offset)\n };\n return container.particles.addParticle(position, options, parent.group, particle => {\n if (particle.size.value < minDestroySize) {\n return false;\n }\n particle.velocity.length = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRange)((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(parent.velocity.length, particle.velocity.length));\n particle.splitCount = (parent.splitCount ?? defaultSplitCount) + increment;\n particle.unbreakable = true;\n setTimeout(() => {\n particle.unbreakable = false;\n }, unbreakableTime);\n return true;\n });\n}\nasync function split(engine, container, particle) {\n const destroyOptions = particle.options.destroy;\n if (!destroyOptions) {\n return;\n }\n const splitOptions = destroyOptions.split;\n if (splitOptions.count >= minSplitCount && (particle.splitCount === undefined || particle.splitCount++ > splitOptions.count)) {\n return;\n }\n const rate = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(splitOptions.rate.value),\n particlesSplitOptions = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.itemFromSingleOrMultiple)(splitOptions.particles);\n for (let i = 0; i < rate; i++) {\n await addSplitParticle(engine, container, particle, particlesSplitOptions);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/destroy/dist/browser/Utils.js?");
|
|
87
|
+
|
|
88
|
+
/***/ })
|
|
89
|
+
|
|
90
|
+
}]);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v3.2.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_fireworks"] = this["webpackChunk_tsparticles_fireworks"] || []).push([["updaters_destroy_dist_browser_index_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../updaters/destroy/dist/browser/index.js":
|
|
21
|
+
/*!****************************************************!*\
|
|
22
|
+
!*** ../../updaters/destroy/dist/browser/index.js ***!
|
|
23
|
+
\****************************************************/
|
|
24
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
25
|
+
|
|
26
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadDestroyUpdater: () => (/* binding */ loadDestroyUpdater)\n/* harmony export */ });\nasync function loadDestroyUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"destroy\", async container => {\n const {\n DestroyUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_destroy_dist_browser_DestroyUpdater_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./DestroyUpdater.js */ \"../../updaters/destroy/dist/browser/DestroyUpdater.js\"));\n return new DestroyUpdater(engine, container);\n }, refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/destroy/dist/browser/index.js?");
|
|
27
|
+
|
|
28
|
+
/***/ })
|
|
29
|
+
|
|
30
|
+
}]);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v3.2.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_fireworks"] = this["webpackChunk_tsparticles_fireworks"] || []).push([["updaters_life_dist_browser_LifeUpdater_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../updaters/life/dist/browser/LifeUpdater.js":
|
|
21
|
+
/*!*******************************************************!*\
|
|
22
|
+
!*** ../../updaters/life/dist/browser/LifeUpdater.js ***!
|
|
23
|
+
\*******************************************************/
|
|
24
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
25
|
+
|
|
26
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LifeUpdater: () => (/* binding */ LifeUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _Options_Classes_Life_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/Life.js */ \"../../updaters/life/dist/browser/Options/Classes/Life.js\");\n\n\nconst noTime = 0,\n identity = 1,\n infiniteValue = -1;\nclass LifeUpdater {\n constructor(container) {\n this.container = container;\n }\n async init(particle) {\n const container = this.container,\n particlesOptions = particle.options,\n lifeOptions = particlesOptions.life;\n if (!lifeOptions) {\n return;\n }\n particle.life = {\n delay: container.retina.reduceFactor ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(lifeOptions.delay.value) * (lifeOptions.delay.sync ? identity : (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)()) / container.retina.reduceFactor * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds : noTime,\n delayTime: noTime,\n duration: container.retina.reduceFactor ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(lifeOptions.duration.value) * (lifeOptions.duration.sync ? identity : (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)()) / container.retina.reduceFactor * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds : noTime,\n time: noTime,\n count: lifeOptions.count\n };\n if (particle.life.duration <= noTime) {\n particle.life.duration = infiniteValue;\n }\n if (particle.life.count <= noTime) {\n particle.life.count = infiniteValue;\n }\n if (particle.life) {\n particle.spawning = particle.life.delay > noTime;\n }\n await Promise.resolve();\n }\n isEnabled(particle) {\n return !particle.destroyed;\n }\n loadOptions(options, ...sources) {\n if (!options.life) {\n options.life = new _Options_Classes_Life_js__WEBPACK_IMPORTED_MODULE_1__.Life();\n }\n for (const source of sources) {\n options.life.load(source?.life);\n }\n }\n async update(particle, delta) {\n if (!this.isEnabled(particle) || !particle.life) {\n return;\n }\n const {\n updateLife\n } = await __webpack_require__.e(/*! import() */ \"updaters_life_dist_browser_Utils_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./Utils.js */ \"../../updaters/life/dist/browser/Utils.js\"));\n updateLife(particle, delta, this.container.canvas.size);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/life/dist/browser/LifeUpdater.js?");
|
|
27
|
+
|
|
28
|
+
/***/ }),
|
|
29
|
+
|
|
30
|
+
/***/ "../../updaters/life/dist/browser/Options/Classes/Life.js":
|
|
31
|
+
/*!****************************************************************!*\
|
|
32
|
+
!*** ../../updaters/life/dist/browser/Options/Classes/Life.js ***!
|
|
33
|
+
\****************************************************************/
|
|
34
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
35
|
+
|
|
36
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Life: () => (/* binding */ Life)\n/* harmony export */ });\n/* harmony import */ var _LifeDelay_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LifeDelay.js */ \"../../updaters/life/dist/browser/Options/Classes/LifeDelay.js\");\n/* harmony import */ var _LifeDuration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LifeDuration.js */ \"../../updaters/life/dist/browser/Options/Classes/LifeDuration.js\");\n\n\nclass Life {\n constructor() {\n this.count = 0;\n this.delay = new _LifeDelay_js__WEBPACK_IMPORTED_MODULE_0__.LifeDelay();\n this.duration = new _LifeDuration_js__WEBPACK_IMPORTED_MODULE_1__.LifeDuration();\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.count !== undefined) {\n this.count = data.count;\n }\n this.delay.load(data.delay);\n this.duration.load(data.duration);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/life/dist/browser/Options/Classes/Life.js?");
|
|
37
|
+
|
|
38
|
+
/***/ }),
|
|
39
|
+
|
|
40
|
+
/***/ "../../updaters/life/dist/browser/Options/Classes/LifeDelay.js":
|
|
41
|
+
/*!*********************************************************************!*\
|
|
42
|
+
!*** ../../updaters/life/dist/browser/Options/Classes/LifeDelay.js ***!
|
|
43
|
+
\*********************************************************************/
|
|
44
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
45
|
+
|
|
46
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LifeDelay: () => (/* binding */ LifeDelay)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass LifeDelay extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ValueWithRandom {\n constructor() {\n super();\n this.sync = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n super.load(data);\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/life/dist/browser/Options/Classes/LifeDelay.js?");
|
|
47
|
+
|
|
48
|
+
/***/ }),
|
|
49
|
+
|
|
50
|
+
/***/ "../../updaters/life/dist/browser/Options/Classes/LifeDuration.js":
|
|
51
|
+
/*!************************************************************************!*\
|
|
52
|
+
!*** ../../updaters/life/dist/browser/Options/Classes/LifeDuration.js ***!
|
|
53
|
+
\************************************************************************/
|
|
54
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
55
|
+
|
|
56
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LifeDuration: () => (/* binding */ LifeDuration)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass LifeDuration extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ValueWithRandom {\n constructor() {\n super();\n this.sync = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n super.load(data);\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/life/dist/browser/Options/Classes/LifeDuration.js?");
|
|
57
|
+
|
|
58
|
+
/***/ })
|
|
59
|
+
|
|
60
|
+
}]);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v3.2.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_fireworks"] = this["webpackChunk_tsparticles_fireworks"] || []).push([["updaters_life_dist_browser_Utils_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../updaters/life/dist/browser/Utils.js":
|
|
21
|
+
/*!*************************************************!*\
|
|
22
|
+
!*** ../../updaters/life/dist/browser/Utils.js ***!
|
|
23
|
+
\*************************************************/
|
|
24
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
25
|
+
|
|
26
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ updateLife: () => (/* binding */ updateLife)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst noTime = 0,\n infiniteValue = -1,\n noLife = 0,\n minCanvasSize = 0;\nfunction updateLife(particle, delta, canvasSize) {\n if (!particle.life) {\n return;\n }\n const life = particle.life;\n let justSpawned = false;\n if (particle.spawning) {\n life.delayTime += delta.value;\n if (life.delayTime >= particle.life.delay) {\n justSpawned = true;\n particle.spawning = false;\n life.delayTime = noTime;\n life.time = noTime;\n } else {\n return;\n }\n }\n if (life.duration === infiniteValue) {\n return;\n }\n if (particle.spawning) {\n return;\n }\n if (justSpawned) {\n life.time = noTime;\n } else {\n life.time += delta.value;\n }\n if (life.time < life.duration) {\n return;\n }\n life.time = noTime;\n if (particle.life.count > noLife) {\n particle.life.count--;\n }\n if (particle.life.count === noLife) {\n particle.destroy();\n return;\n }\n const widthRange = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(minCanvasSize, canvasSize.width),\n heightRange = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(minCanvasSize, canvasSize.width);\n particle.position.x = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRange)(widthRange);\n particle.position.y = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRange)(heightRange);\n particle.spawning = true;\n life.delayTime = noTime;\n life.time = noTime;\n particle.reset();\n const lifeOptions = particle.options.life;\n if (lifeOptions) {\n life.delay = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(lifeOptions.delay.value) * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds;\n life.duration = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(lifeOptions.duration.value) * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/life/dist/browser/Utils.js?");
|
|
27
|
+
|
|
28
|
+
/***/ })
|
|
29
|
+
|
|
30
|
+
}]);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v3.2.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_fireworks"] = this["webpackChunk_tsparticles_fireworks"] || []).push([["updaters_life_dist_browser_index_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../updaters/life/dist/browser/index.js":
|
|
21
|
+
/*!*************************************************!*\
|
|
22
|
+
!*** ../../updaters/life/dist/browser/index.js ***!
|
|
23
|
+
\*************************************************/
|
|
24
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
25
|
+
|
|
26
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadLifeUpdater: () => (/* binding */ loadLifeUpdater)\n/* harmony export */ });\nasync function loadLifeUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"life\", async container => {\n const {\n LifeUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_life_dist_browser_LifeUpdater_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./LifeUpdater.js */ \"../../updaters/life/dist/browser/LifeUpdater.js\"));\n return new LifeUpdater(container);\n }, refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/life/dist/browser/index.js?");
|
|
27
|
+
|
|
28
|
+
/***/ })
|
|
29
|
+
|
|
30
|
+
}]);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v3.2.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_fireworks"] = this["webpackChunk_tsparticles_fireworks"] || []).push([["updaters_opacity_dist_browser_OpacityUpdater_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../updaters/opacity/dist/browser/OpacityUpdater.js":
|
|
21
|
+
/*!*************************************************************!*\
|
|
22
|
+
!*** ../../updaters/opacity/dist/browser/OpacityUpdater.js ***!
|
|
23
|
+
\*************************************************************/
|
|
24
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
25
|
+
|
|
26
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OpacityUpdater: () => (/* binding */ OpacityUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass OpacityUpdater {\n constructor(container) {\n this.container = container;\n }\n async init(particle) {\n const opacityOptions = particle.options.opacity,\n pxRatio = 1;\n particle.opacity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.initParticleNumericAnimationValue)(opacityOptions, pxRatio);\n const opacityAnimation = opacityOptions.animation;\n if (opacityAnimation.enable) {\n particle.opacity.velocity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(opacityAnimation.speed) / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator * this.container.retina.reduceFactor;\n if (!opacityAnimation.sync) {\n particle.opacity.velocity *= (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)();\n }\n }\n await Promise.resolve();\n }\n isEnabled(particle) {\n const none = 0;\n return !particle.destroyed && !particle.spawning && !!particle.opacity && particle.opacity.enable && ((particle.opacity.maxLoops ?? none) <= none || (particle.opacity.maxLoops ?? none) > none && (particle.opacity.loops ?? none) < (particle.opacity.maxLoops ?? none));\n }\n reset(particle) {\n if (particle.opacity) {\n particle.opacity.time = 0;\n particle.opacity.loops = 0;\n }\n }\n async update(particle, delta) {\n if (!this.isEnabled(particle) || !particle.opacity) {\n return;\n }\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.updateAnimation)(particle, particle.opacity, true, particle.options.opacity.animation.destroy, delta);\n await Promise.resolve();\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/opacity/dist/browser/OpacityUpdater.js?");
|
|
27
|
+
|
|
28
|
+
/***/ })
|
|
29
|
+
|
|
30
|
+
}]);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v3.2.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_fireworks"] = this["webpackChunk_tsparticles_fireworks"] || []).push([["updaters_opacity_dist_browser_index_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../updaters/opacity/dist/browser/index.js":
|
|
21
|
+
/*!****************************************************!*\
|
|
22
|
+
!*** ../../updaters/opacity/dist/browser/index.js ***!
|
|
23
|
+
\****************************************************/
|
|
24
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
25
|
+
|
|
26
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadOpacityUpdater: () => (/* binding */ loadOpacityUpdater)\n/* harmony export */ });\nasync function loadOpacityUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"opacity\", async container => {\n const {\n OpacityUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_opacity_dist_browser_OpacityUpdater_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./OpacityUpdater.js */ \"../../updaters/opacity/dist/browser/OpacityUpdater.js\"));\n return new OpacityUpdater(container);\n }, refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/opacity/dist/browser/index.js?");
|
|
27
|
+
|
|
28
|
+
/***/ })
|
|
29
|
+
|
|
30
|
+
}]);
|