@tsparticles/engine 4.0.0-alpha.3 → 4.0.0-alpha.5
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/794.min.js +2 -0
- package/794.min.js.LICENSE.txt +1 -0
- package/README.md +2 -5
- package/browser/Core/Canvas.js +3 -3
- package/browser/Core/Container.js +35 -155
- package/browser/Core/Engine.js +32 -78
- package/browser/Core/Particle.js +5 -10
- package/browser/Core/Particles.js +36 -25
- package/browser/Core/Utils/Constants.js +2 -2
- package/browser/Core/Utils/EventListeners.js +5 -250
- package/browser/Options/Classes/Options.js +7 -75
- package/browser/Options/Classes/Particles/ParticlesOptions.js +5 -11
- package/{esm/Options/Classes/Interactivity/Events → browser/Options/Classes}/ResizeEvent.js +1 -1
- package/browser/Utils/ColorUtils.js +7 -5
- package/browser/Utils/Utils.js +33 -36
- package/browser/exports.js +1 -21
- package/cjs/Core/Canvas.js +3 -3
- package/cjs/Core/Container.js +35 -155
- package/cjs/Core/Engine.js +32 -78
- package/cjs/Core/Particle.js +5 -10
- package/cjs/Core/Particles.js +36 -25
- package/cjs/Core/Utils/Constants.js +2 -2
- package/cjs/Core/Utils/EventListeners.js +5 -250
- package/cjs/Options/Classes/Options.js +7 -75
- package/cjs/Options/Classes/Particles/ParticlesOptions.js +5 -11
- package/cjs/Options/Classes/{Interactivity/Events/ResizeEvent.js → ResizeEvent.js} +1 -1
- package/cjs/Utils/ColorUtils.js +7 -5
- package/cjs/Utils/Utils.js +33 -36
- package/cjs/exports.js +1 -21
- package/dist_browser_Core_Container_js.js +6 -16
- package/esm/Core/Canvas.js +3 -3
- package/esm/Core/Container.js +35 -155
- package/esm/Core/Engine.js +32 -78
- package/esm/Core/Particle.js +5 -10
- package/esm/Core/Particles.js +36 -25
- package/esm/Core/Utils/Constants.js +2 -2
- package/esm/Core/Utils/EventListeners.js +5 -250
- package/esm/Options/Classes/Options.js +7 -75
- package/esm/Options/Classes/Particles/ParticlesOptions.js +5 -11
- package/{browser/Options/Classes/Interactivity/Events → esm/Options/Classes}/ResizeEvent.js +1 -1
- package/esm/Utils/ColorUtils.js +7 -5
- package/esm/Utils/Utils.js +33 -36
- package/esm/exports.js +1 -21
- package/package.json +1 -1
- package/report.html +1 -1
- package/tsparticles.engine.js +14 -206
- package/tsparticles.engine.min.js +1 -1
- package/tsparticles.engine.min.js.LICENSE.txt +1 -1
- package/types/Core/Container.d.ts +3 -15
- package/types/Core/Engine.d.ts +8 -19
- package/types/Core/Interfaces/IContainerPlugin.d.ts +8 -1
- package/types/Core/Interfaces/IPlugin.d.ts +5 -1
- package/types/Core/Particle.d.ts +0 -2
- package/types/Core/Particles.d.ts +1 -5
- package/types/Core/Utils/Constants.d.ts +2 -2
- package/types/Core/Utils/EventListeners.d.ts +0 -14
- package/types/Options/Classes/Options.d.ts +2 -11
- package/types/Options/Classes/Particles/ParticlesOptions.d.ts +0 -2
- package/types/Options/Classes/ResizeEvent.d.ts +9 -0
- package/types/Options/Interfaces/IOptions.d.ts +2 -8
- package/types/Options/Interfaces/Particles/IParticlesOptions.d.ts +0 -3
- package/types/Types/EngineInitializers.d.ts +10 -0
- package/types/Utils/Utils.d.ts +4 -6
- package/types/export-types.d.ts +3 -19
- package/types/exports.d.ts +1 -21
- package/umd/Core/Canvas.js +3 -3
- package/umd/Core/Container.js +35 -155
- package/umd/Core/Engine.js +33 -79
- package/umd/Core/Particle.js +6 -11
- package/umd/Core/Particles.js +37 -26
- package/umd/Core/Utils/Constants.js +3 -3
- package/umd/Core/Utils/EventListeners.js +7 -252
- package/umd/Options/Classes/Options.js +7 -75
- package/umd/Options/Classes/Particles/ParticlesOptions.js +5 -11
- package/umd/Options/Classes/{Interactivity/Events/ResizeEvent.js → ResizeEvent.js} +2 -2
- package/umd/Utils/ColorUtils.js +7 -5
- package/umd/Utils/Utils.js +34 -39
- package/umd/exports.js +2 -22
- package/638.min.js +0 -2
- package/638.min.js.LICENSE.txt +0 -1
- package/browser/Core/Interfaces/IMouseData.js +0 -1
- package/browser/Core/Interfaces/IParticlesInteractor.js +0 -1
- package/browser/Core/Utils/ExternalInteractorBase.js +0 -7
- package/browser/Core/Utils/InteractionManager.js +0 -60
- package/browser/Core/Utils/ParticlesInteractorBase.js +0 -7
- package/browser/Enums/InteractivityDetect.js +0 -6
- package/browser/Enums/Modes/ResponsiveMode.js +0 -5
- package/browser/Enums/Modes/ThemeMode.js +0 -6
- package/browser/Enums/Types/DivType.js +0 -5
- package/browser/Enums/Types/InteractorType.js +0 -5
- package/browser/Options/Classes/Interactivity/Events/ClickEvent.js +0 -18
- package/browser/Options/Classes/Interactivity/Events/DivEvent.js +0 -27
- package/browser/Options/Classes/Interactivity/Events/Events.js +0 -30
- package/browser/Options/Classes/Interactivity/Events/HoverEvent.js +0 -21
- package/browser/Options/Classes/Interactivity/Events/Parallax.js +0 -22
- package/browser/Options/Classes/Interactivity/Interactivity.js +0 -22
- package/browser/Options/Classes/Interactivity/Modes/Modes.js +0 -25
- package/browser/Options/Classes/ManualParticle.js +0 -21
- package/browser/Options/Classes/Responsive.js +0 -29
- package/browser/Options/Classes/Theme/Theme.js +0 -21
- package/browser/Options/Classes/Theme/ThemeDefault.js +0 -23
- package/browser/Options/Interfaces/IManualParticle.js +0 -1
- package/browser/Options/Interfaces/IResponsive.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Events/IClickEvent.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Events/IDivEvent.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Events/IEvents.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Events/IParallax.js +0 -1
- package/browser/Options/Interfaces/Interactivity/IInteractivity.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Modes/IModes.js +0 -1
- package/browser/Options/Interfaces/Theme/ITheme.js +0 -1
- package/browser/Options/Interfaces/Theme/IThemeDefault.js +0 -1
- package/cjs/Core/Interfaces/IContainerInteractivity.js +0 -1
- package/cjs/Core/Interfaces/IExternalInteractor.js +0 -1
- package/cjs/Core/Interfaces/IInteractor.js +0 -1
- package/cjs/Core/Interfaces/IMouseData.js +0 -1
- package/cjs/Core/Interfaces/IParticlesInteractor.js +0 -1
- package/cjs/Core/Utils/ExternalInteractorBase.js +0 -7
- package/cjs/Core/Utils/InteractionManager.js +0 -60
- package/cjs/Core/Utils/ParticlesInteractorBase.js +0 -7
- package/cjs/Enums/InteractivityDetect.js +0 -6
- package/cjs/Enums/Modes/ResponsiveMode.js +0 -5
- package/cjs/Enums/Modes/ThemeMode.js +0 -6
- package/cjs/Enums/Types/DivType.js +0 -5
- package/cjs/Enums/Types/InteractorType.js +0 -5
- package/cjs/Options/Classes/Interactivity/Events/ClickEvent.js +0 -18
- package/cjs/Options/Classes/Interactivity/Events/DivEvent.js +0 -27
- package/cjs/Options/Classes/Interactivity/Events/Events.js +0 -30
- package/cjs/Options/Classes/Interactivity/Events/HoverEvent.js +0 -21
- package/cjs/Options/Classes/Interactivity/Events/Parallax.js +0 -22
- package/cjs/Options/Classes/Interactivity/Interactivity.js +0 -22
- package/cjs/Options/Classes/Interactivity/Modes/Modes.js +0 -25
- package/cjs/Options/Classes/ManualParticle.js +0 -21
- package/cjs/Options/Classes/Responsive.js +0 -29
- package/cjs/Options/Classes/Theme/Theme.js +0 -21
- package/cjs/Options/Classes/Theme/ThemeDefault.js +0 -23
- package/cjs/Options/Interfaces/IManualParticle.js +0 -1
- package/cjs/Options/Interfaces/IResponsive.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IClickEvent.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IDivEvent.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IEvents.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IParallax.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/IInteractivity.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Modes/IModes.js +0 -1
- package/cjs/Options/Interfaces/Theme/ITheme.js +0 -1
- package/cjs/Options/Interfaces/Theme/IThemeDefault.js +0 -1
- package/esm/Core/Interfaces/IContainerInteractivity.js +0 -1
- package/esm/Core/Interfaces/IExternalInteractor.js +0 -1
- package/esm/Core/Interfaces/IInteractor.js +0 -1
- package/esm/Core/Interfaces/IMouseData.js +0 -1
- package/esm/Core/Interfaces/IParticlesInteractor.js +0 -1
- package/esm/Core/Utils/ExternalInteractorBase.js +0 -7
- package/esm/Core/Utils/InteractionManager.js +0 -60
- package/esm/Core/Utils/ParticlesInteractorBase.js +0 -7
- package/esm/Enums/InteractivityDetect.js +0 -6
- package/esm/Enums/Modes/ResponsiveMode.js +0 -5
- package/esm/Enums/Modes/ThemeMode.js +0 -6
- package/esm/Enums/Types/DivType.js +0 -5
- package/esm/Enums/Types/InteractorType.js +0 -5
- package/esm/Options/Classes/Interactivity/Events/ClickEvent.js +0 -18
- package/esm/Options/Classes/Interactivity/Events/DivEvent.js +0 -27
- package/esm/Options/Classes/Interactivity/Events/Events.js +0 -30
- package/esm/Options/Classes/Interactivity/Events/HoverEvent.js +0 -21
- package/esm/Options/Classes/Interactivity/Events/Parallax.js +0 -22
- package/esm/Options/Classes/Interactivity/Interactivity.js +0 -22
- package/esm/Options/Classes/Interactivity/Modes/Modes.js +0 -25
- package/esm/Options/Classes/ManualParticle.js +0 -21
- package/esm/Options/Classes/Responsive.js +0 -29
- package/esm/Options/Classes/Theme/Theme.js +0 -21
- package/esm/Options/Classes/Theme/ThemeDefault.js +0 -23
- package/esm/Options/Interfaces/IManualParticle.js +0 -1
- package/esm/Options/Interfaces/IResponsive.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IClickEvent.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IDivEvent.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IEvents.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IParallax.js +0 -1
- package/esm/Options/Interfaces/Interactivity/IInteractivity.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Modes/IModes.js +0 -1
- package/esm/Options/Interfaces/Theme/ITheme.js +0 -1
- package/esm/Options/Interfaces/Theme/IThemeDefault.js +0 -1
- package/types/Core/Interfaces/IContainerInteractivity.d.ts +0 -6
- package/types/Core/Interfaces/IExternalInteractor.d.ts +0 -12
- package/types/Core/Interfaces/IInteractor.d.ts +0 -16
- package/types/Core/Interfaces/IMouseData.d.ts +0 -9
- package/types/Core/Interfaces/IParticlesInteractor.d.ts +0 -7
- package/types/Core/Utils/ExternalInteractorBase.d.ts +0 -15
- package/types/Core/Utils/InteractionManager.d.ts +0 -17
- package/types/Core/Utils/ParticlesInteractorBase.d.ts +0 -15
- package/types/Enums/InteractivityDetect.d.ts +0 -5
- package/types/Enums/Modes/ResponsiveMode.d.ts +0 -4
- package/types/Enums/Modes/ThemeMode.d.ts +0 -5
- package/types/Enums/Types/DivType.d.ts +0 -4
- package/types/Enums/Types/InteractorType.d.ts +0 -4
- package/types/Options/Classes/Interactivity/Events/ClickEvent.d.ts +0 -10
- package/types/Options/Classes/Interactivity/Events/DivEvent.d.ts +0 -13
- package/types/Options/Classes/Interactivity/Events/Events.d.ts +0 -16
- package/types/Options/Classes/Interactivity/Events/HoverEvent.d.ts +0 -12
- package/types/Options/Classes/Interactivity/Events/Parallax.d.ts +0 -10
- package/types/Options/Classes/Interactivity/Events/ResizeEvent.d.ts +0 -9
- package/types/Options/Classes/Interactivity/Interactivity.d.ts +0 -16
- package/types/Options/Classes/Interactivity/Modes/Modes.d.ts +0 -12
- package/types/Options/Classes/ManualParticle.d.ts +0 -10
- package/types/Options/Classes/Responsive.d.ts +0 -12
- package/types/Options/Classes/Theme/Theme.d.ts +0 -12
- package/types/Options/Classes/Theme/ThemeDefault.d.ts +0 -11
- package/types/Options/Interfaces/IManualParticle.d.ts +0 -7
- package/types/Options/Interfaces/IResponsive.d.ts +0 -7
- package/types/Options/Interfaces/Interactivity/Events/IClickEvent.d.ts +0 -5
- package/types/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +0 -8
- package/types/Options/Interfaces/Interactivity/Events/IEvents.d.ts +0 -11
- package/types/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +0 -7
- package/types/Options/Interfaces/Interactivity/Events/IParallax.d.ts +0 -5
- package/types/Options/Interfaces/Interactivity/IInteractivity.d.ts +0 -9
- package/types/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +0 -4
- package/types/Options/Interfaces/Interactivity/Modes/IModes.d.ts +0 -1
- package/types/Options/Interfaces/Theme/ITheme.d.ts +0 -7
- package/types/Options/Interfaces/Theme/IThemeDefault.d.ts +0 -6
- package/umd/Core/Interfaces/IExternalInteractor.js +0 -12
- package/umd/Core/Interfaces/IInteractor.js +0 -12
- package/umd/Core/Interfaces/IMouseData.js +0 -12
- package/umd/Core/Interfaces/IParticlesInteractor.js +0 -12
- package/umd/Core/Utils/ExternalInteractorBase.js +0 -21
- package/umd/Core/Utils/InteractionManager.js +0 -74
- package/umd/Core/Utils/ParticlesInteractorBase.js +0 -21
- package/umd/Enums/InteractivityDetect.js +0 -19
- package/umd/Enums/Modes/ResponsiveMode.js +0 -18
- package/umd/Enums/Modes/ThemeMode.js +0 -19
- package/umd/Enums/Types/DivType.js +0 -18
- package/umd/Enums/Types/InteractorType.js +0 -18
- package/umd/Options/Classes/Interactivity/Events/ClickEvent.js +0 -32
- package/umd/Options/Classes/Interactivity/Events/DivEvent.js +0 -41
- package/umd/Options/Classes/Interactivity/Events/Events.js +0 -44
- package/umd/Options/Classes/Interactivity/Events/HoverEvent.js +0 -35
- package/umd/Options/Classes/Interactivity/Events/Parallax.js +0 -36
- package/umd/Options/Classes/Interactivity/Interactivity.js +0 -36
- package/umd/Options/Classes/Interactivity/Modes/Modes.js +0 -39
- package/umd/Options/Classes/ManualParticle.js +0 -35
- package/umd/Options/Classes/Responsive.js +0 -43
- package/umd/Options/Classes/Theme/Theme.js +0 -35
- package/umd/Options/Classes/Theme/ThemeDefault.js +0 -37
- package/umd/Options/Interfaces/IManualParticle.js +0 -12
- package/umd/Options/Interfaces/IResponsive.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IClickEvent.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IDivEvent.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IEvents.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IParallax.js +0 -12
- package/umd/Options/Interfaces/Interactivity/IInteractivity.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Modes/IModes.js +0 -12
- package/umd/Options/Interfaces/Theme/ITheme.js +0 -12
- package/umd/Options/Interfaces/Theme/IThemeDefault.js +0 -12
- /package/browser/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/browser/{Core/Interfaces/IContainerInteractivity.js → Types/EngineInitializers.js} +0 -0
- /package/cjs/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/{browser/Core/Interfaces/IExternalInteractor.js → cjs/Types/EngineInitializers.js} +0 -0
- /package/esm/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/{browser/Core/Interfaces/IInteractor.js → esm/Types/EngineInitializers.js} +0 -0
- /package/types/Options/Interfaces/{Interactivity/Events/IResizeEvent.d.ts → IResizeEvent.d.ts} +0 -0
- /package/umd/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/umd/{Core/Interfaces/IContainerInteractivity.js → Types/EngineInitializers.js} +0 -0
package/umd/exports.js
CHANGED
|
@@ -18,14 +18,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
if (v !== undefined) module.exports = v;
|
|
19
19
|
}
|
|
20
20
|
else if (typeof define === "function" && define.amd) {
|
|
21
|
-
define(["require", "exports", "./Core/Utils/Constants.js", "./Core/Utils/
|
|
21
|
+
define(["require", "exports", "./Core/Utils/Constants.js", "./Core/Utils/Point.js", "./Core/Utils/Ranges.js", "./Core/Utils/Vectors.js", "./Enums/Directions/MoveDirection.js", "./Enums/Directions/RotateDirection.js", "./Enums/Directions/OutModeDirection.js", "./Enums/Modes/AnimationMode.js", "./Enums/Modes/LimitMode.js", "./Enums/Modes/OutMode.js", "./Enums/Modes/PixelMode.js", "./Enums/Types/AlterType.js", "./Enums/Types/DestroyType.js", "./Enums/Types/GradientType.js", "./Enums/Types/ParticleOutType.js", "./Enums/Types/StartValueType.js", "./Enums/Types/EasingType.js", "./Enums/Types/EventType.js", "./Enums/AnimationStatus.js", "./Options/Classes/AnimatableColor.js", "./Options/Classes/AnimationOptions.js", "./Options/Classes/Background/Background.js", "./Options/Classes/ColorAnimation.js", "./Options/Classes/FullScreen/FullScreen.js", "./Options/Classes/HslAnimation.js", "./Options/Classes/Options.js", "./Options/Classes/OptionsColor.js", "./Options/Classes/Particles/Bounce/ParticlesBounce.js", "./Options/Classes/Particles/Bounce/ParticlesBounceFactor.js", "./Options/Classes/Particles/ParticlesOptions.js", "./Options/Classes/Particles/Stroke.js", "./Options/Classes/Particles/Move/MoveAttract.js", "./Options/Classes/Particles/Move/Move.js", "./Options/Classes/Particles/Move/MoveAngle.js", "./Options/Classes/Particles/Move/MoveCenter.js", "./Options/Classes/Particles/Move/MoveGravity.js", "./Options/Classes/Particles/Move/OutModes.js", "./Options/Classes/Particles/Move/Path/MovePath.js", "./Options/Classes/Particles/Move/Spin.js", "./Options/Classes/Particles/Number/ParticlesNumber.js", "./Options/Classes/Particles/Number/ParticlesNumberLimit.js", "./Options/Classes/Particles/Number/ParticlesDensity.js", "./Options/Classes/Particles/Opacity/Opacity.js", "./Options/Classes/Particles/Opacity/OpacityAnimation.js", "./Options/Classes/Particles/Shape/Shape.js", "./Options/Classes/Particles/Size/Size.js", "./Options/Classes/Particles/Size/SizeAnimation.js", "./Options/Classes/Particles/ZIndex/ZIndex.js", "./Options/Classes/ResizeEvent.js", "./Options/Classes/ValueWithRandom.js", "./Utils/CanvasUtils.js", "./Utils/ColorUtils.js", "./Utils/LogUtils.js", "./Utils/MathUtils.js", "./Utils/OptionsUtils.js", "./Utils/Utils.js", "./Utils/TypeUtils.js"], factory);
|
|
22
22
|
}
|
|
23
23
|
})(function (require, exports) {
|
|
24
24
|
"use strict";
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
__exportStar(require("./Core/Utils/Constants.js"), exports);
|
|
27
|
-
__exportStar(require("./Core/Utils/ExternalInteractorBase.js"), exports);
|
|
28
|
-
__exportStar(require("./Core/Utils/ParticlesInteractorBase.js"), exports);
|
|
29
27
|
__exportStar(require("./Core/Utils/Point.js"), exports);
|
|
30
28
|
__exportStar(require("./Core/Utils/Ranges.js"), exports);
|
|
31
29
|
__exportStar(require("./Core/Utils/Vectors.js"), exports);
|
|
@@ -36,36 +34,20 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
34
|
__exportStar(require("./Enums/Modes/LimitMode.js"), exports);
|
|
37
35
|
__exportStar(require("./Enums/Modes/OutMode.js"), exports);
|
|
38
36
|
__exportStar(require("./Enums/Modes/PixelMode.js"), exports);
|
|
39
|
-
__exportStar(require("./Enums/Modes/ThemeMode.js"), exports);
|
|
40
|
-
__exportStar(require("./Enums/Modes/ResponsiveMode.js"), exports);
|
|
41
37
|
__exportStar(require("./Enums/Types/AlterType.js"), exports);
|
|
42
38
|
__exportStar(require("./Enums/Types/DestroyType.js"), exports);
|
|
43
39
|
__exportStar(require("./Enums/Types/GradientType.js"), exports);
|
|
44
|
-
__exportStar(require("./Enums/Types/InteractorType.js"), exports);
|
|
45
40
|
__exportStar(require("./Enums/Types/ParticleOutType.js"), exports);
|
|
46
41
|
__exportStar(require("./Enums/Types/StartValueType.js"), exports);
|
|
47
|
-
__exportStar(require("./Enums/Types/DivType.js"), exports);
|
|
48
42
|
__exportStar(require("./Enums/Types/EasingType.js"), exports);
|
|
49
43
|
__exportStar(require("./Enums/Types/EventType.js"), exports);
|
|
50
44
|
__exportStar(require("./Enums/AnimationStatus.js"), exports);
|
|
51
|
-
__exportStar(require("./Enums/InteractivityDetect.js"), exports);
|
|
52
45
|
__exportStar(require("./Options/Classes/AnimatableColor.js"), exports);
|
|
53
46
|
__exportStar(require("./Options/Classes/AnimationOptions.js"), exports);
|
|
54
47
|
__exportStar(require("./Options/Classes/Background/Background.js"), exports);
|
|
55
48
|
__exportStar(require("./Options/Classes/ColorAnimation.js"), exports);
|
|
56
49
|
__exportStar(require("./Options/Classes/FullScreen/FullScreen.js"), exports);
|
|
57
50
|
__exportStar(require("./Options/Classes/HslAnimation.js"), exports);
|
|
58
|
-
__exportStar(require("./Options/Classes/Interactivity/Events/ClickEvent.js"), exports);
|
|
59
|
-
__exportStar(require("./Options/Classes/Interactivity/Events/DivEvent.js"), exports);
|
|
60
|
-
__exportStar(require("./Options/Classes/Interactivity/Events/ClickEvent.js"), exports);
|
|
61
|
-
__exportStar(require("./Options/Classes/Interactivity/Events/DivEvent.js"), exports);
|
|
62
|
-
__exportStar(require("./Options/Classes/Interactivity/Events/Events.js"), exports);
|
|
63
|
-
__exportStar(require("./Options/Classes/Interactivity/Events/HoverEvent.js"), exports);
|
|
64
|
-
__exportStar(require("./Options/Classes/Interactivity/Events/Parallax.js"), exports);
|
|
65
|
-
__exportStar(require("./Options/Classes/Interactivity/Events/ResizeEvent.js"), exports);
|
|
66
|
-
__exportStar(require("./Options/Classes/Interactivity/Interactivity.js"), exports);
|
|
67
|
-
__exportStar(require("./Options/Classes/Interactivity/Modes/Modes.js"), exports);
|
|
68
|
-
__exportStar(require("./Options/Classes/ManualParticle.js"), exports);
|
|
69
51
|
__exportStar(require("./Options/Classes/Options.js"), exports);
|
|
70
52
|
__exportStar(require("./Options/Classes/OptionsColor.js"), exports);
|
|
71
53
|
__exportStar(require("./Options/Classes/Particles/Bounce/ParticlesBounce.js"), exports);
|
|
@@ -89,9 +71,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
89
71
|
__exportStar(require("./Options/Classes/Particles/Size/Size.js"), exports);
|
|
90
72
|
__exportStar(require("./Options/Classes/Particles/Size/SizeAnimation.js"), exports);
|
|
91
73
|
__exportStar(require("./Options/Classes/Particles/ZIndex/ZIndex.js"), exports);
|
|
92
|
-
__exportStar(require("./Options/Classes/
|
|
93
|
-
__exportStar(require("./Options/Classes/Theme/Theme.js"), exports);
|
|
94
|
-
__exportStar(require("./Options/Classes/Theme/ThemeDefault.js"), exports);
|
|
74
|
+
__exportStar(require("./Options/Classes/ResizeEvent.js"), exports);
|
|
95
75
|
__exportStar(require("./Options/Classes/ValueWithRandom.js"), exports);
|
|
96
76
|
__exportStar(require("./Utils/CanvasUtils.js"), exports);
|
|
97
77
|
__exportStar(require("./Utils/ColorUtils.js"), exports);
|
package/638.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 638.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_engine=this.webpackChunk_tsparticles_engine||[]).push([[638],{1638(t,i,e){e.d(i,{Container:()=>A});var s=e(397),n=e(4117),a=e(9259),o=e(615),r=e(6192);function h(t,i,e){const s=i[e];void 0!==s&&(t[e]=(t[e]??n.zs)*s)}function c(t,i,e=!1){if(!i)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const i=s.item(t);i&&n.add(i)}for(let t=0;t<i.length;t++){const e=i.item(t);e&&n.add(e)}for(const t of n){const n=i.getPropertyValue(t);n?s.setProperty(t,n,e?"important":""):s.removeProperty(t)}}class l{constructor(t,i){this.container=t,this._reusableColorStyles={},this._reusablePluginColors=[void 0,void 0],this._reusableTransform={},this._applyPostDrawUpdaters=t=>{for(const i of this._postDrawUpdaters)i.afterDraw?.(t)},this._applyPreDrawUpdaters=(t,i,e,s,n,a)=>{for(const o of this._preDrawUpdaters){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(i,t,e,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(i);for(const i in t)h(a,t,i)}o.beforeDraw?.(i)}},this._applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()},this._getPluginParticleColors=t=>{let i,e;for(const s of this._colorPlugins)if(!i&&s.particleFillColor&&(i=(0,r.R5)(this._engine,s.particleFillColor(t))),!e&&s.particleStrokeColor&&(e=(0,r.R5)(this._engine,s.particleStrokeColor(t))),i&&e)break;return this._reusablePluginColors[0]=i,this._reusablePluginColors[1]=e,this._reusablePluginColors},this._initStyle=()=>{const t=this.element,i=this.container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();for(const e in i.style){if(!e||!Object.hasOwn(i.style,e))continue;const s=i.style[e];s&&t.style.setProperty(e,s,"important")}}},this._repairStyle=()=>{const t=this.element;if(!t)return;this._safeMutationObserver((t=>{t.disconnect()})),this._initStyle(),this.initBackground();const i=this._pointerEvents;t.style.pointerEvents=i,t.setAttribute("pointer-events",i),this._safeMutationObserver((i=>{t instanceof Node&&i.observe(t,{attributes:!0})}))},this._resetOriginalStyle=()=>{const t=this.element,i=this._originalStyle;t&&i&&c(t,i,!0)},this._safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)},this._setFullScreenStyle=()=>{const t=this.element;t&&c(t,(0,o.hJ)(this.container.actualOptions.fullScreen.zIndex),!0)},this._engine=i,this._standardSize={height:0,width:0};const e=t.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*e,width:s.width*e},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[],this._pointerEvents="none"}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}canvasClear(){this.container.actualOptions.clear&&this.draw((t=>{(0,a.IU)(t,this.size)}))}clear(){let t=!1;for(const i of this.container.plugins.values())!t&&i.canvasClear&&(t=i.canvasClear());t||this.canvasClear()}clearDrawPlugin(t,i){this.draw((e=>{(0,a.l7)(e,t,i)}))}destroy(){if(this.stop(),this._generated){const t=this.element;t?.remove(),this.element=void 0}else this._resetOriginalStyle();this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(t){const i=this._context;if(i)return t(i)}drawParticle(t,i){if(t.spawning||t.destroyed)return;const e=t.getRadius();if(e<=n.w2)return;const s=t.getFillColor(),o=t.getStrokeColor()??s;let[h,c]=this._getPluginParticleColors(t);if(h??=s,c??=o,!h&&!c)return;const l=this.container,d=t.options.zIndex,u=n.RV-t.zIndexFactor,{opacity:p,strokeOpacity:f}=t.getOpacity(),_=this._reusableTransform,g=this._reusableColorStyles,v=h?(0,r.LC)(h,l.hdr,p):void 0,m=c?(0,r.LC)(c,l.hdr,f):v;_.a=_.b=_.c=_.d=void 0,g.fill=v,g.stroke=m,this.draw((s=>{this._applyPreDrawUpdaters(s,t,e,p,g,_),(0,a.p0)({container:l,context:s,particle:t,delta:i,colorStyles:g,radius:e*u**d.sizeRate,opacity:p,transform:_})})),this._applyPostDrawUpdaters(t)}drawParticlePlugin(t,i,e){this.draw((s=>{(0,a.Wb)(s,t,i,e)}))}drawParticles(t){const{particles:i,plugins:e}=this.container;this.clear(),i.update(t);for(const i of e.values())this.drawPlugin(i,t);this.draw((()=>{i.drawParticles(t)}));for(const i of e.values())this.clearDrawPlugin(i,t)}drawPlugin(t,i){this.draw((e=>{(0,a.e_)(e,t,i)}))}init(){this._safeMutationObserver((t=>{t.disconnect()})),this._mutationObserver=(0,o.tG)((t=>{for(const i of t)"attributes"===i.type&&"style"===i.attributeName&&this._repairStyle()})),this.resize(),this._initStyle(),this.initBackground(),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})})),this.initUpdaters(),this.initPlugins(),this.paint()}initBackground(){const{container:t}=this,i=t.actualOptions.background,e=this.element;if(!e)return;const s=e.style,n=(0,r.BN)(this._engine,i.color);s.backgroundColor=n?(0,r.xx)(n,t.hdr,i.opacity):"",s.backgroundImage=i.image||"",s.backgroundPosition=i.position||"",s.backgroundRepeat=i.repeat||"",s.backgroundSize=i.size||""}initPlugins(){this._resizePlugins=[];for(const t of this.container.plugins.values())t.resize&&this._resizePlugins.push(t),(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this.container.particles.updaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}loadCanvas(t){this._generated&&this.element&&this.element.remove();const i=this.container;this._generated=n.eb in t.dataset?"true"===t.dataset[n.eb]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=(0,o.td)(this.element.style);const e=this._standardSize;e.height=t.offsetHeight,e.width=t.offsetWidth;const s=this.container.retina.pixelRatio,a=this.size;t.height=a.height=e.height*s,t.width=a.width=e.width*s;const r=(0,o.lV)("(color-gamut: p3)");this._context=this.element.getContext("2d",{alpha:!0,colorSpace:r?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this._safeMutationObserver((t=>{t.disconnect()})),i.retina.init(),this.initBackground(),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})}))}paint(){let t=!1;for(const i of this.container.plugins.values()){if(t)break;t=i.canvasPaint?.()??!1}t||this.paintBase()}paintBase(t){this.draw((i=>{(0,a.Sn)(i,this.size,t)}))}paintImage(t,i){this.draw((e=>{(0,a.Md)(e,this.size,t,i)}))}resize(){if(!this.element)return!1;const t=this.container,i=t.canvas._standardSize,e={width:this.element.offsetWidth,height:this.element.offsetHeight},s=t.retina.pixelRatio,n={width:e.width*s,height:e.height*s};if(e.height===i.height&&e.width===i.width&&n.height===this.element.height&&n.width===this.element.width)return!1;const a={...i};i.height=e.height,i.width=e.width;const o=this.size;return this.element.width=o.width=n.width,this.element.height=o.height=n.height,this.container.started&&t.particles.setResizeFactor({width:i.width/a.width,height:i.height/a.height}),!0}setPointerEvents(t){this.element&&(this._pointerEvents=t,this._repairStyle())}stop(){this._safeMutationObserver((t=>{t.disconnect()})),this._mutationObserver=void 0,this.draw((t=>{(0,a.IU)(t,this.size)}))}async windowResize(){if(!this.element||!this.resize())return;const t=this.container,i=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),i&&await t.refresh()}}var d=e(6249),u=e(3631);function p(t,i,e,s,n){if(s){let s={passive:!0};(0,u.Lm)(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(i,e,s)}else{const s=n;t.removeEventListener(i,e,s)}}class f{constructor(t){this.container=t,this._canPush=!0,this._doMouseTouchClick=t=>{const i=this.container,e=i.actualOptions;if(this._canPush){const t=i.interactivity.mouse,s=t.position;if(!s)return;t.clickPosition={...s},t.clickTime=Date.now();const n=e.interactivity.events.onClick;(0,o.wJ)(n.mode,(t=>{this.container.handleClickMode(t)}))}"touchend"===t.type&&setTimeout((()=>{this._mouseTouchFinish()}),n.pH)},this._handleThemeChange=t=>{const i=t,e=this.container,s=e.options,n=s.defaultThemes,a=i.matches?n.dark:n.light,o=s.themes.find((t=>t.name===a));o?.default.auto&&e.loadTheme(a)},this._handleVisibilityChange=()=>{const t=this.container,i=t.actualOptions;this._mouseTouchFinish(),i.pauseOnBlur&&((0,o.T5)().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))},this._handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await t.windowResize()};this._resizeTimeout=setTimeout((()=>{t()}),this.container.actualOptions.interactivity.events.resize.delay*n.Xu)},this._manageInteractivityListeners=(t,i)=>{const e=this._handlers,s=this.container,a=s.actualOptions,o=s.interactivity.element;if(!o)return;const r=o,h=s.canvas;h.setPointerEvents(r===h.element?"initial":"none"),(a.interactivity.events.onHover.enable||a.interactivity.events.onClick.enable)&&(p(o,n.Rb,e.mouseMove,i),p(o,n.s7,e.touchStart,i),p(o,n.DG,e.touchMove,i),a.interactivity.events.onClick.enable?(p(o,n.Bp,e.touchEndClick,i),p(o,n.vo,e.mouseUp,i),p(o,n.ms,e.mouseDown,i)):p(o,n.Bp,e.touchEnd,i),p(o,t,e.mouseLeave,i),p(o,n.G3,e.touchCancel,i))},this._manageListeners=t=>{const i=this._handlers,e=this.container,s=e.actualOptions.interactivity.detectsOn,a=e.canvas.element;let o=n.Z0;s===d.h.window?(e.interactivity.element=window,o=n.sf):s===d.h.parent&&a?e.interactivity.element=a.parentElement??a.parentNode:e.interactivity.element=a,this._manageMediaMatch(t),this._manageResize(t),this._manageInteractivityListeners(o,t),p(document,n.nK,i.visibilityChange,t,!1)},this._manageMediaMatch=t=>{const i=this._handlers;this._matchMedia&&p(this._matchMedia,"change",i.themeChange,t)},this._manageResize=t=>{const i=this._handlers,e=this.container;if(!e.actualOptions.interactivity.events.resize.enable)return;if("undefined"==typeof ResizeObserver)return void p(globalThis,n.NF,i.resize,t);const s=e.canvas.element;this._resizeObserver&&!t?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&s&&(this._resizeObserver=new ResizeObserver((t=>{t.find((t=>t.target===s))&&this._handleWindowResize()})),this._resizeObserver.observe(s))},this._mouseDown=()=>{const{interactivity:t}=this.container,{mouse:i}=t;i.clicking=!0,i.downPosition=i.position},this._mouseTouchClick=t=>{const i=this.container,e=i.actualOptions,{mouse:s}=i.interactivity;s.inside=!0;let n=!1;const a=s.position;if(a&&e.interactivity.events.onClick.enable){for(const t of i.plugins.values())if(t.clickPositionValid&&(n=t.clickPositionValid(a),n))break;n||this._doMouseTouchClick(t),s.clicking=!1}},this._mouseTouchFinish=()=>{const{interactivity:t}=this.container,{mouse:i}=t;delete i.position,delete i.clickPosition,delete i.downPosition,t.status=n.Z0,i.inside=!1,i.clicking=!1},this._mouseTouchMove=t=>{const i=this.container,e=i.actualOptions,s=i.interactivity,a=i.canvas.element;if(!s.element)return;let o;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const i=t;if(s.element===window){if(a){const t=a.getBoundingClientRect();o={x:i.clientX-t.left,y:i.clientY-t.top}}}else if(e.interactivity.detectsOn===d.h.parent){const t=i.target,e=i.currentTarget;if(a){const s=t.getBoundingClientRect(),r=e.getBoundingClientRect(),h=a.getBoundingClientRect();o={x:i.offsetX+n.gd*s.left-(r.left+h.left),y:i.offsetY+n.gd*s.top-(r.top+h.top)}}else o={x:i.offsetX,y:i.offsetY}}else i.target===a&&(o={x:i.offsetX,y:i.offsetY})}else if(this._canPush="touchmove"!==t.type,a){const i=t,e=i.touches[i.touches.length-n.K3],s=a.getBoundingClientRect();if(!e)return;o={x:e.clientX-s.left,y:e.clientY-s.top}}const r=i.retina.pixelRatio;o&&(o.x*=r,o.y*=r),s.mouse.position=o,s.status=n.Rb},this._touchEnd=t=>{const i=t,e=Array.from(i.changedTouches);for(const t of e)this._touches.delete(t.identifier);this._mouseTouchFinish()},this._touchEndClick=t=>{const i=t,e=Array.from(i.changedTouches);for(const t of e)this._touches.delete(t.identifier);this._mouseTouchClick(t)},this._touchStart=t=>{const i=t,e=Array.from(i.changedTouches);for(const t of e)this._touches.set(t.identifier,performance.now());this._mouseTouchMove(t)},this._matchMedia=(0,o.lV)("(prefers-color-scheme: dark)"),this._touches=new Map,this._handlers={mouseDown:()=>{this._mouseDown()},mouseLeave:()=>{this._mouseTouchFinish()},mouseMove:t=>{this._mouseTouchMove(t)},mouseUp:t=>{this._mouseTouchClick(t)},touchStart:t=>{this._touchStart(t)},touchMove:t=>{this._mouseTouchMove(t)},touchEnd:t=>{this._touchEnd(t)},touchCancel:t=>{this._touchEnd(t)},touchEndClick:t=>{this._touchEndClick(t)},visibilityChange:()=>{this._handleVisibilityChange()},themeChange:t=>{this._handleThemeChange(t)},oldThemeChange:t=>{this._handleThemeChange(t)},resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}}var _=e(6991),g=e(3984),v=e(5536);class m{constructor(t,i){this.container=i,this._engine=t,this._interactors=[],this._externalInteractors=[],this._particleInteractors=[]}externalInteract(t){for(const i of this._externalInteractors)i.isEnabled()&&i.interact(t)}handleClickMode(t){for(const i of this._externalInteractors)i.handleClickMode?.(t)}async init(){this._interactors=await this._engine.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[];for(const t of this._interactors){switch(t.type){case v.e.external:this._externalInteractors.push(t);break;case v.e.particles:this._particleInteractors.push(t)}t.init()}}particlesInteract(t,i){for(const e of this._externalInteractors)e.clear(t,i);for(const e of this._particleInteractors)e.isEnabled(t)&&e.interact(t,i)}reset(t){for(const i of this._externalInteractors)i.isEnabled()&&i.reset(t);for(const i of this._particleInteractors)i.isEnabled(t)&&i.reset(t)}}var y=e(1690),w=e(560),b=e(4997),z=e(4342),P=e(1049),x=e(753),C=e(8627);function k(t){if(!(0,o.hn)(t.outMode,t.checkModes))return;const i=t.radius*n.gd;t.coord>t.maxCoord-i?t.setCb(-t.radius):t.coord<i&&t.setCb(t.radius)}class O{constructor(t,i){this.container=i,this._cachedOpacityData={opacity:n.hv,strokeOpacity:n.hv},this._cachedPosition=w.p.origin,this._cachedRotateData={sin:0,cos:0},this._cachedTransform={a:1,b:0,c:0,d:1},this._calcPosition=(t,i)=>{let e=n.rq,a=t?w.p.create(t.x,t.y,i):void 0;const o=this.container,r=Array.from(o.plugins.values()),h=this.options.move.outModes,c=this.getRadius(),l=o.canvas.size,d=new AbortController,{signal:u}=d;for(;!u.aborted;){for(const t of r){const e=t.particlePosition?.(a,this);if(e)return w.p.create(e.x,e.y,i)}const t=(0,s.Nx)({size:l,position:a}),o=w.p.create(t.x,t.y,i);this._fixHorizontal(o,c,h.left??h.default),this._fixHorizontal(o,c,h.right??h.default),this._fixVertical(o,c,h.top??h.default),this._fixVertical(o,c,h.bottom??h.default);let d=!0;for(const t of r)if(d=t.checkParticlePosition?.(this,o,e)??!0,!d)break;if(d)return o;e+=n.Eo,a=void 0}return a},this._calculateVelocity=()=>{const t=(0,s.$m)(this.direction).copy(),i=this.options.move;if(i.direction===z.F.inside||i.direction===z.F.outside)return t;const e=(0,s.pu)((0,s.VG)(i.angle.value)),a=(0,s.pu)((0,s.VG)(i.angle.offset)),o={left:a-e*n.MX,right:a+e*n.MX};return i.straight||(t.angle+=(0,s.vE)((0,s.DT)(o.left,o.right))),i.random&&"number"==typeof i.speed&&(t.length*=(0,s.G0)()),t},this._fixHorizontal=(t,i,e)=>{k({outMode:e,checkModes:[P.Y.bounce],coord:t.x,maxCoord:this.container.canvas.size.width,setCb:i=>t.x+=i,radius:i})},this._fixVertical=(t,i,e)=>{k({outMode:e,checkModes:[P.Y.bounce],coord:t.y,maxCoord:this.container.canvas.size.height,setCb:i=>t.y+=i,radius:i})},this._getRollColor=t=>{if(!t||!this.roll||!this.backColor&&!this.roll.alter)return t;const i=this.roll.horizontal&&this.roll.vertical?n.gd*n.l:n.l,e=this.roll.horizontal?Math.PI*n.MX:n.dv;return Math.floor((this.roll.angle+e)/(Math.PI/i))%n.gd?this.backColor?this.backColor:this.roll.alter?(0,a.yx)(t,this.roll.alter.type,this.roll.alter.value):t:t},this._initPosition=t=>{const i=this.container,e=(0,s.VG)(this.options.zIndex.value),a=this._calcPosition(t,(0,s.qE)(e,n.X_,i.zLayers));if(!a)throw new Error("a valid position cannot be found for particle");this.position=a,this.initialPosition=this.position.copy();const r=i.canvas.size;switch(this.moveCenter={...(0,o.E9)(this.options.move.center,r),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=(0,s.JY)(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case z.F.inside:this.outType=x.x.inside;break;case z.F.outside:this.outType=x.x.outside}this.offset=w.M.origin},this._engine=t}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this.container,e=this.pathGenerator,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const e of i.plugins.values())e.particleDestroyed?.(this,t);for(const e of i.particles.updaters)e.particleDestroyed?.(this,t);e?.reset(this),this._engine.dispatchEvent(_.B.particleDestroyed,{container:this.container,data:{particle:this}})}draw(t){const i=this.container,e=i.canvas;for(const s of i.plugins.values())e.drawParticlePlugin(s,this,t);e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:n.tA)}getFillColor(){return this._getRollColor(this.bubble.color??(0,r.O_)(this.color))}getMass(){return this.getRadius()**n.dm*Math.PI*n.MX}getOpacity(){const t=this.options.zIndex,i=(n.RV-this.zIndexFactor)**t.opacityRate,e=this.bubble.opacity??(0,s.VG)(this.opacity?.value??n.hv),a=this.strokeOpacity??e;return this._cachedOpacityData.opacity=e*i,this._cachedOpacityData.strokeOpacity=a*i,this._cachedOpacityData}getPosition(){return this._cachedPosition.x=this.position.x+this.offset.x,this._cachedPosition.y=this.position.y+this.offset.y,this._cachedPosition.z=this.position.z,this._cachedPosition}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this._cachedRotateData.sin=Math.sin(t),this._cachedRotateData.cos=Math.cos(t),this._cachedRotateData}getStrokeColor(){return this._getRollColor(this.bubble.color??(0,r.O_)(this.strokeColor))}getTransformData(t){const i=this.getRotateData(),e=this.isRotating;return this._cachedTransform.a=i.cos*(t.a??n.Ug.a),this._cachedTransform.b=e?i.sin*(t.b??n.D_):t.b??n.Ug.b,this._cachedTransform.c=e?-i.sin*(t.c??n.D_):t.c??n.Ug.c,this._cachedTransform.d=i.cos*(t.d??n.Ug.d),this._cachedTransform}init(t,i,e,a){const r=this.container,h=this._engine;this.id=t,this.group=a,this.effectClose=!0,this.effectFill=!0,this.shapeClose=!0,this.shapeFill=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType=x.x.normal,this.ignoresResizeRatio=!0;const c=r.retina.pixelRatio,l=r.actualOptions,d=(0,C.y)(this._engine,r,l.particles),u=d.reduceDuplicates,p=d.effect.type,f=d.shape.type;this.effect=(0,o.TA)(p,this.id,u),this.shape=(0,o.TA)(f,this.id,u);const _=d.effect,g=d.shape;if(e){if(e.effect?.type){const t=e.effect.type,i=(0,o.TA)(t,this.id,u);i&&(this.effect=i,_.load(e.effect))}if(e.shape?.type){const t=e.shape.type,i=(0,o.TA)(t,this.id,u);i&&(this.shape=i,g.load(e.shape))}}if(this.effect===n.mR){const t=[...this.container.effectDrawers.keys()];this.effect=t[Math.floor((0,s.G0)()*t.length)]}if(this.shape===n.mR){const t=[...this.container.shapeDrawers.keys()];this.shape=t[Math.floor((0,s.G0)()*t.length)]}this.effectData=this.effect?function(t,i,e,s){const n=i.options[t];return(0,o.zw)({close:i.close,fill:i.fill},(0,o.TA)(n,e,s))}(this.effect,_,this.id,u):void 0,this.shapeData=this.shape?function(t,i,e,s){const n=i.options[t];return(0,o.zw)({close:i.close,fill:i.fill},(0,o.TA)(n,e,s))}(this.shape,g,this.id,u):void 0,d.load(e);const v=this.effectData;v&&d.load(v.particles);const m=this.shapeData;m&&d.load(m.particles);const y=new b.k(h,r);y.load(r.actualOptions.interactivity),y.load(d.interactivity),this.interactivity=y,this.effectFill=v?.fill??d.effect.fill,this.effectClose=v?.close??d.effect.close,this.shapeFill=m?.fill??d.shape.fill,this.shapeClose=m?.close??d.shape.close,this.options=d;const w=this.options.move.path;this.pathDelay=(0,s.VG)(w.delay.value)*n.Xu,w.generator&&(this.pathGenerator=this._engine.getPathGenerator(w.generator),this.pathGenerator&&r.addPath(w.generator,this.pathGenerator)&&this.pathGenerator.init(r)),r.retina.initParticle(this),this.size=(0,o.Xs)(this.options.size,c),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(i),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=n.WH-(0,s.VG)(this.options.move.decay);const z=r.particles;let P,k;z.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/r.zLayers,this.sides=24,this.effect&&(P=r.effectDrawers.get(this.effect),P||(P=this._engine.getEffectDrawer(this.effect),P&&r.effectDrawers.set(this.effect,P))),P?.loadEffect&&P.loadEffect(this),this.shape&&(k=r.shapeDrawers.get(this.shape),k||(k=this._engine.getShapeDrawer(this.shape),k&&r.shapeDrawers.set(this.shape,k))),k?.loadShape&&k.loadShape(this);const O=k?.getSidesCount;O&&(this.sides=O(this)),this.spawning=!1;for(const t of z.updaters)t.init(this);for(const t of z.movers)t.init(this);P?.particleInit?.(r,this),k?.particleInit?.(r,this);for(const t of r.plugins.values())t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),i=this.container.canvas.size,e=this.position;return e.x>=-t&&e.y>=-t&&e.y<=i.height+t&&e.x<=i.width+t}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.container.particles.updaters)t.reset?.(this)}}var M=e(2186),T=e(6978);class D{constructor(t,i){this.rectangle=t,this.capacity=i,this._subdivide=()=>{const{x:t,y:i}=this.rectangle.position,{width:e,height:s}=this.rectangle.size,{capacity:a}=this;for(let o=0;o<n.Pg;o++){const r=o%n.gd;this._subs.push(new D(new T.M_(t+e*n.MX*r,i+s*n.MX*(Math.round(o*n.MX)-r),e*n.MX,s*n.MX),a))}this._divided=!0},this._points=[],this._divided=!1,this._subs=[]}insert(t){return!!this.rectangle.contains(t.position)&&(this._points.length<this.capacity?(this._points.push(t),!0):(this._divided||this._subdivide(),this._subs.some((i=>i.insert(t)))))}query(t,i){const e=[];if(!t.intersects(this.rectangle))return[];for(const n of this._points)!t.contains(n.position)&&(0,s.Yf)(t.position,n.position)>n.particle.getRadius()&&(!i||i(n.particle))||e.push(n.particle);if(this._divided)for(const s of this._subs)e.push(...s.query(t,i));return e}queryCircle(t,i,e){return this.query(new T.jl(t.x,t.y,i),e)}queryRectangle(t,i,e){return this.query(new T.M_(t.x,t.y,i.width,i.height),e)}}var R=e(183);const S=t=>{const{height:i,width:e}=t;return new T.M_(n.un*e,n.un*i,n.Rh*e,n.Rh*i)};class I{constructor(t,i){this._addToPool=(...t)=>{this._pool.push(...t)},this._applyDensity=(t,i,e,s)=>{const a=t.number;if(!a.density.enable)return void(void 0===e?this._limit=a.limit.value:(s?.number.limit.value??a.limit.value)&&this._groupLimits.set(e,s?.number.limit.value??a.limit.value));const o=this._initDensityFactor(a.density),r=a.value,h=a.limit.value>n.ou?a.limit.value:r,c=Math.min(r,h)*o+i,l=Math.min(this.count,this.filter((t=>t.group===e)).length);void 0===e?this._limit=a.limit.value*o:this._groupLimits.set(e,a.limit.value*o),l<c?this.push(Math.abs(c-l),void 0,t,e):l>c&&this.removeQuantity(l-c,e)},this._initDensityFactor=t=>{const i=this._container;if(!i.canvas.element||!t.enable)return n.lA;const e=i.canvas.element,s=i.retina.pixelRatio;return e.width*e.height/(t.height*t.width*s**n.dm)},this._pushParticle=(t,i,e,s)=>{try{const n=this._pool.pop()??new O(this._engine,this._container);n.init(this._nextId,t,i,e);let a=!0;if(s&&(a=s(n)),!a)return;return this._array.push(n),this._zArray.push(n),this._nextId++,this._engine.dispatchEvent(_.B.particleAdded,{container:this._container,data:{particle:n}}),n}catch(t){(0,R.t)().warning(`error adding particle: ${t}`)}},this._removeParticle=(t,i,e)=>{const s=this._array[t];if(!s)return!1;if(s.group!==i)return!1;const a=this._zArray.indexOf(s);return this._array.splice(t,n.LD),this._zArray.splice(a,n.LD),s.destroy(e),this._engine.dispatchEvent(_.B.particleRemoved,{container:this._container,data:{particle:s}}),this._addToPool(s),!0},this._engine=t,this._container=i,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._lastZIndex=0,this._interactionManager=new m(t,i),this._pluginsInitialized=!1;const e=i.canvas.size;this.quadTree=new D(S(e),n.Kw),this.movers=[],this.updaters=[]}get count(){return this._array.length}addManualParticles(){const t=this._container;t.actualOptions.manualParticles.forEach((i=>this.addParticle(i.position?(0,o.E9)(i.position,t.canvas.size):void 0,i.options)))}addParticle(t,i,e,s){const a=this._container.actualOptions.particles.number.limit.mode,o=void 0===e?this._limit:this._groupLimits.get(e)??this._limit,r=this.count;if(o>n.ou)switch(a){case y.d.delete:{const t=r+n.nq-o;t>n.wM&&this.removeQuantity(t);break}case y.d.wait:if(r>=o)return}return this._pushParticle(t,i,e,s)}clear(){this._array=[],this._zArray=[],this._pluginsInitialized=!1}destroy(){this._array=[],this._zArray=[],this.movers=[],this.updaters=[]}drawParticles(t){for(const i of this._zArray)i.draw(t)}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}handleClickMode(t){this._interactionManager.handleClickMode(t)}async init(){const t=this._container,i=t.actualOptions;this._lastZIndex=0,this._needsSort=!1,await this.initPlugins();let e=!1;for(const i of t.plugins.values())if(e=i.particlesInitialization?.()??e,e)break;if(this.addManualParticles(),!e){const t=i.particles,e=t.groups;for(const i in e){const s=e[i];if(s)for(let e=this.count,n=0;n<s.number.value&&e<t.number.value;e++,n++)this.addParticle(void 0,s,i)}for(let i=this.count;i<t.number.value;i++)this.addParticle()}}async initPlugins(){if(this._pluginsInitialized)return;const t=this._container;this.movers=await this._engine.getMovers(t,!0),this.updaters=await this._engine.getUpdaters(t,!0),await this._interactionManager.init();for(const i of t.pathGenerators.values())i.init(t)}push(t,i,e,s){for(let n=0;n<t;n++)this.addParticle(i?.position,e,s)}async redraw(){this.clear(),await this.init(),this._container.canvas.drawParticles({value:0,factor:0})}remove(t,i,e){this.removeAt(this._array.indexOf(t),void 0,i,e)}removeAt(t,i=n.xd,e,s){if(t<n.z9||t>this.count)return;let a=0;for(let n=t;a<i&&n<this.count;n++)this._removeParticle(n,e,s)&&(n--,a++)}removeQuantity(t,i){this.removeAt(n.z9,t,i)}setDensity(){const t=this._container.actualOptions,i=t.particles.groups,e=t.manualParticles.length;for(const t in i){const s=i[t];if(!s)continue;const n=(0,C.y)(this._engine,this._container,s);this._applyDensity(n,e,t)}this._applyDensity(t.particles,e)}setLastZIndex(t){this._lastZIndex=t,this._needsSort=this._needsSort||this._lastZIndex<t}setResizeFactor(t){this._resizeFactor=t}update(t){const i=this._container,e=new Set;this.quadTree=new D(S(i.canvas.size),n.Kw);for(const t of i.pathGenerators.values())t.update();for(const e of i.plugins.values())e.update?.(t);const s=this._resizeFactor;for(const i of this._array){s&&!i.ignoresResizeRatio&&(i.position.x*=s.width,i.position.y*=s.height,i.initialPosition.x*=s.width,i.initialPosition.y*=s.height),i.ignoresResizeRatio=!1,this._interactionManager.reset(i);for(const e of this._container.plugins.values()){if(i.destroyed)break;e.particleUpdate?.(i,t)}for(const e of this.movers)e.isEnabled(i)&&e.move(i,t);i.destroyed?e.add(i):this.quadTree.insert(new M.b(i.getPosition(),i))}if(e.size){const t=t=>!e.has(t);this._array=this.filter(t),this._zArray=this._zArray.filter(t);for(const t of e)this._engine.dispatchEvent(_.B.particleRemoved,{container:this._container,data:{particle:t}});this._addToPool(...e)}this._interactionManager.externalInteract(t);for(const i of this._array){for(const e of this.updaters)e.update(i,t);i.destroyed||i.spawning||this._interactionManager.particlesInteract(i,t)}if(delete this._resizeFactor,this._needsSort){const t=this._zArray;t.sort(((t,i)=>i.position.z-t.position.z||t.id-i.id));const i=t[t.length-n.K3];if(!i)return;this._lastZIndex=i.position.z,this._needsSort=!1}}}class E{constructor(t){this.container=t,this.pixelRatio=n.$x,this.reduceFactor=n.Zp}init(){const t=this.container,i=t.actualOptions;this.pixelRatio=i.detectRetina?devicePixelRatio:n.$x,this.reduceFactor=n.Zp;const e=this.pixelRatio,a=t.canvas;if(a.element){const t=a.element;a.size.width=t.offsetWidth*e,a.size.height=t.offsetHeight*e}const o=i.particles,r=o.move;this.maxSpeed=(0,s.VG)(r.gravity.maxSpeed)*e,this.sizeAnimationSpeed=(0,s.VG)(o.size.animation.speed)*e}initParticle(t){const i=t.options,e=this.pixelRatio,n=i.move,a=n.distance,o=t.retina;o.moveDrift=(0,s.VG)(n.drift)*e,o.moveSpeed=(0,s.VG)(n.speed)*e,o.sizeAnimationSpeed=(0,s.VG)(i.size.animation.speed)*e;const r=o.maxDistance;r.horizontal=void 0!==a.horizontal?a.horizontal*e:void 0,r.vertical=void 0!==a.vertical?a.vertical*e:void 0,o.maxSpeed=(0,s.VG)(n.gravity.maxSpeed)*e}}function F(t){return!t.destroyed}function L(t,i,...e){const s=new g.J(t,i);return(0,C.Z)(s,...e),s}class A{constructor(t,i,e){this._delta={value:0,factor:0},this._intersectionManager=t=>{if(F(this)&&this.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivity.element&&(i.isIntersecting?this.play():this.pause())},this._nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+n.Xu/this.fpsLimit)return void this.draw(!1);if(this._lastFrameTime??=t,function(t,i,e=n.z$,s=!1){t.value=i,t.factor=s?n.z$/e:n.z$*i/n.Xu}(this._delta,t-this._lastFrameTime,this.fpsLimit,this._smooth),this.addLifeTime(this._delta.value),this._lastFrameTime=t,this._delta.value>n.Xu)return void this.draw(!1);if(this.canvas.drawParticles(this._delta),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){(0,R.t)().error("error in animation loop",t)}},this._engine=t,this.id=Symbol(i),this.fpsLimit=120,this.hdr=!1,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._clickHandlers=new Map,this._sourceOptions=e,this._initialSourceOptions=e,this.retina=new E(this),this.canvas=new l(this,this._engine),this.particles=new I(this._engine,this),this.pathGenerators=new Map,this.interactivity={mouse:{clicking:!1,inside:!1}},this.plugins=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this._options=L(this._engine,this),this.actualOptions=L(this._engine,this),this._eventListeners=new f(this),this._intersectionObserver=(0,o.BR)((t=>{this._intersectionManager(t)})),this._engine.dispatchEvent(_.B.containerBuilt,{container:this})}get animationStatus(){return!this._paused&&!this.pageHidden&&F(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(t){if(!F(this))return;const i=this.interactivity.element;if(!i)return;const e=(i,e,s)=>{if(!F(this))return;const n=this.retina.pixelRatio,a={x:e.x*n,y:e.y*n},o=this.particles.quadTree.queryCircle(a,s*n);t(i,o)};let s=!1,a=!1;this._clickHandlers.set("click",(t=>{if(!F(this))return;const i=t,s={x:i.offsetX||i.clientX,y:i.offsetY||i.clientY};e(t,s,n.FS)})),this._clickHandlers.set("touchstart",(()=>{F(this)&&(s=!0,a=!1)})),this._clickHandlers.set("touchmove",(()=>{F(this)&&(a=!0)})),this._clickHandlers.set("touchend",(t=>{if(F(this)){if(s&&!a){const i=t,s=i.touches[i.touches.length-n.KZ];if(!s)return;const a=this.canvas.element,o=a?a.getBoundingClientRect():void 0,r={x:s.clientX-(o?o.left:n.TL),y:s.clientY-(o?o.top:n.TL)};e(t,r,Math.max(s.radiusX,s.radiusY))}s=!1,a=!1}})),this._clickHandlers.set("touchcancel",(()=>{F(this)&&(s=!1,a=!1)}));for(const[t,e]of this._clickHandlers)i.addEventListener(t,e)}addLifeTime(t){this._lifeTime+=t}addPath(t,i,e=!1){return!(!F(this)||!e&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,i),!0)}alive(){return!this._duration||this._lifeTime<=this._duration}clearClickHandlers(){if(F(this)){for(const[t,i]of this._clickHandlers)this.interactivity.element?.removeEventListener(t,i);this._clickHandlers.clear()}}destroy(t=!0){if(F(this)){this.stop(),this.clearClickHandlers(),this.particles.destroy(),this.canvas.destroy();for(const t of this.effectDrawers.values())t.destroy?.(this);this.effectDrawers.clear();for(const t of this.shapeDrawers.values())t.destroy?.(this);if(this.shapeDrawers.clear(),this._engine.clearPlugins(this),this.destroyed=!0,t){const t=this._engine.items,i=t.findIndex((t=>t===this));i>=n.vF&&t.splice(i,n.JC)}this._engine.dispatchEvent(_.B.containerDestroyed,{container:this})}}draw(t){if(!F(this))return;let i=t;const e=t=>{i&&(this._lastFrameTime=void 0,i=!1),this._nextFrame(t)};this._drawAnimationFrame=(0,s.i0)((t=>{e(t)}))}async export(t,i={}){for(const e of this.plugins.values()){if(!e.export)continue;const s=await e.export(t,i);if(s.supported)return s.blob}(0,R.t)().error(`Export plugin with type ${t} not found`)}handleClickMode(t){if(F(this)){this.particles.handleClickMode(t);for(const i of this.plugins.values())i.handleClickMode?.(t)}}async init(){if(!F(this))return;const t=this._engine.getSupportedEffects();for(const i of t){const t=this._engine.getEffectDrawer(i);t&&this.effectDrawers.set(i,t)}const i=this._engine.getSupportedShapes();for(const t of i){const i=this._engine.getShapeDrawer(t);i&&this.shapeDrawers.set(t,i)}await this.particles.initPlugins(),this._options=L(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=L(this._engine,this,this._options);const e=await this._engine.getAvailablePlugins(this);for(const[t,i]of e)this.plugins.set(t,i);this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:a,duration:o,fpsLimit:r,hdr:h,smooth:c,zLayers:l}=this.actualOptions;this.hdr=h,this.zLayers=l,this._duration=(0,s.VG)(o)*n.Xu,this._delay=(0,s.VG)(a)*n.Xu,this._lifeTime=0,this.fpsLimit=r>n.DN?r:n.i8,this._smooth=c;for(const t of this.effectDrawers.values())await(t.init?.(this));for(const t of this.shapeDrawers.values())await(t.init?.(this));for(const t of this.plugins.values())await(t.init?.());this._engine.dispatchEvent(_.B.containerInit,{container:this}),await this.particles.init(),this.particles.setDensity();for(const t of this.plugins.values())t.particlesSetup?.();this._engine.dispatchEvent(_.B.particlesSetup,{container:this})}async loadTheme(t){F(this)&&(this._currentTheme=t,await this.refresh())}pause(){if(F(this)&&(void 0!==this._drawAnimationFrame&&((0,s.px)(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins.values())t.pause?.();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent(_.B.containerPaused,{container:this})}}play(t){if(!F(this))return;const i=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),i)for(const t of this.plugins.values())t.play&&t.play();this._engine.dispatchEvent(_.B.containerPlay,{container:this}),this.draw(i??!1)}else this._firstStart=!1}async refresh(){if(F(this))return this.stop(),this.start()}async reset(t){if(F(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=L(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=L(this._engine,this,this._options),this.refresh()}async start(){F(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise((t=>{const i=async()=>{this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element);for(const t of this.plugins.values())await(t.start?.());this._engine.dispatchEvent(_.B.containerStarted,{container:this}),this.play(),t()};this._delayTimeout=setTimeout((()=>{i()}),this._delay)})))}stop(){if(F(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(this.interactivity.element);for(const t of this.plugins.values())t.stop?.();for(const t of this.plugins.keys())this.plugins.delete(t);this._sourceOptions=this._options,this._engine.dispatchEvent(_.B.containerStopped,{container:this})}}updateActualOptions(){this.actualOptions.responsive=[];const t=this.actualOptions.setResponsive(this.canvas.size.width,this.retina.pixelRatio,this._options);return this.actualOptions.setTheme(this._currentTheme),this._responsiveMaxWidth!==t&&(this._responsiveMaxWidth=t,!0)}}}}]);
|
package/638.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Engine v4.0.0-alpha.3 by Matteo Bruni */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { InteractorType } from "../../Enums/Types/InteractorType.js";
|
|
2
|
-
export class InteractionManager {
|
|
3
|
-
constructor(engine, container) {
|
|
4
|
-
this.container = container;
|
|
5
|
-
this._engine = engine;
|
|
6
|
-
this._interactors = [];
|
|
7
|
-
this._externalInteractors = [];
|
|
8
|
-
this._particleInteractors = [];
|
|
9
|
-
}
|
|
10
|
-
externalInteract(delta) {
|
|
11
|
-
for (const interactor of this._externalInteractors) {
|
|
12
|
-
if (interactor.isEnabled()) {
|
|
13
|
-
interactor.interact(delta);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
handleClickMode(mode) {
|
|
18
|
-
for (const interactor of this._externalInteractors) {
|
|
19
|
-
interactor.handleClickMode?.(mode);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
async init() {
|
|
23
|
-
this._interactors = await this._engine.getInteractors(this.container, true);
|
|
24
|
-
this._externalInteractors = [];
|
|
25
|
-
this._particleInteractors = [];
|
|
26
|
-
for (const interactor of this._interactors) {
|
|
27
|
-
switch (interactor.type) {
|
|
28
|
-
case InteractorType.external:
|
|
29
|
-
this._externalInteractors.push(interactor);
|
|
30
|
-
break;
|
|
31
|
-
case InteractorType.particles:
|
|
32
|
-
this._particleInteractors.push(interactor);
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
35
|
-
interactor.init();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
particlesInteract(particle, delta) {
|
|
39
|
-
for (const interactor of this._externalInteractors) {
|
|
40
|
-
interactor.clear(particle, delta);
|
|
41
|
-
}
|
|
42
|
-
for (const interactor of this._particleInteractors) {
|
|
43
|
-
if (interactor.isEnabled(particle)) {
|
|
44
|
-
interactor.interact(particle, delta);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
reset(particle) {
|
|
49
|
-
for (const interactor of this._externalInteractors) {
|
|
50
|
-
if (interactor.isEnabled()) {
|
|
51
|
-
interactor.reset(particle);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
for (const interactor of this._particleInteractors) {
|
|
55
|
-
if (interactor.isEnabled(particle)) {
|
|
56
|
-
interactor.reset(particle);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { isNull } from "../../../../Utils/TypeUtils.js";
|
|
2
|
-
export class ClickEvent {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.enable = false;
|
|
5
|
-
this.mode = [];
|
|
6
|
-
}
|
|
7
|
-
load(data) {
|
|
8
|
-
if (isNull(data)) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
if (data.enable !== undefined) {
|
|
12
|
-
this.enable = data.enable;
|
|
13
|
-
}
|
|
14
|
-
if (data.mode !== undefined) {
|
|
15
|
-
this.mode = data.mode;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { DivType } from "../../../../Enums/Types/DivType.js";
|
|
2
|
-
import { isNull } from "../../../../Utils/TypeUtils.js";
|
|
3
|
-
export class DivEvent {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.selectors = [];
|
|
6
|
-
this.enable = false;
|
|
7
|
-
this.mode = [];
|
|
8
|
-
this.type = DivType.circle;
|
|
9
|
-
}
|
|
10
|
-
load(data) {
|
|
11
|
-
if (isNull(data)) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
if (data.selectors !== undefined) {
|
|
15
|
-
this.selectors = data.selectors;
|
|
16
|
-
}
|
|
17
|
-
if (data.enable !== undefined) {
|
|
18
|
-
this.enable = data.enable;
|
|
19
|
-
}
|
|
20
|
-
if (data.mode !== undefined) {
|
|
21
|
-
this.mode = data.mode;
|
|
22
|
-
}
|
|
23
|
-
if (data.type !== undefined) {
|
|
24
|
-
this.type = data.type;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ClickEvent } from "./ClickEvent.js";
|
|
2
|
-
import { DivEvent } from "./DivEvent.js";
|
|
3
|
-
import { HoverEvent } from "./HoverEvent.js";
|
|
4
|
-
import { ResizeEvent } from "./ResizeEvent.js";
|
|
5
|
-
import { executeOnSingleOrMultiple } from "../../../../Utils/Utils.js";
|
|
6
|
-
import { isNull } from "../../../../Utils/TypeUtils.js";
|
|
7
|
-
export class Events {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.onClick = new ClickEvent();
|
|
10
|
-
this.onDiv = new DivEvent();
|
|
11
|
-
this.onHover = new HoverEvent();
|
|
12
|
-
this.resize = new ResizeEvent();
|
|
13
|
-
}
|
|
14
|
-
load(data) {
|
|
15
|
-
if (isNull(data)) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
this.onClick.load(data.onClick);
|
|
19
|
-
const onDiv = data.onDiv;
|
|
20
|
-
if (onDiv !== undefined) {
|
|
21
|
-
this.onDiv = executeOnSingleOrMultiple(onDiv, t => {
|
|
22
|
-
const tmp = new DivEvent();
|
|
23
|
-
tmp.load(t);
|
|
24
|
-
return tmp;
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
this.onHover.load(data.onHover);
|
|
28
|
-
this.resize.load(data.resize);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Parallax } from "./Parallax.js";
|
|
2
|
-
import { isNull } from "../../../../Utils/TypeUtils.js";
|
|
3
|
-
export class HoverEvent {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.enable = false;
|
|
6
|
-
this.mode = [];
|
|
7
|
-
this.parallax = new Parallax();
|
|
8
|
-
}
|
|
9
|
-
load(data) {
|
|
10
|
-
if (isNull(data)) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
if (data.enable !== undefined) {
|
|
14
|
-
this.enable = data.enable;
|
|
15
|
-
}
|
|
16
|
-
if (data.mode !== undefined) {
|
|
17
|
-
this.mode = data.mode;
|
|
18
|
-
}
|
|
19
|
-
this.parallax.load(data.parallax);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { isNull } from "../../../../Utils/TypeUtils.js";
|
|
2
|
-
export class Parallax {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.enable = false;
|
|
5
|
-
this.force = 2;
|
|
6
|
-
this.smooth = 10;
|
|
7
|
-
}
|
|
8
|
-
load(data) {
|
|
9
|
-
if (isNull(data)) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
if (data.enable !== undefined) {
|
|
13
|
-
this.enable = data.enable;
|
|
14
|
-
}
|
|
15
|
-
if (data.force !== undefined) {
|
|
16
|
-
this.force = data.force;
|
|
17
|
-
}
|
|
18
|
-
if (data.smooth !== undefined) {
|
|
19
|
-
this.smooth = data.smooth;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Events } from "./Events/Events.js";
|
|
2
|
-
import { InteractivityDetect } from "../../../Enums/InteractivityDetect.js";
|
|
3
|
-
import { Modes } from "./Modes/Modes.js";
|
|
4
|
-
import { isNull } from "../../../Utils/TypeUtils.js";
|
|
5
|
-
export class Interactivity {
|
|
6
|
-
constructor(engine, container) {
|
|
7
|
-
this.detectsOn = InteractivityDetect.window;
|
|
8
|
-
this.events = new Events();
|
|
9
|
-
this.modes = new Modes(engine, container);
|
|
10
|
-
}
|
|
11
|
-
load(data) {
|
|
12
|
-
if (isNull(data)) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
const detectsOn = data.detectsOn;
|
|
16
|
-
if (detectsOn !== undefined) {
|
|
17
|
-
this.detectsOn = detectsOn;
|
|
18
|
-
}
|
|
19
|
-
this.events.load(data.events);
|
|
20
|
-
this.modes.load(data.modes);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { isNull } from "../../../../Utils/TypeUtils.js";
|
|
2
|
-
export class Modes {
|
|
3
|
-
constructor(engine, container) {
|
|
4
|
-
this._engine = engine;
|
|
5
|
-
this._container = container;
|
|
6
|
-
}
|
|
7
|
-
load(data) {
|
|
8
|
-
if (isNull(data)) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
if (!this._container) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
const interactors = this._engine.interactors.get(this._container);
|
|
15
|
-
if (!interactors) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
for (const interactor of interactors) {
|
|
19
|
-
if (!interactor.loadModeOptions) {
|
|
20
|
-
continue;
|
|
21
|
-
}
|
|
22
|
-
interactor.loadModeOptions(this, data);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { PixelMode } from "../../Enums/Modes/PixelMode.js";
|
|
2
|
-
import { deepExtend } from "../../Utils/Utils.js";
|
|
3
|
-
import { isNull } from "../../Utils/TypeUtils.js";
|
|
4
|
-
import { manualDefaultPosition } from "../../Core/Utils/Constants.js";
|
|
5
|
-
export class ManualParticle {
|
|
6
|
-
load(data) {
|
|
7
|
-
if (isNull(data)) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
if (data.position) {
|
|
11
|
-
this.position = {
|
|
12
|
-
x: data.position.x ?? manualDefaultPosition,
|
|
13
|
-
y: data.position.y ?? manualDefaultPosition,
|
|
14
|
-
mode: data.position.mode ?? PixelMode.percent,
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
if (data.options) {
|
|
18
|
-
this.options = deepExtend({}, data.options);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ResponsiveMode } from "../../Enums/Modes/ResponsiveMode.js";
|
|
2
|
-
import { deepExtend } from "../../Utils/Utils.js";
|
|
3
|
-
import { isNull } from "../../Utils/TypeUtils.js";
|
|
4
|
-
export class Responsive {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.maxWidth = Infinity;
|
|
7
|
-
this.options = {};
|
|
8
|
-
this.mode = ResponsiveMode.canvas;
|
|
9
|
-
}
|
|
10
|
-
load(data) {
|
|
11
|
-
if (isNull(data)) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
if (!isNull(data.maxWidth)) {
|
|
15
|
-
this.maxWidth = data.maxWidth;
|
|
16
|
-
}
|
|
17
|
-
if (!isNull(data.mode)) {
|
|
18
|
-
if (data.mode === ResponsiveMode.screen) {
|
|
19
|
-
this.mode = ResponsiveMode.screen;
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
this.mode = ResponsiveMode.canvas;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
if (!isNull(data.options)) {
|
|
26
|
-
this.options = deepExtend({}, data.options);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ThemeDefault } from "./ThemeDefault.js";
|
|
2
|
-
import { deepExtend } from "../../../Utils/Utils.js";
|
|
3
|
-
import { isNull } from "../../../Utils/TypeUtils.js";
|
|
4
|
-
export class Theme {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.name = "";
|
|
7
|
-
this.default = new ThemeDefault();
|
|
8
|
-
}
|
|
9
|
-
load(data) {
|
|
10
|
-
if (isNull(data)) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
if (data.name !== undefined) {
|
|
14
|
-
this.name = data.name;
|
|
15
|
-
}
|
|
16
|
-
this.default.load(data.default);
|
|
17
|
-
if (data.options !== undefined) {
|
|
18
|
-
this.options = deepExtend({}, data.options);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ThemeMode } from "../../../Enums/Modes/ThemeMode.js";
|
|
2
|
-
import { isNull } from "../../../Utils/TypeUtils.js";
|
|
3
|
-
export class ThemeDefault {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.auto = false;
|
|
6
|
-
this.mode = ThemeMode.any;
|
|
7
|
-
this.value = false;
|
|
8
|
-
}
|
|
9
|
-
load(data) {
|
|
10
|
-
if (isNull(data)) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
if (data.auto !== undefined) {
|
|
14
|
-
this.auto = data.auto;
|
|
15
|
-
}
|
|
16
|
-
if (data.mode !== undefined) {
|
|
17
|
-
this.mode = data.mode;
|
|
18
|
-
}
|
|
19
|
-
if (data.value !== undefined) {
|
|
20
|
-
this.value = data.value;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|