@tsparticles/engine 4.0.0-alpha.1 → 4.0.0-alpha.14
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/219.min.js +1 -0
- package/README.md +2 -5
- package/browser/Core/Canvas.js +238 -154
- package/browser/Core/Container.js +111 -227
- package/browser/Core/Engine.js +84 -124
- package/browser/Core/Particle.js +236 -140
- package/browser/Core/Particles.js +212 -123
- package/browser/Core/Retina.js +5 -0
- package/browser/Core/Utils/Constants.js +2 -2
- package/browser/Core/Utils/EventListeners.js +69 -310
- package/browser/Core/Utils/Point.js +2 -0
- package/browser/Core/Utils/QuadTree.js +13 -8
- package/browser/Core/Utils/Ranges.js +4 -0
- package/browser/Core/Utils/Vectors.js +7 -4
- package/browser/Enums/Types/EasingType.js +18 -3
- package/browser/Options/Classes/AnimatableColor.js +1 -0
- package/browser/Options/Classes/AnimationOptions.js +8 -0
- package/browser/Options/Classes/Background/Background.js +6 -0
- package/browser/Options/Classes/ColorAnimation.js +1 -0
- package/browser/Options/Classes/FullScreen/FullScreen.js +2 -0
- package/browser/Options/Classes/HslAnimation.js +3 -5
- package/browser/Options/Classes/Options.js +32 -78
- package/browser/Options/Classes/OptionsColor.js +1 -0
- package/browser/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
- package/browser/Options/Classes/Particles/Effect/Effect.js +4 -0
- package/browser/Options/Classes/Particles/Move/Move.js +18 -0
- package/browser/Options/Classes/Particles/Move/MoveAngle.js +2 -0
- package/browser/Options/Classes/Particles/Move/MoveAttract.js +3 -0
- package/browser/Options/Classes/Particles/Move/MoveCenter.js +4 -0
- package/browser/Options/Classes/Particles/Move/MoveGravity.js +4 -0
- package/browser/Options/Classes/Particles/Move/OutModes.js +5 -0
- package/browser/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
- package/browser/Options/Classes/Particles/Move/Spin.js +3 -0
- package/browser/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
- package/browser/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
- package/browser/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
- package/browser/Options/Classes/Particles/Opacity/Opacity.js +1 -0
- package/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
- package/browser/Options/Classes/Particles/ParticlesOptions.js +19 -11
- package/browser/Options/Classes/Particles/Shape/Shape.js +4 -0
- package/browser/Options/Classes/Particles/Size/Size.js +1 -0
- package/browser/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
- package/browser/Options/Classes/Particles/Stroke.js +3 -0
- package/browser/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
- package/{esm/Options/Classes/Interactivity/Events → browser/Options/Classes}/ResizeEvent.js +3 -1
- package/browser/Options/Classes/ValueWithRandom.js +3 -4
- package/browser/Utils/CanvasUtils.js +31 -106
- package/browser/Utils/ColorUtils.js +17 -2
- package/browser/Utils/EventDispatcher.js +1 -0
- package/browser/Utils/MathUtils.js +3 -2
- package/browser/Utils/Utils.js +53 -44
- package/browser/exports.js +1 -21
- package/cjs/Core/Canvas.js +238 -154
- package/cjs/Core/Container.js +111 -227
- package/cjs/Core/Engine.js +84 -124
- package/cjs/Core/Particle.js +236 -140
- package/cjs/Core/Particles.js +212 -123
- package/cjs/Core/Retina.js +5 -0
- package/cjs/Core/Utils/Constants.js +2 -2
- package/cjs/Core/Utils/EventListeners.js +69 -310
- package/cjs/Core/Utils/Point.js +2 -0
- package/cjs/Core/Utils/QuadTree.js +13 -8
- package/cjs/Core/Utils/Ranges.js +4 -0
- package/cjs/Core/Utils/Vectors.js +7 -4
- package/cjs/Enums/Types/EasingType.js +18 -3
- package/cjs/Options/Classes/AnimatableColor.js +1 -0
- package/cjs/Options/Classes/AnimationOptions.js +8 -0
- package/cjs/Options/Classes/Background/Background.js +6 -0
- package/cjs/Options/Classes/ColorAnimation.js +1 -0
- package/cjs/Options/Classes/FullScreen/FullScreen.js +2 -0
- package/cjs/Options/Classes/HslAnimation.js +3 -5
- package/cjs/Options/Classes/Options.js +32 -78
- package/cjs/Options/Classes/OptionsColor.js +1 -0
- package/cjs/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
- package/cjs/Options/Classes/Particles/Effect/Effect.js +4 -0
- package/cjs/Options/Classes/Particles/Move/Move.js +18 -0
- package/cjs/Options/Classes/Particles/Move/MoveAngle.js +2 -0
- package/cjs/Options/Classes/Particles/Move/MoveAttract.js +3 -0
- package/cjs/Options/Classes/Particles/Move/MoveCenter.js +4 -0
- package/cjs/Options/Classes/Particles/Move/MoveGravity.js +4 -0
- package/cjs/Options/Classes/Particles/Move/OutModes.js +5 -0
- package/cjs/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
- package/cjs/Options/Classes/Particles/Move/Spin.js +3 -0
- package/cjs/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
- package/cjs/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
- package/cjs/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
- package/cjs/Options/Classes/Particles/Opacity/Opacity.js +1 -0
- package/cjs/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
- package/cjs/Options/Classes/Particles/ParticlesOptions.js +19 -11
- package/cjs/Options/Classes/Particles/Shape/Shape.js +4 -0
- package/cjs/Options/Classes/Particles/Size/Size.js +1 -0
- package/cjs/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
- package/cjs/Options/Classes/Particles/Stroke.js +3 -0
- package/cjs/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
- package/cjs/Options/Classes/{Interactivity/Events/ResizeEvent.js → ResizeEvent.js} +3 -1
- package/cjs/Options/Classes/ValueWithRandom.js +3 -4
- package/cjs/Utils/CanvasUtils.js +31 -106
- package/cjs/Utils/ColorUtils.js +17 -2
- package/cjs/Utils/EventDispatcher.js +1 -0
- package/cjs/Utils/MathUtils.js +3 -2
- package/cjs/Utils/Utils.js +53 -44
- package/cjs/exports.js +1 -21
- package/dist_browser_Core_Container_js.js +8 -18
- package/esm/Core/Canvas.js +238 -154
- package/esm/Core/Container.js +111 -227
- package/esm/Core/Engine.js +84 -124
- package/esm/Core/Particle.js +236 -140
- package/esm/Core/Particles.js +212 -123
- package/esm/Core/Retina.js +5 -0
- package/esm/Core/Utils/Constants.js +2 -2
- package/esm/Core/Utils/EventListeners.js +69 -310
- package/esm/Core/Utils/Point.js +2 -0
- package/esm/Core/Utils/QuadTree.js +13 -8
- package/esm/Core/Utils/Ranges.js +4 -0
- package/esm/Core/Utils/Vectors.js +7 -4
- package/esm/Enums/Types/EasingType.js +18 -3
- package/esm/Options/Classes/AnimatableColor.js +1 -0
- package/esm/Options/Classes/AnimationOptions.js +8 -0
- package/esm/Options/Classes/Background/Background.js +6 -0
- package/esm/Options/Classes/ColorAnimation.js +1 -0
- package/esm/Options/Classes/FullScreen/FullScreen.js +2 -0
- package/esm/Options/Classes/HslAnimation.js +3 -5
- package/esm/Options/Classes/Options.js +32 -78
- package/esm/Options/Classes/OptionsColor.js +1 -0
- package/esm/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
- package/esm/Options/Classes/Particles/Effect/Effect.js +4 -0
- package/esm/Options/Classes/Particles/Move/Move.js +18 -0
- package/esm/Options/Classes/Particles/Move/MoveAngle.js +2 -0
- package/esm/Options/Classes/Particles/Move/MoveAttract.js +3 -0
- package/esm/Options/Classes/Particles/Move/MoveCenter.js +4 -0
- package/esm/Options/Classes/Particles/Move/MoveGravity.js +4 -0
- package/esm/Options/Classes/Particles/Move/OutModes.js +5 -0
- package/esm/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
- package/esm/Options/Classes/Particles/Move/Spin.js +3 -0
- package/esm/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
- package/esm/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
- package/esm/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
- package/esm/Options/Classes/Particles/Opacity/Opacity.js +1 -0
- package/esm/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
- package/esm/Options/Classes/Particles/ParticlesOptions.js +19 -11
- package/esm/Options/Classes/Particles/Shape/Shape.js +4 -0
- package/esm/Options/Classes/Particles/Size/Size.js +1 -0
- package/esm/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
- package/esm/Options/Classes/Particles/Stroke.js +3 -0
- package/esm/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
- package/{browser/Options/Classes/Interactivity/Events → esm/Options/Classes}/ResizeEvent.js +3 -1
- package/esm/Options/Classes/ValueWithRandom.js +3 -4
- package/esm/Utils/CanvasUtils.js +31 -106
- package/esm/Utils/ColorUtils.js +17 -2
- package/esm/Utils/EventDispatcher.js +1 -0
- package/esm/Utils/MathUtils.js +3 -2
- package/esm/Utils/Utils.js +53 -44
- package/esm/exports.js +1 -21
- package/package.json +1 -1
- package/report.html +3 -3
- package/scripts/install.js +28 -9
- package/tsparticles.engine.js +67 -247
- package/tsparticles.engine.min.js +2 -2
- package/types/Core/Canvas.d.ts +15 -4
- package/types/Core/Container.d.ts +5 -20
- package/types/Core/Engine.d.ts +18 -32
- package/types/Core/Interfaces/IColorManager.d.ts +0 -1
- package/types/Core/Interfaces/IContainerPlugin.d.ts +12 -2
- package/types/Core/Interfaces/IDrawParticleParams.d.ts +1 -1
- package/types/Core/Interfaces/IMovePathGenerator.d.ts +1 -2
- package/types/Core/Interfaces/IParticleOpacityData.d.ts +4 -0
- package/types/Core/Interfaces/IParticleRotateData.d.ts +4 -0
- package/types/Core/Interfaces/IParticleTransformValues.d.ts +4 -4
- package/types/Core/Interfaces/IParticleUpdater.d.ts +1 -1
- package/types/Core/Interfaces/IPlugin.d.ts +5 -1
- package/types/Core/Interfaces/IShapeDrawer.d.ts +0 -1
- package/types/Core/Particle.d.ts +13 -2
- package/types/Core/Particles.d.ts +17 -8
- package/types/Core/Utils/Constants.d.ts +2 -2
- package/types/Core/Utils/EventListeners.d.ts +0 -14
- package/types/Enums/Types/EasingType.d.ts +20 -5
- package/types/Options/Classes/HslAnimation.d.ts +3 -4
- 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/Classes/ValueWithRandom.d.ts +0 -1
- package/types/Options/Interfaces/IOptions.d.ts +2 -8
- package/types/Options/Interfaces/Particles/IParticlesOptions.d.ts +0 -3
- package/types/Types/CustomEventListener.d.ts +1 -1
- package/types/Types/EngineInitializers.d.ts +19 -0
- package/types/Utils/CanvasUtils.d.ts +6 -25
- package/types/Utils/EventDispatcher.d.ts +1 -1
- package/types/Utils/Utils.d.ts +5 -7
- package/types/export-types.d.ts +3 -19
- package/types/exports.d.ts +1 -21
- package/umd/Core/Canvas.js +236 -152
- package/umd/Core/Container.js +111 -227
- package/umd/Core/Engine.js +83 -123
- package/umd/Core/Particle.js +236 -140
- package/umd/Core/Particles.js +213 -124
- package/umd/Core/Retina.js +5 -0
- package/umd/Core/Utils/Constants.js +3 -3
- package/umd/Core/Utils/EventListeners.js +69 -310
- package/umd/Core/Utils/Point.js +2 -0
- package/umd/Core/Utils/QuadTree.js +13 -8
- package/umd/Core/Utils/Ranges.js +4 -0
- package/umd/Core/Utils/Vectors.js +7 -4
- package/umd/Enums/Types/EasingType.js +18 -3
- package/umd/Options/Classes/AnimatableColor.js +1 -0
- package/umd/Options/Classes/AnimationOptions.js +8 -0
- package/umd/Options/Classes/Background/Background.js +6 -0
- package/umd/Options/Classes/ColorAnimation.js +1 -0
- package/umd/Options/Classes/FullScreen/FullScreen.js +2 -0
- package/umd/Options/Classes/HslAnimation.js +3 -5
- package/umd/Options/Classes/Options.js +32 -78
- package/umd/Options/Classes/OptionsColor.js +1 -0
- package/umd/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
- package/umd/Options/Classes/Particles/Effect/Effect.js +4 -0
- package/umd/Options/Classes/Particles/Move/Move.js +18 -0
- package/umd/Options/Classes/Particles/Move/MoveAngle.js +2 -0
- package/umd/Options/Classes/Particles/Move/MoveAttract.js +3 -0
- package/umd/Options/Classes/Particles/Move/MoveCenter.js +4 -0
- package/umd/Options/Classes/Particles/Move/MoveGravity.js +4 -0
- package/umd/Options/Classes/Particles/Move/OutModes.js +5 -0
- package/umd/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
- package/umd/Options/Classes/Particles/Move/Spin.js +3 -0
- package/umd/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
- package/umd/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
- package/umd/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
- package/umd/Options/Classes/Particles/Opacity/Opacity.js +1 -0
- package/umd/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
- package/umd/Options/Classes/Particles/ParticlesOptions.js +19 -11
- package/umd/Options/Classes/Particles/Shape/Shape.js +4 -0
- package/umd/Options/Classes/Particles/Size/Size.js +1 -0
- package/umd/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
- package/umd/Options/Classes/Particles/Stroke.js +3 -0
- package/umd/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
- package/umd/Options/Classes/{Interactivity/Events/ResizeEvent.js → ResizeEvent.js} +4 -2
- package/umd/Options/Classes/ValueWithRandom.js +3 -4
- package/umd/Utils/CanvasUtils.js +30 -108
- package/umd/Utils/ColorUtils.js +17 -2
- package/umd/Utils/EventDispatcher.js +1 -0
- package/umd/Utils/MathUtils.js +3 -2
- package/umd/Utils/Utils.js +55 -48
- package/umd/exports.js +2 -22
- package/638.min.js +0 -2
- package/638.min.js.LICENSE.txt +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/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/tsparticles.engine.min.js.LICENSE.txt +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/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/Core/Interfaces/{IContainerInteractivity.js → IParticleOpacityData.js} +0 -0
- /package/browser/Core/Interfaces/{IExternalInteractor.js → IParticleRotateData.js} +0 -0
- /package/browser/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/browser/{Core/Interfaces/IInteractor.js → Types/EngineInitializers.js} +0 -0
- /package/{browser/Core/Interfaces/IMouseData.js → cjs/Core/Interfaces/IParticleOpacityData.js} +0 -0
- /package/{browser/Core/Interfaces/IParticlesInteractor.js → cjs/Core/Interfaces/IParticleRotateData.js} +0 -0
- /package/cjs/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/{browser/Options/Interfaces/IManualParticle.js → cjs/Types/EngineInitializers.js} +0 -0
- /package/{browser/Options/Interfaces/IResponsive.js → esm/Core/Interfaces/IParticleOpacityData.js} +0 -0
- /package/{browser/Options/Interfaces/Interactivity/Events/IClickEvent.js → esm/Core/Interfaces/IParticleRotateData.js} +0 -0
- /package/esm/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/{browser/Options/Interfaces/Interactivity/Events/IDivEvent.js → esm/Types/EngineInitializers.js} +0 -0
- /package/types/Options/Interfaces/{Interactivity/Events/IResizeEvent.d.ts → IResizeEvent.d.ts} +0 -0
- /package/umd/Core/Interfaces/{IContainerInteractivity.js → IParticleOpacityData.js} +0 -0
- /package/umd/Core/Interfaces/{IExternalInteractor.js → IParticleRotateData.js} +0 -0
- /package/umd/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/umd/{Core/Interfaces/IInteractor.js → Types/EngineInitializers.js} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "../../Utils/Utils.js", "../../Utils/TypeUtils.js", "./Background/Background.js", "./FullScreen/FullScreen.js", "./
|
|
7
|
+
define(["require", "exports", "../../Utils/Utils.js", "../../Utils/TypeUtils.js", "./Background/Background.js", "./FullScreen/FullScreen.js", "./ResizeEvent.js", "../../Utils/OptionsUtils.js", "../../Utils/MathUtils.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
@@ -14,23 +14,33 @@
|
|
|
14
14
|
const TypeUtils_js_1 = require("../../Utils/TypeUtils.js");
|
|
15
15
|
const Background_js_1 = require("./Background/Background.js");
|
|
16
16
|
const FullScreen_js_1 = require("./FullScreen/FullScreen.js");
|
|
17
|
-
const
|
|
18
|
-
const ManualParticle_js_1 = require("./ManualParticle.js");
|
|
19
|
-
const Responsive_js_1 = require("./Responsive.js");
|
|
20
|
-
const ResponsiveMode_js_1 = require("../../Enums/Modes/ResponsiveMode.js");
|
|
21
|
-
const Theme_js_1 = require("./Theme/Theme.js");
|
|
22
|
-
const ThemeMode_js_1 = require("../../Enums/Modes/ThemeMode.js");
|
|
17
|
+
const ResizeEvent_js_1 = require("./ResizeEvent.js");
|
|
23
18
|
const OptionsUtils_js_1 = require("../../Utils/OptionsUtils.js");
|
|
24
19
|
const MathUtils_js_1 = require("../../Utils/MathUtils.js");
|
|
25
20
|
class Options {
|
|
21
|
+
autoPlay;
|
|
22
|
+
background;
|
|
23
|
+
clear;
|
|
24
|
+
defaultThemes;
|
|
25
|
+
delay;
|
|
26
|
+
detectRetina;
|
|
27
|
+
duration;
|
|
28
|
+
fpsLimit;
|
|
29
|
+
fullScreen;
|
|
30
|
+
hdr;
|
|
31
|
+
key;
|
|
32
|
+
name;
|
|
33
|
+
particles;
|
|
34
|
+
pauseOnBlur;
|
|
35
|
+
pauseOnOutsideViewport;
|
|
36
|
+
preset;
|
|
37
|
+
resize;
|
|
38
|
+
smooth;
|
|
39
|
+
style;
|
|
40
|
+
zLayers;
|
|
41
|
+
_container;
|
|
42
|
+
_engine;
|
|
26
43
|
constructor(engine, container) {
|
|
27
|
-
this._findDefaultTheme = mode => {
|
|
28
|
-
return (this.themes.find(theme => theme.default.value && theme.default.mode === mode) ??
|
|
29
|
-
this.themes.find(theme => theme.default.value && theme.default.mode === ThemeMode_js_1.ThemeMode.any));
|
|
30
|
-
};
|
|
31
|
-
this._importPreset = preset => {
|
|
32
|
-
this.load(this._engine.getPreset(preset));
|
|
33
|
-
};
|
|
34
44
|
this._engine = engine;
|
|
35
45
|
this._container = container;
|
|
36
46
|
this.autoPlay = true;
|
|
@@ -43,15 +53,12 @@
|
|
|
43
53
|
this.duration = 0;
|
|
44
54
|
this.fpsLimit = 120;
|
|
45
55
|
this.hdr = true;
|
|
46
|
-
this.interactivity = new Interactivity_js_1.Interactivity(engine, container);
|
|
47
|
-
this.manualParticles = [];
|
|
48
56
|
this.particles = (0, OptionsUtils_js_1.loadParticlesOptions)(this._engine, this._container);
|
|
49
57
|
this.pauseOnBlur = true;
|
|
50
58
|
this.pauseOnOutsideViewport = true;
|
|
51
|
-
this.
|
|
59
|
+
this.resize = new ResizeEvent_js_1.ResizeEvent();
|
|
52
60
|
this.smooth = false;
|
|
53
61
|
this.style = {};
|
|
54
|
-
this.themes = [];
|
|
55
62
|
this.zLayers = 100;
|
|
56
63
|
}
|
|
57
64
|
load(data) {
|
|
@@ -109,72 +116,19 @@
|
|
|
109
116
|
else {
|
|
110
117
|
this.fullScreen.load(fullScreen);
|
|
111
118
|
}
|
|
112
|
-
this.interactivity.load(data.interactivity);
|
|
113
|
-
if (data.manualParticles) {
|
|
114
|
-
this.manualParticles = data.manualParticles.map(t => {
|
|
115
|
-
const tmp = new ManualParticle_js_1.ManualParticle();
|
|
116
|
-
tmp.load(t);
|
|
117
|
-
return tmp;
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
119
|
this.particles.load(data.particles);
|
|
120
|
+
this.resize.load(data.resize);
|
|
121
121
|
this.style = (0, Utils_js_1.deepExtend)(this.style, data.style);
|
|
122
|
-
this._engine.loadOptions(this, data);
|
|
123
122
|
if (data.smooth !== undefined) {
|
|
124
123
|
this.smooth = data.smooth;
|
|
125
124
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
if (interactor.loadOptions) {
|
|
130
|
-
interactor.loadOptions(this, data);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
if (data.responsive !== undefined) {
|
|
135
|
-
for (const responsive of data.responsive) {
|
|
136
|
-
const optResponsive = new Responsive_js_1.Responsive();
|
|
137
|
-
optResponsive.load(responsive);
|
|
138
|
-
this.responsive.push(optResponsive);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
this.responsive.sort((a, b) => a.maxWidth - b.maxWidth);
|
|
142
|
-
if (data.themes !== undefined) {
|
|
143
|
-
for (const theme of data.themes) {
|
|
144
|
-
const existingTheme = this.themes.find(t => t.name === theme.name);
|
|
145
|
-
if (existingTheme) {
|
|
146
|
-
existingTheme.load(theme);
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
const optTheme = new Theme_js_1.Theme();
|
|
150
|
-
optTheme.load(theme);
|
|
151
|
-
this.themes.push(optTheme);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
this.defaultThemes.dark = this._findDefaultTheme(ThemeMode_js_1.ThemeMode.dark)?.name;
|
|
156
|
-
this.defaultThemes.light = this._findDefaultTheme(ThemeMode_js_1.ThemeMode.light)?.name;
|
|
157
|
-
}
|
|
158
|
-
setResponsive(width, pxRatio, defaultOptions) {
|
|
159
|
-
this.load(defaultOptions);
|
|
160
|
-
const responsiveOptions = this.responsive.find(t => t.mode === ResponsiveMode_js_1.ResponsiveMode.screen ? t.maxWidth > screen.availWidth : t.maxWidth * pxRatio > width);
|
|
161
|
-
this.load(responsiveOptions?.options);
|
|
162
|
-
return responsiveOptions?.maxWidth;
|
|
163
|
-
}
|
|
164
|
-
setTheme(name) {
|
|
165
|
-
if (name) {
|
|
166
|
-
const chosenTheme = this.themes.find(theme => theme.name === name);
|
|
167
|
-
if (chosenTheme) {
|
|
168
|
-
this.load(chosenTheme.options);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
const mediaMatch = (0, Utils_js_1.safeMatchMedia)("(prefers-color-scheme: dark)"), clientDarkMode = mediaMatch?.matches, defaultTheme = this._findDefaultTheme(clientDarkMode ? ThemeMode_js_1.ThemeMode.dark : ThemeMode_js_1.ThemeMode.light);
|
|
173
|
-
if (defaultTheme) {
|
|
174
|
-
this.load(defaultTheme.options);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
125
|
+
this._engine.plugins.forEach(plugin => {
|
|
126
|
+
plugin.loadOptions(this._container, this, data);
|
|
127
|
+
});
|
|
177
128
|
}
|
|
129
|
+
_importPreset = preset => {
|
|
130
|
+
this.load(this._engine.getPreset(preset));
|
|
131
|
+
};
|
|
178
132
|
}
|
|
179
133
|
exports.Options = Options;
|
|
180
134
|
});
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
const ParticlesBounceFactor_js_1 = require("./ParticlesBounceFactor.js");
|
|
14
14
|
const TypeUtils_js_1 = require("../../../../Utils/TypeUtils.js");
|
|
15
15
|
class ParticlesBounce {
|
|
16
|
+
horizontal;
|
|
17
|
+
vertical;
|
|
16
18
|
constructor() {
|
|
17
19
|
this.horizontal = new ParticlesBounceFactor_js_1.ParticlesBounceFactor();
|
|
18
20
|
this.vertical = new ParticlesBounceFactor_js_1.ParticlesBounceFactor();
|
|
@@ -21,6 +21,24 @@
|
|
|
21
21
|
const Spin_js_1 = require("./Spin.js");
|
|
22
22
|
const MathUtils_js_1 = require("../../../../Utils/MathUtils.js");
|
|
23
23
|
class Move {
|
|
24
|
+
angle;
|
|
25
|
+
attract;
|
|
26
|
+
center;
|
|
27
|
+
decay;
|
|
28
|
+
direction;
|
|
29
|
+
distance;
|
|
30
|
+
drift;
|
|
31
|
+
enable;
|
|
32
|
+
gravity;
|
|
33
|
+
outModes;
|
|
34
|
+
path;
|
|
35
|
+
random;
|
|
36
|
+
size;
|
|
37
|
+
speed;
|
|
38
|
+
spin;
|
|
39
|
+
straight;
|
|
40
|
+
vibrate;
|
|
41
|
+
warp;
|
|
24
42
|
constructor() {
|
|
25
43
|
this.angle = new MoveAngle_js_1.MoveAngle();
|
|
26
44
|
this.attract = new MoveAttract_js_1.MoveAttract();
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
const TypeUtils_js_1 = require("../../../../Utils/TypeUtils.js");
|
|
14
14
|
const MathUtils_js_1 = require("../../../../Utils/MathUtils.js");
|
|
15
15
|
class MoveAttract {
|
|
16
|
+
distance;
|
|
17
|
+
enable;
|
|
18
|
+
rotate;
|
|
16
19
|
constructor() {
|
|
17
20
|
this.distance = 200;
|
|
18
21
|
this.enable = false;
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
const TypeUtils_js_1 = require("../../../../Utils/TypeUtils.js");
|
|
14
14
|
const MathUtils_js_1 = require("../../../../Utils/MathUtils.js");
|
|
15
15
|
class MoveGravity {
|
|
16
|
+
acceleration;
|
|
17
|
+
enable;
|
|
18
|
+
inverse;
|
|
19
|
+
maxSpeed;
|
|
16
20
|
constructor() {
|
|
17
21
|
this.acceleration = 9.81;
|
|
18
22
|
this.enable = false;
|
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
const OutMode_js_1 = require("../../../../Enums/Modes/OutMode.js");
|
|
14
14
|
const TypeUtils_js_1 = require("../../../../Utils/TypeUtils.js");
|
|
15
15
|
class OutModes {
|
|
16
|
+
bottom;
|
|
17
|
+
default;
|
|
18
|
+
left;
|
|
19
|
+
right;
|
|
20
|
+
top;
|
|
16
21
|
constructor() {
|
|
17
22
|
this.default = OutMode_js_1.OutMode.out;
|
|
18
23
|
}
|
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
const Utils_js_1 = require("../../../../../Utils/Utils.js");
|
|
15
15
|
const TypeUtils_js_1 = require("../../../../../Utils/TypeUtils.js");
|
|
16
16
|
class MovePath {
|
|
17
|
+
clamp;
|
|
18
|
+
delay;
|
|
19
|
+
enable;
|
|
20
|
+
generator;
|
|
21
|
+
options;
|
|
17
22
|
constructor() {
|
|
18
23
|
this.clamp = true;
|
|
19
24
|
this.delay = new ValueWithRandom_js_1.ValueWithRandom();
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
const TypeUtils_js_1 = require("../../../../Utils/TypeUtils.js");
|
|
15
15
|
const MathUtils_js_1 = require("../../../../Utils/MathUtils.js");
|
|
16
16
|
class Spin {
|
|
17
|
+
acceleration;
|
|
18
|
+
enable;
|
|
19
|
+
position;
|
|
17
20
|
constructor() {
|
|
18
21
|
this.acceleration = 0;
|
|
19
22
|
this.enable = false;
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
const ParticlesNumberLimit_js_1 = require("./ParticlesNumberLimit.js");
|
|
15
15
|
const TypeUtils_js_1 = require("../../../../Utils/TypeUtils.js");
|
|
16
16
|
class ParticlesNumber {
|
|
17
|
+
density;
|
|
18
|
+
limit;
|
|
19
|
+
value;
|
|
17
20
|
constructor() {
|
|
18
21
|
this.density = new ParticlesDensity_js_1.ParticlesDensity();
|
|
19
22
|
this.limit = new ParticlesNumberLimit_js_1.ParticlesNumberLimit();
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
const LimitMode_js_1 = require("../../../../Enums/Modes/LimitMode.js");
|
|
14
14
|
const TypeUtils_js_1 = require("../../../../Utils/TypeUtils.js");
|
|
15
15
|
class ParticlesNumberLimit {
|
|
16
|
+
mode;
|
|
17
|
+
value;
|
|
16
18
|
constructor() {
|
|
17
19
|
this.mode = LimitMode_js_1.LimitMode.delete;
|
|
18
20
|
this.value = 0;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
const ValueWithRandom_js_1 = require("../../ValueWithRandom.js");
|
|
15
15
|
const TypeUtils_js_1 = require("../../../../Utils/TypeUtils.js");
|
|
16
16
|
class Opacity extends ValueWithRandom_js_1.RangedAnimationValueWithRandom {
|
|
17
|
+
animation;
|
|
17
18
|
constructor() {
|
|
18
19
|
super();
|
|
19
20
|
this.animation = new OpacityAnimation_js_1.OpacityAnimation();
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
const AnimationOptions_js_1 = require("../../AnimationOptions.js");
|
|
15
15
|
const TypeUtils_js_1 = require("../../../../Utils/TypeUtils.js");
|
|
16
16
|
class OpacityAnimation extends AnimationOptions_js_1.RangedAnimationOptions {
|
|
17
|
+
destroy;
|
|
17
18
|
constructor() {
|
|
18
19
|
super();
|
|
19
20
|
this.destroy = DestroyType_js_1.DestroyType.none;
|
|
@@ -23,6 +23,20 @@
|
|
|
23
23
|
const ZIndex_js_1 = require("./ZIndex/ZIndex.js");
|
|
24
24
|
const TypeUtils_js_1 = require("../../../Utils/TypeUtils.js");
|
|
25
25
|
class ParticlesOptions {
|
|
26
|
+
bounce;
|
|
27
|
+
color;
|
|
28
|
+
effect;
|
|
29
|
+
groups;
|
|
30
|
+
move;
|
|
31
|
+
number;
|
|
32
|
+
opacity;
|
|
33
|
+
reduceDuplicates;
|
|
34
|
+
shape;
|
|
35
|
+
size;
|
|
36
|
+
stroke;
|
|
37
|
+
zIndex;
|
|
38
|
+
_container;
|
|
39
|
+
_engine;
|
|
26
40
|
constructor(engine, container) {
|
|
27
41
|
this._engine = engine;
|
|
28
42
|
this._container = container;
|
|
@@ -67,9 +81,6 @@
|
|
|
67
81
|
this.shape.load(data.shape);
|
|
68
82
|
this.size.load(data.size);
|
|
69
83
|
this.zIndex.load(data.zIndex);
|
|
70
|
-
if (data.interactivity !== undefined) {
|
|
71
|
-
this.interactivity = (0, Utils_js_1.deepExtend)({}, data.interactivity);
|
|
72
|
-
}
|
|
73
84
|
const strokeToLoad = data.stroke;
|
|
74
85
|
if (strokeToLoad) {
|
|
75
86
|
this.stroke = (0, Utils_js_1.executeOnSingleOrMultiple)(strokeToLoad, t => {
|
|
@@ -79,6 +90,11 @@
|
|
|
79
90
|
});
|
|
80
91
|
}
|
|
81
92
|
if (this._container) {
|
|
93
|
+
for (const plugin of this._engine.plugins) {
|
|
94
|
+
if (plugin.loadParticlesOptions) {
|
|
95
|
+
plugin.loadParticlesOptions(this._container, this, data);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
82
98
|
const updaters = this._engine.updaters.get(this._container);
|
|
83
99
|
if (updaters) {
|
|
84
100
|
for (const updater of updaters) {
|
|
@@ -87,14 +103,6 @@
|
|
|
87
103
|
}
|
|
88
104
|
}
|
|
89
105
|
}
|
|
90
|
-
const interactors = this._engine.interactors.get(this._container);
|
|
91
|
-
if (interactors) {
|
|
92
|
-
for (const interactor of interactors) {
|
|
93
|
-
if (interactor.loadParticlesOptions) {
|
|
94
|
-
interactor.loadParticlesOptions(this, data);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
106
|
}
|
|
99
107
|
}
|
|
100
108
|
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
const SizeAnimation_js_1 = require("./SizeAnimation.js");
|
|
15
15
|
const TypeUtils_js_1 = require("../../../../Utils/TypeUtils.js");
|
|
16
16
|
class Size extends ValueWithRandom_js_1.RangedAnimationValueWithRandom {
|
|
17
|
+
animation;
|
|
17
18
|
constructor() {
|
|
18
19
|
super();
|
|
19
20
|
this.animation = new SizeAnimation_js_1.SizeAnimation();
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
const AnimationOptions_js_1 = require("../../AnimationOptions.js");
|
|
15
15
|
const TypeUtils_js_1 = require("../../../../Utils/TypeUtils.js");
|
|
16
16
|
class SizeAnimation extends AnimationOptions_js_1.RangedAnimationOptions {
|
|
17
|
+
destroy;
|
|
17
18
|
constructor() {
|
|
18
19
|
super();
|
|
19
20
|
this.destroy = DestroyType_js_1.DestroyType.none;
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
const ValueWithRandom_js_1 = require("../../ValueWithRandom.js");
|
|
14
14
|
const TypeUtils_js_1 = require("../../../../Utils/TypeUtils.js");
|
|
15
15
|
class ZIndex extends ValueWithRandom_js_1.ValueWithRandom {
|
|
16
|
+
opacityRate;
|
|
17
|
+
sizeRate;
|
|
18
|
+
velocityRate;
|
|
16
19
|
constructor() {
|
|
17
20
|
super();
|
|
18
21
|
this.opacityRate = 1;
|
|
@@ -4,14 +4,16 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "
|
|
7
|
+
define(["require", "exports", "../../Utils/TypeUtils.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ResizeEvent = void 0;
|
|
13
|
-
const TypeUtils_js_1 = require("
|
|
13
|
+
const TypeUtils_js_1 = require("../../Utils/TypeUtils.js");
|
|
14
14
|
class ResizeEvent {
|
|
15
|
+
delay;
|
|
16
|
+
enable;
|
|
15
17
|
constructor() {
|
|
16
18
|
this.delay = 0.5;
|
|
17
19
|
this.enable = true;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
const TypeUtils_js_1 = require("../../Utils/TypeUtils.js");
|
|
15
15
|
const MathUtils_js_1 = require("../../Utils/MathUtils.js");
|
|
16
16
|
class ValueWithRandom {
|
|
17
|
+
value;
|
|
17
18
|
constructor() {
|
|
18
19
|
this.value = 0;
|
|
19
20
|
}
|
|
@@ -28,10 +29,7 @@
|
|
|
28
29
|
}
|
|
29
30
|
exports.ValueWithRandom = ValueWithRandom;
|
|
30
31
|
class AnimationValueWithRandom extends ValueWithRandom {
|
|
31
|
-
|
|
32
|
-
super();
|
|
33
|
-
this.animation = new AnimationOptions_js_1.AnimationOptions();
|
|
34
|
-
}
|
|
32
|
+
animation = new AnimationOptions_js_1.AnimationOptions();
|
|
35
33
|
load(data) {
|
|
36
34
|
super.load(data);
|
|
37
35
|
if ((0, TypeUtils_js_1.isNull)(data)) {
|
|
@@ -45,6 +43,7 @@
|
|
|
45
43
|
}
|
|
46
44
|
exports.AnimationValueWithRandom = AnimationValueWithRandom;
|
|
47
45
|
class RangedAnimationValueWithRandom extends AnimationValueWithRandom {
|
|
46
|
+
animation;
|
|
48
47
|
constructor() {
|
|
49
48
|
super();
|
|
50
49
|
this.animation = new AnimationOptions_js_1.RangedAnimationOptions();
|