@tsparticles/preset-confetti-falling 4.0.0-alpha.5
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/107.min.js +1 -0
- package/126.min.js +1 -0
- package/158.min.js +1 -0
- package/17.min.js +1 -0
- package/182.min.js +1 -0
- package/204.min.js +1 -0
- package/231.min.js +1 -0
- package/254.min.js +1 -0
- package/278.min.js +1 -0
- package/28.min.js +1 -0
- package/3.min.js +1 -0
- package/302.min.js +1 -0
- package/316.min.js +1 -0
- package/337.min.js +1 -0
- package/382.min.js +1 -0
- package/406.min.js +1 -0
- package/430.min.js +1 -0
- package/470.min.js +1 -0
- package/508.min.js +1 -0
- package/530.min.js +1 -0
- package/558.min.js +1 -0
- package/596.min.js +1 -0
- package/6.min.js +1 -0
- package/637.min.js +1 -0
- package/646.min.js +1 -0
- package/676.min.js +1 -0
- package/694.min.js +1 -0
- package/730.min.js +1 -0
- package/740.min.js +1 -0
- package/754.min.js +1 -0
- package/830.min.js +1 -0
- package/844.min.js +1 -0
- package/85.min.js +1 -0
- package/878.min.js +1 -0
- package/922.min.js +1 -0
- package/930.min.js +1 -0
- package/952.min.js +1 -0
- package/LICENSE +21 -0
- package/README.md +104 -0
- package/browser/bundle.js +2 -0
- package/browser/index.js +29 -0
- package/browser/options.js +87 -0
- package/browser/package.json +1 -0
- package/cjs/bundle.js +2 -0
- package/cjs/index.js +29 -0
- package/cjs/options.js +87 -0
- package/cjs/package.json +1 -0
- package/dist_browser_options_js.js +30 -0
- package/esm/bundle.js +2 -0
- package/esm/index.js +29 -0
- package/esm/options.js +87 -0
- package/esm/package.json +1 -0
- package/node_modules_pnpm_tsparticles_basic_4_0_0-beta_1_node_modules_tsparticles_basic_browser_index_js.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-beta_1_node_modules_tsparticles_plugin-h-8932d7.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-beta_1_node_modules_tsparticles_plugin-h-a0aea9.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-hsl-color_4_0_0-beta_1_node_modules_tsparticles_plugin-h-1179c3.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-hsl-color_4_0_0-beta_1_node_modules_tsparticles_plugin-h-1737bf.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-motion_4_0_0-beta_1_node_modules_tsparticles_plugin-moti-0ff566.js +50 -0
- package/node_modules_pnpm_tsparticles_plugin-motion_4_0_0-beta_1_node_modules_tsparticles_plugin-moti-861f30.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-motion_4_0_0-beta_1_node_modules_tsparticles_plugin-moti-899da2.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-move_4_0_0-beta_1_node_modules_tsparticles_plugin-move_b-aa7108.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-move_4_0_0-beta_1_node_modules_tsparticles_plugin-move_b-c23e73.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-rgb-color_4_0_0-beta_1_node_modules_tsparticles_plugin-r-0f881a.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-rgb-color_4_0_0-beta_1_node_modules_tsparticles_plugin-r-ae3d6b.js +30 -0
- package/node_modules_pnpm_tsparticles_shape-circle_4_0_0-beta_1_node_modules_tsparticles_shape-circle-07826a.js +40 -0
- package/node_modules_pnpm_tsparticles_shape-circle_4_0_0-beta_1_node_modules_tsparticles_shape-circle-c2187f.js +30 -0
- package/node_modules_pnpm_tsparticles_shape-square_4_0_0-beta_1_node_modules_tsparticles_shape-square-53c1de.js +40 -0
- package/node_modules_pnpm_tsparticles_shape-square_4_0_0-beta_1_node_modules_tsparticles_shape-square-c4fdaa.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-fill-color_4_0_0-beta_1_node_modules_tsparticles_update-75868d.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-fill-color_4_0_0-beta_1_node_modules_tsparticles_update-7cca03.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-opacity_4_0_0-beta_1_node_modules_tsparticles_updater-o-138fb5.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-opacity_4_0_0-beta_1_node_modules_tsparticles_updater-o-8a311f.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-beta_1_node_modules_tsparticles_updater-265a6a.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-roll_4_0_0-beta_1_node_modules_tsparticles_updater-roll-17906d.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-roll_4_0_0-beta_1_node_modules_tsparticles_updater-roll-2ae6b1.js +70 -0
- package/node_modules_pnpm_tsparticles_updater-rotate_4_0_0-beta_1_node_modules_tsparticles_updater-ro-82c0df.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-rotate_4_0_0-beta_1_node_modules_tsparticles_updater-ro-f03001.js +50 -0
- package/node_modules_pnpm_tsparticles_updater-size_4_0_0-beta_1_node_modules_tsparticles_updater-size-124f3f.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-size_4_0_0-beta_1_node_modules_tsparticles_updater-size-cbf46f.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-tilt_4_0_0-beta_1_node_modules_tsparticles_updater-tilt-4d0524.js +60 -0
- package/node_modules_pnpm_tsparticles_updater-tilt_4_0_0-beta_1_node_modules_tsparticles_updater-tilt-e66f0d.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-wobble_4_0_0-beta_1_node_modules_tsparticles_updater-wo-30a54c.js +60 -0
- package/node_modules_pnpm_tsparticles_updater-wobble_4_0_0-beta_1_node_modules_tsparticles_updater-wo-e6d8f0.js +30 -0
- package/package.json +116 -0
- package/palettes_confetti_dist_browser_index_js.js +30 -0
- package/palettes_confetti_dist_browser_options_js.js +30 -0
- package/report.html +95 -0
- package/tsparticles.preset.confettiFalling.bundle.js +957 -0
- package/tsparticles.preset.confettiFalling.bundle.min.js +2 -0
- package/tsparticles.preset.confettiFalling.js +417 -0
- package/tsparticles.preset.confettiFalling.min.js +2 -0
- package/types/bundle.d.ts +2 -0
- package/types/index.d.ts +2 -0
- package/types/options.d.ts +2 -0
- package/umd/bundle.js +17 -0
- package/umd/index.js +76 -0
- package/umd/options.js +100 -0
- package/vendors-node_modules_pnpm_tsparticles_engine_4_0_0-beta_1_node_modules_tsparticles_engine_bro-0bb20b.js +100 -0
- package/vendors-node_modules_pnpm_tsparticles_plugin-move_4_0_0-beta_1_node_modules_tsparticles_plugi-2dea06.js +40 -0
- package/vendors-node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-beta_1_node_modules_tsparticles-a5ec2f.js +80 -0
|
@@ -0,0 +1,80 @@
|
|
|
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-alpha.5
|
|
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_confetti_falling"] = this["webpackChunk_tsparticles_preset_confetti_falling"] || []).push([["vendors-node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-beta_1_node_modules_tsparticles-a5ec2f"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js"
|
|
21
|
+
/*!*************************************************************************************************************************************************!*\
|
|
22
|
+
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.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 */ BounceOutMode: () => (/* binding */ BounceOutMode)\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.1/node_modules/@tsparticles/engine/browser/index.js\");\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Utils.js */ \"../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/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)({ particle, outMode, direction, bounds, canvasSize, offset, size });\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__.bounceVertical)({ particle, outMode, direction, bounds, canvasSize, offset, size });\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-confetti-falling/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js?\n}");
|
|
27
|
+
|
|
28
|
+
/***/ },
|
|
29
|
+
|
|
30
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js"
|
|
31
|
+
/*!**************************************************************************************************************************************************!*\
|
|
32
|
+
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js ***!
|
|
33
|
+
\**************************************************************************************************************************************************/
|
|
34
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
35
|
+
|
|
36
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DestroyOutMode: () => (/* binding */ DestroyOutMode)\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.1/node_modules/@tsparticles/engine/browser/index.js\");\n\nconst minVelocity = 0;\nclass DestroyOutMode {\n container;\n modes;\n constructor(container) {\n this.container = container;\n this.modes = [_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.destroy];\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 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) ||\n (vy < minVelocity && dy > particle.moveCenter.radius) ||\n (vx >= minVelocity && dx < -particle.moveCenter.radius) ||\n (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/preset-confetti-falling/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js?\n}");
|
|
37
|
+
|
|
38
|
+
/***/ },
|
|
39
|
+
|
|
40
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js"
|
|
41
|
+
/*!***********************************************************************************************************************************************!*\
|
|
42
|
+
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js ***!
|
|
43
|
+
\***********************************************************************************************************************************************/
|
|
44
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
45
|
+
|
|
46
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ NoneOutMode: () => (/* binding */ NoneOutMode)\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.1/node_modules/@tsparticles/engine/browser/index.js\");\n\nconst minVelocity = 0;\nclass NoneOutMode {\n container;\n modes;\n constructor(container) {\n this.container = container;\n this.modes = [_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.none];\n }\n update(particle, direction, _delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n if ((particle.options.move.distance.horizontal &&\n (direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left || direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right)) ??\n (particle.options.move.distance.vertical &&\n (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) ||\n (particle.velocity.y < minVelocity && particle.position.y >= -pRadius) ||\n (particle.velocity.x > minVelocity && particle.position.x <= canvasSize.width + pRadius) ||\n (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 }\n else {\n const position = particle.position;\n if ((!gravityOptions.inverse &&\n position.y > canvasSize.height + pRadius &&\n direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom) ||\n (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/preset-confetti-falling/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js?\n}");
|
|
47
|
+
|
|
48
|
+
/***/ },
|
|
49
|
+
|
|
50
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js"
|
|
51
|
+
/*!******************************************************************************************************************************************************!*\
|
|
52
|
+
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js ***!
|
|
53
|
+
\******************************************************************************************************************************************************/
|
|
54
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
55
|
+
|
|
56
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OutOfCanvasUpdater: () => (/* binding */ OutOfCanvasUpdater)\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.1/node_modules/@tsparticles/engine/browser/index.js\");\n/* harmony import */ var _BounceOutMode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BounceOutMode.js */ \"../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js\");\n/* harmony import */ var _DestroyOutMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DestroyOutMode.js */ \"../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js\");\n/* harmony import */ var _NoneOutMode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./NoneOutMode.js */ \"../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js\");\n/* harmony import */ var _OutOutMode_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./OutOutMode.js */ \"../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js\");\n\n\n\n\n\nconst checkOutMode = (outModes, outMode) => {\n return (outModes.default === outMode ||\n outModes.bottom === outMode ||\n outModes.left === outMode ||\n outModes.right === outMode ||\n 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/preset-confetti-falling/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js?\n}");
|
|
57
|
+
|
|
58
|
+
/***/ },
|
|
59
|
+
|
|
60
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js"
|
|
61
|
+
/*!**********************************************************************************************************************************************!*\
|
|
62
|
+
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js ***!
|
|
63
|
+
\**********************************************************************************************************************************************/
|
|
64
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
65
|
+
|
|
66
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OutOutMode: () => (/* binding */ OutOutMode)\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.1/node_modules/@tsparticles/engine/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 = [_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.out];\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 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) ||\n (vy <= minVelocity && dy >= minDistance) ||\n (vx >= minVelocity && dx <= minDistance) ||\n (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 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 particle.position.x =\n 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 =\n 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 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 }\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 }\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/preset-confetti-falling/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js?\n}");
|
|
67
|
+
|
|
68
|
+
/***/ },
|
|
69
|
+
|
|
70
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/Utils.js"
|
|
71
|
+
/*!*****************************************************************************************************************************************!*\
|
|
72
|
+
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/Utils.js ***!
|
|
73
|
+
\*****************************************************************************************************************************************/
|
|
74
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
75
|
+
|
|
76
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ 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 */ \"../../node_modules/.pnpm/@tsparticles+engine@4.0.0-beta.1/node_modules/@tsparticles/engine/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) ||\n (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 }\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 &&\n data.bounds.right >= data.canvasSize.width &&\n velocity > minVelocity) ||\n (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 }\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) ||\n (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 }\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 &&\n data.bounds.bottom >= data.canvasSize.height &&\n velocity > minVelocity) ||\n (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 }\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/preset-confetti-falling/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.1/node_modules/@tsparticles/updater-out-modes/browser/Utils.js?\n}");
|
|
77
|
+
|
|
78
|
+
/***/ }
|
|
79
|
+
|
|
80
|
+
}]);
|