@tsparticles/preset-fireworks 4.0.0-alpha.4 → 4.0.0-beta.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/1200.min.js +1 -0
- package/1361.min.js +1 -0
- package/1467.min.js +1 -0
- package/188.min.js +1 -0
- package/2086.min.js +1 -0
- package/2220.min.js +1 -0
- package/2902.min.js +1 -0
- package/2921.min.js +1 -0
- package/3010.min.js +1 -0
- package/3048.min.js +1 -0
- package/3072.min.js +1 -0
- package/{323.min.js → 311.min.js} +1 -1
- package/3153.min.js +1 -0
- package/3172.min.js +1 -0
- package/3326.min.js +1 -0
- package/361.min.js +1 -0
- package/3659.min.js +1 -0
- package/3784.min.js +1 -0
- package/3805.min.js +1 -0
- package/{163.min.js → 383.min.js} +2 -2
- package/4244.min.js +1 -0
- package/4750.min.js +1 -0
- package/4925.min.js +1 -0
- package/4957.min.js +1 -0
- package/5074.min.js +1 -0
- package/5647.min.js +1 -0
- package/5824.min.js +1 -0
- package/5857.min.js +1 -0
- package/6592.min.js +1 -0
- package/6700.min.js +1 -0
- package/6714.min.js +1 -0
- package/6895.min.js +1 -0
- package/7063.min.js +1 -0
- package/7072.min.js +1 -0
- package/7260.min.js +1 -0
- package/7404.min.js +1 -0
- package/7430.min.js +1 -0
- package/7632.min.js +1 -0
- package/7856.min.js +1 -0
- package/8304.min.js +1 -0
- package/8619.min.js +1 -0
- package/8738.min.js +1 -0
- package/8778.min.js +1 -0
- package/892.min.js +1 -0
- package/8998.min.js +1 -0
- package/915.min.js +1 -0
- package/9245.min.js +1 -0
- package/9358.min.js +1 -0
- package/9392.min.js +1 -0
- package/9719.min.js +1 -0
- package/9976.min.js +1 -0
- package/README.md +55 -3
- package/browser/index.js +27 -16
- package/browser/options.js +22 -41
- package/cjs/index.js +27 -16
- package/cjs/options.js +22 -41
- package/dist_browser_options_js.js +2 -2
- package/esm/index.js +27 -16
- package/esm/options.js +22 -41
- package/node_modules_pnpm_tsparticles_basic_4_0_0-beta_11_node_modules_tsparticles_basic_browser_index_js.js +30 -0
- package/{node_modules_pnpm_tsparticles_effect-trail_4_0_0-alpha_14_node_modules_tsparticles_effect-tra-79faa6.js → node_modules_pnpm_tsparticles_effect-trail_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-8a5947.js} +7 -7
- package/node_modules_pnpm_tsparticles_effect-trail_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-cb9e7e.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-emitters-shape-square_4_0_0-beta_11__tsparticles_engine_-85b81e.js +100 -0
- package/node_modules_pnpm_tsparticles_plugin-emitters-shape-square_4_0_0-beta_11__tsparticles_engine_-8b05f0.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-09a57e.js +100 -0
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-65b417.js +80 -0
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-74f6c1.js +50 -0
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-7e9977.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-7f13fa.js +30 -0
- package/{node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_14_node_modules_tsparticles_plugin--0e469e.js → node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-b6bb50.js} +7 -7
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-cf6e0a.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-daf8cd.js +100 -0
- package/{node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-alpha_14_node_modules_tsparticles_plugin-bd3833.js → node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-5e0ff2.js} +7 -7
- package/{node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-alpha_14_node_modules_tsparticles_plugin-5a675f.js → node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-b0d0ee.js} +7 -7
- package/node_modules_pnpm_tsparticles_plugin-hsl-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-060416.js +30 -0
- package/{node_modules_pnpm_tsparticles_plugin-hsl-color_4_0_0-alpha_14_node_modules_tsparticles_plugin-651bc0.js → node_modules_pnpm_tsparticles_plugin-hsl-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-a6d106.js} +7 -7
- package/node_modules_pnpm_tsparticles_plugin-interactivity_4_0_0-beta_11__tsparticles_engine_4_0_0-be-47e198.js +120 -0
- package/node_modules_pnpm_tsparticles_plugin-interactivity_4_0_0-beta_11__tsparticles_engine_4_0_0-be-710e43.js +70 -0
- package/node_modules_pnpm_tsparticles_plugin-move_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_nod-3a792b.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-move_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_nod-e1bc4b.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-rgb-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-d9836d.js +30 -0
- package/{node_modules_pnpm_tsparticles_plugin-rgb-color_4_0_0-alpha_14_node_modules_tsparticles_plugin-2d40c5.js → node_modules_pnpm_tsparticles_plugin-rgb-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-f22022.js} +7 -7
- package/{node_modules_pnpm_tsparticles_plugin-sounds_4_0_0-alpha_14_node_modules_tsparticles_plugin-so-dc7531.js → node_modules_pnpm_tsparticles_plugin-sounds_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_n-3d7d15.js} +7 -7
- package/node_modules_pnpm_tsparticles_shape-circle_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-7552ae.js +40 -0
- package/{node_modules_pnpm_tsparticles_shape-circle_4_0_0-alpha_14_node_modules_tsparticles_shape-circ-365204.js → node_modules_pnpm_tsparticles_shape-circle_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-b06fc7.js} +7 -7
- package/{node_modules_pnpm_tsparticles_shape-line_4_0_0-alpha_14_node_modules_tsparticles_shape-line_b-275ffe.js → node_modules_pnpm_tsparticles_shape-line_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_node-06caa0.js} +12 -12
- package/{node_modules_pnpm_tsparticles_shape-line_4_0_0-alpha_14_node_modules_tsparticles_shape-line_b-33a49d.js → node_modules_pnpm_tsparticles_shape-line_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_node-8f1b2c.js} +7 -7
- package/{node_modules_pnpm_tsparticles_updater-destroy_4_0_0-alpha_14_node_modules_tsparticles_updater-5833c9.js → node_modules_pnpm_tsparticles_updater-destroy_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-7f9f4b.js} +7 -7
- package/node_modules_pnpm_tsparticles_updater-life_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-9cea59.js +70 -0
- package/{node_modules_pnpm_tsparticles_updater-life_4_0_0-alpha_14_node_modules_tsparticles_updater-li-b2cf28.js → node_modules_pnpm_tsparticles_updater-life_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-a724a4.js} +7 -7
- package/node_modules_pnpm_tsparticles_updater-opacity_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-8f9e09.js +30 -0
- package/{node_modules_pnpm_tsparticles_updater-opacity_4_0_0-alpha_14_node_modules_tsparticles_updater-349756.js → node_modules_pnpm_tsparticles_updater-opacity_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-da77ce.js} +7 -7
- package/{node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-alpha_14_node_modules_tsparticles_updat-54df0b.js → node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_-df7144.js} +7 -7
- package/node_modules_pnpm_tsparticles_updater-paint_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_n-589482.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-paint_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_n-b1f330.js +30 -0
- package/{node_modules_pnpm_tsparticles_updater-rotate_4_0_0-alpha_14_node_modules_tsparticles_updater--2bc889.js → node_modules_pnpm_tsparticles_updater-rotate_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_-03eda6.js} +7 -7
- package/node_modules_pnpm_tsparticles_updater-rotate_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_-6626aa.js +50 -0
- package/node_modules_pnpm_tsparticles_updater-size_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-a47b81.js +30 -0
- package/{node_modules_pnpm_tsparticles_updater-size_4_0_0-alpha_14_node_modules_tsparticles_updater-si-9bb044.js → node_modules_pnpm_tsparticles_updater-size_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-d2508a.js} +7 -7
- package/package.json +11 -15
- package/report.html +84 -29
- package/tsparticles.preset.fireworks.bundle.js +331 -321
- package/tsparticles.preset.fireworks.bundle.min.js +2 -2
- package/tsparticles.preset.fireworks.js +22 -62
- package/tsparticles.preset.fireworks.min.js +2 -2
- package/vendors-node_modules_pnpm_tsparticles_engine_4_0_0-beta_11_node_modules_tsparticles_engine_br-ca098e.js +100 -0
- package/vendors-node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-6e84d5.js +30 -0
- package/vendors-node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-f34432.js +210 -0
- package/vendors-node_modules_pnpm_tsparticles_plugin-interactivity_4_0_0-beta_11__tsparticles_engine_-32e86c.js +50 -0
- package/vendors-node_modules_pnpm_tsparticles_plugin-move_4_0_0-beta_11__tsparticles_engine_4_0_0-bet-5f2b78.js +40 -0
- package/vendors-node_modules_pnpm_tsparticles_plugin-sounds_4_0_0-beta_11__tsparticles_engine_4_0_0-b-2693cf.js +130 -0
- package/vendors-node_modules_pnpm_tsparticles_plugin-sounds_4_0_0-beta_11__tsparticles_engine_4_0_0-b-9529dd.js +40 -0
- package/vendors-node_modules_pnpm_tsparticles_updater-destroy_4_0_0-beta_11__tsparticles_engine_4_0_0-194b6c.js +100 -0
- package/vendors-node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-beta_11__tsparticles_engine_4_0-09fa1a.js +80 -0
- package/110.min.js +0 -1
- package/115.min.js +0 -1
- package/120.min.js +0 -1
- package/15.min.js +0 -1
- package/154.min.js +0 -1
- package/162.min.js +0 -1
- package/177.min.js +0 -1
- package/218.min.js +0 -1
- package/219.min.js +0 -1
- package/227.min.js +0 -1
- package/239.min.js +0 -1
- package/240.min.js +0 -1
- package/252.min.js +0 -1
- package/258.min.js +0 -1
- package/26.min.js +0 -1
- package/298.min.js +0 -1
- package/341.min.js +0 -1
- package/355.min.js +0 -1
- package/359.min.js +0 -1
- package/386.min.js +0 -1
- package/388.min.js +0 -1
- package/402.min.js +0 -1
- package/418.min.js +0 -1
- package/486.min.js +0 -1
- package/488.min.js +0 -1
- package/491.min.js +0 -1
- package/542.min.js +0 -1
- package/551.min.js +0 -1
- package/571.min.js +0 -1
- package/584.min.js +0 -1
- package/634.min.js +0 -1
- package/646.min.js +0 -1
- package/654.min.js +0 -1
- package/662.min.js +0 -1
- package/666.min.js +0 -1
- package/668.min.js +0 -1
- package/68.min.js +0 -1
- package/714.min.js +0 -1
- package/72.min.js +0 -1
- package/722.min.js +0 -1
- package/835.min.js +0 -1
- package/837.min.js +0 -1
- package/876.min.js +0 -1
- package/891.min.js +0 -1
- package/939.min.js +0 -1
- package/96.min.js +0 -1
- package/node_modules_pnpm_tsparticles_basic_4_0_0-alpha_14_node_modules_tsparticles_basic_browser_index_js.js +0 -30
- package/node_modules_pnpm_tsparticles_effect-trail_4_0_0-alpha_14_node_modules_tsparticles_effect-tra-e1d476.js +0 -30
- package/node_modules_pnpm_tsparticles_move-base_4_0_0-alpha_14_node_modules_tsparticles_move-base_bro-0258ba.js +0 -30
- package/node_modules_pnpm_tsparticles_move-base_4_0_0-alpha_14_node_modules_tsparticles_move-base_bro-5558e3.js +0 -40
- package/node_modules_pnpm_tsparticles_plugin-emitters-shape-square_4_0_0-alpha_14_node_modules_tspart-1854a5.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-emitters-shape-square_4_0_0-alpha_14_node_modules_tspart-acf999.js +0 -70
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_14_node_modules_tsparticles_plugin--01c506.js +0 -50
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_14_node_modules_tsparticles_plugin--a27da9.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_14_node_modules_tsparticles_plugin--da9aa3.js +0 -90
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_14_node_modules_tsparticles_plugin--e12e29.js +0 -90
- package/node_modules_pnpm_tsparticles_plugin-hsl-color_4_0_0-alpha_14_node_modules_tsparticles_plugin-9b85f2.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-interactivity_4_0_0-alpha_14_node_modules_tsparticles_pl-07239f.js +0 -120
- package/node_modules_pnpm_tsparticles_plugin-interactivity_4_0_0-alpha_14_node_modules_tsparticles_pl-20b658.js +0 -70
- package/node_modules_pnpm_tsparticles_plugin-rgb-color_4_0_0-alpha_14_node_modules_tsparticles_plugin-9d691b.js +0 -30
- package/node_modules_pnpm_tsparticles_shape-circle_4_0_0-alpha_14_node_modules_tsparticles_shape-circ-21bd73.js +0 -40
- package/node_modules_pnpm_tsparticles_updater-color_4_0_0-alpha_14_node_modules_tsparticles_updater-c-a242d8.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-color_4_0_0-alpha_14_node_modules_tsparticles_updater-c-ed63c1.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-destroy_4_0_0-alpha_14_node_modules_tsparticles_updater-2645de.js +0 -100
- package/node_modules_pnpm_tsparticles_updater-life_4_0_0-alpha_14_node_modules_tsparticles_updater-li-bdb0d6.js +0 -70
- package/node_modules_pnpm_tsparticles_updater-opacity_4_0_0-alpha_14_node_modules_tsparticles_updater-2e428a.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-rotate_4_0_0-alpha_14_node_modules_tsparticles_updater--9ebf81.js +0 -50
- package/node_modules_pnpm_tsparticles_updater-size_4_0_0-alpha_14_node_modules_tsparticles_updater-si-1784d7.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-stroke-color_4_0_0-alpha_14_node_modules_tsparticles_up-06cc80.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-stroke-color_4_0_0-alpha_14_node_modules_tsparticles_up-58f25b.js +0 -30
- package/umd/bundle.js +0 -17
- package/umd/index.js +0 -67
- package/umd/options.js +0 -288
- package/vendors-node_modules_pnpm_tsparticles_engine_4_0_0-alpha_14_node_modules_tsparticles_engine_b-f5db4e.js +0 -90
- package/vendors-node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_14_node_modules_tsparticles-2b5629.js +0 -30
- package/vendors-node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_14_node_modules_tsparticles-88ac5e.js +0 -200
- package/vendors-node_modules_pnpm_tsparticles_plugin-interactivity_4_0_0-alpha_14_node_modules_tspart-261f0c.js +0 -50
- package/vendors-node_modules_pnpm_tsparticles_plugin-sounds_4_0_0-alpha_14_node_modules_tsparticles_p-50eeb2.js +0 -40
- package/vendors-node_modules_pnpm_tsparticles_plugin-sounds_4_0_0-alpha_14_node_modules_tsparticles_p-a4b657.js +0 -130
- package/vendors-node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-alpha_14_node_modules_tsparticl-56603a.js +0 -80
package/browser/index.js
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
const presetName = "fireworks";
|
|
2
2
|
export async function loadFireworksPreset(engine) {
|
|
3
|
-
await engine.register(async (e) => {
|
|
4
|
-
const { loadBasic }
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const [{ loadBasic }, { loadEmittersPluginSimple }, { loadTrailEffect }, { loadEmittersShapeSquare }, { loadSoundsPlugin }, { loadLineShape }, { loadRotateUpdater }, { loadDestroyUpdater }, { loadLifeUpdater }, { initOptions },] = await Promise.all([
|
|
5
|
+
import("@tsparticles/basic"),
|
|
6
|
+
import("@tsparticles/plugin-emitters/plugin"),
|
|
7
|
+
import("@tsparticles/effect-trail"),
|
|
8
|
+
import("@tsparticles/plugin-emitters-shape-square"),
|
|
9
|
+
import("@tsparticles/plugin-sounds"),
|
|
10
|
+
import("@tsparticles/shape-line"),
|
|
11
|
+
import("@tsparticles/updater-rotate"),
|
|
12
|
+
import("@tsparticles/updater-destroy"),
|
|
13
|
+
import("@tsparticles/updater-life"),
|
|
14
|
+
import("./options.js"),
|
|
15
|
+
]), loadEmittersForFireworks = async (e) => {
|
|
16
|
+
await loadEmittersPluginSimple(e);
|
|
17
|
+
await loadEmittersShapeSquare(e);
|
|
18
|
+
};
|
|
19
|
+
await Promise.all([
|
|
20
|
+
loadBasic(e),
|
|
21
|
+
loadEmittersForFireworks(e),
|
|
22
|
+
loadTrailEffect(e),
|
|
23
|
+
loadSoundsPlugin(e),
|
|
24
|
+
loadLineShape(e),
|
|
25
|
+
loadRotateUpdater(e),
|
|
26
|
+
loadDestroyUpdater(e),
|
|
27
|
+
loadLifeUpdater(e),
|
|
28
|
+
]);
|
|
29
|
+
e.pluginManager.addPreset(presetName, initOptions(), false);
|
|
19
30
|
});
|
|
20
31
|
}
|
package/browser/options.js
CHANGED
|
@@ -44,41 +44,12 @@ export function initOptions() {
|
|
|
44
44
|
};
|
|
45
45
|
}, fireworksOptions = [
|
|
46
46
|
"#FF0000",
|
|
47
|
-
"#FF2A00",
|
|
48
|
-
"#FF5500",
|
|
49
47
|
"#FF8000",
|
|
50
|
-
"#FFAA00",
|
|
51
|
-
"#FFD400",
|
|
52
48
|
"#FFFF00",
|
|
53
|
-
"#D4FF00",
|
|
54
|
-
"#AAFF00",
|
|
55
|
-
"#80FF00",
|
|
56
|
-
"#55FF00",
|
|
57
|
-
"#2AFF00",
|
|
58
49
|
"#00FF00",
|
|
59
|
-
"#00FF2A",
|
|
60
|
-
"#00FF55",
|
|
61
|
-
"#00FF80",
|
|
62
|
-
"#00FFAA",
|
|
63
|
-
"#00FFD4",
|
|
64
50
|
"#00FFFF",
|
|
65
|
-
"#00D4FF",
|
|
66
|
-
"#00AAFF",
|
|
67
|
-
"#0080FF",
|
|
68
|
-
"#0055FF",
|
|
69
|
-
"#002AFF",
|
|
70
51
|
"#0000FF",
|
|
71
|
-
"#2A00FF",
|
|
72
|
-
"#5500FF",
|
|
73
|
-
"#8000FF",
|
|
74
|
-
"#AA00FF",
|
|
75
|
-
"#D400FF",
|
|
76
52
|
"#FF00FF",
|
|
77
|
-
"#FF00D4",
|
|
78
|
-
"#FF00AA",
|
|
79
|
-
"#FF0080",
|
|
80
|
-
"#FF0055",
|
|
81
|
-
"#FF002A",
|
|
82
53
|
]
|
|
83
54
|
.map(color => {
|
|
84
55
|
const rgb = hexToRgba(color);
|
|
@@ -93,15 +64,20 @@ export function initOptions() {
|
|
|
93
64
|
max: 100,
|
|
94
65
|
}, sRange = fixRange({ min: hsl.s - sOffset, max: hsl.s + sOffset }, sBounds.min, sBounds.max), lRange = fixRange({ min: hsl.l - lOffset, max: hsl.l + lOffset }, lBounds.min, lBounds.max);
|
|
95
66
|
return {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
67
|
+
paint: {
|
|
68
|
+
fill: {
|
|
69
|
+
color: {
|
|
70
|
+
value: {
|
|
71
|
+
h: hsl.h,
|
|
72
|
+
s: sRange,
|
|
73
|
+
l: lRange,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
enable: true,
|
|
77
|
+
},
|
|
78
|
+
stroke: {
|
|
79
|
+
width: 0,
|
|
101
80
|
},
|
|
102
|
-
},
|
|
103
|
-
stroke: {
|
|
104
|
-
width: 0,
|
|
105
81
|
},
|
|
106
82
|
number: {
|
|
107
83
|
value: 0,
|
|
@@ -232,11 +208,16 @@ export function initOptions() {
|
|
|
232
208
|
size: {
|
|
233
209
|
value: 1,
|
|
234
210
|
},
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
211
|
+
paint: {
|
|
212
|
+
stroke: {
|
|
213
|
+
color: {
|
|
214
|
+
value: "#ffffff",
|
|
215
|
+
},
|
|
216
|
+
width: 1,
|
|
217
|
+
},
|
|
218
|
+
fill: {
|
|
219
|
+
enable: false,
|
|
238
220
|
},
|
|
239
|
-
width: 1,
|
|
240
221
|
},
|
|
241
222
|
move: {
|
|
242
223
|
enable: true,
|
package/cjs/index.js
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
const presetName = "fireworks";
|
|
2
2
|
export async function loadFireworksPreset(engine) {
|
|
3
|
-
await engine.register(async (e) => {
|
|
4
|
-
const { loadBasic }
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const [{ loadBasic }, { loadEmittersPluginSimple }, { loadTrailEffect }, { loadEmittersShapeSquare }, { loadSoundsPlugin }, { loadLineShape }, { loadRotateUpdater }, { loadDestroyUpdater }, { loadLifeUpdater }, { initOptions },] = await Promise.all([
|
|
5
|
+
import("@tsparticles/basic"),
|
|
6
|
+
import("@tsparticles/plugin-emitters/plugin"),
|
|
7
|
+
import("@tsparticles/effect-trail"),
|
|
8
|
+
import("@tsparticles/plugin-emitters-shape-square"),
|
|
9
|
+
import("@tsparticles/plugin-sounds"),
|
|
10
|
+
import("@tsparticles/shape-line"),
|
|
11
|
+
import("@tsparticles/updater-rotate"),
|
|
12
|
+
import("@tsparticles/updater-destroy"),
|
|
13
|
+
import("@tsparticles/updater-life"),
|
|
14
|
+
import("./options.js"),
|
|
15
|
+
]), loadEmittersForFireworks = async (e) => {
|
|
16
|
+
await loadEmittersPluginSimple(e);
|
|
17
|
+
await loadEmittersShapeSquare(e);
|
|
18
|
+
};
|
|
19
|
+
await Promise.all([
|
|
20
|
+
loadBasic(e),
|
|
21
|
+
loadEmittersForFireworks(e),
|
|
22
|
+
loadTrailEffect(e),
|
|
23
|
+
loadSoundsPlugin(e),
|
|
24
|
+
loadLineShape(e),
|
|
25
|
+
loadRotateUpdater(e),
|
|
26
|
+
loadDestroyUpdater(e),
|
|
27
|
+
loadLifeUpdater(e),
|
|
28
|
+
]);
|
|
29
|
+
e.pluginManager.addPreset(presetName, initOptions(), false);
|
|
19
30
|
});
|
|
20
31
|
}
|
package/cjs/options.js
CHANGED
|
@@ -44,41 +44,12 @@ export function initOptions() {
|
|
|
44
44
|
};
|
|
45
45
|
}, fireworksOptions = [
|
|
46
46
|
"#FF0000",
|
|
47
|
-
"#FF2A00",
|
|
48
|
-
"#FF5500",
|
|
49
47
|
"#FF8000",
|
|
50
|
-
"#FFAA00",
|
|
51
|
-
"#FFD400",
|
|
52
48
|
"#FFFF00",
|
|
53
|
-
"#D4FF00",
|
|
54
|
-
"#AAFF00",
|
|
55
|
-
"#80FF00",
|
|
56
|
-
"#55FF00",
|
|
57
|
-
"#2AFF00",
|
|
58
49
|
"#00FF00",
|
|
59
|
-
"#00FF2A",
|
|
60
|
-
"#00FF55",
|
|
61
|
-
"#00FF80",
|
|
62
|
-
"#00FFAA",
|
|
63
|
-
"#00FFD4",
|
|
64
50
|
"#00FFFF",
|
|
65
|
-
"#00D4FF",
|
|
66
|
-
"#00AAFF",
|
|
67
|
-
"#0080FF",
|
|
68
|
-
"#0055FF",
|
|
69
|
-
"#002AFF",
|
|
70
51
|
"#0000FF",
|
|
71
|
-
"#2A00FF",
|
|
72
|
-
"#5500FF",
|
|
73
|
-
"#8000FF",
|
|
74
|
-
"#AA00FF",
|
|
75
|
-
"#D400FF",
|
|
76
52
|
"#FF00FF",
|
|
77
|
-
"#FF00D4",
|
|
78
|
-
"#FF00AA",
|
|
79
|
-
"#FF0080",
|
|
80
|
-
"#FF0055",
|
|
81
|
-
"#FF002A",
|
|
82
53
|
]
|
|
83
54
|
.map(color => {
|
|
84
55
|
const rgb = hexToRgba(color);
|
|
@@ -93,15 +64,20 @@ export function initOptions() {
|
|
|
93
64
|
max: 100,
|
|
94
65
|
}, sRange = fixRange({ min: hsl.s - sOffset, max: hsl.s + sOffset }, sBounds.min, sBounds.max), lRange = fixRange({ min: hsl.l - lOffset, max: hsl.l + lOffset }, lBounds.min, lBounds.max);
|
|
95
66
|
return {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
67
|
+
paint: {
|
|
68
|
+
fill: {
|
|
69
|
+
color: {
|
|
70
|
+
value: {
|
|
71
|
+
h: hsl.h,
|
|
72
|
+
s: sRange,
|
|
73
|
+
l: lRange,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
enable: true,
|
|
77
|
+
},
|
|
78
|
+
stroke: {
|
|
79
|
+
width: 0,
|
|
101
80
|
},
|
|
102
|
-
},
|
|
103
|
-
stroke: {
|
|
104
|
-
width: 0,
|
|
105
81
|
},
|
|
106
82
|
number: {
|
|
107
83
|
value: 0,
|
|
@@ -232,11 +208,16 @@ export function initOptions() {
|
|
|
232
208
|
size: {
|
|
233
209
|
value: 1,
|
|
234
210
|
},
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
211
|
+
paint: {
|
|
212
|
+
stroke: {
|
|
213
|
+
color: {
|
|
214
|
+
value: "#ffffff",
|
|
215
|
+
},
|
|
216
|
+
width: 1,
|
|
217
|
+
},
|
|
218
|
+
fill: {
|
|
219
|
+
enable: false,
|
|
238
220
|
},
|
|
239
|
-
width: 1,
|
|
240
221
|
},
|
|
241
222
|
move: {
|
|
242
223
|
enable: true,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v4.0.0-
|
|
7
|
+
* v4.0.0-beta.0
|
|
8
8
|
*/
|
|
9
9
|
"use strict";
|
|
10
10
|
/*
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
\*********************************/
|
|
24
24
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25
25
|
|
|
26
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ initOptions: () => (/* binding */ initOptions)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../node_modules/.pnpm/@tsparticles+engine@4.0.0-
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ initOptions: () => (/* binding */ initOptions)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../node_modules/.pnpm/@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/engine/browser/index.js\");\n\nfunction initOptions() {\n const explodeSoundCheck = (args)=>{\n const data = args.data;\n return data.particle.options.move.gravity.inverse;\n }, fixRange = (value, min, max)=>{\n const minValue = 0, diffSMax = value.max > max ? value.max - max : minValue;\n let res = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(value);\n if (diffSMax) {\n res = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(value.min - diffSMax, max);\n }\n const diffSMin = value.min < min ? value.min : minValue;\n if (diffSMin) {\n res = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(minValue, value.max + diffSMin);\n }\n return res;\n }, hexToRgba = (hex)=>{\n let hexValue = hex;\n const shortRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])([a-f\\d])?$/i;\n if (shortRegex.test(hexValue)) {\n hexValue = hexValue.replace(shortRegex, (_m, r, g, b, a)=>r + r + g + g + b + b + (a ? a + a : \"\"));\n }\n const regex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})?$/i, result = regex.exec(hexValue);\n if (!result) {\n return undefined;\n }\n result.shift();\n const indexes = {\n a: 3,\n b: 2,\n g: 1,\n r: 0\n }, values = {\n a: result[indexes.a],\n b: result[indexes.b],\n g: result[indexes.g],\n r: result[indexes.r]\n }, hexRadix = 16;\n return {\n r: values.r ? Number.parseInt(values.r, hexRadix) : _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.none,\n g: values.g ? Number.parseInt(values.g, hexRadix) : _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.none,\n b: values.b ? Number.parseInt(values.b, hexRadix) : _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.none,\n a: values.a ? Number.parseInt(values.a, hexRadix) : _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.defaultAlpha\n };\n }, fireworksOptions = [\n \"#FF0000\",\n \"#FF8000\",\n \"#FFFF00\",\n \"#00FF00\",\n \"#00FFFF\",\n \"#0000FF\",\n \"#FF00FF\"\n ].map((color)=>{\n const rgb = hexToRgba(color);\n if (!rgb) {\n return undefined;\n }\n const hsl = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rgbToHsl)(rgb), sOffset = 30, lOffset = 30, sBounds = {\n min: 0,\n max: 100\n }, lBounds = {\n min: 0,\n max: 100\n }, sRange = fixRange({\n min: hsl.s - sOffset,\n max: hsl.s + sOffset\n }, sBounds.min, sBounds.max), lRange = fixRange({\n min: hsl.l - lOffset,\n max: hsl.l + lOffset\n }, lBounds.min, lBounds.max);\n return {\n paint: {\n fill: {\n color: {\n value: {\n h: hsl.h,\n s: sRange,\n l: lRange\n }\n },\n enable: true\n },\n stroke: {\n width: 0\n }\n },\n number: {\n value: 0\n },\n opacity: {\n value: {\n min: 0.1,\n max: 1\n },\n animation: {\n enable: true,\n speed: 0.7,\n sync: false,\n startValue: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.StartValueType.max,\n destroy: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.DestroyType.min\n }\n },\n shape: {\n type: \"circle\"\n },\n effect: {\n type: \"trail\",\n options: {\n trail: {\n length: {\n min: 5,\n max: 10\n }\n }\n }\n },\n size: {\n value: {\n min: 1,\n max: 2\n },\n animation: {\n enable: true,\n speed: 5,\n count: 1,\n sync: false,\n startValue: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.StartValueType.min,\n destroy: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.DestroyType.none\n }\n },\n life: {\n count: 1,\n duration: {\n value: {\n min: 1,\n max: 2\n }\n }\n },\n move: {\n decay: {\n min: 0.075,\n max: 0.1\n },\n enable: true,\n gravity: {\n enable: true,\n inverse: false,\n acceleration: 5\n },\n speed: {\n min: 5,\n max: 15\n },\n direction: \"none\",\n outModes: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.destroy\n }\n };\n }).filter((t)=>t !== undefined);\n return {\n detectRetina: true,\n background: {\n color: \"#000\"\n },\n fpsLimit: 120,\n emitters: {\n direction: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.MoveDirection.top,\n rate: {\n delay: 0.3,\n quantity: 1\n },\n size: {\n width: 100,\n height: 0\n },\n position: {\n y: 100,\n x: 50\n }\n },\n particles: {\n number: {\n value: 0\n },\n destroy: {\n mode: \"split\",\n bounds: {\n top: {\n min: 15,\n max: 35\n }\n },\n split: {\n sizeOffset: false,\n count: 1,\n factor: {\n value: 0.333333\n },\n rate: {\n value: {\n min: 75,\n max: 150\n }\n },\n particles: fireworksOptions\n }\n },\n life: {\n count: 1\n },\n shape: {\n type: \"circle\"\n },\n effect: {\n type: \"trail\",\n options: {\n trail: {\n length: {\n min: 5,\n max: 15\n },\n minWidth: 1,\n maxWidth: 1\n }\n }\n },\n size: {\n value: 1\n },\n paint: {\n stroke: {\n color: {\n value: \"#ffffff\"\n },\n width: 1\n },\n fill: {\n enable: false\n }\n },\n move: {\n enable: true,\n gravity: {\n acceleration: 15,\n enable: true,\n inverse: true,\n maxSpeed: 100\n },\n speed: {\n min: 10,\n max: 20\n },\n outModes: {\n default: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.destroy,\n top: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.none\n }\n }\n },\n sounds: {\n enable: true,\n events: [\n {\n event: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.EventType.particleRemoved,\n filter: explodeSoundCheck,\n audio: [\n \"https://particles.js.org/audio/explosion0.mp3\",\n \"https://particles.js.org/audio/explosion1.mp3\",\n \"https://particles.js.org/audio/explosion2.mp3\"\n ]\n }\n ],\n volume: 50\n }\n };\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-fireworks/./dist/browser/options.js?\n}");
|
|
27
27
|
|
|
28
28
|
/***/ }
|
|
29
29
|
|
package/esm/index.js
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
const presetName = "fireworks";
|
|
2
2
|
export async function loadFireworksPreset(engine) {
|
|
3
|
-
await engine.register(async (e) => {
|
|
4
|
-
const { loadBasic }
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const [{ loadBasic }, { loadEmittersPluginSimple }, { loadTrailEffect }, { loadEmittersShapeSquare }, { loadSoundsPlugin }, { loadLineShape }, { loadRotateUpdater }, { loadDestroyUpdater }, { loadLifeUpdater }, { initOptions },] = await Promise.all([
|
|
5
|
+
import("@tsparticles/basic"),
|
|
6
|
+
import("@tsparticles/plugin-emitters/plugin"),
|
|
7
|
+
import("@tsparticles/effect-trail"),
|
|
8
|
+
import("@tsparticles/plugin-emitters-shape-square"),
|
|
9
|
+
import("@tsparticles/plugin-sounds"),
|
|
10
|
+
import("@tsparticles/shape-line"),
|
|
11
|
+
import("@tsparticles/updater-rotate"),
|
|
12
|
+
import("@tsparticles/updater-destroy"),
|
|
13
|
+
import("@tsparticles/updater-life"),
|
|
14
|
+
import("./options.js"),
|
|
15
|
+
]), loadEmittersForFireworks = async (e) => {
|
|
16
|
+
await loadEmittersPluginSimple(e);
|
|
17
|
+
await loadEmittersShapeSquare(e);
|
|
18
|
+
};
|
|
19
|
+
await Promise.all([
|
|
20
|
+
loadBasic(e),
|
|
21
|
+
loadEmittersForFireworks(e),
|
|
22
|
+
loadTrailEffect(e),
|
|
23
|
+
loadSoundsPlugin(e),
|
|
24
|
+
loadLineShape(e),
|
|
25
|
+
loadRotateUpdater(e),
|
|
26
|
+
loadDestroyUpdater(e),
|
|
27
|
+
loadLifeUpdater(e),
|
|
28
|
+
]);
|
|
29
|
+
e.pluginManager.addPreset(presetName, initOptions(), false);
|
|
19
30
|
});
|
|
20
31
|
}
|
package/esm/options.js
CHANGED
|
@@ -44,41 +44,12 @@ export function initOptions() {
|
|
|
44
44
|
};
|
|
45
45
|
}, fireworksOptions = [
|
|
46
46
|
"#FF0000",
|
|
47
|
-
"#FF2A00",
|
|
48
|
-
"#FF5500",
|
|
49
47
|
"#FF8000",
|
|
50
|
-
"#FFAA00",
|
|
51
|
-
"#FFD400",
|
|
52
48
|
"#FFFF00",
|
|
53
|
-
"#D4FF00",
|
|
54
|
-
"#AAFF00",
|
|
55
|
-
"#80FF00",
|
|
56
|
-
"#55FF00",
|
|
57
|
-
"#2AFF00",
|
|
58
49
|
"#00FF00",
|
|
59
|
-
"#00FF2A",
|
|
60
|
-
"#00FF55",
|
|
61
|
-
"#00FF80",
|
|
62
|
-
"#00FFAA",
|
|
63
|
-
"#00FFD4",
|
|
64
50
|
"#00FFFF",
|
|
65
|
-
"#00D4FF",
|
|
66
|
-
"#00AAFF",
|
|
67
|
-
"#0080FF",
|
|
68
|
-
"#0055FF",
|
|
69
|
-
"#002AFF",
|
|
70
51
|
"#0000FF",
|
|
71
|
-
"#2A00FF",
|
|
72
|
-
"#5500FF",
|
|
73
|
-
"#8000FF",
|
|
74
|
-
"#AA00FF",
|
|
75
|
-
"#D400FF",
|
|
76
52
|
"#FF00FF",
|
|
77
|
-
"#FF00D4",
|
|
78
|
-
"#FF00AA",
|
|
79
|
-
"#FF0080",
|
|
80
|
-
"#FF0055",
|
|
81
|
-
"#FF002A",
|
|
82
53
|
]
|
|
83
54
|
.map(color => {
|
|
84
55
|
const rgb = hexToRgba(color);
|
|
@@ -93,15 +64,20 @@ export function initOptions() {
|
|
|
93
64
|
max: 100,
|
|
94
65
|
}, sRange = fixRange({ min: hsl.s - sOffset, max: hsl.s + sOffset }, sBounds.min, sBounds.max), lRange = fixRange({ min: hsl.l - lOffset, max: hsl.l + lOffset }, lBounds.min, lBounds.max);
|
|
95
66
|
return {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
67
|
+
paint: {
|
|
68
|
+
fill: {
|
|
69
|
+
color: {
|
|
70
|
+
value: {
|
|
71
|
+
h: hsl.h,
|
|
72
|
+
s: sRange,
|
|
73
|
+
l: lRange,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
enable: true,
|
|
77
|
+
},
|
|
78
|
+
stroke: {
|
|
79
|
+
width: 0,
|
|
101
80
|
},
|
|
102
|
-
},
|
|
103
|
-
stroke: {
|
|
104
|
-
width: 0,
|
|
105
81
|
},
|
|
106
82
|
number: {
|
|
107
83
|
value: 0,
|
|
@@ -232,11 +208,16 @@ export function initOptions() {
|
|
|
232
208
|
size: {
|
|
233
209
|
value: 1,
|
|
234
210
|
},
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
211
|
+
paint: {
|
|
212
|
+
stroke: {
|
|
213
|
+
color: {
|
|
214
|
+
value: "#ffffff",
|
|
215
|
+
},
|
|
216
|
+
width: 1,
|
|
217
|
+
},
|
|
218
|
+
fill: {
|
|
219
|
+
enable: false,
|
|
238
220
|
},
|
|
239
|
-
width: 1,
|
|
240
221
|
},
|
|
241
222
|
move: {
|
|
242
223
|
enable: true,
|
|
@@ -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
|
+
* v4.0.0-beta.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_preset_fireworks"] = this["webpackChunk_tsparticles_preset_fireworks"] || []).push([["node_modules_pnpm_tsparticles_basic_4_0_0-beta_11_node_modules_tsparticles_basic_browser_index_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+basic@4.0.0-beta.11/node_modules/@tsparticles/basic/browser/index.js"
|
|
21
|
+
/*!******************************************************************************************************************!*\
|
|
22
|
+
!*** ../../node_modules/.pnpm/@tsparticles+basic@4.0.0-beta.11/node_modules/@tsparticles/basic/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 */ loadBasic: () => (/* binding */ loadBasic)\n/* harmony export */ });\nasync function loadBasic(engine) {\n engine.checkVersion(\"4.0.0-beta.11\");\n await engine.pluginManager.register(async (e) => {\n const [{ loadHexColorPlugin }, { loadHslColorPlugin }, { loadRgbColorPlugin }, { loadMovePlugin }, { loadCircleShape }, { loadPaintUpdater }, { loadOpacityUpdater }, { loadOutModesUpdater }, { loadSizeUpdater },] = await Promise.all([\n __webpack_require__.e(/*! import() */ \"node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-b0d0ee\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/plugin-hex-color */ \"../../node_modules/.pnpm/@tsparticles+plugin-hex-color@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/plugin-hex-color/browser/index.js\")),\n __webpack_require__.e(/*! import() */ \"node_modules_pnpm_tsparticles_plugin-hsl-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-a6d106\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/plugin-hsl-color */ \"../../node_modules/.pnpm/@tsparticles+plugin-hsl-color@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/plugin-hsl-color/browser/index.js\")),\n __webpack_require__.e(/*! import() */ \"node_modules_pnpm_tsparticles_plugin-rgb-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-f22022\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/plugin-rgb-color */ \"../../node_modules/.pnpm/@tsparticles+plugin-rgb-color@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/plugin-rgb-color/browser/index.js\")),\n __webpack_require__.e(/*! import() */ \"node_modules_pnpm_tsparticles_plugin-move_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_nod-e1bc4b\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/plugin-move */ \"../../node_modules/.pnpm/@tsparticles+plugin-move@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/plugin-move/browser/index.js\")),\n __webpack_require__.e(/*! import() */ \"node_modules_pnpm_tsparticles_shape-circle_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-b06fc7\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/shape-circle */ \"../../node_modules/.pnpm/@tsparticles+shape-circle@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/shape-circle/browser/index.js\")),\n __webpack_require__.e(/*! import() */ \"node_modules_pnpm_tsparticles_updater-paint_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_n-b1f330\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/updater-paint */ \"../../node_modules/.pnpm/@tsparticles+updater-paint@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-paint/browser/index.js\")),\n __webpack_require__.e(/*! import() */ \"node_modules_pnpm_tsparticles_updater-opacity_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-da77ce\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/updater-opacity */ \"../../node_modules/.pnpm/@tsparticles+updater-opacity@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-opacity/browser/index.js\")),\n __webpack_require__.e(/*! import() */ \"node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_-df7144\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/updater-out-modes */ \"../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/index.js\")),\n __webpack_require__.e(/*! import() */ \"node_modules_pnpm_tsparticles_updater-size_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-d2508a\").then(__webpack_require__.bind(__webpack_require__, /*! @tsparticles/updater-size */ \"../../node_modules/.pnpm/@tsparticles+updater-size@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-size/browser/index.js\")),\n ]);\n await Promise.all([\n loadHexColorPlugin(e),\n loadHslColorPlugin(e),\n loadRgbColorPlugin(e),\n loadMovePlugin(e),\n loadCircleShape(e),\n loadPaintUpdater(e),\n loadOpacityUpdater(e),\n loadOutModesUpdater(e),\n loadSizeUpdater(e),\n ]);\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-fireworks/../../node_modules/.pnpm/@tsparticles+basic@4.0.0-beta.11/node_modules/@tsparticles/basic/browser/index.js?\n}");
|
|
27
|
+
|
|
28
|
+
/***/ }
|
|
29
|
+
|
|
30
|
+
}]);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v4.0.0-
|
|
7
|
+
* v4.0.0-beta.0
|
|
8
8
|
*/
|
|
9
9
|
"use strict";
|
|
10
10
|
/*
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
* or disable the default devtool with "devtool: false".
|
|
16
16
|
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
17
|
*/
|
|
18
|
-
(this["webpackChunk_tsparticles_preset_fireworks"] = this["webpackChunk_tsparticles_preset_fireworks"] || []).push([["node_modules_pnpm_tsparticles_effect-trail_4_0_0-
|
|
18
|
+
(this["webpackChunk_tsparticles_preset_fireworks"] = this["webpackChunk_tsparticles_preset_fireworks"] || []).push([["node_modules_pnpm_tsparticles_effect-trail_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-8a5947"],{
|
|
19
19
|
|
|
20
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+effect-trail@4.0.0-
|
|
21
|
-
|
|
22
|
-
!*** ../../node_modules/.pnpm/@tsparticles+effect-trail@4.0.0-
|
|
23
|
-
|
|
20
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+effect-trail@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/effect-trail/browser/index.js"
|
|
21
|
+
/*!******************************************************************************************************************************************************************!*\
|
|
22
|
+
!*** ../../node_modules/.pnpm/@tsparticles+effect-trail@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/effect-trail/browser/index.js ***!
|
|
23
|
+
\******************************************************************************************************************************************************************/
|
|
24
24
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25
25
|
|
|
26
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadTrailEffect: () => (/* binding */ loadTrailEffect)\n/* harmony export */ });\nasync function loadTrailEffect(engine) {\n engine.checkVersion(\"4.0.0-
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadTrailEffect: () => (/* binding */ loadTrailEffect)\n/* harmony export */ });\nasync function loadTrailEffect(engine) {\n engine.checkVersion(\"4.0.0-beta.11\");\n await engine.pluginManager.register(e => {\n e.pluginManager.addEffect(\"trail\", async (container) => {\n const { TrailDrawer } = await __webpack_require__.e(/*! import() */ \"node_modules_pnpm_tsparticles_effect-trail_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-cb9e7e\").then(__webpack_require__.bind(__webpack_require__, /*! ./TrailDrawer.js */ \"../../node_modules/.pnpm/@tsparticles+effect-trail@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/effect-trail/browser/TrailDrawer.js\"));\n return new TrailDrawer(container);\n });\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-fireworks/../../node_modules/.pnpm/@tsparticles+effect-trail@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/effect-trail/browser/index.js?\n}");
|
|
27
27
|
|
|
28
28
|
/***/ }
|
|
29
29
|
|
|
@@ -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
|
+
* v4.0.0-beta.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_preset_fireworks"] = this["webpackChunk_tsparticles_preset_fireworks"] || []).push([["node_modules_pnpm_tsparticles_effect-trail_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-cb9e7e"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+effect-trail@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/effect-trail/browser/TrailDrawer.js"
|
|
21
|
+
/*!************************************************************************************************************************************************************************!*\
|
|
22
|
+
!*** ../../node_modules/.pnpm/@tsparticles+effect-trail@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/effect-trail/browser/TrailDrawer.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 */ TrailDrawer: () => (/* binding */ TrailDrawer)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../node_modules/.pnpm/@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/engine/browser/index.js\");\n\nconst minTrailLength = 3, trailLengthOffset = 1, minWidth = -1, firstIndex = 0, defaultLength = 10, loopTrailLengthOffset = 2, loopTrailLengthMinIndex = 0;\nconst defaultTransform = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n};\nclass TrailDrawer {\n _container;\n constructor(container) {\n this._container = container;\n }\n drawAfter(data) {\n const { context, drawPosition, drawRadius, drawScale, particle, transformData } = data, container = this._container, diameter = drawRadius * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.double, pxRatio = container.retina.pixelRatio, trail = particle.trail;\n if (!trail || !particle.trailLength) {\n return;\n }\n const currentPos = drawPosition, pathLength = particle.trailLength * drawScale + drawRadius;\n trail.push({\n color: context.fillStyle || context.strokeStyle,\n position: {\n x: currentPos.x,\n y: currentPos.y,\n },\n transformData,\n });\n if (trail.length < minTrailLength) {\n return;\n }\n const pathLengthFloor = Math.floor(pathLength);\n if (trail.length > pathLengthFloor) {\n trail.splice(firstIndex, trail.length - pathLengthFloor);\n }\n const trailLength = Math.min(trail.length, pathLength), canvasSize = {\n width: container.canvas.size.width * drawScale + diameter,\n height: container.canvas.size.height * drawScale + diameter,\n };\n context.save();\n context.lineCap = \"butt\";\n context.lineJoin = \"round\";\n for (let i = trailLength - loopTrailLengthOffset; i > loopTrailLengthMinIndex; i--) {\n const previousStep = trail[i + trailLengthOffset], step = trail[i], nextStep = trail[i - trailLengthOffset];\n if (!previousStep || !step || !nextStep) {\n continue;\n }\n const previousPosition = previousStep.position, position = step.position, nextPosition = nextStep.position, stepTransformData = particle.trailTransform ? (step.transformData ?? defaultTransform) : defaultTransform, { distance: previousDistance } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(previousPosition, position), { distance: nextDistance } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(position, nextPosition);\n if (previousDistance > pathLength * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.double || nextDistance > pathLength * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.double) {\n continue;\n }\n if (Math.abs(previousPosition.x - position.x) > canvasSize.width * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half ||\n Math.abs(previousPosition.y - position.y) > canvasSize.height * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half ||\n Math.abs(position.x - nextPosition.x) > canvasSize.width * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half ||\n Math.abs(position.y - nextPosition.y) > canvasSize.height * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half) {\n continue;\n }\n context.setTransform(stepTransformData.a, stepTransformData.b, stepTransformData.c, stepTransformData.d, position.x, position.y);\n const startX = (previousPosition.x + position.x) * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half - position.x, startY = (previousPosition.y + position.y) * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half - position.y, endX = (position.x + nextPosition.x) * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half - position.x, endY = (position.y + nextPosition.y) * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half - position.y;\n context.beginPath();\n context.moveTo(startX, startY);\n context.quadraticCurveTo(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.originPoint.x, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.originPoint.y, endX, endY);\n const width = Math.max((i / trailLength) * diameter, pxRatio, (particle.trailMinWidth ?? minWidth) * drawScale), oldAlpha = context.globalAlpha;\n context.globalAlpha = particle.trailFade ? i / trailLength : _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.defaultAlpha;\n context.lineWidth = particle.trailMaxWidth ? Math.min(width, particle.trailMaxWidth * drawScale) : width;\n context.strokeStyle = step.color;\n context.stroke();\n context.globalAlpha = oldAlpha;\n }\n context.restore();\n }\n particleInit(container, particle) {\n particle.trail = [];\n const effectData = particle.effectData;\n particle.trailFade = effectData?.fade ?? true;\n particle.trailLength = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(effectData?.length ?? defaultLength) * container.retina.pixelRatio;\n particle.trailMaxWidth = effectData?.maxWidth\n ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(effectData.maxWidth) * container.retina.pixelRatio\n : undefined;\n particle.trailMinWidth = effectData?.minWidth\n ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(effectData.minWidth) * container.retina.pixelRatio\n : undefined;\n particle.trailTransform = effectData?.transform ?? false;\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-fireworks/../../node_modules/.pnpm/@tsparticles+effect-trail@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/effect-trail/browser/TrailDrawer.js?\n}");
|
|
27
|
+
|
|
28
|
+
/***/ }
|
|
29
|
+
|
|
30
|
+
}]);
|