@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,149 @@
|
|
|
1
|
+
import { Vector } from "../Core/Utils/Vector";
|
|
2
|
+
let _random = Math.random;
|
|
3
|
+
const easings = new Map();
|
|
4
|
+
export function addEasing(name, easing) {
|
|
5
|
+
if (!easings.get(name)) {
|
|
6
|
+
easings.set(name, easing);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export function getEasing(name) {
|
|
10
|
+
return easings.get(name) || ((value) => value);
|
|
11
|
+
}
|
|
12
|
+
export function setRandom(rnd = Math.random) {
|
|
13
|
+
_random = rnd;
|
|
14
|
+
}
|
|
15
|
+
export function getRandom() {
|
|
16
|
+
return clamp(_random(), 0, 1 - 1e-16);
|
|
17
|
+
}
|
|
18
|
+
export function clamp(num, min, max) {
|
|
19
|
+
return Math.min(Math.max(num, min), max);
|
|
20
|
+
}
|
|
21
|
+
export function mix(comp1, comp2, weight1, weight2) {
|
|
22
|
+
return Math.floor((comp1 * weight1 + comp2 * weight2) / (weight1 + weight2));
|
|
23
|
+
}
|
|
24
|
+
export function randomInRange(r) {
|
|
25
|
+
const max = getRangeMax(r);
|
|
26
|
+
let min = getRangeMin(r);
|
|
27
|
+
if (max === min) {
|
|
28
|
+
min = 0;
|
|
29
|
+
}
|
|
30
|
+
return getRandom() * (max - min) + min;
|
|
31
|
+
}
|
|
32
|
+
export function getRangeValue(value) {
|
|
33
|
+
return typeof value === "number" ? value : randomInRange(value);
|
|
34
|
+
}
|
|
35
|
+
export function getRangeMin(value) {
|
|
36
|
+
return typeof value === "number" ? value : value.min;
|
|
37
|
+
}
|
|
38
|
+
export function getRangeMax(value) {
|
|
39
|
+
return typeof value === "number" ? value : value.max;
|
|
40
|
+
}
|
|
41
|
+
export function setRangeValue(source, value) {
|
|
42
|
+
if (source === value || (value === undefined && typeof source === "number")) {
|
|
43
|
+
return source;
|
|
44
|
+
}
|
|
45
|
+
const min = getRangeMin(source), max = getRangeMax(source);
|
|
46
|
+
return value !== undefined
|
|
47
|
+
? {
|
|
48
|
+
min: Math.min(min, value),
|
|
49
|
+
max: Math.max(max, value),
|
|
50
|
+
}
|
|
51
|
+
: setRangeValue(min, max);
|
|
52
|
+
}
|
|
53
|
+
export function getValue(options) {
|
|
54
|
+
const random = options.random, { enable, minimumValue } = typeof random === "boolean"
|
|
55
|
+
? {
|
|
56
|
+
enable: random,
|
|
57
|
+
minimumValue: 0,
|
|
58
|
+
}
|
|
59
|
+
: random;
|
|
60
|
+
return enable ? getRangeValue(setRangeValue(options.value, minimumValue)) : getRangeValue(options.value);
|
|
61
|
+
}
|
|
62
|
+
export function getDistances(pointA, pointB) {
|
|
63
|
+
const dx = pointA.x - pointB.x, dy = pointA.y - pointB.y;
|
|
64
|
+
return { dx: dx, dy: dy, distance: Math.sqrt(dx ** 2 + dy ** 2) };
|
|
65
|
+
}
|
|
66
|
+
export function getDistance(pointA, pointB) {
|
|
67
|
+
return getDistances(pointA, pointB).distance;
|
|
68
|
+
}
|
|
69
|
+
export function getParticleDirectionAngle(direction, position, center) {
|
|
70
|
+
if (typeof direction === "number") {
|
|
71
|
+
return (direction * Math.PI) / 180;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
switch (direction) {
|
|
75
|
+
case "top":
|
|
76
|
+
return -Math.PI / 2;
|
|
77
|
+
case "top-right":
|
|
78
|
+
return -Math.PI / 4;
|
|
79
|
+
case "right":
|
|
80
|
+
return 0;
|
|
81
|
+
case "bottom-right":
|
|
82
|
+
return Math.PI / 4;
|
|
83
|
+
case "bottom":
|
|
84
|
+
return Math.PI / 2;
|
|
85
|
+
case "bottom-left":
|
|
86
|
+
return (3 * Math.PI) / 4;
|
|
87
|
+
case "left":
|
|
88
|
+
return Math.PI;
|
|
89
|
+
case "top-left":
|
|
90
|
+
return (-3 * Math.PI) / 4;
|
|
91
|
+
case "inside":
|
|
92
|
+
return Math.atan2(center.y - position.y, center.x - position.x);
|
|
93
|
+
case "outside":
|
|
94
|
+
return Math.atan2(position.y - center.y, position.x - center.x);
|
|
95
|
+
default:
|
|
96
|
+
return getRandom() * Math.PI * 2;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
export function getParticleBaseVelocity(direction) {
|
|
101
|
+
const baseVelocity = Vector.origin;
|
|
102
|
+
baseVelocity.length = 1;
|
|
103
|
+
baseVelocity.angle = direction;
|
|
104
|
+
return baseVelocity;
|
|
105
|
+
}
|
|
106
|
+
export function collisionVelocity(v1, v2, m1, m2) {
|
|
107
|
+
return Vector.create((v1.x * (m1 - m2)) / (m1 + m2) + (v2.x * 2 * m2) / (m1 + m2), v1.y);
|
|
108
|
+
}
|
|
109
|
+
export function calcPositionFromSize(data) {
|
|
110
|
+
return data.position && data.position.x !== undefined && data.position.y !== undefined
|
|
111
|
+
? {
|
|
112
|
+
x: (data.position.x * data.size.width) / 100,
|
|
113
|
+
y: (data.position.y * data.size.height) / 100,
|
|
114
|
+
}
|
|
115
|
+
: undefined;
|
|
116
|
+
}
|
|
117
|
+
export function calcPositionOrRandomFromSize(data) {
|
|
118
|
+
var _a, _b, _c, _d;
|
|
119
|
+
return {
|
|
120
|
+
x: (((_b = (_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : getRandom() * 100) * data.size.width) / 100,
|
|
121
|
+
y: (((_d = (_c = data.position) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : getRandom() * 100) * data.size.height) / 100,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
export function calcPositionOrRandomFromSizeRanged(data) {
|
|
125
|
+
var _a, _b;
|
|
126
|
+
const position = {
|
|
127
|
+
x: ((_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== undefined ? getRangeValue(data.position.x) : undefined,
|
|
128
|
+
y: ((_b = data.position) === null || _b === void 0 ? void 0 : _b.y) !== undefined ? getRangeValue(data.position.y) : undefined,
|
|
129
|
+
};
|
|
130
|
+
return calcPositionOrRandomFromSize({ size: data.size, position });
|
|
131
|
+
}
|
|
132
|
+
export function calcExactPositionOrRandomFromSize(data) {
|
|
133
|
+
var _a, _b, _c, _d;
|
|
134
|
+
return {
|
|
135
|
+
x: (_b = (_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : getRandom() * data.size.width,
|
|
136
|
+
y: (_d = (_c = data.position) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : getRandom() * data.size.height,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export function calcExactPositionOrRandomFromSizeRanged(data) {
|
|
140
|
+
var _a, _b;
|
|
141
|
+
const position = {
|
|
142
|
+
x: ((_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== undefined ? getRangeValue(data.position.x) : undefined,
|
|
143
|
+
y: ((_b = data.position) === null || _b === void 0 ? void 0 : _b.y) !== undefined ? getRangeValue(data.position.y) : undefined,
|
|
144
|
+
};
|
|
145
|
+
return calcExactPositionOrRandomFromSize({ size: data.size, position });
|
|
146
|
+
}
|
|
147
|
+
export function parseAlpha(input) {
|
|
148
|
+
return input ? (input.endsWith("%") ? parseFloat(input) / 100 : parseFloat(input)) : 1;
|
|
149
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ParticlesOptions } from "../Options/Classes/Particles/ParticlesOptions";
|
|
2
|
+
export function loadOptions(options, ...sourceOptionsArr) {
|
|
3
|
+
for (const sourceOptions of sourceOptionsArr) {
|
|
4
|
+
options.load(sourceOptions);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export function loadParticlesOptions(engine, container, ...sourceOptionsArr) {
|
|
8
|
+
const options = new ParticlesOptions(engine, container);
|
|
9
|
+
loadOptions(options, ...sourceOptionsArr);
|
|
10
|
+
return options;
|
|
11
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { getRangeValue, parseAlpha } from "./NumberUtils";
|
|
2
|
+
export class RgbColorManager {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.key = "rgb";
|
|
5
|
+
this.stringPrefix = "rgb";
|
|
6
|
+
}
|
|
7
|
+
handleColor(color) {
|
|
8
|
+
var _a;
|
|
9
|
+
const colorValue = color.value, rgbColor = (_a = colorValue.rgb) !== null && _a !== void 0 ? _a : color.value;
|
|
10
|
+
if (rgbColor.r !== undefined) {
|
|
11
|
+
return rgbColor;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
handleRangeColor(color) {
|
|
15
|
+
var _a;
|
|
16
|
+
const colorValue = color.value, rgbColor = (_a = colorValue.rgb) !== null && _a !== void 0 ? _a : color.value;
|
|
17
|
+
if (rgbColor.r !== undefined) {
|
|
18
|
+
return {
|
|
19
|
+
r: getRangeValue(rgbColor.r),
|
|
20
|
+
g: getRangeValue(rgbColor.g),
|
|
21
|
+
b: getRangeValue(rgbColor.b),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
parseString(input) {
|
|
26
|
+
if (!input.startsWith(this.stringPrefix)) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const regex = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.%]+)\s*)?\)/i, result = regex.exec(input);
|
|
30
|
+
return result
|
|
31
|
+
? {
|
|
32
|
+
a: result.length > 4 ? parseAlpha(result[5]) : 1,
|
|
33
|
+
b: parseInt(result[3], 10),
|
|
34
|
+
g: parseInt(result[2], 10),
|
|
35
|
+
r: parseInt(result[1], 10),
|
|
36
|
+
}
|
|
37
|
+
: undefined;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { collisionVelocity, getDistances, getRandom, getRangeMax, getRangeMin, getRangeValue, getValue, randomInRange, } from "./NumberUtils";
|
|
2
|
+
import { Vector } from "../Core/Utils/Vector";
|
|
3
|
+
function rectSideBounce(pSide, pOtherSide, rectSide, rectOtherSide, velocity, factor) {
|
|
4
|
+
const res = { bounced: false };
|
|
5
|
+
if (pOtherSide.min < rectOtherSide.min ||
|
|
6
|
+
pOtherSide.min > rectOtherSide.max ||
|
|
7
|
+
pOtherSide.max < rectOtherSide.min ||
|
|
8
|
+
pOtherSide.max > rectOtherSide.max) {
|
|
9
|
+
return res;
|
|
10
|
+
}
|
|
11
|
+
if ((pSide.max >= rectSide.min && pSide.max <= (rectSide.max + rectSide.min) / 2 && velocity > 0) ||
|
|
12
|
+
(pSide.min <= rectSide.max && pSide.min > (rectSide.max + rectSide.min) / 2 && velocity < 0)) {
|
|
13
|
+
res.velocity = velocity * -factor;
|
|
14
|
+
res.bounced = true;
|
|
15
|
+
}
|
|
16
|
+
return res;
|
|
17
|
+
}
|
|
18
|
+
function checkSelector(element, selectors) {
|
|
19
|
+
const res = executeOnSingleOrMultiple(selectors, (selector) => {
|
|
20
|
+
return element.matches(selector);
|
|
21
|
+
});
|
|
22
|
+
return res instanceof Array ? res.some((t) => t) : res;
|
|
23
|
+
}
|
|
24
|
+
export function isSsr() {
|
|
25
|
+
return typeof window === "undefined" || !window || typeof window.document === "undefined" || !window.document;
|
|
26
|
+
}
|
|
27
|
+
export function hasMatchMedia() {
|
|
28
|
+
return !isSsr() && typeof matchMedia !== "undefined";
|
|
29
|
+
}
|
|
30
|
+
export function safeMatchMedia(query) {
|
|
31
|
+
if (!hasMatchMedia()) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
return matchMedia(query);
|
|
35
|
+
}
|
|
36
|
+
export function animate() {
|
|
37
|
+
return isSsr()
|
|
38
|
+
? (callback) => setTimeout(callback)
|
|
39
|
+
: (callback) => (requestAnimationFrame || setTimeout)(callback);
|
|
40
|
+
}
|
|
41
|
+
export function cancelAnimation() {
|
|
42
|
+
return isSsr()
|
|
43
|
+
? (handle) => clearTimeout(handle)
|
|
44
|
+
: (handle) => (cancelAnimationFrame || clearTimeout)(handle);
|
|
45
|
+
}
|
|
46
|
+
export function isInArray(value, array) {
|
|
47
|
+
return value === array || (array instanceof Array && array.indexOf(value) > -1);
|
|
48
|
+
}
|
|
49
|
+
export async function loadFont(font, weight) {
|
|
50
|
+
try {
|
|
51
|
+
await document.fonts.load(`${weight !== null && weight !== void 0 ? weight : "400"} 36px '${font !== null && font !== void 0 ? font : "Verdana"}'`);
|
|
52
|
+
}
|
|
53
|
+
catch (_a) {
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export function arrayRandomIndex(array) {
|
|
57
|
+
return Math.floor(getRandom() * array.length);
|
|
58
|
+
}
|
|
59
|
+
export function itemFromArray(array, index, useIndex = true) {
|
|
60
|
+
return array[index !== undefined && useIndex ? index % array.length : arrayRandomIndex(array)];
|
|
61
|
+
}
|
|
62
|
+
export function isPointInside(point, size, offset, radius, direction) {
|
|
63
|
+
return areBoundsInside(calculateBounds(point, radius !== null && radius !== void 0 ? radius : 0), size, offset, direction);
|
|
64
|
+
}
|
|
65
|
+
export function areBoundsInside(bounds, size, offset, direction) {
|
|
66
|
+
let inside = true;
|
|
67
|
+
if (!direction || direction === "bottom") {
|
|
68
|
+
inside = bounds.top < size.height + offset.x;
|
|
69
|
+
}
|
|
70
|
+
if (inside && (!direction || direction === "left")) {
|
|
71
|
+
inside = bounds.right > offset.x;
|
|
72
|
+
}
|
|
73
|
+
if (inside && (!direction || direction === "right")) {
|
|
74
|
+
inside = bounds.left < size.width + offset.y;
|
|
75
|
+
}
|
|
76
|
+
if (inside && (!direction || direction === "top")) {
|
|
77
|
+
inside = bounds.bottom > offset.y;
|
|
78
|
+
}
|
|
79
|
+
return inside;
|
|
80
|
+
}
|
|
81
|
+
export function calculateBounds(point, radius) {
|
|
82
|
+
return {
|
|
83
|
+
bottom: point.y + radius,
|
|
84
|
+
left: point.x - radius,
|
|
85
|
+
right: point.x + radius,
|
|
86
|
+
top: point.y - radius,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export function deepExtend(destination, ...sources) {
|
|
90
|
+
for (const source of sources) {
|
|
91
|
+
if (source === undefined || source === null) {
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
if (typeof source !== "object") {
|
|
95
|
+
destination = source;
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
const sourceIsArray = Array.isArray(source);
|
|
99
|
+
if (sourceIsArray && (typeof destination !== "object" || !destination || !Array.isArray(destination))) {
|
|
100
|
+
destination = [];
|
|
101
|
+
}
|
|
102
|
+
else if (!sourceIsArray && (typeof destination !== "object" || !destination || Array.isArray(destination))) {
|
|
103
|
+
destination = {};
|
|
104
|
+
}
|
|
105
|
+
for (const key in source) {
|
|
106
|
+
if (key === "__proto__") {
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
const sourceDict = source, value = sourceDict[key], isObject = typeof value === "object", destDict = destination;
|
|
110
|
+
destDict[key] =
|
|
111
|
+
isObject && Array.isArray(value)
|
|
112
|
+
? value.map((v) => deepExtend(destDict[key], v))
|
|
113
|
+
: deepExtend(destDict[key], value);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return destination;
|
|
117
|
+
}
|
|
118
|
+
export function isDivModeEnabled(mode, divs) {
|
|
119
|
+
return !!findItemFromSingleOrMultiple(divs, (t) => t.enable && isInArray(mode, t.mode));
|
|
120
|
+
}
|
|
121
|
+
export function divModeExecute(mode, divs, callback) {
|
|
122
|
+
executeOnSingleOrMultiple(divs, (div) => {
|
|
123
|
+
const divMode = div.mode, divEnabled = div.enable;
|
|
124
|
+
if (divEnabled && isInArray(mode, divMode)) {
|
|
125
|
+
singleDivModeExecute(div, callback);
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
export function singleDivModeExecute(div, callback) {
|
|
130
|
+
const selectors = div.selectors;
|
|
131
|
+
executeOnSingleOrMultiple(selectors, (selector) => {
|
|
132
|
+
callback(selector, div);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
export function divMode(divs, element) {
|
|
136
|
+
if (!element || !divs) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
return findItemFromSingleOrMultiple(divs, (div) => {
|
|
140
|
+
return checkSelector(element, div.selectors);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
export function circleBounceDataFromParticle(p) {
|
|
144
|
+
return {
|
|
145
|
+
position: p.getPosition(),
|
|
146
|
+
radius: p.getRadius(),
|
|
147
|
+
mass: p.getMass(),
|
|
148
|
+
velocity: p.velocity,
|
|
149
|
+
factor: Vector.create(getValue(p.options.bounce.horizontal), getValue(p.options.bounce.vertical)),
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
export function circleBounce(p1, p2) {
|
|
153
|
+
const { x: xVelocityDiff, y: yVelocityDiff } = p1.velocity.sub(p2.velocity), [pos1, pos2] = [p1.position, p2.position], { dx: xDist, dy: yDist } = getDistances(pos2, pos1);
|
|
154
|
+
if (xVelocityDiff * xDist + yVelocityDiff * yDist < 0) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const angle = -Math.atan2(yDist, xDist), m1 = p1.mass, m2 = p2.mass, u1 = p1.velocity.rotate(angle), u2 = p2.velocity.rotate(angle), v1 = collisionVelocity(u1, u2, m1, m2), v2 = collisionVelocity(u2, u1, m1, m2), vFinal1 = v1.rotate(-angle), vFinal2 = v2.rotate(-angle);
|
|
158
|
+
p1.velocity.x = vFinal1.x * p1.factor.x;
|
|
159
|
+
p1.velocity.y = vFinal1.y * p1.factor.y;
|
|
160
|
+
p2.velocity.x = vFinal2.x * p2.factor.x;
|
|
161
|
+
p2.velocity.y = vFinal2.y * p2.factor.y;
|
|
162
|
+
}
|
|
163
|
+
export function rectBounce(particle, divBounds) {
|
|
164
|
+
const pPos = particle.getPosition(), size = particle.getRadius(), bounds = calculateBounds(pPos, size), resH = rectSideBounce({
|
|
165
|
+
min: bounds.left,
|
|
166
|
+
max: bounds.right,
|
|
167
|
+
}, {
|
|
168
|
+
min: bounds.top,
|
|
169
|
+
max: bounds.bottom,
|
|
170
|
+
}, {
|
|
171
|
+
min: divBounds.left,
|
|
172
|
+
max: divBounds.right,
|
|
173
|
+
}, {
|
|
174
|
+
min: divBounds.top,
|
|
175
|
+
max: divBounds.bottom,
|
|
176
|
+
}, particle.velocity.x, getValue(particle.options.bounce.horizontal));
|
|
177
|
+
if (resH.bounced) {
|
|
178
|
+
if (resH.velocity !== undefined) {
|
|
179
|
+
particle.velocity.x = resH.velocity;
|
|
180
|
+
}
|
|
181
|
+
if (resH.position !== undefined) {
|
|
182
|
+
particle.position.x = resH.position;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const resV = rectSideBounce({
|
|
186
|
+
min: bounds.top,
|
|
187
|
+
max: bounds.bottom,
|
|
188
|
+
}, {
|
|
189
|
+
min: bounds.left,
|
|
190
|
+
max: bounds.right,
|
|
191
|
+
}, {
|
|
192
|
+
min: divBounds.top,
|
|
193
|
+
max: divBounds.bottom,
|
|
194
|
+
}, {
|
|
195
|
+
min: divBounds.left,
|
|
196
|
+
max: divBounds.right,
|
|
197
|
+
}, particle.velocity.y, getValue(particle.options.bounce.vertical));
|
|
198
|
+
if (resV.bounced) {
|
|
199
|
+
if (resV.velocity !== undefined) {
|
|
200
|
+
particle.velocity.y = resV.velocity;
|
|
201
|
+
}
|
|
202
|
+
if (resV.position !== undefined) {
|
|
203
|
+
particle.position.y = resV.position;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
export function executeOnSingleOrMultiple(obj, callback) {
|
|
208
|
+
return obj instanceof Array ? obj.map((item, index) => callback(item, index)) : callback(obj, 0);
|
|
209
|
+
}
|
|
210
|
+
export function itemFromSingleOrMultiple(obj, index, useIndex) {
|
|
211
|
+
return obj instanceof Array ? itemFromArray(obj, index, useIndex) : obj;
|
|
212
|
+
}
|
|
213
|
+
export function findItemFromSingleOrMultiple(obj, callback) {
|
|
214
|
+
return obj instanceof Array ? obj.find((t, index) => callback(t, index)) : callback(obj, 0) ? obj : undefined;
|
|
215
|
+
}
|
|
216
|
+
export function initParticleNumericAnimationValue(options, pxRatio) {
|
|
217
|
+
const valueRange = options.value, animationOptions = options.animation;
|
|
218
|
+
const res = {
|
|
219
|
+
enable: options.animation.enable,
|
|
220
|
+
value: getRangeValue(options.value) * pxRatio,
|
|
221
|
+
max: getRangeMax(valueRange) * pxRatio,
|
|
222
|
+
min: getRangeMin(valueRange) * pxRatio,
|
|
223
|
+
loops: 0,
|
|
224
|
+
maxLoops: getRangeValue(options.animation.count),
|
|
225
|
+
};
|
|
226
|
+
if (animationOptions.enable) {
|
|
227
|
+
res.status = "increasing";
|
|
228
|
+
res.decay = 1 - getRangeValue(animationOptions.decay);
|
|
229
|
+
switch (animationOptions.startValue) {
|
|
230
|
+
case "min":
|
|
231
|
+
res.value = res.min;
|
|
232
|
+
res.status = "increasing";
|
|
233
|
+
break;
|
|
234
|
+
case "random":
|
|
235
|
+
res.value = randomInRange(res);
|
|
236
|
+
res.status = getRandom() >= 0.5 ? "increasing" : "decreasing";
|
|
237
|
+
break;
|
|
238
|
+
case "max":
|
|
239
|
+
default:
|
|
240
|
+
res.value = res.max;
|
|
241
|
+
res.status = "decreasing";
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
res.initialValue = res.value;
|
|
246
|
+
return res;
|
|
247
|
+
}
|
package/esm/bundle.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { Engine } from "./engine";
|
|
2
|
+
import { HslColorManager } from "./Utils/HslColorManager";
|
|
3
|
+
import { RgbColorManager } from "./Utils/RgbColorManager";
|
|
4
|
+
import { addColorManager } from "./Utils/ColorUtils";
|
|
5
|
+
const rgbColorManager = new RgbColorManager(), hslColorManager = new HslColorManager();
|
|
6
|
+
addColorManager(rgbColorManager);
|
|
7
|
+
addColorManager(hslColorManager);
|
|
8
|
+
const tsParticles = new Engine();
|
|
9
|
+
export * from "./Core/Utils/Circle";
|
|
10
|
+
export * from "./Core/Utils/Constants";
|
|
11
|
+
export * from "./Core/Utils/ExternalInteractorBase";
|
|
12
|
+
export * from "./Core/Utils/ParticlesInteractorBase";
|
|
13
|
+
export * from "./Core/Utils/Point";
|
|
14
|
+
export * from "./Core/Utils/Range";
|
|
15
|
+
export * from "./Core/Utils/Rectangle";
|
|
16
|
+
export * from "./Core/Utils/Vector";
|
|
17
|
+
export * from "./Core/Utils/Vector3d";
|
|
18
|
+
export * from "./Enums/Directions/MoveDirection";
|
|
19
|
+
export * from "./Enums/Directions/RotateDirection";
|
|
20
|
+
export * from "./Enums/Directions/OutModeDirection";
|
|
21
|
+
export * from "./Enums/Modes/ClickMode";
|
|
22
|
+
export * from "./Enums/Modes/DivMode";
|
|
23
|
+
export * from "./Enums/Modes/HoverMode";
|
|
24
|
+
export * from "./Enums/Modes/CollisionMode";
|
|
25
|
+
export * from "./Enums/Modes/OutMode";
|
|
26
|
+
export * from "./Enums/Modes/SizeMode";
|
|
27
|
+
export * from "./Enums/Modes/ThemeMode";
|
|
28
|
+
export * from "./Enums/Modes/ResponsiveMode";
|
|
29
|
+
export * from "./Enums/Types/AlterType";
|
|
30
|
+
export * from "./Enums/Types/DestroyType";
|
|
31
|
+
export * from "./Enums/Types/GradientType";
|
|
32
|
+
export * from "./Enums/Types/InteractorType";
|
|
33
|
+
export * from "./Enums/Types/ParticleOutType";
|
|
34
|
+
export * from "./Enums/Types/StartValueType";
|
|
35
|
+
export * from "./Enums/Types/DivType";
|
|
36
|
+
export * from "./Enums/Types/EasingType";
|
|
37
|
+
export * from "./Enums/AnimationStatus";
|
|
38
|
+
export * from "./Enums/InteractivityDetect";
|
|
39
|
+
export * from "./Options/Classes/AnimatableColor";
|
|
40
|
+
export * from "./Options/Classes/AnimationOptions";
|
|
41
|
+
export * from "./Options/Classes/Background/Background";
|
|
42
|
+
export * from "./Options/Classes/BackgroundMask/BackgroundMask";
|
|
43
|
+
export * from "./Options/Classes/BackgroundMask/BackgroundMaskCover";
|
|
44
|
+
export * from "./Options/Classes/ColorAnimation";
|
|
45
|
+
export * from "./Options/Classes/FullScreen/FullScreen";
|
|
46
|
+
export * from "./Options/Classes/HslAnimation";
|
|
47
|
+
export * from "./Options/Classes/Interactivity/Events/ClickEvent";
|
|
48
|
+
export * from "./Options/Classes/Interactivity/Events/DivEvent";
|
|
49
|
+
export * from "./Options/Classes/Interactivity/Events/ClickEvent";
|
|
50
|
+
export * from "./Options/Classes/Interactivity/Events/DivEvent";
|
|
51
|
+
export * from "./Options/Classes/Interactivity/Events/Events";
|
|
52
|
+
export * from "./Options/Classes/Interactivity/Events/HoverEvent";
|
|
53
|
+
export * from "./Options/Classes/Interactivity/Events/Parallax";
|
|
54
|
+
export * from "./Options/Classes/Interactivity/Events/ResizeEvent";
|
|
55
|
+
export * from "./Options/Classes/Interactivity/Interactivity";
|
|
56
|
+
export * from "./Options/Classes/Interactivity/Modes/Modes";
|
|
57
|
+
export * from "./Options/Classes/ManualParticle";
|
|
58
|
+
export * from "./Options/Classes/Options";
|
|
59
|
+
export * from "./Options/Classes/OptionsColor";
|
|
60
|
+
export * from "./Options/Classes/Particles/Bounce/ParticlesBounce";
|
|
61
|
+
export * from "./Options/Classes/Particles/Bounce/ParticlesBounceFactor";
|
|
62
|
+
export * from "./Options/Classes/Particles/Collisions/Collisions";
|
|
63
|
+
export * from "./Options/Classes/Particles/Collisions/CollisionsAbsorb";
|
|
64
|
+
export * from "./Options/Classes/Particles/Collisions/CollisionsOverlap";
|
|
65
|
+
export * from "./Options/Classes/Particles/ParticlesOptions";
|
|
66
|
+
export * from "./Options/Classes/Particles/Shadow";
|
|
67
|
+
export * from "./Options/Classes/Particles/Stroke";
|
|
68
|
+
export * from "./Options/Classes/Particles/Move/MoveAttract";
|
|
69
|
+
export * from "./Options/Classes/Particles/Move/Move";
|
|
70
|
+
export * from "./Options/Classes/Particles/Move/MoveAngle";
|
|
71
|
+
export * from "./Options/Classes/Particles/Move/MoveCenter";
|
|
72
|
+
export * from "./Options/Classes/Particles/Move/MoveGravity";
|
|
73
|
+
export * from "./Options/Classes/Particles/Move/MoveTrail";
|
|
74
|
+
export * from "./Options/Classes/Particles/Move/MoveTrailFill";
|
|
75
|
+
export * from "./Options/Classes/Particles/Move/OutModes";
|
|
76
|
+
export * from "./Options/Classes/Particles/Move/Path/MovePath";
|
|
77
|
+
export * from "./Options/Classes/Particles/Move/Spin";
|
|
78
|
+
export * from "./Options/Classes/Particles/Number/ParticlesNumber";
|
|
79
|
+
export * from "./Options/Classes/Particles/Number/ParticlesDensity";
|
|
80
|
+
export * from "./Options/Classes/Particles/Opacity/Opacity";
|
|
81
|
+
export * from "./Options/Classes/Particles/Opacity/OpacityAnimation";
|
|
82
|
+
export * from "./Options/Classes/Particles/Shape/Shape";
|
|
83
|
+
export * from "./Options/Classes/Particles/Size/Size";
|
|
84
|
+
export * from "./Options/Classes/Particles/Size/SizeAnimation";
|
|
85
|
+
export * from "./Options/Classes/Particles/ZIndex/ZIndex";
|
|
86
|
+
export * from "./Options/Classes/Responsive";
|
|
87
|
+
export * from "./Options/Classes/Theme/Theme";
|
|
88
|
+
export * from "./Options/Classes/Theme/ThemeDefault";
|
|
89
|
+
export * from "./Options/Classes/ValueWithRandom";
|
|
90
|
+
export * from "./Utils/CanvasUtils";
|
|
91
|
+
export * from "./Utils/ColorUtils";
|
|
92
|
+
export * from "./Utils/HslColorManager";
|
|
93
|
+
export * from "./Utils/NumberUtils";
|
|
94
|
+
export * from "./Utils/OptionsUtils";
|
|
95
|
+
export * from "./Utils/RgbColorManager";
|
|
96
|
+
export * from "./Utils/Utils";
|
|
97
|
+
export { tsParticles };
|