@tsparticles/preset-bubbles 4.0.0-alpha.2 → 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/126.min.js +1 -0
- package/182.min.js +1 -0
- package/204.min.js +1 -0
- package/231.min.js +1 -0
- package/270.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/356.min.js +1 -0
- package/382.min.js +1 -0
- package/406.min.js +1 -0
- package/47.min.js +1 -0
- package/508.min.js +1 -0
- package/523.min.js +1 -0
- package/530.min.js +1 -0
- package/596.min.js +1 -0
- package/608.min.js +1 -0
- package/646.min.js +1 -0
- package/691.min.js +1 -0
- package/730.min.js +1 -0
- package/731.min.js +1 -0
- package/819.min.js +1 -0
- package/830.min.js +1 -0
- package/834.min.js +1 -0
- package/844.min.js +1 -0
- package/85.min.js +1 -0
- package/922.min.js +1 -0
- package/930.min.js +1 -0
- package/964.min.js +1 -0
- package/README.md +7 -2
- package/browser/index.js +15 -5
- package/browser/options.js +5 -2
- package/cjs/index.js +15 -5
- package/cjs/options.js +5 -2
- package/dist_browser_options_js.js +2 -2
- package/esm/index.js +15 -5
- package/esm/options.js +5 -2
- 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-emitters_4_0_0-alpha_5_node_modules_tsparticles_plugin-e-50442a.js → node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_1_node_modules_tsparticles_plugin-em-486a11.js} +7 -7
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_1_node_modules_tsparticles_plugin-em-815c1c.js +100 -0
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_1_node_modules_tsparticles_plugin-em-9a4af1.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_1_node_modules_tsparticles_plugin-em-c7125a.js +100 -0
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_1_node_modules_tsparticles_plugin-em-e8ed4a.js +50 -0
- package/{node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-alpha_5_node_modules_tsparticles_plugin--7ee633.js → node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-beta_1_node_modules_tsparticles_plugin-h-8932d7.js} +7 -7
- package/{node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-alpha_5_node_modules_tsparticles_plugin--082572.js → node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-beta_1_node_modules_tsparticles_plugin-h-a0aea9.js} +7 -7
- 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-alpha_5_node_modules_tsparticles_plugin--d17710.js → node_modules_pnpm_tsparticles_plugin-hsl-color_4_0_0-beta_1_node_modules_tsparticles_plugin-h-1737bf.js} +7 -7
- package/node_modules_pnpm_tsparticles_plugin-interactivity_4_0_0-beta_1_node_modules_tsparticles_plug-908f96.js +120 -0
- package/node_modules_pnpm_tsparticles_plugin-interactivity_4_0_0-beta_1_node_modules_tsparticles_plug-d6e6b1.js +70 -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_updater-color_4_0_0-alpha_5_node_modules_tsparticles_updater-co-9b6d65.js → node_modules_pnpm_tsparticles_plugin-move_4_0_0-beta_1_node_modules_tsparticles_plugin-move_b-c23e73.js} +5 -5
- 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-alpha_5_node_modules_tsparticles_plugin--8050b3.js → node_modules_pnpm_tsparticles_plugin-rgb-color_4_0_0-beta_1_node_modules_tsparticles_plugin-r-ae3d6b.js} +7 -7
- package/{node_modules_pnpm_tsparticles_shape-circle_4_0_0-alpha_5_node_modules_tsparticles_shape-circl-2a85dc.js → node_modules_pnpm_tsparticles_shape-circle_4_0_0-beta_1_node_modules_tsparticles_shape-circle-07826a.js} +12 -12
- package/{node_modules_pnpm_tsparticles_shape-circle_4_0_0-alpha_5_node_modules_tsparticles_shape-circl-d95142.js → node_modules_pnpm_tsparticles_shape-circle_4_0_0-beta_1_node_modules_tsparticles_shape-circle-c2187f.js} +7 -7
- 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-alpha_5_node_modules_tsparticles_updater--35fbab.js → node_modules_pnpm_tsparticles_updater-opacity_4_0_0-beta_1_node_modules_tsparticles_updater-o-8a311f.js} +7 -7
- package/{node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-alpha_5_node_modules_tsparticles_update-04964a.js → node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-beta_1_node_modules_tsparticles_updater-265a6a.js} +7 -7
- package/{node_modules_pnpm_tsparticles_updater-size_4_0_0-alpha_5_node_modules_tsparticles_updater-siz-7c3e56.js → node_modules_pnpm_tsparticles_updater-size_4_0_0-beta_1_node_modules_tsparticles_updater-size-124f3f.js} +7 -7
- package/node_modules_pnpm_tsparticles_updater-size_4_0_0-beta_1_node_modules_tsparticles_updater-size-cbf46f.js +30 -0
- package/package.json +5 -4
- package/report.html +84 -29
- package/tsparticles.preset.bubbles.bundle.js +336 -324
- package/tsparticles.preset.bubbles.bundle.min.js +2 -2
- package/tsparticles.preset.bubbles.js +45 -23
- package/tsparticles.preset.bubbles.min.js +2 -2
- package/umd/index.js +15 -5
- package/umd/options.js +5 -2
- 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-emitters_4_0_0-beta_1_node_modules_tsparticles_p-168eb1.js +30 -0
- package/vendors-node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-beta_1_node_modules_tsparticles_p-c5a6f7.js +210 -0
- package/vendors-node_modules_pnpm_tsparticles_plugin-interactivity_4_0_0-beta_1_node_modules_tspartic-d557a0.js +50 -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
- package/121.min.js +0 -2
- package/121.min.js.LICENSE.txt +0 -1
- package/196.min.js +0 -2
- package/196.min.js.LICENSE.txt +0 -1
- package/2.min.js +0 -2
- package/2.min.js.LICENSE.txt +0 -1
- package/202.min.js +0 -2
- package/202.min.js.LICENSE.txt +0 -1
- package/294.min.js +0 -2
- package/294.min.js.LICENSE.txt +0 -1
- package/352.min.js +0 -2
- package/352.min.js.LICENSE.txt +0 -1
- package/413.min.js +0 -2
- package/413.min.js.LICENSE.txt +0 -1
- package/414.min.js +0 -2
- package/414.min.js.LICENSE.txt +0 -1
- package/420.min.js +0 -2
- package/420.min.js.LICENSE.txt +0 -1
- package/426.min.js +0 -2
- package/426.min.js.LICENSE.txt +0 -1
- package/429.min.js +0 -2
- package/429.min.js.LICENSE.txt +0 -1
- package/440.min.js +0 -2
- package/440.min.js.LICENSE.txt +0 -1
- package/464.min.js +0 -2
- package/464.min.js.LICENSE.txt +0 -1
- package/505.min.js +0 -2
- package/505.min.js.LICENSE.txt +0 -1
- package/56.min.js +0 -2
- package/56.min.js.LICENSE.txt +0 -1
- package/60.min.js +0 -2
- package/60.min.js.LICENSE.txt +0 -1
- package/668.min.js +0 -2
- package/668.min.js.LICENSE.txt +0 -1
- package/684.min.js +0 -2
- package/684.min.js.LICENSE.txt +0 -1
- package/685.min.js +0 -2
- package/685.min.js.LICENSE.txt +0 -1
- package/688.min.js +0 -2
- package/688.min.js.LICENSE.txt +0 -1
- package/726.min.js +0 -2
- package/726.min.js.LICENSE.txt +0 -1
- package/778.min.js +0 -2
- package/778.min.js.LICENSE.txt +0 -1
- package/792.min.js +0 -2
- package/792.min.js.LICENSE.txt +0 -1
- package/814.min.js +0 -2
- package/814.min.js.LICENSE.txt +0 -1
- package/847.min.js +0 -2
- package/847.min.js.LICENSE.txt +0 -1
- package/864.min.js +0 -2
- package/864.min.js.LICENSE.txt +0 -1
- package/909.min.js +0 -2
- package/909.min.js.LICENSE.txt +0 -1
- package/926.min.js +0 -2
- package/926.min.js.LICENSE.txt +0 -1
- package/933.min.js +0 -2
- package/933.min.js.LICENSE.txt +0 -1
- package/949.min.js +0 -2
- package/949.min.js.LICENSE.txt +0 -1
- package/990.min.js +0 -2
- package/990.min.js.LICENSE.txt +0 -1
- package/node_modules_pnpm_tsparticles_basic_4_0_0-alpha_5_node_modules_tsparticles_basic_browser_index_js.js +0 -30
- package/node_modules_pnpm_tsparticles_move-base_4_0_0-alpha_5_node_modules_tsparticles_move-base_brow-26eaee.js +0 -40
- package/node_modules_pnpm_tsparticles_move-base_4_0_0-alpha_5_node_modules_tsparticles_move-base_brow-29272f.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_5_node_modules_tsparticles_plugin-e-051d5b.js +0 -50
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_5_node_modules_tsparticles_plugin-e-9414b7.js +0 -90
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_5_node_modules_tsparticles_plugin-e-b376d4.js +0 -90
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_5_node_modules_tsparticles_plugin-e-db7965.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-hsl-color_4_0_0-alpha_5_node_modules_tsparticles_plugin--175cc6.js +0 -30
- package/node_modules_pnpm_tsparticles_plugin-interactivity_4_0_0-alpha_5_node_modules_tsparticles_plu-4ef54e.js +0 -120
- package/node_modules_pnpm_tsparticles_plugin-interactivity_4_0_0-alpha_5_node_modules_tsparticles_plu-c0445f.js +0 -70
- package/node_modules_pnpm_tsparticles_plugin-rgb-color_4_0_0-alpha_5_node_modules_tsparticles_plugin--3fa544.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-color_4_0_0-alpha_5_node_modules_tsparticles_updater-co-a17be7.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-opacity_4_0_0-alpha_5_node_modules_tsparticles_updater--4bc1f3.js +0 -30
- package/node_modules_pnpm_tsparticles_updater-size_4_0_0-alpha_5_node_modules_tsparticles_updater-siz-547e88.js +0 -30
- package/tsparticles.preset.bubbles.bundle.min.js.LICENSE.txt +0 -1
- package/tsparticles.preset.bubbles.min.js.LICENSE.txt +0 -1
- package/vendors-node_modules_pnpm_tsparticles_engine_4_0_0-alpha_5_node_modules_tsparticles_engine_br-85ef38.js +0 -90
- package/vendors-node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_5_node_modules_tsparticles_-302925.js +0 -200
- package/vendors-node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_5_node_modules_tsparticles_-4cf04b.js +0 -30
- package/vendors-node_modules_pnpm_tsparticles_plugin-interactivity_4_0_0-alpha_5_node_modules_tsparti-98de40.js +0 -50
- package/vendors-node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-alpha_5_node_modules_tsparticle-f9a455.js +0 -80
|
@@ -1,30 +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-alpha.2
|
|
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-emitters_4_0_0-alpha_5_node_modules_tsparticles_-4cf04b"],{
|
|
19
|
-
|
|
20
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.5/node_modules/@tsparticles/plugin-emitters/browser/EmitterInstance.js"
|
|
21
|
-
/*!************************************************************************************************************************************************!*\
|
|
22
|
-
!*** ../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.5/node_modules/@tsparticles/plugin-emitters/browser/EmitterInstance.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 */ EmitterInstance: () => (/* binding */ EmitterInstance)\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-alpha.5/node_modules/@tsparticles/engine/browser/index.js\");\n/* harmony import */ var _Options_Classes_Emitter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/Emitter.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.5/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/Emitter.js\");\n/* harmony import */ var _Options_Classes_EmitterSize_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Options/Classes/EmitterSize.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.5/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterSize.js\");\n\n\n\nconst defaultLifeDelay = 0, minLifeCount = 0, defaultSpawnDelay = 0, defaultEmitDelay = 0, defaultLifeCount = -1, defaultColorAnimationFactor = 1, colorFactor = 3.6;\nfunction setParticlesOptionsColor(particlesOptions, color) {\n if (particlesOptions.color) {\n particlesOptions.color.value = color;\n }\n else {\n particlesOptions.color = {\n value: color,\n };\n }\n}\nclass EmitterInstance {\n constructor(engine, container, removeCallback, options, position) {\n this.container = container;\n this.removeCallback = removeCallback;\n this._destroy = () => {\n this._mutationObserver?.disconnect();\n this._mutationObserver = undefined;\n this._resizeObserver?.disconnect();\n this._resizeObserver = undefined;\n this.removeCallback(this);\n this._engine.dispatchEvent(\"emitterDestroyed\", {\n container: this.container,\n data: {\n emitter: this,\n },\n });\n };\n this._prepareToDie = () => {\n if (this._paused) {\n return;\n }\n const duration = this.options.life.duration !== undefined ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(this.options.life.duration) : undefined, minDuration = 0, minLifeCount = 0;\n if ((this._lifeCount > minLifeCount || this._immortal) && duration !== undefined && duration > minDuration) {\n this._duration = duration * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds;\n }\n };\n this._setColorAnimation = (animation, initValue, maxValue, factor = defaultColorAnimationFactor) => {\n const container = this.container;\n if (!animation.enable) {\n return initValue;\n }\n const colorOffset = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRangeValue)(animation.offset), delay = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(this.options.rate.delay), emitFactor = container.retina.reduceFactor\n ? (delay * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds) / container.retina.reduceFactor\n : Infinity, colorSpeed = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(animation.speed);\n return (initValue + (colorSpeed * container.fpsLimit) / emitFactor + colorOffset * factor) % maxValue;\n };\n this._engine = engine;\n this._currentDuration = 0;\n this._currentEmitDelay = 0;\n this._currentSpawnDelay = 0;\n this._initialPosition = position;\n if (options instanceof _Options_Classes_Emitter_js__WEBPACK_IMPORTED_MODULE_1__.Emitter) {\n this.options = options;\n }\n else {\n this.options = new _Options_Classes_Emitter_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\n this.options.load(options);\n }\n this._spawnDelay = container.retina.reduceFactor\n ? ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(this.options.life.delay ?? defaultLifeDelay) * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds) /\n container.retina.reduceFactor\n : Infinity;\n this.position = this._initialPosition ?? this._calcPosition();\n this.name = this.options.name;\n this.fill = this.options.fill;\n this._firstSpawn = !this.options.life.wait;\n this._startParticlesAdded = false;\n const particlesOptions = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, this.options.particles);\n particlesOptions.move ??= {};\n particlesOptions.move.direction ??= this.options.direction;\n if (this.options.spawnColor) {\n this.spawnColor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToHsl)(this._engine, this.options.spawnColor);\n }\n this._paused = !this.options.autoPlay;\n this._particlesOptions = particlesOptions;\n this._size = this._calcSize();\n this.size = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getSize)(this._size, this.container.canvas.size);\n this._lifeCount = this.options.life.count ?? defaultLifeCount;\n this._immortal = this._lifeCount <= minLifeCount;\n if (this.options.domId) {\n const element = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.safeDocument)().getElementById(this.options.domId);\n if (element) {\n this._mutationObserver = new MutationObserver(() => {\n this.resize();\n });\n this._resizeObserver = new ResizeObserver(() => {\n this.resize();\n });\n this._mutationObserver.observe(element, {\n attributes: true,\n attributeFilter: [\"style\", \"width\", \"height\"],\n });\n this._resizeObserver.observe(element);\n }\n }\n const shapeOptions = this.options.shape, shapeGenerator = this._engine.emitterShapeManager?.getShapeGenerator(shapeOptions.type);\n if (shapeGenerator) {\n this._shape = shapeGenerator.generate(this.position, this.size, this.fill, shapeOptions.options);\n }\n this._engine.dispatchEvent(\"emitterCreated\", {\n container,\n data: {\n emitter: this,\n },\n });\n this.play();\n }\n externalPause() {\n this._paused = true;\n this.pause();\n }\n externalPlay() {\n this._paused = false;\n this.play();\n }\n async init() {\n await this._shape?.init();\n }\n pause() {\n if (this._paused) {\n return;\n }\n delete this._emitDelay;\n }\n play() {\n if (this._paused) {\n return;\n }\n if (!((this._lifeCount > minLifeCount || this._immortal || !this.options.life.count) &&\n (this._firstSpawn || this._currentSpawnDelay >= (this._spawnDelay ?? defaultSpawnDelay)))) {\n return;\n }\n const container = this.container;\n if (this._emitDelay === undefined) {\n const delay = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(this.options.rate.delay);\n this._emitDelay = container.retina.reduceFactor\n ? (delay * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds) / container.retina.reduceFactor\n : Infinity;\n }\n if (this._lifeCount > minLifeCount || this._immortal) {\n this._prepareToDie();\n }\n }\n resize() {\n const initialPosition = this._initialPosition, container = this.container;\n this.position =\n initialPosition && (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isPointInside)(initialPosition, container.canvas.size, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.origin)\n ? initialPosition\n : this._calcPosition();\n this._size = this._calcSize();\n this.size = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getSize)(this._size, container.canvas.size);\n this._shape?.resize(this.position, this.size);\n }\n update(delta) {\n if (this._paused) {\n return;\n }\n const container = this.container;\n if (this._firstSpawn) {\n this._firstSpawn = false;\n this._currentSpawnDelay = this._spawnDelay ?? defaultSpawnDelay;\n this._currentEmitDelay = this._emitDelay ?? defaultEmitDelay;\n }\n if (!this._startParticlesAdded) {\n this._startParticlesAdded = true;\n this._emitParticles(this.options.startCount);\n }\n if (this._duration !== undefined) {\n this._currentDuration += delta.value;\n if (this._currentDuration >= this._duration) {\n this.pause();\n if (this._spawnDelay !== undefined) {\n delete this._spawnDelay;\n }\n if (!this._immortal) {\n this._lifeCount--;\n }\n if (this._lifeCount > minLifeCount || this._immortal) {\n this.position = this._calcPosition();\n this._shape?.resize(this.position, this.size);\n this._spawnDelay = container.retina.reduceFactor\n ? ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(this.options.life.delay ?? defaultLifeDelay) * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds) /\n container.retina.reduceFactor\n : Infinity;\n }\n else {\n this._destroy();\n }\n this._currentDuration -= this._duration;\n delete this._duration;\n }\n }\n if (this._spawnDelay !== undefined) {\n this._currentSpawnDelay += delta.value;\n if (this._currentSpawnDelay >= this._spawnDelay) {\n this._engine.dispatchEvent(\"emitterPlay\", {\n container: this.container,\n });\n this.play();\n this._currentSpawnDelay -= this._currentSpawnDelay;\n delete this._spawnDelay;\n }\n }\n if (this._emitDelay !== undefined) {\n this._currentEmitDelay += delta.value;\n if (this._currentEmitDelay >= this._emitDelay) {\n this._emit();\n this._currentEmitDelay -= this._emitDelay;\n }\n }\n }\n _calcPosition() {\n const container = this.container;\n if (this.options.domId) {\n const element = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.safeDocument)().getElementById(this.options.domId);\n if (element) {\n const elRect = element.getBoundingClientRect(), pxRatio = container.retina.pixelRatio;\n return {\n x: (elRect.x + elRect.width * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half) * pxRatio,\n y: (elRect.y + elRect.height * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half) * pxRatio,\n };\n }\n }\n return (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.calcPositionOrRandomFromSizeRanged)({\n size: container.canvas.size,\n position: this.options.position,\n });\n }\n _calcSize() {\n const container = this.container;\n if (this.options.domId) {\n const element = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.safeDocument)().getElementById(this.options.domId);\n if (element) {\n const elRect = element.getBoundingClientRect();\n return {\n width: elRect.width * container.retina.pixelRatio,\n height: elRect.height * container.retina.pixelRatio,\n mode: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.PixelMode.precise,\n };\n }\n }\n return (this.options.size ??\n (() => {\n const size = new _Options_Classes_EmitterSize_js__WEBPACK_IMPORTED_MODULE_2__.EmitterSize();\n size.load({\n height: 0,\n mode: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.PixelMode.percent,\n width: 0,\n });\n return size;\n })());\n }\n _emit() {\n if (this._paused) {\n return;\n }\n const quantity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(this.options.rate.quantity);\n this._emitParticles(quantity);\n }\n _emitParticles(quantity) {\n const singleParticlesOptions = ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.itemFromSingleOrMultiple)(this._particlesOptions) ??\n {}), hslAnimation = this.options.spawnColor?.animation, reduceFactor = this.container.retina.reduceFactor, needsColorAnimation = !!hslAnimation, needsShapeData = !!this._shape, needsCopy = needsColorAnimation || needsShapeData, maxValues = needsColorAnimation ? { h: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.hMax, s: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.sMax, l: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.lMax } : null, shapeOptions = this.options.shape;\n for (let i = 0; i < quantity * reduceFactor; i++) {\n const particlesOptions = needsCopy\n ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, singleParticlesOptions)\n : singleParticlesOptions;\n if (this.spawnColor) {\n if (hslAnimation && maxValues) {\n this.spawnColor.h = this._setColorAnimation(hslAnimation.h, this.spawnColor.h, maxValues.h, colorFactor);\n this.spawnColor.s = this._setColorAnimation(hslAnimation.s, this.spawnColor.s, maxValues.s);\n this.spawnColor.l = this._setColorAnimation(hslAnimation.l, this.spawnColor.l, maxValues.l);\n }\n setParticlesOptionsColor(particlesOptions, this.spawnColor);\n }\n let position = this.position;\n if (this._shape) {\n const shapePosData = this._shape.randomPosition();\n if (shapePosData) {\n position = shapePosData.position;\n const replaceData = shapeOptions.replace;\n if (replaceData.color && shapePosData.color) {\n setParticlesOptionsColor(particlesOptions, shapePosData.color);\n }\n if (replaceData.opacity) {\n if (particlesOptions.opacity) {\n particlesOptions.opacity.value = shapePosData.opacity;\n }\n else {\n particlesOptions.opacity = {\n value: shapePosData.opacity,\n };\n }\n }\n }\n else {\n position = null;\n }\n }\n if (position) {\n this.container.particles.addParticle(position, particlesOptions);\n }\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-bubbles/../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.5/node_modules/@tsparticles/plugin-emitters/browser/EmitterInstance.js?\n}");
|
|
27
|
-
|
|
28
|
-
/***/ }
|
|
29
|
-
|
|
30
|
-
}]);
|
|
@@ -1,50 +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-alpha.2
|
|
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-interactivity_4_0_0-alpha_5_node_modules_tsparti-98de40"],{
|
|
19
|
-
|
|
20
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractionManager.js"
|
|
21
|
-
/*!*************************************************************************************************************************************************************!*\
|
|
22
|
-
!*** ../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractionManager.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 */ InteractionManager: () => (/* binding */ InteractionManager)\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-alpha.5/node_modules/@tsparticles/engine/browser/index.js\");\n/* harmony import */ var _InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InteractivityConstants.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractivityConstants.js\");\n/* harmony import */ var _InteractivityEventListeners_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./InteractivityEventListeners.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractivityEventListeners.js\");\n/* harmony import */ var _InteractorType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./InteractorType.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractorType.js\");\n\n\n\n\nclass InteractionManager {\n constructor(engine, container) {\n this.container = container;\n this._intersectionManager = entries => {\n const { container } = this;\n if (container.destroyed || !container.actualOptions.pauseOnOutsideViewport) {\n return;\n }\n for (const entry of entries) {\n if (entry.target !== this.interactivityData.element) {\n continue;\n }\n if (entry.isIntersecting) {\n container.play();\n }\n else {\n container.pause();\n }\n }\n };\n this._engine = engine;\n this._interactors = [];\n this._externalInteractors = [];\n this._particleInteractors = [];\n this._clickHandlers = new Map();\n this._eventListeners = new _InteractivityEventListeners_js__WEBPACK_IMPORTED_MODULE_2__.InteractivityEventListeners(container, this);\n this.interactivityData = {\n mouse: {\n clicking: false,\n inside: false,\n },\n };\n this._intersectionObserver = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.safeIntersectionObserver)(entries => {\n this._intersectionManager(entries);\n });\n }\n addClickHandler(callback) {\n const { container, interactivityData } = this;\n if (container.destroyed) {\n return;\n }\n const el = interactivityData.element;\n if (!el) {\n return;\n }\n const clickOrTouchHandler = (e, pos, radius) => {\n if (container.destroyed) {\n return;\n }\n const pxRatio = container.retina.pixelRatio, posRetina = {\n x: pos.x * pxRatio,\n y: pos.y * pxRatio,\n }, particles = container.particles.quadTree.queryCircle(posRetina, radius * pxRatio);\n callback(e, particles);\n }, clickHandler = (e) => {\n if (container.destroyed) {\n return;\n }\n const mouseEvent = e, pos = {\n x: mouseEvent.offsetX,\n y: mouseEvent.offsetY,\n };\n clickOrTouchHandler(e, pos, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.clickRadius);\n }, touchStartHandler = () => {\n if (container.destroyed) {\n return;\n }\n touched = true;\n touchMoved = false;\n }, touchMoveHandler = () => {\n if (container.destroyed) {\n return;\n }\n touchMoved = true;\n }, touchEndHandler = (e) => {\n if (container.destroyed) {\n return;\n }\n if (touched && !touchMoved) {\n const touchEvent = e, lastTouch = touchEvent.touches[touchEvent.touches.length - _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.touchEndLengthOffset];\n if (!lastTouch) {\n return;\n }\n const element = container.canvas.element, canvasRect = element ? element.getBoundingClientRect() : undefined, pos = {\n x: lastTouch.clientX - (canvasRect ? canvasRect.left : _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.minCoordinate),\n y: lastTouch.clientY - (canvasRect ? canvasRect.top : _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.minCoordinate),\n };\n clickOrTouchHandler(e, pos, Math.max(lastTouch.radiusX, lastTouch.radiusY));\n }\n touched = false;\n touchMoved = false;\n }, touchCancelHandler = () => {\n if (container.destroyed) {\n return;\n }\n touched = false;\n touchMoved = false;\n };\n let touched = false, touchMoved = false;\n this._clickHandlers.set(_InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.clickEvent, clickHandler);\n this._clickHandlers.set(_InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.touchStartEvent, touchStartHandler);\n this._clickHandlers.set(_InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.touchMoveEvent, touchMoveHandler);\n this._clickHandlers.set(_InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.touchEndEvent, touchEndHandler);\n this._clickHandlers.set(_InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.touchCancelEvent, touchCancelHandler);\n for (const [key, handler] of this._clickHandlers) {\n el.addEventListener(key, handler);\n }\n }\n addListeners() {\n this._eventListeners.addListeners();\n }\n clearClickHandlers() {\n const { container, interactivityData } = this;\n if (container.destroyed) {\n return;\n }\n for (const [key, handler] of this._clickHandlers) {\n interactivityData.element?.removeEventListener(key, handler);\n }\n this._clickHandlers.clear();\n }\n externalInteract(delta) {\n for (const interactor of this._externalInteractors) {\n const { interactivityData } = this;\n if (interactor.isEnabled(interactivityData)) {\n interactor.interact(interactivityData, delta);\n }\n }\n }\n handleClickMode(mode) {\n if (this.container.destroyed) {\n return;\n }\n const { interactivityData } = this;\n for (const interactor of this._externalInteractors) {\n interactor.handleClickMode?.(mode, interactivityData);\n }\n }\n async init() {\n const interactors = await this._engine.getInteractors?.(this.container, true);\n if (!interactors) {\n return;\n }\n this._interactors = interactors;\n this._externalInteractors = [];\n this._particleInteractors = [];\n for (const interactor of this._interactors) {\n switch (interactor.type) {\n case _InteractorType_js__WEBPACK_IMPORTED_MODULE_3__.InteractorType.external:\n this._externalInteractors.push(interactor);\n break;\n case _InteractorType_js__WEBPACK_IMPORTED_MODULE_3__.InteractorType.particles:\n this._particleInteractors.push(interactor);\n break;\n }\n interactor.init();\n }\n }\n particlesInteract(particle, delta) {\n const { interactivityData } = this;\n for (const interactor of this._externalInteractors) {\n interactor.clear(particle, delta);\n }\n for (const interactor of this._particleInteractors) {\n if (interactor.isEnabled(particle, interactivityData)) {\n interactor.interact(particle, interactivityData, delta);\n }\n }\n }\n removeListeners() {\n this._eventListeners.removeListeners();\n }\n reset(particle) {\n const { interactivityData } = this;\n for (const interactor of this._externalInteractors) {\n if (interactor.isEnabled(interactivityData)) {\n interactor.reset(interactivityData, particle);\n }\n }\n for (const interactor of this._particleInteractors) {\n if (interactor.isEnabled(particle, interactivityData)) {\n interactor.reset(interactivityData, particle);\n }\n }\n }\n startObserving() {\n const { interactivityData } = this;\n if (interactivityData.element instanceof HTMLElement && this._intersectionObserver) {\n this._intersectionObserver.observe(interactivityData.element);\n }\n }\n stopObserving() {\n const { interactivityData } = this;\n if (interactivityData.element instanceof HTMLElement && this._intersectionObserver) {\n this._intersectionObserver.unobserve(interactivityData.element);\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-bubbles/../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractionManager.js?\n}");
|
|
27
|
-
|
|
28
|
-
/***/ },
|
|
29
|
-
|
|
30
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractivityEventListeners.js"
|
|
31
|
-
/*!**********************************************************************************************************************************************************************!*\
|
|
32
|
-
!*** ../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractivityEventListeners.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 */ InteractivityEventListeners: () => (/* binding */ InteractivityEventListeners)\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-alpha.5/node_modules/@tsparticles/engine/browser/index.js\");\n/* harmony import */ var _InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InteractivityConstants.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractivityConstants.js\");\n/* harmony import */ var _InteractivityDetect_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./InteractivityDetect.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractivityDetect.js\");\n\n\n\nclass InteractivityEventListeners {\n constructor(container, interactionManager) {\n this._canPush = true;\n this._doMouseTouchClick = e => {\n const container = this._container, interactionManager = this._interactionManager, options = container.actualOptions;\n if (this._canPush) {\n const mouseInteractivity = interactionManager.interactivityData.mouse, mousePos = mouseInteractivity.position;\n if (!mousePos) {\n return;\n }\n mouseInteractivity.clickPosition = { ...mousePos };\n mouseInteractivity.clickTime = Date.now();\n const onClick = options.interactivity?.events.onClick;\n if (!onClick?.mode) {\n return;\n }\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.executeOnSingleOrMultiple)(onClick.mode, mode => {\n interactionManager.handleClickMode(mode);\n });\n }\n if (e.type === \"touchend\") {\n setTimeout(() => {\n this._mouseTouchFinish();\n }, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.touchDelay);\n }\n };\n this._handleVisibilityChange = () => {\n this._mouseTouchFinish();\n };\n this._manageInteractivityListeners = (mouseLeaveTmpEvent, add) => {\n const handlers = this._handlers, container = this._container, interactionManager = this._interactionManager, options = container.actualOptions, interactivityEl = interactionManager.interactivityData.element;\n if (!interactivityEl) {\n return;\n }\n const html = interactivityEl, canvas = container.canvas;\n canvas.setPointerEvents(html === canvas.element ? \"initial\" : \"none\");\n if (!(options.interactivity?.events.onHover.enable || options.interactivity?.events.onClick.enable)) {\n return;\n }\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.manageListener)(interactivityEl, _InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.mouseMoveEvent, handlers.mouseMove, add);\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.manageListener)(interactivityEl, _InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.touchStartEvent, handlers.touchStart, add);\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.manageListener)(interactivityEl, _InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.touchMoveEvent, handlers.touchMove, add);\n if (options.interactivity.events.onClick.enable) {\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.manageListener)(interactivityEl, _InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.touchEndEvent, handlers.touchEndClick, add);\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.manageListener)(interactivityEl, _InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.mouseUpEvent, handlers.mouseUp, add);\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.manageListener)(interactivityEl, _InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.mouseDownEvent, handlers.mouseDown, add);\n }\n else {\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.manageListener)(interactivityEl, _InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.touchEndEvent, handlers.touchEnd, add);\n }\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.manageListener)(interactivityEl, mouseLeaveTmpEvent, handlers.mouseLeave, add);\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.manageListener)(interactivityEl, _InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.touchCancelEvent, handlers.touchCancel, add);\n };\n this._manageListeners = add => {\n const handlers = this._handlers, container = this._container, interactionManager = this._interactionManager, options = container.actualOptions, detectType = options.interactivity?.detectsOn, canvasEl = container.canvas.element;\n let mouseLeaveTmpEvent = _InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.mouseLeaveEvent;\n if (detectType === _InteractivityDetect_js__WEBPACK_IMPORTED_MODULE_2__.InteractivityDetect.window) {\n interactionManager.interactivityData.element = globalThis;\n mouseLeaveTmpEvent = _InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.mouseOutEvent;\n }\n else if (detectType === _InteractivityDetect_js__WEBPACK_IMPORTED_MODULE_2__.InteractivityDetect.parent && canvasEl) {\n interactionManager.interactivityData.element = canvasEl.parentElement ?? canvasEl.parentNode;\n }\n else {\n interactionManager.interactivityData.element = canvasEl;\n }\n this._manageInteractivityListeners(mouseLeaveTmpEvent, add);\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.manageListener)(document, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.visibilityChangeEvent, handlers.visibilityChange, add, false);\n };\n this._mouseDown = () => {\n const { interactivityData } = this._interactionManager, { mouse } = interactivityData;\n mouse.clicking = true;\n mouse.downPosition = mouse.position;\n };\n this._mouseTouchClick = e => {\n const container = this._container, interactionManager = this._interactionManager, options = container.actualOptions, { mouse } = interactionManager.interactivityData;\n mouse.inside = true;\n let handled = false;\n const mousePosition = mouse.position;\n if (!mousePosition || !options.interactivity?.events.onClick.enable) {\n return;\n }\n for (const plugin of container.plugins) {\n if (!plugin.clickPositionValid) {\n continue;\n }\n handled = plugin.clickPositionValid(mousePosition);\n if (handled) {\n break;\n }\n }\n if (!handled) {\n this._doMouseTouchClick(e);\n }\n mouse.clicking = false;\n };\n this._mouseTouchFinish = () => {\n const { interactivityData } = this._interactionManager, { mouse } = interactivityData;\n delete mouse.position;\n delete mouse.clickPosition;\n delete mouse.downPosition;\n interactivityData.status = _InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.mouseLeaveEvent;\n mouse.inside = false;\n mouse.clicking = false;\n };\n this._mouseTouchMove = e => {\n const container = this._container, interactionManager = this._interactionManager, options = container.actualOptions, interactivity = interactionManager.interactivityData, canvasEl = container.canvas.element;\n if (!interactivity.element) {\n return;\n }\n interactivity.mouse.inside = true;\n let pos;\n if (e.type.startsWith(\"pointer\")) {\n this._canPush = true;\n const mouseEvent = e;\n if (interactivity.element === globalThis) {\n if (canvasEl) {\n const clientRect = canvasEl.getBoundingClientRect();\n pos = {\n x: mouseEvent.clientX - clientRect.left,\n y: mouseEvent.clientY - clientRect.top,\n };\n }\n }\n else if (options.interactivity?.detectsOn === _InteractivityDetect_js__WEBPACK_IMPORTED_MODULE_2__.InteractivityDetect.parent) {\n const source = mouseEvent.target, target = mouseEvent.currentTarget;\n if (canvasEl) {\n const sourceRect = source.getBoundingClientRect(), targetRect = target.getBoundingClientRect(), canvasRect = canvasEl.getBoundingClientRect();\n pos = {\n x: mouseEvent.offsetX + _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.double * sourceRect.left - (targetRect.left + canvasRect.left),\n y: mouseEvent.offsetY + _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.double * sourceRect.top - (targetRect.top + canvasRect.top),\n };\n }\n else {\n pos = {\n x: mouseEvent.offsetX,\n y: mouseEvent.offsetY,\n };\n }\n }\n else if (mouseEvent.target === canvasEl) {\n pos = {\n x: mouseEvent.offsetX,\n y: mouseEvent.offsetY,\n };\n }\n }\n else {\n this._canPush = e.type !== \"touchmove\";\n if (canvasEl) {\n const touchEvent = e, lastTouch = touchEvent.touches[touchEvent.touches.length - _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.lengthOffset], canvasRect = canvasEl.getBoundingClientRect();\n if (!lastTouch) {\n return;\n }\n pos = {\n x: lastTouch.clientX - canvasRect.left,\n y: lastTouch.clientY - canvasRect.top,\n };\n }\n }\n const pxRatio = container.retina.pixelRatio;\n if (pos) {\n pos.x *= pxRatio;\n pos.y *= pxRatio;\n }\n interactivity.mouse.position = pos;\n interactivity.status = _InteractivityConstants_js__WEBPACK_IMPORTED_MODULE_1__.mouseMoveEvent;\n };\n this._touchEnd = e => {\n const evt = e, touches = Array.from(evt.changedTouches);\n for (const touch of touches) {\n this._touches.delete(touch.identifier);\n }\n this._mouseTouchFinish();\n };\n this._touchEndClick = e => {\n const evt = e, touches = Array.from(evt.changedTouches);\n for (const touch of touches) {\n this._touches.delete(touch.identifier);\n }\n this._mouseTouchClick(e);\n };\n this._touchStart = e => {\n const evt = e, touches = Array.from(evt.changedTouches);\n for (const touch of touches) {\n this._touches.set(touch.identifier, performance.now());\n }\n this._mouseTouchMove(e);\n };\n this._container = container;\n this._interactionManager = interactionManager;\n this._touches = new Map();\n this._handlers = {\n mouseDown: () => {\n this._mouseDown();\n },\n mouseLeave: () => {\n this._mouseTouchFinish();\n },\n mouseMove: (e) => {\n this._mouseTouchMove(e);\n },\n mouseUp: (e) => {\n this._mouseTouchClick(e);\n },\n touchStart: (e) => {\n this._touchStart(e);\n },\n touchMove: (e) => {\n this._mouseTouchMove(e);\n },\n touchEnd: (e) => {\n this._touchEnd(e);\n },\n touchCancel: (e) => {\n this._touchEnd(e);\n },\n touchEndClick: (e) => {\n this._touchEndClick(e);\n },\n visibilityChange: () => {\n this._handleVisibilityChange();\n },\n };\n }\n addListeners() {\n this._manageListeners(true);\n }\n removeListeners() {\n this._manageListeners(false);\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-bubbles/../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractivityEventListeners.js?\n}");
|
|
37
|
-
|
|
38
|
-
/***/ },
|
|
39
|
-
|
|
40
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractivityPluginInstance.js"
|
|
41
|
-
/*!**********************************************************************************************************************************************************************!*\
|
|
42
|
-
!*** ../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractivityPluginInstance.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 */ InteractivityPluginInstance: () => (/* binding */ InteractivityPluginInstance)\n/* harmony export */ });\n/* harmony import */ var _InteractionManager_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./InteractionManager.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractionManager.js\");\n/* harmony import */ var _Options_Classes_Interactivity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/Interactivity.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/Options/Classes/Interactivity.js\");\n\n\nclass InteractivityPluginInstance {\n constructor(engine, container) {\n this._container = container;\n this._engine = engine;\n this.interactionManager = new _InteractionManager_js__WEBPACK_IMPORTED_MODULE_0__.InteractionManager(engine, container);\n this._container.addClickHandler = (callback) => {\n this.interactionManager.addClickHandler(callback);\n };\n }\n addClickHandler(callback) {\n this.interactionManager.addClickHandler(callback);\n }\n clearClickHandlers() {\n this.interactionManager.clearClickHandlers();\n }\n destroy() {\n this.clearClickHandlers();\n this._engine.interactors?.delete(this._container);\n }\n particleCreated(particle) {\n const interactivityParticle = particle, interactivity = new _Options_Classes_Interactivity_js__WEBPACK_IMPORTED_MODULE_1__.Interactivity(this._engine, this._container);\n interactivity.load(this._container.actualOptions.interactivity);\n interactivity.load(interactivityParticle.options.interactivity);\n interactivityParticle.interactivity = interactivity;\n }\n particleReset(particle) {\n this.interactionManager.reset(particle);\n }\n postParticleUpdate(particle, delta) {\n this.interactionManager.particlesInteract(particle, delta);\n }\n postUpdate(delta) {\n this.interactionManager.externalInteract(delta);\n }\n async preInit() {\n await this.interactionManager.init();\n }\n async redrawInit() {\n await this.interactionManager.init();\n }\n start() {\n this.interactionManager.addListeners();\n this.interactionManager.startObserving();\n return Promise.resolve();\n }\n stop() {\n this.interactionManager.removeListeners();\n this.interactionManager.stopObserving();\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-bubbles/../../node_modules/.pnpm/@tsparticles+plugin-interactivity@4.0.0-alpha.5/node_modules/@tsparticles/plugin-interactivity/browser/InteractivityPluginInstance.js?\n}");
|
|
47
|
-
|
|
48
|
-
/***/ }
|
|
49
|
-
|
|
50
|
-
}]);
|
|
@@ -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-alpha.2
|
|
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-alpha_5_node_modules_tsparticle-f9a455"],{
|
|
19
|
-
|
|
20
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js"
|
|
21
|
-
/*!**************************************************************************************************************************************************!*\
|
|
22
|
-
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/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-alpha.5/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-alpha.5/node_modules/@tsparticles/updater-out-modes/browser/Utils.js\");\n\n\nclass BounceOutMode {\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 }\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 container.plugins) {\n if (plugin.particleBounce !== undefined) {\n handled = plugin.particleBounce(particle, delta, direction);\n }\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-alpha.5/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js?\n}");
|
|
27
|
-
|
|
28
|
-
/***/ },
|
|
29
|
-
|
|
30
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js"
|
|
31
|
-
/*!***************************************************************************************************************************************************!*\
|
|
32
|
-
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/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-alpha.5/node_modules/@tsparticles/engine/browser/index.js\");\n\nconst minVelocity = 0;\nclass DestroyOutMode {\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__.Vector.origin, 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 container.particles.remove(particle, particle.group, true);\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-bubbles/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js?\n}");
|
|
37
|
-
|
|
38
|
-
/***/ },
|
|
39
|
-
|
|
40
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js"
|
|
41
|
-
/*!************************************************************************************************************************************************!*\
|
|
42
|
-
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/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-alpha.5/node_modules/@tsparticles/engine/browser/index.js\");\n\nconst minVelocity = 0;\nclass NoneOutMode {\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__.Vector.origin, pRadius, direction)) {\n container.particles.remove(particle);\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 container.particles.remove(particle);\n }\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-bubbles/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js?\n}");
|
|
47
|
-
|
|
48
|
-
/***/ },
|
|
49
|
-
|
|
50
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js"
|
|
51
|
-
/*!*******************************************************************************************************************************************************!*\
|
|
52
|
-
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/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-alpha.5/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-alpha.5/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-alpha.5/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-alpha.5/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-alpha.5/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 constructor(container) {\n this._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 this._updateOutMode = (particle, delta, outMode, direction) => {\n for (const updater of this.updaters.values()) {\n updater.update(particle, direction, delta, outMode);\n }\n };\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}\n\n\n//# sourceURL=webpack://@tsparticles/preset-bubbles/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js?\n}");
|
|
57
|
-
|
|
58
|
-
/***/ },
|
|
59
|
-
|
|
60
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js"
|
|
61
|
-
/*!***********************************************************************************************************************************************!*\
|
|
62
|
-
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/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-alpha.5/node_modules/@tsparticles/engine/browser/index.js\");\n\nconst minVelocity = 0, minDistance = 0;\nclass OutOutMode {\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 const circVec = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.origin;\n circVec.length = particle.moveCenter.radius;\n circVec.angle = particle.velocity.angle + Math.PI;\n circVec.addTo(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.create(particle.moveCenter));\n const { dx, dy } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(particle.position, circVec);\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__.Vector.origin, 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 &&\n 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 &&\n 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-alpha.5/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js?\n}");
|
|
67
|
-
|
|
68
|
-
/***/ },
|
|
69
|
-
|
|
70
|
-
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/node_modules/@tsparticles/updater-out-modes/browser/Utils.js"
|
|
71
|
-
/*!******************************************************************************************************************************************!*\
|
|
72
|
-
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.5/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-alpha.5/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-alpha.5/node_modules/@tsparticles/updater-out-modes/browser/Utils.js?\n}");
|
|
77
|
-
|
|
78
|
-
/***/ }
|
|
79
|
-
|
|
80
|
-
}]);
|