@tsparticles/preset-bubbles 4.0.0-beta.0 → 4.0.0-beta.12
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/{326.min.js → 147.min.js} +1 -1
- package/155.min.js +1 -0
- package/{659.min.js → 181.min.js} +1 -1
- package/{245.min.js → 210.min.js} +1 -1
- package/349.min.js +1 -0
- package/{358.min.js → 379.min.js} +1 -1
- package/4.min.js +1 -0
- package/{172.min.js → 415.min.js} +1 -1
- package/425.min.js +1 -0
- package/434.min.js +1 -0
- package/{925.min.js → 436.min.js} +1 -1
- package/483.min.js +1 -0
- package/5.min.js +1 -0
- package/623.min.js +1 -0
- package/{778.min.js → 627.min.js} +1 -1
- package/646.min.js +1 -0
- package/662.min.js +1 -0
- package/663.min.js +1 -0
- package/69.min.js +1 -0
- package/748.min.js +1 -0
- package/794.min.js +1 -0
- package/{714.min.js → 807.min.js} +1 -1
- package/{990.min.js → 818.min.js} +1 -1
- package/{857.min.js → 819.min.js} +1 -1
- package/{361.min.js → 837.min.js} +1 -1
- package/{824.min.js → 879.min.js} +1 -1
- package/935.min.js +1 -0
- package/938.min.js +1 -0
- package/94.min.js +1 -0
- package/{467.min.js → 979.min.js} +1 -1
- package/bundles_basic_dist_browser_index_js.js +30 -0
- package/dist_browser_options_js.js +2 -2
- package/engine_dist_browser_Core_Container_js.js +100 -0
- package/package.json +5 -5
- package/plugins_colors_hex_dist_browser_HexColorManager_js.js +30 -0
- package/plugins_colors_hex_dist_browser_index_js.js +30 -0
- package/plugins_colors_hsl_dist_browser_HslColorManager_js.js +30 -0
- package/plugins_colors_hsl_dist_browser_index_js.js +30 -0
- package/plugins_colors_rgb_dist_browser_RgbColorManager_js.js +30 -0
- package/plugins_colors_rgb_dist_browser_index_js.js +30 -0
- package/plugins_emitters_dist_browser_EmitterInstance_js.js +30 -0
- package/plugins_emitters_dist_browser_EmittersInstancesManager_js.js +100 -0
- package/plugins_emitters_dist_browser_EmittersPluginInstance_js.js +30 -0
- package/plugins_emitters_dist_browser_EmittersPlugin_js.js +100 -0
- package/{node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-b6bb50.js → plugins_emitters_dist_browser_ShapeManager_js.js} +7 -7
- package/plugins_emitters_dist_browser_addEmittersShapesManager_js.js +30 -0
- package/plugins_emitters_dist_browser_getEmittersInstancesManager_js.js +30 -0
- package/plugins_emitters_dist_browser_plugin_js.js +50 -0
- 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 +1 -1
- package/shapes_circle_dist_browser_CircleDrawer_js.js +40 -0
- package/shapes_circle_dist_browser_index_js.js +30 -0
- package/tsparticles.preset.bubbles.bundle.js +328 -328
- package/tsparticles.preset.bubbles.bundle.min.js +2 -2
- package/tsparticles.preset.bubbles.js +1 -1
- package/tsparticles.preset.bubbles.min.js +1 -1
- package/updaters_opacity_dist_browser_OpacityUpdater_js.js +30 -0
- package/updaters_opacity_dist_browser_index_js.js +30 -0
- package/updaters_outModes_dist_browser_OutOfCanvasUpdater_js.js +80 -0
- package/updaters_outModes_dist_browser_index_js.js +30 -0
- package/updaters_paint_dist_browser_PaintUpdater_js.js +30 -0
- package/updaters_paint_dist_browser_index_js.js +30 -0
- package/updaters_size_dist_browser_SizeUpdater_js.js +30 -0
- package/updaters_size_dist_browser_index_js.js +30 -0
- package/188.min.js +0 -1
- package/304.min.js +0 -1
- package/392.min.js +0 -1
- package/404.min.js +0 -1
- package/48.min.js +0 -1
- package/592.min.js +0 -1
- package/619.min.js +0 -1
- package/63.min.js +0 -1
- package/632.min.js +0 -1
- package/700.min.js +0 -1
- package/719.min.js +0 -1
- package/72.min.js +0 -1
- package/74.min.js +0 -1
- package/750.min.js +0 -1
- package/86.min.js +0 -1
- package/892.min.js +0 -1
- package/957.min.js +0 -1
- package/node_modules_pnpm_tsparticles_basic_4_0_0-beta_11_node_modules_tsparticles_basic_browser_index_js.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-09a57e.js +0 -100
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-74f6c1.js +0 -50
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-7e9977.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-7f13fa.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-cf6e0a.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-daf8cd.js +0 -100
- package/node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-5e0ff2.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-b0d0ee.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-hsl-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-060416.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-hsl-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-a6d106.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-move_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_nod-3a792b.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-move_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_nod-e1bc4b.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-rgb-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-d9836d.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-rgb-color_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_1-f22022.js +0 -30
- package/node_modules_pnpm_tsparticles_shape-circle_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-7552ae.js +0 -40
- package/node_modules_pnpm_tsparticles_shape-circle_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-b06fc7.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-opacity_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-8f9e09.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-opacity_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11-da77ce.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_-df7144.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-paint_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_n-589482.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-paint_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_n-b1f330.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-size_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-a47b81.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-size_4_0_0-beta_11__tsparticles_engine_4_0_0-beta_11_no-d2508a.js +0 -30
- package/vendors-node_modules_pnpm_tsparticles_engine_4_0_0-beta_11_node_modules_tsparticles_engine_br-ca098e.js +0 -100
- package/vendors-node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_11__tsparticles_engine_4_0_0-6e84d5.js +0 -30
- package/vendors-node_modules_pnpm_tsparticles_plugin-move_4_0_0-beta_11__tsparticles_engine_4_0_0-bet-5f2b78.js +0 -40
- package/vendors-node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-beta_11__tsparticles_engine_4_0-09fa1a.js +0 -80
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Author : Matteo Bruni
|
|
3
|
-
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
-
* Demo / Generator : https://particles.js.org/
|
|
5
|
-
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
-
* How to use? : Check the GitHub README
|
|
7
|
-
* v4.0.0-beta.0
|
|
8
|
-
*/
|
|
9
|
-
"use strict";
|
|
10
|
-
/*
|
|
11
|
-
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
-
* This devtool is neither made for production nor for readable output files.
|
|
13
|
-
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
-
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
-
* or disable the default devtool with "devtool: false".
|
|
16
|
-
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
-
*/
|
|
18
|
-
(this["webpackChunk_tsparticles_preset_bubbles"] = this["webpackChunk_tsparticles_preset_bubbles"] || []).push([["vendors-node_modules_pnpm_tsparticles_plugin-move_4_0_0-beta_11__tsparticles_engine_4_0_0-bet-5f2b78"],{
|
|
19
|
-
|
|
20
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-move@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/plugin-move/browser/MovePluginInstance.js"
|
|
21
|
-
/*!*****************************************************************************************************************************************************************************!*\
|
|
22
|
-
!*** ../../node_modules/.pnpm/@tsparticles+plugin-move@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/plugin-move/browser/MovePluginInstance.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 */ MovePluginInstance: () => (/* binding */ MovePluginInstance)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../node_modules/.pnpm/@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/engine/browser/index.js\");\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Utils.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-move@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/plugin-move/browser/Utils.js\");\n\n\nconst defaultSizeFactor = 1, defaultDeltaFactor = 1;\nclass MovePluginInstance {\n availablePathGenerators;\n pathGenerators;\n _container;\n _pluginManager;\n constructor(pluginManager, container) {\n this._pluginManager = pluginManager;\n this._container = container;\n this.availablePathGenerators = new Map();\n this.pathGenerators = new Map();\n }\n destroy() {\n this.availablePathGenerators = new Map();\n this.pathGenerators = new Map();\n }\n isEnabled(particle) {\n return !particle.destroyed && particle.options.move.enable;\n }\n particleCreated(particle) {\n const options = particle.options, moveOptions = options.move, gravityOptions = moveOptions.gravity, pathOptions = moveOptions.path;\n particle.moveDecay = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.decayOffset - (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(moveOptions.decay);\n particle.pathDelay = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(pathOptions.delay.value) * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds;\n if (pathOptions.generator) {\n let pathGenerator = this.pathGenerators.get(pathOptions.generator);\n if (!pathGenerator) {\n pathGenerator = this.availablePathGenerators.get(pathOptions.generator);\n if (pathGenerator) {\n this.pathGenerators.set(pathOptions.generator, pathGenerator);\n pathGenerator.init();\n }\n }\n particle.pathGenerator = pathGenerator;\n }\n particle.gravity = {\n enable: gravityOptions.enable,\n acceleration: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(gravityOptions.acceleration),\n inverse: gravityOptions.inverse,\n };\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__.initSpin)(this._container, particle);\n }\n particleDestroyed(particle) {\n const pathGenerator = particle.pathGenerator;\n pathGenerator?.reset(particle);\n }\n particleUpdate(particle, delta) {\n const particleOptions = particle.options, moveOptions = particleOptions.move;\n if (!moveOptions.enable) {\n return;\n }\n const container = this._container, pxRatio = container.retina.pixelRatio, slowFactor = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__.getProximitySpeedFactor)(particle), reduceFactor = container.retina.reduceFactor, baseSpeed = particle.retina.moveSpeed, moveDrift = particle.retina.moveDrift, maxSize = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeMax)(particleOptions.size.value) * pxRatio, sizeFactor = moveOptions.size ? particle.getRadius() / maxSize : defaultSizeFactor, deltaFactor = delta.factor || defaultDeltaFactor, moveSpeed = baseSpeed * sizeFactor * slowFactor * deltaFactor * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half, maxSpeed = particle.retina.maxSpeed;\n if (moveOptions.spin.enable) {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__.spin)(container, particle, moveSpeed, reduceFactor);\n }\n else {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__.move)(particle, moveOptions, moveSpeed, maxSpeed, moveDrift, reduceFactor, delta);\n }\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__.applyDistance)(particle);\n }\n preInit() {\n return this._init();\n }\n redrawInit() {\n return this._init();\n }\n update() {\n for (const pathGenerator of this.pathGenerators.values()) {\n pathGenerator.update();\n }\n }\n async _init() {\n const availablePathGenerators = await this._pluginManager.getPathGenerators?.(this._container, true);\n if (!availablePathGenerators) {\n return;\n }\n this.availablePathGenerators = availablePathGenerators;\n this.pathGenerators = new Map();\n for (const pathGenerator of this.pathGenerators.values()) {\n pathGenerator.init();\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-bubbles/../../node_modules/.pnpm/@tsparticles+plugin-move@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/plugin-move/browser/MovePluginInstance.js?\n}");
|
|
27
|
-
|
|
28
|
-
/***/ },
|
|
29
|
-
|
|
30
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-move@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/plugin-move/browser/Utils.js"
|
|
31
|
-
/*!****************************************************************************************************************************************************************!*\
|
|
32
|
-
!*** ../../node_modules/.pnpm/@tsparticles+plugin-move@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/plugin-move/browser/Utils.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 */ applyDistance: () => (/* binding */ applyDistance),\n/* harmony export */ applyPath: () => (/* binding */ applyPath),\n/* harmony export */ getProximitySpeedFactor: () => (/* binding */ getProximitySpeedFactor),\n/* harmony export */ initSpin: () => (/* binding */ initSpin),\n/* harmony export */ move: () => (/* binding */ move),\n/* harmony export */ spin: () => (/* binding */ spin)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../node_modules/.pnpm/@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/engine/browser/index.js\");\n\nconst minVelocity = 0, identity = 1, moveSpeedFactor = 60, minSpinRadius = 0, spinFactor = 0.01, defaultPathDelay = 0, noDecay = 1;\nfunction applyDistance(particle) {\n const initialPosition = particle.initialPosition, { dx, dy } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(initialPosition, particle.position), dxFixed = Math.abs(dx), dyFixed = Math.abs(dy), { maxDistance } = particle.retina, hDistance = maxDistance.horizontal, vDistance = maxDistance.vertical;\n if (!hDistance && !vDistance) {\n return;\n }\n const hasHDistance = (hDistance && dxFixed >= hDistance) ?? false, hasVDistance = (vDistance && dyFixed >= vDistance) ?? false;\n if ((hasHDistance || hasVDistance) && !particle.misplaced) {\n particle.misplaced = (!!hDistance && dxFixed > hDistance) || (!!vDistance && dyFixed > vDistance);\n if (hDistance) {\n particle.velocity.x = particle.velocity.y * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half - particle.velocity.x;\n }\n if (vDistance) {\n particle.velocity.y = particle.velocity.x * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half - particle.velocity.y;\n }\n }\n else if ((!hDistance || dxFixed < hDistance) && (!vDistance || dyFixed < vDistance) && particle.misplaced) {\n particle.misplaced = false;\n }\n else if (particle.misplaced) {\n const pos = particle.position, vel = particle.velocity;\n if (hDistance &&\n ((pos.x < initialPosition.x && vel.x < minVelocity) || (pos.x > initialPosition.x && vel.x > minVelocity))) {\n vel.x *= -(0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)();\n }\n if (vDistance &&\n ((pos.y < initialPosition.y && vel.y < minVelocity) || (pos.y > initialPosition.y && vel.y > minVelocity))) {\n vel.y *= -(0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)();\n }\n }\n}\nfunction move(particle, moveOptions, moveSpeed, maxSpeed, moveDrift, reduceFactor, delta) {\n applyPath(particle, delta);\n const gravityOptions = particle.gravity, gravityFactor = gravityOptions?.enable && gravityOptions.inverse ? -identity : identity;\n if (moveDrift && moveSpeed) {\n particle.velocity.x += (moveDrift * delta.factor) / (moveSpeedFactor * moveSpeed);\n }\n if (gravityOptions?.enable && moveSpeed) {\n particle.velocity.y +=\n (gravityFactor * (gravityOptions.acceleration * delta.factor)) / (moveSpeedFactor * moveSpeed);\n }\n const decay = particle.moveDecay;\n particle.velocity.multTo(decay ?? noDecay);\n const velocity = particle.velocity.mult(moveSpeed);\n if (gravityOptions?.enable &&\n maxSpeed > minVelocity &&\n ((!gravityOptions.inverse && velocity.y >= minVelocity && velocity.y >= maxSpeed) ||\n (gravityOptions.inverse && velocity.y <= minVelocity && velocity.y <= -maxSpeed))) {\n velocity.y = gravityFactor * maxSpeed;\n if (moveSpeed) {\n particle.velocity.y = velocity.y / moveSpeed;\n }\n }\n const zIndexOptions = particle.options.zIndex, zVelocityFactor = (identity - particle.zIndexFactor) ** zIndexOptions.velocityRate;\n velocity.multTo(zVelocityFactor);\n velocity.multTo(reduceFactor);\n const { position } = particle;\n position.addTo(velocity);\n if (moveOptions.vibrate) {\n position.x += Math.sin(position.x * Math.cos(position.y)) * reduceFactor;\n position.y += Math.cos(position.y * Math.sin(position.x)) * reduceFactor;\n }\n}\nfunction spin(container, particle, moveSpeed, reduceFactor) {\n if (!particle.spin) {\n return;\n }\n const spinClockwise = particle.spin.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.RotateDirection.clockwise, updateFunc = {\n x: spinClockwise ? Math.cos : Math.sin,\n y: spinClockwise ? Math.sin : Math.cos,\n };\n particle.position.x =\n particle.spin.center.x + particle.spin.radius * updateFunc.x(particle.spin.angle) * reduceFactor;\n particle.position.y =\n particle.spin.center.y + particle.spin.radius * updateFunc.y(particle.spin.angle) * reduceFactor;\n particle.spin.radius += particle.spin.acceleration * reduceFactor;\n const maxCanvasSize = Math.max(container.canvas.size.width, container.canvas.size.height), halfMaxSize = maxCanvasSize * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half;\n if (particle.spin.radius > halfMaxSize) {\n particle.spin.radius = halfMaxSize;\n particle.spin.acceleration *= -identity;\n }\n else if (particle.spin.radius < minSpinRadius) {\n particle.spin.radius = minSpinRadius;\n particle.spin.acceleration *= -identity;\n }\n particle.spin.angle += moveSpeed * spinFactor * (identity - particle.spin.radius / maxCanvasSize);\n}\nfunction applyPath(particle, delta) {\n const particlesOptions = particle.options, pathOptions = particlesOptions.move.path, pathEnabled = pathOptions.enable;\n if (!pathEnabled) {\n return;\n }\n const pathDelay = particle.pathDelay ?? defaultPathDelay;\n if (particle.lastPathTime <= pathDelay) {\n particle.lastPathTime += delta.value;\n return;\n }\n const path = particle.pathGenerator?.generate(particle, delta);\n if (path) {\n particle.velocity.addTo(path);\n }\n if (pathOptions.clamp) {\n particle.velocity.x = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.clamp)(particle.velocity.x, -identity, identity);\n particle.velocity.y = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.clamp)(particle.velocity.y, -identity, identity);\n }\n particle.lastPathTime -= pathDelay;\n}\nfunction getProximitySpeedFactor(particle) {\n return particle.slow.inRange ? particle.slow.factor : identity;\n}\nfunction initSpin(container, particle) {\n const options = particle.options, spinOptions = options.move.spin;\n if (!spinOptions.enable) {\n return;\n }\n const spinPos = spinOptions.position ?? { x: 50, y: 50 }, spinFactor = 0.01, spinCenter = {\n x: spinPos.x * spinFactor * container.canvas.size.width,\n y: spinPos.y * spinFactor * container.canvas.size.height,\n }, pos = particle.getPosition(), distance = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistance)(pos, spinCenter), spinAcceleration = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(spinOptions.acceleration);\n particle.retina.spinAcceleration = spinAcceleration * container.retina.pixelRatio;\n particle.spin = {\n center: spinCenter,\n direction: particle.velocity.x >= minVelocity ? _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.RotateDirection.clockwise : _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.RotateDirection.counterClockwise,\n angle: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.doublePI,\n radius: distance,\n acceleration: particle.retina.spinAcceleration,\n };\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-bubbles/../../node_modules/.pnpm/@tsparticles+plugin-move@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/plugin-move/browser/Utils.js?\n}");
|
|
37
|
-
|
|
38
|
-
/***/ }
|
|
39
|
-
|
|
40
|
-
}]);
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Author : Matteo Bruni
|
|
3
|
-
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
-
* Demo / Generator : https://particles.js.org/
|
|
5
|
-
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
-
* How to use? : Check the GitHub README
|
|
7
|
-
* v4.0.0-beta.0
|
|
8
|
-
*/
|
|
9
|
-
"use strict";
|
|
10
|
-
/*
|
|
11
|
-
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
-
* This devtool is neither made for production nor for readable output files.
|
|
13
|
-
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
-
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
-
* or disable the default devtool with "devtool: false".
|
|
16
|
-
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
-
*/
|
|
18
|
-
(this["webpackChunk_tsparticles_preset_bubbles"] = this["webpackChunk_tsparticles_preset_bubbles"] || []).push([["vendors-node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-beta_11__tsparticles_engine_4_0-09fa1a"],{
|
|
19
|
-
|
|
20
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js"
|
|
21
|
-
/*!************************************************************************************************************************************************************************************!*\
|
|
22
|
-
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/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.11/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.11_@tsparticles+engine@4.0.0-beta.11/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-bubbles/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js?\n}");
|
|
27
|
-
|
|
28
|
-
/***/ },
|
|
29
|
-
|
|
30
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js"
|
|
31
|
-
/*!*************************************************************************************************************************************************************************************!*\
|
|
32
|
-
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/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.11/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-bubbles/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js?\n}");
|
|
37
|
-
|
|
38
|
-
/***/ },
|
|
39
|
-
|
|
40
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js"
|
|
41
|
-
/*!**********************************************************************************************************************************************************************************!*\
|
|
42
|
-
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/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.11/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-bubbles/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js?\n}");
|
|
47
|
-
|
|
48
|
-
/***/ },
|
|
49
|
-
|
|
50
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js"
|
|
51
|
-
/*!*****************************************************************************************************************************************************************************************!*\
|
|
52
|
-
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/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.11/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.11_@tsparticles+engine@4.0.0-beta.11/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.11_@tsparticles+engine@4.0.0-beta.11/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.11_@tsparticles+engine@4.0.0-beta.11/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.11_@tsparticles+engine@4.0.0-beta.11/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-bubbles/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js?\n}");
|
|
57
|
-
|
|
58
|
-
/***/ },
|
|
59
|
-
|
|
60
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js"
|
|
61
|
-
/*!*********************************************************************************************************************************************************************************!*\
|
|
62
|
-
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/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.11/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-bubbles/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js?\n}");
|
|
67
|
-
|
|
68
|
-
/***/ },
|
|
69
|
-
|
|
70
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/Utils.js"
|
|
71
|
-
/*!****************************************************************************************************************************************************************************!*\
|
|
72
|
-
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/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.11/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-bubbles/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-beta.11_@tsparticles+engine@4.0.0-beta.11/node_modules/@tsparticles/updater-out-modes/browser/Utils.js?\n}");
|
|
77
|
-
|
|
78
|
-
/***/ }
|
|
79
|
-
|
|
80
|
-
}]);
|