@tsparticles/pjs 4.0.0-beta.9 → 4.0.1
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/README.md +88 -20
- package/browser/browser.js +5 -0
- package/browser/bundle.js +4 -0
- package/browser/index.js +4 -7
- package/browser/index.lazy.js +18 -0
- package/cjs/browser.js +5 -0
- package/cjs/bundle.js +4 -0
- package/cjs/index.js +4 -7
- package/cjs/index.lazy.js +18 -0
- package/esm/browser.js +5 -0
- package/esm/bundle.js +4 -0
- package/esm/index.js +4 -7
- package/esm/index.lazy.js +18 -0
- package/package.json +4 -4
- package/report.html +4949 -94
- package/tsparticles.pjs.bundle.js +14911 -977
- package/tsparticles.pjs.bundle.min.js +1 -2
- package/tsparticles.pjs.js +376 -186
- package/tsparticles.pjs.min.js +1 -1
- package/types/browser.d.ts +1 -0
- package/types/index.lazy.d.ts +8 -0
- package/types/marcbruederlin/Particles.d.ts +2 -3
- package/1241.min.js +0 -1
- package/1441.min.js +0 -2
- package/1521.min.js +0 -1
- package/1523.min.js +0 -1
- package/1581.min.js +0 -1
- package/1583.min.js +0 -1
- package/1680.min.js +0 -1
- package/1684.min.js +0 -1
- package/1712.min.js +0 -1
- package/1723.min.js +0 -1
- package/175.min.js +0 -1
- package/1807.min.js +0 -1
- package/1879.min.js +0 -1
- package/1887.min.js +0 -1
- package/1924.min.js +0 -1
- package/2049.min.js +0 -1
- package/2066.min.js +0 -1
- package/2127.min.js +0 -1
- package/2191.min.js +0 -1
- package/2270.min.js +0 -1
- package/2319.min.js +0 -1
- package/2344.min.js +0 -1
- package/2438.min.js +0 -1
- package/2556.min.js +0 -1
- package/2575.min.js +0 -1
- package/2602.min.js +0 -1
- package/2631.min.js +0 -1
- package/2697.min.js +0 -1
- package/2760.min.js +0 -1
- package/2827.min.js +0 -1
- package/3047.min.js +0 -1
- package/3073.min.js +0 -1
- package/3376.min.js +0 -1
- package/3384.min.js +0 -1
- package/3443.min.js +0 -1
- package/3544.min.js +0 -1
- package/3583.min.js +0 -1
- package/3683.min.js +0 -2
- package/3685.min.js +0 -1
- package/3729.min.js +0 -1
- package/374.min.js +0 -1
- package/382.min.js +0 -1
- package/4.min.js +0 -1
- package/4067.min.js +0 -1
- package/4068.min.js +0 -1
- package/4077.min.js +0 -1
- package/4086.min.js +0 -1
- package/4153.min.js +0 -1
- package/4186.min.js +0 -1
- package/4217.min.js +0 -1
- package/4291.min.js +0 -1
- package/4427.min.js +0 -1
- package/4519.min.js +0 -1
- package/4568.min.js +0 -1
- package/4582.min.js +0 -1
- package/4626.min.js +0 -1
- package/4657.min.js +0 -1
- package/4862.min.js +0 -1
- package/4912.min.js +0 -1
- package/5048.min.js +0 -1
- package/5162.min.js +0 -1
- package/5294.min.js +0 -1
- package/5344.min.js +0 -1
- package/5406.min.js +0 -1
- package/541.min.js +0 -1
- package/5445.min.js +0 -1
- package/5629.min.js +0 -1
- package/5757.min.js +0 -1
- package/5936.min.js +0 -1
- package/6055.min.js +0 -1
- package/6099.min.js +0 -1
- package/6171.min.js +0 -1
- package/6192.min.js +0 -1
- package/6207.min.js +0 -1
- package/6281.min.js +0 -1
- package/6379.min.js +0 -1
- package/6380.min.js +0 -1
- package/6420.min.js +0 -1
- package/6466.min.js +0 -1
- package/6477.min.js +0 -1
- package/648.min.js +0 -1
- package/6549.min.js +0 -1
- package/6704.min.js +0 -1
- package/6715.min.js +0 -1
- package/6798.min.js +0 -1
- package/6943.min.js +0 -1
- package/6972.min.js +0 -1
- package/6996.min.js +0 -1
- package/7162.min.js +0 -1
- package/7175.min.js +0 -1
- package/7213.min.js +0 -1
- package/7259.min.js +0 -1
- package/7316.min.js +0 -1
- package/7563.min.js +0 -1
- package/7711.min.js +0 -1
- package/7757.min.js +0 -1
- package/7775.min.js +0 -1
- package/7792.min.js +0 -1
- package/7912.min.js +0 -1
- package/805.min.js +0 -1
- package/8161.min.js +0 -1
- package/8192.min.js +0 -1
- package/8292.min.js +0 -1
- package/8331.min.js +0 -1
- package/8386.min.js +0 -1
- package/8459.min.js +0 -1
- package/8523.min.js +0 -1
- package/8607.min.js +0 -1
- package/8656.min.js +0 -1
- package/8731.min.js +0 -1
- package/8855.min.js +0 -1
- package/9007.min.js +0 -1
- package/9154.min.js +0 -1
- package/9407.min.js +0 -1
- package/9434.min.js +0 -1
- package/9470.min.js +0 -1
- package/9618.min.js +0 -1
- package/9674.min.js +0 -1
- package/9726.min.js +0 -1
- package/9835.min.js +0 -1
- package/9907.min.js +0 -1
- package/basic_dist_browser_index_js.js +0 -30
- package/engine_dist_browser_Core_Container_js.js +0 -100
- package/full_dist_browser_index_js.js +0 -30
- package/interactions_external_attract_dist_browser_Attractor_js.js +0 -140
- package/interactions_external_attract_dist_browser_index_js.js +0 -40
- package/interactions_external_bounce_dist_browser_Bouncer_js.js +0 -140
- package/interactions_external_bounce_dist_browser_index_js.js +0 -40
- package/interactions_external_bubble_dist_browser_Bubbler_js.js +0 -150
- package/interactions_external_bubble_dist_browser_index_js.js +0 -60
- package/interactions_external_connect_dist_browser_Connector_js.js +0 -160
- package/interactions_external_connect_dist_browser_index_js.js +0 -50
- package/interactions_external_drag_dist_browser_Dragger_js.js +0 -130
- package/interactions_external_drag_dist_browser_index_js.js +0 -40
- package/interactions_external_grab_dist_browser_Grabber_js.js +0 -160
- package/interactions_external_grab_dist_browser_index_js.js +0 -50
- package/interactions_external_parallax_dist_browser_Parallaxer_js.js +0 -130
- package/interactions_external_parallax_dist_browser_index_js.js +0 -40
- package/interactions_external_pause_dist_browser_Pauser_js.js +0 -130
- package/interactions_external_pause_dist_browser_index_js.js +0 -30
- package/interactions_external_push_dist_browser_Pusher_js.js +0 -130
- package/interactions_external_push_dist_browser_index_js.js +0 -40
- package/interactions_external_remove_dist_browser_Remover_js.js +0 -130
- package/interactions_external_remove_dist_browser_index_js.js +0 -40
- package/interactions_external_repulse_dist_browser_Repulser_js.js +0 -130
- package/interactions_external_repulse_dist_browser_index_js.js +0 -60
- package/interactions_external_slow_dist_browser_Slower_js.js +0 -130
- package/interactions_external_slow_dist_browser_index_js.js +0 -40
- package/interactions_external_trail_dist_browser_TrailMaker_js.js +0 -130
- package/interactions_external_trail_dist_browser_index_js.js +0 -70
- package/interactions_particles_attract_dist_browser_Attractor_js.js +0 -140
- package/interactions_particles_attract_dist_browser_index_js.js +0 -30
- package/interactions_particles_collisions_dist_browser_Collider_js.js +0 -210
- package/interactions_particles_collisions_dist_browser_OverlapPluginInstance_js.js +0 -30
- package/interactions_particles_collisions_dist_browser_OverlapPlugin_js.js +0 -30
- package/interactions_particles_collisions_dist_browser_index_js.js +0 -30
- package/interactions_particles_links_dist_browser_LinkInstance_js.js +0 -40
- package/interactions_particles_links_dist_browser_Linker_js.js +0 -140
- package/interactions_particles_links_dist_browser_LinksPlugin_js.js +0 -30
- package/interactions_particles_links_dist_browser_index_js.js +0 -60
- package/plugins_absorbers_dist_browser_AbsorberInstance_js.js +0 -70
- package/plugins_absorbers_dist_browser_AbsorbersInstancesManager_js.js +0 -30
- package/plugins_absorbers_dist_browser_AbsorbersInteractor_js.js +0 -170
- package/plugins_absorbers_dist_browser_AbsorbersPluginInstance_js.js +0 -30
- package/plugins_absorbers_dist_browser_AbsorbersPlugin_js.js +0 -70
- package/plugins_absorbers_dist_browser_getAbsorbersInstancesManager_js.js +0 -30
- package/plugins_absorbers_dist_browser_index_js.js +0 -50
- package/plugins_colors_hex_dist_browser_HexColorManager_js.js +0 -30
- package/plugins_colors_hex_dist_browser_index_js.js +0 -30
- package/plugins_colors_hsl_dist_browser_HslColorManager_js.js +0 -30
- package/plugins_colors_hsl_dist_browser_index_js.js +0 -30
- package/plugins_colors_rgb_dist_browser_RgbColorManager_js.js +0 -30
- package/plugins_colors_rgb_dist_browser_index_js.js +0 -30
- package/plugins_easings_quad_dist_browser_easingsFunctions_js.js +0 -30
- package/plugins_easings_quad_dist_browser_index_js.js +0 -30
- package/plugins_emittersShapes_circle_dist_browser_EmittersCircleShapeGenerator_js.js +0 -100
- package/plugins_emittersShapes_circle_dist_browser_index_js.js +0 -30
- package/plugins_emittersShapes_square_dist_browser_EmittersSquareShapeGenerator_js.js +0 -100
- package/plugins_emittersShapes_square_dist_browser_index_js.js +0 -30
- package/plugins_emitters_dist_browser_EmitterInstance_js.js +0 -30
- package/plugins_emitters_dist_browser_EmittersInstancesManager_js.js +0 -100
- package/plugins_emitters_dist_browser_EmittersInteractor_js.js +0 -210
- package/plugins_emitters_dist_browser_EmittersPluginInstance_js.js +0 -30
- package/plugins_emitters_dist_browser_EmittersPlugin_js.js +0 -100
- package/plugins_emitters_dist_browser_ShapeManager_js.js +0 -30
- package/plugins_emitters_dist_browser_addEmittersShapesManager_js.js +0 -30
- package/plugins_emitters_dist_browser_getEmittersInstancesManager_js.js +0 -30
- package/plugins_emitters_dist_browser_index_js.js +0 -80
- package/plugins_interactivity_dist_browser_InteractivityPluginInstance_js.js +0 -50
- package/plugins_interactivity_dist_browser_InteractivityPlugin_js.js +0 -70
- package/plugins_interactivity_dist_browser_index_js.js +0 -120
- package/plugins_move_dist_browser_MovePluginInstance_js.js +0 -40
- package/plugins_move_dist_browser_MovePlugin_js.js +0 -30
- package/plugins_move_dist_browser_index_js.js +0 -30
- package/plugins_responsive_dist_browser_ResponsivePluginInstance_js.js +0 -30
- package/plugins_responsive_dist_browser_ResponsivePlugin_js.js +0 -50
- package/plugins_responsive_dist_browser_index_js.js +0 -30
- package/shapes_circle_dist_browser_CircleDrawer_js.js +0 -40
- package/shapes_circle_dist_browser_index_js.js +0 -30
- package/shapes_emoji_dist_browser_EmojiDrawer_js.js +0 -50
- package/shapes_emoji_dist_browser_index_js.js +0 -40
- package/shapes_image_dist_browser_GifUtils_Utils_js.js +0 -70
- package/shapes_image_dist_browser_ImageDrawer_js.js +0 -30
- package/shapes_image_dist_browser_ImagePreloaderInstance_js.js +0 -30
- package/shapes_image_dist_browser_ImagePreloader_js.js +0 -40
- package/shapes_image_dist_browser_index_js.js +0 -40
- package/shapes_line_dist_browser_LineDrawer_js.js +0 -40
- package/shapes_line_dist_browser_index_js.js +0 -30
- package/shapes_polygon_dist_browser_PolygonDrawer_js.js +0 -50
- package/shapes_polygon_dist_browser_TriangleDrawer_js.js +0 -50
- package/shapes_polygon_dist_browser_index_js.js +0 -30
- package/shapes_square_dist_browser_SquareDrawer_js.js +0 -40
- package/shapes_square_dist_browser_index_js.js +0 -30
- package/shapes_star_dist_browser_StarDrawer_js.js +0 -40
- package/shapes_star_dist_browser_index_js.js +0 -30
- package/shapes_text_dist_browser_TextDrawer_js.js +0 -50
- package/shapes_text_dist_browser_index_js.js +0 -40
- package/slim_dist_browser_index_js.js +0 -30
- package/updaters_destroy_dist_browser_DestroyUpdater_js.js +0 -100
- package/updaters_destroy_dist_browser_index_js.js +0 -30
- package/updaters_fillColor_dist_browser_FillColorUpdater_js.js +0 -30
- package/updaters_fillColor_dist_browser_index_js.js +0 -30
- package/updaters_life_dist_browser_LifeUpdater_js.js +0 -70
- package/updaters_life_dist_browser_index_js.js +0 -30
- package/updaters_opacity_dist_browser_OpacityUpdater_js.js +0 -30
- package/updaters_opacity_dist_browser_index_js.js +0 -30
- package/updaters_outModes_dist_browser_OutOfCanvasUpdater_js.js +0 -80
- package/updaters_outModes_dist_browser_index_js.js +0 -30
- package/updaters_roll_dist_browser_RollUpdater_js.js +0 -70
- package/updaters_roll_dist_browser_index_js.js +0 -30
- package/updaters_rotate_dist_browser_RotateUpdater_js.js +0 -50
- package/updaters_rotate_dist_browser_index_js.js +0 -30
- package/updaters_size_dist_browser_SizeUpdater_js.js +0 -30
- package/updaters_size_dist_browser_index_js.js +0 -30
- package/updaters_strokeColor_dist_browser_StrokeColorUpdater_js.js +0 -30
- package/updaters_strokeColor_dist_browser_index_js.js +0 -30
- package/updaters_tilt_dist_browser_TiltUpdater_js.js +0 -60
- package/updaters_tilt_dist_browser_index_js.js +0 -30
- package/updaters_twinkle_dist_browser_TwinkleUpdater_js.js +0 -60
- package/updaters_twinkle_dist_browser_index_js.js +0 -30
- package/updaters_wobble_dist_browser_WobbleUpdater_js.js +0 -60
- package/updaters_wobble_dist_browser_index_js.js +0 -30
package/tsparticles.pjs.js
CHANGED
|
@@ -1,192 +1,382 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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/).
|
|
16
|
-
*/
|
|
17
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
18
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
19
|
-
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/plugin-responsive"), require("tsparticles"));
|
|
20
|
-
else if(typeof define === 'function' && define.amd)
|
|
21
|
-
define(["@tsparticles/engine", "@tsparticles/plugin-responsive", "tsparticles"], factory);
|
|
22
|
-
else {
|
|
23
|
-
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/plugin-responsive"), require("tsparticles")) : factory(root["window"], root["window"], root["window"]);
|
|
24
|
-
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
25
|
-
}
|
|
26
|
-
})(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_responsive__, __WEBPACK_EXTERNAL_MODULE_tsparticles__) => {
|
|
27
|
-
return /******/ (() => { // webpackBootstrap
|
|
28
|
-
/******/ "use strict";
|
|
29
|
-
/******/ var __webpack_modules__ = ({
|
|
1
|
+
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
|
+
/* tsParticles v4.0.1 */
|
|
3
|
+
(function (global, factory) {
|
|
4
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/engine'), require('tsparticles'), require('@tsparticles/plugin-responsive')) :
|
|
5
|
+
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/engine', 'tsparticles', '@tsparticles/plugin-responsive'], factory) :
|
|
6
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.__tsParticlesInternals = global.__tsParticlesInternals || {}, global.__tsParticlesInternals.bundles = global.__tsParticlesInternals.bundles || {}, global.__tsParticlesInternals.bundles.pjs = global.__tsParticlesInternals.bundles.pjs || {}), global.__tsParticlesInternals.engine, global.__tsParticlesInternals.bundles.full, global.__tsParticlesInternals.plugins.responsive));
|
|
7
|
+
})(this, (function (exports, engine, tsparticles, pluginResponsive) { 'use strict';
|
|
30
8
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
(
|
|
9
|
+
const linksMinDistance = 120, moveMinSpeed = 0.5, particlesMinCount = 100, sizeMinValue = 3;
|
|
10
|
+
class MBParticles {
|
|
11
|
+
_container;
|
|
12
|
+
static init(options) {
|
|
13
|
+
const particles = new MBParticles(), selector = options.selector;
|
|
14
|
+
if (!selector) {
|
|
15
|
+
throw new Error("No selector provided");
|
|
16
|
+
}
|
|
17
|
+
const el = engine.safeDocument().querySelector(selector);
|
|
18
|
+
if (!el) {
|
|
19
|
+
throw new Error("No element found for selector");
|
|
20
|
+
}
|
|
21
|
+
void (async (engine) => {
|
|
22
|
+
await engine
|
|
23
|
+
.load({
|
|
24
|
+
element: el,
|
|
25
|
+
id: selector.replace(".", "").replace("!", ""),
|
|
26
|
+
options: {
|
|
27
|
+
fullScreen: {
|
|
28
|
+
enable: false,
|
|
29
|
+
},
|
|
30
|
+
particles: {
|
|
31
|
+
color: {
|
|
32
|
+
value: options.color ?? "!000000",
|
|
33
|
+
},
|
|
34
|
+
links: {
|
|
35
|
+
color: "random",
|
|
36
|
+
distance: options.minDistance ?? linksMinDistance,
|
|
37
|
+
enable: options.connectParticles ?? false,
|
|
38
|
+
},
|
|
39
|
+
move: {
|
|
40
|
+
enable: true,
|
|
41
|
+
speed: options.speed ?? moveMinSpeed,
|
|
42
|
+
},
|
|
43
|
+
number: {
|
|
44
|
+
value: options.maxParticles ?? particlesMinCount,
|
|
45
|
+
},
|
|
46
|
+
size: {
|
|
47
|
+
value: { min: 1, max: options.sizeVariations ?? sizeMinValue },
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
responsive: options.responsive?.map(responsive => ({
|
|
51
|
+
maxWidth: responsive.breakpoint,
|
|
52
|
+
options: {
|
|
53
|
+
particles: {
|
|
54
|
+
color: {
|
|
55
|
+
value: responsive.options?.color,
|
|
56
|
+
},
|
|
57
|
+
links: {
|
|
58
|
+
distance: responsive.options?.minDistance,
|
|
59
|
+
enable: responsive.options?.connectParticles,
|
|
60
|
+
},
|
|
61
|
+
number: {
|
|
62
|
+
value: options.maxParticles,
|
|
63
|
+
},
|
|
64
|
+
move: {
|
|
65
|
+
enable: true,
|
|
66
|
+
speed: responsive.options?.speed,
|
|
67
|
+
},
|
|
68
|
+
size: {
|
|
69
|
+
value: responsive.options?.sizeVariations,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
})),
|
|
74
|
+
},
|
|
75
|
+
})
|
|
76
|
+
.then(container => {
|
|
77
|
+
particles._container = container;
|
|
78
|
+
});
|
|
79
|
+
})(engine.tsParticles);
|
|
80
|
+
return particles;
|
|
81
|
+
}
|
|
82
|
+
destroy() {
|
|
83
|
+
const container = this._container;
|
|
84
|
+
container?.destroy();
|
|
85
|
+
}
|
|
86
|
+
pauseAnimation() {
|
|
87
|
+
const container = this._container;
|
|
88
|
+
container?.pause();
|
|
89
|
+
}
|
|
90
|
+
resumeAnimation() {
|
|
91
|
+
const container = this._container;
|
|
92
|
+
container?.play();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
36
95
|
|
|
37
|
-
|
|
96
|
+
const defaultMinOpacity = 0, defaultMinSize = 0, speedFactor = 3, defaultPjsOptions = {
|
|
97
|
+
particles: {
|
|
98
|
+
number: {
|
|
99
|
+
value: 400,
|
|
100
|
+
density: {
|
|
101
|
+
enable: true,
|
|
102
|
+
value_area: 800,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
color: {
|
|
106
|
+
value: "#fff",
|
|
107
|
+
},
|
|
108
|
+
shape: {
|
|
109
|
+
type: "circle",
|
|
110
|
+
stroke: {
|
|
111
|
+
width: 0,
|
|
112
|
+
color: "#ff0000",
|
|
113
|
+
},
|
|
114
|
+
polygon: {
|
|
115
|
+
nb_sides: 5,
|
|
116
|
+
},
|
|
117
|
+
image: {
|
|
118
|
+
src: "",
|
|
119
|
+
width: 100,
|
|
120
|
+
height: 100,
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
opacity: {
|
|
124
|
+
value: 1,
|
|
125
|
+
random: false,
|
|
126
|
+
anim: {
|
|
127
|
+
enable: false,
|
|
128
|
+
speed: 2,
|
|
129
|
+
opacity_min: 0,
|
|
130
|
+
sync: false,
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
size: {
|
|
134
|
+
value: 20,
|
|
135
|
+
random: false,
|
|
136
|
+
anim: {
|
|
137
|
+
enable: false,
|
|
138
|
+
speed: 20,
|
|
139
|
+
size_min: 0,
|
|
140
|
+
sync: false,
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
line_linked: {
|
|
144
|
+
enable: true,
|
|
145
|
+
distance: 100,
|
|
146
|
+
color: "#fff",
|
|
147
|
+
opacity: 1,
|
|
148
|
+
width: 1,
|
|
149
|
+
},
|
|
150
|
+
move: {
|
|
151
|
+
enable: true,
|
|
152
|
+
speed: 2,
|
|
153
|
+
direction: "none",
|
|
154
|
+
random: false,
|
|
155
|
+
straight: false,
|
|
156
|
+
out_mode: "out",
|
|
157
|
+
bounce: false,
|
|
158
|
+
attract: {
|
|
159
|
+
enable: false,
|
|
160
|
+
rotateX: 3000,
|
|
161
|
+
rotateY: 3000,
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
interactivity: {
|
|
166
|
+
detect_on: "canvas",
|
|
167
|
+
events: {
|
|
168
|
+
onhover: {
|
|
169
|
+
enable: true,
|
|
170
|
+
mode: "grab",
|
|
171
|
+
},
|
|
172
|
+
onclick: {
|
|
173
|
+
enable: true,
|
|
174
|
+
mode: "push",
|
|
175
|
+
},
|
|
176
|
+
resize: true,
|
|
177
|
+
},
|
|
178
|
+
modes: {
|
|
179
|
+
grab: {
|
|
180
|
+
distance: 100,
|
|
181
|
+
line_linked: {
|
|
182
|
+
opacity: 1,
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
bubble: {
|
|
186
|
+
distance: 200,
|
|
187
|
+
size: 80,
|
|
188
|
+
duration: 0.4,
|
|
189
|
+
opacity: 1,
|
|
190
|
+
speed: 3,
|
|
191
|
+
},
|
|
192
|
+
repulse: {
|
|
193
|
+
distance: 200,
|
|
194
|
+
duration: 0.4,
|
|
195
|
+
},
|
|
196
|
+
push: {
|
|
197
|
+
particles_nb: 4,
|
|
198
|
+
},
|
|
199
|
+
remove: {
|
|
200
|
+
particles_nb: 2,
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
retina_detect: false,
|
|
205
|
+
}, initParticlesJS = (engine$1) => {
|
|
206
|
+
const particlesJS = async (tagId, options) => {
|
|
207
|
+
const fixedOptions = engine.deepExtend({}, defaultPjsOptions, options);
|
|
208
|
+
return await engine$1.load({
|
|
209
|
+
id: tagId,
|
|
210
|
+
options: {
|
|
211
|
+
fullScreen: {
|
|
212
|
+
enable: false,
|
|
213
|
+
},
|
|
214
|
+
detectRetina: fixedOptions.retina_detect,
|
|
215
|
+
smooth: true,
|
|
216
|
+
interactivity: {
|
|
217
|
+
detectsOn: fixedOptions.interactivity.detect_on,
|
|
218
|
+
events: {
|
|
219
|
+
onHover: {
|
|
220
|
+
enable: fixedOptions.interactivity.events.onhover.enable,
|
|
221
|
+
mode: fixedOptions.interactivity.events.onhover.mode,
|
|
222
|
+
},
|
|
223
|
+
onClick: {
|
|
224
|
+
enable: fixedOptions.interactivity.events.onclick.enable,
|
|
225
|
+
mode: fixedOptions.interactivity.events.onclick.mode,
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
modes: {
|
|
229
|
+
grab: {
|
|
230
|
+
distance: fixedOptions.interactivity.modes.grab.distance,
|
|
231
|
+
links: {
|
|
232
|
+
opacity: fixedOptions.interactivity.modes.grab.line_linked.opacity,
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
bubble: {
|
|
236
|
+
distance: fixedOptions.interactivity.modes.bubble.distance,
|
|
237
|
+
size: fixedOptions.interactivity.modes.bubble.size,
|
|
238
|
+
duration: fixedOptions.interactivity.modes.bubble.duration,
|
|
239
|
+
opacity: fixedOptions.interactivity.modes.bubble.opacity,
|
|
240
|
+
speed: fixedOptions.interactivity.modes.bubble.speed,
|
|
241
|
+
},
|
|
242
|
+
repulse: {
|
|
243
|
+
distance: fixedOptions.interactivity.modes.repulse.distance,
|
|
244
|
+
duration: fixedOptions.interactivity.modes.repulse.duration,
|
|
245
|
+
},
|
|
246
|
+
push: {
|
|
247
|
+
quantity: fixedOptions.interactivity.modes.push.particles_nb,
|
|
248
|
+
},
|
|
249
|
+
remove: {
|
|
250
|
+
quantity: fixedOptions.interactivity.modes.remove.particles_nb,
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
particles: {
|
|
255
|
+
attract: {
|
|
256
|
+
enable: fixedOptions.particles.move.attract.enable,
|
|
257
|
+
rotate: {
|
|
258
|
+
x: fixedOptions.particles.move.attract.rotateX,
|
|
259
|
+
y: fixedOptions.particles.move.attract.rotateY,
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
collisions: {
|
|
263
|
+
enable: fixedOptions.particles.move.bounce,
|
|
264
|
+
},
|
|
265
|
+
number: {
|
|
266
|
+
value: fixedOptions.particles.number.value,
|
|
267
|
+
density: {
|
|
268
|
+
enable: fixedOptions.particles.number.density.enable,
|
|
269
|
+
width: fixedOptions.particles.number.density.value_area,
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
color: {
|
|
273
|
+
value: fixedOptions.particles.color.value,
|
|
274
|
+
},
|
|
275
|
+
stroke: {
|
|
276
|
+
width: fixedOptions.particles.shape.stroke.width,
|
|
277
|
+
color: {
|
|
278
|
+
value: fixedOptions.particles.shape.stroke.color,
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
shape: {
|
|
282
|
+
type: fixedOptions.particles.shape.type,
|
|
283
|
+
options: {
|
|
284
|
+
polygon: {
|
|
285
|
+
sides: fixedOptions.particles.shape.polygon.nb_sides,
|
|
286
|
+
},
|
|
287
|
+
image: {
|
|
288
|
+
src: fixedOptions.particles.shape.image.src,
|
|
289
|
+
width: fixedOptions.particles.shape.image.width,
|
|
290
|
+
height: fixedOptions.particles.shape.image.height,
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
opacity: {
|
|
295
|
+
value: fixedOptions.particles.opacity.random
|
|
296
|
+
? {
|
|
297
|
+
min: fixedOptions.particles.opacity.anim.enable
|
|
298
|
+
? fixedOptions.particles.opacity.anim.opacity_min
|
|
299
|
+
: defaultMinOpacity,
|
|
300
|
+
max: fixedOptions.particles.opacity.value,
|
|
301
|
+
}
|
|
302
|
+
: fixedOptions.particles.opacity.value,
|
|
303
|
+
animation: {
|
|
304
|
+
enable: fixedOptions.particles.opacity.anim.enable,
|
|
305
|
+
speed: fixedOptions.particles.opacity.anim.speed,
|
|
306
|
+
sync: fixedOptions.particles.opacity.anim.sync,
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
size: {
|
|
310
|
+
value: fixedOptions.particles.size.random
|
|
311
|
+
? {
|
|
312
|
+
min: fixedOptions.particles.size.anim.enable
|
|
313
|
+
? fixedOptions.particles.size.anim.size_min
|
|
314
|
+
: defaultMinSize,
|
|
315
|
+
max: fixedOptions.particles.size.value,
|
|
316
|
+
}
|
|
317
|
+
: fixedOptions.particles.size.value,
|
|
318
|
+
animation: {
|
|
319
|
+
enable: fixedOptions.particles.size.anim.enable,
|
|
320
|
+
speed: fixedOptions.particles.size.anim.speed,
|
|
321
|
+
sync: fixedOptions.particles.size.anim.sync,
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
links: {
|
|
325
|
+
enable: fixedOptions.particles.line_linked.enable,
|
|
326
|
+
distance: fixedOptions.particles.line_linked.distance,
|
|
327
|
+
color: fixedOptions.particles.line_linked.color,
|
|
328
|
+
opacity: fixedOptions.particles.line_linked.opacity,
|
|
329
|
+
width: fixedOptions.particles.line_linked.width,
|
|
330
|
+
},
|
|
331
|
+
move: {
|
|
332
|
+
enable: fixedOptions.particles.move.enable,
|
|
333
|
+
speed: fixedOptions.particles.move.speed / speedFactor,
|
|
334
|
+
direction: fixedOptions.particles.move.direction,
|
|
335
|
+
random: fixedOptions.particles.move.random,
|
|
336
|
+
straight: fixedOptions.particles.move.straight,
|
|
337
|
+
outModes: fixedOptions.particles.move.out_mode,
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
resize: {
|
|
341
|
+
enable: fixedOptions.interactivity.events.resize,
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
});
|
|
345
|
+
};
|
|
346
|
+
particlesJS.load = (tagId, pathConfigJson, callback) => {
|
|
347
|
+
engine$1
|
|
348
|
+
.load({ id: tagId, url: pathConfigJson })
|
|
349
|
+
.then(container => {
|
|
350
|
+
callback(container);
|
|
351
|
+
})
|
|
352
|
+
.catch(() => {
|
|
353
|
+
callback(undefined);
|
|
354
|
+
});
|
|
355
|
+
};
|
|
356
|
+
particlesJS.setOnClickHandler = (callback) => {
|
|
357
|
+
engine$1.pluginManager.setOnClickHandler?.(callback);
|
|
358
|
+
};
|
|
359
|
+
const pJSDom = engine$1.items;
|
|
360
|
+
return { particlesJS, pJSDom };
|
|
361
|
+
};
|
|
38
362
|
|
|
39
|
-
|
|
363
|
+
const initPjs = async (engine) => {
|
|
364
|
+
engine.checkVersion("4.0.1");
|
|
365
|
+
await engine.pluginManager.register(async (e) => {
|
|
366
|
+
await Promise.all([tsparticles.loadFull(e), pluginResponsive.loadResponsivePlugin(e)]);
|
|
367
|
+
});
|
|
368
|
+
const { particlesJS, pJSDom } = initParticlesJS(engine);
|
|
369
|
+
globalThis.particlesJS = particlesJS;
|
|
370
|
+
globalThis.pJSDom = pJSDom;
|
|
371
|
+
globalThis.Particles = MBParticles;
|
|
372
|
+
};
|
|
40
373
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
\******************************************************************************************************************************************************************/
|
|
45
|
-
(module) {
|
|
374
|
+
const globalObject = globalThis;
|
|
375
|
+
globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
|
|
376
|
+
globalObject.initPjs = initPjs;
|
|
46
377
|
|
|
47
|
-
|
|
378
|
+
exports.initPjs = initPjs;
|
|
48
379
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/*!*********************************************************************************************************!*\
|
|
53
|
-
!*** external {"commonjs":"tsparticles","commonjs2":"tsparticles","amd":"tsparticles","root":"window"} ***!
|
|
54
|
-
\*********************************************************************************************************/
|
|
55
|
-
(module) {
|
|
56
|
-
|
|
57
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_tsparticles__;
|
|
58
|
-
|
|
59
|
-
/***/ },
|
|
60
|
-
|
|
61
|
-
/***/ "./dist/browser/VincentGarreau/particles.js"
|
|
62
|
-
/*!**************************************************!*\
|
|
63
|
-
!*** ./dist/browser/VincentGarreau/particles.js ***!
|
|
64
|
-
\**************************************************/
|
|
65
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
66
|
-
|
|
67
|
-
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\nconst defaultMinOpacity = 0, defaultMinSize = 0, speedFactor = 3, 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}, initParticlesJS = (engine)=>{\n const particlesJS = async (tagId, options)=>{\n const fixedOptions = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, defaultPjsOptions, options);\n return await 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 },\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 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 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 }\n },\n resize: {\n enable: fixedOptions.interactivity.events.resize\n }\n }\n });\n };\n particlesJS.load = (tagId, pathConfigJson, callback)=>{\n engine.load({\n id: tagId,\n url: pathConfigJson\n }).then((container)=>{\n callback(container);\n }).catch(()=>{\n callback(undefined);\n });\n };\n particlesJS.setOnClickHandler = (callback)=>{\n engine.pluginManager.setOnClickHandler?.(callback);\n };\n const pJSDom = engine.items;\n return {\n particlesJS,\n pJSDom\n };\n};\n\n\n\n//# sourceURL=webpack://@tsparticles/pjs/./dist/browser/VincentGarreau/particles.js?\n}");
|
|
68
|
-
|
|
69
|
-
/***/ },
|
|
70
|
-
|
|
71
|
-
/***/ "./dist/browser/index.js"
|
|
72
|
-
/*!*******************************!*\
|
|
73
|
-
!*** ./dist/browser/index.js ***!
|
|
74
|
-
\*******************************/
|
|
75
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
76
|
-
|
|
77
|
-
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_0__ = __webpack_require__(/*! ./marcbruederlin/Particles.js */ \"./dist/browser/marcbruederlin/Particles.js\");\n/* harmony import */ var _VincentGarreau_particles_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VincentGarreau/particles.js */ \"./dist/browser/VincentGarreau/particles.js\");\n\n\nconst initPjs = async (engine)=>{\n engine.checkVersion(\"4.0.0-beta.9\");\n await engine.pluginManager.register(async (e)=>{\n const [{ loadFull }, { loadResponsivePlugin }] = await Promise.all([\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! tsparticles */ \"tsparticles\", 19)),\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-responsive */ \"@tsparticles/plugin-responsive\", 19))\n ]);\n await loadFull(e);\n await loadResponsivePlugin(e);\n });\n const { particlesJS, pJSDom } = (0,_VincentGarreau_particles_js__WEBPACK_IMPORTED_MODULE_1__.initParticlesJS)(engine);\n globalThis.particlesJS = particlesJS;\n globalThis.pJSDom = pJSDom;\n globalThis.Particles = _marcbruederlin_Particles_js__WEBPACK_IMPORTED_MODULE_0__.MBParticles;\n};\n\n\n\n//# sourceURL=webpack://@tsparticles/pjs/./dist/browser/index.js?\n}");
|
|
78
|
-
|
|
79
|
-
/***/ },
|
|
80
|
-
|
|
81
|
-
/***/ "./dist/browser/marcbruederlin/Particles.js"
|
|
82
|
-
/*!**************************************************!*\
|
|
83
|
-
!*** ./dist/browser/marcbruederlin/Particles.js ***!
|
|
84
|
-
\**************************************************/
|
|
85
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
86
|
-
|
|
87
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MBParticles: () => (/* binding */ MBParticles)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nconst linksMinDistance = 120, moveMinSpeed = 0.5, particlesMinCount = 100, sizeMinValue = 3;\nclass MBParticles {\n _container;\n static init(options) {\n const particles = new MBParticles(), selector = options.selector;\n if (!selector) {\n throw new Error(\"No selector provided\");\n }\n const el = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.safeDocument)().querySelector(selector);\n if (!el) {\n throw new Error(\"No element found for selector\");\n }\n void (async (engine)=>{\n await engine.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 })(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles);\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\n//# sourceURL=webpack://@tsparticles/pjs/./dist/browser/marcbruederlin/Particles.js?\n}");
|
|
88
|
-
|
|
89
|
-
/***/ }
|
|
90
|
-
|
|
91
|
-
/******/ });
|
|
92
|
-
/************************************************************************/
|
|
93
|
-
/******/ // The module cache
|
|
94
|
-
/******/ var __webpack_module_cache__ = {};
|
|
95
|
-
/******/
|
|
96
|
-
/******/ // The require function
|
|
97
|
-
/******/ function __webpack_require__(moduleId) {
|
|
98
|
-
/******/ // Check if module is in cache
|
|
99
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
100
|
-
/******/ if (cachedModule !== undefined) {
|
|
101
|
-
/******/ return cachedModule.exports;
|
|
102
|
-
/******/ }
|
|
103
|
-
/******/ // Create a new module (and put it into the cache)
|
|
104
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
105
|
-
/******/ // no module.id needed
|
|
106
|
-
/******/ // no module.loaded needed
|
|
107
|
-
/******/ exports: {}
|
|
108
|
-
/******/ };
|
|
109
|
-
/******/
|
|
110
|
-
/******/ // Execute the module function
|
|
111
|
-
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
112
|
-
/******/ delete __webpack_module_cache__[moduleId];
|
|
113
|
-
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
114
|
-
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
115
|
-
/******/ throw e;
|
|
116
|
-
/******/ }
|
|
117
|
-
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
118
|
-
/******/
|
|
119
|
-
/******/ // Return the exports of the module
|
|
120
|
-
/******/ return module.exports;
|
|
121
|
-
/******/ }
|
|
122
|
-
/******/
|
|
123
|
-
/************************************************************************/
|
|
124
|
-
/******/ /* webpack/runtime/create fake namespace object */
|
|
125
|
-
/******/ (() => {
|
|
126
|
-
/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
|
|
127
|
-
/******/ var leafPrototypes;
|
|
128
|
-
/******/ // create a fake namespace object
|
|
129
|
-
/******/ // mode & 1: value is a module id, require it
|
|
130
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
131
|
-
/******/ // mode & 4: return value when already ns object
|
|
132
|
-
/******/ // mode & 16: return value when it's Promise-like
|
|
133
|
-
/******/ // mode & 8|1: behave like require
|
|
134
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
135
|
-
/******/ if(mode & 1) value = this(value);
|
|
136
|
-
/******/ if(mode & 8) return value;
|
|
137
|
-
/******/ if(typeof value === 'object' && value) {
|
|
138
|
-
/******/ if((mode & 4) && value.__esModule) return value;
|
|
139
|
-
/******/ if((mode & 16) && typeof value.then === 'function') return value;
|
|
140
|
-
/******/ }
|
|
141
|
-
/******/ var ns = Object.create(null);
|
|
142
|
-
/******/ __webpack_require__.r(ns);
|
|
143
|
-
/******/ var def = {};
|
|
144
|
-
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
|
|
145
|
-
/******/ for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
|
146
|
-
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
|
|
147
|
-
/******/ }
|
|
148
|
-
/******/ def['default'] = () => (value);
|
|
149
|
-
/******/ __webpack_require__.d(ns, def);
|
|
150
|
-
/******/ return ns;
|
|
151
|
-
/******/ };
|
|
152
|
-
/******/ })();
|
|
153
|
-
/******/
|
|
154
|
-
/******/ /* webpack/runtime/define property getters */
|
|
155
|
-
/******/ (() => {
|
|
156
|
-
/******/ // define getter functions for harmony exports
|
|
157
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
158
|
-
/******/ for(var key in definition) {
|
|
159
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
160
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
161
|
-
/******/ }
|
|
162
|
-
/******/ }
|
|
163
|
-
/******/ };
|
|
164
|
-
/******/ })();
|
|
165
|
-
/******/
|
|
166
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
167
|
-
/******/ (() => {
|
|
168
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
169
|
-
/******/ })();
|
|
170
|
-
/******/
|
|
171
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
172
|
-
/******/ (() => {
|
|
173
|
-
/******/ // define __esModule on exports
|
|
174
|
-
/******/ __webpack_require__.r = (exports) => {
|
|
175
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
176
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
177
|
-
/******/ }
|
|
178
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
179
|
-
/******/ };
|
|
180
|
-
/******/ })();
|
|
181
|
-
/******/
|
|
182
|
-
/************************************************************************/
|
|
183
|
-
/******/
|
|
184
|
-
/******/ // startup
|
|
185
|
-
/******/ // Load entry module and return exports
|
|
186
|
-
/******/ // This entry module can't be inlined because the eval devtool is used.
|
|
187
|
-
/******/ var __webpack_exports__ = __webpack_require__("./dist/browser/index.js");
|
|
188
|
-
/******/
|
|
189
|
-
/******/ return __webpack_exports__;
|
|
190
|
-
/******/ })()
|
|
191
|
-
;
|
|
192
|
-
});
|
|
380
|
+
}));
|
|
381
|
+
Object.assign(globalThis.window || globalThis, { initPjs: (globalThis.__tsParticlesInternals.bundles.pjs || {}).initPjs });
|
|
382
|
+
delete (globalThis.window || globalThis).tsparticlesInternalExports;
|
package/tsparticles.pjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e
|
|
1
|
+
!function(e){e.__tsParticlesInternals=e.__tsParticlesInternals||{},e.__tsParticlesInternals.bundles=e.__tsParticlesInternals.bundles||{},e.__tsParticlesInternals.effects=e.__tsParticlesInternals.effects||{},e.__tsParticlesInternals.engine=e.__tsParticlesInternals.engine||{},e.__tsParticlesInternals.interactions=e.__tsParticlesInternals.interactions||{},e.__tsParticlesInternals.palettes=e.__tsParticlesInternals.palettes||{},e.__tsParticlesInternals.paths=e.__tsParticlesInternals.paths||{},e.__tsParticlesInternals.plugins=e.__tsParticlesInternals.plugins||{},e.__tsParticlesInternals.plugins=e.__tsParticlesInternals.plugins||{},e.__tsParticlesInternals.plugins.emittersShapes=e.__tsParticlesInternals.plugins.emittersShapes||{},e.__tsParticlesInternals.presets=e.__tsParticlesInternals.presets||{},e.__tsParticlesInternals.shapes=e.__tsParticlesInternals.shapes||{},e.__tsParticlesInternals.updaters=e.__tsParticlesInternals.updaters||{},e.__tsParticlesInternals.utils=e.__tsParticlesInternals.utils||{},e.__tsParticlesInternals.canvas=e.__tsParticlesInternals.canvas||{},e.__tsParticlesInternals.canvas=e.__tsParticlesInternals.canvas||{},e.__tsParticlesInternals.canvas.utils=e.__tsParticlesInternals.canvas.utils||{},e.__tsParticlesInternals.path=e.__tsParticlesInternals.path||{},e.__tsParticlesInternals.path=e.__tsParticlesInternals.path||{},e.__tsParticlesInternals.path.utils=e.__tsParticlesInternals.path.utils||{};var t="undefined"!=typeof Proxy?function(e){return new Proxy(e,{get:function(e,t){return t in e||(e[t]={}),e[t]}})}:function(e){return e};e.__tsParticlesInternals.bundles=t(e.__tsParticlesInternals.bundles),e.__tsParticlesInternals.effects=t(e.__tsParticlesInternals.effects),e.__tsParticlesInternals.interactions=t(e.__tsParticlesInternals.interactions),e.__tsParticlesInternals.palettes=t(e.__tsParticlesInternals.palettes),e.__tsParticlesInternals.paths=t(e.__tsParticlesInternals.paths),e.__tsParticlesInternals.plugins=t(e.__tsParticlesInternals.plugins),e.__tsParticlesInternals.plugins.emittersShapes=t(e.__tsParticlesInternals.plugins.emittersShapes),e.__tsParticlesInternals.presets=t(e.__tsParticlesInternals.presets),e.__tsParticlesInternals.shapes=t(e.__tsParticlesInternals.shapes),e.__tsParticlesInternals.updaters=t(e.__tsParticlesInternals.updaters),e.__tsParticlesInternals.utils=t(e.__tsParticlesInternals.utils),e.__tsParticlesInternals.canvas=t(e.__tsParticlesInternals.canvas),e.__tsParticlesInternals.path=t(e.__tsParticlesInternals.path),e.tsparticlesInternalExports=e.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@tsparticles/engine"),require("tsparticles"),require("@tsparticles/plugin-responsive")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine","tsparticles","@tsparticles/plugin-responsive"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).__tsParticlesInternals=e.__tsParticlesInternals||{},e.__tsParticlesInternals.bundles=e.__tsParticlesInternals.bundles||{},e.__tsParticlesInternals.bundles.pjs=e.__tsParticlesInternals.bundles.pjs||{}),e.__tsParticlesInternals.engine,e.__tsParticlesInternals.bundles.full,e.__tsParticlesInternals.plugins.responsive)}(this,function(e,t,s,a){"use strict";class n{_container;static init(e){const s=new n,a=e.selector;if(!a)throw new Error("No selector provided");const i=t.safeDocument().querySelector(a);if(!i)throw new Error("No element found for selector");return(async t=>{await t.load({element:i,id:a.replace(".","").replace("!",""),options:{fullScreen:{enable:!1},particles:{color:{value:e.color??"!000000"},links:{color:"random",distance:e.minDistance??120,enable:e.connectParticles??!1},move:{enable:!0,speed:e.speed??.5},number:{value:e.maxParticles??100},size:{value:{min:1,max:e.sizeVariations??3}}},responsive:e.responsive?.map(t=>({maxWidth:t.breakpoint,options:{particles:{color:{value:t.options?.color},links:{distance:t.options?.minDistance,enable:t.options?.connectParticles},number:{value:e.maxParticles},move:{enable:!0,speed:t.options?.speed},size:{value:t.options?.sizeVariations}}}}))}}).then(e=>{s._container=e})})(t.tsParticles),s}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},l=e=>{const s=async(s,a)=>{const n=t.deepExtend({},i,a);return await e.load({id:s,options:{fullScreen:{enable:!1},detectRetina:n.retina_detect,smooth:!0,interactivity:{detectsOn:n.interactivity.detect_on,events:{onHover:{enable:n.interactivity.events.onhover.enable,mode:n.interactivity.events.onhover.mode},onClick:{enable:n.interactivity.events.onclick.enable,mode:n.interactivity.events.onclick.mode}},modes:{grab:{distance:n.interactivity.modes.grab.distance,links:{opacity:n.interactivity.modes.grab.line_linked.opacity}},bubble:{distance:n.interactivity.modes.bubble.distance,size:n.interactivity.modes.bubble.size,duration:n.interactivity.modes.bubble.duration,opacity:n.interactivity.modes.bubble.opacity,speed:n.interactivity.modes.bubble.speed},repulse:{distance:n.interactivity.modes.repulse.distance,duration:n.interactivity.modes.repulse.duration},push:{quantity:n.interactivity.modes.push.particles_nb},remove:{quantity:n.interactivity.modes.remove.particles_nb}}},particles:{attract:{enable:n.particles.move.attract.enable,rotate:{x:n.particles.move.attract.rotateX,y:n.particles.move.attract.rotateY}},collisions:{enable:n.particles.move.bounce},number:{value:n.particles.number.value,density:{enable:n.particles.number.density.enable,width:n.particles.number.density.value_area}},color:{value:n.particles.color.value},stroke:{width:n.particles.shape.stroke.width,color:{value:n.particles.shape.stroke.color}},shape:{type:n.particles.shape.type,options:{polygon:{sides:n.particles.shape.polygon.nb_sides},image:{src:n.particles.shape.image.src,width:n.particles.shape.image.width,height:n.particles.shape.image.height}}},opacity:{value:n.particles.opacity.random?{min:n.particles.opacity.anim.enable?n.particles.opacity.anim.opacity_min:0,max:n.particles.opacity.value}:n.particles.opacity.value,animation:{enable:n.particles.opacity.anim.enable,speed:n.particles.opacity.anim.speed,sync:n.particles.opacity.anim.sync}},size:{value:n.particles.size.random?{min:n.particles.size.anim.enable?n.particles.size.anim.size_min:0,max:n.particles.size.value}:n.particles.size.value,animation:{enable:n.particles.size.anim.enable,speed:n.particles.size.anim.speed,sync:n.particles.size.anim.sync}},links:{enable:n.particles.line_linked.enable,distance:n.particles.line_linked.distance,color:n.particles.line_linked.color,opacity:n.particles.line_linked.opacity,width:n.particles.line_linked.width},move:{enable:n.particles.move.enable,speed:n.particles.move.speed/3,direction:n.particles.move.direction,random:n.particles.move.random,straight:n.particles.move.straight,outModes:n.particles.move.out_mode}},resize:{enable:n.interactivity.events.resize}}})};s.load=(t,s,a)=>{e.load({id:t,url:s}).then(e=>{a(e)}).catch(()=>{a(void 0)})},s.setOnClickHandler=t=>{e.pluginManager.setOnClickHandler?.(t)};return{particlesJS:s,pJSDom:e.items}},r=async e=>{e.checkVersion("4.0.1"),await e.pluginManager.register(async e=>{await Promise.all([s.loadFull(e),a.loadResponsivePlugin(e)])});const{particlesJS:t,pJSDom:i}=l(e);globalThis.particlesJS=t,globalThis.pJSDom=i,globalThis.Particles=n},c=globalThis;c.__tsParticlesInternals=c.__tsParticlesInternals??{},c.initPjs=r,e.initPjs=r}),Object.assign(globalThis.window||globalThis,{initPjs:(globalThis.__tsParticlesInternals.bundles.pjs||{}).initPjs}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|