@tsparticles/engine 3.0.0-beta.0 → 3.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/browser/Core/Canvas.js +4 -4
- package/browser/Core/Container.js +9 -9
- package/browser/Core/Engine.js +6 -6
- package/browser/Core/Particle.js +9 -9
- package/browser/Core/Particles.js +10 -9
- package/browser/Core/Retina.js +2 -2
- package/browser/Core/Utils/Circle.js +3 -3
- package/browser/Core/Utils/EventListeners.js +2 -2
- package/browser/Core/Utils/QuadTree.js +3 -3
- package/browser/Core/Utils/Rectangle.js +2 -2
- package/browser/Core/Utils/Vector.js +1 -1
- package/browser/Core/Utils/Vector3d.js +2 -2
- package/browser/Options/Classes/AnimatableColor.js +3 -3
- package/browser/Options/Classes/AnimationOptions.js +1 -1
- package/browser/Options/Classes/Background/Background.js +1 -1
- package/browser/Options/Classes/BackgroundMask/BackgroundMask.js +2 -2
- package/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.js +1 -1
- package/browser/Options/Classes/ColorAnimation.js +1 -1
- package/browser/Options/Classes/HslAnimation.js +1 -1
- package/browser/Options/Classes/Interactivity/Events/Events.js +5 -5
- package/browser/Options/Classes/Interactivity/Events/HoverEvent.js +1 -1
- package/browser/Options/Classes/Interactivity/Interactivity.js +2 -2
- package/browser/Options/Classes/ManualParticle.js +1 -1
- package/browser/Options/Classes/Options.js +10 -10
- package/browser/Options/Classes/OptionsColor.js +1 -1
- package/browser/Options/Classes/Particles/Bounce/ParticlesBounce.js +1 -1
- package/browser/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +1 -1
- package/browser/Options/Classes/Particles/Collisions/Collisions.js +4 -4
- package/browser/Options/Classes/Particles/Move/Move.js +10 -10
- package/browser/Options/Classes/Particles/Move/MoveAngle.js +1 -1
- package/browser/Options/Classes/Particles/Move/MoveAttract.js +1 -1
- package/browser/Options/Classes/Particles/Move/MoveGravity.js +1 -1
- package/browser/Options/Classes/Particles/Move/MoveTrail.js +1 -1
- package/browser/Options/Classes/Particles/Move/MoveTrailFill.js +1 -1
- package/browser/Options/Classes/Particles/Move/Path/MovePath.js +2 -2
- package/browser/Options/Classes/Particles/Move/Spin.js +2 -2
- package/browser/Options/Classes/Particles/Number/ParticlesNumber.js +1 -1
- package/browser/Options/Classes/Particles/Opacity/Opacity.js +2 -2
- package/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -1
- package/browser/Options/Classes/Particles/ParticlesOptions.js +12 -12
- package/browser/Options/Classes/Particles/Shadow.js +1 -1
- package/browser/Options/Classes/Particles/Shape/Shape.js +1 -1
- package/browser/Options/Classes/Particles/Size/Size.js +2 -2
- package/browser/Options/Classes/Particles/Size/SizeAnimation.js +1 -1
- package/browser/Options/Classes/Particles/Stroke.js +2 -2
- package/browser/Options/Classes/Particles/ZIndex/ZIndex.js +1 -1
- package/browser/Options/Classes/Responsive.js +1 -1
- package/browser/Options/Classes/Theme/Theme.js +2 -2
- package/browser/Options/Classes/ValueWithRandom.js +4 -4
- package/browser/Utils/CanvasUtils.js +1 -1
- package/browser/Utils/ColorUtils.js +2 -2
- package/browser/Utils/HslColorManager.js +2 -2
- package/browser/Utils/NumberUtils.js +2 -2
- package/browser/Utils/OptionsUtils.js +1 -1
- package/browser/Utils/RgbColorManager.js +1 -1
- package/browser/Utils/Utils.js +2 -2
- package/browser/bundle.js +2 -2
- package/browser/export-types.js +97 -97
- package/browser/exports.js +89 -89
- package/browser/index.js +4 -4
- package/browser/init.js +4 -4
- package/browser/package.json +1 -0
- package/cjs/Core/Canvas.js +28 -28
- package/cjs/Core/Container.js +19 -19
- package/cjs/Core/Engine.js +22 -22
- package/cjs/Core/Particle.js +37 -37
- package/cjs/Core/Particles.js +18 -17
- package/cjs/Core/Retina.js +11 -11
- package/cjs/Core/Utils/Circle.js +6 -6
- package/cjs/Core/Utils/EventListeners.js +19 -19
- package/cjs/Core/Utils/QuadTree.js +7 -7
- package/cjs/Core/Utils/Rectangle.js +4 -4
- package/cjs/Core/Utils/Vector.js +2 -2
- package/cjs/Core/Utils/Vector3d.js +4 -4
- package/cjs/Options/Classes/AnimatableColor.js +6 -6
- package/cjs/Options/Classes/AnimationOptions.js +5 -5
- package/cjs/Options/Classes/Background/Background.js +3 -3
- package/cjs/Options/Classes/BackgroundMask/BackgroundMask.js +4 -4
- package/cjs/Options/Classes/BackgroundMask/BackgroundMaskCover.js +3 -3
- package/cjs/Options/Classes/ColorAnimation.js +6 -6
- package/cjs/Options/Classes/HslAnimation.js +4 -4
- package/cjs/Options/Classes/Interactivity/Events/Events.js +12 -12
- package/cjs/Options/Classes/Interactivity/Events/HoverEvent.js +2 -2
- package/cjs/Options/Classes/Interactivity/Interactivity.js +4 -4
- package/cjs/Options/Classes/ManualParticle.js +2 -2
- package/cjs/Options/Classes/Options.js +24 -24
- package/cjs/Options/Classes/OptionsColor.js +2 -2
- package/cjs/Options/Classes/Particles/Bounce/ParticlesBounce.js +3 -3
- package/cjs/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +2 -2
- package/cjs/Options/Classes/Particles/Collisions/Collisions.js +8 -8
- package/cjs/Options/Classes/Particles/Move/Move.js +24 -24
- package/cjs/Options/Classes/Particles/Move/MoveAngle.js +3 -3
- package/cjs/Options/Classes/Particles/Move/MoveAttract.js +2 -2
- package/cjs/Options/Classes/Particles/Move/MoveGravity.js +3 -3
- package/cjs/Options/Classes/Particles/Move/MoveTrail.js +2 -2
- package/cjs/Options/Classes/Particles/Move/MoveTrailFill.js +2 -2
- package/cjs/Options/Classes/Particles/Move/Path/MovePath.js +4 -4
- package/cjs/Options/Classes/Particles/Move/Spin.js +4 -4
- package/cjs/Options/Classes/Particles/Number/ParticlesNumber.js +2 -2
- package/cjs/Options/Classes/Particles/Opacity/Opacity.js +4 -4
- package/cjs/Options/Classes/Particles/Opacity/OpacityAnimation.js +2 -2
- package/cjs/Options/Classes/Particles/ParticlesOptions.js +28 -28
- package/cjs/Options/Classes/Particles/Shadow.js +3 -3
- package/cjs/Options/Classes/Particles/Shape/Shape.js +2 -2
- package/cjs/Options/Classes/Particles/Size/Size.js +4 -4
- package/cjs/Options/Classes/Particles/Size/SizeAnimation.js +2 -2
- package/cjs/Options/Classes/Particles/Stroke.js +5 -5
- package/cjs/Options/Classes/Particles/ZIndex/ZIndex.js +2 -2
- package/cjs/Options/Classes/Responsive.js +2 -2
- package/cjs/Options/Classes/Theme/Theme.js +4 -4
- package/cjs/Options/Classes/ValueWithRandom.js +9 -9
- package/cjs/Utils/CanvasUtils.js +2 -2
- package/cjs/Utils/ColorUtils.js +23 -23
- package/cjs/Utils/HslColorManager.js +9 -9
- package/cjs/Utils/NumberUtils.js +10 -10
- package/cjs/Utils/OptionsUtils.js +2 -2
- package/cjs/Utils/RgbColorManager.js +5 -5
- package/cjs/Utils/Utils.js +17 -17
- package/cjs/bundle.js +3 -3
- package/cjs/export-types.js +97 -97
- package/cjs/exports.js +89 -89
- package/cjs/index.js +6 -6
- package/cjs/init.js +8 -8
- package/cjs/package.json +1 -0
- package/esm/Core/Canvas.js +4 -4
- package/esm/Core/Container.js +9 -9
- package/esm/Core/Engine.js +6 -6
- package/esm/Core/Particle.js +9 -9
- package/esm/Core/Particles.js +10 -9
- package/esm/Core/Retina.js +2 -2
- package/esm/Core/Utils/Circle.js +3 -3
- package/esm/Core/Utils/EventListeners.js +2 -2
- package/esm/Core/Utils/QuadTree.js +3 -3
- package/esm/Core/Utils/Rectangle.js +2 -2
- package/esm/Core/Utils/Vector.js +1 -1
- package/esm/Core/Utils/Vector3d.js +2 -2
- package/esm/Options/Classes/AnimatableColor.js +3 -3
- package/esm/Options/Classes/AnimationOptions.js +1 -1
- package/esm/Options/Classes/Background/Background.js +1 -1
- package/esm/Options/Classes/BackgroundMask/BackgroundMask.js +2 -2
- package/esm/Options/Classes/BackgroundMask/BackgroundMaskCover.js +1 -1
- package/esm/Options/Classes/ColorAnimation.js +1 -1
- package/esm/Options/Classes/HslAnimation.js +1 -1
- package/esm/Options/Classes/Interactivity/Events/Events.js +5 -5
- package/esm/Options/Classes/Interactivity/Events/HoverEvent.js +1 -1
- package/esm/Options/Classes/Interactivity/Interactivity.js +2 -2
- package/esm/Options/Classes/ManualParticle.js +1 -1
- package/esm/Options/Classes/Options.js +10 -10
- package/esm/Options/Classes/OptionsColor.js +1 -1
- package/esm/Options/Classes/Particles/Bounce/ParticlesBounce.js +1 -1
- package/esm/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +1 -1
- package/esm/Options/Classes/Particles/Collisions/Collisions.js +4 -4
- package/esm/Options/Classes/Particles/Move/Move.js +10 -10
- package/esm/Options/Classes/Particles/Move/MoveAngle.js +1 -1
- package/esm/Options/Classes/Particles/Move/MoveAttract.js +1 -1
- package/esm/Options/Classes/Particles/Move/MoveGravity.js +1 -1
- package/esm/Options/Classes/Particles/Move/MoveTrail.js +1 -1
- package/esm/Options/Classes/Particles/Move/MoveTrailFill.js +1 -1
- package/esm/Options/Classes/Particles/Move/Path/MovePath.js +2 -2
- package/esm/Options/Classes/Particles/Move/Spin.js +2 -2
- package/esm/Options/Classes/Particles/Number/ParticlesNumber.js +1 -1
- package/esm/Options/Classes/Particles/Opacity/Opacity.js +2 -2
- package/esm/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -1
- package/esm/Options/Classes/Particles/ParticlesOptions.js +12 -12
- package/esm/Options/Classes/Particles/Shadow.js +1 -1
- package/esm/Options/Classes/Particles/Shape/Shape.js +1 -1
- package/esm/Options/Classes/Particles/Size/Size.js +2 -2
- package/esm/Options/Classes/Particles/Size/SizeAnimation.js +1 -1
- package/esm/Options/Classes/Particles/Stroke.js +2 -2
- package/esm/Options/Classes/Particles/ZIndex/ZIndex.js +1 -1
- package/esm/Options/Classes/Responsive.js +1 -1
- package/esm/Options/Classes/Theme/Theme.js +2 -2
- package/esm/Options/Classes/ValueWithRandom.js +4 -4
- package/esm/Utils/CanvasUtils.js +1 -1
- package/esm/Utils/ColorUtils.js +2 -2
- package/esm/Utils/HslColorManager.js +2 -2
- package/esm/Utils/NumberUtils.js +2 -2
- package/esm/Utils/OptionsUtils.js +1 -1
- package/esm/Utils/RgbColorManager.js +1 -1
- package/esm/Utils/Utils.js +2 -2
- package/esm/bundle.js +2 -2
- package/esm/export-types.js +97 -97
- package/esm/exports.js +89 -89
- package/esm/index.js +4 -4
- package/esm/init.js +4 -4
- package/esm/package.json +1 -0
- package/package.json +8 -6
- package/report.html +23 -5
- package/scripts/install.js +8 -8
- package/tsparticles.engine.js +5 -4
- package/tsparticles.engine.min.js +1 -1
- package/tsparticles.engine.min.js.LICENSE.txt +1 -1
- package/types/Core/Canvas.d.ts +5 -5
- package/types/Core/Container.d.ts +12 -12
- package/types/Core/Engine.d.ts +20 -20
- package/types/Core/Interfaces/Colors.d.ts +2 -2
- package/types/Core/Interfaces/IBubbleParticleData.d.ts +1 -1
- package/types/Core/Interfaces/ICircleBouncer.d.ts +2 -2
- package/types/Core/Interfaces/IColorManager.d.ts +1 -1
- package/types/Core/Interfaces/IContainerInteractivity.d.ts +1 -1
- package/types/Core/Interfaces/IContainerPlugin.d.ts +7 -7
- package/types/Core/Interfaces/ICoordinates.d.ts +2 -2
- package/types/Core/Interfaces/IDimension.d.ts +1 -1
- package/types/Core/Interfaces/IDrawParticleParams.d.ts +6 -6
- package/types/Core/Interfaces/IExternalInteractor.d.ts +7 -7
- package/types/Core/Interfaces/IInteractor.d.ts +8 -8
- package/types/Core/Interfaces/ILoadParams.d.ts +2 -2
- package/types/Core/Interfaces/IMouseData.d.ts +1 -1
- package/types/Core/Interfaces/IMovePathGenerator.d.ts +4 -4
- package/types/Core/Interfaces/IParticle.d.ts +11 -11
- package/types/Core/Interfaces/IParticleHslAnimation.d.ts +1 -1
- package/types/Core/Interfaces/IParticleMover.d.ts +2 -2
- package/types/Core/Interfaces/IParticleRetinaProps.d.ts +1 -1
- package/types/Core/Interfaces/IParticleRoll.d.ts +1 -1
- package/types/Core/Interfaces/IParticleUpdater.d.ts +7 -7
- package/types/Core/Interfaces/IParticleValueAnimation.d.ts +1 -1
- package/types/Core/Interfaces/IParticlesInteractor.d.ts +3 -3
- package/types/Core/Interfaces/IPlugin.d.ts +5 -5
- package/types/Core/Interfaces/IPositionFromSizeParams.d.ts +2 -2
- package/types/Core/Interfaces/IShapeDrawer.d.ts +1 -1
- package/types/Core/Interfaces/IShapeValues.d.ts +2 -2
- package/types/Core/Interfaces/ITrailFillData.d.ts +1 -1
- package/types/Core/Particle.d.ts +21 -21
- package/types/Core/Particles.d.ts +12 -12
- package/types/Core/Retina.d.ts +2 -2
- package/types/Core/Utils/Circle.d.ts +2 -2
- package/types/Core/Utils/EventListeners.d.ts +1 -1
- package/types/Core/Utils/ExternalInteractorBase.d.ts +5 -5
- package/types/Core/Utils/InteractionManager.d.ts +5 -5
- package/types/Core/Utils/ParticlesInteractorBase.d.ts +5 -5
- package/types/Core/Utils/Point.d.ts +2 -2
- package/types/Core/Utils/QuadTree.d.ts +6 -6
- package/types/Core/Utils/Range.d.ts +1 -1
- package/types/Core/Utils/Rectangle.d.ts +3 -3
- package/types/Core/Utils/Vector.d.ts +2 -2
- package/types/Core/Utils/Vector3d.d.ts +1 -1
- package/types/Options/Classes/AnimatableColor.d.ts +6 -6
- package/types/Options/Classes/AnimationOptions.d.ts +6 -6
- package/types/Options/Classes/Background/Background.d.ts +4 -4
- package/types/Options/Classes/BackgroundMask/BackgroundMask.d.ts +4 -4
- package/types/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +4 -4
- package/types/Options/Classes/ColorAnimation.d.ts +4 -4
- package/types/Options/Classes/FullScreen/FullScreen.d.ts +3 -3
- package/types/Options/Classes/HslAnimation.d.ts +4 -4
- package/types/Options/Classes/Interactivity/Events/ClickEvent.d.ts +5 -5
- package/types/Options/Classes/Interactivity/Events/DivEvent.d.ts +6 -6
- package/types/Options/Classes/Interactivity/Events/Events.d.ts +8 -8
- package/types/Options/Classes/Interactivity/Events/HoverEvent.d.ts +6 -6
- package/types/Options/Classes/Interactivity/Events/Parallax.d.ts +3 -3
- package/types/Options/Classes/Interactivity/Events/ResizeEvent.d.ts +3 -3
- package/types/Options/Classes/Interactivity/Interactivity.d.ts +8 -8
- package/types/Options/Classes/Interactivity/Modes/Modes.d.ts +5 -5
- package/types/Options/Classes/ManualParticle.d.ts +5 -5
- package/types/Options/Classes/Options.d.ts +15 -15
- package/types/Options/Classes/OptionsColor.d.ts +5 -5
- package/types/Options/Classes/Particles/Bounce/ParticlesBounce.d.ts +4 -4
- package/types/Options/Classes/Particles/Bounce/ParticlesBounceFactor.d.ts +1 -1
- package/types/Options/Classes/Particles/Collisions/Collisions.d.ts +8 -8
- package/types/Options/Classes/Particles/Collisions/CollisionsAbsorb.d.ts +3 -3
- package/types/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +3 -3
- package/types/Options/Classes/Particles/Move/Move.d.ts +15 -15
- package/types/Options/Classes/Particles/Move/MoveAngle.d.ts +4 -4
- package/types/Options/Classes/Particles/Move/MoveAttract.d.ts +5 -5
- package/types/Options/Classes/Particles/Move/MoveCenter.d.ts +4 -4
- package/types/Options/Classes/Particles/Move/MoveGravity.d.ts +4 -4
- package/types/Options/Classes/Particles/Move/MoveTrail.d.ts +4 -4
- package/types/Options/Classes/Particles/Move/MoveTrailFill.d.ts +4 -4
- package/types/Options/Classes/Particles/Move/OutModes.d.ts +5 -5
- package/types/Options/Classes/Particles/Move/Path/MovePath.d.ts +5 -5
- package/types/Options/Classes/Particles/Move/Spin.d.ts +5 -5
- package/types/Options/Classes/Particles/Number/ParticlesDensity.d.ts +3 -3
- package/types/Options/Classes/Particles/Number/ParticlesNumber.d.ts +4 -4
- package/types/Options/Classes/Particles/Opacity/Opacity.d.ts +5 -5
- package/types/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +5 -5
- package/types/Options/Classes/Particles/ParticlesOptions.d.ts +19 -19
- package/types/Options/Classes/Particles/Shadow.d.ts +5 -5
- package/types/Options/Classes/Particles/Shape/Shape.d.ts +5 -5
- package/types/Options/Classes/Particles/Size/Size.d.ts +5 -5
- package/types/Options/Classes/Particles/Size/SizeAnimation.d.ts +5 -5
- package/types/Options/Classes/Particles/Stroke.d.ts +5 -5
- package/types/Options/Classes/Particles/ZIndex/ZIndex.d.ts +4 -4
- package/types/Options/Classes/Random.d.ts +3 -3
- package/types/Options/Classes/Responsive.d.ts +5 -5
- package/types/Options/Classes/Theme/Theme.d.ts +5 -5
- package/types/Options/Classes/Theme/ThemeDefault.d.ts +4 -4
- package/types/Options/Classes/ValueWithRandom.d.ts +6 -6
- package/types/Options/Interfaces/Background/IBackground.d.ts +1 -1
- package/types/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +2 -2
- package/types/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.d.ts +1 -1
- package/types/Options/Interfaces/IAnimatable.d.ts +1 -1
- package/types/Options/Interfaces/IAnimatableColor.d.ts +3 -3
- package/types/Options/Interfaces/IAnimation.d.ts +3 -3
- package/types/Options/Interfaces/IColorAnimation.d.ts +2 -2
- package/types/Options/Interfaces/IHslAnimation.d.ts +1 -1
- package/types/Options/Interfaces/IManualParticle.d.ts +3 -3
- package/types/Options/Interfaces/IOptionLoader.d.ts +1 -1
- package/types/Options/Interfaces/IOptions.d.ts +11 -11
- package/types/Options/Interfaces/IOptionsColor.d.ts +1 -1
- package/types/Options/Interfaces/IResponsive.d.ts +3 -3
- package/types/Options/Interfaces/IValueWithRandom.d.ts +3 -3
- package/types/Options/Interfaces/Interactivity/Events/IClickEvent.d.ts +2 -2
- package/types/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +3 -3
- package/types/Options/Interfaces/Interactivity/Events/IEvents.d.ts +5 -5
- package/types/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +3 -3
- package/types/Options/Interfaces/Interactivity/IInteractivity.d.ts +3 -3
- package/types/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +1 -1
- package/types/Options/Interfaces/Particles/Bounce/IParticlesBounce.d.ts +1 -1
- package/types/Options/Interfaces/Particles/Collisions/ICollisions.d.ts +5 -5
- package/types/Options/Interfaces/Particles/IParticlesOptions.d.ts +15 -15
- package/types/Options/Interfaces/Particles/IShadow.d.ts +2 -2
- package/types/Options/Interfaces/Particles/IStroke.d.ts +4 -4
- package/types/Options/Interfaces/Particles/Move/IMove.d.ts +12 -12
- package/types/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +1 -1
- package/types/Options/Interfaces/Particles/Move/IMoveAttract.d.ts +2 -2
- package/types/Options/Interfaces/Particles/Move/IMoveCenter.d.ts +1 -1
- package/types/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +1 -1
- package/types/Options/Interfaces/Particles/Move/IMoveTrail.d.ts +1 -1
- package/types/Options/Interfaces/Particles/Move/IMoveTrailFill.d.ts +1 -1
- package/types/Options/Interfaces/Particles/Move/IOutModes.d.ts +1 -1
- package/types/Options/Interfaces/Particles/Move/ISpin.d.ts +2 -2
- package/types/Options/Interfaces/Particles/Move/Path/IMovePath.d.ts +2 -2
- package/types/Options/Interfaces/Particles/Number/IParticlesNumber.d.ts +1 -1
- package/types/Options/Interfaces/Particles/Opacity/IOpacity.d.ts +2 -2
- package/types/Options/Interfaces/Particles/Opacity/IOpacityAnimation.d.ts +2 -2
- package/types/Options/Interfaces/Particles/Shape/IShape.d.ts +2 -2
- package/types/Options/Interfaces/Particles/Size/ISize.d.ts +2 -2
- package/types/Options/Interfaces/Particles/Size/ISizeAnimation.d.ts +2 -2
- package/types/Options/Interfaces/Particles/ZIndex/IZIndex.d.ts +1 -1
- package/types/Options/Interfaces/Theme/ITheme.d.ts +3 -3
- package/types/Options/Interfaces/Theme/IThemeDefault.d.ts +1 -1
- package/types/Types/CustomEventArgs.d.ts +1 -1
- package/types/Types/CustomEventListener.d.ts +1 -1
- package/types/Types/ISourceOptions.d.ts +2 -2
- package/types/Types/ParticlesGroups.d.ts +1 -1
- package/types/Types/RangeValue.d.ts +1 -1
- package/types/Types/ShapeData.d.ts +2 -2
- package/types/Types/ShapeDrawerFunctions.d.ts +3 -3
- package/types/Utils/CanvasUtils.d.ts +9 -9
- package/types/Utils/ColorUtils.d.ts +6 -6
- package/types/Utils/EventDispatcher.d.ts +2 -2
- package/types/Utils/HslColorManager.d.ts +2 -2
- package/types/Utils/NumberUtils.d.ts +8 -8
- package/types/Utils/OptionsUtils.d.ts +6 -6
- package/types/Utils/RgbColorManager.d.ts +2 -2
- package/types/Utils/Utils.d.ts +12 -12
- package/types/bundle.d.ts +2 -2
- package/types/export-types.d.ts +106 -106
- package/types/exports.d.ts +89 -89
- package/types/index.d.ts +3 -3
- package/types/init.d.ts +1 -1
- package/umd/Core/Canvas.js +29 -29
- package/umd/Core/Container.js +20 -20
- package/umd/Core/Engine.js +23 -23
- package/umd/Core/Particle.js +38 -38
- package/umd/Core/Particles.js +19 -18
- package/umd/Core/Retina.js +12 -12
- package/umd/Core/Utils/Circle.js +7 -7
- package/umd/Core/Utils/EventListeners.js +20 -20
- package/umd/Core/Utils/QuadTree.js +8 -8
- package/umd/Core/Utils/Rectangle.js +5 -5
- package/umd/Core/Utils/Vector.js +3 -3
- package/umd/Core/Utils/Vector3d.js +5 -5
- package/umd/Options/Classes/AnimatableColor.js +7 -7
- package/umd/Options/Classes/AnimationOptions.js +6 -6
- package/umd/Options/Classes/Background/Background.js +4 -4
- package/umd/Options/Classes/BackgroundMask/BackgroundMask.js +5 -5
- package/umd/Options/Classes/BackgroundMask/BackgroundMaskCover.js +4 -4
- package/umd/Options/Classes/ColorAnimation.js +7 -7
- package/umd/Options/Classes/HslAnimation.js +5 -5
- package/umd/Options/Classes/Interactivity/Events/Events.js +13 -13
- package/umd/Options/Classes/Interactivity/Events/HoverEvent.js +3 -3
- package/umd/Options/Classes/Interactivity/Interactivity.js +5 -5
- package/umd/Options/Classes/ManualParticle.js +3 -3
- package/umd/Options/Classes/Options.js +25 -25
- package/umd/Options/Classes/OptionsColor.js +3 -3
- package/umd/Options/Classes/Particles/Bounce/ParticlesBounce.js +4 -4
- package/umd/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +3 -3
- package/umd/Options/Classes/Particles/Collisions/Collisions.js +9 -9
- package/umd/Options/Classes/Particles/Move/Move.js +25 -25
- package/umd/Options/Classes/Particles/Move/MoveAngle.js +4 -4
- package/umd/Options/Classes/Particles/Move/MoveAttract.js +3 -3
- package/umd/Options/Classes/Particles/Move/MoveGravity.js +4 -4
- package/umd/Options/Classes/Particles/Move/MoveTrail.js +3 -3
- package/umd/Options/Classes/Particles/Move/MoveTrailFill.js +3 -3
- package/umd/Options/Classes/Particles/Move/Path/MovePath.js +5 -5
- package/umd/Options/Classes/Particles/Move/Spin.js +5 -5
- package/umd/Options/Classes/Particles/Number/ParticlesNumber.js +3 -3
- package/umd/Options/Classes/Particles/Opacity/Opacity.js +5 -5
- package/umd/Options/Classes/Particles/Opacity/OpacityAnimation.js +3 -3
- package/umd/Options/Classes/Particles/ParticlesOptions.js +29 -29
- package/umd/Options/Classes/Particles/Shadow.js +4 -4
- package/umd/Options/Classes/Particles/Shape/Shape.js +3 -3
- package/umd/Options/Classes/Particles/Size/Size.js +5 -5
- package/umd/Options/Classes/Particles/Size/SizeAnimation.js +3 -3
- package/umd/Options/Classes/Particles/Stroke.js +6 -6
- package/umd/Options/Classes/Particles/ZIndex/ZIndex.js +3 -3
- package/umd/Options/Classes/Responsive.js +3 -3
- package/umd/Options/Classes/Theme/Theme.js +5 -5
- package/umd/Options/Classes/ValueWithRandom.js +10 -10
- package/umd/Utils/CanvasUtils.js +3 -3
- package/umd/Utils/ColorUtils.js +24 -24
- package/umd/Utils/HslColorManager.js +10 -10
- package/umd/Utils/NumberUtils.js +11 -11
- package/umd/Utils/OptionsUtils.js +3 -3
- package/umd/Utils/RgbColorManager.js +6 -6
- package/umd/Utils/Utils.js +18 -18
- package/umd/bundle.js +4 -4
- package/umd/export-types.js +98 -98
- package/umd/exports.js +90 -90
- package/umd/index.js +7 -7
- package/umd/init.js +9 -9
|
@@ -4,41 +4,41 @@
|
|
|
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", "./MoveAngle", "./MoveAttract", "./MoveCenter", "./MoveGravity", "./Path/MovePath", "./MoveTrail", "./OutModes", "./Spin", "../../../../Utils/NumberUtils"], factory);
|
|
7
|
+
define(["require", "exports", "../../../../Utils/Utils.js", "./MoveAngle.js", "./MoveAttract.js", "./MoveCenter.js", "./MoveGravity.js", "./Path/MovePath.js", "./MoveTrail.js", "./OutModes.js", "./Spin.js", "../../../../Utils/NumberUtils.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Move = void 0;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
13
|
+
const Utils_js_1 = require("../../../../Utils/Utils.js");
|
|
14
|
+
const MoveAngle_js_1 = require("./MoveAngle.js");
|
|
15
|
+
const MoveAttract_js_1 = require("./MoveAttract.js");
|
|
16
|
+
const MoveCenter_js_1 = require("./MoveCenter.js");
|
|
17
|
+
const MoveGravity_js_1 = require("./MoveGravity.js");
|
|
18
|
+
const MovePath_js_1 = require("./Path/MovePath.js");
|
|
19
|
+
const MoveTrail_js_1 = require("./MoveTrail.js");
|
|
20
|
+
const OutModes_js_1 = require("./OutModes.js");
|
|
21
|
+
const Spin_js_1 = require("./Spin.js");
|
|
22
|
+
const NumberUtils_js_1 = require("../../../../Utils/NumberUtils.js");
|
|
23
23
|
class Move {
|
|
24
24
|
constructor() {
|
|
25
|
-
this.angle = new
|
|
26
|
-
this.attract = new
|
|
27
|
-
this.center = new
|
|
25
|
+
this.angle = new MoveAngle_js_1.MoveAngle();
|
|
26
|
+
this.attract = new MoveAttract_js_1.MoveAttract();
|
|
27
|
+
this.center = new MoveCenter_js_1.MoveCenter();
|
|
28
28
|
this.decay = 0;
|
|
29
29
|
this.distance = {};
|
|
30
30
|
this.direction = "none";
|
|
31
31
|
this.drift = 0;
|
|
32
32
|
this.enable = false;
|
|
33
|
-
this.gravity = new
|
|
34
|
-
this.path = new
|
|
35
|
-
this.outModes = new
|
|
33
|
+
this.gravity = new MoveGravity_js_1.MoveGravity();
|
|
34
|
+
this.path = new MovePath_js_1.MovePath();
|
|
35
|
+
this.outModes = new OutModes_js_1.OutModes();
|
|
36
36
|
this.random = false;
|
|
37
37
|
this.size = false;
|
|
38
38
|
this.speed = 2;
|
|
39
|
-
this.spin = new
|
|
39
|
+
this.spin = new Spin_js_1.Spin();
|
|
40
40
|
this.straight = false;
|
|
41
|
-
this.trail = new
|
|
41
|
+
this.trail = new MoveTrail_js_1.MoveTrail();
|
|
42
42
|
this.vibrate = false;
|
|
43
43
|
this.warp = false;
|
|
44
44
|
}
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
if (!data) {
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
|
-
this.angle.load((0,
|
|
49
|
+
this.angle.load((0, Utils_js_1.isNumber)(data.angle) ? { value: data.angle } : data.angle);
|
|
50
50
|
this.attract.load(data.attract);
|
|
51
51
|
this.center.load(data.center);
|
|
52
52
|
if (data.decay !== undefined) {
|
|
53
|
-
this.decay = (0,
|
|
53
|
+
this.decay = (0, NumberUtils_js_1.setRangeValue)(data.decay);
|
|
54
54
|
}
|
|
55
55
|
if (data.direction !== undefined) {
|
|
56
56
|
this.direction = data.direction;
|
|
57
57
|
}
|
|
58
58
|
if (data.distance !== undefined) {
|
|
59
|
-
this.distance = (0,
|
|
59
|
+
this.distance = (0, Utils_js_1.isNumber)(data.distance)
|
|
60
60
|
? {
|
|
61
61
|
horizontal: data.distance,
|
|
62
62
|
vertical: data.distance,
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
: { ...data.distance };
|
|
65
65
|
}
|
|
66
66
|
if (data.drift !== undefined) {
|
|
67
|
-
this.drift = (0,
|
|
67
|
+
this.drift = (0, NumberUtils_js_1.setRangeValue)(data.drift);
|
|
68
68
|
}
|
|
69
69
|
if (data.enable !== undefined) {
|
|
70
70
|
this.enable = data.enable;
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
this.gravity.load(data.gravity);
|
|
73
73
|
const outModes = data.outModes;
|
|
74
74
|
if (outModes !== undefined) {
|
|
75
|
-
if ((0,
|
|
75
|
+
if ((0, Utils_js_1.isObject)(outModes)) {
|
|
76
76
|
this.outModes.load(outModes);
|
|
77
77
|
}
|
|
78
78
|
else {
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
this.size = data.size;
|
|
90
90
|
}
|
|
91
91
|
if (data.speed !== undefined) {
|
|
92
|
-
this.speed = (0,
|
|
92
|
+
this.speed = (0, NumberUtils_js_1.setRangeValue)(data.speed);
|
|
93
93
|
}
|
|
94
94
|
this.spin.load(data.spin);
|
|
95
95
|
if (data.straight !== undefined) {
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "../../../../Utils/NumberUtils"], factory);
|
|
7
|
+
define(["require", "exports", "../../../../Utils/NumberUtils.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MoveAngle = void 0;
|
|
13
|
-
const
|
|
13
|
+
const NumberUtils_js_1 = require("../../../../Utils/NumberUtils.js");
|
|
14
14
|
class MoveAngle {
|
|
15
15
|
constructor() {
|
|
16
16
|
this.offset = 0;
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
if (data.offset !== undefined) {
|
|
24
|
-
this.offset = (0,
|
|
24
|
+
this.offset = (0, NumberUtils_js_1.setRangeValue)(data.offset);
|
|
25
25
|
}
|
|
26
26
|
if (data.value !== undefined) {
|
|
27
|
-
this.value = (0,
|
|
27
|
+
this.value = (0, NumberUtils_js_1.setRangeValue)(data.value);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "../../../../Utils/NumberUtils"], factory);
|
|
7
|
+
define(["require", "exports", "../../../../Utils/NumberUtils.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MoveAttract = void 0;
|
|
13
|
-
const
|
|
13
|
+
const NumberUtils_js_1 = require("../../../../Utils/NumberUtils.js");
|
|
14
14
|
class MoveAttract {
|
|
15
15
|
constructor() {
|
|
16
16
|
this.distance = 200;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
if (data.distance !== undefined) {
|
|
28
|
-
this.distance = (0,
|
|
28
|
+
this.distance = (0, NumberUtils_js_1.setRangeValue)(data.distance);
|
|
29
29
|
}
|
|
30
30
|
if (data.enable !== undefined) {
|
|
31
31
|
this.enable = data.enable;
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "../../../../Utils/NumberUtils"], factory);
|
|
7
|
+
define(["require", "exports", "../../../../Utils/NumberUtils.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MoveGravity = void 0;
|
|
13
|
-
const
|
|
13
|
+
const NumberUtils_js_1 = require("../../../../Utils/NumberUtils.js");
|
|
14
14
|
class MoveGravity {
|
|
15
15
|
constructor() {
|
|
16
16
|
this.acceleration = 9.81;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
if (data.acceleration !== undefined) {
|
|
26
|
-
this.acceleration = (0,
|
|
26
|
+
this.acceleration = (0, NumberUtils_js_1.setRangeValue)(data.acceleration);
|
|
27
27
|
}
|
|
28
28
|
if (data.enable !== undefined) {
|
|
29
29
|
this.enable = data.enable;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
this.inverse = data.inverse;
|
|
33
33
|
}
|
|
34
34
|
if (data.maxSpeed !== undefined) {
|
|
35
|
-
this.maxSpeed = (0,
|
|
35
|
+
this.maxSpeed = (0, NumberUtils_js_1.setRangeValue)(data.maxSpeed);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "./MoveTrailFill"], factory);
|
|
7
|
+
define(["require", "exports", "./MoveTrailFill.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MoveTrail = void 0;
|
|
13
|
-
const
|
|
13
|
+
const MoveTrailFill_js_1 = require("./MoveTrailFill.js");
|
|
14
14
|
class MoveTrail {
|
|
15
15
|
constructor() {
|
|
16
16
|
this.enable = false;
|
|
17
17
|
this.length = 10;
|
|
18
|
-
this.fill = new
|
|
18
|
+
this.fill = new MoveTrailFill_js_1.MoveTrailFill();
|
|
19
19
|
}
|
|
20
20
|
load(data) {
|
|
21
21
|
if (!data) {
|
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "../../OptionsColor"], factory);
|
|
7
|
+
define(["require", "exports", "../../OptionsColor.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MoveTrailFill = void 0;
|
|
13
|
-
const
|
|
13
|
+
const OptionsColor_js_1 = require("../../OptionsColor.js");
|
|
14
14
|
class MoveTrailFill {
|
|
15
15
|
load(data) {
|
|
16
16
|
if (!data) {
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
if (data.color !== undefined) {
|
|
20
|
-
this.color =
|
|
20
|
+
this.color = OptionsColor_js_1.OptionsColor.create(this.color, data.color);
|
|
21
21
|
}
|
|
22
22
|
if (data.image !== undefined) {
|
|
23
23
|
this.image = data.image;
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "../../../ValueWithRandom", "../../../../../Utils/Utils"], factory);
|
|
7
|
+
define(["require", "exports", "../../../ValueWithRandom.js", "../../../../../Utils/Utils.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MovePath = void 0;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const ValueWithRandom_js_1 = require("../../../ValueWithRandom.js");
|
|
14
|
+
const Utils_js_1 = require("../../../../../Utils/Utils.js");
|
|
15
15
|
class MovePath {
|
|
16
16
|
constructor() {
|
|
17
17
|
this.clamp = true;
|
|
18
|
-
this.delay = new
|
|
18
|
+
this.delay = new ValueWithRandom_js_1.ValueWithRandom();
|
|
19
19
|
this.enable = false;
|
|
20
20
|
this.options = {};
|
|
21
21
|
}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
this.generator = data.generator;
|
|
34
34
|
if (data.options) {
|
|
35
|
-
this.options = (0,
|
|
35
|
+
this.options = (0, Utils_js_1.deepExtend)(this.options, data.options);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -4,14 +4,14 @@
|
|
|
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", "../../../../Utils/NumberUtils"], factory);
|
|
7
|
+
define(["require", "exports", "../../../../Utils/Utils.js", "../../../../Utils/NumberUtils.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Spin = void 0;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const Utils_js_1 = require("../../../../Utils/Utils.js");
|
|
14
|
+
const NumberUtils_js_1 = require("../../../../Utils/NumberUtils.js");
|
|
15
15
|
class Spin {
|
|
16
16
|
constructor() {
|
|
17
17
|
this.acceleration = 0;
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
24
|
if (data.acceleration !== undefined) {
|
|
25
|
-
this.acceleration = (0,
|
|
25
|
+
this.acceleration = (0, NumberUtils_js_1.setRangeValue)(data.acceleration);
|
|
26
26
|
}
|
|
27
27
|
if (data.enable !== undefined) {
|
|
28
28
|
this.enable = data.enable;
|
|
29
29
|
}
|
|
30
30
|
if (data.position) {
|
|
31
|
-
this.position = (0,
|
|
31
|
+
this.position = (0, Utils_js_1.deepExtend)({}, data.position);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -4,16 +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", "./ParticlesDensity"], factory);
|
|
7
|
+
define(["require", "exports", "./ParticlesDensity.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ParticlesNumber = void 0;
|
|
13
|
-
const
|
|
13
|
+
const ParticlesDensity_js_1 = require("./ParticlesDensity.js");
|
|
14
14
|
class ParticlesNumber {
|
|
15
15
|
constructor() {
|
|
16
|
-
this.density = new
|
|
16
|
+
this.density = new ParticlesDensity_js_1.ParticlesDensity();
|
|
17
17
|
this.limit = 0;
|
|
18
18
|
this.value = 0;
|
|
19
19
|
}
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "./OpacityAnimation", "../../ValueWithRandom"], factory);
|
|
7
|
+
define(["require", "exports", "./OpacityAnimation.js", "../../ValueWithRandom.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Opacity = void 0;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
class Opacity extends
|
|
13
|
+
const OpacityAnimation_js_1 = require("./OpacityAnimation.js");
|
|
14
|
+
const ValueWithRandom_js_1 = require("../../ValueWithRandom.js");
|
|
15
|
+
class Opacity extends ValueWithRandom_js_1.ValueWithRandom {
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
18
|
-
this.animation = new
|
|
18
|
+
this.animation = new OpacityAnimation_js_1.OpacityAnimation();
|
|
19
19
|
this.random.minimumValue = 0.1;
|
|
20
20
|
this.value = 1;
|
|
21
21
|
}
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "../../AnimationOptions"], factory);
|
|
7
|
+
define(["require", "exports", "../../AnimationOptions.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.OpacityAnimation = void 0;
|
|
13
|
-
const
|
|
14
|
-
class OpacityAnimation extends
|
|
13
|
+
const AnimationOptions_js_1 = require("../../AnimationOptions.js");
|
|
14
|
+
class OpacityAnimation extends AnimationOptions_js_1.RangedAnimationOptions {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
17
17
|
this.destroy = "none";
|
|
@@ -4,54 +4,54 @@
|
|
|
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", "../AnimatableColor", "./Collisions/Collisions", "./Move/Move", "./Opacity/Opacity", "./Bounce/ParticlesBounce", "./Number/ParticlesNumber", "./Shadow", "./Shape/Shape", "./Size/Size", "./Stroke", "./ZIndex/ZIndex"], factory);
|
|
7
|
+
define(["require", "exports", "../../../Utils/Utils.js", "../AnimatableColor.js", "./Collisions/Collisions.js", "./Move/Move.js", "./Opacity/Opacity.js", "./Bounce/ParticlesBounce.js", "./Number/ParticlesNumber.js", "./Shadow.js", "./Shape/Shape.js", "./Size/Size.js", "./Stroke.js", "./ZIndex/ZIndex.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ParticlesOptions = void 0;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
13
|
+
const Utils_js_1 = require("../../../Utils/Utils.js");
|
|
14
|
+
const AnimatableColor_js_1 = require("../AnimatableColor.js");
|
|
15
|
+
const Collisions_js_1 = require("./Collisions/Collisions.js");
|
|
16
|
+
const Move_js_1 = require("./Move/Move.js");
|
|
17
|
+
const Opacity_js_1 = require("./Opacity/Opacity.js");
|
|
18
|
+
const ParticlesBounce_js_1 = require("./Bounce/ParticlesBounce.js");
|
|
19
|
+
const ParticlesNumber_js_1 = require("./Number/ParticlesNumber.js");
|
|
20
|
+
const Shadow_js_1 = require("./Shadow.js");
|
|
21
|
+
const Shape_js_1 = require("./Shape/Shape.js");
|
|
22
|
+
const Size_js_1 = require("./Size/Size.js");
|
|
23
|
+
const Stroke_js_1 = require("./Stroke.js");
|
|
24
|
+
const ZIndex_js_1 = require("./ZIndex/ZIndex.js");
|
|
25
25
|
class ParticlesOptions {
|
|
26
26
|
constructor(engine, container) {
|
|
27
27
|
this._engine = engine;
|
|
28
28
|
this._container = container;
|
|
29
|
-
this.bounce = new
|
|
30
|
-
this.collisions = new
|
|
31
|
-
this.color = new
|
|
29
|
+
this.bounce = new ParticlesBounce_js_1.ParticlesBounce();
|
|
30
|
+
this.collisions = new Collisions_js_1.Collisions();
|
|
31
|
+
this.color = new AnimatableColor_js_1.AnimatableColor();
|
|
32
32
|
this.color.value = "#fff";
|
|
33
33
|
this.groups = {};
|
|
34
|
-
this.move = new
|
|
35
|
-
this.number = new
|
|
36
|
-
this.opacity = new
|
|
34
|
+
this.move = new Move_js_1.Move();
|
|
35
|
+
this.number = new ParticlesNumber_js_1.ParticlesNumber();
|
|
36
|
+
this.opacity = new Opacity_js_1.Opacity();
|
|
37
37
|
this.reduceDuplicates = false;
|
|
38
|
-
this.shadow = new
|
|
39
|
-
this.shape = new
|
|
40
|
-
this.size = new
|
|
41
|
-
this.stroke = new
|
|
42
|
-
this.zIndex = new
|
|
38
|
+
this.shadow = new Shadow_js_1.Shadow();
|
|
39
|
+
this.shape = new Shape_js_1.Shape();
|
|
40
|
+
this.size = new Size_js_1.Size();
|
|
41
|
+
this.stroke = new Stroke_js_1.Stroke();
|
|
42
|
+
this.zIndex = new ZIndex_js_1.ZIndex();
|
|
43
43
|
}
|
|
44
44
|
load(data) {
|
|
45
45
|
if (!data) {
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
48
|
this.bounce.load(data.bounce);
|
|
49
|
-
this.color.load(
|
|
49
|
+
this.color.load(AnimatableColor_js_1.AnimatableColor.create(this.color, data.color));
|
|
50
50
|
if (data.groups !== undefined) {
|
|
51
51
|
for (const group in data.groups) {
|
|
52
52
|
const item = data.groups[group];
|
|
53
53
|
if (item !== undefined) {
|
|
54
|
-
this.groups[group] = (0,
|
|
54
|
+
this.groups[group] = (0, Utils_js_1.deepExtend)(this.groups[group] ?? {}, item);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
this.zIndex.load(data.zIndex);
|
|
68
68
|
this.collisions.load(data.collisions);
|
|
69
69
|
if (data.interactivity !== undefined) {
|
|
70
|
-
this.interactivity = (0,
|
|
70
|
+
this.interactivity = (0, Utils_js_1.deepExtend)({}, data.interactivity);
|
|
71
71
|
}
|
|
72
72
|
const strokeToLoad = data.stroke;
|
|
73
73
|
if (strokeToLoad) {
|
|
74
|
-
this.stroke = (0,
|
|
75
|
-
const tmp = new
|
|
74
|
+
this.stroke = (0, Utils_js_1.executeOnSingleOrMultiple)(strokeToLoad, (t) => {
|
|
75
|
+
const tmp = new Stroke_js_1.Stroke();
|
|
76
76
|
tmp.load(t);
|
|
77
77
|
return tmp;
|
|
78
78
|
});
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "../OptionsColor"], factory);
|
|
7
|
+
define(["require", "exports", "../OptionsColor.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Shadow = void 0;
|
|
13
|
-
const
|
|
13
|
+
const OptionsColor_js_1 = require("../OptionsColor.js");
|
|
14
14
|
class Shadow {
|
|
15
15
|
constructor() {
|
|
16
16
|
this.blur = 0;
|
|
17
|
-
this.color = new
|
|
17
|
+
this.color = new OptionsColor_js_1.OptionsColor();
|
|
18
18
|
this.enable = false;
|
|
19
19
|
this.offset = {
|
|
20
20
|
x: 0,
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
if (data.blur !== undefined) {
|
|
30
30
|
this.blur = data.blur;
|
|
31
31
|
}
|
|
32
|
-
this.color =
|
|
32
|
+
this.color = OptionsColor_js_1.OptionsColor.create(this.color, data.color);
|
|
33
33
|
if (data.enable !== undefined) {
|
|
34
34
|
this.enable = data.enable;
|
|
35
35
|
}
|
|
@@ -4,13 +4,13 @@
|
|
|
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"], factory);
|
|
7
|
+
define(["require", "exports", "../../../../Utils/Utils.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Shape = void 0;
|
|
13
|
-
const
|
|
13
|
+
const Utils_js_1 = require("../../../../Utils/Utils.js");
|
|
14
14
|
class Shape {
|
|
15
15
|
constructor() {
|
|
16
16
|
this.close = true;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
for (const shape in options) {
|
|
28
28
|
const item = options[shape];
|
|
29
29
|
if (item) {
|
|
30
|
-
this.options[shape] = (0,
|
|
30
|
+
this.options[shape] = (0, Utils_js_1.deepExtend)(this.options[shape] ?? {}, item);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "./SizeAnimation", "../../ValueWithRandom"], factory);
|
|
7
|
+
define(["require", "exports", "./SizeAnimation.js", "../../ValueWithRandom.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Size = void 0;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
class Size extends
|
|
13
|
+
const SizeAnimation_js_1 = require("./SizeAnimation.js");
|
|
14
|
+
const ValueWithRandom_js_1 = require("../../ValueWithRandom.js");
|
|
15
|
+
class Size extends ValueWithRandom_js_1.ValueWithRandom {
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
18
|
-
this.animation = new
|
|
18
|
+
this.animation = new SizeAnimation_js_1.SizeAnimation();
|
|
19
19
|
this.random.minimumValue = 1;
|
|
20
20
|
this.value = 3;
|
|
21
21
|
}
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "../../AnimationOptions"], factory);
|
|
7
|
+
define(["require", "exports", "../../AnimationOptions.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SizeAnimation = void 0;
|
|
13
|
-
const
|
|
14
|
-
class SizeAnimation extends
|
|
13
|
+
const AnimationOptions_js_1 = require("../../AnimationOptions.js");
|
|
14
|
+
class SizeAnimation extends AnimationOptions_js_1.RangedAnimationOptions {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
17
17
|
this.destroy = "none";
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "../AnimatableColor", "../../../Utils/NumberUtils"], factory);
|
|
7
|
+
define(["require", "exports", "../AnimatableColor.js", "../../../Utils/NumberUtils.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Stroke = void 0;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const AnimatableColor_js_1 = require("../AnimatableColor.js");
|
|
14
|
+
const NumberUtils_js_1 = require("../../../Utils/NumberUtils.js");
|
|
15
15
|
class Stroke {
|
|
16
16
|
constructor() {
|
|
17
17
|
this.width = 0;
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
if (data.color !== undefined) {
|
|
24
|
-
this.color =
|
|
24
|
+
this.color = AnimatableColor_js_1.AnimatableColor.create(this.color, data.color);
|
|
25
25
|
}
|
|
26
26
|
if (data.width !== undefined) {
|
|
27
|
-
this.width = (0,
|
|
27
|
+
this.width = (0, NumberUtils_js_1.setRangeValue)(data.width);
|
|
28
28
|
}
|
|
29
29
|
if (data.opacity !== undefined) {
|
|
30
|
-
this.opacity = (0,
|
|
30
|
+
this.opacity = (0, NumberUtils_js_1.setRangeValue)(data.opacity);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "../../ValueWithRandom"], factory);
|
|
7
|
+
define(["require", "exports", "../../ValueWithRandom.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ZIndex = void 0;
|
|
13
|
-
const
|
|
14
|
-
class ZIndex extends
|
|
13
|
+
const ValueWithRandom_js_1 = require("../../ValueWithRandom.js");
|
|
14
|
+
class ZIndex extends ValueWithRandom_js_1.ValueWithRandom {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
17
17
|
this.opacityRate = 1;
|