@tsparticles/confetti 4.0.0-alpha.8 → 4.0.0-beta.1
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/1051.min.js +1 -0
- package/1121.min.js +1 -0
- package/1167.min.js +1 -0
- package/143.min.js +1 -0
- package/1510.min.js +1 -0
- package/1744.min.js +1 -0
- package/1767.min.js +1 -0
- package/2454.min.js +1 -0
- package/2554.min.js +1 -0
- package/2866.min.js +1 -0
- package/301.min.js +1 -0
- package/3088.min.js +1 -0
- package/3304.min.js +1 -0
- package/3323.min.js +1 -0
- package/335.min.js +1 -0
- package/3477.min.js +1 -0
- package/349.min.js +1 -0
- package/3737.min.js +1 -0
- package/3844.min.js +1 -0
- package/394.min.js +1 -0
- package/4051.min.js +1 -0
- package/410.min.js +1 -0
- package/4129.min.js +1 -0
- package/4191.min.js +1 -0
- package/4468.min.js +1 -0
- package/4550.min.js +1 -0
- package/4726.min.js +1 -0
- package/4837.min.js +1 -0
- package/5056.min.js +1 -0
- package/5174.min.js +1 -0
- package/5212.min.js +1 -0
- package/5347.min.js +1 -0
- package/5532.min.js +1 -0
- package/5541.min.js +1 -0
- package/5602.min.js +1 -0
- package/5651.min.js +1 -0
- package/5668.min.js +1 -0
- package/5686.min.js +1 -0
- package/5742.min.js +1 -0
- package/6364.min.js +1 -0
- package/6412.min.js +1 -0
- package/6496.min.js +1 -0
- package/6598.min.js +1 -0
- package/6897.min.js +1 -0
- package/7017.min.js +1 -0
- package/7041.min.js +1 -0
- package/7149.min.js +1 -0
- package/7157.min.js +1 -0
- package/719.min.js +1 -0
- package/7374.min.js +1 -0
- package/7590.min.js +1 -0
- package/7596.min.js +1 -0
- package/7604.min.js +1 -0
- package/8274.min.js +1 -0
- package/8360.min.js +1 -0
- package/8446.min.js +1 -0
- package/8626.min.js +1 -0
- package/8805.min.js +1 -0
- package/8930.min.js +1 -0
- package/9027.min.js +1 -0
- package/9072.min.js +1 -0
- package/9134.min.js +1 -0
- package/9293.min.js +1 -0
- package/9368.min.js +1 -0
- package/9748.min.js +1 -0
- package/9950.min.js +1 -0
- package/README.md +45 -6
- package/basic_dist_browser_index_js.js +2 -2
- package/browser/ConfettiOptions.js +18 -2
- package/browser/confetti.js +52 -32
- package/cjs/ConfettiOptions.js +18 -2
- package/cjs/confetti.js +52 -32
- package/engine_dist_browser_Core_Container_js.js +30 -20
- package/esm/ConfettiOptions.js +18 -2
- package/esm/confetti.js +52 -32
- package/package.json +17 -17
- package/plugins_colors_hex_dist_browser_HexColorManager_js.js +2 -2
- package/plugins_colors_hex_dist_browser_index_js.js +2 -2
- package/plugins_colors_hsl_dist_browser_HslColorManager_js.js +2 -2
- package/plugins_colors_hsl_dist_browser_index_js.js +2 -2
- package/plugins_colors_rgb_dist_browser_RgbColorManager_js.js +2 -2
- package/plugins_colors_rgb_dist_browser_index_js.js +2 -2
- package/plugins_emitters_dist_browser_EmitterInstance_js.js +2 -2
- package/plugins_emitters_dist_browser_EmittersInstancesManager_js.js +18 -8
- package/plugins_emitters_dist_browser_EmittersInteractor_js.js +58 -48
- package/plugins_emitters_dist_browser_EmittersPluginInstance_js.js +2 -2
- package/plugins_emitters_dist_browser_EmittersPlugin_js.js +18 -8
- package/plugins_emitters_dist_browser_ShapeManager_js.js +2 -2
- package/plugins_emitters_dist_browser_index_js.js +4 -4
- package/plugins_interactivity_dist_browser_InteractivityPluginInstance_js.js +4 -4
- package/plugins_interactivity_dist_browser_InteractivityPlugin_js.js +6 -6
- package/plugins_interactivity_dist_browser_index_js.js +40 -40
- package/plugins_motion_dist_browser_MotionPluginInstance_js.js +2 -2
- package/plugins_motion_dist_browser_MotionPlugin_js.js +4 -4
- package/plugins_motion_dist_browser_index_js.js +2 -2
- package/plugins_move_dist_browser_MovePluginInstance_js.js +40 -0
- package/plugins_move_dist_browser_MovePlugin_js.js +30 -0
- package/plugins_move_dist_browser_index_js.js +30 -0
- package/report.html +84 -29
- package/shapes_cards_dist_browser_cards_CardDrawer_js.js +3 -53
- package/shapes_cards_dist_browser_clubs_ClubDrawer_js.js +2 -52
- package/shapes_cards_dist_browser_diamonds_DiamondDrawer_js.js +2 -52
- package/shapes_cards_dist_browser_hearts_HeartDrawer_js.js +2 -52
- package/shapes_cards_dist_browser_index_js.js +7 -7
- package/shapes_cards_dist_browser_paths_js.js +70 -0
- package/shapes_cards_dist_browser_spades_SpadeDrawer_js.js +2 -52
- package/shapes_circle_dist_browser_CircleDrawer_js.js +3 -3
- package/shapes_circle_dist_browser_index_js.js +2 -2
- package/shapes_emoji_dist_browser_EmojiDrawer_js.js +17 -7
- package/shapes_emoji_dist_browser_index_js.js +12 -2
- package/shapes_heart_dist_browser_HeartDrawer_js.js +3 -3
- package/shapes_heart_dist_browser_index_js.js +2 -2
- package/shapes_image_dist_browser_GifUtils_Utils_js.js +6 -16
- package/shapes_image_dist_browser_ImageDrawer_js.js +2 -2
- package/{move_base_dist_browser_index_js.js → shapes_image_dist_browser_ImagePreloaderInstance_js.js} +7 -7
- package/shapes_image_dist_browser_ImagePreloader_js.js +3 -3
- package/shapes_image_dist_browser_index_js.js +12 -2
- package/shapes_polygon_dist_browser_PolygonDrawer_js.js +4 -4
- package/shapes_polygon_dist_browser_TriangleDrawer_js.js +4 -4
- package/shapes_polygon_dist_browser_index_js.js +2 -2
- package/shapes_square_dist_browser_SquareDrawer_js.js +3 -3
- package/shapes_square_dist_browser_index_js.js +2 -2
- package/shapes_star_dist_browser_StarDrawer_js.js +3 -3
- package/shapes_star_dist_browser_index_js.js +2 -2
- package/tsparticles.confetti.bundle.js +102 -90
- package/tsparticles.confetti.bundle.min.js +2 -2
- package/tsparticles.confetti.js +41 -41
- package/tsparticles.confetti.min.js +1 -2
- package/types/confetti.d.ts +1 -1
- package/umd/ConfettiOptions.js +18 -2
- package/umd/confetti.js +52 -32
- package/updaters_fillColor_dist_browser_FillColorUpdater_js.js +30 -0
- package/updaters_fillColor_dist_browser_index_js.js +30 -0
- package/updaters_life_dist_browser_LifeUpdater_js.js +6 -6
- package/updaters_life_dist_browser_index_js.js +2 -2
- package/updaters_opacity_dist_browser_OpacityUpdater_js.js +2 -2
- package/updaters_opacity_dist_browser_index_js.js +2 -2
- package/updaters_outModes_dist_browser_OutOfCanvasUpdater_js.js +7 -7
- package/updaters_outModes_dist_browser_index_js.js +2 -2
- package/updaters_roll_dist_browser_RollUpdater_js.js +6 -6
- package/updaters_roll_dist_browser_index_js.js +2 -2
- package/updaters_rotate_dist_browser_RotateUpdater_js.js +4 -4
- package/updaters_rotate_dist_browser_index_js.js +2 -2
- package/updaters_size_dist_browser_SizeUpdater_js.js +2 -2
- package/updaters_size_dist_browser_index_js.js +2 -2
- package/updaters_tilt_dist_browser_TiltUpdater_js.js +5 -5
- package/updaters_tilt_dist_browser_index_js.js +2 -2
- package/updaters_wobble_dist_browser_WobbleUpdater_js.js +5 -5
- package/updaters_wobble_dist_browser_index_js.js +2 -2
- package/1049.min.js +0 -2
- package/1049.min.js.LICENSE.txt +0 -1
- package/1085.min.js +0 -2
- package/1085.min.js.LICENSE.txt +0 -1
- package/1183.min.js +0 -2
- package/1183.min.js.LICENSE.txt +0 -1
- package/1446.min.js +0 -2
- package/1446.min.js.LICENSE.txt +0 -1
- package/1608.min.js +0 -2
- package/1608.min.js.LICENSE.txt +0 -1
- package/176.min.js +0 -2
- package/176.min.js.LICENSE.txt +0 -1
- package/1801.min.js +0 -2
- package/1801.min.js.LICENSE.txt +0 -1
- package/1887.min.js +0 -2
- package/1887.min.js.LICENSE.txt +0 -1
- package/2201.min.js +0 -2
- package/2201.min.js.LICENSE.txt +0 -1
- package/2615.min.js +0 -2
- package/2615.min.js.LICENSE.txt +0 -1
- package/2729.min.js +0 -2
- package/2729.min.js.LICENSE.txt +0 -1
- package/2842.min.js +0 -2
- package/2842.min.js.LICENSE.txt +0 -1
- package/2942.min.js +0 -2
- package/2942.min.js.LICENSE.txt +0 -1
- package/3003.min.js +0 -2
- package/3003.min.js.LICENSE.txt +0 -1
- package/3148.min.js +0 -2
- package/3148.min.js.LICENSE.txt +0 -1
- package/3209.min.js +0 -2
- package/3209.min.js.LICENSE.txt +0 -1
- package/3306.min.js +0 -2
- package/3306.min.js.LICENSE.txt +0 -1
- package/3380.min.js +0 -2
- package/3380.min.js.LICENSE.txt +0 -1
- package/3446.min.js +0 -2
- package/3446.min.js.LICENSE.txt +0 -1
- package/3451.min.js +0 -2
- package/3451.min.js.LICENSE.txt +0 -1
- package/346.min.js +0 -2
- package/346.min.js.LICENSE.txt +0 -1
- package/3629.min.js +0 -2
- package/3629.min.js.LICENSE.txt +0 -1
- package/3712.min.js +0 -2
- package/3712.min.js.LICENSE.txt +0 -1
- package/3743.min.js +0 -2
- package/3743.min.js.LICENSE.txt +0 -1
- package/3744.min.js +0 -2
- package/3744.min.js.LICENSE.txt +0 -1
- package/3759.min.js +0 -2
- package/3759.min.js.LICENSE.txt +0 -1
- package/3804.min.js +0 -2
- package/3804.min.js.LICENSE.txt +0 -1
- package/4340.min.js +0 -2
- package/4340.min.js.LICENSE.txt +0 -1
- package/4544.min.js +0 -2
- package/4544.min.js.LICENSE.txt +0 -1
- package/4698.min.js +0 -2
- package/4698.min.js.LICENSE.txt +0 -1
- package/5113.min.js +0 -2
- package/5113.min.js.LICENSE.txt +0 -1
- package/5166.min.js +0 -2
- package/5166.min.js.LICENSE.txt +0 -1
- package/521.min.js +0 -2
- package/521.min.js.LICENSE.txt +0 -1
- package/5221.min.js +0 -2
- package/5221.min.js.LICENSE.txt +0 -1
- package/5302.min.js +0 -2
- package/5302.min.js.LICENSE.txt +0 -1
- package/5505.min.js +0 -2
- package/5505.min.js.LICENSE.txt +0 -1
- package/5913.min.js +0 -2
- package/5913.min.js.LICENSE.txt +0 -1
- package/597.min.js +0 -2
- package/597.min.js.LICENSE.txt +0 -1
- package/620.min.js +0 -2
- package/620.min.js.LICENSE.txt +0 -1
- package/6249.min.js +0 -2
- package/6249.min.js.LICENSE.txt +0 -1
- package/6388.min.js +0 -2
- package/6388.min.js.LICENSE.txt +0 -1
- package/6441.min.js +0 -2
- package/6441.min.js.LICENSE.txt +0 -1
- package/6580.min.js +0 -2
- package/6580.min.js.LICENSE.txt +0 -1
- package/6608.min.js +0 -2
- package/6608.min.js.LICENSE.txt +0 -1
- package/671.min.js +0 -2
- package/671.min.js.LICENSE.txt +0 -1
- package/6824.min.js +0 -2
- package/6824.min.js.LICENSE.txt +0 -1
- package/7012.min.js +0 -2
- package/7012.min.js.LICENSE.txt +0 -1
- package/7056.min.js +0 -2
- package/7056.min.js.LICENSE.txt +0 -1
- package/7160.min.js +0 -2
- package/7160.min.js.LICENSE.txt +0 -1
- package/718.min.js +0 -2
- package/718.min.js.LICENSE.txt +0 -1
- package/7188.min.js +0 -2
- package/7188.min.js.LICENSE.txt +0 -1
- package/7191.min.js +0 -2
- package/7191.min.js.LICENSE.txt +0 -1
- package/7256.min.js +0 -2
- package/7256.min.js.LICENSE.txt +0 -1
- package/7259.min.js +0 -2
- package/7259.min.js.LICENSE.txt +0 -1
- package/761.min.js +0 -2
- package/761.min.js.LICENSE.txt +0 -1
- package/7704.min.js +0 -2
- package/7704.min.js.LICENSE.txt +0 -1
- package/7749.min.js +0 -2
- package/7749.min.js.LICENSE.txt +0 -1
- package/8026.min.js +0 -2
- package/8026.min.js.LICENSE.txt +0 -1
- package/8296.min.js +0 -2
- package/8296.min.js.LICENSE.txt +0 -1
- package/8445.min.js +0 -2
- package/8445.min.js.LICENSE.txt +0 -1
- package/8526.min.js +0 -2
- package/8526.min.js.LICENSE.txt +0 -1
- package/8847.min.js +0 -2
- package/8847.min.js.LICENSE.txt +0 -1
- package/8993.min.js +0 -2
- package/8993.min.js.LICENSE.txt +0 -1
- package/9127.min.js +0 -2
- package/9127.min.js.LICENSE.txt +0 -1
- package/9216.min.js +0 -2
- package/9216.min.js.LICENSE.txt +0 -1
- package/9234.min.js +0 -2
- package/9234.min.js.LICENSE.txt +0 -1
- package/9273.min.js +0 -2
- package/9273.min.js.LICENSE.txt +0 -1
- package/9410.min.js +0 -2
- package/9410.min.js.LICENSE.txt +0 -1
- package/9467.min.js +0 -2
- package/9467.min.js.LICENSE.txt +0 -1
- package/9591.min.js +0 -2
- package/9591.min.js.LICENSE.txt +0 -1
- package/move_base_dist_browser_BaseMover_js.js +0 -40
- package/shapes_image_dist_browser_Utils_js.js +0 -30
- package/tsparticles.confetti.bundle.min.js.LICENSE.txt +0 -1
- package/tsparticles.confetti.min.js.LICENSE.txt +0 -1
- package/updaters_color_dist_browser_ColorUpdater_js.js +0 -30
- package/updaters_color_dist_browser_index_js.js +0 -30
package/umd/ConfettiOptions.js
CHANGED
|
@@ -12,6 +12,22 @@
|
|
|
12
12
|
exports.ConfettiOptions = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
14
|
class ConfettiOptions {
|
|
15
|
+
angle;
|
|
16
|
+
colors;
|
|
17
|
+
count;
|
|
18
|
+
decay;
|
|
19
|
+
disableForReducedMotion;
|
|
20
|
+
drift;
|
|
21
|
+
flat;
|
|
22
|
+
gravity;
|
|
23
|
+
position;
|
|
24
|
+
scalar;
|
|
25
|
+
shapeOptions;
|
|
26
|
+
shapes;
|
|
27
|
+
spread;
|
|
28
|
+
startVelocity;
|
|
29
|
+
ticks;
|
|
30
|
+
zIndex;
|
|
15
31
|
constructor() {
|
|
16
32
|
this.angle = 90;
|
|
17
33
|
this.count = 50;
|
|
@@ -84,8 +100,8 @@
|
|
|
84
100
|
const origin = data.origin;
|
|
85
101
|
if (origin && !data.position) {
|
|
86
102
|
data.position = {
|
|
87
|
-
x: origin.x
|
|
88
|
-
y: origin.y
|
|
103
|
+
x: origin.x === undefined ? undefined : origin.x * engine_1.percentDenominator,
|
|
104
|
+
y: origin.y === undefined ? undefined : origin.y * engine_1.percentDenominator,
|
|
89
105
|
};
|
|
90
106
|
}
|
|
91
107
|
const position = data.position;
|
package/umd/confetti.js
CHANGED
|
@@ -46,10 +46,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
46
46
|
exports.confetti = confetti;
|
|
47
47
|
const engine_1 = require("@tsparticles/engine");
|
|
48
48
|
const ConfettiOptions_js_1 = require("./ConfettiOptions.js");
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
let initializing = false;
|
|
52
|
-
const ids = new Map();
|
|
49
|
+
let initialized = false, initializing = false;
|
|
50
|
+
const ids = new Map(), defaultGravity = 9.81, sizeFactor = 5, speedFactor = 3, decayOffset = 1, disableRotate = 0, disableTilt = 0;
|
|
53
51
|
async function initPlugins(engine) {
|
|
54
52
|
if (initialized) {
|
|
55
53
|
return;
|
|
@@ -66,24 +64,42 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
66
64
|
});
|
|
67
65
|
}
|
|
68
66
|
initializing = true;
|
|
69
|
-
engine.checkVersion("4.0.0-
|
|
70
|
-
await engine.register(async (e) => {
|
|
71
|
-
const {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
67
|
+
engine.checkVersion("4.0.0-beta.1");
|
|
68
|
+
await engine.pluginManager.register(async (e) => {
|
|
69
|
+
const [{ loadBasic }, { loadEmittersPlugin }, { loadMotionPlugin }, { loadCardSuitsShape }, { loadHeartShape }, { loadImageShape }, { loadPolygonShape }, { loadSquareShape }, { loadStarShape }, { loadEmojiShape }, { loadRotateUpdater }, { loadLifeUpdater }, { loadRollUpdater }, { loadTiltUpdater }, { loadWobbleUpdater },] = await Promise.all([
|
|
70
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/basic"))) : new Promise((resolve_1, reject_1) => { require(["@tsparticles/basic"], resolve_1, reject_1); }).then(__importStar),
|
|
71
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-emitters"))) : new Promise((resolve_2, reject_2) => { require(["@tsparticles/plugin-emitters"], resolve_2, reject_2); }).then(__importStar),
|
|
72
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-motion"))) : new Promise((resolve_3, reject_3) => { require(["@tsparticles/plugin-motion"], resolve_3, reject_3); }).then(__importStar),
|
|
73
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/shape-cards"))) : new Promise((resolve_4, reject_4) => { require(["@tsparticles/shape-cards"], resolve_4, reject_4); }).then(__importStar),
|
|
74
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/shape-heart"))) : new Promise((resolve_5, reject_5) => { require(["@tsparticles/shape-heart"], resolve_5, reject_5); }).then(__importStar),
|
|
75
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/shape-image"))) : new Promise((resolve_6, reject_6) => { require(["@tsparticles/shape-image"], resolve_6, reject_6); }).then(__importStar),
|
|
76
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/shape-polygon"))) : new Promise((resolve_7, reject_7) => { require(["@tsparticles/shape-polygon"], resolve_7, reject_7); }).then(__importStar),
|
|
77
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/shape-square"))) : new Promise((resolve_8, reject_8) => { require(["@tsparticles/shape-square"], resolve_8, reject_8); }).then(__importStar),
|
|
78
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/shape-star"))) : new Promise((resolve_9, reject_9) => { require(["@tsparticles/shape-star"], resolve_9, reject_9); }).then(__importStar),
|
|
79
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/shape-emoji"))) : new Promise((resolve_10, reject_10) => { require(["@tsparticles/shape-emoji"], resolve_10, reject_10); }).then(__importStar),
|
|
80
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-rotate"))) : new Promise((resolve_11, reject_11) => { require(["@tsparticles/updater-rotate"], resolve_11, reject_11); }).then(__importStar),
|
|
81
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-life"))) : new Promise((resolve_12, reject_12) => { require(["@tsparticles/updater-life"], resolve_12, reject_12); }).then(__importStar),
|
|
82
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-roll"))) : new Promise((resolve_13, reject_13) => { require(["@tsparticles/updater-roll"], resolve_13, reject_13); }).then(__importStar),
|
|
83
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-tilt"))) : new Promise((resolve_14, reject_14) => { require(["@tsparticles/updater-tilt"], resolve_14, reject_14); }).then(__importStar),
|
|
84
|
+
__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-wobble"))) : new Promise((resolve_15, reject_15) => { require(["@tsparticles/updater-wobble"], resolve_15, reject_15); }).then(__importStar),
|
|
85
|
+
]);
|
|
86
|
+
await Promise.all([
|
|
87
|
+
loadBasic(e),
|
|
88
|
+
loadMotionPlugin(e),
|
|
89
|
+
loadEmittersPlugin(e),
|
|
90
|
+
loadCardSuitsShape(e),
|
|
91
|
+
loadHeartShape(e),
|
|
92
|
+
loadImageShape(e),
|
|
93
|
+
loadPolygonShape(e),
|
|
94
|
+
loadSquareShape(e),
|
|
95
|
+
loadStarShape(e),
|
|
96
|
+
loadEmojiShape(e),
|
|
97
|
+
loadRotateUpdater(e),
|
|
98
|
+
loadLifeUpdater(e),
|
|
99
|
+
loadRollUpdater(e),
|
|
100
|
+
loadTiltUpdater(e),
|
|
101
|
+
loadWobbleUpdater(e),
|
|
102
|
+
]);
|
|
87
103
|
});
|
|
88
104
|
initializing = false;
|
|
89
105
|
initialized = true;
|
|
@@ -97,7 +113,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
97
113
|
container = ids.get(params.id);
|
|
98
114
|
if (container && !container.destroyed) {
|
|
99
115
|
const alias = container;
|
|
100
|
-
if (
|
|
116
|
+
if ("addEmitter" in alias) {
|
|
101
117
|
await alias.addEmitter?.({
|
|
102
118
|
startCount: actualOptions.count,
|
|
103
119
|
position: actualOptions.position,
|
|
@@ -114,8 +130,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
114
130
|
count: 1,
|
|
115
131
|
},
|
|
116
132
|
particles: {
|
|
117
|
-
|
|
118
|
-
|
|
133
|
+
fill: {
|
|
134
|
+
color: {
|
|
135
|
+
value: actualOptions.colors,
|
|
136
|
+
},
|
|
137
|
+
enable: true,
|
|
119
138
|
},
|
|
120
139
|
shape: {
|
|
121
140
|
type: actualOptions.shapes,
|
|
@@ -215,8 +234,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
215
234
|
number: {
|
|
216
235
|
value: 0,
|
|
217
236
|
},
|
|
218
|
-
|
|
219
|
-
|
|
237
|
+
fill: {
|
|
238
|
+
color: {
|
|
239
|
+
value: actualOptions.colors,
|
|
240
|
+
},
|
|
241
|
+
enable: true,
|
|
220
242
|
},
|
|
221
243
|
shape: {
|
|
222
244
|
type: actualOptions.shapes,
|
|
@@ -339,8 +361,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
339
361
|
}
|
|
340
362
|
async function confetti(idOrOptions, confettiOptions) {
|
|
341
363
|
await initPlugins(engine_1.tsParticles);
|
|
342
|
-
let options;
|
|
343
|
-
let id;
|
|
364
|
+
let options, id;
|
|
344
365
|
if ((0, engine_1.isString)(idOrOptions)) {
|
|
345
366
|
id = idOrOptions;
|
|
346
367
|
options = confettiOptions ?? {};
|
|
@@ -359,8 +380,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
359
380
|
const id = canvas.getAttribute("id") ?? "confetti";
|
|
360
381
|
canvas.setAttribute("id", id);
|
|
361
382
|
return async (idOrOptions, confettiOptions) => {
|
|
362
|
-
let subOptions;
|
|
363
|
-
let subId;
|
|
383
|
+
let subOptions, subId;
|
|
364
384
|
if ((0, engine_1.isString)(idOrOptions)) {
|
|
365
385
|
subId = idOrOptions;
|
|
366
386
|
subOptions = confettiOptions ?? options;
|
|
@@ -379,6 +399,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
379
399
|
confetti.init = async () => {
|
|
380
400
|
await initPlugins(engine_1.tsParticles);
|
|
381
401
|
};
|
|
382
|
-
confetti.version = "4.0.0-
|
|
402
|
+
confetti.version = "4.0.0-beta.1";
|
|
383
403
|
globalThis.confetti = confetti;
|
|
384
404
|
});
|
|
@@ -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.1
|
|
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_confetti"] = this["webpackChunk_tsparticles_confetti"] || []).push([["updaters_fillColor_dist_browser_FillColorUpdater_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../updaters/fillColor/dist/browser/FillColorUpdater.js"
|
|
21
|
+
/*!*****************************************************************!*\
|
|
22
|
+
!*** ../../updaters/fillColor/dist/browser/FillColorUpdater.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 */ FillColorUpdater: () => (/* binding */ FillColorUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass FillColorUpdater {\n _container;\n _pluginManager;\n constructor(pluginManager, container){\n this._container = container;\n this._pluginManager = pluginManager;\n }\n init(particle) {\n const container = this._container, options = particle.options, fill = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.itemFromSingleOrMultiple)(options.fill, particle.id, options.reduceDuplicates);\n if (!fill) {\n return;\n }\n particle.fillEnabled = fill.enable;\n particle.fillOpacity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(fill.opacity);\n particle.fillAnimation = fill.color.animation;\n const fillHslColor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToHsl)(this._pluginManager, fill.color);\n if (fillHslColor) {\n particle.fillColor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getHslAnimationFromHsl)(fillHslColor, particle.fillAnimation, container.retina.reduceFactor);\n }\n }\n isEnabled(particle) {\n const color = particle.fillAnimation, { fillColor } = particle;\n return !particle.destroyed && !particle.spawning && !!color && (fillColor?.h.value !== undefined && fillColor.h.enable || fillColor?.s.value !== undefined && fillColor.s.enable || fillColor?.l.value !== undefined && fillColor.l.enable);\n }\n update(particle, delta) {\n if (!this.isEnabled(particle)) {\n return;\n }\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.updateColor)(particle.fillColor, delta);\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/fillColor/dist/browser/FillColorUpdater.js?\n}");
|
|
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
|
+
* v4.0.0-beta.1
|
|
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_confetti"] = this["webpackChunk_tsparticles_confetti"] || []).push([["updaters_fillColor_dist_browser_index_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../updaters/fillColor/dist/browser/index.js"
|
|
21
|
+
/*!******************************************************!*\
|
|
22
|
+
!*** ../../updaters/fillColor/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 */ loadFillColorUpdater: () => (/* binding */ loadFillColorUpdater)\n/* harmony export */ });\nasync function loadFillColorUpdater(engine) {\n engine.checkVersion(\"4.0.0-beta.1\");\n await engine.pluginManager.register((e)=>{\n e.pluginManager.addParticleUpdater(\"color\", async (container)=>{\n const { FillColorUpdater } = await __webpack_require__.e(/*! import() */ \"updaters_fillColor_dist_browser_FillColorUpdater_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./FillColorUpdater.js */ \"../../updaters/fillColor/dist/browser/FillColorUpdater.js\"));\n return new FillColorUpdater(e.pluginManager, container);\n });\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/fillColor/dist/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.1
|
|
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 */ 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/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Utils.js */ \"../../updaters/life/dist/browser/Utils.js\");\n\n\n\nconst noTime = 0
|
|
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/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Utils.js */ \"../../updaters/life/dist/browser/Utils.js\");\n\n\n\nconst noTime = 0, identity = 1, infiniteValue = -1;\nclass LifeUpdater {\n container;\n constructor(container){\n this.container = container;\n }\n init(particle) {\n const container = this.container, particlesOptions = particle.options, 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 particle.spawning = particle.life.delay > noTime;\n }\n isEnabled(particle) {\n return !particle.destroyed;\n }\n loadOptions(options, ...sources) {\n options.life ??= new _Options_Classes_Life_js__WEBPACK_IMPORTED_MODULE_1__.Life();\n for (const source of sources){\n options.life.load(source?.life);\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle) || !particle.life) {\n return;\n }\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_2__.updateLife)(particle, delta, this.container.canvas.size);\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/life/dist/browser/LifeUpdater.js?\n}");
|
|
27
27
|
|
|
28
28
|
/***/ },
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
33
33
|
\****************************************************************/
|
|
34
34
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
35
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 _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _LifeDelay_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LifeDelay.js */ \"../../updaters/life/dist/browser/Options/Classes/LifeDelay.js\");\n/* harmony import */ var _LifeDuration_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LifeDuration.js */ \"../../updaters/life/dist/browser/Options/Classes/LifeDuration.js\");\n\n\n\nclass Life {\n
|
|
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 _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _LifeDelay_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LifeDelay.js */ \"../../updaters/life/dist/browser/Options/Classes/LifeDelay.js\");\n/* harmony import */ var _LifeDuration_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LifeDuration.js */ \"../../updaters/life/dist/browser/Options/Classes/LifeDuration.js\");\n\n\n\nclass Life {\n count;\n delay;\n duration;\n constructor(){\n this.count = 0;\n this.delay = new _LifeDelay_js__WEBPACK_IMPORTED_MODULE_1__.LifeDelay();\n this.duration = new _LifeDuration_js__WEBPACK_IMPORTED_MODULE_2__.LifeDuration();\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(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\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/life/dist/browser/Options/Classes/Life.js?\n}");
|
|
37
37
|
|
|
38
38
|
/***/ },
|
|
39
39
|
|
|
@@ -43,7 +43,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
43
43
|
\*********************************************************************/
|
|
44
44
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
45
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
|
|
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 sync;\n constructor(){\n super();\n this.sync = false;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n super.load(data);\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/life/dist/browser/Options/Classes/LifeDelay.js?\n}");
|
|
47
47
|
|
|
48
48
|
/***/ },
|
|
49
49
|
|
|
@@ -53,7 +53,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
53
53
|
\************************************************************************/
|
|
54
54
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
55
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
|
|
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 sync;\n constructor(){\n super();\n this.sync = false;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n super.load(data);\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/life/dist/browser/Options/Classes/LifeDuration.js?\n}");
|
|
57
57
|
|
|
58
58
|
/***/ },
|
|
59
59
|
|
|
@@ -63,7 +63,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
63
63
|
\*************************************************/
|
|
64
64
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
65
65
|
|
|
66
|
-
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
|
|
66
|
+
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, infiniteValue = -1, noLife = 0, 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 (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), heightRange = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(minCanvasSize, canvasSize.width);\n particle.position.x = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)(widthRange);\n particle.position.y = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)(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\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/life/dist/browser/Utils.js?\n}");
|
|
67
67
|
|
|
68
68
|
/***/ }
|
|
69
69
|
|
|
@@ -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.1
|
|
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 */ loadLifeUpdater: () => (/* binding */ loadLifeUpdater)\n/* harmony export */ });\nasync function loadLifeUpdater(engine) {\n
|
|
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) {\n engine.checkVersion(\"4.0.0-beta.1\");\n await engine.pluginManager.register((e)=>{\n e.pluginManager.addParticleUpdater(\"life\", async (container)=>{\n const { LifeUpdater } = 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 });\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/life/dist/browser/index.js?\n}");
|
|
27
27
|
|
|
28
28
|
/***/ }
|
|
29
29
|
|
|
@@ -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.1
|
|
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 */ 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
|
|
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 container;\n constructor(container){\n this.container = container;\n }\n init(particle) {\n const opacityOptions = particle.options.opacity, 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 }\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 return;\n }\n particle.opacity.time = 0;\n particle.opacity.loops = 0;\n }\n 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 }\n}\n\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/opacity/dist/browser/OpacityUpdater.js?\n}");
|
|
27
27
|
|
|
28
28
|
/***/ }
|
|
29
29
|
|
|
@@ -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.1
|
|
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 */ loadOpacityUpdater: () => (/* binding */ loadOpacityUpdater)\n/* harmony export */ });\nasync function loadOpacityUpdater(engine) {\n
|
|
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) {\n engine.checkVersion(\"4.0.0-beta.1\");\n await engine.pluginManager.register((e)=>{\n e.pluginManager.addParticleUpdater(\"opacity\", async (container)=>{\n const { OpacityUpdater } = 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 });\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/opacity/dist/browser/index.js?\n}");
|
|
27
27
|
|
|
28
28
|
/***/ }
|
|
29
29
|
|
|
@@ -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.1
|
|
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 */ BounceOutMode: () => (/* binding */ BounceOutMode)\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 _Utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Utils.js */ \"../../updaters/outModes/dist/browser/Utils.js\");\n\n\nclass BounceOutMode {\n
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BounceOutMode: () => (/* binding */ BounceOutMode)\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 _Utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Utils.js */ \"../../updaters/outModes/dist/browser/Utils.js\");\n\n\nclass BounceOutMode {\n container;\n modes;\n _particleBouncePlugins;\n constructor(container){\n this.container = container;\n this.modes = [\n _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.bounce,\n _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.split\n ];\n this._particleBouncePlugins = container.plugins.filter((p)=>p.particleBounce !== undefined);\n }\n update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n let handled = false;\n for (const plugin of this._particleBouncePlugins){\n handled = plugin.particleBounce?.(particle, delta, direction) ?? false;\n if (handled) {\n break;\n }\n }\n if (handled) {\n return;\n }\n const pos = particle.getPosition(), offset = particle.offset, size = particle.getRadius(), bounds = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.calculateBounds)(pos, size), canvasSize = container.canvas.size;\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__.bounceHorizontal)({\n particle,\n outMode,\n direction,\n bounds,\n canvasSize,\n offset,\n size\n });\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__.bounceVertical)({\n particle,\n outMode,\n direction,\n bounds,\n canvasSize,\n offset,\n size\n });\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/outModes/dist/browser/BounceOutMode.js?\n}");
|
|
27
27
|
|
|
28
28
|
/***/ },
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
33
33
|
\**************************************************************/
|
|
34
34
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
35
35
|
|
|
36
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DestroyOutMode: () => (/* binding */ DestroyOutMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst minVelocity = 0;\nclass DestroyOutMode {\n
|
|
36
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DestroyOutMode: () => (/* binding */ DestroyOutMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst minVelocity = 0;\nclass DestroyOutMode {\n container;\n modes;\n constructor(container){\n this.container = container;\n this.modes = [\n _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.destroy\n ];\n }\n update(particle, direction, _delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n switch(particle.outType){\n case _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticleOutType.normal:\n case _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticleOutType.outside:\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isPointInside)(particle.position, container.canvas.size, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.originPoint, particle.getRadius(), direction)) {\n return;\n }\n break;\n case _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticleOutType.inside:\n {\n const { dx, dy } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(particle.position, particle.moveCenter), { x: vx, y: vy } = particle.velocity;\n if (vx < minVelocity && dx > particle.moveCenter.radius || vy < minVelocity && dy > particle.moveCenter.radius || vx >= minVelocity && dx < -particle.moveCenter.radius || vy >= minVelocity && dy < -particle.moveCenter.radius) {\n return;\n }\n break;\n }\n }\n particle.destroy(true);\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/outModes/dist/browser/DestroyOutMode.js?\n}");
|
|
37
37
|
|
|
38
38
|
/***/ },
|
|
39
39
|
|
|
@@ -43,7 +43,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
43
43
|
\***********************************************************/
|
|
44
44
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
45
45
|
|
|
46
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ NoneOutMode: () => (/* binding */ NoneOutMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst minVelocity = 0;\nclass NoneOutMode {\n
|
|
46
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ NoneOutMode: () => (/* binding */ NoneOutMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst minVelocity = 0;\nclass NoneOutMode {\n container;\n modes;\n constructor(container){\n this.container = container;\n this.modes = [\n _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.none\n ];\n }\n update(particle, direction, _delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n if ((particle.options.move.distance.horizontal && (direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left || direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right)) ?? (particle.options.move.distance.vertical && (direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top || direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom))) {\n return;\n }\n const gravityOptions = particle.options.move.gravity, container = this.container, canvasSize = container.canvas.size, pRadius = particle.getRadius();\n if (!gravityOptions.enable) {\n if (particle.velocity.y > minVelocity && particle.position.y <= canvasSize.height + pRadius || particle.velocity.y < minVelocity && particle.position.y >= -pRadius || particle.velocity.x > minVelocity && particle.position.x <= canvasSize.width + pRadius || particle.velocity.x < minVelocity && particle.position.x >= -pRadius) {\n return;\n }\n if (!(0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isPointInside)(particle.position, container.canvas.size, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.originPoint, pRadius, direction)) {\n particle.destroy();\n }\n } else {\n const position = particle.position;\n if (!gravityOptions.inverse && position.y > canvasSize.height + pRadius && direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom || gravityOptions.inverse && position.y < -pRadius && direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top) {\n particle.destroy();\n }\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/outModes/dist/browser/NoneOutMode.js?\n}");
|
|
47
47
|
|
|
48
48
|
/***/ },
|
|
49
49
|
|
|
@@ -53,7 +53,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
53
53
|
\******************************************************************/
|
|
54
54
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
55
55
|
|
|
56
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OutOfCanvasUpdater: () => (/* binding */ OutOfCanvasUpdater)\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 _BounceOutMode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BounceOutMode.js */ \"../../updaters/outModes/dist/browser/BounceOutMode.js\");\n/* harmony import */ var _DestroyOutMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DestroyOutMode.js */ \"../../updaters/outModes/dist/browser/DestroyOutMode.js\");\n/* harmony import */ var _NoneOutMode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./NoneOutMode.js */ \"../../updaters/outModes/dist/browser/NoneOutMode.js\");\n/* harmony import */ var _OutOutMode_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./OutOutMode.js */ \"../../updaters/outModes/dist/browser/OutOutMode.js\");\n\n\n\n\n\nconst checkOutMode = (outModes, outMode)
|
|
56
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OutOfCanvasUpdater: () => (/* binding */ OutOfCanvasUpdater)\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 _BounceOutMode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BounceOutMode.js */ \"../../updaters/outModes/dist/browser/BounceOutMode.js\");\n/* harmony import */ var _DestroyOutMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DestroyOutMode.js */ \"../../updaters/outModes/dist/browser/DestroyOutMode.js\");\n/* harmony import */ var _NoneOutMode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./NoneOutMode.js */ \"../../updaters/outModes/dist/browser/NoneOutMode.js\");\n/* harmony import */ var _OutOutMode_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./OutOutMode.js */ \"../../updaters/outModes/dist/browser/OutOutMode.js\");\n\n\n\n\n\nconst checkOutMode = (outModes, outMode)=>{\n return outModes.default === outMode || outModes.bottom === outMode || outModes.left === outMode || outModes.right === outMode || outModes.top === outMode;\n};\nclass OutOfCanvasUpdater {\n updaters;\n container;\n constructor(container){\n this.container = container;\n this.updaters = new Map();\n }\n init(particle) {\n this._addUpdaterIfMissing(particle, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.bounce, (container)=>new _BounceOutMode_js__WEBPACK_IMPORTED_MODULE_1__.BounceOutMode(container));\n this._addUpdaterIfMissing(particle, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.out, (container)=>new _OutOutMode_js__WEBPACK_IMPORTED_MODULE_4__.OutOutMode(container));\n this._addUpdaterIfMissing(particle, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.destroy, (container)=>new _DestroyOutMode_js__WEBPACK_IMPORTED_MODULE_2__.DestroyOutMode(container));\n this._addUpdaterIfMissing(particle, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.none, (container)=>new _NoneOutMode_js__WEBPACK_IMPORTED_MODULE_3__.NoneOutMode(container));\n }\n isEnabled(particle) {\n return !particle.destroyed && !particle.spawning;\n }\n update(particle, delta) {\n const outModes = particle.options.move.outModes;\n this._updateOutMode(particle, delta, outModes.bottom ?? outModes.default, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom);\n this._updateOutMode(particle, delta, outModes.left ?? outModes.default, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left);\n this._updateOutMode(particle, delta, outModes.right ?? outModes.default, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right);\n this._updateOutMode(particle, delta, outModes.top ?? outModes.default, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top);\n }\n _addUpdaterIfMissing = (particle, outMode, getUpdater)=>{\n const outModes = particle.options.move.outModes;\n if (!this.updaters.has(outMode) && checkOutMode(outModes, outMode)) {\n this.updaters.set(outMode, getUpdater(this.container));\n }\n };\n _updateOutMode = (particle, delta, outMode, direction)=>{\n for (const updater of this.updaters.values()){\n updater.update(particle, direction, delta, outMode);\n }\n };\n}\n\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/outModes/dist/browser/OutOfCanvasUpdater.js?\n}");
|
|
57
57
|
|
|
58
58
|
/***/ },
|
|
59
59
|
|
|
@@ -63,7 +63,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
63
63
|
\**********************************************************/
|
|
64
64
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
65
65
|
|
|
66
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OutOutMode: () => (/* binding */ OutOutMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst minVelocity = 0
|
|
66
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OutOutMode: () => (/* binding */ OutOutMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst minVelocity = 0, minDistance = 0, updateVector = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.origin;\nclass OutOutMode {\n container;\n modes;\n constructor(container){\n this.container = container;\n this.modes = [\n _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.out\n ];\n }\n update(particle, direction, _delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n switch(particle.outType){\n case _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticleOutType.inside:\n {\n const { x: vx, y: vy } = particle.velocity;\n updateVector.setTo(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.originPoint);\n updateVector.length = particle.moveCenter.radius;\n updateVector.angle = particle.velocity.angle + Math.PI;\n updateVector.addTo(particle.moveCenter);\n const { dx, dy } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(particle.position, updateVector);\n if (vx <= minVelocity && dx >= minDistance || vy <= minVelocity && dy >= minDistance || vx >= minVelocity && dx <= minDistance || vy >= minVelocity && dy <= minDistance) {\n return;\n }\n particle.position.x = Math.floor((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)({\n min: 0,\n max: container.canvas.size.width\n }));\n particle.position.y = Math.floor((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)({\n min: 0,\n max: container.canvas.size.height\n }));\n const { dx: newDx, dy: newDy } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(particle.position, particle.moveCenter);\n particle.direction = Math.atan2(-newDy, -newDx);\n particle.velocity.angle = particle.direction;\n break;\n }\n default:\n {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isPointInside)(particle.position, container.canvas.size, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.originPoint, particle.getRadius(), direction)) {\n return;\n }\n switch(particle.outType){\n case _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticleOutType.outside:\n {\n particle.position.x = Math.floor((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)({\n min: -particle.moveCenter.radius,\n max: particle.moveCenter.radius\n })) + particle.moveCenter.x;\n particle.position.y = Math.floor((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)({\n min: -particle.moveCenter.radius,\n max: particle.moveCenter.radius\n })) + particle.moveCenter.y;\n const { dx, dy } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(particle.position, particle.moveCenter);\n if (particle.moveCenter.radius) {\n particle.direction = Math.atan2(dy, dx);\n particle.velocity.angle = particle.direction;\n }\n break;\n }\n case _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticleOutType.normal:\n {\n const warp = particle.options.move.warp, canvasSize = container.canvas.size, newPos = {\n bottom: canvasSize.height + particle.getRadius() + particle.offset.y,\n left: -particle.getRadius() - particle.offset.x,\n right: canvasSize.width + particle.getRadius() + particle.offset.x,\n top: -particle.getRadius() - particle.offset.y\n }, sizeValue = particle.getRadius(), nextBounds = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.calculateBounds)(particle.position, sizeValue);\n if (direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right && nextBounds.left > canvasSize.width + particle.offset.x) {\n particle.position.x = newPos.left;\n particle.initialPosition.x = particle.position.x;\n if (!warp) {\n particle.position.y = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.height;\n particle.initialPosition.y = particle.position.y;\n }\n } else if (direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left && nextBounds.right < -particle.offset.x) {\n particle.position.x = newPos.right;\n particle.initialPosition.x = particle.position.x;\n if (!warp) {\n particle.position.y = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.height;\n particle.initialPosition.y = particle.position.y;\n }\n }\n if (direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom && nextBounds.top > canvasSize.height + particle.offset.y) {\n if (!warp) {\n particle.position.x = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.width;\n particle.initialPosition.x = particle.position.x;\n }\n particle.position.y = newPos.top;\n particle.initialPosition.y = particle.position.y;\n } else if (direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top && nextBounds.bottom < -particle.offset.y) {\n if (!warp) {\n particle.position.x = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * canvasSize.width;\n particle.initialPosition.x = particle.position.x;\n }\n particle.position.y = newPos.bottom;\n particle.initialPosition.y = particle.position.y;\n }\n break;\n }\n }\n break;\n }\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/outModes/dist/browser/OutOutMode.js?\n}");
|
|
67
67
|
|
|
68
68
|
/***/ },
|
|
69
69
|
|
|
@@ -73,7 +73,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
73
73
|
\*****************************************************/
|
|
74
74
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
75
75
|
|
|
76
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ bounceHorizontal: () => (/* binding */ bounceHorizontal),\n/* harmony export */ bounceVertical: () => (/* binding */ bounceVertical)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst minVelocity = 0
|
|
76
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ bounceHorizontal: () => (/* binding */ bounceHorizontal),\n/* harmony export */ bounceVertical: () => (/* binding */ bounceVertical)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst minVelocity = 0, boundsMin = 0;\nfunction bounceHorizontal(data) {\n if (data.outMode !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.bounce && data.outMode !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.split || data.direction !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left && data.direction !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right) {\n return;\n }\n if (data.bounds.right < boundsMin && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left) {\n data.particle.position.x = data.size + data.offset.x;\n } else if (data.bounds.left > data.canvasSize.width && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right) {\n data.particle.position.x = data.canvasSize.width - data.size - data.offset.x;\n }\n const velocity = data.particle.velocity.x;\n let bounced = false;\n if (data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right && data.bounds.right >= data.canvasSize.width && velocity > minVelocity || data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left && data.bounds.left <= boundsMin && velocity < minVelocity) {\n const newVelocity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(data.particle.options.bounce.horizontal.value);\n data.particle.velocity.x *= -newVelocity;\n bounced = true;\n }\n if (!bounced) {\n return;\n }\n const minPos = data.offset.x + data.size;\n if (data.bounds.right >= data.canvasSize.width && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right) {\n data.particle.position.x = data.canvasSize.width - minPos;\n } else if (data.bounds.left <= boundsMin && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left) {\n data.particle.position.x = minPos;\n }\n if (data.outMode === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.split) {\n data.particle.destroy();\n }\n}\nfunction bounceVertical(data) {\n if (data.outMode !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.bounce && data.outMode !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.split || data.direction !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom && data.direction !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top) {\n return;\n }\n if (data.bounds.bottom < boundsMin && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top) {\n data.particle.position.y = data.size + data.offset.y;\n } else if (data.bounds.top > data.canvasSize.height && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom) {\n data.particle.position.y = data.canvasSize.height - data.size - data.offset.y;\n }\n const velocity = data.particle.velocity.y;\n let bounced = false;\n if (data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom && data.bounds.bottom >= data.canvasSize.height && velocity > minVelocity || data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top && data.bounds.top <= boundsMin && velocity < minVelocity) {\n const newVelocity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(data.particle.options.bounce.vertical.value);\n data.particle.velocity.y *= -newVelocity;\n bounced = true;\n }\n if (!bounced) {\n return;\n }\n const minPos = data.offset.y + data.size;\n if (data.bounds.bottom >= data.canvasSize.height && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom) {\n data.particle.position.y = data.canvasSize.height - minPos;\n } else if (data.bounds.top <= boundsMin && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top) {\n data.particle.position.y = minPos;\n }\n if (data.outMode === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.split) {\n data.particle.destroy();\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/outModes/dist/browser/Utils.js?\n}");
|
|
77
77
|
|
|
78
78
|
/***/ }
|
|
79
79
|
|