UNPKG

30.5 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 * v2.0.6
8 */
9(function webpackUniversalModuleDefinition(root, factory) {
10 if(typeof exports === 'object' && typeof module === 'object')
11 module.exports = factory(require("tsparticles-particles.js"), require("tsparticles-updater-angle"), require("tsparticles-move-base"), require("tsparticles-shape-circle"), require("tsparticles-updater-color"), require("tsparticles-interaction-external-attract"), require("tsparticles-interaction-external-bounce"), require("tsparticles-interaction-external-bubble"), require("tsparticles-interaction-external-connect"), require("tsparticles-interaction-external-grab"), require("tsparticles-interaction-external-pause"), require("tsparticles-interaction-external-push"), require("tsparticles-interaction-external-remove"), require("tsparticles-interaction-external-repulse"), require("tsparticles-shape-image"), require("tsparticles-updater-life"), require("tsparticles-shape-line"), require("tsparticles-updater-opacity"), require("tsparticles-updater-out-modes"), require("tsparticles-move-parallax"), require("tsparticles-interaction-particles-attract"), require("tsparticles-interaction-particles-collisions"), require("tsparticles-interaction-particles-links"), require("tsparticles-shape-polygon"), require("tsparticles-updater-size"), require("tsparticles-shape-square"), require("tsparticles-shape-star"), require("tsparticles-engine"), require("tsparticles-shape-text"));
12 else if(typeof define === 'function' && define.amd)
13 define(["tsparticles-particles.js", "tsparticles-updater-angle", "tsparticles-move-base", "tsparticles-shape-circle", "tsparticles-updater-color", "tsparticles-interaction-external-attract", "tsparticles-interaction-external-bounce", "tsparticles-interaction-external-bubble", "tsparticles-interaction-external-connect", "tsparticles-interaction-external-grab", "tsparticles-interaction-external-pause", "tsparticles-interaction-external-push", "tsparticles-interaction-external-remove", "tsparticles-interaction-external-repulse", "tsparticles-shape-image", "tsparticles-updater-life", "tsparticles-shape-line", "tsparticles-updater-opacity", "tsparticles-updater-out-modes", "tsparticles-move-parallax", "tsparticles-interaction-particles-attract", "tsparticles-interaction-particles-collisions", "tsparticles-interaction-particles-links", "tsparticles-shape-polygon", "tsparticles-updater-size", "tsparticles-shape-square", "tsparticles-shape-star", "tsparticles-engine", "tsparticles-shape-text"], factory);
14 else {
15 var a = typeof exports === 'object' ? factory(require("tsparticles-particles.js"), require("tsparticles-updater-angle"), require("tsparticles-move-base"), require("tsparticles-shape-circle"), require("tsparticles-updater-color"), require("tsparticles-interaction-external-attract"), require("tsparticles-interaction-external-bounce"), require("tsparticles-interaction-external-bubble"), require("tsparticles-interaction-external-connect"), require("tsparticles-interaction-external-grab"), require("tsparticles-interaction-external-pause"), require("tsparticles-interaction-external-push"), require("tsparticles-interaction-external-remove"), require("tsparticles-interaction-external-repulse"), require("tsparticles-shape-image"), require("tsparticles-updater-life"), require("tsparticles-shape-line"), require("tsparticles-updater-opacity"), require("tsparticles-updater-out-modes"), require("tsparticles-move-parallax"), require("tsparticles-interaction-particles-attract"), require("tsparticles-interaction-particles-collisions"), require("tsparticles-interaction-particles-links"), require("tsparticles-shape-polygon"), require("tsparticles-updater-size"), require("tsparticles-shape-square"), require("tsparticles-shape-star"), require("tsparticles-engine"), require("tsparticles-shape-text")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
16 for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
17 }
18})(this, (__WEBPACK_EXTERNAL_MODULE__995__, __WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__919__, __WEBPACK_EXTERNAL_MODULE__941__, __WEBPACK_EXTERNAL_MODULE__841__, __WEBPACK_EXTERNAL_MODULE__174__, __WEBPACK_EXTERNAL_MODULE__544__, __WEBPACK_EXTERNAL_MODULE__923__, __WEBPACK_EXTERNAL_MODULE__364__, __WEBPACK_EXTERNAL_MODULE__602__, __WEBPACK_EXTERNAL_MODULE__999__, __WEBPACK_EXTERNAL_MODULE__639__, __WEBPACK_EXTERNAL_MODULE__394__, __WEBPACK_EXTERNAL_MODULE__813__, __WEBPACK_EXTERNAL_MODULE__662__, __WEBPACK_EXTERNAL_MODULE__489__, __WEBPACK_EXTERNAL_MODULE__45__, __WEBPACK_EXTERNAL_MODULE__838__, __WEBPACK_EXTERNAL_MODULE__405__, __WEBPACK_EXTERNAL_MODULE__387__, __WEBPACK_EXTERNAL_MODULE__966__, __WEBPACK_EXTERNAL_MODULE__260__, __WEBPACK_EXTERNAL_MODULE__955__, __WEBPACK_EXTERNAL_MODULE__722__, __WEBPACK_EXTERNAL_MODULE__328__, __WEBPACK_EXTERNAL_MODULE__295__, __WEBPACK_EXTERNAL_MODULE__110__, __WEBPACK_EXTERNAL_MODULE__818__, __WEBPACK_EXTERNAL_MODULE__922__) => {
19return /******/ (() => { // webpackBootstrap
20/******/ "use strict";
21/******/ var __webpack_modules__ = ({
22
23/***/ 818:
24/***/ ((module) => {
25
26module.exports = __WEBPACK_EXTERNAL_MODULE__818__;
27
28/***/ }),
29
30/***/ 174:
31/***/ ((module) => {
32
33module.exports = __WEBPACK_EXTERNAL_MODULE__174__;
34
35/***/ }),
36
37/***/ 544:
38/***/ ((module) => {
39
40module.exports = __WEBPACK_EXTERNAL_MODULE__544__;
41
42/***/ }),
43
44/***/ 923:
45/***/ ((module) => {
46
47module.exports = __WEBPACK_EXTERNAL_MODULE__923__;
48
49/***/ }),
50
51/***/ 364:
52/***/ ((module) => {
53
54module.exports = __WEBPACK_EXTERNAL_MODULE__364__;
55
56/***/ }),
57
58/***/ 602:
59/***/ ((module) => {
60
61module.exports = __WEBPACK_EXTERNAL_MODULE__602__;
62
63/***/ }),
64
65/***/ 999:
66/***/ ((module) => {
67
68module.exports = __WEBPACK_EXTERNAL_MODULE__999__;
69
70/***/ }),
71
72/***/ 639:
73/***/ ((module) => {
74
75module.exports = __WEBPACK_EXTERNAL_MODULE__639__;
76
77/***/ }),
78
79/***/ 394:
80/***/ ((module) => {
81
82module.exports = __WEBPACK_EXTERNAL_MODULE__394__;
83
84/***/ }),
85
86/***/ 813:
87/***/ ((module) => {
88
89module.exports = __WEBPACK_EXTERNAL_MODULE__813__;
90
91/***/ }),
92
93/***/ 966:
94/***/ ((module) => {
95
96module.exports = __WEBPACK_EXTERNAL_MODULE__966__;
97
98/***/ }),
99
100/***/ 260:
101/***/ ((module) => {
102
103module.exports = __WEBPACK_EXTERNAL_MODULE__260__;
104
105/***/ }),
106
107/***/ 955:
108/***/ ((module) => {
109
110module.exports = __WEBPACK_EXTERNAL_MODULE__955__;
111
112/***/ }),
113
114/***/ 919:
115/***/ ((module) => {
116
117module.exports = __WEBPACK_EXTERNAL_MODULE__919__;
118
119/***/ }),
120
121/***/ 387:
122/***/ ((module) => {
123
124module.exports = __WEBPACK_EXTERNAL_MODULE__387__;
125
126/***/ }),
127
128/***/ 995:
129/***/ ((module) => {
130
131module.exports = __WEBPACK_EXTERNAL_MODULE__995__;
132
133/***/ }),
134
135/***/ 941:
136/***/ ((module) => {
137
138module.exports = __WEBPACK_EXTERNAL_MODULE__941__;
139
140/***/ }),
141
142/***/ 662:
143/***/ ((module) => {
144
145module.exports = __WEBPACK_EXTERNAL_MODULE__662__;
146
147/***/ }),
148
149/***/ 45:
150/***/ ((module) => {
151
152module.exports = __WEBPACK_EXTERNAL_MODULE__45__;
153
154/***/ }),
155
156/***/ 722:
157/***/ ((module) => {
158
159module.exports = __WEBPACK_EXTERNAL_MODULE__722__;
160
161/***/ }),
162
163/***/ 295:
164/***/ ((module) => {
165
166module.exports = __WEBPACK_EXTERNAL_MODULE__295__;
167
168/***/ }),
169
170/***/ 110:
171/***/ ((module) => {
172
173module.exports = __WEBPACK_EXTERNAL_MODULE__110__;
174
175/***/ }),
176
177/***/ 922:
178/***/ ((module) => {
179
180module.exports = __WEBPACK_EXTERNAL_MODULE__922__;
181
182/***/ }),
183
184/***/ 1:
185/***/ ((module) => {
186
187module.exports = __WEBPACK_EXTERNAL_MODULE__1__;
188
189/***/ }),
190
191/***/ 841:
192/***/ ((module) => {
193
194module.exports = __WEBPACK_EXTERNAL_MODULE__841__;
195
196/***/ }),
197
198/***/ 489:
199/***/ ((module) => {
200
201module.exports = __WEBPACK_EXTERNAL_MODULE__489__;
202
203/***/ }),
204
205/***/ 838:
206/***/ ((module) => {
207
208module.exports = __WEBPACK_EXTERNAL_MODULE__838__;
209
210/***/ }),
211
212/***/ 405:
213/***/ ((module) => {
214
215module.exports = __WEBPACK_EXTERNAL_MODULE__405__;
216
217/***/ }),
218
219/***/ 328:
220/***/ ((module) => {
221
222module.exports = __WEBPACK_EXTERNAL_MODULE__328__;
223
224/***/ })
225
226/******/ });
227/************************************************************************/
228/******/ // The module cache
229/******/ var __webpack_module_cache__ = {};
230/******/
231/******/ // The require function
232/******/ function __webpack_require__(moduleId) {
233/******/ // Check if module is in cache
234/******/ var cachedModule = __webpack_module_cache__[moduleId];
235/******/ if (cachedModule !== undefined) {
236/******/ return cachedModule.exports;
237/******/ }
238/******/ // Create a new module (and put it into the cache)
239/******/ var module = __webpack_module_cache__[moduleId] = {
240/******/ // no module.id needed
241/******/ // no module.loaded needed
242/******/ exports: {}
243/******/ };
244/******/
245/******/ // Execute the module function
246/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
247/******/
248/******/ // Return the exports of the module
249/******/ return module.exports;
250/******/ }
251/******/
252/************************************************************************/
253/******/ /* webpack/runtime/define property getters */
254/******/ (() => {
255/******/ // define getter functions for harmony exports
256/******/ __webpack_require__.d = (exports, definition) => {
257/******/ for(var key in definition) {
258/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
259/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
260/******/ }
261/******/ }
262/******/ };
263/******/ })();
264/******/
265/******/ /* webpack/runtime/hasOwnProperty shorthand */
266/******/ (() => {
267/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
268/******/ })();
269/******/
270/******/ /* webpack/runtime/make namespace object */
271/******/ (() => {
272/******/ // define __esModule on exports
273/******/ __webpack_require__.r = (exports) => {
274/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
275/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
276/******/ }
277/******/ Object.defineProperty(exports, '__esModule', { value: true });
278/******/ };
279/******/ })();
280/******/
281/************************************************************************/
282var __webpack_exports__ = {};
283// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
284(() => {
285// ESM COMPAT FLAG
286__webpack_require__.r(__webpack_exports__);
287
288// EXPORTS
289__webpack_require__.d(__webpack_exports__, {
290 "loadSlim": () => (/* binding */ loadSlim)
291});
292
293// EXTERNAL MODULE: external {"commonjs":"tsparticles-particles.js","commonjs2":"tsparticles-particles.js","amd":"tsparticles-particles.js","root":"window"}
294var external_commonjs_tsparticles_particles_js_commonjs2_tsparticles_particles_js_amd_tsparticles_particles_js_root_window_ = __webpack_require__(995);
295// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-angle","commonjs2":"tsparticles-updater-angle","amd":"tsparticles-updater-angle","root":"window"}
296var external_commonjs_tsparticles_updater_angle_commonjs2_tsparticles_updater_angle_amd_tsparticles_updater_angle_root_window_ = __webpack_require__(1);
297// EXTERNAL MODULE: external {"commonjs":"tsparticles-move-base","commonjs2":"tsparticles-move-base","amd":"tsparticles-move-base","root":"window"}
298var external_commonjs_tsparticles_move_base_commonjs2_tsparticles_move_base_amd_tsparticles_move_base_root_window_ = __webpack_require__(919);
299// EXTERNAL MODULE: external {"commonjs":"tsparticles-shape-circle","commonjs2":"tsparticles-shape-circle","amd":"tsparticles-shape-circle","root":"window"}
300var external_commonjs_tsparticles_shape_circle_commonjs2_tsparticles_shape_circle_amd_tsparticles_shape_circle_root_window_ = __webpack_require__(941);
301// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-color","commonjs2":"tsparticles-updater-color","amd":"tsparticles-updater-color","root":"window"}
302var external_commonjs_tsparticles_updater_color_commonjs2_tsparticles_updater_color_amd_tsparticles_updater_color_root_window_ = __webpack_require__(841);
303// EXTERNAL MODULE: external {"commonjs":"tsparticles-interaction-external-attract","commonjs2":"tsparticles-interaction-external-attract","amd":"tsparticles-interaction-external-attract","root":"window"}
304var external_commonjs_tsparticles_interaction_external_attract_commonjs2_tsparticles_interaction_external_attract_amd_tsparticles_interaction_external_attract_root_window_ = __webpack_require__(174);
305// EXTERNAL MODULE: external {"commonjs":"tsparticles-interaction-external-bounce","commonjs2":"tsparticles-interaction-external-bounce","amd":"tsparticles-interaction-external-bounce","root":"window"}
306var external_commonjs_tsparticles_interaction_external_bounce_commonjs2_tsparticles_interaction_external_bounce_amd_tsparticles_interaction_external_bounce_root_window_ = __webpack_require__(544);
307// EXTERNAL MODULE: external {"commonjs":"tsparticles-interaction-external-bubble","commonjs2":"tsparticles-interaction-external-bubble","amd":"tsparticles-interaction-external-bubble","root":"window"}
308var external_commonjs_tsparticles_interaction_external_bubble_commonjs2_tsparticles_interaction_external_bubble_amd_tsparticles_interaction_external_bubble_root_window_ = __webpack_require__(923);
309// EXTERNAL MODULE: external {"commonjs":"tsparticles-interaction-external-connect","commonjs2":"tsparticles-interaction-external-connect","amd":"tsparticles-interaction-external-connect","root":"window"}
310var external_commonjs_tsparticles_interaction_external_connect_commonjs2_tsparticles_interaction_external_connect_amd_tsparticles_interaction_external_connect_root_window_ = __webpack_require__(364);
311// EXTERNAL MODULE: external {"commonjs":"tsparticles-interaction-external-grab","commonjs2":"tsparticles-interaction-external-grab","amd":"tsparticles-interaction-external-grab","root":"window"}
312var external_commonjs_tsparticles_interaction_external_grab_commonjs2_tsparticles_interaction_external_grab_amd_tsparticles_interaction_external_grab_root_window_ = __webpack_require__(602);
313// EXTERNAL MODULE: external {"commonjs":"tsparticles-interaction-external-pause","commonjs2":"tsparticles-interaction-external-pause","amd":"tsparticles-interaction-external-pause","root":"window"}
314var external_commonjs_tsparticles_interaction_external_pause_commonjs2_tsparticles_interaction_external_pause_amd_tsparticles_interaction_external_pause_root_window_ = __webpack_require__(999);
315// EXTERNAL MODULE: external {"commonjs":"tsparticles-interaction-external-push","commonjs2":"tsparticles-interaction-external-push","amd":"tsparticles-interaction-external-push","root":"window"}
316var external_commonjs_tsparticles_interaction_external_push_commonjs2_tsparticles_interaction_external_push_amd_tsparticles_interaction_external_push_root_window_ = __webpack_require__(639);
317// EXTERNAL MODULE: external {"commonjs":"tsparticles-interaction-external-remove","commonjs2":"tsparticles-interaction-external-remove","amd":"tsparticles-interaction-external-remove","root":"window"}
318var external_commonjs_tsparticles_interaction_external_remove_commonjs2_tsparticles_interaction_external_remove_amd_tsparticles_interaction_external_remove_root_window_ = __webpack_require__(394);
319// EXTERNAL MODULE: external {"commonjs":"tsparticles-interaction-external-repulse","commonjs2":"tsparticles-interaction-external-repulse","amd":"tsparticles-interaction-external-repulse","root":"window"}
320var external_commonjs_tsparticles_interaction_external_repulse_commonjs2_tsparticles_interaction_external_repulse_amd_tsparticles_interaction_external_repulse_root_window_ = __webpack_require__(813);
321// EXTERNAL MODULE: external {"commonjs":"tsparticles-shape-image","commonjs2":"tsparticles-shape-image","amd":"tsparticles-shape-image","root":"window"}
322var external_commonjs_tsparticles_shape_image_commonjs2_tsparticles_shape_image_amd_tsparticles_shape_image_root_window_ = __webpack_require__(662);
323// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-life","commonjs2":"tsparticles-updater-life","amd":"tsparticles-updater-life","root":"window"}
324var external_commonjs_tsparticles_updater_life_commonjs2_tsparticles_updater_life_amd_tsparticles_updater_life_root_window_ = __webpack_require__(489);
325// EXTERNAL MODULE: external {"commonjs":"tsparticles-shape-line","commonjs2":"tsparticles-shape-line","amd":"tsparticles-shape-line","root":"window"}
326var external_commonjs_tsparticles_shape_line_commonjs2_tsparticles_shape_line_amd_tsparticles_shape_line_root_window_ = __webpack_require__(45);
327// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-opacity","commonjs2":"tsparticles-updater-opacity","amd":"tsparticles-updater-opacity","root":"window"}
328var external_commonjs_tsparticles_updater_opacity_commonjs2_tsparticles_updater_opacity_amd_tsparticles_updater_opacity_root_window_ = __webpack_require__(838);
329// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-out-modes","commonjs2":"tsparticles-updater-out-modes","amd":"tsparticles-updater-out-modes","root":"window"}
330var external_commonjs_tsparticles_updater_out_modes_commonjs2_tsparticles_updater_out_modes_amd_tsparticles_updater_out_modes_root_window_ = __webpack_require__(405);
331// EXTERNAL MODULE: external {"commonjs":"tsparticles-move-parallax","commonjs2":"tsparticles-move-parallax","amd":"tsparticles-move-parallax","root":"window"}
332var external_commonjs_tsparticles_move_parallax_commonjs2_tsparticles_move_parallax_amd_tsparticles_move_parallax_root_window_ = __webpack_require__(387);
333// EXTERNAL MODULE: external {"commonjs":"tsparticles-interaction-particles-attract","commonjs2":"tsparticles-interaction-particles-attract","amd":"tsparticles-interaction-particles-attract","root":"window"}
334var external_commonjs_tsparticles_interaction_particles_attract_commonjs2_tsparticles_interaction_particles_attract_amd_tsparticles_interaction_particles_attract_root_window_ = __webpack_require__(966);
335// EXTERNAL MODULE: external {"commonjs":"tsparticles-interaction-particles-collisions","commonjs2":"tsparticles-interaction-particles-collisions","amd":"tsparticles-interaction-particles-collisions","root":"window"}
336var external_commonjs_tsparticles_interaction_particles_collisions_commonjs2_tsparticles_interaction_particles_collisions_amd_tsparticles_interaction_particles_collisions_root_window_ = __webpack_require__(260);
337// EXTERNAL MODULE: external {"commonjs":"tsparticles-interaction-particles-links","commonjs2":"tsparticles-interaction-particles-links","amd":"tsparticles-interaction-particles-links","root":"window"}
338var external_commonjs_tsparticles_interaction_particles_links_commonjs2_tsparticles_interaction_particles_links_amd_tsparticles_interaction_particles_links_root_window_ = __webpack_require__(955);
339// EXTERNAL MODULE: external {"commonjs":"tsparticles-shape-polygon","commonjs2":"tsparticles-shape-polygon","amd":"tsparticles-shape-polygon","root":"window"}
340var external_commonjs_tsparticles_shape_polygon_commonjs2_tsparticles_shape_polygon_amd_tsparticles_shape_polygon_root_window_ = __webpack_require__(722);
341// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-size","commonjs2":"tsparticles-updater-size","amd":"tsparticles-updater-size","root":"window"}
342var external_commonjs_tsparticles_updater_size_commonjs2_tsparticles_updater_size_amd_tsparticles_updater_size_root_window_ = __webpack_require__(328);
343// EXTERNAL MODULE: external {"commonjs":"tsparticles-shape-square","commonjs2":"tsparticles-shape-square","amd":"tsparticles-shape-square","root":"window"}
344var external_commonjs_tsparticles_shape_square_commonjs2_tsparticles_shape_square_amd_tsparticles_shape_square_root_window_ = __webpack_require__(295);
345// EXTERNAL MODULE: external {"commonjs":"tsparticles-shape-star","commonjs2":"tsparticles-shape-star","amd":"tsparticles-shape-star","root":"window"}
346var external_commonjs_tsparticles_shape_star_commonjs2_tsparticles_shape_star_amd_tsparticles_shape_star_root_window_ = __webpack_require__(110);
347// EXTERNAL MODULE: external {"commonjs":"tsparticles-engine","commonjs2":"tsparticles-engine","amd":"tsparticles-engine","root":"window"}
348var external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_ = __webpack_require__(818);
349;// CONCATENATED MODULE: ../../updaters/strokeColor/dist/esm/StrokeColorUpdater.js
350
351
352function updateColorValue(delta, value, valueAnimation, max, decrease) {
353 var _a;
354
355 const colorValue = value;
356
357 if (!colorValue || !colorValue.enable) {
358 return;
359 }
360
361 const offset = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.randomInRange)(valueAnimation.offset);
362 const velocity = ((_a = value.velocity) !== null && _a !== void 0 ? _a : 0) * delta.factor + offset * 3.6;
363
364 if (!decrease || colorValue.status === 0) {
365 colorValue.value += velocity;
366
367 if (decrease && colorValue.value > max) {
368 colorValue.status = 1;
369 colorValue.value -= colorValue.value % max;
370 }
371 } else {
372 colorValue.value -= velocity;
373
374 if (colorValue.value < 0) {
375 colorValue.status = 0;
376 colorValue.value += colorValue.value;
377 }
378 }
379
380 if (colorValue.value > max) {
381 colorValue.value %= max;
382 }
383}
384
385function updateStrokeColor(particle, delta) {
386 var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
387
388 if (!((_a = particle.stroke) === null || _a === void 0 ? void 0 : _a.color)) {
389 return;
390 }
391
392 const animationOptions = particle.stroke.color.animation;
393 const h = (_c = (_b = particle.strokeColor) === null || _b === void 0 ? void 0 : _b.h) !== null && _c !== void 0 ? _c : (_d = particle.color) === null || _d === void 0 ? void 0 : _d.h;
394
395 if (h) {
396 updateColorValue(delta, h, animationOptions.h, 360, false);
397 }
398
399 const s = (_f = (_e = particle.strokeColor) === null || _e === void 0 ? void 0 : _e.s) !== null && _f !== void 0 ? _f : (_g = particle.color) === null || _g === void 0 ? void 0 : _g.s;
400
401 if (s) {
402 updateColorValue(delta, s, animationOptions.s, 100, true);
403 }
404
405 const l = (_j = (_h = particle.strokeColor) === null || _h === void 0 ? void 0 : _h.l) !== null && _j !== void 0 ? _j : (_k = particle.color) === null || _k === void 0 ? void 0 : _k.l;
406
407 if (l) {
408 updateColorValue(delta, l, animationOptions.l, 100, true);
409 }
410}
411
412class StrokeColorUpdater {
413 constructor(container) {
414 this.container = container;
415 }
416
417 init(particle) {
418 var _a, _b;
419
420 const container = this.container;
421 particle.stroke = particle.options.stroke instanceof Array ? (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.itemFromArray)(particle.options.stroke, particle.id, particle.options.reduceDuplicates) : particle.options.stroke;
422 particle.strokeWidth = particle.stroke.width * container.retina.pixelRatio;
423 const strokeHslColor = (_a = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.colorToHsl)(particle.stroke.color)) !== null && _a !== void 0 ? _a : particle.getFillColor();
424
425 if (strokeHslColor) {
426 particle.strokeColor = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.getHslAnimationFromHsl)(strokeHslColor, (_b = particle.stroke.color) === null || _b === void 0 ? void 0 : _b.animation, container.retina.reduceFactor);
427 }
428 }
429
430 isEnabled(particle) {
431 var _a, _b, _c, _d;
432
433 const color = (_a = particle.stroke) === null || _a === void 0 ? void 0 : _a.color;
434 return !particle.destroyed && !particle.spawning && !!color && (((_b = particle.strokeColor) === null || _b === void 0 ? void 0 : _b.h.value) !== undefined && color.animation.h.enable || ((_c = particle.strokeColor) === null || _c === void 0 ? void 0 : _c.s.value) !== undefined && color.animation.s.enable || ((_d = particle.strokeColor) === null || _d === void 0 ? void 0 : _d.l.value) !== undefined && color.animation.l.enable);
435 }
436
437 update(particle, delta) {
438 if (!this.isEnabled(particle)) {
439 return;
440 }
441
442 updateStrokeColor(particle, delta);
443 }
444
445}
446;// CONCATENATED MODULE: ../../updaters/strokeColor/dist/esm/index.js
447
448async function loadStrokeColorUpdater(engine) {
449 await engine.addParticleUpdater("strokeColor", container => new StrokeColorUpdater(container));
450}
451// EXTERNAL MODULE: external {"commonjs":"tsparticles-shape-text","commonjs2":"tsparticles-shape-text","amd":"tsparticles-shape-text","root":"window"}
452var external_commonjs_tsparticles_shape_text_commonjs2_tsparticles_shape_text_amd_tsparticles_shape_text_root_window_ = __webpack_require__(922);
453;// CONCATENATED MODULE: ./dist/browser/index.js
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483async function loadSlim(engine) {
484 await (0,external_commonjs_tsparticles_move_base_commonjs2_tsparticles_move_base_amd_tsparticles_move_base_root_window_.loadBaseMover)(engine);
485 await (0,external_commonjs_tsparticles_move_parallax_commonjs2_tsparticles_move_parallax_amd_tsparticles_move_parallax_root_window_.loadParallaxMover)(engine);
486 await (0,external_commonjs_tsparticles_interaction_external_attract_commonjs2_tsparticles_interaction_external_attract_amd_tsparticles_interaction_external_attract_root_window_.loadExternalAttractInteraction)(engine);
487 await (0,external_commonjs_tsparticles_interaction_external_bounce_commonjs2_tsparticles_interaction_external_bounce_amd_tsparticles_interaction_external_bounce_root_window_.loadExternalBounceInteraction)(engine);
488 await (0,external_commonjs_tsparticles_interaction_external_bubble_commonjs2_tsparticles_interaction_external_bubble_amd_tsparticles_interaction_external_bubble_root_window_.loadExternalBubbleInteraction)(engine);
489 await (0,external_commonjs_tsparticles_interaction_external_connect_commonjs2_tsparticles_interaction_external_connect_amd_tsparticles_interaction_external_connect_root_window_.loadExternalConnectInteraction)(engine);
490 await (0,external_commonjs_tsparticles_interaction_external_grab_commonjs2_tsparticles_interaction_external_grab_amd_tsparticles_interaction_external_grab_root_window_.loadExternalGrabInteraction)(engine);
491 await (0,external_commonjs_tsparticles_interaction_external_pause_commonjs2_tsparticles_interaction_external_pause_amd_tsparticles_interaction_external_pause_root_window_.loadExternalPauseInteraction)(engine);
492 await (0,external_commonjs_tsparticles_interaction_external_push_commonjs2_tsparticles_interaction_external_push_amd_tsparticles_interaction_external_push_root_window_.loadExternalPushInteraction)(engine);
493 await (0,external_commonjs_tsparticles_interaction_external_remove_commonjs2_tsparticles_interaction_external_remove_amd_tsparticles_interaction_external_remove_root_window_.loadExternalRemoveInteraction)(engine);
494 await (0,external_commonjs_tsparticles_interaction_external_repulse_commonjs2_tsparticles_interaction_external_repulse_amd_tsparticles_interaction_external_repulse_root_window_.loadExternalRepulseInteraction)(engine);
495 await (0,external_commonjs_tsparticles_interaction_particles_attract_commonjs2_tsparticles_interaction_particles_attract_amd_tsparticles_interaction_particles_attract_root_window_.loadParticlesAttractInteraction)(engine);
496 await (0,external_commonjs_tsparticles_interaction_particles_collisions_commonjs2_tsparticles_interaction_particles_collisions_amd_tsparticles_interaction_particles_collisions_root_window_.loadParticlesCollisionsInteraction)(engine);
497 await (0,external_commonjs_tsparticles_interaction_particles_links_commonjs2_tsparticles_interaction_particles_links_amd_tsparticles_interaction_particles_links_root_window_.loadParticlesLinksInteraction)(engine);
498 await (0,external_commonjs_tsparticles_shape_circle_commonjs2_tsparticles_shape_circle_amd_tsparticles_shape_circle_root_window_.loadCircleShape)(engine);
499 await (0,external_commonjs_tsparticles_shape_image_commonjs2_tsparticles_shape_image_amd_tsparticles_shape_image_root_window_.loadImageShape)(engine);
500 await (0,external_commonjs_tsparticles_shape_line_commonjs2_tsparticles_shape_line_amd_tsparticles_shape_line_root_window_.loadLineShape)(engine);
501 await (0,external_commonjs_tsparticles_shape_polygon_commonjs2_tsparticles_shape_polygon_amd_tsparticles_shape_polygon_root_window_.loadPolygonShape)(engine);
502 await (0,external_commonjs_tsparticles_shape_square_commonjs2_tsparticles_shape_square_amd_tsparticles_shape_square_root_window_.loadSquareShape)(engine);
503 await (0,external_commonjs_tsparticles_shape_star_commonjs2_tsparticles_shape_star_amd_tsparticles_shape_star_root_window_.loadStarShape)(engine);
504 await (0,external_commonjs_tsparticles_shape_text_commonjs2_tsparticles_shape_text_amd_tsparticles_shape_text_root_window_.loadTextShape)(engine);
505 await (0,external_commonjs_tsparticles_updater_life_commonjs2_tsparticles_updater_life_amd_tsparticles_updater_life_root_window_.loadLifeUpdater)(engine);
506 await (0,external_commonjs_tsparticles_updater_opacity_commonjs2_tsparticles_updater_opacity_amd_tsparticles_updater_opacity_root_window_.loadOpacityUpdater)(engine);
507 await (0,external_commonjs_tsparticles_updater_size_commonjs2_tsparticles_updater_size_amd_tsparticles_updater_size_root_window_.loadSizeUpdater)(engine);
508 await (0,external_commonjs_tsparticles_updater_angle_commonjs2_tsparticles_updater_angle_amd_tsparticles_updater_angle_root_window_.loadAngleUpdater)(engine);
509 await (0,external_commonjs_tsparticles_updater_color_commonjs2_tsparticles_updater_color_amd_tsparticles_updater_color_root_window_.loadColorUpdater)(engine);
510 await loadStrokeColorUpdater(engine);
511 await (0,external_commonjs_tsparticles_updater_out_modes_commonjs2_tsparticles_updater_out_modes_amd_tsparticles_updater_out_modes_root_window_.loadOutModesUpdater)(engine);
512 await (0,external_commonjs_tsparticles_particles_js_commonjs2_tsparticles_particles_js_amd_tsparticles_particles_js_root_window_.initPjs)(engine);
513}
514})();
515
516/******/ return __webpack_exports__;
517/******/ })()
518;
519});
\No newline at end of file