@tsparticles/all 3.0.0-beta.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/LICENSE +21 -0
- package/README.md +196 -0
- package/browser/bundle.js +5 -0
- package/browser/index.js +76 -0
- package/cjs/bundle.js +22 -0
- package/cjs/index.js +80 -0
- package/esm/bundle.js +5 -0
- package/esm/index.js +76 -0
- package/package.json +131 -0
- package/report.html +39 -0
- package/tsparticles.all.bundle.js +18735 -0
- package/tsparticles.all.bundle.min.js +2 -0
- package/tsparticles.all.bundle.min.js.LICENSE.txt +1 -0
- package/tsparticles.all.js +912 -0
- package/tsparticles.all.min.js +2 -0
- package/tsparticles.all.min.js.LICENSE.txt +1 -0
- package/types/bundle.d.ts +3 -0
- package/types/index.d.ts +2 -0
- package/umd/bundle.js +32 -0
- package/umd/index.js +90 -0
|
@@ -0,0 +1,912 @@
|
|
|
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.0.0-beta.0
|
|
8
|
+
*/
|
|
9
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
11
|
+
module.exports = factory(require("@tsparticles/shape-bubble"), require("@tsparticles/plugin-canvas-mask"), require("@tsparticles/shape-cards"), require("@tsparticles/path-curves"), require("@tsparticles/plugin-easing-back"), require("@tsparticles/plugin-easing-circ"), require("@tsparticles/plugin-easing-cubic"), require("@tsparticles/plugin-easing-expo"), require("@tsparticles/plugin-easing-quart"), require("@tsparticles/plugin-easing-quint"), require("@tsparticles/plugin-easing-sine"), require("tsparticles"), require("@tsparticles/updater-gradient"), require("@tsparticles/shape-heart"), require("@tsparticles/plugin-hsv-color"), require("@tsparticles/plugin-infection"), require("@tsparticles/interaction-light"), require("@tsparticles/plugin-motion"), require("@tsparticles/shape-multiline-text"), require("@tsparticles/updater-orbit"), require("@tsparticles/interaction-particles-repulse"), require("@tsparticles/shape-path"), require("@tsparticles/path-perlin-noise"), require("@tsparticles/plugin-polygon-mask"), require("@tsparticles/path-polygon"), require("@tsparticles/shape-rounded-rect"), require("@tsparticles/path-simplex-noise"), require("@tsparticles/plugin-sounds"), require("@tsparticles/shape-spiral"), require("@tsparticles/engine"));
|
|
12
|
+
else if(typeof define === 'function' && define.amd)
|
|
13
|
+
define(["@tsparticles/shape-bubble", "@tsparticles/plugin-canvas-mask", "@tsparticles/shape-cards", "@tsparticles/path-curves", "@tsparticles/plugin-easing-back", "@tsparticles/plugin-easing-circ", "@tsparticles/plugin-easing-cubic", "@tsparticles/plugin-easing-expo", "@tsparticles/plugin-easing-quart", "@tsparticles/plugin-easing-quint", "@tsparticles/plugin-easing-sine", "tsparticles", "@tsparticles/updater-gradient", "@tsparticles/shape-heart", "@tsparticles/plugin-hsv-color", "@tsparticles/plugin-infection", "@tsparticles/interaction-light", "@tsparticles/plugin-motion", "@tsparticles/shape-multiline-text", "@tsparticles/updater-orbit", "@tsparticles/interaction-particles-repulse", "@tsparticles/shape-path", "@tsparticles/path-perlin-noise", "@tsparticles/plugin-polygon-mask", "@tsparticles/path-polygon", "@tsparticles/shape-rounded-rect", "@tsparticles/path-simplex-noise", "@tsparticles/plugin-sounds", "@tsparticles/shape-spiral", "@tsparticles/engine"], factory);
|
|
14
|
+
else {
|
|
15
|
+
var a = typeof exports === 'object' ? factory(require("@tsparticles/shape-bubble"), require("@tsparticles/plugin-canvas-mask"), require("@tsparticles/shape-cards"), require("@tsparticles/path-curves"), require("@tsparticles/plugin-easing-back"), require("@tsparticles/plugin-easing-circ"), require("@tsparticles/plugin-easing-cubic"), require("@tsparticles/plugin-easing-expo"), require("@tsparticles/plugin-easing-quart"), require("@tsparticles/plugin-easing-quint"), require("@tsparticles/plugin-easing-sine"), require("tsparticles"), require("@tsparticles/updater-gradient"), require("@tsparticles/shape-heart"), require("@tsparticles/plugin-hsv-color"), require("@tsparticles/plugin-infection"), require("@tsparticles/interaction-light"), require("@tsparticles/plugin-motion"), require("@tsparticles/shape-multiline-text"), require("@tsparticles/updater-orbit"), require("@tsparticles/interaction-particles-repulse"), require("@tsparticles/shape-path"), require("@tsparticles/path-perlin-noise"), require("@tsparticles/plugin-polygon-mask"), require("@tsparticles/path-polygon"), require("@tsparticles/shape-rounded-rect"), require("@tsparticles/path-simplex-noise"), require("@tsparticles/plugin-sounds"), require("@tsparticles/shape-spiral"), require("@tsparticles/engine")) : 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"], root["window"]);
|
|
16
|
+
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
17
|
+
}
|
|
18
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__164__, __WEBPACK_EXTERNAL_MODULE__72__, __WEBPACK_EXTERNAL_MODULE__686__, __WEBPACK_EXTERNAL_MODULE__997__, __WEBPACK_EXTERNAL_MODULE__792__, __WEBPACK_EXTERNAL_MODULE__176__, __WEBPACK_EXTERNAL_MODULE__922__, __WEBPACK_EXTERNAL_MODULE__594__, __WEBPACK_EXTERNAL_MODULE__205__, __WEBPACK_EXTERNAL_MODULE__144__, __WEBPACK_EXTERNAL_MODULE__691__, __WEBPACK_EXTERNAL_MODULE__802__, __WEBPACK_EXTERNAL_MODULE__887__, __WEBPACK_EXTERNAL_MODULE__12__, __WEBPACK_EXTERNAL_MODULE__673__, __WEBPACK_EXTERNAL_MODULE__521__, __WEBPACK_EXTERNAL_MODULE__55__, __WEBPACK_EXTERNAL_MODULE__82__, __WEBPACK_EXTERNAL_MODULE__940__, __WEBPACK_EXTERNAL_MODULE__193__, __WEBPACK_EXTERNAL_MODULE__297__, __WEBPACK_EXTERNAL_MODULE__901__, __WEBPACK_EXTERNAL_MODULE__228__, __WEBPACK_EXTERNAL_MODULE__124__, __WEBPACK_EXTERNAL_MODULE__231__, __WEBPACK_EXTERNAL_MODULE__550__, __WEBPACK_EXTERNAL_MODULE__520__, __WEBPACK_EXTERNAL_MODULE__490__, __WEBPACK_EXTERNAL_MODULE__561__, __WEBPACK_EXTERNAL_MODULE__533__) => {
|
|
19
|
+
return /******/ (() => { // webpackBootstrap
|
|
20
|
+
/******/ "use strict";
|
|
21
|
+
/******/ var __webpack_modules__ = ({
|
|
22
|
+
|
|
23
|
+
/***/ 533:
|
|
24
|
+
/***/ ((module) => {
|
|
25
|
+
|
|
26
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__533__;
|
|
27
|
+
|
|
28
|
+
/***/ }),
|
|
29
|
+
|
|
30
|
+
/***/ 55:
|
|
31
|
+
/***/ ((module) => {
|
|
32
|
+
|
|
33
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__55__;
|
|
34
|
+
|
|
35
|
+
/***/ }),
|
|
36
|
+
|
|
37
|
+
/***/ 297:
|
|
38
|
+
/***/ ((module) => {
|
|
39
|
+
|
|
40
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__297__;
|
|
41
|
+
|
|
42
|
+
/***/ }),
|
|
43
|
+
|
|
44
|
+
/***/ 997:
|
|
45
|
+
/***/ ((module) => {
|
|
46
|
+
|
|
47
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__997__;
|
|
48
|
+
|
|
49
|
+
/***/ }),
|
|
50
|
+
|
|
51
|
+
/***/ 228:
|
|
52
|
+
/***/ ((module) => {
|
|
53
|
+
|
|
54
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__228__;
|
|
55
|
+
|
|
56
|
+
/***/ }),
|
|
57
|
+
|
|
58
|
+
/***/ 231:
|
|
59
|
+
/***/ ((module) => {
|
|
60
|
+
|
|
61
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__231__;
|
|
62
|
+
|
|
63
|
+
/***/ }),
|
|
64
|
+
|
|
65
|
+
/***/ 520:
|
|
66
|
+
/***/ ((module) => {
|
|
67
|
+
|
|
68
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__520__;
|
|
69
|
+
|
|
70
|
+
/***/ }),
|
|
71
|
+
|
|
72
|
+
/***/ 72:
|
|
73
|
+
/***/ ((module) => {
|
|
74
|
+
|
|
75
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__72__;
|
|
76
|
+
|
|
77
|
+
/***/ }),
|
|
78
|
+
|
|
79
|
+
/***/ 792:
|
|
80
|
+
/***/ ((module) => {
|
|
81
|
+
|
|
82
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__792__;
|
|
83
|
+
|
|
84
|
+
/***/ }),
|
|
85
|
+
|
|
86
|
+
/***/ 176:
|
|
87
|
+
/***/ ((module) => {
|
|
88
|
+
|
|
89
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__176__;
|
|
90
|
+
|
|
91
|
+
/***/ }),
|
|
92
|
+
|
|
93
|
+
/***/ 922:
|
|
94
|
+
/***/ ((module) => {
|
|
95
|
+
|
|
96
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__922__;
|
|
97
|
+
|
|
98
|
+
/***/ }),
|
|
99
|
+
|
|
100
|
+
/***/ 594:
|
|
101
|
+
/***/ ((module) => {
|
|
102
|
+
|
|
103
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__594__;
|
|
104
|
+
|
|
105
|
+
/***/ }),
|
|
106
|
+
|
|
107
|
+
/***/ 205:
|
|
108
|
+
/***/ ((module) => {
|
|
109
|
+
|
|
110
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__205__;
|
|
111
|
+
|
|
112
|
+
/***/ }),
|
|
113
|
+
|
|
114
|
+
/***/ 144:
|
|
115
|
+
/***/ ((module) => {
|
|
116
|
+
|
|
117
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__144__;
|
|
118
|
+
|
|
119
|
+
/***/ }),
|
|
120
|
+
|
|
121
|
+
/***/ 691:
|
|
122
|
+
/***/ ((module) => {
|
|
123
|
+
|
|
124
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__691__;
|
|
125
|
+
|
|
126
|
+
/***/ }),
|
|
127
|
+
|
|
128
|
+
/***/ 673:
|
|
129
|
+
/***/ ((module) => {
|
|
130
|
+
|
|
131
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__673__;
|
|
132
|
+
|
|
133
|
+
/***/ }),
|
|
134
|
+
|
|
135
|
+
/***/ 521:
|
|
136
|
+
/***/ ((module) => {
|
|
137
|
+
|
|
138
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__521__;
|
|
139
|
+
|
|
140
|
+
/***/ }),
|
|
141
|
+
|
|
142
|
+
/***/ 82:
|
|
143
|
+
/***/ ((module) => {
|
|
144
|
+
|
|
145
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__82__;
|
|
146
|
+
|
|
147
|
+
/***/ }),
|
|
148
|
+
|
|
149
|
+
/***/ 124:
|
|
150
|
+
/***/ ((module) => {
|
|
151
|
+
|
|
152
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__124__;
|
|
153
|
+
|
|
154
|
+
/***/ }),
|
|
155
|
+
|
|
156
|
+
/***/ 490:
|
|
157
|
+
/***/ ((module) => {
|
|
158
|
+
|
|
159
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__490__;
|
|
160
|
+
|
|
161
|
+
/***/ }),
|
|
162
|
+
|
|
163
|
+
/***/ 164:
|
|
164
|
+
/***/ ((module) => {
|
|
165
|
+
|
|
166
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__164__;
|
|
167
|
+
|
|
168
|
+
/***/ }),
|
|
169
|
+
|
|
170
|
+
/***/ 686:
|
|
171
|
+
/***/ ((module) => {
|
|
172
|
+
|
|
173
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__686__;
|
|
174
|
+
|
|
175
|
+
/***/ }),
|
|
176
|
+
|
|
177
|
+
/***/ 12:
|
|
178
|
+
/***/ ((module) => {
|
|
179
|
+
|
|
180
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__12__;
|
|
181
|
+
|
|
182
|
+
/***/ }),
|
|
183
|
+
|
|
184
|
+
/***/ 940:
|
|
185
|
+
/***/ ((module) => {
|
|
186
|
+
|
|
187
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__940__;
|
|
188
|
+
|
|
189
|
+
/***/ }),
|
|
190
|
+
|
|
191
|
+
/***/ 901:
|
|
192
|
+
/***/ ((module) => {
|
|
193
|
+
|
|
194
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__901__;
|
|
195
|
+
|
|
196
|
+
/***/ }),
|
|
197
|
+
|
|
198
|
+
/***/ 550:
|
|
199
|
+
/***/ ((module) => {
|
|
200
|
+
|
|
201
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__550__;
|
|
202
|
+
|
|
203
|
+
/***/ }),
|
|
204
|
+
|
|
205
|
+
/***/ 561:
|
|
206
|
+
/***/ ((module) => {
|
|
207
|
+
|
|
208
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__561__;
|
|
209
|
+
|
|
210
|
+
/***/ }),
|
|
211
|
+
|
|
212
|
+
/***/ 887:
|
|
213
|
+
/***/ ((module) => {
|
|
214
|
+
|
|
215
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__887__;
|
|
216
|
+
|
|
217
|
+
/***/ }),
|
|
218
|
+
|
|
219
|
+
/***/ 193:
|
|
220
|
+
/***/ ((module) => {
|
|
221
|
+
|
|
222
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__193__;
|
|
223
|
+
|
|
224
|
+
/***/ }),
|
|
225
|
+
|
|
226
|
+
/***/ 802:
|
|
227
|
+
/***/ ((module) => {
|
|
228
|
+
|
|
229
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__802__;
|
|
230
|
+
|
|
231
|
+
/***/ })
|
|
232
|
+
|
|
233
|
+
/******/ });
|
|
234
|
+
/************************************************************************/
|
|
235
|
+
/******/ // The module cache
|
|
236
|
+
/******/ var __webpack_module_cache__ = {};
|
|
237
|
+
/******/
|
|
238
|
+
/******/ // The require function
|
|
239
|
+
/******/ function __webpack_require__(moduleId) {
|
|
240
|
+
/******/ // Check if module is in cache
|
|
241
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
242
|
+
/******/ if (cachedModule !== undefined) {
|
|
243
|
+
/******/ return cachedModule.exports;
|
|
244
|
+
/******/ }
|
|
245
|
+
/******/ // Create a new module (and put it into the cache)
|
|
246
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
247
|
+
/******/ // no module.id needed
|
|
248
|
+
/******/ // no module.loaded needed
|
|
249
|
+
/******/ exports: {}
|
|
250
|
+
/******/ };
|
|
251
|
+
/******/
|
|
252
|
+
/******/ // Execute the module function
|
|
253
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
254
|
+
/******/
|
|
255
|
+
/******/ // Return the exports of the module
|
|
256
|
+
/******/ return module.exports;
|
|
257
|
+
/******/ }
|
|
258
|
+
/******/
|
|
259
|
+
/************************************************************************/
|
|
260
|
+
/******/ /* webpack/runtime/define property getters */
|
|
261
|
+
/******/ (() => {
|
|
262
|
+
/******/ // define getter functions for harmony exports
|
|
263
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
264
|
+
/******/ for(var key in definition) {
|
|
265
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
266
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
267
|
+
/******/ }
|
|
268
|
+
/******/ }
|
|
269
|
+
/******/ };
|
|
270
|
+
/******/ })();
|
|
271
|
+
/******/
|
|
272
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
273
|
+
/******/ (() => {
|
|
274
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
275
|
+
/******/ })();
|
|
276
|
+
/******/
|
|
277
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
278
|
+
/******/ (() => {
|
|
279
|
+
/******/ // define __esModule on exports
|
|
280
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
281
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
282
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
283
|
+
/******/ }
|
|
284
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
285
|
+
/******/ };
|
|
286
|
+
/******/ })();
|
|
287
|
+
/******/
|
|
288
|
+
/************************************************************************/
|
|
289
|
+
var __webpack_exports__ = {};
|
|
290
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
291
|
+
(() => {
|
|
292
|
+
// ESM COMPAT FLAG
|
|
293
|
+
__webpack_require__.r(__webpack_exports__);
|
|
294
|
+
|
|
295
|
+
// EXPORTS
|
|
296
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
297
|
+
loadAll: () => (/* binding */ loadAll)
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"}
|
|
301
|
+
var engine_root_window_ = __webpack_require__(533);
|
|
302
|
+
;// CONCATENATED MODULE: ../../shapes/arrow/dist/esm/ArrowDrawer.js
|
|
303
|
+
|
|
304
|
+
class ArrowDrawer {
|
|
305
|
+
draw(context, particle, radius) {
|
|
306
|
+
const width = radius * 2,
|
|
307
|
+
heightFactor = particle.heightFactor ?? 0.5,
|
|
308
|
+
headWidthFactor = particle.headWidthFactor ?? 0.2,
|
|
309
|
+
bodyHeightFactor = particle.bodyHeightFactor ?? 0.5,
|
|
310
|
+
height = width * heightFactor,
|
|
311
|
+
headWidth = width * headWidthFactor,
|
|
312
|
+
bodyHeight = height * bodyHeightFactor;
|
|
313
|
+
context.moveTo(-width / 2, 0);
|
|
314
|
+
context.lineTo(-width / 2, -bodyHeight / 2);
|
|
315
|
+
context.lineTo(width / 2 - headWidth, -bodyHeight / 2);
|
|
316
|
+
context.lineTo(width / 2 - headWidth, -height / 2);
|
|
317
|
+
context.lineTo(width / 2 + headWidth, 0);
|
|
318
|
+
context.lineTo(width / 2 - headWidth, height / 2);
|
|
319
|
+
context.lineTo(width / 2 - headWidth, bodyHeight / 2);
|
|
320
|
+
context.lineTo(-width / 2, bodyHeight / 2);
|
|
321
|
+
context.lineTo(-width / 2, 0);
|
|
322
|
+
}
|
|
323
|
+
particleInit(container, particle) {
|
|
324
|
+
const shapeData = particle.shapeData;
|
|
325
|
+
particle.heightFactor = (0,engine_root_window_.getRangeValue)(shapeData?.heightFactor ?? 0.5);
|
|
326
|
+
particle.headWidthFactor = (0,engine_root_window_.getRangeValue)(shapeData?.headWidthFactor ?? 0.2);
|
|
327
|
+
particle.bodyHeightFactor = (0,engine_root_window_.getRangeValue)(shapeData?.bodyHeightFactor ?? 0.5);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
;// CONCATENATED MODULE: ../../shapes/arrow/dist/esm/index.js
|
|
331
|
+
|
|
332
|
+
async function loadArrowShape(engine, refresh = true) {
|
|
333
|
+
await engine.addShape("arrow", new ArrowDrawer(), refresh);
|
|
334
|
+
}
|
|
335
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-bubble","commonjs2":"@tsparticles/shape-bubble","amd":"@tsparticles/shape-bubble","root":"window"}
|
|
336
|
+
var shape_bubble_root_window_ = __webpack_require__(164);
|
|
337
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-canvas-mask","commonjs2":"@tsparticles/plugin-canvas-mask","amd":"@tsparticles/plugin-canvas-mask","root":"window"}
|
|
338
|
+
var plugin_canvas_mask_root_window_ = __webpack_require__(72);
|
|
339
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-cards","commonjs2":"@tsparticles/shape-cards","amd":"@tsparticles/shape-cards","root":"window"}
|
|
340
|
+
var shape_cards_root_window_ = __webpack_require__(686);
|
|
341
|
+
;// CONCATENATED MODULE: ../../shapes/cog/dist/esm/CogDrawer.js
|
|
342
|
+
|
|
343
|
+
class CogDrawer {
|
|
344
|
+
afterEffect(ctx, particle, radius) {
|
|
345
|
+
if (particle.cogHoleRadius === undefined || particle.cogInnerRadius === undefined || particle.cogInnerTaper === undefined || particle.cogNotches === undefined || particle.cogOuterTaper === undefined) {
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
const pi2 = 2 * Math.PI,
|
|
349
|
+
holeRadius = radius * particle.cogHoleRadius / 100;
|
|
350
|
+
ctx.globalCompositeOperation = "destination-out";
|
|
351
|
+
ctx.beginPath();
|
|
352
|
+
ctx.moveTo(holeRadius, 0);
|
|
353
|
+
ctx.arc(0, 0, holeRadius, 0, pi2);
|
|
354
|
+
ctx.closePath();
|
|
355
|
+
ctx.fill();
|
|
356
|
+
ctx.globalCompositeOperation = "source-over";
|
|
357
|
+
}
|
|
358
|
+
draw(ctx, particle, radius) {
|
|
359
|
+
if (particle.cogHoleRadius === undefined || particle.cogInnerRadius === undefined || particle.cogInnerTaper === undefined || particle.cogNotches === undefined || particle.cogOuterTaper === undefined) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
const pi2 = 2 * Math.PI,
|
|
363
|
+
angle = pi2 / (particle.cogNotches * 2),
|
|
364
|
+
taperAI = angle * particle.cogInnerTaper * 0.005,
|
|
365
|
+
taperAO = angle * particle.cogOuterTaper * 0.005,
|
|
366
|
+
innerRadius = radius * particle.cogInnerRadius / 100;
|
|
367
|
+
let a = angle,
|
|
368
|
+
toggle = false;
|
|
369
|
+
ctx.moveTo(radius * Math.cos(taperAO), radius * Math.sin(taperAO));
|
|
370
|
+
for (; a <= pi2; a += angle) {
|
|
371
|
+
if (toggle) {
|
|
372
|
+
ctx.lineTo(innerRadius * Math.cos(a - taperAI), innerRadius * Math.sin(a - taperAI));
|
|
373
|
+
ctx.lineTo(radius * Math.cos(a + taperAO), radius * Math.sin(a + taperAO));
|
|
374
|
+
} else {
|
|
375
|
+
ctx.lineTo(radius * Math.cos(a - taperAO), radius * Math.sin(a - taperAO));
|
|
376
|
+
ctx.lineTo(innerRadius * Math.cos(a + taperAI), innerRadius * Math.sin(a + taperAI));
|
|
377
|
+
}
|
|
378
|
+
toggle = !toggle;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
particleInit(container, particle) {
|
|
382
|
+
const shapeData = particle.shapeData;
|
|
383
|
+
particle.cogHoleRadius = (0,engine_root_window_.getRangeValue)(shapeData?.holeRadius ?? 44);
|
|
384
|
+
particle.cogInnerRadius = (0,engine_root_window_.getRangeValue)(shapeData?.innerRadius ?? 72);
|
|
385
|
+
particle.cogInnerTaper = (0,engine_root_window_.getRangeValue)(shapeData?.innerTaper ?? 35);
|
|
386
|
+
particle.cogNotches = (0,engine_root_window_.getRangeValue)(shapeData?.notches ?? 7);
|
|
387
|
+
particle.cogOuterTaper = (0,engine_root_window_.getRangeValue)(shapeData?.outerTaper ?? 50);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
;// CONCATENATED MODULE: ../../shapes/cog/dist/esm/index.js
|
|
391
|
+
|
|
392
|
+
async function loadCogShape(engine, refresh = true) {
|
|
393
|
+
await engine.addShape("cog", new CogDrawer(), refresh);
|
|
394
|
+
}
|
|
395
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/path-curves","commonjs2":"@tsparticles/path-curves","amd":"@tsparticles/path-curves","root":"window"}
|
|
396
|
+
var path_curves_root_window_ = __webpack_require__(997);
|
|
397
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-easing-back","commonjs2":"@tsparticles/plugin-easing-back","amd":"@tsparticles/plugin-easing-back","root":"window"}
|
|
398
|
+
var plugin_easing_back_root_window_ = __webpack_require__(792);
|
|
399
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-easing-circ","commonjs2":"@tsparticles/plugin-easing-circ","amd":"@tsparticles/plugin-easing-circ","root":"window"}
|
|
400
|
+
var plugin_easing_circ_root_window_ = __webpack_require__(176);
|
|
401
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-easing-cubic","commonjs2":"@tsparticles/plugin-easing-cubic","amd":"@tsparticles/plugin-easing-cubic","root":"window"}
|
|
402
|
+
var plugin_easing_cubic_root_window_ = __webpack_require__(922);
|
|
403
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-easing-expo","commonjs2":"@tsparticles/plugin-easing-expo","amd":"@tsparticles/plugin-easing-expo","root":"window"}
|
|
404
|
+
var plugin_easing_expo_root_window_ = __webpack_require__(594);
|
|
405
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-easing-quart","commonjs2":"@tsparticles/plugin-easing-quart","amd":"@tsparticles/plugin-easing-quart","root":"window"}
|
|
406
|
+
var plugin_easing_quart_root_window_ = __webpack_require__(205);
|
|
407
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-easing-quint","commonjs2":"@tsparticles/plugin-easing-quint","amd":"@tsparticles/plugin-easing-quint","root":"window"}
|
|
408
|
+
var plugin_easing_quint_root_window_ = __webpack_require__(144);
|
|
409
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-easing-sine","commonjs2":"@tsparticles/plugin-easing-sine","amd":"@tsparticles/plugin-easing-sine","root":"window"}
|
|
410
|
+
var plugin_easing_sine_root_window_ = __webpack_require__(691);
|
|
411
|
+
;// CONCATENATED MODULE: ../../plugins/exports/image/dist/esm/ExportImageInstance.js
|
|
412
|
+
class ExportImageInstance {
|
|
413
|
+
constructor(container, engine) {
|
|
414
|
+
this._exportImage = async data => {
|
|
415
|
+
const element = this._container.canvas.element;
|
|
416
|
+
if (!element) {
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
return new Promise(resolve => {
|
|
420
|
+
element.toBlob(blob => {
|
|
421
|
+
if (!blob) {
|
|
422
|
+
resolve(undefined);
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
resolve(blob);
|
|
426
|
+
}, data.type ?? "image/png", data.quality);
|
|
427
|
+
});
|
|
428
|
+
};
|
|
429
|
+
this._container = container;
|
|
430
|
+
this._engine = engine;
|
|
431
|
+
}
|
|
432
|
+
async export(type, data) {
|
|
433
|
+
const res = {
|
|
434
|
+
supported: false
|
|
435
|
+
};
|
|
436
|
+
switch (type) {
|
|
437
|
+
case "image":
|
|
438
|
+
res.supported = true;
|
|
439
|
+
res.blob = await this._exportImage(data);
|
|
440
|
+
break;
|
|
441
|
+
}
|
|
442
|
+
return res;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
;// CONCATENATED MODULE: ../../plugins/exports/image/dist/esm/index.js
|
|
446
|
+
|
|
447
|
+
class ExportImagePlugin {
|
|
448
|
+
constructor(engine) {
|
|
449
|
+
this.id = "export-image";
|
|
450
|
+
this._engine = engine;
|
|
451
|
+
}
|
|
452
|
+
getPlugin(container) {
|
|
453
|
+
return new ExportImageInstance(container, this._engine);
|
|
454
|
+
}
|
|
455
|
+
loadOptions() {}
|
|
456
|
+
needsPlugin() {
|
|
457
|
+
return true;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
async function loadExportImagePlugin(engine, refresh = true) {
|
|
461
|
+
await engine.addPlugin(new ExportImagePlugin(engine), refresh);
|
|
462
|
+
}
|
|
463
|
+
;// CONCATENATED MODULE: ../../plugins/exports/json/dist/esm/ExportJSONInstance.js
|
|
464
|
+
class ExportJSONInstance {
|
|
465
|
+
constructor(container, engine) {
|
|
466
|
+
this._exportJSON = async () => {
|
|
467
|
+
const json = JSON.stringify(this._container.actualOptions, (key, value) => {
|
|
468
|
+
if (key.startsWith("_")) {
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
return value;
|
|
472
|
+
}, 2);
|
|
473
|
+
return new Blob([json], {
|
|
474
|
+
type: "application/json"
|
|
475
|
+
});
|
|
476
|
+
};
|
|
477
|
+
this._container = container;
|
|
478
|
+
this._engine = engine;
|
|
479
|
+
}
|
|
480
|
+
async export(type) {
|
|
481
|
+
const res = {
|
|
482
|
+
supported: false
|
|
483
|
+
};
|
|
484
|
+
switch (type) {
|
|
485
|
+
case "json":
|
|
486
|
+
res.supported = true;
|
|
487
|
+
res.blob = await this._exportJSON();
|
|
488
|
+
break;
|
|
489
|
+
}
|
|
490
|
+
return res;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
;// CONCATENATED MODULE: ../../plugins/exports/json/dist/esm/index.js
|
|
494
|
+
|
|
495
|
+
class ExportJSONPlugin {
|
|
496
|
+
constructor(engine) {
|
|
497
|
+
this.id = "export-json";
|
|
498
|
+
this._engine = engine;
|
|
499
|
+
}
|
|
500
|
+
getPlugin(container) {
|
|
501
|
+
return new ExportJSONInstance(container, this._engine);
|
|
502
|
+
}
|
|
503
|
+
loadOptions() {}
|
|
504
|
+
needsPlugin() {
|
|
505
|
+
return true;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
async function loadExportJSONPlugin(engine, refresh = true) {
|
|
509
|
+
await engine.addPlugin(new ExportJSONPlugin(engine), refresh);
|
|
510
|
+
}
|
|
511
|
+
;// CONCATENATED MODULE: ../../plugins/exports/video/dist/esm/ExportVideoInstance.js
|
|
512
|
+
const videoTypes = ["webm", "ogg", "mp4", "x-matroska"],
|
|
513
|
+
codecs = ["vp9", "vp9.0", "vp8", "vp8.0", "avc1", "av1", "h265", "h.265", "h264", "h.264", "opus", "pcm", "aac", "mpeg", "mp4a"];
|
|
514
|
+
function getVideoSupportedMimeTypes() {
|
|
515
|
+
const isSupported = MediaRecorder.isTypeSupported,
|
|
516
|
+
supported = [];
|
|
517
|
+
videoTypes.forEach(type => {
|
|
518
|
+
const mimeType = `video/${type}`;
|
|
519
|
+
codecs.forEach(codec => [`${mimeType};codecs=${codec}`, `${mimeType};codecs=${codec.toUpperCase()}`].forEach(variation => {
|
|
520
|
+
if (isSupported(variation)) {
|
|
521
|
+
supported.push(variation);
|
|
522
|
+
}
|
|
523
|
+
}));
|
|
524
|
+
if (isSupported(mimeType)) {
|
|
525
|
+
supported.push(mimeType);
|
|
526
|
+
}
|
|
527
|
+
});
|
|
528
|
+
return supported;
|
|
529
|
+
}
|
|
530
|
+
class ExportVideoInstance {
|
|
531
|
+
constructor(container, engine) {
|
|
532
|
+
this._supportedTypes = [];
|
|
533
|
+
this._exportVideo = async data => {
|
|
534
|
+
const element = this._container.canvas.element;
|
|
535
|
+
if (!element) {
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
return new Promise(resolve => {
|
|
539
|
+
const stream = element.captureStream(data.fps ?? this._container.actualOptions.fpsLimit),
|
|
540
|
+
mimeType = data.mimeType ?? this._supportedTypes[0],
|
|
541
|
+
recorder = new MediaRecorder(stream, {
|
|
542
|
+
mimeType
|
|
543
|
+
}),
|
|
544
|
+
chunks = [];
|
|
545
|
+
recorder.addEventListener("dataavailable", event => {
|
|
546
|
+
chunks.push(event.data);
|
|
547
|
+
});
|
|
548
|
+
recorder.addEventListener("stop", () => {
|
|
549
|
+
resolve(new Blob(chunks, {
|
|
550
|
+
type: mimeType
|
|
551
|
+
}));
|
|
552
|
+
});
|
|
553
|
+
recorder.start();
|
|
554
|
+
setTimeout(() => {
|
|
555
|
+
recorder.stop();
|
|
556
|
+
}, data.duration ?? 5000);
|
|
557
|
+
});
|
|
558
|
+
};
|
|
559
|
+
this._container = container;
|
|
560
|
+
this._engine = engine;
|
|
561
|
+
this._supportedTypes = getVideoSupportedMimeTypes();
|
|
562
|
+
}
|
|
563
|
+
async export(type, data) {
|
|
564
|
+
const res = {
|
|
565
|
+
supported: false
|
|
566
|
+
};
|
|
567
|
+
switch (type) {
|
|
568
|
+
case "video":
|
|
569
|
+
res.supported = true;
|
|
570
|
+
res.blob = await this._exportVideo(data);
|
|
571
|
+
break;
|
|
572
|
+
}
|
|
573
|
+
return res;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
;// CONCATENATED MODULE: ../../plugins/exports/video/dist/esm/index.js
|
|
577
|
+
|
|
578
|
+
class ExportVideoPlugin {
|
|
579
|
+
constructor(engine) {
|
|
580
|
+
this.id = "export-video";
|
|
581
|
+
this._engine = engine;
|
|
582
|
+
}
|
|
583
|
+
getPlugin(container) {
|
|
584
|
+
return new ExportVideoInstance(container, this._engine);
|
|
585
|
+
}
|
|
586
|
+
loadOptions() {}
|
|
587
|
+
needsPlugin() {
|
|
588
|
+
return true;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
async function loadExportVideoPlugin(engine, refresh = true) {
|
|
592
|
+
await engine.addPlugin(new ExportVideoPlugin(engine), refresh);
|
|
593
|
+
}
|
|
594
|
+
// EXTERNAL MODULE: external {"commonjs":"tsparticles","commonjs2":"tsparticles","amd":"tsparticles","root":"window"}
|
|
595
|
+
var external_commonjs_tsparticles_commonjs2_tsparticles_amd_tsparticles_root_window_ = __webpack_require__(802);
|
|
596
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-gradient","commonjs2":"@tsparticles/updater-gradient","amd":"@tsparticles/updater-gradient","root":"window"}
|
|
597
|
+
var updater_gradient_root_window_ = __webpack_require__(887);
|
|
598
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-heart","commonjs2":"@tsparticles/shape-heart","amd":"@tsparticles/shape-heart","root":"window"}
|
|
599
|
+
var shape_heart_root_window_ = __webpack_require__(12);
|
|
600
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-hsv-color","commonjs2":"@tsparticles/plugin-hsv-color","amd":"@tsparticles/plugin-hsv-color","root":"window"}
|
|
601
|
+
var plugin_hsv_color_root_window_ = __webpack_require__(673);
|
|
602
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-infection","commonjs2":"@tsparticles/plugin-infection","amd":"@tsparticles/plugin-infection","root":"window"}
|
|
603
|
+
var plugin_infection_root_window_ = __webpack_require__(521);
|
|
604
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/interaction-light","commonjs2":"@tsparticles/interaction-light","amd":"@tsparticles/interaction-light","root":"window"}
|
|
605
|
+
var interaction_light_root_window_ = __webpack_require__(55);
|
|
606
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-motion","commonjs2":"@tsparticles/plugin-motion","amd":"@tsparticles/plugin-motion","root":"window"}
|
|
607
|
+
var plugin_motion_root_window_ = __webpack_require__(82);
|
|
608
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-multiline-text","commonjs2":"@tsparticles/shape-multiline-text","amd":"@tsparticles/shape-multiline-text","root":"window"}
|
|
609
|
+
var shape_multiline_text_root_window_ = __webpack_require__(940);
|
|
610
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-orbit","commonjs2":"@tsparticles/updater-orbit","amd":"@tsparticles/updater-orbit","root":"window"}
|
|
611
|
+
var updater_orbit_root_window_ = __webpack_require__(193);
|
|
612
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/interaction-particles-repulse","commonjs2":"@tsparticles/interaction-particles-repulse","amd":"@tsparticles/interaction-particles-repulse","root":"window"}
|
|
613
|
+
var interaction_particles_repulse_root_window_ = __webpack_require__(297);
|
|
614
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-path","commonjs2":"@tsparticles/shape-path","amd":"@tsparticles/shape-path","root":"window"}
|
|
615
|
+
var shape_path_root_window_ = __webpack_require__(901);
|
|
616
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/path-perlin-noise","commonjs2":"@tsparticles/path-perlin-noise","amd":"@tsparticles/path-perlin-noise","root":"window"}
|
|
617
|
+
var path_perlin_noise_root_window_ = __webpack_require__(228);
|
|
618
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-polygon-mask","commonjs2":"@tsparticles/plugin-polygon-mask","amd":"@tsparticles/plugin-polygon-mask","root":"window"}
|
|
619
|
+
var plugin_polygon_mask_root_window_ = __webpack_require__(124);
|
|
620
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/path-polygon","commonjs2":"@tsparticles/path-polygon","amd":"@tsparticles/path-polygon","root":"window"}
|
|
621
|
+
var path_polygon_root_window_ = __webpack_require__(231);
|
|
622
|
+
;// CONCATENATED MODULE: ../../shapes/rounded-polygon/dist/esm/RoundedPolygonDrawer.js
|
|
623
|
+
|
|
624
|
+
function polygon(sides, radius, rot = 0) {
|
|
625
|
+
const step = Math.PI * 2 / sides,
|
|
626
|
+
path = [];
|
|
627
|
+
for (let i = 0; i < sides; i++) {
|
|
628
|
+
path.push({
|
|
629
|
+
x: Math.cos(i * step + rot) * radius,
|
|
630
|
+
y: Math.sin(i * step + rot) * radius
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
return path;
|
|
634
|
+
}
|
|
635
|
+
function roundedPath(context, path, radius) {
|
|
636
|
+
let p1 = path[0],
|
|
637
|
+
p2 = path[1];
|
|
638
|
+
const len = path.length;
|
|
639
|
+
context.moveTo((p1.x + p2.x) / 2, (p1.y + p2.y) / 2);
|
|
640
|
+
for (let i = 1; i <= len; i++) {
|
|
641
|
+
p1 = p2;
|
|
642
|
+
p2 = path[(i + 1) % len];
|
|
643
|
+
context.arcTo(p1.x, p1.y, (p1.x + p2.x) / 2, (p1.y + p2.y) / 2, radius);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
class RoundedPolygonDrawer {
|
|
647
|
+
draw(context, particle, radius) {
|
|
648
|
+
roundedPath(context, polygon(particle.sides, radius), particle.borderRadius ?? 5);
|
|
649
|
+
}
|
|
650
|
+
getSidesCount(particle) {
|
|
651
|
+
const roundedPolygon = particle.shapeData;
|
|
652
|
+
return Math.round((0,engine_root_window_.getRangeValue)(roundedPolygon?.sides ?? 5));
|
|
653
|
+
}
|
|
654
|
+
particleInit(container, particle) {
|
|
655
|
+
const shapeData = particle.shapeData;
|
|
656
|
+
particle.borderRadius = Math.round((0,engine_root_window_.getRangeValue)(shapeData?.radius ?? 5)) * container.retina.pixelRatio;
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
;// CONCATENATED MODULE: ../../shapes/rounded-polygon/dist/esm/index.js
|
|
660
|
+
|
|
661
|
+
async function loadRoundedPolygonShape(engine, refresh = true) {
|
|
662
|
+
await engine.addShape("rounded-polygon", new RoundedPolygonDrawer(), refresh);
|
|
663
|
+
}
|
|
664
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-rounded-rect","commonjs2":"@tsparticles/shape-rounded-rect","amd":"@tsparticles/shape-rounded-rect","root":"window"}
|
|
665
|
+
var shape_rounded_rect_root_window_ = __webpack_require__(550);
|
|
666
|
+
;// CONCATENATED MODULE: ../../paths/svg/dist/esm/SVGPathGenerator.js
|
|
667
|
+
|
|
668
|
+
class SVGPathGenerator {
|
|
669
|
+
constructor() {
|
|
670
|
+
this._paths = [];
|
|
671
|
+
this._reverse = false;
|
|
672
|
+
this._size = {
|
|
673
|
+
width: 0,
|
|
674
|
+
height: 0
|
|
675
|
+
};
|
|
676
|
+
this._scale = 1;
|
|
677
|
+
this._offset = {
|
|
678
|
+
x: 0,
|
|
679
|
+
y: 0,
|
|
680
|
+
mode: "percent"
|
|
681
|
+
};
|
|
682
|
+
this._width = 0;
|
|
683
|
+
}
|
|
684
|
+
generate(particle, delta) {
|
|
685
|
+
const container = particle.container,
|
|
686
|
+
pxRatio = container.retina.pixelRatio;
|
|
687
|
+
if (particle.svgDirection === undefined) {
|
|
688
|
+
particle.svgDirection = (0,engine_root_window_.getRandom)() > 0.5 ? 0 : 1;
|
|
689
|
+
}
|
|
690
|
+
if (particle.svgPathIndex === undefined) {
|
|
691
|
+
particle.svgPathIndex = Math.floor(Math.random() * this._paths.length);
|
|
692
|
+
}
|
|
693
|
+
if (particle.svgSpeed === undefined) {
|
|
694
|
+
particle.svgSpeed = particle.velocity.mult((particle.retina.moveSpeed ?? 1) / 2).length;
|
|
695
|
+
}
|
|
696
|
+
if (particle.svgStep === undefined) {
|
|
697
|
+
particle.svgStep = (0,engine_root_window_.randomInRange)({
|
|
698
|
+
min: 0,
|
|
699
|
+
max: this._paths[particle.svgPathIndex].length
|
|
700
|
+
}) * pxRatio;
|
|
701
|
+
}
|
|
702
|
+
if (particle.svgOffset === undefined) {
|
|
703
|
+
particle.svgOffset = {
|
|
704
|
+
width: (0,engine_root_window_.randomInRange)({
|
|
705
|
+
min: -this._width / 2,
|
|
706
|
+
max: this._width / 2
|
|
707
|
+
}) * pxRatio,
|
|
708
|
+
height: (0,engine_root_window_.randomInRange)({
|
|
709
|
+
min: -this._width / 2,
|
|
710
|
+
max: this._width / 2
|
|
711
|
+
}) * pxRatio
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
if (particle.svgInitialPosition === undefined) {
|
|
715
|
+
particle.svgInitialPosition = {
|
|
716
|
+
...particle.position
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
particle.velocity.x = 0;
|
|
720
|
+
particle.velocity.y = 0;
|
|
721
|
+
if (particle.svgDirection === 0) {
|
|
722
|
+
particle.svgStep += particle.svgSpeed * delta.factor;
|
|
723
|
+
} else {
|
|
724
|
+
particle.svgStep -= particle.svgSpeed * delta.factor;
|
|
725
|
+
}
|
|
726
|
+
let path = this._paths[particle.svgPathIndex];
|
|
727
|
+
if (path) {
|
|
728
|
+
const pathLength = path.length;
|
|
729
|
+
if (particle.svgStep >= pathLength) {
|
|
730
|
+
particle.svgPathIndex = particle.svgPathIndex + 1;
|
|
731
|
+
if (particle.svgPathIndex >= this._paths.length) {
|
|
732
|
+
if (this._reverse) {
|
|
733
|
+
particle.svgPathIndex = this._paths.length - 1;
|
|
734
|
+
particle.svgDirection = 1;
|
|
735
|
+
} else {
|
|
736
|
+
particle.svgPathIndex = 0;
|
|
737
|
+
particle.svgStep = 0;
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
} else if (particle.svgStep <= 0) {
|
|
741
|
+
particle.svgPathIndex = particle.svgPathIndex - 1;
|
|
742
|
+
if (particle.svgPathIndex < 0) {
|
|
743
|
+
if (this._reverse) {
|
|
744
|
+
particle.svgPathIndex = 0;
|
|
745
|
+
particle.svgDirection = 0;
|
|
746
|
+
} else {
|
|
747
|
+
particle.svgPathIndex = this._paths.length - 1;
|
|
748
|
+
path = this._paths[particle.svgPathIndex];
|
|
749
|
+
particle.svgStep = path.length;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
path = this._paths[particle.svgPathIndex];
|
|
754
|
+
}
|
|
755
|
+
if (path) {
|
|
756
|
+
const pathElement = path.element,
|
|
757
|
+
pos = pathElement.getPointAtLength(particle.svgStep),
|
|
758
|
+
canvasSize = particle.container.canvas.size,
|
|
759
|
+
offset = (0,engine_root_window_.getPosition)(this._offset, canvasSize),
|
|
760
|
+
scale = this._scale * pxRatio;
|
|
761
|
+
particle.position.x = (pos.x - this._size.width / 2) * scale + particle.svgInitialPosition.x + offset.x + particle.svgOffset.width;
|
|
762
|
+
particle.position.y = (pos.y - this._size.height / 2) * scale + particle.svgInitialPosition.y + offset.y + particle.svgOffset.height;
|
|
763
|
+
}
|
|
764
|
+
return engine_root_window_.Vector.origin;
|
|
765
|
+
}
|
|
766
|
+
init(container) {
|
|
767
|
+
const options = container.actualOptions.particles.move.path.options,
|
|
768
|
+
position = options.position ?? this._offset;
|
|
769
|
+
this._reverse = options.reverse ?? this._reverse;
|
|
770
|
+
this._scale = options.scale ?? 1;
|
|
771
|
+
this._offset.x = position.x;
|
|
772
|
+
this._offset.y = position.y;
|
|
773
|
+
this._offset.mode = position.mode;
|
|
774
|
+
this._width = options.width ?? 0;
|
|
775
|
+
if (options.url && !options.path) {
|
|
776
|
+
const url = options.url;
|
|
777
|
+
(async () => {
|
|
778
|
+
const response = await fetch(url),
|
|
779
|
+
data = await response.text();
|
|
780
|
+
const parser = new DOMParser(),
|
|
781
|
+
doc = parser.parseFromString(data, "image/svg+xml"),
|
|
782
|
+
svg = doc.getElementsByTagName("svg")[0];
|
|
783
|
+
let svgPaths = svg.getElementsByTagName("path");
|
|
784
|
+
if (!svgPaths.length) {
|
|
785
|
+
svgPaths = doc.getElementsByTagName("path");
|
|
786
|
+
}
|
|
787
|
+
this._paths = [];
|
|
788
|
+
for (let i = 0; i < svgPaths.length; i++) {
|
|
789
|
+
const path = svgPaths.item(i);
|
|
790
|
+
if (path) {
|
|
791
|
+
this._paths.push({
|
|
792
|
+
element: path,
|
|
793
|
+
length: path.getTotalLength()
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
this._size.height = parseFloat(svg.getAttribute("height") ?? "0");
|
|
798
|
+
this._size.width = parseFloat(svg.getAttribute("width") ?? "0");
|
|
799
|
+
})();
|
|
800
|
+
} else if (options.path) {
|
|
801
|
+
const path = options.path;
|
|
802
|
+
this._paths = [];
|
|
803
|
+
for (const item of path.data) {
|
|
804
|
+
const element = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
805
|
+
element.setAttribute("d", item);
|
|
806
|
+
this._paths.push({
|
|
807
|
+
element,
|
|
808
|
+
length: element.getTotalLength()
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
this._size.height = path.size.height;
|
|
812
|
+
this._size.width = path.size.width;
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
reset() {}
|
|
816
|
+
update() {}
|
|
817
|
+
}
|
|
818
|
+
;// CONCATENATED MODULE: ../../paths/svg/dist/esm/index.js
|
|
819
|
+
|
|
820
|
+
const svgPathName = "svgPathGenerator";
|
|
821
|
+
async function loadSVGPath(engine, refresh = true) {
|
|
822
|
+
await engine.addPathGenerator(svgPathName, new SVGPathGenerator(), refresh);
|
|
823
|
+
}
|
|
824
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/path-simplex-noise","commonjs2":"@tsparticles/path-simplex-noise","amd":"@tsparticles/path-simplex-noise","root":"window"}
|
|
825
|
+
var path_simplex_noise_root_window_ = __webpack_require__(520);
|
|
826
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-sounds","commonjs2":"@tsparticles/plugin-sounds","amd":"@tsparticles/plugin-sounds","root":"window"}
|
|
827
|
+
var plugin_sounds_root_window_ = __webpack_require__(490);
|
|
828
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-spiral","commonjs2":"@tsparticles/shape-spiral","amd":"@tsparticles/shape-spiral","root":"window"}
|
|
829
|
+
var shape_spiral_root_window_ = __webpack_require__(561);
|
|
830
|
+
;// CONCATENATED MODULE: ./dist/browser/index.js
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
async function loadAll(engine, refresh = true) {
|
|
868
|
+
await (0,external_commonjs_tsparticles_commonjs2_tsparticles_amd_tsparticles_root_window_.loadFull)(engine, false);
|
|
869
|
+
await (0,plugin_hsv_color_root_window_.loadHsvColorPlugin)();
|
|
870
|
+
await (0,plugin_easing_back_root_window_.loadEasingBackPlugin)();
|
|
871
|
+
await (0,plugin_easing_circ_root_window_.loadEasingCircPlugin)();
|
|
872
|
+
await (0,plugin_easing_cubic_root_window_.loadEasingCubicPlugin)();
|
|
873
|
+
await (0,plugin_easing_expo_root_window_.loadEasingExpoPlugin)();
|
|
874
|
+
await (0,plugin_easing_quart_root_window_.loadEasingQuartPlugin)();
|
|
875
|
+
await (0,plugin_easing_quint_root_window_.loadEasingQuintPlugin)();
|
|
876
|
+
await (0,plugin_easing_sine_root_window_.loadEasingSinePlugin)();
|
|
877
|
+
await (0,plugin_hsv_color_root_window_.loadHsvColorPlugin)();
|
|
878
|
+
await (0,plugin_canvas_mask_root_window_.loadCanvasMaskPlugin)(engine, false);
|
|
879
|
+
await (0,plugin_infection_root_window_.loadInfectionPlugin)(engine, false);
|
|
880
|
+
await (0,plugin_motion_root_window_.loadMotionPlugin)(engine, false);
|
|
881
|
+
await (0,plugin_polygon_mask_root_window_.loadPolygonMaskPlugin)(engine, false);
|
|
882
|
+
await (0,plugin_sounds_root_window_.loadSoundsPlugin)(engine, false);
|
|
883
|
+
await loadExportImagePlugin(engine, false);
|
|
884
|
+
await loadExportJSONPlugin(engine, false);
|
|
885
|
+
await loadExportVideoPlugin(engine, false);
|
|
886
|
+
await (0,interaction_light_root_window_.loadLightInteraction)(engine, false);
|
|
887
|
+
await (0,interaction_particles_repulse_root_window_.loadParticlesRepulseInteraction)(engine, false);
|
|
888
|
+
await (0,updater_gradient_root_window_.loadGradientUpdater)(engine, false);
|
|
889
|
+
await (0,updater_orbit_root_window_.loadOrbitUpdater)(engine, false);
|
|
890
|
+
await (0,path_curves_root_window_.loadCurvesPath)(engine, false);
|
|
891
|
+
await (0,path_perlin_noise_root_window_.loadPerlinNoisePath)(engine, false);
|
|
892
|
+
await (0,path_polygon_root_window_.loadPolygonPath)(engine, false);
|
|
893
|
+
await loadSVGPath(engine, false);
|
|
894
|
+
await (0,path_simplex_noise_root_window_.loadSimplexNoisePath)(engine, false);
|
|
895
|
+
await loadArrowShape(engine, false);
|
|
896
|
+
await (0,shape_bubble_root_window_.loadBubbleShape)(engine, false);
|
|
897
|
+
await (0,shape_cards_root_window_.loadCardsShape)(engine, false);
|
|
898
|
+
await loadCogShape(engine, false);
|
|
899
|
+
await (0,shape_heart_root_window_.loadHeartShape)(engine, false);
|
|
900
|
+
await (0,shape_multiline_text_root_window_.loadMultilineTextShape)(engine, false);
|
|
901
|
+
await (0,shape_path_root_window_.loadPathShape)(engine, false);
|
|
902
|
+
await loadRoundedPolygonShape(engine, false);
|
|
903
|
+
await (0,shape_rounded_rect_root_window_.loadRoundedRectShape)(engine, false);
|
|
904
|
+
await (0,shape_spiral_root_window_.loadSpiralShape)(engine, false);
|
|
905
|
+
await engine.refresh(refresh);
|
|
906
|
+
}
|
|
907
|
+
})();
|
|
908
|
+
|
|
909
|
+
/******/ return __webpack_exports__;
|
|
910
|
+
/******/ })()
|
|
911
|
+
;
|
|
912
|
+
});
|