@tsparticles/preset-confetti 3.1.0 → 4.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/125.min.js +2 -0
- package/125.min.js.LICENSE.txt +1 -0
- package/171.min.js +2 -0
- package/171.min.js.LICENSE.txt +1 -0
- package/213.min.js +2 -0
- package/213.min.js.LICENSE.txt +1 -0
- package/22.min.js +2 -0
- package/22.min.js.LICENSE.txt +1 -0
- package/227.min.js +2 -0
- package/227.min.js.LICENSE.txt +1 -0
- package/237.min.js +2 -0
- package/237.min.js.LICENSE.txt +1 -0
- package/264.min.js +2 -0
- package/264.min.js.LICENSE.txt +1 -0
- package/267.min.js +2 -0
- package/267.min.js.LICENSE.txt +1 -0
- package/283.min.js +2 -0
- package/283.min.js.LICENSE.txt +1 -0
- package/293.min.js +2 -0
- package/293.min.js.LICENSE.txt +1 -0
- package/302.min.js +2 -0
- package/302.min.js.LICENSE.txt +1 -0
- package/313.min.js +2 -0
- package/313.min.js.LICENSE.txt +1 -0
- package/349.min.js +2 -0
- package/349.min.js.LICENSE.txt +1 -0
- package/358.min.js +2 -0
- package/358.min.js.LICENSE.txt +1 -0
- package/365.min.js +2 -0
- package/365.min.js.LICENSE.txt +1 -0
- package/379.min.js +2 -0
- package/379.min.js.LICENSE.txt +1 -0
- package/397.min.js +2 -0
- package/397.min.js.LICENSE.txt +1 -0
- package/418.min.js +2 -0
- package/418.min.js.LICENSE.txt +1 -0
- package/453.min.js +2 -0
- package/453.min.js.LICENSE.txt +1 -0
- package/455.min.js +2 -0
- package/455.min.js.LICENSE.txt +1 -0
- package/459.min.js +2 -0
- package/459.min.js.LICENSE.txt +1 -0
- package/481.min.js +2 -0
- package/481.min.js.LICENSE.txt +1 -0
- package/509.min.js +2 -0
- package/509.min.js.LICENSE.txt +1 -0
- package/527.min.js +2 -0
- package/527.min.js.LICENSE.txt +1 -0
- package/595.min.js +2 -0
- package/595.min.js.LICENSE.txt +1 -0
- package/621.min.js +2 -0
- package/621.min.js.LICENSE.txt +1 -0
- package/633.min.js +2 -0
- package/633.min.js.LICENSE.txt +1 -0
- package/637.min.js +2 -0
- package/637.min.js.LICENSE.txt +1 -0
- package/669.min.js +2 -0
- package/669.min.js.LICENSE.txt +1 -0
- package/679.min.js +2 -0
- package/679.min.js.LICENSE.txt +1 -0
- package/717.min.js +2 -0
- package/717.min.js.LICENSE.txt +1 -0
- package/751.min.js +2 -0
- package/751.min.js.LICENSE.txt +1 -0
- package/801.min.js +2 -0
- package/801.min.js.LICENSE.txt +1 -0
- package/802.min.js +2 -0
- package/802.min.js.LICENSE.txt +1 -0
- package/803.min.js +2 -0
- package/803.min.js.LICENSE.txt +1 -0
- package/819.min.js +2 -0
- package/819.min.js.LICENSE.txt +1 -0
- package/926.min.js +2 -0
- package/926.min.js.LICENSE.txt +1 -0
- package/98.min.js +2 -0
- package/98.min.js.LICENSE.txt +1 -0
- package/README.md +1 -1
- package/browser/bundle.js +2 -3
- package/browser/index.js +14 -25
- package/browser/options.js +2 -1
- package/cjs/bundle.js +2 -7
- package/cjs/index.js +14 -29
- package/cjs/options.js +3 -5
- package/dist_browser_options_js.js +30 -0
- package/esm/bundle.js +2 -3
- package/esm/index.js +14 -25
- package/esm/options.js +2 -1
- package/node_modules_pnpm_tsparticles_basic_4_0_0-alpha_2_node_modules_tsparticles_basic_browser_index_js.js +30 -0
- package/node_modules_pnpm_tsparticles_move-base_4_0_0-alpha_2_node_modules_tsparticles_move-base_brow-7d79eb.js +40 -0
- package/node_modules_pnpm_tsparticles_move-base_4_0_0-alpha_2_node_modules_tsparticles_move-base_brow-fb148a.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_2_node_modules_tsparticles_plugin-e-122a51.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_2_node_modules_tsparticles_plugin-e-6bd6f8.js +50 -0
- package/node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-alpha_2_node_modules_tsparticles_plugin--91288b.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-hex-color_4_0_0-alpha_2_node_modules_tsparticles_plugin--d06b2a.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-hsl-color_4_0_0-alpha_2_node_modules_tsparticles_plugin--70976c.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-hsl-color_4_0_0-alpha_2_node_modules_tsparticles_plugin--e141e9.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-motion_4_0_0-alpha_2_node_modules_tsparticles_plugin-mot-003442.js +60 -0
- package/node_modules_pnpm_tsparticles_plugin-motion_4_0_0-alpha_2_node_modules_tsparticles_plugin-mot-a95f57.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-rgb-color_4_0_0-alpha_2_node_modules_tsparticles_plugin--60c9df.js +30 -0
- package/node_modules_pnpm_tsparticles_plugin-rgb-color_4_0_0-alpha_2_node_modules_tsparticles_plugin--732407.js +30 -0
- package/node_modules_pnpm_tsparticles_shape-circle_4_0_0-alpha_2_node_modules_tsparticles_shape-circl-c98489.js +40 -0
- package/node_modules_pnpm_tsparticles_shape-circle_4_0_0-alpha_2_node_modules_tsparticles_shape-circl-ce96e8.js +30 -0
- package/node_modules_pnpm_tsparticles_shape-square_4_0_0-alpha_2_node_modules_tsparticles_shape-squar-87e5cc.js +40 -0
- package/node_modules_pnpm_tsparticles_shape-square_4_0_0-alpha_2_node_modules_tsparticles_shape-squar-9d7fc9.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-color_4_0_0-alpha_2_node_modules_tsparticles_updater-co-210bd6.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-color_4_0_0-alpha_2_node_modules_tsparticles_updater-co-6ff909.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-life_4_0_0-alpha_2_node_modules_tsparticles_updater-lif-50f821.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-life_4_0_0-alpha_2_node_modules_tsparticles_updater-lif-dbf90f.js +70 -0
- package/node_modules_pnpm_tsparticles_updater-opacity_4_0_0-alpha_2_node_modules_tsparticles_updater--4e8c57.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-opacity_4_0_0-alpha_2_node_modules_tsparticles_updater--ac14ff.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-alpha_2_node_modules_tsparticles_update-cd317f.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-roll_4_0_0-alpha_2_node_modules_tsparticles_updater-rol-4ecdb9.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-roll_4_0_0-alpha_2_node_modules_tsparticles_updater-rol-7edbad.js +70 -0
- package/node_modules_pnpm_tsparticles_updater-rotate_4_0_0-alpha_2_node_modules_tsparticles_updater-r-0de212.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-rotate_4_0_0-alpha_2_node_modules_tsparticles_updater-r-e97427.js +50 -0
- package/node_modules_pnpm_tsparticles_updater-size_4_0_0-alpha_2_node_modules_tsparticles_updater-siz-53e0fe.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-size_4_0_0-alpha_2_node_modules_tsparticles_updater-siz-aaa117.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-tilt_4_0_0-alpha_2_node_modules_tsparticles_updater-til-0b0e86.js +60 -0
- package/node_modules_pnpm_tsparticles_updater-tilt_4_0_0-alpha_2_node_modules_tsparticles_updater-til-9ec545.js +30 -0
- package/node_modules_pnpm_tsparticles_updater-wobble_4_0_0-alpha_2_node_modules_tsparticles_updater-w-536a35.js +60 -0
- package/node_modules_pnpm_tsparticles_updater-wobble_4_0_0-alpha_2_node_modules_tsparticles_updater-w-56b8f6.js +30 -0
- package/package.json +26 -13
- package/report.html +5 -4
- package/tsparticles.preset.confetti.bundle.js +765 -2474
- package/tsparticles.preset.confetti.bundle.min.js +1 -1
- package/tsparticles.preset.confetti.bundle.min.js.LICENSE.txt +1 -1
- package/tsparticles.preset.confetti.js +263 -54
- package/tsparticles.preset.confetti.min.js +1 -1
- package/tsparticles.preset.confetti.min.js.LICENSE.txt +1 -1
- package/types/bundle.d.ts +2 -3
- package/types/index.d.ts +1 -1
- package/types/options.d.ts +1 -0
- package/umd/bundle.js +2 -2
- package/umd/index.js +50 -28
- package/umd/options.js +3 -2
- package/vendors-node_modules_pnpm_tsparticles_engine_4_0_0-alpha_2_node_modules_tsparticles_engine_br-9c0a0f.js +100 -0
- package/vendors-node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_2_node_modules_tsparticles_-1e60b5.js +110 -0
- package/vendors-node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-alpha_2_node_modules_tsparticle-124574.js +80 -0
|
@@ -0,0 +1,110 @@
|
|
|
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.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_confetti"] = this["webpackChunk_tsparticles_preset_confetti"] || []).push([["vendors-node_modules_pnpm_tsparticles_plugin-emitters_4_0_0-alpha_2_node_modules_tsparticles_-1e60b5"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/EmitterInstance.js"
|
|
21
|
+
/*!************************************************************************************************************************************************!*\
|
|
22
|
+
!*** ../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/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.2/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.2/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.2/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;\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, emitters, container, options, position) {\n this.emitters = emitters;\n this.container = container;\n this._destroy = () => {\n this._mutationObserver?.disconnect();\n this._mutationObserver = undefined;\n this._resizeObserver?.disconnect();\n this._resizeObserver = undefined;\n this.emitters.removeEmitter(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), reduceFactor = this.container.retina.reduceFactor;\n for (let i = 0; i < quantity * reduceFactor; i++) {\n const particlesOptions = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, singleParticlesOptions);\n if (this.spawnColor) {\n const hslAnimation = this.options.spawnColor?.animation;\n if (hslAnimation) {\n const maxValues = {\n h: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.hMax,\n s: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.sMax,\n l: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.lMax,\n }, colorFactor = 3.6;\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 const shapeOptions = this.options.shape;\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-confetti/../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/EmitterInstance.js?\n}");
|
|
27
|
+
|
|
28
|
+
/***/ },
|
|
29
|
+
|
|
30
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Emitters.js"
|
|
31
|
+
/*!*****************************************************************************************************************************************!*\
|
|
32
|
+
!*** ../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Emitters.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 */ Emitters: () => (/* binding */ Emitters)\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.2/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.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/Emitter.js\");\n/* harmony import */ var _Enums_EmitterClickMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Enums/EmitterClickMode.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Enums/EmitterClickMode.js\");\n/* harmony import */ var _EmitterInstance_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./EmitterInstance.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/EmitterInstance.js\");\n\n\n\n\nclass Emitters {\n constructor(engine, container) {\n this.container = container;\n this._engine = engine;\n this.array = [];\n this.emitters = [];\n this.interactivityEmitters = {\n random: {\n count: 1,\n enable: false,\n },\n value: [],\n };\n const defaultIndex = 0;\n container.getEmitter = (idxOrName) => idxOrName === undefined || (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNumber)(idxOrName)\n ? this.array[idxOrName ?? defaultIndex]\n : this.array.find(t => t.name === idxOrName);\n container.addEmitter = async (options, position) => this.addEmitter(options, position);\n container.removeEmitter = (idxOrName) => {\n const emitter = container.getEmitter(idxOrName);\n if (emitter) {\n this.removeEmitter(emitter);\n }\n };\n container.playEmitter = (idxOrName) => {\n const emitter = container.getEmitter(idxOrName);\n if (emitter) {\n emitter.externalPlay();\n }\n };\n container.pauseEmitter = (idxOrName) => {\n const emitter = container.getEmitter(idxOrName);\n if (emitter) {\n emitter.externalPause();\n }\n };\n }\n async addEmitter(options, position) {\n const emitterOptions = new _Options_Classes_Emitter_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\n emitterOptions.load(options);\n const emitter = new _EmitterInstance_js__WEBPACK_IMPORTED_MODULE_3__.EmitterInstance(this._engine, this, this.container, emitterOptions, position);\n await emitter.init();\n this.array.push(emitter);\n return emitter;\n }\n handleClickMode(mode) {\n const modeEmitters = this.interactivityEmitters;\n if (mode !== _Enums_EmitterClickMode_js__WEBPACK_IMPORTED_MODULE_2__.EmitterClickMode.emitter) {\n return;\n }\n let emittersModeOptions;\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isArray)(modeEmitters.value)) {\n const minLength = 0;\n if (modeEmitters.value.length > minLength && modeEmitters.random.enable) {\n emittersModeOptions = [];\n const usedIndexes = [];\n for (let i = 0; i < modeEmitters.random.count; i++) {\n const idx = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.arrayRandomIndex)(modeEmitters.value);\n if (usedIndexes.includes(idx) && usedIndexes.length < modeEmitters.value.length) {\n i--;\n continue;\n }\n usedIndexes.push(idx);\n const selectedOptions = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.itemFromArray)(modeEmitters.value, idx);\n if (!selectedOptions) {\n continue;\n }\n emittersModeOptions.push(selectedOptions);\n }\n }\n else {\n emittersModeOptions = modeEmitters.value;\n }\n }\n else {\n emittersModeOptions = modeEmitters.value;\n }\n const emittersOptions = emittersModeOptions, ePosition = this.container.interactivity.mouse.clickPosition;\n void (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.executeOnSingleOrMultiple)(emittersOptions, async (emitter) => {\n await this.addEmitter(emitter, ePosition);\n });\n }\n async init() {\n this.emitters = this.container.actualOptions.emitters;\n this.interactivityEmitters = this.container.actualOptions.interactivity.modes.emitters;\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isArray)(this.emitters)) {\n for (const emitterOptions of this.emitters) {\n await this.addEmitter(emitterOptions);\n }\n }\n else {\n await this.addEmitter(this.emitters);\n }\n }\n pause() {\n for (const emitter of this.array) {\n emitter.pause();\n }\n }\n play() {\n for (const emitter of this.array) {\n emitter.play();\n }\n }\n removeEmitter(emitter) {\n const index = this.array.indexOf(emitter), minIndex = 0, deleteCount = 1;\n if (index >= minIndex) {\n this.array.splice(index, deleteCount);\n }\n }\n resize() {\n for (const emitter of this.array) {\n emitter.resize();\n }\n }\n stop() {\n this.array = [];\n }\n update(delta) {\n for (const emitter of this.array) {\n emitter.update(delta);\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-confetti/../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Emitters.js?\n}");
|
|
37
|
+
|
|
38
|
+
/***/ },
|
|
39
|
+
|
|
40
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/EmittersPlugin.js"
|
|
41
|
+
/*!***********************************************************************************************************************************************!*\
|
|
42
|
+
!*** ../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/EmittersPlugin.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 */ EmittersPlugin: () => (/* binding */ EmittersPlugin)\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.2/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.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/Emitter.js\");\n/* harmony import */ var _Enums_EmitterClickMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Enums/EmitterClickMode.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Enums/EmitterClickMode.js\");\n/* harmony import */ var _Emitters_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Emitters.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Emitters.js\");\n\n\n\n\nclass EmittersPlugin {\n constructor(engine) {\n this._engine = engine;\n this.id = \"emitters\";\n }\n getPlugin(container) {\n return Promise.resolve(new _Emitters_js__WEBPACK_IMPORTED_MODULE_3__.Emitters(this._engine, container));\n }\n loadOptions(options, source) {\n if (!this.needsPlugin(options) && !this.needsPlugin(source)) {\n return;\n }\n if (source?.emitters) {\n options.emitters = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.executeOnSingleOrMultiple)(source.emitters, emitter => {\n const tmp = new _Options_Classes_Emitter_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\n tmp.load(emitter);\n return tmp;\n });\n }\n const interactivityEmitters = source?.interactivity?.modes?.emitters;\n if (interactivityEmitters) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isArray)(interactivityEmitters)) {\n options.interactivity.modes.emitters = {\n random: {\n count: 1,\n enable: true,\n },\n value: interactivityEmitters.map(s => {\n const tmp = new _Options_Classes_Emitter_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\n tmp.load(s);\n return tmp;\n }),\n };\n }\n else {\n const emitterMode = interactivityEmitters;\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isArray)(emitterMode.value)) {\n options.interactivity.modes.emitters = {\n random: {\n count: emitterMode.random.count,\n enable: emitterMode.random.enable,\n },\n value: emitterMode.value.map(s => {\n const tmp = new _Options_Classes_Emitter_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\n tmp.load(s);\n return tmp;\n }),\n };\n }\n else {\n const tmp = new _Options_Classes_Emitter_js__WEBPACK_IMPORTED_MODULE_1__.Emitter();\n tmp.load(emitterMode.value);\n options.interactivity.modes.emitters = {\n random: {\n count: emitterMode.random.count,\n enable: emitterMode.random.enable,\n },\n value: tmp,\n };\n }\n }\n }\n }\n needsPlugin(options) {\n if (!options) {\n return false;\n }\n const emitters = options.emitters;\n return (((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isArray)(emitters) && !!emitters.length) ||\n emitters !== undefined ||\n (!!options.interactivity?.events?.onClick?.mode &&\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isInArray)(_Enums_EmitterClickMode_js__WEBPACK_IMPORTED_MODULE_2__.EmitterClickMode.emitter, options.interactivity.events.onClick.mode)));\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-confetti/../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/EmittersPlugin.js?\n}");
|
|
47
|
+
|
|
48
|
+
/***/ },
|
|
49
|
+
|
|
50
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/Emitter.js"
|
|
51
|
+
/*!********************************************************************************************************************************************************!*\
|
|
52
|
+
!*** ../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/Emitter.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 */ Emitter: () => (/* binding */ Emitter)\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.2/node_modules/@tsparticles/engine/browser/index.js\");\n/* harmony import */ var _EmitterLife_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./EmitterLife.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterLife.js\");\n/* harmony import */ var _EmitterRate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./EmitterRate.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterRate.js\");\n/* harmony import */ var _EmitterShape_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./EmitterShape.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterShape.js\");\n/* harmony import */ var _EmitterSize_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./EmitterSize.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterSize.js\");\n\n\n\n\n\nclass Emitter {\n constructor() {\n this.autoPlay = true;\n this.fill = true;\n this.life = new _EmitterLife_js__WEBPACK_IMPORTED_MODULE_1__.EmitterLife();\n this.rate = new _EmitterRate_js__WEBPACK_IMPORTED_MODULE_2__.EmitterRate();\n this.shape = new _EmitterShape_js__WEBPACK_IMPORTED_MODULE_3__.EmitterShape();\n this.startCount = 0;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.autoPlay !== undefined) {\n this.autoPlay = data.autoPlay;\n }\n if (data.size !== undefined) {\n this.size ??= new _EmitterSize_js__WEBPACK_IMPORTED_MODULE_4__.EmitterSize();\n this.size.load(data.size);\n }\n if (data.direction !== undefined) {\n this.direction = data.direction;\n }\n this.domId = data.domId;\n if (data.fill !== undefined) {\n this.fill = data.fill;\n }\n this.life.load(data.life);\n this.name = data.name;\n this.particles = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.executeOnSingleOrMultiple)(data.particles, particles => {\n return (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, particles);\n });\n this.rate.load(data.rate);\n this.shape.load(data.shape);\n if (data.position !== undefined) {\n this.position = {};\n if (data.position.x !== undefined) {\n this.position.x = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.position.x);\n }\n if (data.position.y !== undefined) {\n this.position.y = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.position.y);\n }\n }\n if (data.spawnColor !== undefined) {\n this.spawnColor ??= new _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AnimatableColor();\n this.spawnColor.load(data.spawnColor);\n }\n if (data.startCount !== undefined) {\n this.startCount = data.startCount;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-confetti/../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/Emitter.js?\n}");
|
|
57
|
+
|
|
58
|
+
/***/ },
|
|
59
|
+
|
|
60
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterLife.js"
|
|
61
|
+
/*!************************************************************************************************************************************************************!*\
|
|
62
|
+
!*** ../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterLife.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 */ EmitterLife: () => (/* binding */ EmitterLife)\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.2/node_modules/@tsparticles/engine/browser/index.js\");\n\nclass EmitterLife {\n constructor() {\n this.wait = false;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.count !== undefined) {\n this.count = data.count;\n }\n if (data.delay !== undefined) {\n this.delay = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.delay);\n }\n if (data.duration !== undefined) {\n this.duration = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.duration);\n }\n if (data.wait !== undefined) {\n this.wait = data.wait;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-confetti/../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterLife.js?\n}");
|
|
67
|
+
|
|
68
|
+
/***/ },
|
|
69
|
+
|
|
70
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterRate.js"
|
|
71
|
+
/*!************************************************************************************************************************************************************!*\
|
|
72
|
+
!*** ../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterRate.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 */ EmitterRate: () => (/* binding */ EmitterRate)\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.2/node_modules/@tsparticles/engine/browser/index.js\");\n\nclass EmitterRate {\n constructor() {\n this.quantity = 1;\n this.delay = 0.1;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.quantity !== undefined) {\n this.quantity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.quantity);\n }\n if (data.delay !== undefined) {\n this.delay = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.delay);\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-confetti/../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterRate.js?\n}");
|
|
77
|
+
|
|
78
|
+
/***/ },
|
|
79
|
+
|
|
80
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterShape.js"
|
|
81
|
+
/*!*************************************************************************************************************************************************************!*\
|
|
82
|
+
!*** ../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterShape.js ***!
|
|
83
|
+
\*************************************************************************************************************************************************************/
|
|
84
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
85
|
+
|
|
86
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmitterShape: () => (/* binding */ EmitterShape)\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.2/node_modules/@tsparticles/engine/browser/index.js\");\n/* harmony import */ var _EmitterShapeReplace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./EmitterShapeReplace.js */ \"../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterShapeReplace.js\");\n\n\nclass EmitterShape {\n constructor() {\n this.options = {};\n this.replace = new _EmitterShapeReplace_js__WEBPACK_IMPORTED_MODULE_1__.EmitterShapeReplace();\n this.type = \"square\";\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.options !== undefined) {\n this.options = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, data.options ?? {});\n }\n this.replace.load(data.replace);\n if (data.type !== undefined) {\n this.type = data.type;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-confetti/../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterShape.js?\n}");
|
|
87
|
+
|
|
88
|
+
/***/ },
|
|
89
|
+
|
|
90
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterShapeReplace.js"
|
|
91
|
+
/*!********************************************************************************************************************************************************************!*\
|
|
92
|
+
!*** ../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterShapeReplace.js ***!
|
|
93
|
+
\********************************************************************************************************************************************************************/
|
|
94
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
95
|
+
|
|
96
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmitterShapeReplace: () => (/* binding */ EmitterShapeReplace)\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.2/node_modules/@tsparticles/engine/browser/index.js\");\n\nclass EmitterShapeReplace {\n constructor() {\n this.color = false;\n this.opacity = false;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.color !== undefined) {\n this.color = data.color;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-confetti/../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterShapeReplace.js?\n}");
|
|
97
|
+
|
|
98
|
+
/***/ },
|
|
99
|
+
|
|
100
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterSize.js"
|
|
101
|
+
/*!************************************************************************************************************************************************************!*\
|
|
102
|
+
!*** ../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterSize.js ***!
|
|
103
|
+
\************************************************************************************************************************************************************/
|
|
104
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
105
|
+
|
|
106
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmitterSize: () => (/* binding */ EmitterSize)\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.2/node_modules/@tsparticles/engine/browser/index.js\");\n\nclass EmitterSize {\n constructor() {\n this.mode = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.PixelMode.percent;\n this.height = 0;\n this.width = 0;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.height !== undefined) {\n this.height = data.height;\n }\n if (data.width !== undefined) {\n this.width = data.width;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-confetti/../../node_modules/.pnpm/@tsparticles+plugin-emitters@4.0.0-alpha.2/node_modules/@tsparticles/plugin-emitters/browser/Options/Classes/EmitterSize.js?\n}");
|
|
107
|
+
|
|
108
|
+
/***/ }
|
|
109
|
+
|
|
110
|
+
}]);
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v4.0.0-alpha.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_confetti"] = this["webpackChunk_tsparticles_preset_confetti"] || []).push([["vendors-node_modules_pnpm_tsparticles_updater-out-modes_4_0_0-alpha_2_node_modules_tsparticle-124574"],{
|
|
19
|
+
|
|
20
|
+
/***/ "../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.2/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js"
|
|
21
|
+
/*!**************************************************************************************************************************************************!*\
|
|
22
|
+
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.2/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.2/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.2/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.values()) {\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-confetti/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.2/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.2/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js"
|
|
31
|
+
/*!***************************************************************************************************************************************************!*\
|
|
32
|
+
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.2/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.2/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-confetti/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.2/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.2/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js"
|
|
41
|
+
/*!************************************************************************************************************************************************!*\
|
|
42
|
+
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.2/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.2/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-confetti/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.2/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.2/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js"
|
|
51
|
+
/*!*******************************************************************************************************************************************************!*\
|
|
52
|
+
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.2/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.2/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.2/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.2/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.2/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.2/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-confetti/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.2/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.2/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js"
|
|
61
|
+
/*!***********************************************************************************************************************************************!*\
|
|
62
|
+
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.2/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.2/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-confetti/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.2/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.2/node_modules/@tsparticles/updater-out-modes/browser/Utils.js"
|
|
71
|
+
/*!******************************************************************************************************************************************!*\
|
|
72
|
+
!*** ../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.2/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.2/node_modules/@tsparticles/engine/browser/index.js\");\n\nconst minVelocity = 0, boundsMin = 0;\nfunction bounceHorizontal(data) {\n if ((data.outMode !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.bounce && data.outMode !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.split) ||\n (data.direction !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left && data.direction !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right)) {\n return;\n }\n if (data.bounds.right < boundsMin && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left) {\n data.particle.position.x = data.size + data.offset.x;\n }\n else if (data.bounds.left > data.canvasSize.width && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right) {\n data.particle.position.x = data.canvasSize.width - data.size - data.offset.x;\n }\n const velocity = data.particle.velocity.x;\n let bounced = false;\n if ((data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right &&\n data.bounds.right >= data.canvasSize.width &&\n velocity > minVelocity) ||\n (data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left && data.bounds.left <= boundsMin && velocity < minVelocity)) {\n const newVelocity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(data.particle.options.bounce.horizontal.value);\n data.particle.velocity.x *= -newVelocity;\n bounced = true;\n }\n if (!bounced) {\n return;\n }\n const minPos = data.offset.x + data.size;\n if (data.bounds.right >= data.canvasSize.width && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.right) {\n data.particle.position.x = data.canvasSize.width - minPos;\n }\n else if (data.bounds.left <= boundsMin && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.left) {\n data.particle.position.x = minPos;\n }\n if (data.outMode === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.split) {\n data.particle.destroy();\n }\n}\nfunction bounceVertical(data) {\n if ((data.outMode !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.bounce && data.outMode !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.split) ||\n (data.direction !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom && data.direction !== _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top)) {\n return;\n }\n if (data.bounds.bottom < boundsMin && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top) {\n data.particle.position.y = data.size + data.offset.y;\n }\n else if (data.bounds.top > data.canvasSize.height && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom) {\n data.particle.position.y = data.canvasSize.height - data.size - data.offset.y;\n }\n const velocity = data.particle.velocity.y;\n let bounced = false;\n if ((data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom &&\n data.bounds.bottom >= data.canvasSize.height &&\n velocity > minVelocity) ||\n (data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top && data.bounds.top <= boundsMin && velocity < minVelocity)) {\n const newVelocity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(data.particle.options.bounce.vertical.value);\n data.particle.velocity.y *= -newVelocity;\n bounced = true;\n }\n if (!bounced) {\n return;\n }\n const minPos = data.offset.y + data.size;\n if (data.bounds.bottom >= data.canvasSize.height && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.bottom) {\n data.particle.position.y = data.canvasSize.height - minPos;\n }\n else if (data.bounds.top <= boundsMin && data.direction === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutModeDirection.top) {\n data.particle.position.y = minPos;\n }\n if (data.outMode === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.split) {\n data.particle.destroy();\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/preset-confetti/../../node_modules/.pnpm/@tsparticles+updater-out-modes@4.0.0-alpha.2/node_modules/@tsparticles/updater-out-modes/browser/Utils.js?\n}");
|
|
77
|
+
|
|
78
|
+
/***/ }
|
|
79
|
+
|
|
80
|
+
}]);
|