@tsparticles/engine 4.0.0-alpha.2 → 4.0.0-alpha.20
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/515.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/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
|
@@ -1,24 +1,34 @@
|
|
|
1
|
-
import { deepExtend, executeOnSingleOrMultiple
|
|
1
|
+
import { deepExtend, executeOnSingleOrMultiple } from "../../Utils/Utils.js";
|
|
2
2
|
import { isBoolean, isNull } from "../../Utils/TypeUtils.js";
|
|
3
3
|
import { Background } from "./Background/Background.js";
|
|
4
4
|
import { FullScreen } from "./FullScreen/FullScreen.js";
|
|
5
|
-
import {
|
|
6
|
-
import { ManualParticle } from "./ManualParticle.js";
|
|
7
|
-
import { Responsive } from "./Responsive.js";
|
|
8
|
-
import { ResponsiveMode } from "../../Enums/Modes/ResponsiveMode.js";
|
|
9
|
-
import { Theme } from "./Theme/Theme.js";
|
|
10
|
-
import { ThemeMode } from "../../Enums/Modes/ThemeMode.js";
|
|
5
|
+
import { ResizeEvent } from "./ResizeEvent.js";
|
|
11
6
|
import { loadParticlesOptions } from "../../Utils/OptionsUtils.js";
|
|
12
7
|
import { setRangeValue } from "../../Utils/MathUtils.js";
|
|
13
8
|
export class Options {
|
|
9
|
+
autoPlay;
|
|
10
|
+
background;
|
|
11
|
+
clear;
|
|
12
|
+
defaultThemes;
|
|
13
|
+
delay;
|
|
14
|
+
detectRetina;
|
|
15
|
+
duration;
|
|
16
|
+
fpsLimit;
|
|
17
|
+
fullScreen;
|
|
18
|
+
hdr;
|
|
19
|
+
key;
|
|
20
|
+
name;
|
|
21
|
+
particles;
|
|
22
|
+
pauseOnBlur;
|
|
23
|
+
pauseOnOutsideViewport;
|
|
24
|
+
preset;
|
|
25
|
+
resize;
|
|
26
|
+
smooth;
|
|
27
|
+
style;
|
|
28
|
+
zLayers;
|
|
29
|
+
_container;
|
|
30
|
+
_engine;
|
|
14
31
|
constructor(engine, container) {
|
|
15
|
-
this._findDefaultTheme = mode => {
|
|
16
|
-
return (this.themes.find(theme => theme.default.value && theme.default.mode === mode) ??
|
|
17
|
-
this.themes.find(theme => theme.default.value && theme.default.mode === ThemeMode.any));
|
|
18
|
-
};
|
|
19
|
-
this._importPreset = preset => {
|
|
20
|
-
this.load(this._engine.getPreset(preset));
|
|
21
|
-
};
|
|
22
32
|
this._engine = engine;
|
|
23
33
|
this._container = container;
|
|
24
34
|
this.autoPlay = true;
|
|
@@ -31,15 +41,12 @@ export class Options {
|
|
|
31
41
|
this.duration = 0;
|
|
32
42
|
this.fpsLimit = 120;
|
|
33
43
|
this.hdr = true;
|
|
34
|
-
this.interactivity = new Interactivity(engine, container);
|
|
35
|
-
this.manualParticles = [];
|
|
36
44
|
this.particles = loadParticlesOptions(this._engine, this._container);
|
|
37
45
|
this.pauseOnBlur = true;
|
|
38
46
|
this.pauseOnOutsideViewport = true;
|
|
39
|
-
this.
|
|
47
|
+
this.resize = new ResizeEvent();
|
|
40
48
|
this.smooth = false;
|
|
41
49
|
this.style = {};
|
|
42
|
-
this.themes = [];
|
|
43
50
|
this.zLayers = 100;
|
|
44
51
|
}
|
|
45
52
|
load(data) {
|
|
@@ -97,70 +104,17 @@ export class Options {
|
|
|
97
104
|
else {
|
|
98
105
|
this.fullScreen.load(fullScreen);
|
|
99
106
|
}
|
|
100
|
-
this.interactivity.load(data.interactivity);
|
|
101
|
-
if (data.manualParticles) {
|
|
102
|
-
this.manualParticles = data.manualParticles.map(t => {
|
|
103
|
-
const tmp = new ManualParticle();
|
|
104
|
-
tmp.load(t);
|
|
105
|
-
return tmp;
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
107
|
this.particles.load(data.particles);
|
|
108
|
+
this.resize.load(data.resize);
|
|
109
109
|
this.style = deepExtend(this.style, data.style);
|
|
110
|
-
this._engine.loadOptions(this, data);
|
|
111
110
|
if (data.smooth !== undefined) {
|
|
112
111
|
this.smooth = data.smooth;
|
|
113
112
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if (interactor.loadOptions) {
|
|
118
|
-
interactor.loadOptions(this, data);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (data.responsive !== undefined) {
|
|
123
|
-
for (const responsive of data.responsive) {
|
|
124
|
-
const optResponsive = new Responsive();
|
|
125
|
-
optResponsive.load(responsive);
|
|
126
|
-
this.responsive.push(optResponsive);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
this.responsive.sort((a, b) => a.maxWidth - b.maxWidth);
|
|
130
|
-
if (data.themes !== undefined) {
|
|
131
|
-
for (const theme of data.themes) {
|
|
132
|
-
const existingTheme = this.themes.find(t => t.name === theme.name);
|
|
133
|
-
if (existingTheme) {
|
|
134
|
-
existingTheme.load(theme);
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
const optTheme = new Theme();
|
|
138
|
-
optTheme.load(theme);
|
|
139
|
-
this.themes.push(optTheme);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
this.defaultThemes.dark = this._findDefaultTheme(ThemeMode.dark)?.name;
|
|
144
|
-
this.defaultThemes.light = this._findDefaultTheme(ThemeMode.light)?.name;
|
|
145
|
-
}
|
|
146
|
-
setResponsive(width, pxRatio, defaultOptions) {
|
|
147
|
-
this.load(defaultOptions);
|
|
148
|
-
const responsiveOptions = this.responsive.find(t => t.mode === ResponsiveMode.screen ? t.maxWidth > screen.availWidth : t.maxWidth * pxRatio > width);
|
|
149
|
-
this.load(responsiveOptions?.options);
|
|
150
|
-
return responsiveOptions?.maxWidth;
|
|
151
|
-
}
|
|
152
|
-
setTheme(name) {
|
|
153
|
-
if (name) {
|
|
154
|
-
const chosenTheme = this.themes.find(theme => theme.name === name);
|
|
155
|
-
if (chosenTheme) {
|
|
156
|
-
this.load(chosenTheme.options);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
const mediaMatch = safeMatchMedia("(prefers-color-scheme: dark)"), clientDarkMode = mediaMatch?.matches, defaultTheme = this._findDefaultTheme(clientDarkMode ? ThemeMode.dark : ThemeMode.light);
|
|
161
|
-
if (defaultTheme) {
|
|
162
|
-
this.load(defaultTheme.options);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
113
|
+
this._engine.plugins.forEach(plugin => {
|
|
114
|
+
plugin.loadOptions(this._container, this, data);
|
|
115
|
+
});
|
|
165
116
|
}
|
|
117
|
+
_importPreset = preset => {
|
|
118
|
+
this.load(this._engine.getPreset(preset));
|
|
119
|
+
};
|
|
166
120
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ParticlesBounceFactor } from "./ParticlesBounceFactor.js";
|
|
2
2
|
import { isNull } from "../../../../Utils/TypeUtils.js";
|
|
3
3
|
export class ParticlesBounce {
|
|
4
|
+
horizontal;
|
|
5
|
+
vertical;
|
|
4
6
|
constructor() {
|
|
5
7
|
this.horizontal = new ParticlesBounceFactor();
|
|
6
8
|
this.vertical = new ParticlesBounceFactor();
|
|
@@ -9,6 +9,24 @@ import { OutModes } from "./OutModes.js";
|
|
|
9
9
|
import { Spin } from "./Spin.js";
|
|
10
10
|
import { setRangeValue } from "../../../../Utils/MathUtils.js";
|
|
11
11
|
export class Move {
|
|
12
|
+
angle;
|
|
13
|
+
attract;
|
|
14
|
+
center;
|
|
15
|
+
decay;
|
|
16
|
+
direction;
|
|
17
|
+
distance;
|
|
18
|
+
drift;
|
|
19
|
+
enable;
|
|
20
|
+
gravity;
|
|
21
|
+
outModes;
|
|
22
|
+
path;
|
|
23
|
+
random;
|
|
24
|
+
size;
|
|
25
|
+
speed;
|
|
26
|
+
spin;
|
|
27
|
+
straight;
|
|
28
|
+
vibrate;
|
|
29
|
+
warp;
|
|
12
30
|
constructor() {
|
|
13
31
|
this.angle = new MoveAngle();
|
|
14
32
|
this.attract = new MoveAttract();
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { isNull } from "../../../../Utils/TypeUtils.js";
|
|
2
2
|
import { setRangeValue } from "../../../../Utils/MathUtils.js";
|
|
3
3
|
export class MoveGravity {
|
|
4
|
+
acceleration;
|
|
5
|
+
enable;
|
|
6
|
+
inverse;
|
|
7
|
+
maxSpeed;
|
|
4
8
|
constructor() {
|
|
5
9
|
this.acceleration = 9.81;
|
|
6
10
|
this.enable = false;
|
|
@@ -2,6 +2,11 @@ import { ValueWithRandom } from "../../../ValueWithRandom.js";
|
|
|
2
2
|
import { deepExtend } from "../../../../../Utils/Utils.js";
|
|
3
3
|
import { isNull } from "../../../../../Utils/TypeUtils.js";
|
|
4
4
|
export class MovePath {
|
|
5
|
+
clamp;
|
|
6
|
+
delay;
|
|
7
|
+
enable;
|
|
8
|
+
generator;
|
|
9
|
+
options;
|
|
5
10
|
constructor() {
|
|
6
11
|
this.clamp = true;
|
|
7
12
|
this.delay = new ValueWithRandom();
|
|
@@ -2,6 +2,9 @@ import { deepExtend } from "../../../../Utils/Utils.js";
|
|
|
2
2
|
import { isNull } from "../../../../Utils/TypeUtils.js";
|
|
3
3
|
import { setRangeValue } from "../../../../Utils/MathUtils.js";
|
|
4
4
|
export class Spin {
|
|
5
|
+
acceleration;
|
|
6
|
+
enable;
|
|
7
|
+
position;
|
|
5
8
|
constructor() {
|
|
6
9
|
this.acceleration = 0;
|
|
7
10
|
this.enable = false;
|
|
@@ -2,6 +2,9 @@ import { ParticlesDensity } from "./ParticlesDensity.js";
|
|
|
2
2
|
import { ParticlesNumberLimit } from "./ParticlesNumberLimit.js";
|
|
3
3
|
import { isNull } from "../../../../Utils/TypeUtils.js";
|
|
4
4
|
export class ParticlesNumber {
|
|
5
|
+
density;
|
|
6
|
+
limit;
|
|
7
|
+
value;
|
|
5
8
|
constructor() {
|
|
6
9
|
this.density = new ParticlesDensity();
|
|
7
10
|
this.limit = new ParticlesNumberLimit();
|
|
@@ -2,6 +2,7 @@ import { OpacityAnimation } from "./OpacityAnimation.js";
|
|
|
2
2
|
import { RangedAnimationValueWithRandom } from "../../ValueWithRandom.js";
|
|
3
3
|
import { isNull } from "../../../../Utils/TypeUtils.js";
|
|
4
4
|
export class Opacity extends RangedAnimationValueWithRandom {
|
|
5
|
+
animation;
|
|
5
6
|
constructor() {
|
|
6
7
|
super();
|
|
7
8
|
this.animation = new OpacityAnimation();
|
|
@@ -2,6 +2,7 @@ import { DestroyType } from "../../../../Enums/Types/DestroyType.js";
|
|
|
2
2
|
import { RangedAnimationOptions } from "../../AnimationOptions.js";
|
|
3
3
|
import { isNull } from "../../../../Utils/TypeUtils.js";
|
|
4
4
|
export class OpacityAnimation extends RangedAnimationOptions {
|
|
5
|
+
destroy;
|
|
5
6
|
constructor() {
|
|
6
7
|
super();
|
|
7
8
|
this.destroy = DestroyType.none;
|
|
@@ -11,6 +11,20 @@ import { Stroke } from "./Stroke.js";
|
|
|
11
11
|
import { ZIndex } from "./ZIndex/ZIndex.js";
|
|
12
12
|
import { isNull } from "../../../Utils/TypeUtils.js";
|
|
13
13
|
export class ParticlesOptions {
|
|
14
|
+
bounce;
|
|
15
|
+
color;
|
|
16
|
+
effect;
|
|
17
|
+
groups;
|
|
18
|
+
move;
|
|
19
|
+
number;
|
|
20
|
+
opacity;
|
|
21
|
+
reduceDuplicates;
|
|
22
|
+
shape;
|
|
23
|
+
size;
|
|
24
|
+
stroke;
|
|
25
|
+
zIndex;
|
|
26
|
+
_container;
|
|
27
|
+
_engine;
|
|
14
28
|
constructor(engine, container) {
|
|
15
29
|
this._engine = engine;
|
|
16
30
|
this._container = container;
|
|
@@ -55,9 +69,6 @@ export class ParticlesOptions {
|
|
|
55
69
|
this.shape.load(data.shape);
|
|
56
70
|
this.size.load(data.size);
|
|
57
71
|
this.zIndex.load(data.zIndex);
|
|
58
|
-
if (data.interactivity !== undefined) {
|
|
59
|
-
this.interactivity = deepExtend({}, data.interactivity);
|
|
60
|
-
}
|
|
61
72
|
const strokeToLoad = data.stroke;
|
|
62
73
|
if (strokeToLoad) {
|
|
63
74
|
this.stroke = executeOnSingleOrMultiple(strokeToLoad, t => {
|
|
@@ -67,6 +78,11 @@ export class ParticlesOptions {
|
|
|
67
78
|
});
|
|
68
79
|
}
|
|
69
80
|
if (this._container) {
|
|
81
|
+
for (const plugin of this._engine.plugins) {
|
|
82
|
+
if (plugin.loadParticlesOptions) {
|
|
83
|
+
plugin.loadParticlesOptions(this._container, this, data);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
70
86
|
const updaters = this._engine.updaters.get(this._container);
|
|
71
87
|
if (updaters) {
|
|
72
88
|
for (const updater of updaters) {
|
|
@@ -75,14 +91,6 @@ export class ParticlesOptions {
|
|
|
75
91
|
}
|
|
76
92
|
}
|
|
77
93
|
}
|
|
78
|
-
const interactors = this._engine.interactors.get(this._container);
|
|
79
|
-
if (interactors) {
|
|
80
|
-
for (const interactor of interactors) {
|
|
81
|
-
if (interactor.loadParticlesOptions) {
|
|
82
|
-
interactor.loadParticlesOptions(this, data);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
94
|
}
|
|
87
95
|
}
|
|
88
96
|
}
|
|
@@ -2,6 +2,7 @@ import { RangedAnimationValueWithRandom } from "../../ValueWithRandom.js";
|
|
|
2
2
|
import { SizeAnimation } from "./SizeAnimation.js";
|
|
3
3
|
import { isNull } from "../../../../Utils/TypeUtils.js";
|
|
4
4
|
export class Size extends RangedAnimationValueWithRandom {
|
|
5
|
+
animation;
|
|
5
6
|
constructor() {
|
|
6
7
|
super();
|
|
7
8
|
this.animation = new SizeAnimation();
|
|
@@ -2,6 +2,7 @@ import { DestroyType } from "../../../../Enums/Types/DestroyType.js";
|
|
|
2
2
|
import { RangedAnimationOptions } from "../../AnimationOptions.js";
|
|
3
3
|
import { isNull } from "../../../../Utils/TypeUtils.js";
|
|
4
4
|
export class SizeAnimation extends RangedAnimationOptions {
|
|
5
|
+
destroy;
|
|
5
6
|
constructor() {
|
|
6
7
|
super();
|
|
7
8
|
this.destroy = DestroyType.none;
|
|
@@ -2,6 +2,9 @@ import { AnimatableColor } from "../AnimatableColor.js";
|
|
|
2
2
|
import { isNull } from "../../../Utils/TypeUtils.js";
|
|
3
3
|
import { setRangeValue } from "../../../Utils/MathUtils.js";
|
|
4
4
|
export class Stroke {
|
|
5
|
+
color;
|
|
6
|
+
opacity;
|
|
7
|
+
width;
|
|
5
8
|
constructor() {
|
|
6
9
|
this.width = 0;
|
|
7
10
|
}
|
|
@@ -2,6 +2,7 @@ import { AnimationOptions, RangedAnimationOptions } from "./AnimationOptions.js"
|
|
|
2
2
|
import { isNull } from "../../Utils/TypeUtils.js";
|
|
3
3
|
import { setRangeValue } from "../../Utils/MathUtils.js";
|
|
4
4
|
export class ValueWithRandom {
|
|
5
|
+
value;
|
|
5
6
|
constructor() {
|
|
6
7
|
this.value = 0;
|
|
7
8
|
}
|
|
@@ -15,10 +16,7 @@ export class ValueWithRandom {
|
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
export class AnimationValueWithRandom extends ValueWithRandom {
|
|
18
|
-
|
|
19
|
-
super();
|
|
20
|
-
this.animation = new AnimationOptions();
|
|
21
|
-
}
|
|
19
|
+
animation = new AnimationOptions();
|
|
22
20
|
load(data) {
|
|
23
21
|
super.load(data);
|
|
24
22
|
if (isNull(data)) {
|
|
@@ -31,6 +29,7 @@ export class AnimationValueWithRandom extends ValueWithRandom {
|
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
31
|
export class RangedAnimationValueWithRandom extends AnimationValueWithRandom {
|
|
32
|
+
animation;
|
|
34
33
|
constructor() {
|
|
35
34
|
super();
|
|
36
35
|
this.animation = new RangedAnimationOptions();
|