UNPKG

2.85 kBJavaScriptView Raw
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 * v3.3.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_fireworks"] = this["webpackChunk_tsparticles_fireworks"] || []).push([["updaters_color_dist_browser_ColorUpdater_js"],{
19
20/***/ "../../updaters/color/dist/browser/ColorUpdater.js":
21/*!*********************************************************!*\
22 !*** ../../updaters/color/dist/browser/ColorUpdater.js ***!
23 \*********************************************************/
24/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25
26eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ColorUpdater: () => (/* binding */ ColorUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass ColorUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const hslColor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToHsl)(particle.options.color, particle.id, particle.options.reduceDuplicates);\n if (hslColor) {\n particle.color = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getHslAnimationFromHsl)(hslColor, particle.options.color.animation, this.container.retina.reduceFactor);\n }\n }\n isEnabled(particle) {\n const {\n h: hAnimation,\n s: sAnimation,\n l: lAnimation\n } = particle.options.color.animation,\n {\n color\n } = particle;\n return !particle.destroyed && !particle.spawning && (color?.h.value !== undefined && hAnimation.enable || color?.s.value !== undefined && sAnimation.enable || color?.l.value !== undefined && lAnimation.enable);\n }\n update(particle, delta) {\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.updateColor)(particle.color, delta);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/../../updaters/color/dist/browser/ColorUpdater.js?");
27
28/***/ })
29
30}]);
\No newline at end of file