@tsparticles/engine 3.0.0-alpha.0
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/LICENSE +21 -0
- package/README.md +824 -0
- package/browser/Core/Canvas.js +398 -0
- package/browser/Core/Container.js +436 -0
- package/browser/Core/Interfaces/Colors.js +1 -0
- package/browser/Core/Interfaces/IBounds.js +1 -0
- package/browser/Core/Interfaces/IBubbleParticleData.js +1 -0
- package/browser/Core/Interfaces/ICircleBouncer.js +1 -0
- package/browser/Core/Interfaces/IColorManager.js +1 -0
- package/browser/Core/Interfaces/IContainerInteractivity.js +1 -0
- package/browser/Core/Interfaces/IContainerPlugin.js +1 -0
- package/browser/Core/Interfaces/ICoordinates.js +1 -0
- package/browser/Core/Interfaces/IDelta.js +1 -0
- package/browser/Core/Interfaces/IDimension.js +1 -0
- package/browser/Core/Interfaces/IDistance.js +1 -0
- package/browser/Core/Interfaces/IDrawParticleParams.js +1 -0
- package/browser/Core/Interfaces/IExternalInteractor.js +1 -0
- package/browser/Core/Interfaces/IInteractor.js +1 -0
- package/browser/Core/Interfaces/ILoadParams.js +1 -0
- package/browser/Core/Interfaces/IMouseData.js +1 -0
- package/browser/Core/Interfaces/IMovePathGenerator.js +1 -0
- package/browser/Core/Interfaces/IParticle.js +1 -0
- package/browser/Core/Interfaces/IParticleColorStyle.js +1 -0
- package/browser/Core/Interfaces/IParticleHslAnimation.js +1 -0
- package/browser/Core/Interfaces/IParticleLife.js +1 -0
- package/browser/Core/Interfaces/IParticleMover.js +1 -0
- package/browser/Core/Interfaces/IParticleOverride.js +1 -0
- package/browser/Core/Interfaces/IParticleRetinaProps.js +1 -0
- package/browser/Core/Interfaces/IParticleRoll.js +1 -0
- package/browser/Core/Interfaces/IParticleTransformValues.js +1 -0
- package/browser/Core/Interfaces/IParticleUpdater.js +1 -0
- package/browser/Core/Interfaces/IParticleValueAnimation.js +1 -0
- package/browser/Core/Interfaces/IParticlesInteractor.js +1 -0
- package/browser/Core/Interfaces/IParticlesMover.js +1 -0
- package/browser/Core/Interfaces/IPlugin.js +1 -0
- package/browser/Core/Interfaces/IPositionFromSizeParams.js +1 -0
- package/browser/Core/Interfaces/IRangeValue.js +1 -0
- package/browser/Core/Interfaces/IRectSideResult.js +1 -0
- package/browser/Core/Interfaces/IShapeDrawer.js +1 -0
- package/browser/Core/Interfaces/IShapeValues.js +1 -0
- package/browser/Core/Interfaces/ISlowParticleData.js +1 -0
- package/browser/Core/Interfaces/ITrailFillData.js +1 -0
- package/browser/Core/Particle.js +307 -0
- package/browser/Core/Particles.js +262 -0
- package/browser/Core/Retina.js +33 -0
- package/browser/Core/Utils/Circle.js +23 -0
- package/browser/Core/Utils/Constants.js +12 -0
- package/browser/Core/Utils/EventListeners.js +280 -0
- package/browser/Core/Utils/ExternalInteractorBase.js +6 -0
- package/browser/Core/Utils/FrameManager.js +42 -0
- package/browser/Core/Utils/InteractionManager.js +60 -0
- package/browser/Core/Utils/ParticlesInteractorBase.js +6 -0
- package/browser/Core/Utils/Plugins.js +112 -0
- package/browser/Core/Utils/Point.js +6 -0
- package/browser/Core/Utils/QuadTree.js +64 -0
- package/browser/Core/Utils/Range.js +8 -0
- package/browser/Core/Utils/Rectangle.js +22 -0
- package/browser/Core/Utils/Vector.js +15 -0
- package/browser/Core/Utils/Vector3d.js +96 -0
- package/browser/Enums/AnimationStatus.js +1 -0
- package/browser/Enums/Directions/MoveDirection.js +1 -0
- package/browser/Enums/Directions/OutModeDirection.js +1 -0
- package/browser/Enums/Directions/RotateDirection.js +1 -0
- package/browser/Enums/InteractivityDetect.js +1 -0
- package/browser/Enums/Modes/ClickMode.js +1 -0
- package/browser/Enums/Modes/CollisionMode.js +1 -0
- package/browser/Enums/Modes/DivMode.js +1 -0
- package/browser/Enums/Modes/HoverMode.js +1 -0
- package/browser/Enums/Modes/OutMode.js +1 -0
- package/browser/Enums/Modes/ResponsiveMode.js +1 -0
- package/browser/Enums/Modes/SizeMode.js +1 -0
- package/browser/Enums/Modes/ThemeMode.js +1 -0
- package/browser/Enums/Types/AlterType.js +1 -0
- package/browser/Enums/Types/DestroyType.js +1 -0
- package/browser/Enums/Types/DivType.js +1 -0
- package/browser/Enums/Types/EasingType.js +1 -0
- package/browser/Enums/Types/EventType.js +1 -0
- package/browser/Enums/Types/GradientType.js +1 -0
- package/browser/Enums/Types/InteractorType.js +1 -0
- package/browser/Enums/Types/ParticleOutType.js +1 -0
- package/browser/Enums/Types/StartValueType.js +1 -0
- package/browser/Options/Classes/AnimatableColor.js +36 -0
- package/browser/Options/Classes/AnimationOptions.js +48 -0
- package/browser/Options/Classes/Background/Background.js +35 -0
- package/browser/Options/Classes/BackgroundMask/BackgroundMask.js +24 -0
- package/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.js +19 -0
- package/browser/Options/Classes/ColorAnimation.js +34 -0
- package/browser/Options/Classes/FullScreen/FullScreen.js +17 -0
- package/browser/Options/Classes/HslAnimation.js +16 -0
- package/browser/Options/Classes/Interactivity/Events/ClickEvent.js +17 -0
- package/browser/Options/Classes/Interactivity/Events/DivEvent.js +49 -0
- package/browser/Options/Classes/Interactivity/Events/Events.js +53 -0
- package/browser/Options/Classes/Interactivity/Events/HoverEvent.js +20 -0
- package/browser/Options/Classes/Interactivity/Events/Parallax.js +21 -0
- package/browser/Options/Classes/Interactivity/Events/ResizeEvent.js +17 -0
- package/browser/Options/Classes/Interactivity/Interactivity.js +27 -0
- package/browser/Options/Classes/Interactivity/Modes/Modes.js +21 -0
- package/browser/Options/Classes/ManualParticle.js +18 -0
- package/browser/Options/Classes/Options.js +170 -0
- package/browser/Options/Classes/OptionsColor.js +24 -0
- package/browser/Options/Classes/Particles/Bounce/ParticlesBounce.js +14 -0
- package/browser/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +8 -0
- package/browser/Options/Classes/Particles/Collisions/Collisions.js +26 -0
- package/browser/Options/Classes/Particles/Collisions/CollisionsAbsorb.js +13 -0
- package/browser/Options/Classes/Particles/Collisions/CollisionsOverlap.js +17 -0
- package/browser/Options/Classes/Particles/Move/Move.js +124 -0
- package/browser/Options/Classes/Particles/Move/MoveAngle.js +18 -0
- package/browser/Options/Classes/Particles/Move/MoveAttract.js +43 -0
- package/browser/Options/Classes/Particles/Move/MoveCenter.js +25 -0
- package/browser/Options/Classes/Particles/Move/MoveGravity.js +26 -0
- package/browser/Options/Classes/Particles/Move/MoveTrail.js +28 -0
- package/browser/Options/Classes/Particles/Move/MoveTrailFill.js +14 -0
- package/browser/Options/Classes/Particles/Move/OutModes.js +18 -0
- package/browser/Options/Classes/Particles/Move/Path/MovePath.js +26 -0
- package/browser/Options/Classes/Particles/Move/Spin.js +20 -0
- package/browser/Options/Classes/Particles/Number/ParticlesDensity.js +42 -0
- package/browser/Options/Classes/Particles/Number/ParticlesNumber.js +28 -0
- package/browser/Options/Classes/Particles/Opacity/Opacity.js +16 -0
- package/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +26 -0
- package/browser/Options/Classes/Particles/ParticlesOptions.js +92 -0
- package/browser/Options/Classes/Particles/Shadow.js +34 -0
- package/browser/Options/Classes/Particles/Shape/Shape.js +25 -0
- package/browser/Options/Classes/Particles/Size/Size.js +16 -0
- package/browser/Options/Classes/Particles/Size/SizeAnimation.js +26 -0
- package/browser/Options/Classes/Particles/Stroke.js +21 -0
- package/browser/Options/Classes/Particles/ZIndex/ZIndex.js +24 -0
- package/browser/Options/Classes/Random.js +17 -0
- package/browser/Options/Classes/Responsive.js +27 -0
- package/browser/Options/Classes/Theme/Theme.js +20 -0
- package/browser/Options/Classes/Theme/ThemeDefault.js +21 -0
- package/browser/Options/Classes/ValueWithRandom.js +62 -0
- package/browser/Options/Interfaces/Background/IBackground.js +1 -0
- package/browser/Options/Interfaces/BackgroundMask/IBackgroundMask.js +1 -0
- package/browser/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.js +1 -0
- package/browser/Options/Interfaces/FullScreen/IFullScreen.js +1 -0
- package/browser/Options/Interfaces/IAnimatable.js +1 -0
- package/browser/Options/Interfaces/IAnimatableColor.js +1 -0
- package/browser/Options/Interfaces/IAnimation.js +1 -0
- package/browser/Options/Interfaces/IColorAnimation.js +1 -0
- package/browser/Options/Interfaces/IHslAnimation.js +1 -0
- package/browser/Options/Interfaces/IManualParticle.js +1 -0
- package/browser/Options/Interfaces/IOptionLoader.js +1 -0
- package/browser/Options/Interfaces/IOptions.js +1 -0
- package/browser/Options/Interfaces/IOptionsColor.js +1 -0
- package/browser/Options/Interfaces/IRandom.js +1 -0
- package/browser/Options/Interfaces/IResponsive.js +1 -0
- package/browser/Options/Interfaces/IValueWithRandom.js +1 -0
- package/browser/Options/Interfaces/Interactivity/Events/IClickEvent.js +1 -0
- package/browser/Options/Interfaces/Interactivity/Events/IDivEvent.js +1 -0
- package/browser/Options/Interfaces/Interactivity/Events/IEvents.js +1 -0
- package/browser/Options/Interfaces/Interactivity/Events/IHoverEvent.js +1 -0
- package/browser/Options/Interfaces/Interactivity/Events/IParallax.js +1 -0
- package/browser/Options/Interfaces/Interactivity/Events/IResizeEvent.js +1 -0
- package/browser/Options/Interfaces/Interactivity/IInteractivity.js +1 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IModeDiv.js +1 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IModes.js +1 -0
- package/browser/Options/Interfaces/Particles/Bounce/IParticlesBounce.js +1 -0
- package/browser/Options/Interfaces/Particles/Collisions/ICollisions.js +1 -0
- package/browser/Options/Interfaces/Particles/Collisions/ICollisionsAbsorb.js +1 -0
- package/browser/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.js +1 -0
- package/browser/Options/Interfaces/Particles/IParticlesOptions.js +1 -0
- package/browser/Options/Interfaces/Particles/IShadow.js +1 -0
- package/browser/Options/Interfaces/Particles/IStroke.js +1 -0
- package/browser/Options/Interfaces/Particles/Move/IMove.js +1 -0
- package/browser/Options/Interfaces/Particles/Move/IMoveAngle.js +1 -0
- package/browser/Options/Interfaces/Particles/Move/IMoveAttract.js +1 -0
- package/browser/Options/Interfaces/Particles/Move/IMoveCenter.js +1 -0
- package/browser/Options/Interfaces/Particles/Move/IMoveGravity.js +1 -0
- package/browser/Options/Interfaces/Particles/Move/IMoveTrail.js +1 -0
- package/browser/Options/Interfaces/Particles/Move/IMoveTrailFill.js +1 -0
- package/browser/Options/Interfaces/Particles/Move/IOutModes.js +1 -0
- package/browser/Options/Interfaces/Particles/Move/ISpin.js +1 -0
- package/browser/Options/Interfaces/Particles/Move/Path/IMovePath.js +1 -0
- package/browser/Options/Interfaces/Particles/Number/IParticlesDensity.js +1 -0
- package/browser/Options/Interfaces/Particles/Number/IParticlesNumber.js +1 -0
- package/browser/Options/Interfaces/Particles/Opacity/IOpacity.js +1 -0
- package/browser/Options/Interfaces/Particles/Opacity/IOpacityAnimation.js +1 -0
- package/browser/Options/Interfaces/Particles/Shape/ICharacterShape.js +1 -0
- package/browser/Options/Interfaces/Particles/Shape/IImageShape.js +1 -0
- package/browser/Options/Interfaces/Particles/Shape/IPolygonShape.js +1 -0
- package/browser/Options/Interfaces/Particles/Shape/IShape.js +1 -0
- package/browser/Options/Interfaces/Particles/Shape/IShapeValues.js +1 -0
- package/browser/Options/Interfaces/Particles/Shape/IStarShape.js +1 -0
- package/browser/Options/Interfaces/Particles/Size/ISize.js +1 -0
- package/browser/Options/Interfaces/Particles/Size/ISizeAnimation.js +1 -0
- package/browser/Options/Interfaces/Particles/ZIndex/IZIndex.js +1 -0
- package/browser/Options/Interfaces/Theme/ITheme.js +1 -0
- package/browser/Options/Interfaces/Theme/IThemeDefault.js +1 -0
- package/browser/Types/CustomEventArgs.js +1 -0
- package/browser/Types/CustomEventListener.js +1 -0
- package/browser/Types/ISourceOptions.js +1 -0
- package/browser/Types/ParticlesGroups.js +1 -0
- package/browser/Types/PathOptions.js +1 -0
- package/browser/Types/RangeValue.js +1 -0
- package/browser/Types/RecursivePartial.js +1 -0
- package/browser/Types/ShapeData.js +1 -0
- package/browser/Types/ShapeDrawerFunctions.js +1 -0
- package/browser/Types/SingleOrMultiple.js +1 -0
- package/browser/Utils/CanvasUtils.js +149 -0
- package/browser/Utils/ColorUtils.js +274 -0
- package/browser/Utils/EventDispatcher.js +44 -0
- package/browser/Utils/HslColorManager.js +40 -0
- package/browser/Utils/NumberUtils.js +149 -0
- package/browser/Utils/OptionsUtils.js +11 -0
- package/browser/Utils/RgbColorManager.js +39 -0
- package/browser/Utils/Utils.js +247 -0
- package/browser/bundle.js +97 -0
- package/browser/engine.js +175 -0
- package/browser/index.js +199 -0
- package/cjs/Core/Canvas.js +402 -0
- package/cjs/Core/Container.js +440 -0
- package/cjs/Core/Interfaces/Colors.js +2 -0
- package/cjs/Core/Interfaces/IBounds.js +2 -0
- package/cjs/Core/Interfaces/IBubbleParticleData.js +2 -0
- package/cjs/Core/Interfaces/ICircleBouncer.js +2 -0
- package/cjs/Core/Interfaces/IColorManager.js +2 -0
- package/cjs/Core/Interfaces/IContainerInteractivity.js +2 -0
- package/cjs/Core/Interfaces/IContainerPlugin.js +2 -0
- package/cjs/Core/Interfaces/ICoordinates.js +2 -0
- package/cjs/Core/Interfaces/IDelta.js +2 -0
- package/cjs/Core/Interfaces/IDimension.js +2 -0
- package/cjs/Core/Interfaces/IDistance.js +2 -0
- package/cjs/Core/Interfaces/IDrawParticleParams.js +2 -0
- package/cjs/Core/Interfaces/IExternalInteractor.js +2 -0
- package/cjs/Core/Interfaces/IInteractor.js +2 -0
- package/cjs/Core/Interfaces/ILoadParams.js +2 -0
- package/cjs/Core/Interfaces/IMouseData.js +2 -0
- package/cjs/Core/Interfaces/IMovePathGenerator.js +2 -0
- package/cjs/Core/Interfaces/IParticle.js +2 -0
- package/cjs/Core/Interfaces/IParticleColorStyle.js +2 -0
- package/cjs/Core/Interfaces/IParticleHslAnimation.js +2 -0
- package/cjs/Core/Interfaces/IParticleLife.js +2 -0
- package/cjs/Core/Interfaces/IParticleMover.js +2 -0
- package/cjs/Core/Interfaces/IParticleOverride.js +2 -0
- package/cjs/Core/Interfaces/IParticleRetinaProps.js +2 -0
- package/cjs/Core/Interfaces/IParticleRoll.js +2 -0
- package/cjs/Core/Interfaces/IParticleTransformValues.js +2 -0
- package/cjs/Core/Interfaces/IParticleUpdater.js +2 -0
- package/cjs/Core/Interfaces/IParticleValueAnimation.js +2 -0
- package/cjs/Core/Interfaces/IParticlesInteractor.js +2 -0
- package/cjs/Core/Interfaces/IParticlesMover.js +2 -0
- package/cjs/Core/Interfaces/IPlugin.js +2 -0
- package/cjs/Core/Interfaces/IPositionFromSizeParams.js +2 -0
- package/cjs/Core/Interfaces/IRangeValue.js +2 -0
- package/cjs/Core/Interfaces/IRectSideResult.js +2 -0
- package/cjs/Core/Interfaces/IShapeDrawer.js +2 -0
- package/cjs/Core/Interfaces/IShapeValues.js +2 -0
- package/cjs/Core/Interfaces/ISlowParticleData.js +2 -0
- package/cjs/Core/Interfaces/ITrailFillData.js +2 -0
- package/cjs/Core/Particle.js +311 -0
- package/cjs/Core/Particles.js +266 -0
- package/cjs/Core/Retina.js +37 -0
- package/cjs/Core/Utils/Circle.js +27 -0
- package/cjs/Core/Utils/Constants.js +15 -0
- package/cjs/Core/Utils/EventListeners.js +284 -0
- package/cjs/Core/Utils/ExternalInteractorBase.js +10 -0
- package/cjs/Core/Utils/FrameManager.js +46 -0
- package/cjs/Core/Utils/InteractionManager.js +64 -0
- package/cjs/Core/Utils/ParticlesInteractorBase.js +10 -0
- package/cjs/Core/Utils/Plugins.js +116 -0
- package/cjs/Core/Utils/Point.js +10 -0
- package/cjs/Core/Utils/QuadTree.js +68 -0
- package/cjs/Core/Utils/Range.js +12 -0
- package/cjs/Core/Utils/Rectangle.js +26 -0
- package/cjs/Core/Utils/Vector.js +19 -0
- package/cjs/Core/Utils/Vector3d.js +100 -0
- package/cjs/Enums/AnimationStatus.js +2 -0
- package/cjs/Enums/Directions/MoveDirection.js +2 -0
- package/cjs/Enums/Directions/OutModeDirection.js +2 -0
- package/cjs/Enums/Directions/RotateDirection.js +2 -0
- package/cjs/Enums/InteractivityDetect.js +2 -0
- package/cjs/Enums/Modes/ClickMode.js +2 -0
- package/cjs/Enums/Modes/CollisionMode.js +2 -0
- package/cjs/Enums/Modes/DivMode.js +2 -0
- package/cjs/Enums/Modes/HoverMode.js +2 -0
- package/cjs/Enums/Modes/OutMode.js +2 -0
- package/cjs/Enums/Modes/ResponsiveMode.js +2 -0
- package/cjs/Enums/Modes/SizeMode.js +2 -0
- package/cjs/Enums/Modes/ThemeMode.js +2 -0
- package/cjs/Enums/Types/AlterType.js +2 -0
- package/cjs/Enums/Types/DestroyType.js +2 -0
- package/cjs/Enums/Types/DivType.js +2 -0
- package/cjs/Enums/Types/EasingType.js +2 -0
- package/cjs/Enums/Types/EventType.js +2 -0
- package/cjs/Enums/Types/GradientType.js +2 -0
- package/cjs/Enums/Types/InteractorType.js +2 -0
- package/cjs/Enums/Types/ParticleOutType.js +2 -0
- package/cjs/Enums/Types/StartValueType.js +2 -0
- package/cjs/Options/Classes/AnimatableColor.js +40 -0
- package/cjs/Options/Classes/AnimationOptions.js +53 -0
- package/cjs/Options/Classes/Background/Background.js +39 -0
- package/cjs/Options/Classes/BackgroundMask/BackgroundMask.js +28 -0
- package/cjs/Options/Classes/BackgroundMask/BackgroundMaskCover.js +23 -0
- package/cjs/Options/Classes/ColorAnimation.js +38 -0
- package/cjs/Options/Classes/FullScreen/FullScreen.js +21 -0
- package/cjs/Options/Classes/HslAnimation.js +20 -0
- package/cjs/Options/Classes/Interactivity/Events/ClickEvent.js +21 -0
- package/cjs/Options/Classes/Interactivity/Events/DivEvent.js +53 -0
- package/cjs/Options/Classes/Interactivity/Events/Events.js +57 -0
- package/cjs/Options/Classes/Interactivity/Events/HoverEvent.js +24 -0
- package/cjs/Options/Classes/Interactivity/Events/Parallax.js +25 -0
- package/cjs/Options/Classes/Interactivity/Events/ResizeEvent.js +21 -0
- package/cjs/Options/Classes/Interactivity/Interactivity.js +31 -0
- package/cjs/Options/Classes/Interactivity/Modes/Modes.js +25 -0
- package/cjs/Options/Classes/ManualParticle.js +22 -0
- package/cjs/Options/Classes/Options.js +174 -0
- package/cjs/Options/Classes/OptionsColor.js +28 -0
- package/cjs/Options/Classes/Particles/Bounce/ParticlesBounce.js +18 -0
- package/cjs/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +12 -0
- package/cjs/Options/Classes/Particles/Collisions/Collisions.js +30 -0
- package/cjs/Options/Classes/Particles/Collisions/CollisionsAbsorb.js +17 -0
- package/cjs/Options/Classes/Particles/Collisions/CollisionsOverlap.js +21 -0
- package/cjs/Options/Classes/Particles/Move/Move.js +128 -0
- package/cjs/Options/Classes/Particles/Move/MoveAngle.js +22 -0
- package/cjs/Options/Classes/Particles/Move/MoveAttract.js +47 -0
- package/cjs/Options/Classes/Particles/Move/MoveCenter.js +29 -0
- package/cjs/Options/Classes/Particles/Move/MoveGravity.js +30 -0
- package/cjs/Options/Classes/Particles/Move/MoveTrail.js +32 -0
- package/cjs/Options/Classes/Particles/Move/MoveTrailFill.js +18 -0
- package/cjs/Options/Classes/Particles/Move/OutModes.js +22 -0
- package/cjs/Options/Classes/Particles/Move/Path/MovePath.js +30 -0
- package/cjs/Options/Classes/Particles/Move/Spin.js +24 -0
- package/cjs/Options/Classes/Particles/Number/ParticlesDensity.js +46 -0
- package/cjs/Options/Classes/Particles/Number/ParticlesNumber.js +32 -0
- package/cjs/Options/Classes/Particles/Opacity/Opacity.js +20 -0
- package/cjs/Options/Classes/Particles/Opacity/OpacityAnimation.js +30 -0
- package/cjs/Options/Classes/Particles/ParticlesOptions.js +96 -0
- package/cjs/Options/Classes/Particles/Shadow.js +38 -0
- package/cjs/Options/Classes/Particles/Shape/Shape.js +29 -0
- package/cjs/Options/Classes/Particles/Size/Size.js +20 -0
- package/cjs/Options/Classes/Particles/Size/SizeAnimation.js +30 -0
- package/cjs/Options/Classes/Particles/Stroke.js +25 -0
- package/cjs/Options/Classes/Particles/ZIndex/ZIndex.js +28 -0
- package/cjs/Options/Classes/Random.js +21 -0
- package/cjs/Options/Classes/Responsive.js +31 -0
- package/cjs/Options/Classes/Theme/Theme.js +24 -0
- package/cjs/Options/Classes/Theme/ThemeDefault.js +25 -0
- package/cjs/Options/Classes/ValueWithRandom.js +68 -0
- package/cjs/Options/Interfaces/Background/IBackground.js +2 -0
- package/cjs/Options/Interfaces/BackgroundMask/IBackgroundMask.js +2 -0
- package/cjs/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.js +2 -0
- package/cjs/Options/Interfaces/FullScreen/IFullScreen.js +2 -0
- package/cjs/Options/Interfaces/IAnimatable.js +2 -0
- package/cjs/Options/Interfaces/IAnimatableColor.js +2 -0
- package/cjs/Options/Interfaces/IAnimation.js +2 -0
- package/cjs/Options/Interfaces/IColorAnimation.js +2 -0
- package/cjs/Options/Interfaces/IHslAnimation.js +2 -0
- package/cjs/Options/Interfaces/IManualParticle.js +2 -0
- package/cjs/Options/Interfaces/IOptionLoader.js +2 -0
- package/cjs/Options/Interfaces/IOptions.js +2 -0
- package/cjs/Options/Interfaces/IOptionsColor.js +2 -0
- package/cjs/Options/Interfaces/IRandom.js +2 -0
- package/cjs/Options/Interfaces/IResponsive.js +2 -0
- package/cjs/Options/Interfaces/IValueWithRandom.js +2 -0
- package/cjs/Options/Interfaces/Interactivity/Events/IClickEvent.js +2 -0
- package/cjs/Options/Interfaces/Interactivity/Events/IDivEvent.js +2 -0
- package/cjs/Options/Interfaces/Interactivity/Events/IEvents.js +2 -0
- package/cjs/Options/Interfaces/Interactivity/Events/IHoverEvent.js +2 -0
- package/cjs/Options/Interfaces/Interactivity/Events/IParallax.js +2 -0
- package/cjs/Options/Interfaces/Interactivity/Events/IResizeEvent.js +2 -0
- package/cjs/Options/Interfaces/Interactivity/IInteractivity.js +2 -0
- package/cjs/Options/Interfaces/Interactivity/Modes/IModeDiv.js +2 -0
- package/cjs/Options/Interfaces/Interactivity/Modes/IModes.js +2 -0
- package/cjs/Options/Interfaces/Particles/Bounce/IParticlesBounce.js +2 -0
- package/cjs/Options/Interfaces/Particles/Collisions/ICollisions.js +2 -0
- package/cjs/Options/Interfaces/Particles/Collisions/ICollisionsAbsorb.js +2 -0
- package/cjs/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.js +2 -0
- package/cjs/Options/Interfaces/Particles/IParticlesOptions.js +2 -0
- package/cjs/Options/Interfaces/Particles/IShadow.js +2 -0
- package/cjs/Options/Interfaces/Particles/IStroke.js +2 -0
- package/cjs/Options/Interfaces/Particles/Move/IMove.js +2 -0
- package/cjs/Options/Interfaces/Particles/Move/IMoveAngle.js +2 -0
- package/cjs/Options/Interfaces/Particles/Move/IMoveAttract.js +2 -0
- package/cjs/Options/Interfaces/Particles/Move/IMoveCenter.js +2 -0
- package/cjs/Options/Interfaces/Particles/Move/IMoveGravity.js +2 -0
- package/cjs/Options/Interfaces/Particles/Move/IMoveTrail.js +2 -0
- package/cjs/Options/Interfaces/Particles/Move/IMoveTrailFill.js +2 -0
- package/cjs/Options/Interfaces/Particles/Move/IOutModes.js +2 -0
- package/cjs/Options/Interfaces/Particles/Move/ISpin.js +2 -0
- package/cjs/Options/Interfaces/Particles/Move/Path/IMovePath.js +2 -0
- package/cjs/Options/Interfaces/Particles/Number/IParticlesDensity.js +2 -0
- package/cjs/Options/Interfaces/Particles/Number/IParticlesNumber.js +2 -0
- package/cjs/Options/Interfaces/Particles/Opacity/IOpacity.js +2 -0
- package/cjs/Options/Interfaces/Particles/Opacity/IOpacityAnimation.js +2 -0
- package/cjs/Options/Interfaces/Particles/Shape/ICharacterShape.js +2 -0
- package/cjs/Options/Interfaces/Particles/Shape/IImageShape.js +2 -0
- package/cjs/Options/Interfaces/Particles/Shape/IPolygonShape.js +2 -0
- package/cjs/Options/Interfaces/Particles/Shape/IShape.js +2 -0
- package/cjs/Options/Interfaces/Particles/Shape/IShapeValues.js +17 -0
- package/cjs/Options/Interfaces/Particles/Shape/IStarShape.js +2 -0
- package/cjs/Options/Interfaces/Particles/Size/ISize.js +2 -0
- package/cjs/Options/Interfaces/Particles/Size/ISizeAnimation.js +2 -0
- package/cjs/Options/Interfaces/Particles/ZIndex/IZIndex.js +2 -0
- package/cjs/Options/Interfaces/Theme/ITheme.js +2 -0
- package/cjs/Options/Interfaces/Theme/IThemeDefault.js +2 -0
- package/cjs/Types/CustomEventArgs.js +2 -0
- package/cjs/Types/CustomEventListener.js +2 -0
- package/cjs/Types/ISourceOptions.js +2 -0
- package/cjs/Types/ParticlesGroups.js +2 -0
- package/cjs/Types/PathOptions.js +2 -0
- package/cjs/Types/RangeValue.js +2 -0
- package/cjs/Types/RecursivePartial.js +2 -0
- package/cjs/Types/ShapeData.js +2 -0
- package/cjs/Types/ShapeDrawerFunctions.js +2 -0
- package/cjs/Types/SingleOrMultiple.js +2 -0
- package/cjs/Utils/CanvasUtils.js +164 -0
- package/cjs/Utils/ColorUtils.js +295 -0
- package/cjs/Utils/EventDispatcher.js +48 -0
- package/cjs/Utils/HslColorManager.js +44 -0
- package/cjs/Utils/NumberUtils.js +175 -0
- package/cjs/Utils/OptionsUtils.js +16 -0
- package/cjs/Utils/RgbColorManager.js +43 -0
- package/cjs/Utils/Utils.js +274 -0
- package/cjs/bundle.js +114 -0
- package/cjs/engine.js +179 -0
- package/cjs/index.js +216 -0
- package/esm/Core/Canvas.js +398 -0
- package/esm/Core/Container.js +436 -0
- package/esm/Core/Interfaces/Colors.js +1 -0
- package/esm/Core/Interfaces/IBounds.js +1 -0
- package/esm/Core/Interfaces/IBubbleParticleData.js +1 -0
- package/esm/Core/Interfaces/ICircleBouncer.js +1 -0
- package/esm/Core/Interfaces/IColorManager.js +1 -0
- package/esm/Core/Interfaces/IContainerInteractivity.js +1 -0
- package/esm/Core/Interfaces/IContainerPlugin.js +1 -0
- package/esm/Core/Interfaces/ICoordinates.js +1 -0
- package/esm/Core/Interfaces/IDelta.js +1 -0
- package/esm/Core/Interfaces/IDimension.js +1 -0
- package/esm/Core/Interfaces/IDistance.js +1 -0
- package/esm/Core/Interfaces/IDrawParticleParams.js +1 -0
- package/esm/Core/Interfaces/IExternalInteractor.js +1 -0
- package/esm/Core/Interfaces/IInteractor.js +1 -0
- package/esm/Core/Interfaces/ILoadParams.js +1 -0
- package/esm/Core/Interfaces/IMouseData.js +1 -0
- package/esm/Core/Interfaces/IMovePathGenerator.js +1 -0
- package/esm/Core/Interfaces/IParticle.js +1 -0
- package/esm/Core/Interfaces/IParticleColorStyle.js +1 -0
- package/esm/Core/Interfaces/IParticleHslAnimation.js +1 -0
- package/esm/Core/Interfaces/IParticleLife.js +1 -0
- package/esm/Core/Interfaces/IParticleMover.js +1 -0
- package/esm/Core/Interfaces/IParticleOverride.js +1 -0
- package/esm/Core/Interfaces/IParticleRetinaProps.js +1 -0
- package/esm/Core/Interfaces/IParticleRoll.js +1 -0
- package/esm/Core/Interfaces/IParticleTransformValues.js +1 -0
- package/esm/Core/Interfaces/IParticleUpdater.js +1 -0
- package/esm/Core/Interfaces/IParticleValueAnimation.js +1 -0
- package/esm/Core/Interfaces/IParticlesInteractor.js +1 -0
- package/esm/Core/Interfaces/IParticlesMover.js +1 -0
- package/esm/Core/Interfaces/IPlugin.js +1 -0
- package/esm/Core/Interfaces/IPositionFromSizeParams.js +1 -0
- package/esm/Core/Interfaces/IRangeValue.js +1 -0
- package/esm/Core/Interfaces/IRectSideResult.js +1 -0
- package/esm/Core/Interfaces/IShapeDrawer.js +1 -0
- package/esm/Core/Interfaces/IShapeValues.js +1 -0
- package/esm/Core/Interfaces/ISlowParticleData.js +1 -0
- package/esm/Core/Interfaces/ITrailFillData.js +1 -0
- package/esm/Core/Particle.js +307 -0
- package/esm/Core/Particles.js +262 -0
- package/esm/Core/Retina.js +33 -0
- package/esm/Core/Utils/Circle.js +23 -0
- package/esm/Core/Utils/Constants.js +12 -0
- package/esm/Core/Utils/EventListeners.js +280 -0
- package/esm/Core/Utils/ExternalInteractorBase.js +6 -0
- package/esm/Core/Utils/FrameManager.js +42 -0
- package/esm/Core/Utils/InteractionManager.js +60 -0
- package/esm/Core/Utils/ParticlesInteractorBase.js +6 -0
- package/esm/Core/Utils/Plugins.js +112 -0
- package/esm/Core/Utils/Point.js +6 -0
- package/esm/Core/Utils/QuadTree.js +64 -0
- package/esm/Core/Utils/Range.js +8 -0
- package/esm/Core/Utils/Rectangle.js +22 -0
- package/esm/Core/Utils/Vector.js +15 -0
- package/esm/Core/Utils/Vector3d.js +96 -0
- package/esm/Enums/AnimationStatus.js +1 -0
- package/esm/Enums/Directions/MoveDirection.js +1 -0
- package/esm/Enums/Directions/OutModeDirection.js +1 -0
- package/esm/Enums/Directions/RotateDirection.js +1 -0
- package/esm/Enums/InteractivityDetect.js +1 -0
- package/esm/Enums/Modes/ClickMode.js +1 -0
- package/esm/Enums/Modes/CollisionMode.js +1 -0
- package/esm/Enums/Modes/DivMode.js +1 -0
- package/esm/Enums/Modes/HoverMode.js +1 -0
- package/esm/Enums/Modes/OutMode.js +1 -0
- package/esm/Enums/Modes/ResponsiveMode.js +1 -0
- package/esm/Enums/Modes/SizeMode.js +1 -0
- package/esm/Enums/Modes/ThemeMode.js +1 -0
- package/esm/Enums/Types/AlterType.js +1 -0
- package/esm/Enums/Types/DestroyType.js +1 -0
- package/esm/Enums/Types/DivType.js +1 -0
- package/esm/Enums/Types/EasingType.js +1 -0
- package/esm/Enums/Types/EventType.js +1 -0
- package/esm/Enums/Types/GradientType.js +1 -0
- package/esm/Enums/Types/InteractorType.js +1 -0
- package/esm/Enums/Types/ParticleOutType.js +1 -0
- package/esm/Enums/Types/StartValueType.js +1 -0
- package/esm/Options/Classes/AnimatableColor.js +36 -0
- package/esm/Options/Classes/AnimationOptions.js +48 -0
- package/esm/Options/Classes/Background/Background.js +35 -0
- package/esm/Options/Classes/BackgroundMask/BackgroundMask.js +24 -0
- package/esm/Options/Classes/BackgroundMask/BackgroundMaskCover.js +19 -0
- package/esm/Options/Classes/ColorAnimation.js +34 -0
- package/esm/Options/Classes/FullScreen/FullScreen.js +17 -0
- package/esm/Options/Classes/HslAnimation.js +16 -0
- package/esm/Options/Classes/Interactivity/Events/ClickEvent.js +17 -0
- package/esm/Options/Classes/Interactivity/Events/DivEvent.js +49 -0
- package/esm/Options/Classes/Interactivity/Events/Events.js +53 -0
- package/esm/Options/Classes/Interactivity/Events/HoverEvent.js +20 -0
- package/esm/Options/Classes/Interactivity/Events/Parallax.js +21 -0
- package/esm/Options/Classes/Interactivity/Events/ResizeEvent.js +17 -0
- package/esm/Options/Classes/Interactivity/Interactivity.js +27 -0
- package/esm/Options/Classes/Interactivity/Modes/Modes.js +21 -0
- package/esm/Options/Classes/ManualParticle.js +18 -0
- package/esm/Options/Classes/Options.js +170 -0
- package/esm/Options/Classes/OptionsColor.js +24 -0
- package/esm/Options/Classes/Particles/Bounce/ParticlesBounce.js +14 -0
- package/esm/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +8 -0
- package/esm/Options/Classes/Particles/Collisions/Collisions.js +26 -0
- package/esm/Options/Classes/Particles/Collisions/CollisionsAbsorb.js +13 -0
- package/esm/Options/Classes/Particles/Collisions/CollisionsOverlap.js +17 -0
- package/esm/Options/Classes/Particles/Move/Move.js +124 -0
- package/esm/Options/Classes/Particles/Move/MoveAngle.js +18 -0
- package/esm/Options/Classes/Particles/Move/MoveAttract.js +43 -0
- package/esm/Options/Classes/Particles/Move/MoveCenter.js +25 -0
- package/esm/Options/Classes/Particles/Move/MoveGravity.js +26 -0
- package/esm/Options/Classes/Particles/Move/MoveTrail.js +28 -0
- package/esm/Options/Classes/Particles/Move/MoveTrailFill.js +14 -0
- package/esm/Options/Classes/Particles/Move/OutModes.js +18 -0
- package/esm/Options/Classes/Particles/Move/Path/MovePath.js +26 -0
- package/esm/Options/Classes/Particles/Move/Spin.js +20 -0
- package/esm/Options/Classes/Particles/Number/ParticlesDensity.js +42 -0
- package/esm/Options/Classes/Particles/Number/ParticlesNumber.js +28 -0
- package/esm/Options/Classes/Particles/Opacity/Opacity.js +16 -0
- package/esm/Options/Classes/Particles/Opacity/OpacityAnimation.js +26 -0
- package/esm/Options/Classes/Particles/ParticlesOptions.js +92 -0
- package/esm/Options/Classes/Particles/Shadow.js +34 -0
- package/esm/Options/Classes/Particles/Shape/Shape.js +25 -0
- package/esm/Options/Classes/Particles/Size/Size.js +16 -0
- package/esm/Options/Classes/Particles/Size/SizeAnimation.js +26 -0
- package/esm/Options/Classes/Particles/Stroke.js +21 -0
- package/esm/Options/Classes/Particles/ZIndex/ZIndex.js +24 -0
- package/esm/Options/Classes/Random.js +17 -0
- package/esm/Options/Classes/Responsive.js +27 -0
- package/esm/Options/Classes/Theme/Theme.js +20 -0
- package/esm/Options/Classes/Theme/ThemeDefault.js +21 -0
- package/esm/Options/Classes/ValueWithRandom.js +62 -0
- package/esm/Options/Interfaces/Background/IBackground.js +1 -0
- package/esm/Options/Interfaces/BackgroundMask/IBackgroundMask.js +1 -0
- package/esm/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.js +1 -0
- package/esm/Options/Interfaces/FullScreen/IFullScreen.js +1 -0
- package/esm/Options/Interfaces/IAnimatable.js +1 -0
- package/esm/Options/Interfaces/IAnimatableColor.js +1 -0
- package/esm/Options/Interfaces/IAnimation.js +1 -0
- package/esm/Options/Interfaces/IColorAnimation.js +1 -0
- package/esm/Options/Interfaces/IHslAnimation.js +1 -0
- package/esm/Options/Interfaces/IManualParticle.js +1 -0
- package/esm/Options/Interfaces/IOptionLoader.js +1 -0
- package/esm/Options/Interfaces/IOptions.js +1 -0
- package/esm/Options/Interfaces/IOptionsColor.js +1 -0
- package/esm/Options/Interfaces/IRandom.js +1 -0
- package/esm/Options/Interfaces/IResponsive.js +1 -0
- package/esm/Options/Interfaces/IValueWithRandom.js +1 -0
- package/esm/Options/Interfaces/Interactivity/Events/IClickEvent.js +1 -0
- package/esm/Options/Interfaces/Interactivity/Events/IDivEvent.js +1 -0
- package/esm/Options/Interfaces/Interactivity/Events/IEvents.js +1 -0
- package/esm/Options/Interfaces/Interactivity/Events/IHoverEvent.js +1 -0
- package/esm/Options/Interfaces/Interactivity/Events/IParallax.js +1 -0
- package/esm/Options/Interfaces/Interactivity/Events/IResizeEvent.js +1 -0
- package/esm/Options/Interfaces/Interactivity/IInteractivity.js +1 -0
- package/esm/Options/Interfaces/Interactivity/Modes/IModeDiv.js +1 -0
- package/esm/Options/Interfaces/Interactivity/Modes/IModes.js +1 -0
- package/esm/Options/Interfaces/Particles/Bounce/IParticlesBounce.js +1 -0
- package/esm/Options/Interfaces/Particles/Collisions/ICollisions.js +1 -0
- package/esm/Options/Interfaces/Particles/Collisions/ICollisionsAbsorb.js +1 -0
- package/esm/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.js +1 -0
- package/esm/Options/Interfaces/Particles/IParticlesOptions.js +1 -0
- package/esm/Options/Interfaces/Particles/IShadow.js +1 -0
- package/esm/Options/Interfaces/Particles/IStroke.js +1 -0
- package/esm/Options/Interfaces/Particles/Move/IMove.js +1 -0
- package/esm/Options/Interfaces/Particles/Move/IMoveAngle.js +1 -0
- package/esm/Options/Interfaces/Particles/Move/IMoveAttract.js +1 -0
- package/esm/Options/Interfaces/Particles/Move/IMoveCenter.js +1 -0
- package/esm/Options/Interfaces/Particles/Move/IMoveGravity.js +1 -0
- package/esm/Options/Interfaces/Particles/Move/IMoveTrail.js +1 -0
- package/esm/Options/Interfaces/Particles/Move/IMoveTrailFill.js +1 -0
- package/esm/Options/Interfaces/Particles/Move/IOutModes.js +1 -0
- package/esm/Options/Interfaces/Particles/Move/ISpin.js +1 -0
- package/esm/Options/Interfaces/Particles/Move/Path/IMovePath.js +1 -0
- package/esm/Options/Interfaces/Particles/Number/IParticlesDensity.js +1 -0
- package/esm/Options/Interfaces/Particles/Number/IParticlesNumber.js +1 -0
- package/esm/Options/Interfaces/Particles/Opacity/IOpacity.js +1 -0
- package/esm/Options/Interfaces/Particles/Opacity/IOpacityAnimation.js +1 -0
- package/esm/Options/Interfaces/Particles/Shape/ICharacterShape.js +1 -0
- package/esm/Options/Interfaces/Particles/Shape/IImageShape.js +1 -0
- package/esm/Options/Interfaces/Particles/Shape/IPolygonShape.js +1 -0
- package/esm/Options/Interfaces/Particles/Shape/IShape.js +1 -0
- package/esm/Options/Interfaces/Particles/Shape/IShapeValues.js +1 -0
- package/esm/Options/Interfaces/Particles/Shape/IStarShape.js +1 -0
- package/esm/Options/Interfaces/Particles/Size/ISize.js +1 -0
- package/esm/Options/Interfaces/Particles/Size/ISizeAnimation.js +1 -0
- package/esm/Options/Interfaces/Particles/ZIndex/IZIndex.js +1 -0
- package/esm/Options/Interfaces/Theme/ITheme.js +1 -0
- package/esm/Options/Interfaces/Theme/IThemeDefault.js +1 -0
- package/esm/Types/CustomEventArgs.js +1 -0
- package/esm/Types/CustomEventListener.js +1 -0
- package/esm/Types/ISourceOptions.js +1 -0
- package/esm/Types/ParticlesGroups.js +1 -0
- package/esm/Types/PathOptions.js +1 -0
- package/esm/Types/RangeValue.js +1 -0
- package/esm/Types/RecursivePartial.js +1 -0
- package/esm/Types/ShapeData.js +1 -0
- package/esm/Types/ShapeDrawerFunctions.js +1 -0
- package/esm/Types/SingleOrMultiple.js +1 -0
- package/esm/Utils/CanvasUtils.js +149 -0
- package/esm/Utils/ColorUtils.js +274 -0
- package/esm/Utils/EventDispatcher.js +44 -0
- package/esm/Utils/HslColorManager.js +40 -0
- package/esm/Utils/NumberUtils.js +149 -0
- package/esm/Utils/OptionsUtils.js +11 -0
- package/esm/Utils/RgbColorManager.js +39 -0
- package/esm/Utils/Utils.js +247 -0
- package/esm/bundle.js +97 -0
- package/esm/engine.js +175 -0
- package/esm/index.js +199 -0
- package/package.json +90 -0
- package/report.html +39 -0
- package/scripts/install.js +105 -0
- package/tsparticles.engine.js +5541 -0
- package/tsparticles.engine.min.js +2 -0
- package/tsparticles.engine.min.js.LICENSE.txt +10 -0
- package/types/Core/Canvas.d.ts +47 -0
- package/types/Core/Container.d.ts +72 -0
- package/types/Core/Interfaces/Colors.d.ts +57 -0
- package/types/Core/Interfaces/IBounds.d.ts +6 -0
- package/types/Core/Interfaces/IBubbleParticleData.d.ts +9 -0
- package/types/Core/Interfaces/ICircleBouncer.d.ts +9 -0
- package/types/Core/Interfaces/IColorManager.d.ts +8 -0
- package/types/Core/Interfaces/IContainerInteractivity.d.ts +6 -0
- package/types/Core/Interfaces/IContainerPlugin.d.ts +29 -0
- package/types/Core/Interfaces/ICoordinates.d.ts +20 -0
- package/types/Core/Interfaces/IDelta.d.ts +4 -0
- package/types/Core/Interfaces/IDimension.d.ts +4 -0
- package/types/Core/Interfaces/IDistance.d.ts +4 -0
- package/types/Core/Interfaces/IDrawParticleParams.d.ts +19 -0
- package/types/Core/Interfaces/IExternalInteractor.d.ts +13 -0
- package/types/Core/Interfaces/IInteractor.d.ts +16 -0
- package/types/Core/Interfaces/ILoadParams.d.ts +9 -0
- package/types/Core/Interfaces/IMouseData.d.ts +9 -0
- package/types/Core/Interfaces/IMovePathGenerator.d.ts +9 -0
- package/types/Core/Interfaces/IParticle.d.ts +48 -0
- package/types/Core/Interfaces/IParticleColorStyle.d.ts +4 -0
- package/types/Core/Interfaces/IParticleHslAnimation.d.ts +6 -0
- package/types/Core/Interfaces/IParticleLife.d.ts +7 -0
- package/types/Core/Interfaces/IParticleMover.d.ts +7 -0
- package/types/Core/Interfaces/IParticleOverride.d.ts +6 -0
- package/types/Core/Interfaces/IParticleRetinaProps.d.ts +9 -0
- package/types/Core/Interfaces/IParticleRoll.d.ts +12 -0
- package/types/Core/Interfaces/IParticleTransformValues.d.ts +6 -0
- package/types/Core/Interfaces/IParticleUpdater.d.ts +21 -0
- package/types/Core/Interfaces/IParticleValueAnimation.d.ts +15 -0
- package/types/Core/Interfaces/IParticlesInteractor.d.ts +7 -0
- package/types/Core/Interfaces/IParticlesMover.d.ts +7 -0
- package/types/Core/Interfaces/IPlugin.d.ts +10 -0
- package/types/Core/Interfaces/IPositionFromSizeParams.d.ts +10 -0
- package/types/Core/Interfaces/IRangeValue.d.ts +4 -0
- package/types/Core/Interfaces/IRectSideResult.d.ts +5 -0
- package/types/Core/Interfaces/IShapeDrawer.d.ts +10 -0
- package/types/Core/Interfaces/IShapeValues.d.ts +8 -0
- package/types/Core/Interfaces/ISlowParticleData.d.ts +4 -0
- package/types/Core/Interfaces/ITrailFillData.d.ts +6 -0
- package/types/Core/Particle.d.ts +85 -0
- package/types/Core/Particles.d.ts +45 -0
- package/types/Core/Retina.d.ts +13 -0
- package/types/Core/Utils/Circle.d.ts +8 -0
- package/types/Core/Utils/Constants.d.ts +12 -0
- package/types/Core/Utils/EventListeners.d.ts +21 -0
- package/types/Core/Utils/ExternalInteractorBase.d.ts +15 -0
- package/types/Core/Utils/FrameManager.d.ts +6 -0
- package/types/Core/Utils/InteractionManager.d.ts +18 -0
- package/types/Core/Utils/ParticlesInteractorBase.d.ts +15 -0
- package/types/Core/Utils/Plugins.d.ts +51 -0
- package/types/Core/Utils/Point.d.ts +7 -0
- package/types/Core/Utils/QuadTree.d.ts +22 -0
- package/types/Core/Utils/Range.d.ts +7 -0
- package/types/Core/Utils/Rectangle.d.ts +9 -0
- package/types/Core/Utils/Vector.d.ts +8 -0
- package/types/Core/Utils/Vector3d.d.ts +29 -0
- package/types/Enums/AnimationStatus.d.ts +4 -0
- package/types/Enums/Directions/MoveDirection.d.ts +14 -0
- package/types/Enums/Directions/OutModeDirection.d.ts +6 -0
- package/types/Enums/Directions/RotateDirection.d.ts +6 -0
- package/types/Enums/InteractivityDetect.d.ts +5 -0
- package/types/Enums/Modes/ClickMode.d.ts +9 -0
- package/types/Enums/Modes/CollisionMode.d.ts +5 -0
- package/types/Enums/Modes/DivMode.d.ts +5 -0
- package/types/Enums/Modes/HoverMode.d.ts +11 -0
- package/types/Enums/Modes/OutMode.d.ts +10 -0
- package/types/Enums/Modes/ResponsiveMode.d.ts +4 -0
- package/types/Enums/Modes/SizeMode.d.ts +4 -0
- package/types/Enums/Modes/ThemeMode.d.ts +5 -0
- package/types/Enums/Types/AlterType.d.ts +4 -0
- package/types/Enums/Types/DestroyType.d.ts +5 -0
- package/types/Enums/Types/DivType.d.ts +4 -0
- package/types/Enums/Types/EasingType.d.ts +27 -0
- package/types/Enums/Types/EventType.d.ts +12 -0
- package/types/Enums/Types/GradientType.d.ts +5 -0
- package/types/Enums/Types/InteractorType.d.ts +4 -0
- package/types/Enums/Types/ParticleOutType.d.ts +5 -0
- package/types/Enums/Types/StartValueType.d.ts +5 -0
- package/types/Options/Classes/AnimatableColor.d.ts +12 -0
- package/types/Options/Classes/AnimationOptions.d.ts +20 -0
- package/types/Options/Classes/Background/Background.d.ts +14 -0
- package/types/Options/Classes/BackgroundMask/BackgroundMask.d.ts +11 -0
- package/types/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +10 -0
- package/types/Options/Classes/ColorAnimation.d.ts +14 -0
- package/types/Options/Classes/FullScreen/FullScreen.d.ts +9 -0
- package/types/Options/Classes/HslAnimation.d.ts +11 -0
- package/types/Options/Classes/Interactivity/Events/ClickEvent.d.ts +11 -0
- package/types/Options/Classes/Interactivity/Events/DivEvent.d.ts +20 -0
- package/types/Options/Classes/Interactivity/Events/Events.d.ts +22 -0
- package/types/Options/Classes/Interactivity/Events/HoverEvent.d.ts +13 -0
- package/types/Options/Classes/Interactivity/Events/Parallax.d.ts +10 -0
- package/types/Options/Classes/Interactivity/Events/ResizeEvent.d.ts +9 -0
- package/types/Options/Classes/Interactivity/Interactivity.d.ts +18 -0
- package/types/Options/Classes/Interactivity/Modes/Modes.d.ts +12 -0
- package/types/Options/Classes/ManualParticle.d.ts +10 -0
- package/types/Options/Classes/Options.d.ts +58 -0
- package/types/Options/Classes/OptionsColor.d.ts +11 -0
- package/types/Options/Classes/Particles/Bounce/ParticlesBounce.d.ts +10 -0
- package/types/Options/Classes/Particles/Bounce/ParticlesBounceFactor.d.ts +4 -0
- package/types/Options/Classes/Particles/Collisions/Collisions.d.ts +16 -0
- package/types/Options/Classes/Particles/Collisions/CollisionsAbsorb.d.ts +8 -0
- package/types/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +9 -0
- package/types/Options/Classes/Particles/Move/Move.d.ts +49 -0
- package/types/Options/Classes/Particles/Move/MoveAngle.d.ts +10 -0
- package/types/Options/Classes/Particles/Move/MoveAttract.d.ts +16 -0
- package/types/Options/Classes/Particles/Move/MoveCenter.d.ts +12 -0
- package/types/Options/Classes/Particles/Move/MoveGravity.d.ts +12 -0
- package/types/Options/Classes/Particles/Move/MoveTrail.d.ts +14 -0
- package/types/Options/Classes/Particles/Move/MoveTrailFill.d.ts +9 -0
- package/types/Options/Classes/Particles/Move/OutModes.d.ts +14 -0
- package/types/Options/Classes/Particles/Move/Path/MovePath.d.ts +14 -0
- package/types/Options/Classes/Particles/Move/Spin.d.ts +12 -0
- package/types/Options/Classes/Particles/Number/ParticlesDensity.d.ts +16 -0
- package/types/Options/Classes/Particles/Number/ParticlesNumber.d.ts +13 -0
- package/types/Options/Classes/Particles/Opacity/Opacity.d.ts +10 -0
- package/types/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +12 -0
- package/types/Options/Classes/Particles/ParticlesOptions.d.ts +40 -0
- package/types/Options/Classes/Particles/Shadow.d.ts +13 -0
- package/types/Options/Classes/Particles/Shape/Shape.d.ts +11 -0
- package/types/Options/Classes/Particles/Size/Size.d.ts +10 -0
- package/types/Options/Classes/Particles/Size/SizeAnimation.d.ts +12 -0
- package/types/Options/Classes/Particles/Stroke.d.ts +12 -0
- package/types/Options/Classes/Particles/ZIndex/ZIndex.d.ts +11 -0
- package/types/Options/Classes/Random.d.ts +9 -0
- package/types/Options/Classes/Responsive.d.ts +12 -0
- package/types/Options/Classes/Theme/Theme.d.ts +12 -0
- package/types/Options/Classes/Theme/ThemeDefault.d.ts +11 -0
- package/types/Options/Classes/ValueWithRandom.d.ts +26 -0
- package/types/Options/Interfaces/Background/IBackground.d.ts +9 -0
- package/types/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +7 -0
- package/types/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.d.ts +5 -0
- package/types/Options/Interfaces/FullScreen/IFullScreen.d.ts +4 -0
- package/types/Options/Interfaces/IAnimatable.d.ts +4 -0
- package/types/Options/Interfaces/IAnimatableColor.d.ts +6 -0
- package/types/Options/Interfaces/IAnimation.d.ts +13 -0
- package/types/Options/Interfaces/IColorAnimation.d.ts +5 -0
- package/types/Options/Interfaces/IHslAnimation.d.ts +6 -0
- package/types/Options/Interfaces/IManualParticle.d.ts +7 -0
- package/types/Options/Interfaces/IOptionLoader.d.ts +4 -0
- package/types/Options/Interfaces/IOptions.d.ts +37 -0
- package/types/Options/Interfaces/IOptionsColor.d.ts +2 -0
- package/types/Options/Interfaces/IRandom.d.ts +4 -0
- package/types/Options/Interfaces/IResponsive.d.ts +7 -0
- package/types/Options/Interfaces/IValueWithRandom.d.ts +13 -0
- package/types/Options/Interfaces/Interactivity/Events/IClickEvent.d.ts +6 -0
- package/types/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +12 -0
- package/types/Options/Interfaces/Interactivity/Events/IEvents.d.ts +14 -0
- package/types/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +8 -0
- package/types/Options/Interfaces/Interactivity/Events/IParallax.d.ts +5 -0
- package/types/Options/Interfaces/Interactivity/Events/IResizeEvent.d.ts +4 -0
- package/types/Options/Interfaces/Interactivity/IInteractivity.d.ts +10 -0
- package/types/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +5 -0
- package/types/Options/Interfaces/Interactivity/Modes/IModes.d.ts +3 -0
- package/types/Options/Interfaces/Particles/Bounce/IParticlesBounce.d.ts +5 -0
- package/types/Options/Interfaces/Particles/Collisions/ICollisions.d.ts +11 -0
- package/types/Options/Interfaces/Particles/Collisions/ICollisionsAbsorb.d.ts +3 -0
- package/types/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.d.ts +4 -0
- package/types/Options/Interfaces/Particles/IParticlesOptions.d.ts +32 -0
- package/types/Options/Interfaces/Particles/IShadow.d.ts +8 -0
- package/types/Options/Interfaces/Particles/IStroke.d.ts +8 -0
- package/types/Options/Interfaces/Particles/Move/IMove.d.ts +38 -0
- package/types/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +5 -0
- package/types/Options/Interfaces/Particles/Move/IMoveAttract.d.ts +9 -0
- package/types/Options/Interfaces/Particles/Move/IMoveCenter.d.ts +2 -0
- package/types/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +7 -0
- package/types/Options/Interfaces/Particles/Move/IMoveTrail.d.ts +8 -0
- package/types/Options/Interfaces/Particles/Move/IMoveTrailFill.d.ts +5 -0
- package/types/Options/Interfaces/Particles/Move/IOutModes.d.ts +8 -0
- package/types/Options/Interfaces/Particles/Move/ISpin.d.ts +7 -0
- package/types/Options/Interfaces/Particles/Move/Path/IMovePath.d.ts +9 -0
- package/types/Options/Interfaces/Particles/Number/IParticlesDensity.d.ts +8 -0
- package/types/Options/Interfaces/Particles/Number/IParticlesNumber.d.ts +7 -0
- package/types/Options/Interfaces/Particles/Opacity/IOpacity.d.ts +6 -0
- package/types/Options/Interfaces/Particles/Opacity/IOpacityAnimation.d.ts +6 -0
- package/types/Options/Interfaces/Particles/Shape/ICharacterShape.d.ts +8 -0
- package/types/Options/Interfaces/Particles/Shape/IImageShape.d.ts +8 -0
- package/types/Options/Interfaces/Particles/Shape/IPolygonShape.d.ts +5 -0
- package/types/Options/Interfaces/Particles/Shape/IShape.d.ts +6 -0
- package/types/Options/Interfaces/Particles/Shape/IShapeValues.d.ts +1 -0
- package/types/Options/Interfaces/Particles/Shape/IStarShape.d.ts +6 -0
- package/types/Options/Interfaces/Particles/Size/ISize.d.ts +6 -0
- package/types/Options/Interfaces/Particles/Size/ISizeAnimation.d.ts +6 -0
- package/types/Options/Interfaces/Particles/ZIndex/IZIndex.d.ts +6 -0
- package/types/Options/Interfaces/Theme/ITheme.d.ts +7 -0
- package/types/Options/Interfaces/Theme/IThemeDefault.d.ts +6 -0
- package/types/Types/CustomEventArgs.d.ts +5 -0
- package/types/Types/CustomEventListener.d.ts +2 -0
- package/types/Types/ISourceOptions.d.ts +3 -0
- package/types/Types/ParticlesGroups.d.ts +4 -0
- package/types/Types/PathOptions.d.ts +3 -0
- package/types/Types/RangeValue.d.ts +2 -0
- package/types/Types/RecursivePartial.d.ts +3 -0
- package/types/Types/ShapeData.d.ts +5 -0
- package/types/Types/ShapeDrawerFunctions.d.ts +10 -0
- package/types/Types/SingleOrMultiple.d.ts +1 -0
- package/types/Utils/CanvasUtils.d.ts +23 -0
- package/types/Utils/ColorUtils.d.ts +24 -0
- package/types/Utils/EventDispatcher.d.ts +11 -0
- package/types/Utils/HslColorManager.d.ts +10 -0
- package/types/Utils/NumberUtils.d.ts +37 -0
- package/types/Utils/OptionsUtils.d.ts +8 -0
- package/types/Utils/RgbColorManager.d.ts +10 -0
- package/types/Utils/Utils.d.ts +36 -0
- package/types/bundle.d.ts +91 -0
- package/types/engine.d.ts +39 -0
- package/types/index.d.ts +204 -0
- package/umd/Core/Canvas.js +412 -0
- package/umd/Core/Container.js +450 -0
- package/umd/Core/Interfaces/Colors.js +12 -0
- package/umd/Core/Interfaces/IBounds.js +12 -0
- package/umd/Core/Interfaces/IBubbleParticleData.js +12 -0
- package/umd/Core/Interfaces/ICircleBouncer.js +12 -0
- package/umd/Core/Interfaces/IColorManager.js +12 -0
- package/umd/Core/Interfaces/IContainerInteractivity.js +12 -0
- package/umd/Core/Interfaces/IContainerPlugin.js +12 -0
- package/umd/Core/Interfaces/ICoordinates.js +12 -0
- package/umd/Core/Interfaces/IDelta.js +12 -0
- package/umd/Core/Interfaces/IDimension.js +12 -0
- package/umd/Core/Interfaces/IDistance.js +12 -0
- package/umd/Core/Interfaces/IDrawParticleParams.js +12 -0
- package/umd/Core/Interfaces/IExternalInteractor.js +12 -0
- package/umd/Core/Interfaces/IInteractor.js +12 -0
- package/umd/Core/Interfaces/ILoadParams.js +12 -0
- package/umd/Core/Interfaces/IMouseData.js +12 -0
- package/umd/Core/Interfaces/IMovePathGenerator.js +12 -0
- package/umd/Core/Interfaces/IParticle.js +12 -0
- package/umd/Core/Interfaces/IParticleColorStyle.js +12 -0
- package/umd/Core/Interfaces/IParticleHslAnimation.js +12 -0
- package/umd/Core/Interfaces/IParticleLife.js +12 -0
- package/umd/Core/Interfaces/IParticleMover.js +12 -0
- package/umd/Core/Interfaces/IParticleOverride.js +12 -0
- package/umd/Core/Interfaces/IParticleRetinaProps.js +12 -0
- package/umd/Core/Interfaces/IParticleRoll.js +12 -0
- package/umd/Core/Interfaces/IParticleTransformValues.js +12 -0
- package/umd/Core/Interfaces/IParticleUpdater.js +12 -0
- package/umd/Core/Interfaces/IParticleValueAnimation.js +12 -0
- package/umd/Core/Interfaces/IParticlesInteractor.js +12 -0
- package/umd/Core/Interfaces/IParticlesMover.js +12 -0
- package/umd/Core/Interfaces/IPlugin.js +12 -0
- package/umd/Core/Interfaces/IPositionFromSizeParams.js +12 -0
- package/umd/Core/Interfaces/IRangeValue.js +12 -0
- package/umd/Core/Interfaces/IRectSideResult.js +12 -0
- package/umd/Core/Interfaces/IShapeDrawer.js +12 -0
- package/umd/Core/Interfaces/IShapeValues.js +12 -0
- package/umd/Core/Interfaces/ISlowParticleData.js +12 -0
- package/umd/Core/Interfaces/ITrailFillData.js +12 -0
- package/umd/Core/Particle.js +321 -0
- package/umd/Core/Particles.js +276 -0
- package/umd/Core/Retina.js +47 -0
- package/umd/Core/Utils/Circle.js +37 -0
- package/umd/Core/Utils/Constants.js +25 -0
- package/umd/Core/Utils/EventListeners.js +294 -0
- package/umd/Core/Utils/ExternalInteractorBase.js +20 -0
- package/umd/Core/Utils/FrameManager.js +56 -0
- package/umd/Core/Utils/InteractionManager.js +74 -0
- package/umd/Core/Utils/ParticlesInteractorBase.js +20 -0
- package/umd/Core/Utils/Plugins.js +126 -0
- package/umd/Core/Utils/Point.js +20 -0
- package/umd/Core/Utils/QuadTree.js +78 -0
- package/umd/Core/Utils/Range.js +22 -0
- package/umd/Core/Utils/Rectangle.js +36 -0
- package/umd/Core/Utils/Vector.js +29 -0
- package/umd/Core/Utils/Vector3d.js +110 -0
- package/umd/Enums/AnimationStatus.js +12 -0
- package/umd/Enums/Directions/MoveDirection.js +12 -0
- package/umd/Enums/Directions/OutModeDirection.js +12 -0
- package/umd/Enums/Directions/RotateDirection.js +12 -0
- package/umd/Enums/InteractivityDetect.js +12 -0
- package/umd/Enums/Modes/ClickMode.js +12 -0
- package/umd/Enums/Modes/CollisionMode.js +12 -0
- package/umd/Enums/Modes/DivMode.js +12 -0
- package/umd/Enums/Modes/HoverMode.js +12 -0
- package/umd/Enums/Modes/OutMode.js +12 -0
- package/umd/Enums/Modes/ResponsiveMode.js +12 -0
- package/umd/Enums/Modes/SizeMode.js +12 -0
- package/umd/Enums/Modes/ThemeMode.js +12 -0
- package/umd/Enums/Types/AlterType.js +12 -0
- package/umd/Enums/Types/DestroyType.js +12 -0
- package/umd/Enums/Types/DivType.js +12 -0
- package/umd/Enums/Types/EasingType.js +12 -0
- package/umd/Enums/Types/EventType.js +12 -0
- package/umd/Enums/Types/GradientType.js +12 -0
- package/umd/Enums/Types/InteractorType.js +12 -0
- package/umd/Enums/Types/ParticleOutType.js +12 -0
- package/umd/Enums/Types/StartValueType.js +12 -0
- package/umd/Options/Classes/AnimatableColor.js +50 -0
- package/umd/Options/Classes/AnimationOptions.js +63 -0
- package/umd/Options/Classes/Background/Background.js +49 -0
- package/umd/Options/Classes/BackgroundMask/BackgroundMask.js +38 -0
- package/umd/Options/Classes/BackgroundMask/BackgroundMaskCover.js +33 -0
- package/umd/Options/Classes/ColorAnimation.js +48 -0
- package/umd/Options/Classes/FullScreen/FullScreen.js +31 -0
- package/umd/Options/Classes/HslAnimation.js +30 -0
- package/umd/Options/Classes/Interactivity/Events/ClickEvent.js +31 -0
- package/umd/Options/Classes/Interactivity/Events/DivEvent.js +63 -0
- package/umd/Options/Classes/Interactivity/Events/Events.js +67 -0
- package/umd/Options/Classes/Interactivity/Events/HoverEvent.js +34 -0
- package/umd/Options/Classes/Interactivity/Events/Parallax.js +35 -0
- package/umd/Options/Classes/Interactivity/Events/ResizeEvent.js +31 -0
- package/umd/Options/Classes/Interactivity/Interactivity.js +41 -0
- package/umd/Options/Classes/Interactivity/Modes/Modes.js +35 -0
- package/umd/Options/Classes/ManualParticle.js +32 -0
- package/umd/Options/Classes/Options.js +184 -0
- package/umd/Options/Classes/OptionsColor.js +38 -0
- package/umd/Options/Classes/Particles/Bounce/ParticlesBounce.js +28 -0
- package/umd/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +22 -0
- package/umd/Options/Classes/Particles/Collisions/Collisions.js +40 -0
- package/umd/Options/Classes/Particles/Collisions/CollisionsAbsorb.js +27 -0
- package/umd/Options/Classes/Particles/Collisions/CollisionsOverlap.js +31 -0
- package/umd/Options/Classes/Particles/Move/Move.js +138 -0
- package/umd/Options/Classes/Particles/Move/MoveAngle.js +32 -0
- package/umd/Options/Classes/Particles/Move/MoveAttract.js +57 -0
- package/umd/Options/Classes/Particles/Move/MoveCenter.js +39 -0
- package/umd/Options/Classes/Particles/Move/MoveGravity.js +40 -0
- package/umd/Options/Classes/Particles/Move/MoveTrail.js +42 -0
- package/umd/Options/Classes/Particles/Move/MoveTrailFill.js +28 -0
- package/umd/Options/Classes/Particles/Move/OutModes.js +32 -0
- package/umd/Options/Classes/Particles/Move/Path/MovePath.js +40 -0
- package/umd/Options/Classes/Particles/Move/Spin.js +34 -0
- package/umd/Options/Classes/Particles/Number/ParticlesDensity.js +56 -0
- package/umd/Options/Classes/Particles/Number/ParticlesNumber.js +42 -0
- package/umd/Options/Classes/Particles/Opacity/Opacity.js +30 -0
- package/umd/Options/Classes/Particles/Opacity/OpacityAnimation.js +40 -0
- package/umd/Options/Classes/Particles/ParticlesOptions.js +106 -0
- package/umd/Options/Classes/Particles/Shadow.js +48 -0
- package/umd/Options/Classes/Particles/Shape/Shape.js +39 -0
- package/umd/Options/Classes/Particles/Size/Size.js +30 -0
- package/umd/Options/Classes/Particles/Size/SizeAnimation.js +40 -0
- package/umd/Options/Classes/Particles/Stroke.js +35 -0
- package/umd/Options/Classes/Particles/ZIndex/ZIndex.js +38 -0
- package/umd/Options/Classes/Random.js +31 -0
- package/umd/Options/Classes/Responsive.js +41 -0
- package/umd/Options/Classes/Theme/Theme.js +34 -0
- package/umd/Options/Classes/Theme/ThemeDefault.js +35 -0
- package/umd/Options/Classes/ValueWithRandom.js +78 -0
- package/umd/Options/Interfaces/Background/IBackground.js +12 -0
- package/umd/Options/Interfaces/BackgroundMask/IBackgroundMask.js +12 -0
- package/umd/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.js +12 -0
- package/umd/Options/Interfaces/FullScreen/IFullScreen.js +12 -0
- package/umd/Options/Interfaces/IAnimatable.js +12 -0
- package/umd/Options/Interfaces/IAnimatableColor.js +12 -0
- package/umd/Options/Interfaces/IAnimation.js +12 -0
- package/umd/Options/Interfaces/IColorAnimation.js +12 -0
- package/umd/Options/Interfaces/IHslAnimation.js +12 -0
- package/umd/Options/Interfaces/IManualParticle.js +12 -0
- package/umd/Options/Interfaces/IOptionLoader.js +12 -0
- package/umd/Options/Interfaces/IOptions.js +12 -0
- package/umd/Options/Interfaces/IOptionsColor.js +12 -0
- package/umd/Options/Interfaces/IRandom.js +12 -0
- package/umd/Options/Interfaces/IResponsive.js +12 -0
- package/umd/Options/Interfaces/IValueWithRandom.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IClickEvent.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IDivEvent.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IEvents.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IHoverEvent.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IParallax.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IResizeEvent.js +12 -0
- package/umd/Options/Interfaces/Interactivity/IInteractivity.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IModeDiv.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IModes.js +12 -0
- package/umd/Options/Interfaces/Particles/Bounce/IParticlesBounce.js +12 -0
- package/umd/Options/Interfaces/Particles/Collisions/ICollisions.js +12 -0
- package/umd/Options/Interfaces/Particles/Collisions/ICollisionsAbsorb.js +12 -0
- package/umd/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.js +12 -0
- package/umd/Options/Interfaces/Particles/IParticlesOptions.js +12 -0
- package/umd/Options/Interfaces/Particles/IShadow.js +12 -0
- package/umd/Options/Interfaces/Particles/IStroke.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IMove.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IMoveAngle.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IMoveAttract.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IMoveCenter.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IMoveGravity.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IMoveTrail.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IMoveTrailFill.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IOutModes.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/ISpin.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/Path/IMovePath.js +12 -0
- package/umd/Options/Interfaces/Particles/Number/IParticlesDensity.js +12 -0
- package/umd/Options/Interfaces/Particles/Number/IParticlesNumber.js +12 -0
- package/umd/Options/Interfaces/Particles/Opacity/IOpacity.js +12 -0
- package/umd/Options/Interfaces/Particles/Opacity/IOpacityAnimation.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/ICharacterShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/IImageShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/IPolygonShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/IShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/IShapeValues.js +27 -0
- package/umd/Options/Interfaces/Particles/Shape/IStarShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Size/ISize.js +12 -0
- package/umd/Options/Interfaces/Particles/Size/ISizeAnimation.js +12 -0
- package/umd/Options/Interfaces/Particles/ZIndex/IZIndex.js +12 -0
- package/umd/Options/Interfaces/Theme/ITheme.js +12 -0
- package/umd/Options/Interfaces/Theme/IThemeDefault.js +12 -0
- package/umd/Types/CustomEventArgs.js +12 -0
- package/umd/Types/CustomEventListener.js +12 -0
- package/umd/Types/ISourceOptions.js +12 -0
- package/umd/Types/ParticlesGroups.js +12 -0
- package/umd/Types/PathOptions.js +12 -0
- package/umd/Types/RangeValue.js +12 -0
- package/umd/Types/RecursivePartial.js +12 -0
- package/umd/Types/ShapeData.js +12 -0
- package/umd/Types/ShapeDrawerFunctions.js +12 -0
- package/umd/Types/SingleOrMultiple.js +12 -0
- package/umd/Utils/CanvasUtils.js +174 -0
- package/umd/Utils/ColorUtils.js +305 -0
- package/umd/Utils/EventDispatcher.js +58 -0
- package/umd/Utils/HslColorManager.js +54 -0
- package/umd/Utils/NumberUtils.js +185 -0
- package/umd/Utils/OptionsUtils.js +26 -0
- package/umd/Utils/RgbColorManager.js +53 -0
- package/umd/Utils/Utils.js +284 -0
- package/umd/bundle.js +124 -0
- package/umd/engine.js +189 -0
- package/umd/index.js +226 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Interactivity = void 0;
|
|
4
|
+
const Events_1 = require("./Events/Events");
|
|
5
|
+
const Modes_1 = require("./Modes/Modes");
|
|
6
|
+
class Interactivity {
|
|
7
|
+
constructor(engine, container) {
|
|
8
|
+
this.detectsOn = "window";
|
|
9
|
+
this.events = new Events_1.Events();
|
|
10
|
+
this.modes = new Modes_1.Modes(engine, container);
|
|
11
|
+
}
|
|
12
|
+
get detect_on() {
|
|
13
|
+
return this.detectsOn;
|
|
14
|
+
}
|
|
15
|
+
set detect_on(value) {
|
|
16
|
+
this.detectsOn = value;
|
|
17
|
+
}
|
|
18
|
+
load(data) {
|
|
19
|
+
var _a;
|
|
20
|
+
if (!data) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const detectsOn = (_a = data.detectsOn) !== null && _a !== void 0 ? _a : data.detect_on;
|
|
24
|
+
if (detectsOn !== undefined) {
|
|
25
|
+
this.detectsOn = detectsOn;
|
|
26
|
+
}
|
|
27
|
+
this.events.load(data.events);
|
|
28
|
+
this.modes.load(data.modes);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.Interactivity = Interactivity;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Modes = void 0;
|
|
4
|
+
class Modes {
|
|
5
|
+
constructor(engine, container) {
|
|
6
|
+
this._engine = engine;
|
|
7
|
+
this._container = container;
|
|
8
|
+
}
|
|
9
|
+
load(data) {
|
|
10
|
+
if (!data) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (this._container) {
|
|
14
|
+
const interactors = this._engine.plugins.interactors.get(this._container);
|
|
15
|
+
if (interactors) {
|
|
16
|
+
for (const interactor of interactors) {
|
|
17
|
+
if (interactor.loadModeOptions) {
|
|
18
|
+
interactor.loadModeOptions(this, data);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.Modes = Modes;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ManualParticle = void 0;
|
|
4
|
+
const Utils_1 = require("../../Utils/Utils");
|
|
5
|
+
class ManualParticle {
|
|
6
|
+
load(data) {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
if (!data) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (data.position !== undefined) {
|
|
12
|
+
this.position = {
|
|
13
|
+
x: (_a = data.position.x) !== null && _a !== void 0 ? _a : 50,
|
|
14
|
+
y: (_b = data.position.y) !== null && _b !== void 0 ? _b : 50,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
if (data.options !== undefined) {
|
|
18
|
+
this.options = (0, Utils_1.deepExtend)({}, data.options);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.ManualParticle = ManualParticle;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Options = void 0;
|
|
4
|
+
const Utils_1 = require("../../Utils/Utils");
|
|
5
|
+
const Background_1 = require("./Background/Background");
|
|
6
|
+
const BackgroundMask_1 = require("./BackgroundMask/BackgroundMask");
|
|
7
|
+
const FullScreen_1 = require("./FullScreen/FullScreen");
|
|
8
|
+
const Interactivity_1 = require("./Interactivity/Interactivity");
|
|
9
|
+
const ManualParticle_1 = require("./ManualParticle");
|
|
10
|
+
const Responsive_1 = require("./Responsive");
|
|
11
|
+
const Theme_1 = require("./Theme/Theme");
|
|
12
|
+
const OptionsUtils_1 = require("../../Utils/OptionsUtils");
|
|
13
|
+
const NumberUtils_1 = require("../../Utils/NumberUtils");
|
|
14
|
+
class Options {
|
|
15
|
+
constructor(engine, container) {
|
|
16
|
+
this._engine = engine;
|
|
17
|
+
this._container = container;
|
|
18
|
+
this.autoPlay = true;
|
|
19
|
+
this.background = new Background_1.Background();
|
|
20
|
+
this.backgroundMask = new BackgroundMask_1.BackgroundMask();
|
|
21
|
+
this.defaultThemes = {};
|
|
22
|
+
this.delay = 0;
|
|
23
|
+
this.fullScreen = new FullScreen_1.FullScreen();
|
|
24
|
+
this.detectRetina = true;
|
|
25
|
+
this.duration = 0;
|
|
26
|
+
this.fpsLimit = 120;
|
|
27
|
+
this.interactivity = new Interactivity_1.Interactivity(engine, container);
|
|
28
|
+
this.manualParticles = [];
|
|
29
|
+
this.name = "default";
|
|
30
|
+
this.particles = (0, OptionsUtils_1.loadParticlesOptions)(this._engine, this._container);
|
|
31
|
+
this.pauseOnBlur = true;
|
|
32
|
+
this.pauseOnOutsideViewport = true;
|
|
33
|
+
this.responsive = [];
|
|
34
|
+
this.smooth = false;
|
|
35
|
+
this.style = {};
|
|
36
|
+
this.themes = [];
|
|
37
|
+
this.zLayers = 100;
|
|
38
|
+
}
|
|
39
|
+
get backgroundMode() {
|
|
40
|
+
return this.fullScreen;
|
|
41
|
+
}
|
|
42
|
+
set backgroundMode(value) {
|
|
43
|
+
this.fullScreen.load(value);
|
|
44
|
+
}
|
|
45
|
+
get fps_limit() {
|
|
46
|
+
return this.fpsLimit;
|
|
47
|
+
}
|
|
48
|
+
set fps_limit(value) {
|
|
49
|
+
this.fpsLimit = value;
|
|
50
|
+
}
|
|
51
|
+
get retina_detect() {
|
|
52
|
+
return this.detectRetina;
|
|
53
|
+
}
|
|
54
|
+
set retina_detect(value) {
|
|
55
|
+
this.detectRetina = value;
|
|
56
|
+
}
|
|
57
|
+
load(data) {
|
|
58
|
+
var _a, _b, _c, _d, _e;
|
|
59
|
+
if (!data) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (data.preset !== undefined) {
|
|
63
|
+
(0, Utils_1.executeOnSingleOrMultiple)(data.preset, (preset) => this._importPreset(preset));
|
|
64
|
+
}
|
|
65
|
+
if (data.autoPlay !== undefined) {
|
|
66
|
+
this.autoPlay = data.autoPlay;
|
|
67
|
+
}
|
|
68
|
+
if (data.delay !== undefined) {
|
|
69
|
+
this.delay = (0, NumberUtils_1.setRangeValue)(data.delay);
|
|
70
|
+
}
|
|
71
|
+
const detectRetina = (_a = data.detectRetina) !== null && _a !== void 0 ? _a : data.retina_detect;
|
|
72
|
+
if (detectRetina !== undefined) {
|
|
73
|
+
this.detectRetina = detectRetina;
|
|
74
|
+
}
|
|
75
|
+
if (data.duration !== undefined) {
|
|
76
|
+
this.duration = (0, NumberUtils_1.setRangeValue)(data.duration);
|
|
77
|
+
}
|
|
78
|
+
const fpsLimit = (_b = data.fpsLimit) !== null && _b !== void 0 ? _b : data.fps_limit;
|
|
79
|
+
if (fpsLimit !== undefined) {
|
|
80
|
+
this.fpsLimit = fpsLimit;
|
|
81
|
+
}
|
|
82
|
+
if (data.pauseOnBlur !== undefined) {
|
|
83
|
+
this.pauseOnBlur = data.pauseOnBlur;
|
|
84
|
+
}
|
|
85
|
+
if (data.pauseOnOutsideViewport !== undefined) {
|
|
86
|
+
this.pauseOnOutsideViewport = data.pauseOnOutsideViewport;
|
|
87
|
+
}
|
|
88
|
+
if (data.zLayers !== undefined) {
|
|
89
|
+
this.zLayers = data.zLayers;
|
|
90
|
+
}
|
|
91
|
+
this.background.load(data.background);
|
|
92
|
+
const fullScreen = (_c = data.fullScreen) !== null && _c !== void 0 ? _c : data.backgroundMode;
|
|
93
|
+
if (typeof fullScreen === "boolean") {
|
|
94
|
+
this.fullScreen.enable = fullScreen;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
this.fullScreen.load(fullScreen);
|
|
98
|
+
}
|
|
99
|
+
this.backgroundMask.load(data.backgroundMask);
|
|
100
|
+
this.interactivity.load(data.interactivity);
|
|
101
|
+
if (data.manualParticles !== undefined) {
|
|
102
|
+
this.manualParticles = data.manualParticles.map((t) => {
|
|
103
|
+
const tmp = new ManualParticle_1.ManualParticle();
|
|
104
|
+
tmp.load(t);
|
|
105
|
+
return tmp;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
this.particles.load(data.particles);
|
|
109
|
+
this.style = (0, Utils_1.deepExtend)(this.style, data.style);
|
|
110
|
+
this._engine.plugins.loadOptions(this, data);
|
|
111
|
+
if (data.smooth !== undefined) {
|
|
112
|
+
this.smooth = data.smooth;
|
|
113
|
+
}
|
|
114
|
+
const interactors = this._engine.plugins.interactors.get(this._container);
|
|
115
|
+
if (interactors) {
|
|
116
|
+
for (const interactor of interactors) {
|
|
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_1.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
|
+
const optTheme = new Theme_1.Theme();
|
|
135
|
+
optTheme.load(theme);
|
|
136
|
+
this.themes.push(optTheme);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
existingTheme.load(theme);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
this.defaultThemes.dark = (_d = this._findDefaultTheme("dark")) === null || _d === void 0 ? void 0 : _d.name;
|
|
144
|
+
this.defaultThemes.light = (_e = this._findDefaultTheme("light")) === null || _e === void 0 ? void 0 : _e.name;
|
|
145
|
+
}
|
|
146
|
+
setResponsive(width, pxRatio, defaultOptions) {
|
|
147
|
+
this.load(defaultOptions);
|
|
148
|
+
const responsiveOptions = this.responsive.find((t) => t.mode === "screen" && screen ? t.maxWidth > screen.availWidth : t.maxWidth * pxRatio > width);
|
|
149
|
+
this.load(responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.options);
|
|
150
|
+
return responsiveOptions === null || responsiveOptions === void 0 ? void 0 : 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 = (0, Utils_1.safeMatchMedia)("(prefers-color-scheme: dark)"), clientDarkMode = mediaMatch && mediaMatch.matches, defaultTheme = this._findDefaultTheme(clientDarkMode ? "dark" : "light");
|
|
161
|
+
if (defaultTheme) {
|
|
162
|
+
this.load(defaultTheme.options);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
_findDefaultTheme(mode) {
|
|
167
|
+
var _a;
|
|
168
|
+
return ((_a = this.themes.find((theme) => theme.default.value && theme.default.mode === mode)) !== null && _a !== void 0 ? _a : this.themes.find((theme) => theme.default.value && theme.default.mode === "any"));
|
|
169
|
+
}
|
|
170
|
+
_importPreset(preset) {
|
|
171
|
+
this.load(this._engine.plugins.getPreset(preset));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
exports.Options = Options;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OptionsColor = void 0;
|
|
4
|
+
class OptionsColor {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.value = "";
|
|
7
|
+
}
|
|
8
|
+
static create(source, data) {
|
|
9
|
+
const color = new OptionsColor();
|
|
10
|
+
color.load(source);
|
|
11
|
+
if (data !== undefined) {
|
|
12
|
+
if (typeof data === "string" || data instanceof Array) {
|
|
13
|
+
color.load({ value: data });
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
color.load(data);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return color;
|
|
20
|
+
}
|
|
21
|
+
load(data) {
|
|
22
|
+
if ((data === null || data === void 0 ? void 0 : data.value) === undefined) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
this.value = data.value;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.OptionsColor = OptionsColor;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParticlesBounce = void 0;
|
|
4
|
+
const ParticlesBounceFactor_1 = require("./ParticlesBounceFactor");
|
|
5
|
+
class ParticlesBounce {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.horizontal = new ParticlesBounceFactor_1.ParticlesBounceFactor();
|
|
8
|
+
this.vertical = new ParticlesBounceFactor_1.ParticlesBounceFactor();
|
|
9
|
+
}
|
|
10
|
+
load(data) {
|
|
11
|
+
if (!data) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
this.horizontal.load(data.horizontal);
|
|
15
|
+
this.vertical.load(data.vertical);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.ParticlesBounce = ParticlesBounce;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParticlesBounceFactor = void 0;
|
|
4
|
+
const ValueWithRandom_1 = require("../../ValueWithRandom");
|
|
5
|
+
class ParticlesBounceFactor extends ValueWithRandom_1.ValueWithRandom {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.random.minimumValue = 0.1;
|
|
9
|
+
this.value = 1;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.ParticlesBounceFactor = ParticlesBounceFactor;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Collisions = void 0;
|
|
4
|
+
const CollisionsAbsorb_1 = require("./CollisionsAbsorb");
|
|
5
|
+
const CollisionsOverlap_1 = require("./CollisionsOverlap");
|
|
6
|
+
const ParticlesBounce_1 = require("../Bounce/ParticlesBounce");
|
|
7
|
+
class Collisions {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.absorb = new CollisionsAbsorb_1.CollisionsAbsorb();
|
|
10
|
+
this.bounce = new ParticlesBounce_1.ParticlesBounce();
|
|
11
|
+
this.enable = false;
|
|
12
|
+
this.mode = "bounce";
|
|
13
|
+
this.overlap = new CollisionsOverlap_1.CollisionsOverlap();
|
|
14
|
+
}
|
|
15
|
+
load(data) {
|
|
16
|
+
if (!data) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
this.absorb.load(data.absorb);
|
|
20
|
+
this.bounce.load(data.bounce);
|
|
21
|
+
if (data.enable !== undefined) {
|
|
22
|
+
this.enable = data.enable;
|
|
23
|
+
}
|
|
24
|
+
if (data.mode !== undefined) {
|
|
25
|
+
this.mode = data.mode;
|
|
26
|
+
}
|
|
27
|
+
this.overlap.load(data.overlap);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.Collisions = Collisions;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollisionsAbsorb = void 0;
|
|
4
|
+
class CollisionsAbsorb {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.speed = 2;
|
|
7
|
+
}
|
|
8
|
+
load(data) {
|
|
9
|
+
if (!data) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (data.speed !== undefined) {
|
|
13
|
+
this.speed = data.speed;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.CollisionsAbsorb = CollisionsAbsorb;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollisionsOverlap = void 0;
|
|
4
|
+
class CollisionsOverlap {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.enable = true;
|
|
7
|
+
this.retries = 0;
|
|
8
|
+
}
|
|
9
|
+
load(data) {
|
|
10
|
+
if (!data) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (data.enable !== undefined) {
|
|
14
|
+
this.enable = data.enable;
|
|
15
|
+
}
|
|
16
|
+
if (data.retries !== undefined) {
|
|
17
|
+
this.retries = data.retries;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.CollisionsOverlap = CollisionsOverlap;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Move = void 0;
|
|
4
|
+
const MoveAngle_1 = require("./MoveAngle");
|
|
5
|
+
const MoveAttract_1 = require("./MoveAttract");
|
|
6
|
+
const MoveCenter_1 = require("./MoveCenter");
|
|
7
|
+
const MoveGravity_1 = require("./MoveGravity");
|
|
8
|
+
const MovePath_1 = require("./Path/MovePath");
|
|
9
|
+
const MoveTrail_1 = require("./MoveTrail");
|
|
10
|
+
const OutModes_1 = require("./OutModes");
|
|
11
|
+
const Spin_1 = require("./Spin");
|
|
12
|
+
const NumberUtils_1 = require("../../../../Utils/NumberUtils");
|
|
13
|
+
class Move {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.angle = new MoveAngle_1.MoveAngle();
|
|
16
|
+
this.attract = new MoveAttract_1.MoveAttract();
|
|
17
|
+
this.center = new MoveCenter_1.MoveCenter();
|
|
18
|
+
this.decay = 0;
|
|
19
|
+
this.distance = {};
|
|
20
|
+
this.direction = "none";
|
|
21
|
+
this.drift = 0;
|
|
22
|
+
this.enable = false;
|
|
23
|
+
this.gravity = new MoveGravity_1.MoveGravity();
|
|
24
|
+
this.path = new MovePath_1.MovePath();
|
|
25
|
+
this.outModes = new OutModes_1.OutModes();
|
|
26
|
+
this.random = false;
|
|
27
|
+
this.size = false;
|
|
28
|
+
this.speed = 2;
|
|
29
|
+
this.spin = new Spin_1.Spin();
|
|
30
|
+
this.straight = false;
|
|
31
|
+
this.trail = new MoveTrail_1.MoveTrail();
|
|
32
|
+
this.vibrate = false;
|
|
33
|
+
this.warp = false;
|
|
34
|
+
}
|
|
35
|
+
get bounce() {
|
|
36
|
+
return this.collisions;
|
|
37
|
+
}
|
|
38
|
+
set bounce(value) {
|
|
39
|
+
this.collisions = value;
|
|
40
|
+
}
|
|
41
|
+
get collisions() {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
set collisions(_) {
|
|
45
|
+
}
|
|
46
|
+
get noise() {
|
|
47
|
+
return this.path;
|
|
48
|
+
}
|
|
49
|
+
set noise(value) {
|
|
50
|
+
this.path = value;
|
|
51
|
+
}
|
|
52
|
+
get outMode() {
|
|
53
|
+
return this.outModes.default;
|
|
54
|
+
}
|
|
55
|
+
set outMode(value) {
|
|
56
|
+
this.outModes.default = value;
|
|
57
|
+
}
|
|
58
|
+
get out_mode() {
|
|
59
|
+
return this.outMode;
|
|
60
|
+
}
|
|
61
|
+
set out_mode(value) {
|
|
62
|
+
this.outMode = value;
|
|
63
|
+
}
|
|
64
|
+
load(data) {
|
|
65
|
+
var _a, _b, _c;
|
|
66
|
+
if (!data) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.angle.load(typeof data.angle === "number" ? { value: data.angle } : data.angle);
|
|
70
|
+
this.attract.load(data.attract);
|
|
71
|
+
this.center.load(data.center);
|
|
72
|
+
if (data.decay !== undefined) {
|
|
73
|
+
this.decay = (0, NumberUtils_1.setRangeValue)(data.decay);
|
|
74
|
+
}
|
|
75
|
+
if (data.direction !== undefined) {
|
|
76
|
+
this.direction = data.direction;
|
|
77
|
+
}
|
|
78
|
+
if (data.distance !== undefined) {
|
|
79
|
+
this.distance =
|
|
80
|
+
typeof data.distance === "number"
|
|
81
|
+
? {
|
|
82
|
+
horizontal: data.distance,
|
|
83
|
+
vertical: data.distance,
|
|
84
|
+
}
|
|
85
|
+
: Object.assign({}, data.distance);
|
|
86
|
+
}
|
|
87
|
+
if (data.drift !== undefined) {
|
|
88
|
+
this.drift = (0, NumberUtils_1.setRangeValue)(data.drift);
|
|
89
|
+
}
|
|
90
|
+
if (data.enable !== undefined) {
|
|
91
|
+
this.enable = data.enable;
|
|
92
|
+
}
|
|
93
|
+
this.gravity.load(data.gravity);
|
|
94
|
+
const outModes = (_b = (_a = data.outModes) !== null && _a !== void 0 ? _a : data.outMode) !== null && _b !== void 0 ? _b : data.out_mode;
|
|
95
|
+
if (outModes !== undefined) {
|
|
96
|
+
if (typeof outModes === "object") {
|
|
97
|
+
this.outModes.load(outModes);
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
this.outModes.load({
|
|
101
|
+
default: outModes,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
this.path.load((_c = data.path) !== null && _c !== void 0 ? _c : data.noise);
|
|
106
|
+
if (data.random !== undefined) {
|
|
107
|
+
this.random = data.random;
|
|
108
|
+
}
|
|
109
|
+
if (data.size !== undefined) {
|
|
110
|
+
this.size = data.size;
|
|
111
|
+
}
|
|
112
|
+
if (data.speed !== undefined) {
|
|
113
|
+
this.speed = (0, NumberUtils_1.setRangeValue)(data.speed);
|
|
114
|
+
}
|
|
115
|
+
this.spin.load(data.spin);
|
|
116
|
+
if (data.straight !== undefined) {
|
|
117
|
+
this.straight = data.straight;
|
|
118
|
+
}
|
|
119
|
+
this.trail.load(data.trail);
|
|
120
|
+
if (data.vibrate !== undefined) {
|
|
121
|
+
this.vibrate = data.vibrate;
|
|
122
|
+
}
|
|
123
|
+
if (data.warp !== undefined) {
|
|
124
|
+
this.warp = data.warp;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
exports.Move = Move;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MoveAngle = void 0;
|
|
4
|
+
const NumberUtils_1 = require("../../../../Utils/NumberUtils");
|
|
5
|
+
class MoveAngle {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.offset = 0;
|
|
8
|
+
this.value = 90;
|
|
9
|
+
}
|
|
10
|
+
load(data) {
|
|
11
|
+
if (!data) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (data.offset !== undefined) {
|
|
15
|
+
this.offset = (0, NumberUtils_1.setRangeValue)(data.offset);
|
|
16
|
+
}
|
|
17
|
+
if (data.value !== undefined) {
|
|
18
|
+
this.value = (0, NumberUtils_1.setRangeValue)(data.value);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.MoveAngle = MoveAngle;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MoveAttract = void 0;
|
|
4
|
+
const NumberUtils_1 = require("../../../../Utils/NumberUtils");
|
|
5
|
+
class MoveAttract {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.distance = 200;
|
|
8
|
+
this.enable = false;
|
|
9
|
+
this.rotate = {
|
|
10
|
+
x: 3000,
|
|
11
|
+
y: 3000,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
get rotateX() {
|
|
15
|
+
return this.rotate.x;
|
|
16
|
+
}
|
|
17
|
+
set rotateX(value) {
|
|
18
|
+
this.rotate.x = value;
|
|
19
|
+
}
|
|
20
|
+
get rotateY() {
|
|
21
|
+
return this.rotate.y;
|
|
22
|
+
}
|
|
23
|
+
set rotateY(value) {
|
|
24
|
+
this.rotate.y = value;
|
|
25
|
+
}
|
|
26
|
+
load(data) {
|
|
27
|
+
var _a, _b, _c, _d;
|
|
28
|
+
if (!data) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (data.distance !== undefined) {
|
|
32
|
+
this.distance = (0, NumberUtils_1.setRangeValue)(data.distance);
|
|
33
|
+
}
|
|
34
|
+
if (data.enable !== undefined) {
|
|
35
|
+
this.enable = data.enable;
|
|
36
|
+
}
|
|
37
|
+
const rotateX = (_b = (_a = data.rotate) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : data.rotateX;
|
|
38
|
+
if (rotateX !== undefined) {
|
|
39
|
+
this.rotate.x = rotateX;
|
|
40
|
+
}
|
|
41
|
+
const rotateY = (_d = (_c = data.rotate) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : data.rotateY;
|
|
42
|
+
if (rotateY !== undefined) {
|
|
43
|
+
this.rotate.y = rotateY;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.MoveAttract = MoveAttract;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MoveCenter = void 0;
|
|
4
|
+
class MoveCenter {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.x = 50;
|
|
7
|
+
this.y = 50;
|
|
8
|
+
this.mode = "percent";
|
|
9
|
+
this.radius = 0;
|
|
10
|
+
}
|
|
11
|
+
load(data) {
|
|
12
|
+
if (!data) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (data.x !== undefined) {
|
|
16
|
+
this.x = data.x;
|
|
17
|
+
}
|
|
18
|
+
if (data.y !== undefined) {
|
|
19
|
+
this.y = data.y;
|
|
20
|
+
}
|
|
21
|
+
if (data.mode !== undefined) {
|
|
22
|
+
this.mode = data.mode;
|
|
23
|
+
}
|
|
24
|
+
if (data.radius !== undefined) {
|
|
25
|
+
this.radius = data.radius;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.MoveCenter = MoveCenter;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MoveGravity = void 0;
|
|
4
|
+
const NumberUtils_1 = require("../../../../Utils/NumberUtils");
|
|
5
|
+
class MoveGravity {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.acceleration = 9.81;
|
|
8
|
+
this.enable = false;
|
|
9
|
+
this.inverse = false;
|
|
10
|
+
this.maxSpeed = 50;
|
|
11
|
+
}
|
|
12
|
+
load(data) {
|
|
13
|
+
if (!data) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (data.acceleration !== undefined) {
|
|
17
|
+
this.acceleration = (0, NumberUtils_1.setRangeValue)(data.acceleration);
|
|
18
|
+
}
|
|
19
|
+
if (data.enable !== undefined) {
|
|
20
|
+
this.enable = data.enable;
|
|
21
|
+
}
|
|
22
|
+
if (data.inverse !== undefined) {
|
|
23
|
+
this.inverse = data.inverse;
|
|
24
|
+
}
|
|
25
|
+
if (data.maxSpeed !== undefined) {
|
|
26
|
+
this.maxSpeed = (0, NumberUtils_1.setRangeValue)(data.maxSpeed);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.MoveGravity = MoveGravity;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MoveTrail = void 0;
|
|
4
|
+
const MoveTrailFill_1 = require("./MoveTrailFill");
|
|
5
|
+
class MoveTrail {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.enable = false;
|
|
8
|
+
this.length = 10;
|
|
9
|
+
this.fill = new MoveTrailFill_1.MoveTrailFill();
|
|
10
|
+
}
|
|
11
|
+
get fillColor() {
|
|
12
|
+
return this.fill.color;
|
|
13
|
+
}
|
|
14
|
+
set fillColor(value) {
|
|
15
|
+
this.fill.load({ color: value });
|
|
16
|
+
}
|
|
17
|
+
load(data) {
|
|
18
|
+
if (!data) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (data.enable !== undefined) {
|
|
22
|
+
this.enable = data.enable;
|
|
23
|
+
}
|
|
24
|
+
if (data.fill !== undefined || data.fillColor !== undefined) {
|
|
25
|
+
this.fill.load(data.fill || { color: data.fillColor });
|
|
26
|
+
}
|
|
27
|
+
if (data.length !== undefined) {
|
|
28
|
+
this.length = data.length;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.MoveTrail = MoveTrail;
|