@tsparticles/pjs 3.1.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,15 @@
4
4
  * Demo / Generator : https://particles.js.org/
5
5
  * GitHub : https://www.github.com/matteobruni/tsparticles
6
6
  * How to use? : Check the GitHub README
7
- * v3.1.0
7
+ * v3.2.0
8
+ */
9
+ /*
10
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
11
+ * This devtool is neither made for production nor for readable output files.
12
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
13
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
14
+ * or disable the default devtool with "devtool: false".
15
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8
16
  */
9
17
  (function webpackUniversalModuleDefinition(root, factory) {
10
18
  if(typeof exports === 'object' && typeof module === 'object')
@@ -15,15 +23,48 @@
15
23
  var a = typeof exports === 'object' ? factory(require("@tsparticles/engine")) : factory(root["window"]);
16
24
  for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
17
25
  }
18
- })(this, (__WEBPACK_EXTERNAL_MODULE__533__) => {
26
+ })(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__) => {
19
27
  return /******/ (() => { // webpackBootstrap
20
28
  /******/ "use strict";
21
29
  /******/ var __webpack_modules__ = ({
22
30
 
23
- /***/ 533:
31
+ /***/ "./dist/browser/VincentGarreau/particles.js":
32
+ /*!**************************************************!*\
33
+ !*** ./dist/browser/VincentGarreau/particles.js ***!
34
+ \**************************************************/
35
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
36
+
37
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ initParticlesJS: () => (/* binding */ initParticlesJS)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nconst defaultMinOpacity = 0,\n defaultMinSize = 0,\n speedFactor = 3,\n defaultPjsOptions = {\n particles: {\n number: {\n value: 400,\n density: {\n enable: true,\n value_area: 800\n }\n },\n color: {\n value: \"#fff\"\n },\n shape: {\n type: \"circle\",\n stroke: {\n width: 0,\n color: \"#ff0000\"\n },\n polygon: {\n nb_sides: 5\n },\n image: {\n src: \"\",\n width: 100,\n height: 100\n }\n },\n opacity: {\n value: 1,\n random: false,\n anim: {\n enable: false,\n speed: 2,\n opacity_min: 0,\n sync: false\n }\n },\n size: {\n value: 20,\n random: false,\n anim: {\n enable: false,\n speed: 20,\n size_min: 0,\n sync: false\n }\n },\n line_linked: {\n enable: true,\n distance: 100,\n color: \"#fff\",\n opacity: 1,\n width: 1\n },\n move: {\n enable: true,\n speed: 2,\n direction: \"none\",\n random: false,\n straight: false,\n out_mode: \"out\",\n bounce: false,\n attract: {\n enable: false,\n rotateX: 3000,\n rotateY: 3000\n }\n }\n },\n interactivity: {\n detect_on: \"canvas\",\n events: {\n onhover: {\n enable: true,\n mode: \"grab\"\n },\n onclick: {\n enable: true,\n mode: \"push\"\n },\n resize: true\n },\n modes: {\n grab: {\n distance: 100,\n line_linked: {\n opacity: 1\n }\n },\n bubble: {\n distance: 200,\n size: 80,\n duration: 0.4,\n opacity: 1,\n speed: 3\n },\n repulse: {\n distance: 200,\n duration: 0.4\n },\n push: {\n particles_nb: 4\n },\n remove: {\n particles_nb: 2\n }\n }\n },\n retina_detect: false\n };\nconst initParticlesJS = engine => {\n const particlesJS = (tagId, options) => {\n const fixedOptions = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)(defaultPjsOptions, options);\n return engine.load({\n id: tagId,\n options: {\n fullScreen: {\n enable: false\n },\n detectRetina: fixedOptions.retina_detect,\n smooth: true,\n interactivity: {\n detectsOn: fixedOptions.interactivity.detect_on,\n events: {\n onHover: {\n enable: fixedOptions.interactivity.events.onhover.enable,\n mode: fixedOptions.interactivity.events.onhover.mode\n },\n onClick: {\n enable: fixedOptions.interactivity.events.onclick.enable,\n mode: fixedOptions.interactivity.events.onclick.mode\n },\n resize: {\n enable: fixedOptions.interactivity.events.resize\n }\n },\n modes: {\n grab: {\n distance: fixedOptions.interactivity.modes.grab.distance,\n links: {\n opacity: fixedOptions.interactivity.modes.grab.line_linked.opacity\n }\n },\n bubble: {\n distance: fixedOptions.interactivity.modes.bubble.distance,\n size: fixedOptions.interactivity.modes.bubble.size,\n duration: fixedOptions.interactivity.modes.bubble.duration,\n opacity: fixedOptions.interactivity.modes.bubble.opacity,\n speed: fixedOptions.interactivity.modes.bubble.speed\n },\n repulse: {\n distance: fixedOptions.interactivity.modes.repulse.distance,\n duration: fixedOptions.interactivity.modes.repulse.duration\n },\n push: {\n quantity: fixedOptions.interactivity.modes.push.particles_nb\n },\n remove: {\n quantity: fixedOptions.interactivity.modes.remove.particles_nb\n }\n }\n },\n particles: {\n collisions: {\n enable: fixedOptions.particles.move.bounce\n },\n number: {\n value: fixedOptions.particles.number.value,\n density: {\n enable: fixedOptions.particles.number.density.enable,\n width: fixedOptions.particles.number.density.value_area\n }\n },\n color: {\n value: fixedOptions.particles.color.value\n },\n stroke: {\n width: fixedOptions.particles.shape.stroke.width,\n color: {\n value: fixedOptions.particles.shape.stroke.color\n }\n },\n shape: {\n type: fixedOptions.particles.shape.type,\n options: {\n polygon: {\n sides: fixedOptions.particles.shape.polygon.nb_sides\n },\n image: {\n src: fixedOptions.particles.shape.image.src,\n width: fixedOptions.particles.shape.image.width,\n height: fixedOptions.particles.shape.image.height\n }\n }\n },\n opacity: {\n value: fixedOptions.particles.opacity.random ? {\n min: fixedOptions.particles.opacity.anim.enable ? fixedOptions.particles.opacity.anim.opacity_min : defaultMinOpacity,\n max: fixedOptions.particles.opacity.value\n } : fixedOptions.particles.opacity.value,\n animation: {\n enable: fixedOptions.particles.opacity.anim.enable,\n speed: fixedOptions.particles.opacity.anim.speed,\n sync: fixedOptions.particles.opacity.anim.sync\n }\n },\n size: {\n value: fixedOptions.particles.size.random ? {\n min: fixedOptions.particles.size.anim.enable ? fixedOptions.particles.size.anim.size_min : defaultMinSize,\n max: fixedOptions.particles.size.value\n } : fixedOptions.particles.size.value,\n animation: {\n enable: fixedOptions.particles.size.anim.enable,\n speed: fixedOptions.particles.size.anim.speed,\n sync: fixedOptions.particles.size.anim.sync\n }\n },\n links: {\n enable: fixedOptions.particles.line_linked.enable,\n distance: fixedOptions.particles.line_linked.distance,\n color: fixedOptions.particles.line_linked.color,\n opacity: fixedOptions.particles.line_linked.opacity,\n width: fixedOptions.particles.line_linked.width\n },\n move: {\n enable: fixedOptions.particles.move.enable,\n speed: fixedOptions.particles.move.speed / speedFactor,\n direction: fixedOptions.particles.move.direction,\n random: fixedOptions.particles.move.random,\n straight: fixedOptions.particles.move.straight,\n outModes: fixedOptions.particles.move.out_mode,\n attract: {\n enable: fixedOptions.particles.move.attract.enable,\n rotate: {\n x: fixedOptions.particles.move.attract.rotateX,\n y: fixedOptions.particles.move.attract.rotateY\n }\n }\n }\n }\n }\n });\n };\n particlesJS.load = (tagId, pathConfigJson, callback) => {\n engine.load({\n id: tagId,\n url: pathConfigJson\n }).then(container => {\n if (container) {\n callback(container);\n }\n }).catch(() => {\n callback(undefined);\n });\n };\n particlesJS.setOnClickHandler = callback => {\n engine.setOnClickHandler(callback);\n };\n const pJSDom = engine.dom();\n return {\n particlesJS,\n pJSDom\n };\n};\n\n\n//# sourceURL=webpack://@tsparticles/pjs/./dist/browser/VincentGarreau/particles.js?");
38
+
39
+ /***/ }),
40
+
41
+ /***/ "./dist/browser/index.js":
42
+ /*!*******************************!*\
43
+ !*** ./dist/browser/index.js ***!
44
+ \*******************************/
45
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
46
+
47
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ initPjs: () => (/* binding */ initPjs)\n/* harmony export */ });\n/* harmony import */ var _marcbruederlin_Particles_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./marcbruederlin/Particles.js */ \"./dist/browser/marcbruederlin/Particles.js\");\n/* harmony import */ var _VincentGarreau_particles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VincentGarreau/particles.js */ \"./dist/browser/VincentGarreau/particles.js\");\n\n\nconst initPjs = engine => {\n const {\n particlesJS,\n pJSDom\n } = (0,_VincentGarreau_particles_js__WEBPACK_IMPORTED_MODULE_0__.initParticlesJS)(engine);\n window.particlesJS = particlesJS;\n window.pJSDom = pJSDom;\n window.Particles = _marcbruederlin_Particles_js__WEBPACK_IMPORTED_MODULE_1__.Particles;\n return {\n particlesJS,\n pJSDom,\n Particles: _marcbruederlin_Particles_js__WEBPACK_IMPORTED_MODULE_1__.Particles\n };\n};\n\n\n//# sourceURL=webpack://@tsparticles/pjs/./dist/browser/index.js?");
48
+
49
+ /***/ }),
50
+
51
+ /***/ "./dist/browser/marcbruederlin/Particles.js":
52
+ /*!**************************************************!*\
53
+ !*** ./dist/browser/marcbruederlin/Particles.js ***!
54
+ \**************************************************/
55
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
56
+
57
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Particles: () => (/* binding */ Particles)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nconst linksMinDistance = 120,\n moveMinSpeed = 0.5,\n particlesMinCount = 100,\n sizeMinValue = 3;\nclass Particles {\n static init(options) {\n const particles = new Particles(),\n selector = options.selector;\n if (!selector) {\n throw new Error(\"No selector provided\");\n }\n const el = document.querySelector(selector);\n if (!el) {\n throw new Error(\"No element found for selector\");\n }\n void _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles.load({\n element: el,\n id: selector.replace(\".\", \"\").replace(\"!\", \"\"),\n options: {\n fullScreen: {\n enable: false\n },\n particles: {\n color: {\n value: options.color ?? \"!000000\"\n },\n links: {\n color: \"random\",\n distance: options.minDistance ?? linksMinDistance,\n enable: options.connectParticles ?? false\n },\n move: {\n enable: true,\n speed: options.speed ?? moveMinSpeed\n },\n number: {\n value: options.maxParticles ?? particlesMinCount\n },\n size: {\n value: {\n min: 1,\n max: options.sizeVariations ?? sizeMinValue\n }\n }\n },\n responsive: options.responsive?.map(responsive => ({\n maxWidth: responsive.breakpoint,\n options: {\n particles: {\n color: {\n value: responsive.options?.color\n },\n links: {\n distance: responsive.options?.minDistance,\n enable: responsive.options?.connectParticles\n },\n number: {\n value: options.maxParticles\n },\n move: {\n enable: true,\n speed: responsive.options?.speed\n },\n size: {\n value: responsive.options?.sizeVariations\n }\n }\n }\n }))\n }\n }).then(container => {\n particles._container = container;\n });\n return particles;\n }\n destroy() {\n const container = this._container;\n container?.destroy();\n }\n pauseAnimation() {\n const container = this._container;\n container?.pause();\n }\n resumeAnimation() {\n const container = this._container;\n container?.play();\n }\n}\n\n//# sourceURL=webpack://@tsparticles/pjs/./dist/browser/marcbruederlin/Particles.js?");
58
+
59
+ /***/ }),
60
+
61
+ /***/ "@tsparticles/engine":
62
+ /*!*********************************************************************************************************************************!*\
63
+ !*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
64
+ \*********************************************************************************************************************************/
24
65
  /***/ ((module) => {
25
66
 
26
- module.exports = __WEBPACK_EXTERNAL_MODULE__533__;
67
+ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
27
68
 
28
69
  /***/ })
29
70
 
@@ -54,6 +95,18 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__533__;
54
95
  /******/ }
55
96
  /******/
56
97
  /************************************************************************/
98
+ /******/ /* webpack/runtime/compat get default export */
99
+ /******/ (() => {
100
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
101
+ /******/ __webpack_require__.n = (module) => {
102
+ /******/ var getter = module && module.__esModule ?
103
+ /******/ () => (module['default']) :
104
+ /******/ () => (module);
105
+ /******/ __webpack_require__.d(getter, { a: getter });
106
+ /******/ return getter;
107
+ /******/ };
108
+ /******/ })();
109
+ /******/
57
110
  /******/ /* webpack/runtime/define property getters */
58
111
  /******/ (() => {
59
112
  /******/ // define getter functions for harmony exports
@@ -83,399 +136,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__533__;
83
136
  /******/ })();
84
137
  /******/
85
138
  /************************************************************************/
86
- var __webpack_exports__ = {};
87
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
88
- (() => {
89
- // ESM COMPAT FLAG
90
- __webpack_require__.r(__webpack_exports__);
91
-
92
- // EXPORTS
93
- __webpack_require__.d(__webpack_exports__, {
94
- initPjs: () => (/* binding */ initPjs)
95
- });
96
-
97
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"}
98
- var engine_root_window_ = __webpack_require__(533);
99
- ;// CONCATENATED MODULE: ./dist/browser/marcbruederlin/Particles.js
100
-
101
- const linksMinDistance = 120,
102
- moveMinSpeed = 0.5,
103
- particlesMinCount = 100,
104
- sizeMinValue = 3;
105
- class Particles {
106
- static init(options) {
107
- const particles = new Particles(),
108
- selector = options.selector;
109
- if (!selector) {
110
- throw new Error("No selector provided");
111
- }
112
- const el = document.querySelector(selector);
113
- if (!el) {
114
- throw new Error("No element found for selector");
115
- }
116
- void engine_root_window_.tsParticles.load({
117
- element: el,
118
- id: selector.replace(".", "").replace("!", ""),
119
- options: {
120
- fullScreen: {
121
- enable: false
122
- },
123
- particles: {
124
- color: {
125
- value: options.color ?? "!000000"
126
- },
127
- links: {
128
- color: "random",
129
- distance: options.minDistance ?? linksMinDistance,
130
- enable: options.connectParticles ?? false
131
- },
132
- move: {
133
- enable: true,
134
- speed: options.speed ?? moveMinSpeed
135
- },
136
- number: {
137
- value: options.maxParticles ?? particlesMinCount
138
- },
139
- size: {
140
- value: {
141
- min: 1,
142
- max: options.sizeVariations ?? sizeMinValue
143
- }
144
- }
145
- },
146
- responsive: options.responsive?.map(responsive => ({
147
- maxWidth: responsive.breakpoint,
148
- options: {
149
- particles: {
150
- color: {
151
- value: responsive.options?.color
152
- },
153
- links: {
154
- distance: responsive.options?.minDistance,
155
- enable: responsive.options?.connectParticles
156
- },
157
- number: {
158
- value: options.maxParticles
159
- },
160
- move: {
161
- enable: true,
162
- speed: responsive.options?.speed
163
- },
164
- size: {
165
- value: responsive.options?.sizeVariations
166
- }
167
- }
168
- }
169
- }))
170
- }
171
- }).then(container => {
172
- particles._container = container;
173
- });
174
- return particles;
175
- }
176
- destroy() {
177
- const container = this._container;
178
- container?.destroy();
179
- }
180
- pauseAnimation() {
181
- const container = this._container;
182
- container?.pause();
183
- }
184
- resumeAnimation() {
185
- const container = this._container;
186
- container?.play();
187
- }
188
- }
189
- ;// CONCATENATED MODULE: ./dist/browser/VincentGarreau/particles.js
190
-
191
- const defaultMinOpacity = 0,
192
- defaultMinSize = 0,
193
- speedFactor = 3,
194
- defaultPjsOptions = {
195
- particles: {
196
- number: {
197
- value: 400,
198
- density: {
199
- enable: true,
200
- value_area: 800
201
- }
202
- },
203
- color: {
204
- value: "#fff"
205
- },
206
- shape: {
207
- type: "circle",
208
- stroke: {
209
- width: 0,
210
- color: "#ff0000"
211
- },
212
- polygon: {
213
- nb_sides: 5
214
- },
215
- image: {
216
- src: "",
217
- width: 100,
218
- height: 100
219
- }
220
- },
221
- opacity: {
222
- value: 1,
223
- random: false,
224
- anim: {
225
- enable: false,
226
- speed: 2,
227
- opacity_min: 0,
228
- sync: false
229
- }
230
- },
231
- size: {
232
- value: 20,
233
- random: false,
234
- anim: {
235
- enable: false,
236
- speed: 20,
237
- size_min: 0,
238
- sync: false
239
- }
240
- },
241
- line_linked: {
242
- enable: true,
243
- distance: 100,
244
- color: "#fff",
245
- opacity: 1,
246
- width: 1
247
- },
248
- move: {
249
- enable: true,
250
- speed: 2,
251
- direction: "none",
252
- random: false,
253
- straight: false,
254
- out_mode: "out",
255
- bounce: false,
256
- attract: {
257
- enable: false,
258
- rotateX: 3000,
259
- rotateY: 3000
260
- }
261
- }
262
- },
263
- interactivity: {
264
- detect_on: "canvas",
265
- events: {
266
- onhover: {
267
- enable: true,
268
- mode: "grab"
269
- },
270
- onclick: {
271
- enable: true,
272
- mode: "push"
273
- },
274
- resize: true
275
- },
276
- modes: {
277
- grab: {
278
- distance: 100,
279
- line_linked: {
280
- opacity: 1
281
- }
282
- },
283
- bubble: {
284
- distance: 200,
285
- size: 80,
286
- duration: 0.4,
287
- opacity: 1,
288
- speed: 3
289
- },
290
- repulse: {
291
- distance: 200,
292
- duration: 0.4
293
- },
294
- push: {
295
- particles_nb: 4
296
- },
297
- remove: {
298
- particles_nb: 2
299
- }
300
- }
301
- },
302
- retina_detect: false
303
- };
304
- const initParticlesJS = engine => {
305
- const particlesJS = (tagId, options) => {
306
- const fixedOptions = (0,engine_root_window_.deepExtend)(defaultPjsOptions, options);
307
- return engine.load({
308
- id: tagId,
309
- options: {
310
- fullScreen: {
311
- enable: false
312
- },
313
- detectRetina: fixedOptions.retina_detect,
314
- smooth: true,
315
- interactivity: {
316
- detectsOn: fixedOptions.interactivity.detect_on,
317
- events: {
318
- onHover: {
319
- enable: fixedOptions.interactivity.events.onhover.enable,
320
- mode: fixedOptions.interactivity.events.onhover.mode
321
- },
322
- onClick: {
323
- enable: fixedOptions.interactivity.events.onclick.enable,
324
- mode: fixedOptions.interactivity.events.onclick.mode
325
- },
326
- resize: {
327
- enable: fixedOptions.interactivity.events.resize
328
- }
329
- },
330
- modes: {
331
- grab: {
332
- distance: fixedOptions.interactivity.modes.grab.distance,
333
- links: {
334
- opacity: fixedOptions.interactivity.modes.grab.line_linked.opacity
335
- }
336
- },
337
- bubble: {
338
- distance: fixedOptions.interactivity.modes.bubble.distance,
339
- size: fixedOptions.interactivity.modes.bubble.size,
340
- duration: fixedOptions.interactivity.modes.bubble.duration,
341
- opacity: fixedOptions.interactivity.modes.bubble.opacity,
342
- speed: fixedOptions.interactivity.modes.bubble.speed
343
- },
344
- repulse: {
345
- distance: fixedOptions.interactivity.modes.repulse.distance,
346
- duration: fixedOptions.interactivity.modes.repulse.duration
347
- },
348
- push: {
349
- quantity: fixedOptions.interactivity.modes.push.particles_nb
350
- },
351
- remove: {
352
- quantity: fixedOptions.interactivity.modes.remove.particles_nb
353
- }
354
- }
355
- },
356
- particles: {
357
- collisions: {
358
- enable: fixedOptions.particles.move.bounce
359
- },
360
- number: {
361
- value: fixedOptions.particles.number.value,
362
- density: {
363
- enable: fixedOptions.particles.number.density.enable,
364
- width: fixedOptions.particles.number.density.value_area
365
- }
366
- },
367
- color: {
368
- value: fixedOptions.particles.color.value
369
- },
370
- stroke: {
371
- width: fixedOptions.particles.shape.stroke.width,
372
- color: {
373
- value: fixedOptions.particles.shape.stroke.color
374
- }
375
- },
376
- shape: {
377
- type: fixedOptions.particles.shape.type,
378
- options: {
379
- polygon: {
380
- sides: fixedOptions.particles.shape.polygon.nb_sides
381
- },
382
- image: {
383
- src: fixedOptions.particles.shape.image.src,
384
- width: fixedOptions.particles.shape.image.width,
385
- height: fixedOptions.particles.shape.image.height
386
- }
387
- }
388
- },
389
- opacity: {
390
- value: fixedOptions.particles.opacity.random ? {
391
- min: fixedOptions.particles.opacity.anim.enable ? fixedOptions.particles.opacity.anim.opacity_min : defaultMinOpacity,
392
- max: fixedOptions.particles.opacity.value
393
- } : fixedOptions.particles.opacity.value,
394
- animation: {
395
- enable: fixedOptions.particles.opacity.anim.enable,
396
- speed: fixedOptions.particles.opacity.anim.speed,
397
- sync: fixedOptions.particles.opacity.anim.sync
398
- }
399
- },
400
- size: {
401
- value: fixedOptions.particles.size.random ? {
402
- min: fixedOptions.particles.size.anim.enable ? fixedOptions.particles.size.anim.size_min : defaultMinSize,
403
- max: fixedOptions.particles.size.value
404
- } : fixedOptions.particles.size.value,
405
- animation: {
406
- enable: fixedOptions.particles.size.anim.enable,
407
- speed: fixedOptions.particles.size.anim.speed,
408
- sync: fixedOptions.particles.size.anim.sync
409
- }
410
- },
411
- links: {
412
- enable: fixedOptions.particles.line_linked.enable,
413
- distance: fixedOptions.particles.line_linked.distance,
414
- color: fixedOptions.particles.line_linked.color,
415
- opacity: fixedOptions.particles.line_linked.opacity,
416
- width: fixedOptions.particles.line_linked.width
417
- },
418
- move: {
419
- enable: fixedOptions.particles.move.enable,
420
- speed: fixedOptions.particles.move.speed / speedFactor,
421
- direction: fixedOptions.particles.move.direction,
422
- random: fixedOptions.particles.move.random,
423
- straight: fixedOptions.particles.move.straight,
424
- outModes: fixedOptions.particles.move.out_mode,
425
- attract: {
426
- enable: fixedOptions.particles.move.attract.enable,
427
- rotate: {
428
- x: fixedOptions.particles.move.attract.rotateX,
429
- y: fixedOptions.particles.move.attract.rotateY
430
- }
431
- }
432
- }
433
- }
434
- }
435
- });
436
- };
437
- particlesJS.load = (tagId, pathConfigJson, callback) => {
438
- engine.load({
439
- id: tagId,
440
- url: pathConfigJson
441
- }).then(container => {
442
- if (container) {
443
- callback(container);
444
- }
445
- }).catch(() => {
446
- callback(undefined);
447
- });
448
- };
449
- particlesJS.setOnClickHandler = callback => {
450
- engine.setOnClickHandler(callback);
451
- };
452
- const pJSDom = engine.dom();
453
- return {
454
- particlesJS,
455
- pJSDom
456
- };
457
- };
458
-
459
- ;// CONCATENATED MODULE: ./dist/browser/index.js
460
-
461
-
462
- const initPjs = engine => {
463
- const {
464
- particlesJS,
465
- pJSDom
466
- } = initParticlesJS(engine);
467
- window.particlesJS = particlesJS;
468
- window.pJSDom = pJSDom;
469
- window.Particles = Particles;
470
- return {
471
- particlesJS,
472
- pJSDom,
473
- Particles: Particles
474
- };
475
- };
476
-
477
- })();
478
-
139
+ /******/
140
+ /******/ // startup
141
+ /******/ // Load entry module and return exports
142
+ /******/ // This entry module can't be inlined because the eval devtool is used.
143
+ /******/ var __webpack_exports__ = __webpack_require__("./dist/browser/index.js");
144
+ /******/
479
145
  /******/ return __webpack_exports__;
480
146
  /******/ })()
481
147
  ;
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.pjs.min.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(this,(e=>(()=>{"use strict";var t={533:t=>{t.exports=e}},i={};function a(e){var n=i[e];if(void 0!==n)return n.exports;var o=i[e]={exports:{}};return t[e](o,o.exports,a),o.exports}a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{a.r(n),a.d(n,{initPjs:()=>o});var e=a(533);class t{static init(i){const a=new t,n=i.selector;if(!n)throw new Error("No selector provided");const o=document.querySelector(n);if(!o)throw new Error("No element found for selector");return e.tsParticles.load({element:o,id:n.replace(".","").replace("!",""),options:{fullScreen:{enable:!1},particles:{color:{value:i.color??"!000000"},links:{color:"random",distance:i.minDistance??120,enable:i.connectParticles??!1},move:{enable:!0,speed:i.speed??.5},number:{value:i.maxParticles??100},size:{value:{min:1,max:i.sizeVariations??3}}},responsive:i.responsive?.map((e=>({maxWidth:e.breakpoint,options:{particles:{color:{value:e.options?.color},links:{distance:e.options?.minDistance,enable:e.options?.connectParticles},number:{value:i.maxParticles},move:{enable:!0,speed:e.options?.speed},size:{value:e.options?.sizeVariations}}}})))}}).then((e=>{a._container=e})),a}destroy(){const e=this._container;e?.destroy()}pauseAnimation(){const e=this._container;e?.pause()}resumeAnimation(){const e=this._container;e?.play()}}const i={particles:{number:{value:400,density:{enable:!0,value_area:800}},color:{value:"#fff"},shape:{type:"circle",stroke:{width:0,color:"#ff0000"},polygon:{nb_sides:5},image:{src:"",width:100,height:100}},opacity:{value:1,random:!1,anim:{enable:!1,speed:2,opacity_min:0,sync:!1}},size:{value:20,random:!1,anim:{enable:!1,speed:20,size_min:0,sync:!1}},line_linked:{enable:!0,distance:100,color:"#fff",opacity:1,width:1},move:{enable:!0,speed:2,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:3e3,rotateY:3e3}}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!0,mode:"grab"},onclick:{enable:!0,mode:"push"},resize:!0},modes:{grab:{distance:100,line_linked:{opacity:1}},bubble:{distance:200,size:80,duration:.4,opacity:1,speed:3},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!1},o=a=>{const{particlesJS:n,pJSDom:o}=(t=>{const a=(a,n)=>{const o=(0,e.deepExtend)(i,n);return t.load({id:a,options:{fullScreen:{enable:!1},detectRetina:o.retina_detect,smooth:!0,interactivity:{detectsOn:o.interactivity.detect_on,events:{onHover:{enable:o.interactivity.events.onhover.enable,mode:o.interactivity.events.onhover.mode},onClick:{enable:o.interactivity.events.onclick.enable,mode:o.interactivity.events.onclick.mode},resize:{enable:o.interactivity.events.resize}},modes:{grab:{distance:o.interactivity.modes.grab.distance,links:{opacity:o.interactivity.modes.grab.line_linked.opacity}},bubble:{distance:o.interactivity.modes.bubble.distance,size:o.interactivity.modes.bubble.size,duration:o.interactivity.modes.bubble.duration,opacity:o.interactivity.modes.bubble.opacity,speed:o.interactivity.modes.bubble.speed},repulse:{distance:o.interactivity.modes.repulse.distance,duration:o.interactivity.modes.repulse.duration},push:{quantity:o.interactivity.modes.push.particles_nb},remove:{quantity:o.interactivity.modes.remove.particles_nb}}},particles:{collisions:{enable:o.particles.move.bounce},number:{value:o.particles.number.value,density:{enable:o.particles.number.density.enable,width:o.particles.number.density.value_area}},color:{value:o.particles.color.value},stroke:{width:o.particles.shape.stroke.width,color:{value:o.particles.shape.stroke.color}},shape:{type:o.particles.shape.type,options:{polygon:{sides:o.particles.shape.polygon.nb_sides},image:{src:o.particles.shape.image.src,width:o.particles.shape.image.width,height:o.particles.shape.image.height}}},opacity:{value:o.particles.opacity.random?{min:o.particles.opacity.anim.enable?o.particles.opacity.anim.opacity_min:0,max:o.particles.opacity.value}:o.particles.opacity.value,animation:{enable:o.particles.opacity.anim.enable,speed:o.particles.opacity.anim.speed,sync:o.particles.opacity.anim.sync}},size:{value:o.particles.size.random?{min:o.particles.size.anim.enable?o.particles.size.anim.size_min:0,max:o.particles.size.value}:o.particles.size.value,animation:{enable:o.particles.size.anim.enable,speed:o.particles.size.anim.speed,sync:o.particles.size.anim.sync}},links:{enable:o.particles.line_linked.enable,distance:o.particles.line_linked.distance,color:o.particles.line_linked.color,opacity:o.particles.line_linked.opacity,width:o.particles.line_linked.width},move:{enable:o.particles.move.enable,speed:o.particles.move.speed/3,direction:o.particles.move.direction,random:o.particles.move.random,straight:o.particles.move.straight,outModes:o.particles.move.out_mode,attract:{enable:o.particles.move.attract.enable,rotate:{x:o.particles.move.attract.rotateX,y:o.particles.move.attract.rotateY}}}}}})};return a.load=(e,i,a)=>{t.load({id:e,url:i}).then((e=>{e&&a(e)})).catch((()=>{a(void 0)}))},a.setOnClickHandler=e=>{t.setOnClickHandler(e)},{particlesJS:a,pJSDom:t.dom()}})(a);return window.particlesJS=n,window.pJSDom=o,window.Particles=t,{particlesJS:n,pJSDom:o,Particles:t}}})(),n})()));
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(this,(e=>(()=>{var t={533:t=>{t.exports=e}},i={};function a(e){var n=i[e];if(void 0!==n)return n.exports;var o=i[e]={exports:{}};return t[e](o,o.exports,a),o.exports}a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{a.r(n),a.d(n,{initPjs:()=>o});var e=a(533);class t{static init(i){const a=new t,n=i.selector;if(!n)throw new Error("No selector provided");const o=document.querySelector(n);if(!o)throw new Error("No element found for selector");return e.tsParticles.load({element:o,id:n.replace(".","").replace("!",""),options:{fullScreen:{enable:!1},particles:{color:{value:i.color??"!000000"},links:{color:"random",distance:i.minDistance??120,enable:i.connectParticles??!1},move:{enable:!0,speed:i.speed??.5},number:{value:i.maxParticles??100},size:{value:{min:1,max:i.sizeVariations??3}}},responsive:i.responsive?.map((e=>({maxWidth:e.breakpoint,options:{particles:{color:{value:e.options?.color},links:{distance:e.options?.minDistance,enable:e.options?.connectParticles},number:{value:i.maxParticles},move:{enable:!0,speed:e.options?.speed},size:{value:e.options?.sizeVariations}}}})))}}).then((e=>{a._container=e})),a}destroy(){const e=this._container;e?.destroy()}pauseAnimation(){const e=this._container;e?.pause()}resumeAnimation(){const e=this._container;e?.play()}}const i={particles:{number:{value:400,density:{enable:!0,value_area:800}},color:{value:"#fff"},shape:{type:"circle",stroke:{width:0,color:"#ff0000"},polygon:{nb_sides:5},image:{src:"",width:100,height:100}},opacity:{value:1,random:!1,anim:{enable:!1,speed:2,opacity_min:0,sync:!1}},size:{value:20,random:!1,anim:{enable:!1,speed:20,size_min:0,sync:!1}},line_linked:{enable:!0,distance:100,color:"#fff",opacity:1,width:1},move:{enable:!0,speed:2,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:3e3,rotateY:3e3}}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!0,mode:"grab"},onclick:{enable:!0,mode:"push"},resize:!0},modes:{grab:{distance:100,line_linked:{opacity:1}},bubble:{distance:200,size:80,duration:.4,opacity:1,speed:3},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!1},o=a=>{const{particlesJS:n,pJSDom:o}=(t=>{const a=(a,n)=>{const o=(0,e.deepExtend)(i,n);return t.load({id:a,options:{fullScreen:{enable:!1},detectRetina:o.retina_detect,smooth:!0,interactivity:{detectsOn:o.interactivity.detect_on,events:{onHover:{enable:o.interactivity.events.onhover.enable,mode:o.interactivity.events.onhover.mode},onClick:{enable:o.interactivity.events.onclick.enable,mode:o.interactivity.events.onclick.mode},resize:{enable:o.interactivity.events.resize}},modes:{grab:{distance:o.interactivity.modes.grab.distance,links:{opacity:o.interactivity.modes.grab.line_linked.opacity}},bubble:{distance:o.interactivity.modes.bubble.distance,size:o.interactivity.modes.bubble.size,duration:o.interactivity.modes.bubble.duration,opacity:o.interactivity.modes.bubble.opacity,speed:o.interactivity.modes.bubble.speed},repulse:{distance:o.interactivity.modes.repulse.distance,duration:o.interactivity.modes.repulse.duration},push:{quantity:o.interactivity.modes.push.particles_nb},remove:{quantity:o.interactivity.modes.remove.particles_nb}}},particles:{collisions:{enable:o.particles.move.bounce},number:{value:o.particles.number.value,density:{enable:o.particles.number.density.enable,width:o.particles.number.density.value_area}},color:{value:o.particles.color.value},stroke:{width:o.particles.shape.stroke.width,color:{value:o.particles.shape.stroke.color}},shape:{type:o.particles.shape.type,options:{polygon:{sides:o.particles.shape.polygon.nb_sides},image:{src:o.particles.shape.image.src,width:o.particles.shape.image.width,height:o.particles.shape.image.height}}},opacity:{value:o.particles.opacity.random?{min:o.particles.opacity.anim.enable?o.particles.opacity.anim.opacity_min:0,max:o.particles.opacity.value}:o.particles.opacity.value,animation:{enable:o.particles.opacity.anim.enable,speed:o.particles.opacity.anim.speed,sync:o.particles.opacity.anim.sync}},size:{value:o.particles.size.random?{min:o.particles.size.anim.enable?o.particles.size.anim.size_min:0,max:o.particles.size.value}:o.particles.size.value,animation:{enable:o.particles.size.anim.enable,speed:o.particles.size.anim.speed,sync:o.particles.size.anim.sync}},links:{enable:o.particles.line_linked.enable,distance:o.particles.line_linked.distance,color:o.particles.line_linked.color,opacity:o.particles.line_linked.opacity,width:o.particles.line_linked.width},move:{enable:o.particles.move.enable,speed:o.particles.move.speed/3,direction:o.particles.move.direction,random:o.particles.move.random,straight:o.particles.move.straight,outModes:o.particles.move.out_mode,attract:{enable:o.particles.move.attract.enable,rotate:{x:o.particles.move.attract.rotateX,y:o.particles.move.attract.rotateY}}}}}})};return a.load=(e,i,a)=>{t.load({id:e,url:i}).then((e=>{e&&a(e)})).catch((()=>{a(void 0)}))},a.setOnClickHandler=e=>{t.setOnClickHandler(e)},{particlesJS:a,pJSDom:t.dom()}})(a);return window.particlesJS=n,window.pJSDom=o,window.Particles=t,{particlesJS:n,pJSDom:o,Particles:t}}})(),n})()));
@@ -1 +1 @@
1
- /*! tsParticles Particles.js v3.1.0 by Matteo Bruni */
1
+ /*! tsParticles Particles.js v3.2.0 by Matteo Bruni */