tsparticles 1.42.2 → 1.43.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/README.md +1 -1
- package/browser/Core/Canvas.js +47 -60
- package/browser/Core/Container.js +15 -9
- package/browser/Core/Interfaces/{IAttract.js → IParticleColorStyle.js} +0 -0
- package/browser/Core/Interfaces/{IBubble.js → IParticlesMover.js} +0 -0
- package/browser/Core/Interfaces/{IParticleGradientAnimation.js → IPositionFromSizeParams.js} +0 -0
- package/browser/Core/Loader.js +26 -10
- package/browser/Core/Particle.js +38 -48
- package/browser/Core/Particles.js +24 -27
- package/browser/Core/Retina.js +4 -13
- package/browser/Core/Utils/Circle.js +20 -13
- package/browser/Core/Utils/CircleWarp.js +19 -7
- package/browser/Core/Utils/EventListeners.js +53 -94
- package/browser/Core/Utils/ExternalInteractorBase.js +11 -0
- package/browser/Core/Utils/FrameManager.js +2 -3
- package/browser/Core/Utils/InteractionManager.js +28 -0
- package/browser/Core/Utils/ParticlesInteractorBase.js +11 -0
- package/browser/Core/Utils/Plugins.js +100 -3
- package/browser/Core/Utils/Point.js +5 -0
- package/browser/Core/Utils/QuadTree.js +58 -27
- package/browser/Core/Utils/Range.js +6 -0
- package/browser/Core/Utils/Rectangle.js +23 -15
- package/browser/Core/Utils/Vector.js +123 -16
- package/browser/Core/Utils/Vector3d.js +85 -5
- package/browser/Interactions/External/Attract/Attractor.js +37 -3
- package/browser/Interactions/External/Bounce/Bouncer.js +8 -6
- package/browser/Interactions/External/Bubble/Bubbler.js +25 -2
- package/browser/Interactions/External/Connect/Connector.js +2 -2
- package/browser/Interactions/External/Grab/Grabber.js +34 -29
- package/browser/Interactions/External/Pause/Pauser.js +31 -0
- package/browser/Interactions/External/Pause/index.js +4 -0
- package/browser/Interactions/External/Push/Pusher.js +35 -0
- package/browser/Interactions/External/Push/index.js +4 -0
- package/browser/Interactions/External/Remove/Remover.js +28 -0
- package/browser/Interactions/External/Remove/index.js +4 -0
- package/browser/Interactions/External/Repulse/Repulser.js +37 -2
- package/browser/Interactions/External/Trail/TrailMaker.js +2 -2
- package/browser/Interactions/Particles/Attract/Attractor.js +2 -2
- package/browser/Interactions/Particles/Collisions/Collider.js +9 -17
- package/browser/Interactions/Particles/Links/LinkInstance.js +37 -55
- package/browser/Interactions/Particles/Links/Linker.js +9 -14
- package/browser/Movers/Base/BaseMover.js +76 -0
- package/browser/{Core/Interfaces/IParticleGradientColorAnimation.js → Movers/Base/IParticleSpin.js} +0 -0
- package/browser/{Core/Interfaces/IRepulse.js → Movers/Base/Types.js} +0 -0
- package/browser/Movers/Base/Utils.js +97 -0
- package/browser/Movers/Base/index.js +4 -0
- package/browser/Movers/Parallax/ParallaxMover.js +31 -0
- package/browser/Movers/Parallax/index.js +4 -0
- package/browser/Options/Classes/AnimatableGradient.js +1 -1
- package/browser/Options/Classes/AnimationOptions.js +1 -1
- package/browser/Options/Classes/ColorAnimation.js +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Trail.js +1 -1
- package/browser/Options/Classes/ManualParticle.js +1 -1
- package/browser/Options/Classes/Options.js +1 -1
- package/browser/Options/Classes/Particles/Destroy/Split.js +1 -1
- package/browser/Options/Classes/Particles/Move/Attract.js +1 -1
- package/browser/Options/Classes/Particles/Move/Move.js +2 -1
- package/browser/Options/Classes/Particles/Move/MoveAngle.js +1 -1
- package/browser/Options/Classes/Particles/Move/MoveGravity.js +1 -1
- package/browser/Options/Classes/Particles/Move/Path/Path.js +1 -1
- package/browser/Options/Classes/Particles/Move/Spin.js +2 -1
- package/browser/Options/Classes/Particles/Opacity/Opacity.js +1 -1
- package/browser/Options/Classes/Particles/Orbit/Orbit.js +1 -1
- package/browser/Options/Classes/Particles/ParticlesOptions.js +1 -1
- package/browser/Options/Classes/Particles/Repulse/Repulse.js +1 -1
- package/browser/Options/Classes/Particles/Roll/Roll.js +1 -1
- package/browser/Options/Classes/Particles/Roll/RollLight.js +1 -1
- package/browser/Options/Classes/Particles/Rotate/RotateAnimation.js +1 -1
- package/browser/Options/Classes/Particles/Shape/Shape.js +1 -1
- package/browser/Options/Classes/Particles/Size/Size.js +1 -1
- package/browser/Options/Classes/Particles/Tilt/TiltAnimation.js +1 -1
- package/browser/Options/Classes/Particles/Twinkle/TwinkleValues.js +1 -1
- package/browser/Options/Classes/Particles/Wobble/Wobble.js +1 -1
- package/browser/Options/Classes/Responsive.js +1 -1
- package/browser/Options/Classes/Theme/Theme.js +1 -1
- package/browser/Options/Classes/ValueWithRandom.js +1 -1
- package/browser/Plugins/Absorbers/AbsorberInstance.js +44 -20
- package/browser/Plugins/Absorbers/Absorbers.js +3 -6
- package/browser/Plugins/Absorbers/Options/Classes/Absorber.js +1 -1
- package/browser/Plugins/Absorbers/index.js +8 -9
- package/browser/Plugins/Emitters/EmitterInstance.js +20 -25
- package/browser/Plugins/Emitters/Emitters.js +3 -6
- package/browser/Plugins/Emitters/Options/Classes/Emitter.js +2 -1
- package/browser/Plugins/Emitters/Options/Classes/EmitterRate.js +1 -1
- package/browser/Plugins/Emitters/Shapes/Circle/CircleShape.js +2 -7
- package/browser/Plugins/Emitters/index.js +4 -1
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMask.js +1 -1
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.js +1 -1
- package/browser/Plugins/PolygonMask/PolygonMaskInstance.js +19 -42
- package/browser/Plugins/PolygonMask/Utils.js +12 -15
- package/browser/Plugins/PolygonMask/index.js +6 -2
- package/browser/Shapes/Image/ImageDrawer.js +61 -20
- package/browser/Shapes/Image/Utils.js +26 -1
- package/browser/Shapes/Image/index.js +4 -0
- package/browser/Shapes/Text/TextDrawer.js +1 -1
- package/browser/Updaters/Angle/AngleUpdater.js +1 -1
- package/browser/Updaters/Color/ColorUpdater.js +2 -1
- package/browser/Updaters/Life/LifeUpdater.js +1 -1
- package/browser/Updaters/Opacity/OpacityUpdater.js +1 -1
- package/browser/Updaters/OutModes/OutOfCanvasUpdater.js +1 -1
- package/browser/Updaters/OutModes/Utils.js +1 -1
- package/browser/Updaters/Roll/RollUpdater.js +2 -1
- package/browser/Updaters/Size/SizeUpdater.js +1 -1
- package/browser/Updaters/StrokeColor/StrokeColorUpdater.js +3 -1
- package/browser/Updaters/Tilt/TiltUpdater.js +1 -1
- package/browser/Updaters/Twinkle/TwinkleUpdater.js +19 -0
- package/browser/Updaters/Twinkle/index.js +4 -0
- package/browser/Updaters/Wobble/WobbleUpdater.js +26 -1
- package/browser/Utils/CanvasUtils.js +163 -57
- package/browser/Utils/ColorUtils.js +100 -31
- package/browser/Utils/NumberUtils.js +73 -7
- package/browser/Utils/Utils.js +136 -55
- package/browser/engine.js +16 -1
- package/browser/full.js +7 -1
- package/browser/index.engine.js +104 -6
- package/browser/index.js +112 -8
- package/browser/index.slim.js +103 -6
- package/browser/pjs.js +6 -2
- package/browser/slim.js +14 -0
- package/cjs/Core/Canvas.js +306 -0
- package/cjs/Core/Container.js +401 -0
- package/{Core → cjs/Core}/Interfaces/Colors.js +0 -0
- package/{Core → cjs/Core}/Interfaces/Gradients.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IBounds.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IBubbleParticleData.js +0 -0
- package/{Core → cjs/Core}/Interfaces/ICircleBouncer.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IContainerInteractivity.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IContainerPlugin.js +0 -0
- package/{Core → cjs/Core}/Interfaces/ICoordinates.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IDelta.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IDimension.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IDistance.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IExternalInteractor.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IInteractor.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IMouseData.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IMovePathGenerator.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IParticle.js +0 -0
- package/{Core/Interfaces/IAttract.js → cjs/Core/Interfaces/IParticleColorStyle.js} +0 -0
- package/{Core → cjs/Core}/Interfaces/IParticleGravity.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IParticleHslAnimation.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IParticleLife.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IParticleLoops.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IParticleRetinaProps.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IParticleRoll.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IParticleSpin.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IParticleUpdater.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IParticleValueAnimation.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IParticleWobble.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IParticlesFrequencies.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IParticlesInteractor.js +0 -0
- package/{Core/Interfaces/IBubble.js → cjs/Core/Interfaces/IParticlesMover.js} +0 -0
- package/{Core → cjs/Core}/Interfaces/IPlugin.js +0 -0
- package/{Core/Interfaces/IParticleGradientAnimation.js → cjs/Core/Interfaces/IPositionFromSizeParams.js} +0 -0
- package/{Core → cjs/Core}/Interfaces/IRangeValue.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IRectSideResult.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IShapeDrawer.js +0 -0
- package/{Core → cjs/Core}/Interfaces/IShapeValues.js +0 -0
- package/cjs/Core/Loader.js +179 -0
- package/cjs/Core/Particle.js +367 -0
- package/cjs/Core/Particles.js +320 -0
- package/cjs/Core/Retina.js +88 -0
- package/cjs/Core/Utils/Circle.js +33 -0
- package/cjs/Core/Utils/CircleWarp.js +55 -0
- package/{Core → cjs/Core}/Utils/Constants.js +0 -0
- package/cjs/Core/Utils/EventListeners.js +302 -0
- package/{Core → cjs/Core}/Utils/ExternalInteractorBase.js +0 -0
- package/cjs/Core/Utils/FrameManager.js +42 -0
- package/cjs/Core/Utils/InteractionManager.js +66 -0
- package/{Core → cjs/Core}/Utils/ParticlesInteractorBase.js +0 -0
- package/cjs/Core/Utils/Plugins.js +111 -0
- package/{Core → cjs/Core}/Utils/Point.js +0 -0
- package/cjs/Core/Utils/QuadTree.js +71 -0
- package/{Core → cjs/Core}/Utils/Range.js +0 -0
- package/cjs/Core/Utils/Rectangle.js +29 -0
- package/cjs/Core/Utils/Vector.js +94 -0
- package/cjs/Core/Utils/Vector3d.js +70 -0
- package/{Enums → cjs/Enums}/AnimationStatus.js +0 -0
- package/{Enums → cjs/Enums}/Directions/MoveDirection.js +0 -0
- package/{Enums → cjs/Enums}/Directions/OutModeDirection.js +0 -0
- package/{Enums → cjs/Enums}/Directions/RotateDirection.js +0 -0
- package/{Enums → cjs/Enums}/Directions/TiltDirection.js +0 -0
- package/{Enums → cjs/Enums}/InteractivityDetect.js +0 -0
- package/{Enums → cjs/Enums}/Modes/ClickMode.js +0 -0
- package/{Enums → cjs/Enums}/Modes/CollisionMode.js +0 -0
- package/{Enums → cjs/Enums}/Modes/DestroyMode.js +0 -0
- package/{Enums → cjs/Enums}/Modes/DivMode.js +0 -0
- package/{Enums → cjs/Enums}/Modes/HoverMode.js +0 -0
- package/{Enums → cjs/Enums}/Modes/OutMode.js +0 -0
- package/{Enums → cjs/Enums}/Modes/ResponsiveMode.js +0 -0
- package/{Enums → cjs/Enums}/Modes/RollMode.js +0 -0
- package/{Enums → cjs/Enums}/Modes/SizeMode.js +0 -0
- package/{Enums → cjs/Enums}/Modes/ThemeMode.js +0 -0
- package/{Enums → cjs/Enums}/Types/AlterType.js +0 -0
- package/{Enums → cjs/Enums}/Types/DestroyType.js +0 -0
- package/{Enums → cjs/Enums}/Types/DivType.js +0 -0
- package/{Enums → cjs/Enums}/Types/EasingType.js +0 -0
- package/{Enums → cjs/Enums}/Types/GradientType.js +0 -0
- package/{Enums → cjs/Enums}/Types/InteractorType.js +0 -0
- package/{Enums → cjs/Enums}/Types/ShapeType.js +0 -0
- package/{Enums → cjs/Enums}/Types/StartValueType.js +0 -0
- package/cjs/Interactions/External/Attract/Attractor.js +109 -0
- package/{Interactions → cjs/Interactions}/External/Attract/index.js +0 -0
- package/cjs/Interactions/External/Bounce/Bouncer.js +69 -0
- package/{Interactions → cjs/Interactions}/External/Bounce/index.js +0 -0
- package/cjs/Interactions/External/Bubble/Bubbler.js +274 -0
- package/{Interactions → cjs/Interactions}/External/Bubble/IBubblerProcessParam.js +0 -0
- package/{Interactions → cjs/Interactions}/External/Bubble/ProcessBubbleType.js +0 -0
- package/{Interactions → cjs/Interactions}/External/Bubble/index.js +0 -0
- package/cjs/Interactions/External/Connect/Connector.js +41 -0
- package/{Interactions → cjs/Interactions}/External/Connect/index.js +0 -0
- package/cjs/Interactions/External/Grab/Grabber.js +52 -0
- package/{Interactions → cjs/Interactions}/External/Grab/index.js +0 -0
- package/cjs/Interactions/External/Pause/Pauser.js +29 -0
- package/cjs/Interactions/External/Pause/index.js +8 -0
- package/cjs/Interactions/External/Push/Pusher.js +33 -0
- package/cjs/Interactions/External/Push/index.js +8 -0
- package/cjs/Interactions/External/Remove/Remover.js +26 -0
- package/cjs/Interactions/External/Remove/index.js +8 -0
- package/cjs/Interactions/External/Repulse/Repulser.js +133 -0
- package/{Interactions → cjs/Interactions}/External/Repulse/index.js +0 -0
- package/cjs/Interactions/External/Trail/TrailMaker.js +53 -0
- package/{Interactions → cjs/Interactions}/External/Trail/index.js +0 -0
- package/cjs/Interactions/Particles/Attract/Attractor.js +30 -0
- package/{Interactions → cjs/Interactions}/Particles/Attract/index.js +0 -0
- package/cjs/Interactions/Particles/Collisions/Collider.js +101 -0
- package/{Interactions → cjs/Interactions}/Particles/Collisions/index.js +0 -0
- package/{Interactions → cjs/Interactions}/Particles/Links/ILink.js +0 -0
- package/cjs/Interactions/Particles/Links/LinkInstance.js +106 -0
- package/{Interactions → cjs/Interactions}/Particles/Links/LinkParticle.js +0 -0
- package/cjs/Interactions/Particles/Links/Linker.js +100 -0
- package/{Interactions → cjs/Interactions}/Particles/Links/index.js +0 -0
- package/{Interactions → cjs/Interactions}/Particles/Links/interaction.js +0 -0
- package/{Interactions → cjs/Interactions}/Particles/Links/plugin.js +0 -0
- package/cjs/Movers/Base/BaseMover.js +80 -0
- package/{Core/Interfaces/IParticleGradientColorAnimation.js → cjs/Movers/Base/IParticleSpin.js} +0 -0
- package/{Core/Interfaces/IRepulse.js → cjs/Movers/Base/Types.js} +0 -0
- package/cjs/Movers/Base/Utils.js +104 -0
- package/cjs/Movers/Base/index.js +8 -0
- package/cjs/Movers/Parallax/ParallaxMover.js +33 -0
- package/cjs/Movers/Parallax/index.js +8 -0
- package/{Options → cjs/Options}/Classes/AnimatableColor.js +0 -0
- package/cjs/Options/Classes/AnimatableGradient.js +146 -0
- package/cjs/Options/Classes/AnimationOptions.js +30 -0
- package/{Options → cjs/Options}/Classes/Background/Background.js +0 -0
- package/{Options → cjs/Options}/Classes/BackgroundMask/BackgroundMask.js +0 -0
- package/{Options → cjs/Options}/Classes/BackgroundMask/BackgroundMaskCover.js +0 -0
- package/cjs/Options/Classes/ColorAnimation.js +34 -0
- package/{Options → cjs/Options}/Classes/FullScreen/FullScreen.js +0 -0
- package/{Options → cjs/Options}/Classes/HslAnimation.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Events/ClickEvent.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Events/DivEvent.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Events/Events.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Events/HoverEvent.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Events/Parallax.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Interactivity.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/Attract.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/Bounce.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/Bubble.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/BubbleBase.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/BubbleDiv.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/Connect.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/ConnectLinks.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/Grab.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/GrabLinks.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/Light.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/LightArea.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/LightGradient.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/LightShadow.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/Modes.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/Push.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/Remove.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/Repulse.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/RepulseBase.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/RepulseDiv.js +0 -0
- package/{Options → cjs/Options}/Classes/Interactivity/Modes/Slow.js +0 -0
- package/cjs/Options/Classes/Interactivity/Modes/Trail.js +29 -0
- package/cjs/Options/Classes/ManualParticle.js +22 -0
- package/{Options → cjs/Options}/Classes/Motion/Motion.js +0 -0
- package/{Options → cjs/Options}/Classes/Motion/MotionReduce.js +0 -0
- package/cjs/Options/Classes/Options.js +174 -0
- package/{Options → cjs/Options}/Classes/OptionsColor.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Bounce/Bounce.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Bounce/BounceFactor.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Collisions/Collisions.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Collisions/CollisionsOverlap.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Destroy/Destroy.js +0 -0
- package/cjs/Options/Classes/Particles/Destroy/Split.js +31 -0
- package/{Options → cjs/Options}/Classes/Particles/Destroy/SplitFactor.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Destroy/SplitRate.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Life/Life.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Life/LifeDelay.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Life/LifeDuration.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Links/Links.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Links/LinksShadow.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Links/LinksTriangle.js +0 -0
- package/cjs/Options/Classes/Particles/Move/Attract.js +47 -0
- package/cjs/Options/Classes/Particles/Move/Move.js +133 -0
- package/cjs/Options/Classes/Particles/Move/MoveAngle.js +22 -0
- package/cjs/Options/Classes/Particles/Move/MoveGravity.js +30 -0
- package/{Options → cjs/Options}/Classes/Particles/Move/OutModes.js +0 -0
- package/cjs/Options/Classes/Particles/Move/Path/Path.js +30 -0
- package/{Options → cjs/Options}/Classes/Particles/Move/Path/PathDelay.js +0 -0
- package/cjs/Options/Classes/Particles/Move/Spin.js +24 -0
- package/{Options → cjs/Options}/Classes/Particles/Move/Trail.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Number/Density.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Number/ParticlesNumber.js +0 -0
- package/cjs/Options/Classes/Particles/Opacity/Opacity.js +33 -0
- package/{Options → cjs/Options}/Classes/Particles/Opacity/OpacityAnimation.js +0 -0
- package/cjs/Options/Classes/Particles/Orbit/Orbit.js +39 -0
- package/{Options → cjs/Options}/Classes/Particles/Orbit/OrbitRotation.js +0 -0
- package/cjs/Options/Classes/Particles/ParticlesOptions.js +143 -0
- package/cjs/Options/Classes/Particles/Repulse/Repulse.js +37 -0
- package/cjs/Options/Classes/Particles/Roll/Roll.js +35 -0
- package/cjs/Options/Classes/Particles/Roll/RollLight.js +22 -0
- package/{Options → cjs/Options}/Classes/Particles/Rotate/Rotate.js +0 -0
- package/cjs/Options/Classes/Particles/Rotate/RotateAnimation.js +26 -0
- package/{Options → cjs/Options}/Classes/Particles/Shadow.js +0 -0
- package/cjs/Options/Classes/Particles/Shape/Shape.js +103 -0
- package/cjs/Options/Classes/Particles/Size/Size.js +33 -0
- package/{Options → cjs/Options}/Classes/Particles/Size/SizeAnimation.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Stroke.js +0 -0
- package/{Options → cjs/Options}/Classes/Particles/Tilt/Tilt.js +0 -0
- package/cjs/Options/Classes/Particles/Tilt/TiltAnimation.js +26 -0
- package/{Options → cjs/Options}/Classes/Particles/Twinkle/Twinkle.js +0 -0
- package/cjs/Options/Classes/Particles/Twinkle/TwinkleValues.js +30 -0
- package/cjs/Options/Classes/Particles/Wobble/Wobble.js +26 -0
- package/{Options → cjs/Options}/Classes/Particles/ZIndex/ZIndex.js +0 -0
- package/{Options → cjs/Options}/Classes/Random.js +0 -0
- package/cjs/Options/Classes/Responsive.js +31 -0
- package/cjs/Options/Classes/Theme/Theme.js +24 -0
- package/{Options → cjs/Options}/Classes/Theme/ThemeDefault.js +0 -0
- package/cjs/Options/Classes/ValueWithRandom.js +26 -0
- package/{Options → cjs/Options}/Interfaces/Background/IBackground.js +0 -0
- package/{Options → cjs/Options}/Interfaces/BackgroundMask/IBackgroundMask.js +0 -0
- package/{Options → cjs/Options}/Interfaces/BackgroundMask/IBackgroundMaskCover.js +0 -0
- package/{Options → cjs/Options}/Interfaces/FullScreen/IFullScreen.js +0 -0
- package/{Options → cjs/Options}/Interfaces/IAnimatable.js +0 -0
- package/{Options → cjs/Options}/Interfaces/IAnimatableColor.js +0 -0
- package/{Options → cjs/Options}/Interfaces/IAnimatableGradient.js +0 -0
- package/{Options → cjs/Options}/Interfaces/IAnimation.js +0 -0
- package/{Options → cjs/Options}/Interfaces/IColorAnimation.js +0 -0
- package/{Options → cjs/Options}/Interfaces/IHslAnimation.js +0 -0
- package/{Options → cjs/Options}/Interfaces/IManualParticle.js +0 -0
- package/{Options → cjs/Options}/Interfaces/IOptionLoader.js +0 -0
- package/{Options → cjs/Options}/Interfaces/IOptions.js +0 -0
- package/{Options → cjs/Options}/Interfaces/IOptionsColor.js +0 -0
- package/{Options → cjs/Options}/Interfaces/IOptionsGradient.js +0 -0
- package/{Options → cjs/Options}/Interfaces/IRandom.js +0 -0
- package/{Options → cjs/Options}/Interfaces/IResponsive.js +0 -0
- package/{Options → cjs/Options}/Interfaces/IValueWithRandom.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Events/IClickEvent.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Events/IDivEvent.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Events/IEvents.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Events/IHoverEvent.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Events/IParallax.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/IInteractivity.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IAttract.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IBounce.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IBubble.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IBubbleBase.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IBubbleDiv.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IConnect.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IConnectLinks.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IGrab.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IGrabLinks.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/ILight.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/ILightArea.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/ILightShadow.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IModeDiv.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IModes.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IPush.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IRemove.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IRepulse.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IRepulseBase.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/IRepulseDiv.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/ISlow.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Interactivity/Modes/ITrail.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Motion/IMotion.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Motion/IMotionReduce.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Bounce/IBounce.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Collisions/ICollisions.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Collisions/ICollisionsOverlap.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Destroy/IDestroy.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Destroy/ISplit.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/IParticles.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/IShadow.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/IStroke.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Life/ILife.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Life/ILifeDelay.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Life/ILifeDuration.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Links/ILinks.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Links/ILinksShadow.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Links/ILinksTriangle.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Move/IAttract.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Move/IMove.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Move/IMoveAngle.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Move/IMoveGravity.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Move/IOutModes.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Move/ISpin.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Move/ITrail.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Move/Path/IPath.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Number/IDensity.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Number/IParticlesNumber.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Opacity/IOpacity.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Opacity/IOpacityAnimation.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Orbit/IOrbit.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Repulse/IRepulse.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Roll/IRoll.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Roll/IRollLight.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Rotate/IRotate.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Rotate/IRotateAnimation.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Shape/ICharacterShape.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Shape/IImageShape.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Shape/IPolygonShape.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Shape/IShape.js +0 -0
- package/cjs/Options/Interfaces/Particles/Shape/IShapeValues.js +17 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Shape/IStarShape.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Size/ISize.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Size/ISizeAnimation.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Tilt/ITilt.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Tilt/ITiltAnimation.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Twinkle/ITwinkle.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Twinkle/ITwinkleValues.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/Wobble/IWobble.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Particles/ZIndex/IZIndex.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Theme/ITheme.js +0 -0
- package/{Options → cjs/Options}/Interfaces/Theme/IThemeDefault.js +0 -0
- package/{Plugins → cjs/Plugins}/Absorbers/AbsorberContainer.js +0 -0
- package/cjs/Plugins/Absorbers/AbsorberInstance.js +158 -0
- package/cjs/Plugins/Absorbers/Absorbers.js +115 -0
- package/{Plugins → cjs/Plugins}/Absorbers/Enums/AbsorberClickMode.js +0 -0
- package/cjs/Plugins/Absorbers/Options/Classes/Absorber.js +51 -0
- package/{Plugins → cjs/Plugins}/Absorbers/Options/Classes/AbsorberSize.js +0 -0
- package/{Plugins → cjs/Plugins}/Absorbers/Options/Classes/AbsorberSizeLimit.js +0 -0
- package/{Plugins → cjs/Plugins}/Absorbers/Options/Interfaces/IAbsorber.js +0 -0
- package/{Plugins → cjs/Plugins}/Absorbers/Options/Interfaces/IAbsorberOptions.js +0 -0
- package/{Plugins → cjs/Plugins}/Absorbers/Options/Interfaces/IAbsorberSize.js +0 -0
- package/{Plugins → cjs/Plugins}/Absorbers/Options/Interfaces/IAbsorberSizeLimit.js +0 -0
- package/cjs/Plugins/Absorbers/index.js +93 -0
- package/{Plugins → cjs/Plugins}/Emitters/EmitterContainer.js +0 -0
- package/cjs/Plugins/Emitters/EmitterInstance.js +264 -0
- package/cjs/Plugins/Emitters/Emitters.js +150 -0
- package/{Plugins → cjs/Plugins}/Emitters/EmittersEngine.js +0 -0
- package/{Plugins → cjs/Plugins}/Emitters/Enums/EmitterClickMode.js +0 -0
- package/{Plugins → cjs/Plugins}/Emitters/Enums/EmitterShapeType.js +0 -0
- package/{Plugins → cjs/Plugins}/Emitters/IEmitterShape.js +0 -0
- package/cjs/Plugins/Emitters/Options/Classes/Emitter.js +68 -0
- package/{Plugins → cjs/Plugins}/Emitters/Options/Classes/EmitterLife.js +0 -0
- package/cjs/Plugins/Emitters/Options/Classes/EmitterRate.js +22 -0
- package/{Plugins → cjs/Plugins}/Emitters/Options/Classes/EmitterSize.js +0 -0
- package/{Plugins → cjs/Plugins}/Emitters/Options/Interfaces/IEmitter.js +0 -0
- package/{Plugins → cjs/Plugins}/Emitters/Options/Interfaces/IEmitterLife.js +0 -0
- package/{Plugins → cjs/Plugins}/Emitters/Options/Interfaces/IEmitterOptions.js +0 -0
- package/{Plugins → cjs/Plugins}/Emitters/Options/Interfaces/IEmitterRate.js +0 -0
- package/{Plugins → cjs/Plugins}/Emitters/Options/Interfaces/IEmitterSize.js +0 -0
- package/{Plugins → cjs/Plugins}/Emitters/ShapeManager.js +0 -0
- package/cjs/Plugins/Emitters/Shapes/Circle/CircleShape.js +27 -0
- package/{Plugins → cjs/Plugins}/Emitters/Shapes/Square/SquareShape.js +0 -0
- package/cjs/Plugins/Emitters/index.js +117 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Enums/PolygonMaskInlineArrangement.js +0 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Enums/PolygonMaskMoveType.js +0 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Enums/PolygonMaskType.js +0 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Interfaces/ISvgPath.js +0 -0
- package/cjs/Plugins/PolygonMask/Options/Classes/PolygonMask.js +66 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Options/Classes/PolygonMaskDraw.js +0 -0
- package/cjs/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.js +29 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Options/Classes/PolygonMaskInline.js +0 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Options/Classes/PolygonMaskLocalSvg.js +0 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Options/Classes/PolygonMaskMove.js +0 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Options/Interfaces/IPolygonMask.js +0 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Options/Interfaces/IPolygonMaskDraw.js +0 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Options/Interfaces/IPolygonMaskDrawStroke.js +0 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Options/Interfaces/IPolygonMaskInline.js +0 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.js +0 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Options/Interfaces/IPolygonMaskMove.js +0 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Options/Interfaces/IPolygonMaskOptions.js +0 -0
- package/cjs/Plugins/PolygonMask/PolygonMaskInstance.js +363 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/Types.js +0 -0
- package/cjs/Plugins/PolygonMask/Utils.js +117 -0
- package/cjs/Plugins/PolygonMask/index.js +67 -0
- package/{Plugins → cjs/Plugins}/PolygonMask/pathseg.js +0 -0
- package/{Shapes → cjs/Shapes}/Circle/CircleDrawer.js +0 -0
- package/{Shapes → cjs/Shapes}/Circle/index.js +0 -0
- package/cjs/Shapes/Image/ImageDrawer.js +132 -0
- package/cjs/Shapes/Image/Utils.js +89 -0
- package/{Shapes → cjs/Shapes}/Image/index.js +0 -0
- package/{Shapes → cjs/Shapes}/Line/LineDrawer.js +0 -0
- package/{Shapes → cjs/Shapes}/Line/index.js +0 -0
- package/{Shapes → cjs/Shapes}/Polygon/PolygonDrawer.js +0 -0
- package/{Shapes → cjs/Shapes}/Polygon/PolygonDrawerBase.js +0 -0
- package/{Shapes → cjs/Shapes}/Polygon/TriangleDrawer.js +0 -0
- package/{Shapes → cjs/Shapes}/Polygon/index.js +0 -0
- package/{Shapes → cjs/Shapes}/Square/SquareDrawer.js +0 -0
- package/{Shapes → cjs/Shapes}/Square/index.js +0 -0
- package/{Shapes → cjs/Shapes}/Star/StarDrawer.js +0 -0
- package/{Shapes → cjs/Shapes}/Star/index.js +0 -0
- package/cjs/Shapes/Text/TextDrawer.js +65 -0
- package/{Shapes → cjs/Shapes}/Text/index.js +0 -0
- package/{Types → cjs/Types}/ParticlesGroups.js +0 -0
- package/{Types → cjs/Types}/PathOptions.js +0 -0
- package/{Types → cjs/Types}/RangeValue.js +0 -0
- package/{Types → cjs/Types}/RecursivePartial.js +0 -0
- package/{Types → cjs/Types}/ShapeData.js +0 -0
- package/{Types → cjs/Types}/ShapeDrawerFunctions.js +0 -0
- package/{Types → cjs/Types}/SingleOrMultiple.js +0 -0
- package/cjs/Updaters/Angle/AngleUpdater.js +79 -0
- package/{Updaters → cjs/Updaters}/Angle/index.js +0 -0
- package/cjs/Updaters/Color/ColorUpdater.js +68 -0
- package/{Updaters → cjs/Updaters}/Color/index.js +0 -0
- package/cjs/Updaters/Life/LifeUpdater.js +67 -0
- package/{Updaters → cjs/Updaters}/Life/index.js +0 -0
- package/cjs/Updaters/Opacity/OpacityUpdater.js +122 -0
- package/{Updaters → cjs/Updaters}/Opacity/index.js +0 -0
- package/{Updaters → cjs/Updaters}/OutModes/IBounceData.js +0 -0
- package/cjs/Updaters/OutModes/OutOfCanvasUpdater.js +146 -0
- package/cjs/Updaters/OutModes/Utils.js +65 -0
- package/{Updaters → cjs/Updaters}/OutModes/index.js +0 -0
- package/cjs/Updaters/Roll/RollUpdater.js +64 -0
- package/{Updaters → cjs/Updaters}/Roll/index.js +0 -0
- package/cjs/Updaters/Size/SizeUpdater.js +77 -0
- package/{Updaters → cjs/Updaters}/Size/index.js +0 -0
- package/cjs/Updaters/StrokeColor/StrokeColorUpdater.js +86 -0
- package/{Updaters → cjs/Updaters}/StrokeColor/index.js +0 -0
- package/cjs/Updaters/Tilt/TiltUpdater.js +79 -0
- package/{Updaters → cjs/Updaters}/Tilt/index.js +0 -0
- package/cjs/Updaters/Twinkle/TwinkleUpdater.js +21 -0
- package/cjs/Updaters/Twinkle/index.js +8 -0
- package/cjs/Updaters/Wobble/WobbleUpdater.js +51 -0
- package/{Updaters → cjs/Updaters}/Wobble/index.js +0 -0
- package/cjs/Utils/CanvasUtils.js +256 -0
- package/cjs/Utils/ColorUtils.js +460 -0
- package/cjs/Utils/NumberUtils.js +174 -0
- package/cjs/Utils/Utils.js +252 -0
- package/cjs/engine.js +103 -0
- package/cjs/full.js +24 -0
- package/cjs/index.engine.js +119 -0
- package/cjs/index.js +133 -0
- package/cjs/index.slim.js +121 -0
- package/{pjs.js → cjs/pjs.js} +0 -0
- package/cjs/slim.js +62 -0
- package/esm/Core/Canvas.js +47 -60
- package/esm/Core/Container.js +15 -9
- package/{browser/Enums/Types/OrbitType.js → esm/Core/Interfaces/IParticleColorStyle.js} +0 -0
- package/esm/Core/Interfaces/{IAttract.js → IParticlesMover.js} +0 -0
- package/esm/Core/Interfaces/{IBubble.js → IPositionFromSizeParams.js} +0 -0
- package/esm/Core/Loader.js +6 -10
- package/esm/Core/Particle.js +29 -48
- package/esm/Core/Particles.js +24 -26
- package/esm/Core/Retina.js +4 -13
- package/esm/Core/Utils/Circle.js +4 -13
- package/esm/Core/Utils/CircleWarp.js +2 -7
- package/esm/Core/Utils/EventListeners.js +23 -94
- package/esm/Core/Utils/FrameManager.js +1 -2
- package/esm/Core/Utils/InteractionManager.js +7 -0
- package/esm/Core/Utils/Plugins.js +16 -3
- package/esm/Core/Utils/QuadTree.js +20 -27
- package/esm/Core/Utils/Rectangle.js +6 -15
- package/esm/Core/Utils/Vector.js +13 -15
- package/esm/Core/Utils/Vector3d.js +17 -5
- package/esm/Interactions/External/Attract/Attractor.js +36 -2
- package/esm/Interactions/External/Bounce/Bouncer.js +8 -6
- package/esm/Interactions/External/Bubble/Bubbler.js +25 -2
- package/esm/Interactions/External/Connect/Connector.js +2 -2
- package/esm/Interactions/External/Grab/Grabber.js +30 -25
- package/esm/Interactions/External/Pause/Pauser.js +25 -0
- package/esm/Interactions/External/Pause/index.js +4 -0
- package/esm/Interactions/External/Push/Pusher.js +29 -0
- package/esm/Interactions/External/Push/index.js +4 -0
- package/esm/Interactions/External/Remove/Remover.js +22 -0
- package/esm/Interactions/External/Remove/index.js +4 -0
- package/esm/Interactions/External/Repulse/Repulser.js +37 -2
- package/esm/Interactions/External/Trail/TrailMaker.js +2 -2
- package/esm/Interactions/Particles/Attract/Attractor.js +2 -2
- package/esm/Interactions/Particles/Collisions/Collider.js +9 -17
- package/esm/Interactions/Particles/Links/LinkInstance.js +37 -55
- package/esm/Interactions/Particles/Links/Linker.js +9 -14
- package/esm/Movers/Base/BaseMover.js +76 -0
- package/esm/{Core/Interfaces/IParticleGradientAnimation.js → Movers/Base/IParticleSpin.js} +0 -0
- package/esm/{Core/Interfaces/IParticleGradientColorAnimation.js → Movers/Base/Types.js} +0 -0
- package/esm/Movers/Base/Utils.js +97 -0
- package/esm/Movers/Base/index.js +4 -0
- package/esm/Movers/Parallax/ParallaxMover.js +29 -0
- package/esm/Movers/Parallax/index.js +4 -0
- package/esm/Options/Classes/AnimatableGradient.js +1 -1
- package/esm/Options/Classes/AnimationOptions.js +1 -1
- package/esm/Options/Classes/ColorAnimation.js +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Trail.js +1 -1
- package/esm/Options/Classes/ManualParticle.js +1 -1
- package/esm/Options/Classes/Options.js +1 -1
- package/esm/Options/Classes/Particles/Destroy/Split.js +1 -1
- package/esm/Options/Classes/Particles/Move/Attract.js +1 -1
- package/esm/Options/Classes/Particles/Move/Move.js +2 -1
- package/esm/Options/Classes/Particles/Move/MoveAngle.js +1 -1
- package/esm/Options/Classes/Particles/Move/MoveGravity.js +1 -1
- package/esm/Options/Classes/Particles/Move/Path/Path.js +1 -1
- package/esm/Options/Classes/Particles/Move/Spin.js +2 -1
- package/esm/Options/Classes/Particles/Opacity/Opacity.js +1 -1
- package/esm/Options/Classes/Particles/Orbit/Orbit.js +1 -1
- package/esm/Options/Classes/Particles/ParticlesOptions.js +1 -1
- package/esm/Options/Classes/Particles/Repulse/Repulse.js +1 -1
- package/esm/Options/Classes/Particles/Roll/Roll.js +1 -1
- package/esm/Options/Classes/Particles/Roll/RollLight.js +1 -1
- package/esm/Options/Classes/Particles/Rotate/RotateAnimation.js +1 -1
- package/esm/Options/Classes/Particles/Shape/Shape.js +1 -1
- package/esm/Options/Classes/Particles/Size/Size.js +1 -1
- package/esm/Options/Classes/Particles/Tilt/TiltAnimation.js +1 -1
- package/esm/Options/Classes/Particles/Twinkle/TwinkleValues.js +1 -1
- package/esm/Options/Classes/Particles/Wobble/Wobble.js +1 -1
- package/esm/Options/Classes/Responsive.js +1 -1
- package/esm/Options/Classes/Theme/Theme.js +1 -1
- package/esm/Options/Classes/ValueWithRandom.js +1 -1
- package/esm/Plugins/Absorbers/AbsorberInstance.js +16 -20
- package/esm/Plugins/Absorbers/Absorbers.js +3 -6
- package/esm/Plugins/Absorbers/Options/Classes/Absorber.js +1 -1
- package/esm/Plugins/Absorbers/index.js +8 -9
- package/esm/Plugins/Emitters/EmitterInstance.js +20 -25
- package/esm/Plugins/Emitters/Emitters.js +3 -6
- package/esm/Plugins/Emitters/Options/Classes/Emitter.js +2 -1
- package/esm/Plugins/Emitters/Options/Classes/EmitterRate.js +1 -1
- package/esm/Plugins/Emitters/Shapes/Circle/CircleShape.js +2 -7
- package/esm/Plugins/Emitters/index.js +4 -1
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMask.js +1 -1
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.js +1 -1
- package/esm/Plugins/PolygonMask/PolygonMaskInstance.js +19 -42
- package/esm/Plugins/PolygonMask/Utils.js +6 -13
- package/esm/Plugins/PolygonMask/index.js +6 -2
- package/esm/Shapes/Image/ImageDrawer.js +20 -20
- package/esm/Shapes/Image/Utils.js +1 -1
- package/esm/Shapes/Text/TextDrawer.js +1 -1
- package/esm/Updaters/Angle/AngleUpdater.js +1 -1
- package/esm/Updaters/Color/ColorUpdater.js +2 -1
- package/esm/Updaters/Life/LifeUpdater.js +1 -1
- package/esm/Updaters/Opacity/OpacityUpdater.js +1 -1
- package/esm/Updaters/OutModes/OutOfCanvasUpdater.js +1 -1
- package/esm/Updaters/OutModes/Utils.js +1 -1
- package/esm/Updaters/Roll/RollUpdater.js +2 -1
- package/esm/Updaters/Size/SizeUpdater.js +1 -1
- package/esm/Updaters/StrokeColor/StrokeColorUpdater.js +3 -1
- package/esm/Updaters/Tilt/TiltUpdater.js +1 -1
- package/esm/Updaters/Twinkle/TwinkleUpdater.js +17 -0
- package/esm/Updaters/Twinkle/index.js +4 -0
- package/esm/Updaters/Wobble/WobbleUpdater.js +1 -1
- package/esm/Utils/CanvasUtils.js +26 -57
- package/esm/Utils/ColorUtils.js +13 -29
- package/esm/Utils/NumberUtils.js +48 -7
- package/esm/Utils/Utils.js +30 -47
- package/esm/engine.js +6 -1
- package/esm/full.js +3 -1
- package/esm/index.engine.js +93 -5
- package/esm/index.js +101 -8
- package/esm/index.slim.js +92 -5
- package/esm/slim.js +10 -0
- package/package.json +252 -4
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/tsparticles.engine.js +1153 -1460
- package/tsparticles.engine.min.js +2 -2
- package/tsparticles.interaction.external.attract.js +297 -4974
- package/tsparticles.interaction.external.attract.min.js +2 -2
- package/tsparticles.interaction.external.bounce.js +263 -4988
- package/tsparticles.interaction.external.bounce.min.js +2 -2
- package/tsparticles.interaction.external.bubble.js +247 -4546
- package/tsparticles.interaction.external.bubble.min.js +2 -2
- package/tsparticles.interaction.external.connect.js +42 -4968
- package/tsparticles.interaction.external.connect.min.js +2 -2
- package/tsparticles.interaction.external.grab.js +174 -4507
- package/tsparticles.interaction.external.grab.min.js +2 -2
- package/tsparticles.interaction.external.repulse.js +264 -4949
- package/tsparticles.interaction.external.repulse.min.js +2 -2
- package/tsparticles.interaction.external.trail.js +42 -4968
- package/tsparticles.interaction.external.trail.min.js +2 -2
- package/tsparticles.interaction.particles.attract.js +60 -5019
- package/tsparticles.interaction.particles.attract.min.js +2 -2
- package/tsparticles.interaction.particles.collisions.js +149 -4919
- package/tsparticles.interaction.particles.collisions.min.js +2 -2
- package/tsparticles.interaction.particles.links.js +415 -4462
- package/tsparticles.interaction.particles.links.min.js +2 -2
- package/tsparticles.js +1662 -1672
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.min.js +1 -1
- package/tsparticles.plugins.absorbers.js +347 -4676
- package/tsparticles.plugins.absorbers.min.js +2 -2
- package/tsparticles.plugins.emitters.js +424 -4696
- package/tsparticles.plugins.emitters.min.js +2 -2
- package/tsparticles.plugins.polygonMask.js +263 -4633
- package/tsparticles.plugins.polygonMask.min.js +2 -2
- package/tsparticles.shape.circle.min.js +1 -1
- package/tsparticles.shape.image.js +67 -4777
- package/tsparticles.shape.image.min.js +2 -2
- package/tsparticles.shape.line.min.js +1 -1
- package/tsparticles.shape.polygon.min.js +1 -1
- package/tsparticles.shape.square.min.js +1 -1
- package/tsparticles.shape.star.min.js +1 -1
- package/tsparticles.shape.text.js +39 -4965
- package/tsparticles.shape.text.min.js +2 -2
- package/tsparticles.slim.js +1575 -1554
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.updater.angle.js +55 -5014
- package/tsparticles.updater.angle.min.js +2 -2
- package/tsparticles.updater.color.js +146 -4481
- package/tsparticles.updater.color.min.js +2 -2
- package/tsparticles.updater.life.js +58 -5017
- package/tsparticles.updater.life.min.js +2 -2
- package/tsparticles.updater.opacity.js +62 -5021
- package/tsparticles.updater.opacity.min.js +2 -2
- package/tsparticles.updater.outModes.js +152 -4907
- package/tsparticles.updater.outModes.min.js +2 -2
- package/tsparticles.updater.roll.js +143 -4478
- package/tsparticles.updater.roll.min.js +2 -2
- package/tsparticles.updater.size.js +54 -5013
- package/tsparticles.updater.size.min.js +2 -2
- package/tsparticles.updater.strokeColor.js +147 -4482
- package/tsparticles.updater.strokeColor.min.js +2 -2
- package/tsparticles.updater.tilt.js +55 -5014
- package/tsparticles.updater.tilt.min.js +2 -2
- package/tsparticles.updater.wobble.js +55 -5014
- package/tsparticles.updater.wobble.min.js +2 -2
- package/types/Core/Canvas.d.ts +40 -0
- package/types/Core/Container.d.ts +71 -0
- package/types/Core/Interfaces/Colors.d.ts +33 -0
- package/types/Core/Interfaces/Gradients.d.ts +21 -0
- package/{Core → types/Core}/Interfaces/IBounds.d.ts +0 -0
- package/{Core → types/Core}/Interfaces/IBubbleParticleData.d.ts +0 -0
- package/types/Core/Interfaces/ICircleBouncer.d.ts +9 -0
- package/{Core → types/Core}/Interfaces/IContainerInteractivity.d.ts +0 -0
- package/types/Core/Interfaces/IContainerPlugin.d.ts +33 -0
- package/types/Core/Interfaces/ICoordinates.d.ts +15 -0
- package/{Core → types/Core}/Interfaces/IDelta.d.ts +0 -0
- package/{Core → types/Core}/Interfaces/IDimension.d.ts +0 -0
- package/{Core → types/Core}/Interfaces/IDistance.d.ts +0 -0
- package/types/Core/Interfaces/IExternalInteractor.d.ts +8 -0
- package/types/Core/Interfaces/IInteractor.d.ts +6 -0
- package/{Core → types/Core}/Interfaces/IMouseData.d.ts +0 -0
- package/types/Core/Interfaces/IMovePathGenerator.d.ts +8 -0
- package/types/Core/Interfaces/IParticle.d.ts +51 -0
- package/types/Core/Interfaces/IParticleColorStyle.d.ts +4 -0
- package/{Core → types/Core}/Interfaces/IParticleGravity.d.ts +0 -0
- package/{Core → types/Core}/Interfaces/IParticleHslAnimation.d.ts +0 -0
- package/{Core → types/Core}/Interfaces/IParticleLife.d.ts +0 -0
- package/{Core → types/Core}/Interfaces/IParticleLoops.d.ts +0 -0
- package/{Core → types/Core}/Interfaces/IParticleRetinaProps.d.ts +0 -0
- package/types/Core/Interfaces/IParticleRoll.d.ts +9 -0
- package/types/Core/Interfaces/IParticleSpin.d.ts +9 -0
- package/types/Core/Interfaces/IParticleUpdater.d.ts +11 -0
- package/types/Core/Interfaces/IParticleValueAnimation.d.ts +17 -0
- package/{Core → types/Core}/Interfaces/IParticleWobble.d.ts +0 -0
- package/{Core → types/Core}/Interfaces/IParticlesFrequencies.d.ts +0 -0
- package/{Core → types/Core}/Interfaces/IParticlesInteractor.d.ts +0 -0
- package/types/Core/Interfaces/IParticlesMover.d.ts +7 -0
- package/types/Core/Interfaces/IPlugin.d.ts +11 -0
- package/types/Core/Interfaces/IPositionFromSizeParams.d.ts +10 -0
- package/{Core → types/Core}/Interfaces/IRangeValue.d.ts +0 -0
- package/{Core → types/Core}/Interfaces/IRectSideResult.d.ts +0 -0
- package/types/Core/Interfaces/IShapeDrawer.d.ts +10 -0
- package/types/Core/Interfaces/IShapeValues.d.ts +8 -0
- package/types/Core/Loader.d.ts +32 -0
- package/types/Core/Particle.d.ts +84 -0
- package/types/Core/Particles.d.ts +52 -0
- package/types/Core/Retina.d.ts +25 -0
- package/types/Core/Utils/Circle.d.ts +8 -0
- package/types/Core/Utils/CircleWarp.d.ts +10 -0
- package/{Core → types/Core}/Utils/Constants.d.ts +0 -0
- package/{Core → types/Core}/Utils/EventListeners.d.ts +0 -0
- package/types/Core/Utils/ExternalInteractorBase.d.ts +13 -0
- package/{Core → types/Core}/Utils/FrameManager.d.ts +0 -0
- package/types/Core/Utils/InteractionManager.d.ts +16 -0
- package/types/Core/Utils/ParticlesInteractorBase.d.ts +13 -0
- package/types/Core/Utils/Plugins.d.ts +47 -0
- package/types/Core/Utils/Point.d.ts +7 -0
- package/types/Core/Utils/QuadTree.d.ts +24 -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 +29 -0
- package/types/Core/Utils/Vector3d.d.ts +19 -0
- package/{Enums → types/Enums}/AnimationStatus.d.ts +0 -0
- package/{Enums → types/Enums}/Directions/MoveDirection.d.ts +0 -0
- package/{Enums → types/Enums}/Directions/OutModeDirection.d.ts +0 -0
- package/{Enums → types/Enums}/Directions/RotateDirection.d.ts +0 -0
- package/{Enums → types/Enums}/Directions/TiltDirection.d.ts +0 -0
- package/{Enums → types/Enums}/InteractivityDetect.d.ts +0 -0
- package/{Enums → types/Enums}/Modes/ClickMode.d.ts +0 -0
- package/{Enums → types/Enums}/Modes/CollisionMode.d.ts +0 -0
- package/{Enums → types/Enums}/Modes/DestroyMode.d.ts +0 -0
- package/{Enums → types/Enums}/Modes/DivMode.d.ts +0 -0
- package/{Enums → types/Enums}/Modes/HoverMode.d.ts +0 -0
- package/{Enums → types/Enums}/Modes/OutMode.d.ts +0 -0
- package/{Enums → types/Enums}/Modes/ResponsiveMode.d.ts +0 -0
- package/{Enums → types/Enums}/Modes/RollMode.d.ts +0 -0
- package/{Enums → types/Enums}/Modes/SizeMode.d.ts +0 -0
- package/{Enums → types/Enums}/Modes/ThemeMode.d.ts +0 -0
- package/{Enums → types/Enums}/Types/AlterType.d.ts +0 -0
- package/{Enums → types/Enums}/Types/DestroyType.d.ts +0 -0
- package/{Enums → types/Enums}/Types/DivType.d.ts +0 -0
- package/{Enums → types/Enums}/Types/EasingType.d.ts +0 -0
- package/{Enums → types/Enums}/Types/GradientType.d.ts +0 -0
- package/{Enums → types/Enums}/Types/InteractorType.d.ts +0 -0
- package/{Enums → types/Enums}/Types/ShapeType.d.ts +0 -0
- package/{Enums → types/Enums}/Types/StartValueType.d.ts +0 -0
- package/types/Interactions/External/Attract/Attractor.d.ts +24 -0
- package/{Interactions → types/Interactions}/External/Attract/index.d.ts +0 -0
- package/types/Interactions/External/Bounce/Bouncer.d.ts +11 -0
- package/{Interactions → types/Interactions}/External/Bounce/index.d.ts +0 -0
- package/types/Interactions/External/Bubble/Bubbler.d.ts +26 -0
- package/{Interactions → types/Interactions}/External/Bubble/IBubblerProcessParam.d.ts +0 -0
- package/{Interactions → types/Interactions}/External/Bubble/ProcessBubbleType.d.ts +0 -0
- package/{Interactions → types/Interactions}/External/Bubble/index.d.ts +0 -0
- package/types/Interactions/External/Connect/Connector.d.ts +8 -0
- package/{Interactions → types/Interactions}/External/Connect/index.d.ts +0 -0
- package/types/Interactions/External/Grab/Grabber.d.ts +8 -0
- package/{Interactions → types/Interactions}/External/Grab/index.d.ts +0 -0
- package/types/Interactions/External/Pause/Pauser.d.ts +9 -0
- package/types/Interactions/External/Pause/index.d.ts +2 -0
- package/types/Interactions/External/Push/Pusher.d.ts +10 -0
- package/types/Interactions/External/Push/index.d.ts +2 -0
- package/types/Interactions/External/Remove/Remover.d.ts +9 -0
- package/types/Interactions/External/Remove/index.d.ts +2 -0
- package/types/Interactions/External/Repulse/Repulser.d.ts +24 -0
- package/{Interactions → types/Interactions}/External/Repulse/index.d.ts +0 -0
- package/types/Interactions/External/Trail/TrailMaker.d.ts +11 -0
- package/{Interactions → types/Interactions}/External/Trail/index.d.ts +0 -0
- package/types/Interactions/Particles/Attract/Attractor.d.ts +10 -0
- package/{Interactions → types/Interactions}/Particles/Attract/index.d.ts +0 -0
- package/types/Interactions/Particles/Collisions/Collider.d.ts +11 -0
- package/{Interactions → types/Interactions}/Particles/Collisions/index.d.ts +0 -0
- package/{Interactions → types/Interactions}/Particles/Links/ILink.d.ts +0 -0
- package/types/Interactions/Particles/Links/LinkInstance.d.ts +12 -0
- package/types/Interactions/Particles/Links/LinkParticle.d.ts +5 -0
- package/types/Interactions/Particles/Links/Linker.d.ts +11 -0
- package/{Interactions → types/Interactions}/Particles/Links/index.d.ts +0 -0
- package/{Interactions → types/Interactions}/Particles/Links/interaction.d.ts +0 -0
- package/{Interactions → types/Interactions}/Particles/Links/plugin.d.ts +0 -0
- package/types/Movers/Base/BaseMover.d.ts +9 -0
- package/types/Movers/Base/IParticleSpin.d.ts +9 -0
- package/types/Movers/Base/Types.d.ts +8 -0
- package/types/Movers/Base/Utils.d.ts +7 -0
- package/types/Movers/Base/index.d.ts +2 -0
- package/types/Movers/Parallax/ParallaxMover.d.ts +7 -0
- package/types/Movers/Parallax/index.d.ts +2 -0
- package/types/Options/Classes/AnimatableColor.d.ts +12 -0
- package/types/Options/Classes/AnimatableGradient.d.ts +56 -0
- package/types/Options/Classes/AnimationOptions.d.ts +12 -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 +13 -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 +21 -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/Interactivity.d.ts +15 -0
- package/types/Options/Classes/Interactivity/Modes/Attract.d.ts +14 -0
- package/types/Options/Classes/Interactivity/Modes/Bounce.d.ts +8 -0
- package/types/Options/Classes/Interactivity/Modes/Bubble.d.ts +10 -0
- package/types/Options/Classes/Interactivity/Modes/BubbleBase.d.ts +14 -0
- package/types/Options/Classes/Interactivity/Modes/BubbleDiv.d.ts +12 -0
- package/types/Options/Classes/Interactivity/Modes/Connect.d.ts +15 -0
- package/types/Options/Classes/Interactivity/Modes/ConnectLinks.d.ts +8 -0
- package/types/Options/Classes/Interactivity/Modes/Grab.d.ts +14 -0
- package/types/Options/Classes/Interactivity/Modes/GrabLinks.d.ts +12 -0
- package/types/Options/Classes/Interactivity/Modes/Light.d.ts +11 -0
- package/types/Options/Classes/Interactivity/Modes/LightArea.d.ts +10 -0
- package/types/Options/Classes/Interactivity/Modes/LightGradient.d.ts +10 -0
- package/types/Options/Classes/Interactivity/Modes/LightShadow.d.ts +10 -0
- package/types/Options/Classes/Interactivity/Modes/Modes.d.ts +29 -0
- package/types/Options/Classes/Interactivity/Modes/Push.d.ts +12 -0
- package/types/Options/Classes/Interactivity/Modes/Remove.d.ts +10 -0
- package/types/Options/Classes/Interactivity/Modes/Repulse.d.ts +10 -0
- package/types/Options/Classes/Interactivity/Modes/RepulseBase.d.ts +14 -0
- package/types/Options/Classes/Interactivity/Modes/RepulseDiv.d.ts +12 -0
- package/types/Options/Classes/Interactivity/Modes/Slow.d.ts +11 -0
- package/types/Options/Classes/Interactivity/Modes/Trail.d.ts +12 -0
- package/types/Options/Classes/ManualParticle.d.ts +10 -0
- package/types/Options/Classes/Motion/Motion.d.ts +10 -0
- package/types/Options/Classes/Motion/MotionReduce.d.ts +9 -0
- package/types/Options/Classes/Options.d.ts +49 -0
- package/types/Options/Classes/OptionsColor.d.ts +11 -0
- package/types/Options/Classes/Particles/Bounce/Bounce.d.ts +10 -0
- package/{Options → types/Options}/Classes/Particles/Bounce/BounceFactor.d.ts +0 -0
- package/types/Options/Classes/Particles/Collisions/Collisions.d.ts +14 -0
- package/types/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +9 -0
- package/types/Options/Classes/Particles/Destroy/Destroy.d.ts +11 -0
- package/types/Options/Classes/Particles/Destroy/Split.d.ts +15 -0
- package/{Options → types/Options}/Classes/Particles/Destroy/SplitFactor.d.ts +0 -0
- package/{Options → types/Options}/Classes/Particles/Destroy/SplitRate.d.ts +0 -0
- package/types/Options/Classes/Particles/Life/Life.d.ts +12 -0
- package/types/Options/Classes/Particles/Life/LifeDelay.d.ts +9 -0
- package/types/Options/Classes/Particles/Life/LifeDuration.d.ts +9 -0
- package/types/Options/Classes/Particles/Links/Links.d.ts +22 -0
- package/types/Options/Classes/Particles/Links/LinksShadow.d.ts +11 -0
- package/types/Options/Classes/Particles/Links/LinksTriangle.d.ts +12 -0
- package/types/Options/Classes/Particles/Move/Attract.d.ts +16 -0
- package/types/Options/Classes/Particles/Move/Move.d.ts +46 -0
- package/types/Options/Classes/Particles/Move/MoveAngle.d.ts +10 -0
- package/types/Options/Classes/Particles/Move/MoveGravity.d.ts +12 -0
- package/types/Options/Classes/Particles/Move/OutModes.d.ts +13 -0
- package/types/Options/Classes/Particles/Move/Path/Path.d.ts +14 -0
- package/{Options → types/Options}/Classes/Particles/Move/Path/PathDelay.d.ts +0 -0
- package/types/Options/Classes/Particles/Move/Spin.d.ts +12 -0
- package/types/Options/Classes/Particles/Move/Trail.d.ts +11 -0
- package/types/Options/Classes/Particles/Number/Density.d.ts +12 -0
- package/types/Options/Classes/Particles/Number/ParticlesNumber.d.ts +13 -0
- package/types/Options/Classes/Particles/Opacity/Opacity.d.ts +12 -0
- package/types/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +15 -0
- package/types/Options/Classes/Particles/Orbit/Orbit.d.ts +19 -0
- package/types/Options/Classes/Particles/Orbit/OrbitRotation.d.ts +7 -0
- package/types/Options/Classes/Particles/ParticlesOptions.d.ts +59 -0
- package/types/Options/Classes/Particles/Repulse/Repulse.d.ts +14 -0
- package/types/Options/Classes/Particles/Roll/Roll.d.ts +17 -0
- package/types/Options/Classes/Particles/Roll/RollLight.d.ts +10 -0
- package/types/Options/Classes/Particles/Rotate/Rotate.d.ts +13 -0
- package/types/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +11 -0
- package/types/Options/Classes/Particles/Shadow.d.ts +13 -0
- package/types/Options/Classes/Particles/Shape/Shape.d.ts +29 -0
- package/types/Options/Classes/Particles/Size/Size.d.ts +12 -0
- package/types/Options/Classes/Particles/Size/SizeAnimation.d.ts +15 -0
- package/types/Options/Classes/Particles/Stroke.d.ts +11 -0
- package/types/Options/Classes/Particles/Tilt/Tilt.d.ts +13 -0
- package/types/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +11 -0
- package/types/Options/Classes/Particles/Twinkle/Twinkle.d.ts +10 -0
- package/types/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +13 -0
- package/types/Options/Classes/Particles/Wobble/Wobble.d.ts +11 -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 +11 -0
- package/{Options → types/Options}/Interfaces/Background/IBackground.d.ts +0 -0
- package/types/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +7 -0
- package/{Options → types/Options}/Interfaces/BackgroundMask/IBackgroundMaskCover.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/FullScreen/IFullScreen.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/IAnimatable.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/IAnimatableColor.d.ts +0 -0
- package/types/Options/Interfaces/IAnimatableGradient.d.ts +8 -0
- package/types/Options/Interfaces/IAnimation.d.ts +7 -0
- package/types/Options/Interfaces/IColorAnimation.d.ts +5 -0
- package/{Options → types/Options}/Interfaces/IHslAnimation.d.ts +0 -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 +36 -0
- package/types/Options/Interfaces/IOptionsColor.d.ts +2 -0
- package/types/Options/Interfaces/IOptionsGradient.d.ts +13 -0
- package/{Options → types/Options}/Interfaces/IRandom.d.ts +0 -0
- package/types/Options/Interfaces/IResponsive.d.ts +8 -0
- package/types/Options/Interfaces/IValueWithRandom.d.ts +6 -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 +13 -0
- package/types/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +8 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Events/IParallax.d.ts +0 -0
- package/types/Options/Interfaces/Interactivity/IInteractivity.d.ts +9 -0
- package/types/Options/Interfaces/Interactivity/Modes/IAttract.d.ts +9 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Modes/IBounce.d.ts +0 -0
- package/types/Options/Interfaces/Interactivity/Modes/IBubble.d.ts +6 -0
- package/types/Options/Interfaces/Interactivity/Modes/IBubbleBase.d.ts +10 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Modes/IBubbleDiv.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Modes/IConnect.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Modes/IConnectLinks.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Modes/IGrab.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Modes/IGrabLinks.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Modes/ILight.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Modes/ILightArea.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Modes/ILightShadow.d.ts +0 -0
- package/types/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +5 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Modes/IModes.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Modes/IPush.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Modes/IRemove.d.ts +0 -0
- package/types/Options/Interfaces/Interactivity/Modes/IRepulse.d.ts +6 -0
- package/types/Options/Interfaces/Interactivity/Modes/IRepulseBase.d.ts +9 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Modes/IRepulseDiv.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Interactivity/Modes/ISlow.d.ts +0 -0
- package/types/Options/Interfaces/Interactivity/Modes/ITrail.d.ts +8 -0
- package/{Options → types/Options}/Interfaces/Motion/IMotion.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Motion/IMotionReduce.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Particles/Bounce/IBounce.d.ts +0 -0
- package/types/Options/Interfaces/Particles/Collisions/ICollisions.d.ts +9 -0
- package/{Options → types/Options}/Interfaces/Particles/Collisions/ICollisionsOverlap.d.ts +0 -0
- package/types/Options/Interfaces/Particles/Destroy/IDestroy.d.ts +6 -0
- package/types/Options/Interfaces/Particles/Destroy/ISplit.d.ts +10 -0
- package/types/Options/Interfaces/Particles/IParticles.d.ts +52 -0
- package/{Options → types/Options}/Interfaces/Particles/IShadow.d.ts +0 -0
- package/types/Options/Interfaces/Particles/IStroke.d.ts +7 -0
- package/{Options → types/Options}/Interfaces/Particles/Life/ILife.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Particles/Life/ILifeDelay.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Particles/Life/ILifeDuration.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Particles/Links/ILinks.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Particles/Links/ILinksShadow.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Particles/Links/ILinksTriangle.d.ts +0 -0
- package/types/Options/Interfaces/Particles/Move/IAttract.d.ts +9 -0
- package/types/Options/Interfaces/Particles/Move/IMove.d.ts +36 -0
- package/types/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +5 -0
- package/types/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +7 -0
- package/types/Options/Interfaces/Particles/Move/IOutModes.d.ts +8 -0
- package/types/Options/Interfaces/Particles/Move/ISpin.d.ts +7 -0
- package/{Options → types/Options}/Interfaces/Particles/Move/ITrail.d.ts +0 -0
- package/types/Options/Interfaces/Particles/Move/Path/IPath.d.ts +9 -0
- package/{Options → types/Options}/Interfaces/Particles/Number/IDensity.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Particles/Number/IParticlesNumber.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Particles/Opacity/IOpacity.d.ts +0 -0
- package/types/Options/Interfaces/Particles/Opacity/IOpacityAnimation.d.ts +9 -0
- package/types/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +13 -0
- package/types/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +9 -0
- package/types/Options/Interfaces/Particles/Roll/IRoll.d.ts +13 -0
- package/types/Options/Interfaces/Particles/Roll/IRollLight.d.ts +5 -0
- package/types/Options/Interfaces/Particles/Rotate/IRotate.d.ts +8 -0
- package/types/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +6 -0
- package/types/Options/Interfaces/Particles/Shape/ICharacterShape.d.ts +8 -0
- package/{Options → types/Options}/Interfaces/Particles/Shape/IImageShape.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Particles/Shape/IPolygonShape.d.ts +0 -0
- package/types/Options/Interfaces/Particles/Shape/IShape.d.ts +17 -0
- package/{Options → types/Options}/Interfaces/Particles/Shape/IShapeValues.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Particles/Shape/IStarShape.d.ts +0 -0
- package/{Options → types/Options}/Interfaces/Particles/Size/ISize.d.ts +0 -0
- package/types/Options/Interfaces/Particles/Size/ISizeAnimation.d.ts +9 -0
- package/types/Options/Interfaces/Particles/Tilt/ITilt.d.ts +8 -0
- package/types/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +6 -0
- package/{Options → types/Options}/Interfaces/Particles/Twinkle/ITwinkle.d.ts +0 -0
- package/types/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +8 -0
- package/types/Options/Interfaces/Particles/Wobble/IWobble.d.ts +6 -0
- package/{Options → types/Options}/Interfaces/Particles/ZIndex/IZIndex.d.ts +0 -0
- package/types/Options/Interfaces/Theme/ITheme.d.ts +8 -0
- package/types/Options/Interfaces/Theme/IThemeDefault.d.ts +6 -0
- package/types/Plugins/Absorbers/AbsorberContainer.d.ts +7 -0
- package/types/Plugins/Absorbers/AbsorberInstance.d.ts +36 -0
- package/types/Plugins/Absorbers/Absorbers.d.ts +26 -0
- package/{Plugins → types/Plugins}/Absorbers/Enums/AbsorberClickMode.d.ts +0 -0
- package/types/Plugins/Absorbers/Options/Classes/Absorber.d.ts +18 -0
- package/types/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +11 -0
- package/types/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +9 -0
- package/types/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +14 -0
- package/types/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.d.ts +12 -0
- package/{Plugins → types/Plugins}/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +0 -0
- package/{Plugins → types/Plugins}/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +0 -0
- package/types/Plugins/Absorbers/index.d.ts +4 -0
- package/types/Plugins/Emitters/EmitterContainer.d.ts +10 -0
- package/types/Plugins/Emitters/EmitterInstance.d.ts +49 -0
- package/types/Plugins/Emitters/Emitters.d.ts +29 -0
- package/{Plugins → types/Plugins}/Emitters/EmittersEngine.d.ts +0 -0
- package/{Plugins → types/Plugins}/Emitters/Enums/EmitterClickMode.d.ts +0 -0
- package/{Plugins → types/Plugins}/Emitters/Enums/EmitterShapeType.d.ts +0 -0
- package/types/Plugins/Emitters/IEmitterShape.d.ts +5 -0
- package/types/Plugins/Emitters/Options/Classes/Emitter.d.ts +28 -0
- package/types/Plugins/Emitters/Options/Classes/EmitterLife.d.ts +11 -0
- package/types/Plugins/Emitters/Options/Classes/EmitterRate.d.ts +10 -0
- package/types/Plugins/Emitters/Options/Classes/EmitterSize.d.ts +11 -0
- package/types/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +24 -0
- package/{Plugins → types/Plugins}/Emitters/Options/Interfaces/IEmitterLife.d.ts +0 -0
- package/types/Plugins/Emitters/Options/Interfaces/IEmitterOptions.d.ts +12 -0
- package/types/Plugins/Emitters/Options/Interfaces/IEmitterRate.d.ts +5 -0
- package/types/Plugins/Emitters/Options/Interfaces/IEmitterSize.d.ts +5 -0
- package/{Plugins → types/Plugins}/Emitters/ShapeManager.d.ts +0 -0
- package/types/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +6 -0
- package/types/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +6 -0
- package/types/Plugins/Emitters/index.d.ts +6 -0
- package/{Plugins → types/Plugins}/PolygonMask/Enums/PolygonMaskInlineArrangement.d.ts +0 -0
- package/{Plugins → types/Plugins}/PolygonMask/Enums/PolygonMaskMoveType.d.ts +0 -0
- package/{Plugins → types/Plugins}/PolygonMask/Enums/PolygonMaskType.d.ts +0 -0
- package/{Plugins → types/Plugins}/PolygonMask/Interfaces/ISvgPath.d.ts +0 -0
- package/types/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +25 -0
- package/types/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.d.ts +15 -0
- package/types/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.d.ts +11 -0
- package/types/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +9 -0
- package/types/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +11 -0
- package/types/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +10 -0
- package/types/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +19 -0
- package/types/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +8 -0
- package/types/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDrawStroke.d.ts +6 -0
- package/types/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskInline.d.ts +4 -0
- package/types/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.d.ts +6 -0
- package/types/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.d.ts +5 -0
- package/{Plugins → types/Plugins}/PolygonMask/Options/Interfaces/IPolygonMaskOptions.d.ts +0 -0
- package/types/Plugins/PolygonMask/PolygonMaskInstance.d.ts +43 -0
- package/{Plugins → types/Plugins}/PolygonMask/Types.d.ts +0 -0
- package/types/Plugins/PolygonMask/Utils.d.ts +11 -0
- package/types/Plugins/PolygonMask/index.d.ts +6 -0
- package/{Plugins → types/Plugins}/PolygonMask/pathseg.d.ts +0 -0
- package/types/Shapes/Circle/CircleDrawer.d.ts +6 -0
- package/{Shapes → types/Shapes}/Circle/index.d.ts +0 -0
- package/types/Shapes/Image/ImageDrawer.d.ts +15 -0
- package/types/Shapes/Image/Utils.d.ts +30 -0
- package/{Shapes → types/Shapes}/Image/index.d.ts +0 -0
- package/types/Shapes/Line/LineDrawer.d.ts +6 -0
- package/{Shapes → types/Shapes}/Line/index.d.ts +0 -0
- package/types/Shapes/Polygon/PolygonDrawer.d.ts +8 -0
- package/types/Shapes/Polygon/PolygonDrawerBase.d.ts +17 -0
- package/types/Shapes/Polygon/TriangleDrawer.d.ts +9 -0
- package/{Shapes → types/Shapes}/Polygon/index.d.ts +0 -0
- package/types/Shapes/Square/SquareDrawer.d.ts +6 -0
- package/{Shapes → types/Shapes}/Square/index.d.ts +0 -0
- package/types/Shapes/Star/StarDrawer.d.ts +6 -0
- package/{Shapes → types/Shapes}/Star/index.d.ts +0 -0
- package/types/Shapes/Text/TextDrawer.d.ts +9 -0
- package/{Shapes → types/Shapes}/Text/index.d.ts +0 -0
- package/{Types → types/Types}/ParticlesGroups.d.ts +0 -0
- package/{Types → types/Types}/PathOptions.d.ts +0 -0
- package/{Types → types/Types}/RangeValue.d.ts +0 -0
- package/{Types → types/Types}/RecursivePartial.d.ts +0 -0
- package/types/Types/ShapeData.d.ts +5 -0
- package/types/Types/ShapeDrawerFunctions.d.ts +11 -0
- package/{Types → types/Types}/SingleOrMultiple.d.ts +0 -0
- package/types/Updaters/Angle/AngleUpdater.d.ts +11 -0
- package/{Updaters → types/Updaters}/Angle/index.d.ts +0 -0
- package/types/Updaters/Color/ColorUpdater.d.ts +11 -0
- package/{Updaters → types/Updaters}/Color/index.d.ts +0 -0
- package/types/Updaters/Life/LifeUpdater.d.ts +11 -0
- package/{Updaters → types/Updaters}/Life/index.d.ts +0 -0
- package/types/Updaters/Opacity/OpacityUpdater.d.ts +11 -0
- package/{Updaters → types/Updaters}/Opacity/index.d.ts +0 -0
- package/types/Updaters/OutModes/IBounceData.d.ts +15 -0
- package/types/Updaters/OutModes/OutOfCanvasUpdater.d.ts +16 -0
- package/{Updaters → types/Updaters}/OutModes/Utils.d.ts +0 -0
- package/{Updaters → types/Updaters}/OutModes/index.d.ts +0 -0
- package/types/Updaters/Roll/RollUpdater.d.ts +8 -0
- package/{Updaters → types/Updaters}/Roll/index.d.ts +0 -0
- package/types/Updaters/Size/SizeUpdater.d.ts +8 -0
- package/{Updaters → types/Updaters}/Size/index.d.ts +0 -0
- package/types/Updaters/StrokeColor/StrokeColorUpdater.d.ts +11 -0
- package/{Updaters → types/Updaters}/StrokeColor/index.d.ts +0 -0
- package/types/Updaters/Tilt/TiltUpdater.d.ts +11 -0
- package/{Updaters → types/Updaters}/Tilt/index.d.ts +0 -0
- package/types/Updaters/Twinkle/TwinkleUpdater.d.ts +9 -0
- package/types/Updaters/Twinkle/index.d.ts +2 -0
- package/types/Updaters/Wobble/WobbleUpdater.d.ts +17 -0
- package/{Updaters → types/Updaters}/Wobble/index.d.ts +0 -0
- package/types/Utils/CanvasUtils.d.ts +26 -0
- package/types/Utils/ColorUtils.d.ts +28 -0
- package/types/Utils/NumberUtils.d.ts +30 -0
- package/types/Utils/Utils.d.ts +43 -0
- package/types/engine.d.ts +36 -0
- package/{browser → types}/full.d.ts +0 -0
- package/types/index.d.ts +114 -0
- package/types/index.engine.d.ts +102 -0
- package/types/index.slim.d.ts +102 -0
- package/types/pjs.d.ts +14 -0
- package/{browser → types}/slim.d.ts +0 -0
- package/umd/Core/Canvas.js +65 -78
- package/umd/Core/Container.js +22 -16
- package/umd/Core/Interfaces/{IAttract.js → IParticleColorStyle.js} +0 -0
- package/umd/Core/Interfaces/{IBubble.js → IParticlesMover.js} +0 -0
- package/umd/Core/Interfaces/{IParticleGradientAnimation.js → IPositionFromSizeParams.js} +0 -0
- package/umd/Core/Loader.js +10 -14
- package/umd/Core/Particle.js +56 -75
- package/umd/Core/Particles.js +33 -35
- package/umd/Core/Retina.js +13 -22
- package/umd/Core/Utils/Circle.js +6 -15
- package/umd/Core/Utils/CircleWarp.js +2 -7
- package/umd/Core/Utils/EventListeners.js +24 -95
- package/umd/Core/Utils/FrameManager.js +1 -2
- package/umd/Core/Utils/InteractionManager.js +7 -0
- package/umd/Core/Utils/Plugins.js +16 -3
- package/umd/Core/Utils/QuadTree.js +21 -28
- package/umd/Core/Utils/Rectangle.js +6 -15
- package/umd/Core/Utils/Vector.js +13 -15
- package/umd/Core/Utils/Vector3d.js +17 -5
- package/umd/Interactions/External/Attract/Attractor.js +44 -10
- package/umd/Interactions/External/Bounce/Bouncer.js +18 -16
- package/umd/Interactions/External/Bubble/Bubbler.js +41 -18
- package/umd/Interactions/External/Connect/Connector.js +4 -4
- package/umd/Interactions/External/Grab/Grabber.js +32 -27
- package/umd/Interactions/External/Pause/Pauser.js +39 -0
- package/umd/Interactions/External/Pause/index.js +18 -0
- package/umd/Interactions/External/Push/Pusher.js +43 -0
- package/umd/Interactions/External/Push/index.js +18 -0
- package/umd/Interactions/External/Remove/Remover.js +36 -0
- package/umd/Interactions/External/Remove/index.js +18 -0
- package/umd/Interactions/External/Repulse/Repulser.js +47 -12
- package/umd/Interactions/External/Trail/TrailMaker.js +4 -4
- package/umd/Interactions/Particles/Attract/Attractor.js +5 -5
- package/umd/Interactions/Particles/Collisions/Collider.js +13 -21
- package/umd/Interactions/Particles/Links/LinkInstance.js +47 -65
- package/umd/Interactions/Particles/Links/Linker.js +17 -22
- package/umd/Movers/Base/BaseMover.js +90 -0
- package/umd/{Core/Interfaces/IParticleGradientColorAnimation.js → Movers/Base/IParticleSpin.js} +0 -0
- package/umd/{Core/Interfaces/IRepulse.js → Movers/Base/Types.js} +0 -0
- package/umd/Movers/Base/Utils.js +114 -0
- package/umd/Movers/Base/index.js +18 -0
- package/umd/Movers/Parallax/ParallaxMover.js +43 -0
- package/umd/Movers/Parallax/index.js +18 -0
- package/umd/Options/Classes/AnimatableGradient.js +7 -7
- package/umd/Options/Classes/AnimationOptions.js +4 -4
- package/umd/Options/Classes/ColorAnimation.js +5 -5
- package/umd/Options/Classes/Interactivity/Modes/Trail.js +2 -2
- package/umd/Options/Classes/ManualParticle.js +2 -2
- package/umd/Options/Classes/Options.js +2 -2
- package/umd/Options/Classes/Particles/Destroy/Split.js +2 -2
- package/umd/Options/Classes/Particles/Move/Attract.js +3 -3
- package/umd/Options/Classes/Particles/Move/Move.js +5 -4
- package/umd/Options/Classes/Particles/Move/MoveAngle.js +4 -4
- package/umd/Options/Classes/Particles/Move/MoveGravity.js +4 -4
- package/umd/Options/Classes/Particles/Move/Path/Path.js +2 -2
- package/umd/Options/Classes/Particles/Move/Spin.js +4 -3
- package/umd/Options/Classes/Particles/Opacity/Opacity.js +3 -3
- package/umd/Options/Classes/Particles/Orbit/Orbit.js +5 -5
- package/umd/Options/Classes/Particles/ParticlesOptions.js +2 -2
- package/umd/Options/Classes/Particles/Repulse/Repulse.js +6 -6
- package/umd/Options/Classes/Particles/Roll/Roll.js +3 -3
- package/umd/Options/Classes/Particles/Roll/RollLight.js +3 -3
- package/umd/Options/Classes/Particles/Rotate/RotateAnimation.js +3 -3
- package/umd/Options/Classes/Particles/Shape/Shape.js +2 -2
- package/umd/Options/Classes/Particles/Size/Size.js +3 -3
- package/umd/Options/Classes/Particles/Tilt/TiltAnimation.js +3 -3
- package/umd/Options/Classes/Particles/Twinkle/TwinkleValues.js +3 -3
- package/umd/Options/Classes/Particles/Wobble/Wobble.js +4 -4
- package/umd/Options/Classes/Responsive.js +2 -2
- package/umd/Options/Classes/Theme/Theme.js +2 -2
- package/umd/Options/Classes/ValueWithRandom.js +3 -3
- package/umd/Options/Interfaces/Particles/Shape/IShapeValues.js +5 -1
- package/umd/Plugins/Absorbers/AbsorberInstance.js +25 -29
- package/umd/Plugins/Absorbers/Absorbers.js +4 -7
- package/umd/Plugins/Absorbers/Options/Classes/Absorber.js +4 -4
- package/umd/Plugins/Absorbers/index.js +23 -10
- package/umd/Plugins/Emitters/EmitterInstance.js +23 -28
- package/umd/Plugins/Emitters/Emitters.js +4 -7
- package/umd/Plugins/Emitters/Options/Classes/Emitter.js +5 -4
- package/umd/Plugins/Emitters/Options/Classes/EmitterRate.js +4 -4
- package/umd/Plugins/Emitters/Shapes/Circle/CircleShape.js +2 -7
- package/umd/Plugins/Emitters/index.js +10 -3
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMask.js +2 -2
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.js +3 -3
- package/umd/Plugins/PolygonMask/PolygonMaskInstance.js +27 -50
- package/umd/Plugins/PolygonMask/Utils.js +11 -18
- package/umd/Plugins/PolygonMask/index.js +15 -4
- package/umd/Shapes/Image/ImageDrawer.js +20 -20
- package/umd/Shapes/Image/Utils.js +3 -3
- package/umd/Shapes/Text/TextDrawer.js +2 -2
- package/umd/Updaters/Angle/AngleUpdater.js +4 -4
- package/umd/Updaters/Color/ColorUpdater.js +6 -5
- package/umd/Updaters/Life/LifeUpdater.js +7 -7
- package/umd/Updaters/Opacity/OpacityUpdater.js +11 -11
- package/umd/Updaters/OutModes/OutOfCanvasUpdater.js +2 -2
- package/umd/Updaters/OutModes/Utils.js +4 -4
- package/umd/Updaters/Roll/RollUpdater.js +8 -7
- package/umd/Updaters/Size/SizeUpdater.js +3 -3
- package/umd/Updaters/StrokeColor/StrokeColorUpdater.js +7 -5
- package/umd/Updaters/Tilt/TiltUpdater.js +4 -4
- package/umd/Updaters/Twinkle/TwinkleUpdater.js +31 -0
- package/umd/Updaters/Twinkle/index.js +18 -0
- package/umd/Updaters/Wobble/WobbleUpdater.js +4 -4
- package/umd/Utils/CanvasUtils.js +26 -57
- package/umd/Utils/ColorUtils.js +18 -34
- package/umd/Utils/NumberUtils.js +57 -11
- package/umd/Utils/Utils.js +32 -49
- package/umd/engine.js +9 -4
- package/umd/full.js +4 -2
- package/umd/index.engine.js +99 -7
- package/umd/index.js +111 -11
- package/umd/index.slim.js +98 -7
- package/umd/slim.js +11 -1
- package/Core/Canvas.d.ts +0 -35
- package/Core/Canvas.js +0 -319
- package/Core/Container.d.ts +0 -68
- package/Core/Container.js +0 -395
- package/Core/Interfaces/Colors.d.ts +0 -33
- package/Core/Interfaces/Gradients.d.ts +0 -21
- package/Core/Interfaces/IAttract.d.ts +0 -7
- package/Core/Interfaces/IBubble.d.ts +0 -4
- package/Core/Interfaces/ICircleBouncer.d.ts +0 -9
- package/Core/Interfaces/IContainerPlugin.d.ts +0 -32
- package/Core/Interfaces/ICoordinates.d.ts +0 -15
- package/Core/Interfaces/IExternalInteractor.d.ts +0 -6
- package/Core/Interfaces/IInteractor.d.ts +0 -6
- package/Core/Interfaces/IMovePathGenerator.d.ts +0 -8
- package/Core/Interfaces/IParticle.d.ts +0 -55
- package/Core/Interfaces/IParticleGradientAnimation.d.ts +0 -8
- package/Core/Interfaces/IParticleGradientColorAnimation.d.ts +0 -7
- package/Core/Interfaces/IParticleRoll.d.ts +0 -9
- package/Core/Interfaces/IParticleSpin.d.ts +0 -9
- package/Core/Interfaces/IParticleUpdater.d.ts +0 -9
- package/Core/Interfaces/IParticleValueAnimation.d.ts +0 -17
- package/Core/Interfaces/IPlugin.d.ts +0 -11
- package/Core/Interfaces/IRepulse.d.ts +0 -7
- package/Core/Interfaces/IShapeDrawer.d.ts +0 -10
- package/Core/Interfaces/IShapeValues.d.ts +0 -8
- package/Core/Interfaces/index.d.ts +0 -37
- package/Core/Interfaces/index.js +0 -49
- package/Core/Loader.d.ts +0 -32
- package/Core/Loader.js +0 -183
- package/Core/Particle.d.ts +0 -73
- package/Core/Particle.js +0 -386
- package/Core/Particles.d.ts +0 -46
- package/Core/Particles.js +0 -322
- package/Core/Retina.d.ts +0 -26
- package/Core/Retina.js +0 -97
- package/Core/Utils/Circle.d.ts +0 -8
- package/Core/Utils/Circle.js +0 -42
- package/Core/Utils/CircleWarp.d.ts +0 -9
- package/Core/Utils/CircleWarp.js +0 -60
- package/Core/Utils/EventListeners.js +0 -373
- package/Core/Utils/ExternalInteractorBase.d.ts +0 -12
- package/Core/Utils/FrameManager.js +0 -43
- package/Core/Utils/InteractionManager.d.ts +0 -14
- package/Core/Utils/InteractionManager.js +0 -59
- package/Core/Utils/ParticlesInteractorBase.d.ts +0 -12
- package/Core/Utils/ParticlesMover.d.ts +0 -13
- package/Core/Utils/ParticlesMover.js +0 -186
- package/Core/Utils/Plugins.d.ts +0 -36
- package/Core/Utils/Plugins.js +0 -98
- package/Core/Utils/Point.d.ts +0 -7
- package/Core/Utils/QuadTree.d.ts +0 -23
- package/Core/Utils/QuadTree.js +0 -78
- package/Core/Utils/Range.d.ts +0 -7
- package/Core/Utils/Rectangle.d.ts +0 -8
- package/Core/Utils/Rectangle.js +0 -38
- package/Core/Utils/Vector.d.ts +0 -29
- package/Core/Utils/Vector.js +0 -96
- package/Core/Utils/Vector3d.d.ts +0 -18
- package/Core/Utils/Vector3d.js +0 -58
- package/Core/Utils/index.d.ts +0 -16
- package/Core/Utils/index.js +0 -28
- package/Core/index.d.ts +0 -8
- package/Core/index.js +0 -20
- package/Enums/Directions/index.d.ts +0 -4
- package/Enums/Directions/index.js +0 -16
- package/Enums/Modes/index.d.ts +0 -10
- package/Enums/Modes/index.js +0 -22
- package/Enums/Types/OrbitType.d.ts +0 -4
- package/Enums/Types/OrbitType.js +0 -2
- package/Enums/Types/index.d.ts +0 -9
- package/Enums/Types/index.js +0 -21
- package/Enums/index.d.ts +0 -5
- package/Enums/index.js +0 -17
- package/Interactions/External/Attract/Attractor.d.ts +0 -11
- package/Interactions/External/Attract/Attractor.js +0 -75
- package/Interactions/External/Bounce/Bouncer.d.ts +0 -11
- package/Interactions/External/Bounce/Bouncer.js +0 -67
- package/Interactions/External/Bubble/Bubbler.d.ts +0 -16
- package/Interactions/External/Bubble/Bubbler.js +0 -251
- package/Interactions/External/Connect/Connector.d.ts +0 -8
- package/Interactions/External/Connect/Connector.js +0 -41
- package/Interactions/External/Grab/Grabber.d.ts +0 -8
- package/Interactions/External/Grab/Grabber.js +0 -47
- package/Interactions/External/Repulse/Repulser.d.ts +0 -12
- package/Interactions/External/Repulse/Repulser.js +0 -98
- package/Interactions/External/Trail/TrailMaker.d.ts +0 -10
- package/Interactions/External/Trail/TrailMaker.js +0 -53
- package/Interactions/Particles/Attract/Attractor.d.ts +0 -8
- package/Interactions/Particles/Attract/Attractor.js +0 -30
- package/Interactions/Particles/Collisions/Collider.d.ts +0 -10
- package/Interactions/Particles/Collisions/Collider.js +0 -109
- package/Interactions/Particles/Links/LinkInstance.d.ts +0 -10
- package/Interactions/Particles/Links/LinkInstance.js +0 -124
- package/Interactions/Particles/Links/LinkParticle.d.ts +0 -5
- package/Interactions/Particles/Links/Linker.d.ts +0 -10
- package/Interactions/Particles/Links/Linker.js +0 -105
- package/Options/Classes/AnimatableColor.d.ts +0 -11
- package/Options/Classes/AnimatableGradient.d.ts +0 -53
- package/Options/Classes/AnimatableGradient.js +0 -146
- package/Options/Classes/AnimationOptions.d.ts +0 -11
- package/Options/Classes/AnimationOptions.js +0 -30
- package/Options/Classes/Background/Background.d.ts +0 -14
- package/Options/Classes/BackgroundMask/BackgroundMask.d.ts +0 -11
- package/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +0 -10
- package/Options/Classes/ColorAnimation.d.ts +0 -12
- package/Options/Classes/ColorAnimation.js +0 -34
- package/Options/Classes/FullScreen/FullScreen.d.ts +0 -9
- package/Options/Classes/HslAnimation.d.ts +0 -11
- package/Options/Classes/Interactivity/Events/ClickEvent.d.ts +0 -10
- package/Options/Classes/Interactivity/Events/DivEvent.d.ts +0 -18
- package/Options/Classes/Interactivity/Events/Events.d.ts +0 -20
- package/Options/Classes/Interactivity/Events/HoverEvent.d.ts +0 -12
- package/Options/Classes/Interactivity/Events/Parallax.d.ts +0 -10
- package/Options/Classes/Interactivity/Interactivity.d.ts +0 -15
- package/Options/Classes/Interactivity/Modes/Attract.d.ts +0 -14
- package/Options/Classes/Interactivity/Modes/Bounce.d.ts +0 -8
- package/Options/Classes/Interactivity/Modes/Bubble.d.ts +0 -9
- package/Options/Classes/Interactivity/Modes/BubbleBase.d.ts +0 -13
- package/Options/Classes/Interactivity/Modes/BubbleDiv.d.ts +0 -11
- package/Options/Classes/Interactivity/Modes/Connect.d.ts +0 -15
- package/Options/Classes/Interactivity/Modes/ConnectLinks.d.ts +0 -8
- package/Options/Classes/Interactivity/Modes/Grab.d.ts +0 -14
- package/Options/Classes/Interactivity/Modes/GrabLinks.d.ts +0 -12
- package/Options/Classes/Interactivity/Modes/Light.d.ts +0 -11
- package/Options/Classes/Interactivity/Modes/LightArea.d.ts +0 -10
- package/Options/Classes/Interactivity/Modes/LightGradient.d.ts +0 -10
- package/Options/Classes/Interactivity/Modes/LightShadow.d.ts +0 -10
- package/Options/Classes/Interactivity/Modes/Modes.d.ts +0 -29
- package/Options/Classes/Interactivity/Modes/Push.d.ts +0 -12
- package/Options/Classes/Interactivity/Modes/Remove.d.ts +0 -10
- package/Options/Classes/Interactivity/Modes/Repulse.d.ts +0 -9
- package/Options/Classes/Interactivity/Modes/RepulseBase.d.ts +0 -14
- package/Options/Classes/Interactivity/Modes/RepulseDiv.d.ts +0 -11
- package/Options/Classes/Interactivity/Modes/Slow.d.ts +0 -11
- package/Options/Classes/Interactivity/Modes/Trail.d.ts +0 -12
- package/Options/Classes/Interactivity/Modes/Trail.js +0 -29
- package/Options/Classes/ManualParticle.d.ts +0 -10
- package/Options/Classes/ManualParticle.js +0 -22
- package/Options/Classes/Motion/Motion.d.ts +0 -10
- package/Options/Classes/Motion/MotionReduce.d.ts +0 -9
- package/Options/Classes/Options.d.ts +0 -48
- package/Options/Classes/Options.js +0 -174
- package/Options/Classes/OptionsColor.d.ts +0 -10
- package/Options/Classes/Particles/Bounce/Bounce.d.ts +0 -10
- package/Options/Classes/Particles/Collisions/Collisions.d.ts +0 -14
- package/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +0 -9
- package/Options/Classes/Particles/Destroy/Destroy.d.ts +0 -11
- package/Options/Classes/Particles/Destroy/Split.d.ts +0 -15
- package/Options/Classes/Particles/Destroy/Split.js +0 -31
- package/Options/Classes/Particles/Life/Life.d.ts +0 -12
- package/Options/Classes/Particles/Life/LifeDelay.d.ts +0 -9
- package/Options/Classes/Particles/Life/LifeDuration.d.ts +0 -9
- package/Options/Classes/Particles/Links/Links.d.ts +0 -22
- package/Options/Classes/Particles/Links/LinksShadow.d.ts +0 -11
- package/Options/Classes/Particles/Links/LinksTriangle.d.ts +0 -12
- package/Options/Classes/Particles/Move/Attract.d.ts +0 -15
- package/Options/Classes/Particles/Move/Attract.js +0 -47
- package/Options/Classes/Particles/Move/Move.d.ts +0 -44
- package/Options/Classes/Particles/Move/Move.js +0 -132
- package/Options/Classes/Particles/Move/MoveAngle.d.ts +0 -9
- package/Options/Classes/Particles/Move/MoveAngle.js +0 -22
- package/Options/Classes/Particles/Move/MoveGravity.d.ts +0 -11
- package/Options/Classes/Particles/Move/MoveGravity.js +0 -30
- package/Options/Classes/Particles/Move/OutModes.d.ts +0 -13
- package/Options/Classes/Particles/Move/Path/Path.d.ts +0 -13
- package/Options/Classes/Particles/Move/Path/Path.js +0 -30
- package/Options/Classes/Particles/Move/Spin.d.ts +0 -11
- package/Options/Classes/Particles/Move/Spin.js +0 -23
- package/Options/Classes/Particles/Move/Trail.d.ts +0 -11
- package/Options/Classes/Particles/Number/Density.d.ts +0 -12
- package/Options/Classes/Particles/Number/ParticlesNumber.d.ts +0 -13
- package/Options/Classes/Particles/Opacity/Opacity.d.ts +0 -12
- package/Options/Classes/Particles/Opacity/Opacity.js +0 -33
- package/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +0 -14
- package/Options/Classes/Particles/Orbit/Orbit.d.ts +0 -18
- package/Options/Classes/Particles/Orbit/Orbit.js +0 -39
- package/Options/Classes/Particles/Orbit/OrbitRotation.d.ts +0 -7
- package/Options/Classes/Particles/ParticlesOptions.d.ts +0 -58
- package/Options/Classes/Particles/ParticlesOptions.js +0 -143
- package/Options/Classes/Particles/Repulse/Repulse.d.ts +0 -13
- package/Options/Classes/Particles/Repulse/Repulse.js +0 -37
- package/Options/Classes/Particles/Roll/Roll.d.ts +0 -16
- package/Options/Classes/Particles/Roll/Roll.js +0 -35
- package/Options/Classes/Particles/Roll/RollLight.d.ts +0 -9
- package/Options/Classes/Particles/Roll/RollLight.js +0 -22
- package/Options/Classes/Particles/Rotate/Rotate.d.ts +0 -13
- package/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +0 -10
- package/Options/Classes/Particles/Rotate/RotateAnimation.js +0 -26
- package/Options/Classes/Particles/Shadow.d.ts +0 -13
- package/Options/Classes/Particles/Shape/Shape.d.ts +0 -27
- package/Options/Classes/Particles/Shape/Shape.js +0 -103
- package/Options/Classes/Particles/Size/Size.d.ts +0 -12
- package/Options/Classes/Particles/Size/Size.js +0 -33
- package/Options/Classes/Particles/Size/SizeAnimation.d.ts +0 -14
- package/Options/Classes/Particles/Stroke.d.ts +0 -11
- package/Options/Classes/Particles/Tilt/Tilt.d.ts +0 -13
- package/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +0 -10
- package/Options/Classes/Particles/Tilt/TiltAnimation.js +0 -26
- package/Options/Classes/Particles/Twinkle/Twinkle.d.ts +0 -10
- package/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +0 -12
- package/Options/Classes/Particles/Twinkle/TwinkleValues.js +0 -30
- package/Options/Classes/Particles/Wobble/Wobble.d.ts +0 -10
- package/Options/Classes/Particles/Wobble/Wobble.js +0 -26
- package/Options/Classes/Particles/ZIndex/ZIndex.d.ts +0 -11
- package/Options/Classes/Random.d.ts +0 -9
- package/Options/Classes/Responsive.d.ts +0 -12
- package/Options/Classes/Responsive.js +0 -31
- package/Options/Classes/Theme/Theme.d.ts +0 -12
- package/Options/Classes/Theme/Theme.js +0 -24
- package/Options/Classes/Theme/ThemeDefault.d.ts +0 -11
- package/Options/Classes/ValueWithRandom.d.ts +0 -10
- package/Options/Classes/ValueWithRandom.js +0 -26
- package/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +0 -7
- package/Options/Interfaces/IAnimatableGradient.d.ts +0 -8
- package/Options/Interfaces/IAnimation.d.ts +0 -7
- package/Options/Interfaces/IColorAnimation.d.ts +0 -5
- package/Options/Interfaces/IManualParticle.d.ts +0 -7
- package/Options/Interfaces/IOptionLoader.d.ts +0 -4
- package/Options/Interfaces/IOptions.d.ts +0 -34
- package/Options/Interfaces/IOptionsColor.d.ts +0 -2
- package/Options/Interfaces/IOptionsGradient.d.ts +0 -13
- package/Options/Interfaces/IResponsive.d.ts +0 -8
- package/Options/Interfaces/IValueWithRandom.d.ts +0 -6
- package/Options/Interfaces/Interactivity/Events/IClickEvent.d.ts +0 -6
- package/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +0 -11
- package/Options/Interfaces/Interactivity/Events/IEvents.d.ts +0 -13
- package/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +0 -8
- package/Options/Interfaces/Interactivity/IInteractivity.d.ts +0 -9
- package/Options/Interfaces/Interactivity/Modes/IAttract.d.ts +0 -9
- package/Options/Interfaces/Interactivity/Modes/IBubble.d.ts +0 -6
- package/Options/Interfaces/Interactivity/Modes/IBubbleBase.d.ts +0 -10
- package/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +0 -5
- package/Options/Interfaces/Interactivity/Modes/IRepulse.d.ts +0 -6
- package/Options/Interfaces/Interactivity/Modes/IRepulseBase.d.ts +0 -9
- package/Options/Interfaces/Interactivity/Modes/ITrail.d.ts +0 -8
- package/Options/Interfaces/Particles/Collisions/ICollisions.d.ts +0 -9
- package/Options/Interfaces/Particles/Destroy/IDestroy.d.ts +0 -6
- package/Options/Interfaces/Particles/Destroy/ISplit.d.ts +0 -10
- package/Options/Interfaces/Particles/IParticles.d.ts +0 -52
- package/Options/Interfaces/Particles/IStroke.d.ts +0 -7
- package/Options/Interfaces/Particles/Move/IAttract.d.ts +0 -9
- package/Options/Interfaces/Particles/Move/IMove.d.ts +0 -35
- package/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +0 -5
- package/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +0 -7
- package/Options/Interfaces/Particles/Move/IOutModes.d.ts +0 -8
- package/Options/Interfaces/Particles/Move/ISpin.d.ts +0 -7
- package/Options/Interfaces/Particles/Move/Path/IPath.d.ts +0 -9
- package/Options/Interfaces/Particles/Opacity/IOpacityAnimation.d.ts +0 -8
- package/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +0 -13
- package/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +0 -9
- package/Options/Interfaces/Particles/Roll/IRoll.d.ts +0 -12
- package/Options/Interfaces/Particles/Roll/IRollLight.d.ts +0 -5
- package/Options/Interfaces/Particles/Rotate/IRotate.d.ts +0 -8
- package/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +0 -6
- package/Options/Interfaces/Particles/Shape/ICharacterShape.d.ts +0 -8
- package/Options/Interfaces/Particles/Shape/IShape.d.ts +0 -16
- package/Options/Interfaces/Particles/Shape/IShapeValues.js +0 -13
- package/Options/Interfaces/Particles/Size/ISizeAnimation.d.ts +0 -8
- package/Options/Interfaces/Particles/Tilt/ITilt.d.ts +0 -8
- package/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +0 -6
- package/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +0 -8
- package/Options/Interfaces/Particles/Wobble/IWobble.d.ts +0 -6
- package/Options/Interfaces/Theme/ITheme.d.ts +0 -8
- package/Options/Interfaces/Theme/IThemeDefault.d.ts +0 -6
- package/Plugins/Absorbers/AbsorberContainer.d.ts +0 -7
- package/Plugins/Absorbers/AbsorberInstance.d.ts +0 -33
- package/Plugins/Absorbers/AbsorberInstance.js +0 -162
- package/Plugins/Absorbers/Absorbers.d.ts +0 -22
- package/Plugins/Absorbers/Absorbers.js +0 -118
- package/Plugins/Absorbers/Enums/index.d.ts +0 -1
- package/Plugins/Absorbers/Enums/index.js +0 -13
- package/Plugins/Absorbers/Options/Classes/Absorber.d.ts +0 -18
- package/Plugins/Absorbers/Options/Classes/Absorber.js +0 -51
- package/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +0 -11
- package/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +0 -9
- package/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +0 -13
- package/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.d.ts +0 -12
- package/Plugins/Absorbers/index.d.ts +0 -2
- package/Plugins/Absorbers/index.js +0 -80
- package/Plugins/Emitters/EmitterContainer.d.ts +0 -10
- package/Plugins/Emitters/EmitterInstance.d.ts +0 -45
- package/Plugins/Emitters/EmitterInstance.js +0 -269
- package/Plugins/Emitters/Emitters.d.ts +0 -25
- package/Plugins/Emitters/Emitters.js +0 -153
- package/Plugins/Emitters/Enums/index.d.ts +0 -2
- package/Plugins/Emitters/Enums/index.js +0 -14
- package/Plugins/Emitters/IEmitterShape.d.ts +0 -4
- package/Plugins/Emitters/Options/Classes/Emitter.d.ts +0 -28
- package/Plugins/Emitters/Options/Classes/Emitter.js +0 -67
- package/Plugins/Emitters/Options/Classes/EmitterLife.d.ts +0 -11
- package/Plugins/Emitters/Options/Classes/EmitterRate.d.ts +0 -9
- package/Plugins/Emitters/Options/Classes/EmitterRate.js +0 -22
- package/Plugins/Emitters/Options/Classes/EmitterSize.d.ts +0 -11
- package/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +0 -24
- package/Plugins/Emitters/Options/Interfaces/IEmitterOptions.d.ts +0 -12
- package/Plugins/Emitters/Options/Interfaces/IEmitterRate.d.ts +0 -5
- package/Plugins/Emitters/Options/Interfaces/IEmitterSize.d.ts +0 -5
- package/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +0 -5
- package/Plugins/Emitters/Shapes/Circle/CircleShape.js +0 -32
- package/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +0 -5
- package/Plugins/Emitters/index.d.ts +0 -3
- package/Plugins/Emitters/index.js +0 -110
- package/Plugins/PolygonMask/Enums/index.d.ts +0 -3
- package/Plugins/PolygonMask/Enums/index.js +0 -15
- package/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +0 -24
- package/Plugins/PolygonMask/Options/Classes/PolygonMask.js +0 -66
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.d.ts +0 -15
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.d.ts +0 -11
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.js +0 -29
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +0 -9
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +0 -11
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +0 -10
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +0 -18
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +0 -8
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDrawStroke.d.ts +0 -6
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskInline.d.ts +0 -4
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.d.ts +0 -6
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.d.ts +0 -5
- package/Plugins/PolygonMask/PolygonMaskInstance.d.ts +0 -38
- package/Plugins/PolygonMask/PolygonMaskInstance.js +0 -386
- package/Plugins/PolygonMask/Utils.d.ts +0 -11
- package/Plugins/PolygonMask/Utils.js +0 -124
- package/Plugins/PolygonMask/index.d.ts +0 -2
- package/Plugins/PolygonMask/index.js +0 -56
- package/Shapes/Circle/CircleDrawer.d.ts +0 -5
- package/Shapes/Image/ImageDrawer.d.ts +0 -18
- package/Shapes/Image/ImageDrawer.js +0 -132
- package/Shapes/Image/Utils.d.ts +0 -28
- package/Shapes/Image/Utils.js +0 -89
- package/Shapes/Line/LineDrawer.d.ts +0 -5
- package/Shapes/Polygon/PolygonDrawer.d.ts +0 -7
- package/Shapes/Polygon/PolygonDrawerBase.d.ts +0 -15
- package/Shapes/Polygon/TriangleDrawer.d.ts +0 -8
- package/Shapes/Square/SquareDrawer.d.ts +0 -5
- package/Shapes/Star/StarDrawer.d.ts +0 -5
- package/Shapes/Text/TextDrawer.d.ts +0 -7
- package/Shapes/Text/TextDrawer.js +0 -65
- package/Types/ShapeData.d.ts +0 -5
- package/Types/ShapeDrawerFunctions.d.ts +0 -11
- package/Types/index.d.ts +0 -6
- package/Types/index.js +0 -18
- package/Updaters/Angle/AngleUpdater.d.ts +0 -8
- package/Updaters/Angle/AngleUpdater.js +0 -79
- package/Updaters/Color/ColorUpdater.d.ts +0 -8
- package/Updaters/Color/ColorUpdater.js +0 -67
- package/Updaters/Life/LifeUpdater.d.ts +0 -8
- package/Updaters/Life/LifeUpdater.js +0 -67
- package/Updaters/Opacity/OpacityUpdater.d.ts +0 -8
- package/Updaters/Opacity/OpacityUpdater.js +0 -122
- package/Updaters/OutModes/IBounceData.d.ts +0 -11
- package/Updaters/OutModes/OutOfCanvasUpdater.d.ts +0 -13
- package/Updaters/OutModes/OutOfCanvasUpdater.js +0 -146
- package/Updaters/OutModes/Utils.js +0 -65
- package/Updaters/Roll/RollUpdater.d.ts +0 -6
- package/Updaters/Roll/RollUpdater.js +0 -63
- package/Updaters/Size/SizeUpdater.d.ts +0 -6
- package/Updaters/Size/SizeUpdater.js +0 -77
- package/Updaters/StrokeColor/StrokeColorUpdater.d.ts +0 -8
- package/Updaters/StrokeColor/StrokeColorUpdater.js +0 -84
- package/Updaters/Tilt/TiltUpdater.d.ts +0 -8
- package/Updaters/Tilt/TiltUpdater.js +0 -79
- package/Updaters/Wobble/WobbleUpdater.d.ts +0 -14
- package/Updaters/Wobble/WobbleUpdater.js +0 -51
- package/Utils/CanvasUtils.d.ts +0 -19
- package/Utils/CanvasUtils.js +0 -287
- package/Utils/ColorUtils.d.ts +0 -26
- package/Utils/ColorUtils.js +0 -476
- package/Utils/NumberUtils.d.ts +0 -23
- package/Utils/NumberUtils.js +0 -128
- package/Utils/Utils.d.ts +0 -38
- package/Utils/Utils.js +0 -269
- package/Utils/index.d.ts +0 -4
- package/Utils/index.js +0 -16
- package/browser/Core/Canvas.d.ts +0 -64
- package/browser/Core/Container.d.ts +0 -163
- package/browser/Core/Interfaces/Colors.d.ts +0 -56
- package/browser/Core/Interfaces/Gradients.d.ts +0 -21
- package/browser/Core/Interfaces/IAttract.d.ts +0 -10
- package/browser/Core/Interfaces/IBounds.d.ts +0 -9
- package/browser/Core/Interfaces/IBubble.d.ts +0 -7
- package/browser/Core/Interfaces/IBubbleParticleData.d.ts +0 -12
- package/browser/Core/Interfaces/ICircleBouncer.d.ts +0 -9
- package/browser/Core/Interfaces/IContainerInteractivity.d.ts +0 -9
- package/browser/Core/Interfaces/IContainerPlugin.d.ts +0 -35
- package/browser/Core/Interfaces/ICoordinates.d.ts +0 -18
- package/browser/Core/Interfaces/IDelta.d.ts +0 -7
- package/browser/Core/Interfaces/IDimension.d.ts +0 -7
- package/browser/Core/Interfaces/IDistance.d.ts +0 -4
- package/browser/Core/Interfaces/IExternalInteractor.d.ts +0 -9
- package/browser/Core/Interfaces/IInteractor.d.ts +0 -9
- package/browser/Core/Interfaces/IMouseData.d.ts +0 -12
- package/browser/Core/Interfaces/IMovePathGenerator.d.ts +0 -11
- package/browser/Core/Interfaces/IParticle.d.ts +0 -58
- package/browser/Core/Interfaces/IParticleGradientAnimation.d.ts +0 -8
- package/browser/Core/Interfaces/IParticleGradientColorAnimation.d.ts +0 -7
- package/browser/Core/Interfaces/IParticleGravity.d.ts +0 -5
- package/browser/Core/Interfaces/IParticleHslAnimation.d.ts +0 -6
- package/browser/Core/Interfaces/IParticleLife.d.ts +0 -7
- package/browser/Core/Interfaces/IParticleLoops.d.ts +0 -4
- package/browser/Core/Interfaces/IParticleRetinaProps.d.ts +0 -12
- package/browser/Core/Interfaces/IParticleRoll.d.ts +0 -9
- package/browser/Core/Interfaces/IParticleSpin.d.ts +0 -9
- package/browser/Core/Interfaces/IParticleUpdater.d.ts +0 -9
- package/browser/Core/Interfaces/IParticleValueAnimation.d.ts +0 -20
- package/browser/Core/Interfaces/IParticleWobble.d.ts +0 -4
- package/browser/Core/Interfaces/IParticlesFrequencies.d.ts +0 -4
- package/browser/Core/Interfaces/IParticlesInteractor.d.ts +0 -10
- package/browser/Core/Interfaces/IPlugin.d.ts +0 -19
- package/browser/Core/Interfaces/IRangeValue.d.ts +0 -4
- package/browser/Core/Interfaces/IRectSideResult.d.ts +0 -5
- package/browser/Core/Interfaces/IRepulse.d.ts +0 -10
- package/browser/Core/Interfaces/IShapeDrawer.d.ts +0 -13
- package/browser/Core/Interfaces/IShapeValues.d.ts +0 -11
- package/browser/Core/Interfaces/index.d.ts +0 -37
- package/browser/Core/Interfaces/index.js +0 -37
- package/browser/Core/Loader.d.ts +0 -77
- package/browser/Core/Particle.d.ts +0 -80
- package/browser/Core/Particles.d.ts +0 -59
- package/browser/Core/Retina.d.ts +0 -32
- package/browser/Core/Utils/Circle.d.ts +0 -11
- package/browser/Core/Utils/CircleWarp.d.ts +0 -12
- package/browser/Core/Utils/Constants.d.ts +0 -22
- package/browser/Core/Utils/EventListeners.d.ts +0 -65
- package/browser/Core/Utils/ExternalInteractorBase.d.ts +0 -12
- package/browser/Core/Utils/FrameManager.d.ts +0 -14
- package/browser/Core/Utils/InteractionManager.d.ts +0 -17
- package/browser/Core/Utils/ParticlesInteractorBase.d.ts +0 -12
- package/browser/Core/Utils/ParticlesMover.d.ts +0 -16
- package/browser/Core/Utils/ParticlesMover.js +0 -187
- package/browser/Core/Utils/Plugins.d.ts +0 -39
- package/browser/Core/Utils/Point.d.ts +0 -10
- package/browser/Core/Utils/QuadTree.d.ts +0 -26
- package/browser/Core/Utils/Range.d.ts +0 -10
- package/browser/Core/Utils/Rectangle.d.ts +0 -11
- package/browser/Core/Utils/Vector.d.ts +0 -29
- package/browser/Core/Utils/Vector3d.d.ts +0 -18
- package/browser/Core/Utils/index.d.ts +0 -16
- package/browser/Core/Utils/index.js +0 -16
- package/browser/Core/index.d.ts +0 -8
- package/browser/Core/index.js +0 -8
- package/browser/Enums/AnimationStatus.d.ts +0 -4
- package/browser/Enums/Directions/MoveDirection.d.ts +0 -15
- package/browser/Enums/Directions/OutModeDirection.d.ts +0 -6
- package/browser/Enums/Directions/RotateDirection.d.ts +0 -9
- package/browser/Enums/Directions/TiltDirection.d.ts +0 -9
- package/browser/Enums/Directions/index.d.ts +0 -4
- package/browser/Enums/Directions/index.js +0 -4
- package/browser/Enums/InteractivityDetect.d.ts +0 -8
- package/browser/Enums/Modes/ClickMode.d.ts +0 -12
- package/browser/Enums/Modes/CollisionMode.d.ts +0 -8
- package/browser/Enums/Modes/DestroyMode.d.ts +0 -4
- package/browser/Enums/Modes/DivMode.d.ts +0 -8
- package/browser/Enums/Modes/HoverMode.d.ts +0 -14
- package/browser/Enums/Modes/OutMode.d.ts +0 -13
- package/browser/Enums/Modes/ResponsiveMode.d.ts +0 -4
- package/browser/Enums/Modes/RollMode.d.ts +0 -5
- package/browser/Enums/Modes/SizeMode.d.ts +0 -7
- package/browser/Enums/Modes/ThemeMode.d.ts +0 -5
- package/browser/Enums/Modes/index.d.ts +0 -10
- package/browser/Enums/Modes/index.js +0 -10
- package/browser/Enums/Types/AlterType.d.ts +0 -4
- package/browser/Enums/Types/DestroyType.d.ts +0 -8
- package/browser/Enums/Types/DivType.d.ts +0 -7
- package/browser/Enums/Types/EasingType.d.ts +0 -10
- package/browser/Enums/Types/GradientType.d.ts +0 -5
- package/browser/Enums/Types/InteractorType.d.ts +0 -4
- package/browser/Enums/Types/OrbitType.d.ts +0 -7
- package/browser/Enums/Types/ShapeType.d.ts +0 -16
- package/browser/Enums/Types/StartValueType.d.ts +0 -8
- package/browser/Enums/Types/index.d.ts +0 -9
- package/browser/Enums/Types/index.js +0 -9
- package/browser/Enums/index.d.ts +0 -5
- package/browser/Enums/index.js +0 -5
- package/browser/Interactions/External/Attract/Attractor.d.ts +0 -15
- package/browser/Interactions/External/Attract/index.d.ts +0 -2
- package/browser/Interactions/External/Bounce/Bouncer.d.ts +0 -11
- package/browser/Interactions/External/Bounce/index.d.ts +0 -2
- package/browser/Interactions/External/Bubble/Bubbler.d.ts +0 -20
- package/browser/Interactions/External/Bubble/IBubblerProcessParam.d.ts +0 -16
- package/browser/Interactions/External/Bubble/ProcessBubbleType.d.ts +0 -8
- package/browser/Interactions/External/Bubble/index.d.ts +0 -2
- package/browser/Interactions/External/Connect/Connector.d.ts +0 -15
- package/browser/Interactions/External/Connect/index.d.ts +0 -2
- package/browser/Interactions/External/Grab/Grabber.d.ts +0 -12
- package/browser/Interactions/External/Grab/index.d.ts +0 -2
- package/browser/Interactions/External/Repulse/Repulser.d.ts +0 -16
- package/browser/Interactions/External/Repulse/index.d.ts +0 -2
- package/browser/Interactions/External/Trail/TrailMaker.d.ts +0 -13
- package/browser/Interactions/External/Trail/index.d.ts +0 -2
- package/browser/Interactions/Particles/Attract/Attractor.d.ts +0 -11
- package/browser/Interactions/Particles/Attract/index.d.ts +0 -2
- package/browser/Interactions/Particles/Collisions/Collider.d.ts +0 -13
- package/browser/Interactions/Particles/Collisions/index.d.ts +0 -2
- package/browser/Interactions/Particles/Links/ILink.d.ts +0 -15
- package/browser/Interactions/Particles/Links/LinkInstance.d.ts +0 -10
- package/browser/Interactions/Particles/Links/LinkParticle.d.ts +0 -5
- package/browser/Interactions/Particles/Links/Linker.d.ts +0 -10
- package/browser/Interactions/Particles/Links/index.d.ts +0 -2
- package/browser/Interactions/Particles/Links/interaction.d.ts +0 -2
- package/browser/Interactions/Particles/Links/plugin.d.ts +0 -2
- package/browser/Options/Classes/AnimatableColor.d.ts +0 -15
- package/browser/Options/Classes/AnimatableGradient.d.ts +0 -53
- package/browser/Options/Classes/AnimationOptions.d.ts +0 -11
- package/browser/Options/Classes/Background/Background.d.ts +0 -18
- package/browser/Options/Classes/BackgroundMask/BackgroundMask.d.ts +0 -25
- package/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +0 -13
- package/browser/Options/Classes/ColorAnimation.d.ts +0 -15
- package/browser/Options/Classes/FullScreen/FullScreen.d.ts +0 -25
- package/browser/Options/Classes/HslAnimation.d.ts +0 -11
- package/browser/Options/Classes/Interactivity/Events/ClickEvent.d.ts +0 -20
- package/browser/Options/Classes/Interactivity/Events/DivEvent.d.ts +0 -55
- package/browser/Options/Classes/Interactivity/Events/Events.d.ts +0 -51
- package/browser/Options/Classes/Interactivity/Events/HoverEvent.d.ts +0 -16
- package/browser/Options/Classes/Interactivity/Events/Parallax.d.ts +0 -13
- package/browser/Options/Classes/Interactivity/Interactivity.d.ts +0 -28
- package/browser/Options/Classes/Interactivity/Modes/Attract.d.ts +0 -17
- package/browser/Options/Classes/Interactivity/Modes/Bounce.d.ts +0 -8
- package/browser/Options/Classes/Interactivity/Modes/Bubble.d.ts +0 -12
- package/browser/Options/Classes/Interactivity/Modes/BubbleBase.d.ts +0 -16
- package/browser/Options/Classes/Interactivity/Modes/BubbleDiv.d.ts +0 -20
- package/browser/Options/Classes/Interactivity/Modes/Connect.d.ts +0 -36
- package/browser/Options/Classes/Interactivity/Modes/ConnectLinks.d.ts +0 -11
- package/browser/Options/Classes/Interactivity/Modes/Grab.d.ts +0 -35
- package/browser/Options/Classes/Interactivity/Modes/GrabLinks.d.ts +0 -15
- package/browser/Options/Classes/Interactivity/Modes/Light.d.ts +0 -11
- package/browser/Options/Classes/Interactivity/Modes/LightArea.d.ts +0 -10
- package/browser/Options/Classes/Interactivity/Modes/LightGradient.d.ts +0 -10
- package/browser/Options/Classes/Interactivity/Modes/LightShadow.d.ts +0 -10
- package/browser/Options/Classes/Interactivity/Modes/Modes.d.ts +0 -33
- package/browser/Options/Classes/Interactivity/Modes/Push.d.ts +0 -24
- package/browser/Options/Classes/Interactivity/Modes/Remove.d.ts +0 -22
- package/browser/Options/Classes/Interactivity/Modes/Repulse.d.ts +0 -12
- package/browser/Options/Classes/Interactivity/Modes/RepulseBase.d.ts +0 -17
- package/browser/Options/Classes/Interactivity/Modes/RepulseDiv.d.ts +0 -20
- package/browser/Options/Classes/Interactivity/Modes/Slow.d.ts +0 -20
- package/browser/Options/Classes/Interactivity/Modes/Trail.d.ts +0 -15
- package/browser/Options/Classes/ManualParticle.d.ts +0 -10
- package/browser/Options/Classes/Motion/Motion.d.ts +0 -21
- package/browser/Options/Classes/Motion/MotionReduce.d.ts +0 -18
- package/browser/Options/Classes/Options.d.ts +0 -78
- package/browser/Options/Classes/OptionsColor.d.ts +0 -14
- package/browser/Options/Classes/Particles/Bounce/Bounce.d.ts +0 -10
- package/browser/Options/Classes/Particles/Bounce/BounceFactor.d.ts +0 -4
- package/browser/Options/Classes/Particles/Collisions/Collisions.d.ts +0 -18
- package/browser/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +0 -9
- package/browser/Options/Classes/Particles/Destroy/Destroy.d.ts +0 -11
- package/browser/Options/Classes/Particles/Destroy/Split.d.ts +0 -15
- package/browser/Options/Classes/Particles/Destroy/SplitFactor.d.ts +0 -4
- package/browser/Options/Classes/Particles/Destroy/SplitRate.d.ts +0 -4
- package/browser/Options/Classes/Particles/Life/Life.d.ts +0 -12
- package/browser/Options/Classes/Particles/Life/LifeDelay.d.ts +0 -9
- package/browser/Options/Classes/Particles/Life/LifeDuration.d.ts +0 -9
- package/browser/Options/Classes/Particles/Links/Links.d.ts +0 -26
- package/browser/Options/Classes/Particles/Links/LinksShadow.d.ts +0 -14
- package/browser/Options/Classes/Particles/Links/LinksTriangle.d.ts +0 -15
- package/browser/Options/Classes/Particles/Move/Attract.d.ts +0 -36
- package/browser/Options/Classes/Particles/Move/Move.d.ts +0 -86
- package/browser/Options/Classes/Particles/Move/MoveAngle.d.ts +0 -12
- package/browser/Options/Classes/Particles/Move/MoveGravity.d.ts +0 -11
- package/browser/Options/Classes/Particles/Move/OutModes.d.ts +0 -13
- package/browser/Options/Classes/Particles/Move/Path/Path.d.ts +0 -16
- package/browser/Options/Classes/Particles/Move/Path/PathDelay.d.ts +0 -4
- package/browser/Options/Classes/Particles/Move/Spin.d.ts +0 -11
- package/browser/Options/Classes/Particles/Move/Trail.d.ts +0 -14
- package/browser/Options/Classes/Particles/Number/Density.d.ts +0 -24
- package/browser/Options/Classes/Particles/Number/ParticlesNumber.d.ts +0 -23
- package/browser/Options/Classes/Particles/Opacity/Opacity.d.ts +0 -25
- package/browser/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +0 -29
- package/browser/Options/Classes/Particles/Orbit/Orbit.d.ts +0 -22
- package/browser/Options/Classes/Particles/Orbit/OrbitRotation.d.ts +0 -10
- package/browser/Options/Classes/Particles/ParticlesOptions.d.ts +0 -80
- package/browser/Options/Classes/Particles/Repulse/Repulse.d.ts +0 -16
- package/browser/Options/Classes/Particles/Roll/Roll.d.ts +0 -16
- package/browser/Options/Classes/Particles/Roll/RollLight.d.ts +0 -9
- package/browser/Options/Classes/Particles/Rotate/Rotate.d.ts +0 -17
- package/browser/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +0 -13
- package/browser/Options/Classes/Particles/Shadow.d.ts +0 -17
- package/browser/Options/Classes/Particles/Shape/Shape.d.ts +0 -69
- package/browser/Options/Classes/Particles/Size/Size.d.ts +0 -25
- package/browser/Options/Classes/Particles/Size/SizeAnimation.d.ts +0 -29
- package/browser/Options/Classes/Particles/Stroke.d.ts +0 -15
- package/browser/Options/Classes/Particles/Tilt/Tilt.d.ts +0 -17
- package/browser/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +0 -13
- package/browser/Options/Classes/Particles/Twinkle/Twinkle.d.ts +0 -14
- package/browser/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +0 -15
- package/browser/Options/Classes/Particles/Wobble/Wobble.d.ts +0 -10
- package/browser/Options/Classes/Particles/ZIndex/ZIndex.d.ts +0 -14
- package/browser/Options/Classes/Random.d.ts +0 -9
- package/browser/Options/Classes/Responsive.d.ts +0 -12
- package/browser/Options/Classes/Theme/Theme.d.ts +0 -12
- package/browser/Options/Classes/Theme/ThemeDefault.d.ts +0 -11
- package/browser/Options/Classes/ValueWithRandom.d.ts +0 -13
- package/browser/Options/Interfaces/Background/IBackground.d.ts +0 -44
- package/browser/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +0 -28
- package/browser/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.d.ts +0 -15
- package/browser/Options/Interfaces/FullScreen/IFullScreen.d.ts +0 -20
- package/browser/Options/Interfaces/IAnimatable.d.ts +0 -4
- package/browser/Options/Interfaces/IAnimatableColor.d.ts +0 -14
- package/browser/Options/Interfaces/IAnimatableGradient.d.ts +0 -8
- package/browser/Options/Interfaces/IAnimation.d.ts +0 -17
- package/browser/Options/Interfaces/IColorAnimation.d.ts +0 -12
- package/browser/Options/Interfaces/IHslAnimation.d.ts +0 -6
- package/browser/Options/Interfaces/IManualParticle.d.ts +0 -18
- package/browser/Options/Interfaces/IOptionLoader.d.ts +0 -13
- package/browser/Options/Interfaces/IOptions.d.ts +0 -105
- package/browser/Options/Interfaces/IOptionsColor.d.ts +0 -7
- package/browser/Options/Interfaces/IOptionsGradient.d.ts +0 -13
- package/browser/Options/Interfaces/IRandom.d.ts +0 -4
- package/browser/Options/Interfaces/IResponsive.d.ts +0 -8
- package/browser/Options/Interfaces/IValueWithRandom.d.ts +0 -9
- package/browser/Options/Interfaces/Interactivity/Events/IClickEvent.d.ts +0 -18
- package/browser/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +0 -24
- package/browser/Options/Interfaces/Interactivity/Events/IEvents.d.ts +0 -26
- package/browser/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +0 -12
- package/browser/Options/Interfaces/Interactivity/Events/IParallax.d.ts +0 -8
- package/browser/Options/Interfaces/Interactivity/IInteractivity.d.ts +0 -29
- package/browser/Options/Interfaces/Interactivity/Modes/IAttract.d.ts +0 -12
- package/browser/Options/Interfaces/Interactivity/Modes/IBounce.d.ts +0 -3
- package/browser/Options/Interfaces/Interactivity/Modes/IBubble.d.ts +0 -9
- package/browser/Options/Interfaces/Interactivity/Modes/IBubbleBase.d.ts +0 -13
- package/browser/Options/Interfaces/Interactivity/Modes/IBubbleDiv.d.ts +0 -7
- package/browser/Options/Interfaces/Interactivity/Modes/IConnect.d.ts +0 -17
- package/browser/Options/Interfaces/Interactivity/Modes/IConnectLinks.d.ts +0 -6
- package/browser/Options/Interfaces/Interactivity/Modes/IGrab.d.ts +0 -16
- package/browser/Options/Interfaces/Interactivity/Modes/IGrabLinks.d.ts +0 -10
- package/browser/Options/Interfaces/Interactivity/Modes/ILight.d.ts +0 -6
- package/browser/Options/Interfaces/Interactivity/Modes/ILightArea.d.ts +0 -9
- package/browser/Options/Interfaces/Interactivity/Modes/ILightShadow.d.ts +0 -5
- package/browser/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +0 -11
- package/browser/Options/Interfaces/Interactivity/Modes/IModes.d.ts +0 -26
- package/browser/Options/Interfaces/Interactivity/Modes/IPush.d.ts +0 -12
- package/browser/Options/Interfaces/Interactivity/Modes/IRemove.d.ts +0 -10
- package/browser/Options/Interfaces/Interactivity/Modes/IRepulse.d.ts +0 -9
- package/browser/Options/Interfaces/Interactivity/Modes/IRepulseBase.d.ts +0 -12
- package/browser/Options/Interfaces/Interactivity/Modes/IRepulseDiv.d.ts +0 -7
- package/browser/Options/Interfaces/Interactivity/Modes/ISlow.d.ts +0 -11
- package/browser/Options/Interfaces/Interactivity/Modes/ITrail.d.ts +0 -11
- package/browser/Options/Interfaces/Motion/IMotion.d.ts +0 -16
- package/browser/Options/Interfaces/Motion/IMotionReduce.d.ts +0 -13
- package/browser/Options/Interfaces/Particles/Bounce/IBounce.d.ts +0 -5
- package/browser/Options/Interfaces/Particles/Collisions/ICollisions.d.ts +0 -13
- package/browser/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.d.ts +0 -4
- package/browser/Options/Interfaces/Particles/Destroy/IDestroy.d.ts +0 -10
- package/browser/Options/Interfaces/Particles/Destroy/ISplit.d.ts +0 -10
- package/browser/Options/Interfaces/Particles/IParticles.d.ts +0 -62
- package/browser/Options/Interfaces/Particles/IShadow.d.ts +0 -12
- package/browser/Options/Interfaces/Particles/IStroke.d.ts +0 -21
- package/browser/Options/Interfaces/Particles/Life/ILife.d.ts +0 -7
- package/browser/Options/Interfaces/Particles/Life/ILifeDelay.d.ts +0 -4
- package/browser/Options/Interfaces/Particles/Life/ILifeDuration.d.ts +0 -4
- package/browser/Options/Interfaces/Particles/Links/ILinks.d.ts +0 -60
- package/browser/Options/Interfaces/Particles/Links/ILinksShadow.d.ts +0 -9
- package/browser/Options/Interfaces/Particles/Links/ILinksTriangle.d.ts +0 -10
- package/browser/Options/Interfaces/Particles/Move/IAttract.d.ts +0 -18
- package/browser/Options/Interfaces/Particles/Move/IMove.d.ts +0 -54
- package/browser/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +0 -8
- package/browser/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +0 -7
- package/browser/Options/Interfaces/Particles/Move/IOutModes.d.ts +0 -8
- package/browser/Options/Interfaces/Particles/Move/ISpin.d.ts +0 -7
- package/browser/Options/Interfaces/Particles/Move/ITrail.d.ts +0 -9
- package/browser/Options/Interfaces/Particles/Move/Path/IPath.d.ts +0 -12
- package/browser/Options/Interfaces/Particles/Number/IDensity.d.ts +0 -12
- package/browser/Options/Interfaces/Particles/Number/IParticlesNumber.d.ts +0 -14
- package/browser/Options/Interfaces/Particles/Opacity/IOpacity.d.ts +0 -13
- package/browser/Options/Interfaces/Particles/Opacity/IOpacityAnimation.d.ts +0 -17
- package/browser/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +0 -20
- package/browser/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +0 -13
- package/browser/Options/Interfaces/Particles/Roll/IRoll.d.ts +0 -12
- package/browser/Options/Interfaces/Particles/Roll/IRollLight.d.ts +0 -5
- package/browser/Options/Interfaces/Particles/Rotate/IRotate.d.ts +0 -12
- package/browser/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +0 -9
- package/browser/Options/Interfaces/Particles/Shape/ICharacterShape.d.ts +0 -11
- package/browser/Options/Interfaces/Particles/Shape/IImageShape.d.ts +0 -14
- package/browser/Options/Interfaces/Particles/Shape/IPolygonShape.d.ts +0 -11
- package/browser/Options/Interfaces/Particles/Shape/IShape.d.ts +0 -38
- package/browser/Options/Interfaces/Particles/Shape/IShapeValues.d.ts +0 -1
- package/browser/Options/Interfaces/Particles/Shape/IStarShape.d.ts +0 -12
- package/browser/Options/Interfaces/Particles/Size/ISize.d.ts +0 -13
- package/browser/Options/Interfaces/Particles/Size/ISizeAnimation.d.ts +0 -17
- package/browser/Options/Interfaces/Particles/Tilt/ITilt.d.ts +0 -12
- package/browser/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +0 -9
- package/browser/Options/Interfaces/Particles/Twinkle/ITwinkle.d.ts +0 -9
- package/browser/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +0 -11
- package/browser/Options/Interfaces/Particles/Wobble/IWobble.d.ts +0 -6
- package/browser/Options/Interfaces/Particles/ZIndex/IZIndex.d.ts +0 -10
- package/browser/Options/Interfaces/Theme/ITheme.d.ts +0 -22
- package/browser/Options/Interfaces/Theme/IThemeDefault.d.ts +0 -22
- package/browser/Plugins/Absorbers/AbsorberContainer.d.ts +0 -7
- package/browser/Plugins/Absorbers/AbsorberInstance.d.ts +0 -36
- package/browser/Plugins/Absorbers/Absorbers.d.ts +0 -25
- package/browser/Plugins/Absorbers/Enums/AbsorberClickMode.d.ts +0 -6
- package/browser/Plugins/Absorbers/Enums/index.d.ts +0 -1
- package/browser/Plugins/Absorbers/Enums/index.js +0 -1
- package/browser/Plugins/Absorbers/Options/Classes/Absorber.d.ts +0 -22
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +0 -11
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +0 -9
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +0 -42
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.d.ts +0 -15
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +0 -6
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +0 -4
- package/browser/Plugins/Absorbers/index.d.ts +0 -2
- package/browser/Plugins/Emitters/EmitterContainer.d.ts +0 -10
- package/browser/Plugins/Emitters/EmitterInstance.d.ts +0 -48
- package/browser/Plugins/Emitters/Emitters.d.ts +0 -28
- package/browser/Plugins/Emitters/EmittersEngine.d.ts +0 -7
- package/browser/Plugins/Emitters/Enums/EmitterClickMode.d.ts +0 -6
- package/browser/Plugins/Emitters/Enums/EmitterShapeType.d.ts +0 -4
- package/browser/Plugins/Emitters/Enums/index.d.ts +0 -2
- package/browser/Plugins/Emitters/Enums/index.js +0 -2
- package/browser/Plugins/Emitters/IEmitterShape.d.ts +0 -4
- package/browser/Plugins/Emitters/Options/Classes/Emitter.d.ts +0 -32
- package/browser/Plugins/Emitters/Options/Classes/EmitterLife.d.ts +0 -14
- package/browser/Plugins/Emitters/Options/Classes/EmitterRate.d.ts +0 -12
- package/browser/Plugins/Emitters/Options/Classes/EmitterSize.d.ts +0 -14
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +0 -71
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitterLife.d.ts +0 -25
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitterOptions.d.ts +0 -15
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitterRate.d.ts +0 -16
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitterSize.d.ts +0 -8
- package/browser/Plugins/Emitters/ShapeManager.d.ts +0 -9
- package/browser/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +0 -5
- package/browser/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +0 -5
- package/browser/Plugins/Emitters/index.d.ts +0 -3
- package/browser/Plugins/PolygonMask/Enums/PolygonMaskInlineArrangement.d.ts +0 -8
- package/browser/Plugins/PolygonMask/Enums/PolygonMaskMoveType.d.ts +0 -4
- package/browser/Plugins/PolygonMask/Enums/PolygonMaskType.d.ts +0 -6
- package/browser/Plugins/PolygonMask/Enums/index.d.ts +0 -3
- package/browser/Plugins/PolygonMask/Enums/index.js +0 -3
- package/browser/Plugins/PolygonMask/Interfaces/ISvgPath.d.ts +0 -6
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +0 -34
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.d.ts +0 -30
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.d.ts +0 -14
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +0 -12
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +0 -14
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +0 -13
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +0 -25
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +0 -17
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDrawStroke.d.ts +0 -9
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskInline.d.ts +0 -7
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.d.ts +0 -9
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.d.ts +0 -8
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskOptions.d.ts +0 -7
- package/browser/Plugins/PolygonMask/PolygonMaskInstance.d.ts +0 -50
- package/browser/Plugins/PolygonMask/Types.d.ts +0 -8
- package/browser/Plugins/PolygonMask/Utils.d.ts +0 -11
- package/browser/Plugins/PolygonMask/index.d.ts +0 -2
- package/browser/Plugins/PolygonMask/pathseg.d.ts +0 -0
- package/browser/Shapes/Circle/CircleDrawer.d.ts +0 -8
- package/browser/Shapes/Circle/index.d.ts +0 -2
- package/browser/Shapes/Image/ImageDrawer.d.ts +0 -21
- package/browser/Shapes/Image/Utils.d.ts +0 -31
- package/browser/Shapes/Image/index.d.ts +0 -2
- package/browser/Shapes/Line/LineDrawer.d.ts +0 -8
- package/browser/Shapes/Line/index.d.ts +0 -2
- package/browser/Shapes/Polygon/PolygonDrawer.d.ts +0 -10
- package/browser/Shapes/Polygon/PolygonDrawerBase.d.ts +0 -18
- package/browser/Shapes/Polygon/TriangleDrawer.d.ts +0 -11
- package/browser/Shapes/Polygon/index.d.ts +0 -4
- package/browser/Shapes/Square/SquareDrawer.d.ts +0 -8
- package/browser/Shapes/Square/index.d.ts +0 -2
- package/browser/Shapes/Star/StarDrawer.d.ts +0 -8
- package/browser/Shapes/Star/index.d.ts +0 -2
- package/browser/Shapes/Text/TextDrawer.d.ts +0 -10
- package/browser/Shapes/Text/index.d.ts +0 -2
- package/browser/Types/ParticlesGroups.d.ts +0 -8
- package/browser/Types/PathOptions.d.ts +0 -3
- package/browser/Types/RangeValue.d.ts +0 -2
- package/browser/Types/RecursivePartial.d.ts +0 -6
- package/browser/Types/ShapeData.d.ts +0 -8
- package/browser/Types/ShapeDrawerFunctions.d.ts +0 -32
- package/browser/Types/SingleOrMultiple.d.ts +0 -4
- package/browser/Types/index.d.ts +0 -6
- package/browser/Types/index.js +0 -6
- package/browser/Updaters/Angle/AngleUpdater.d.ts +0 -8
- package/browser/Updaters/Angle/index.d.ts +0 -2
- package/browser/Updaters/Color/ColorUpdater.d.ts +0 -8
- package/browser/Updaters/Color/index.d.ts +0 -2
- package/browser/Updaters/Life/LifeUpdater.d.ts +0 -8
- package/browser/Updaters/Life/index.d.ts +0 -2
- package/browser/Updaters/Opacity/OpacityUpdater.d.ts +0 -8
- package/browser/Updaters/Opacity/index.d.ts +0 -2
- package/browser/Updaters/OutModes/IBounceData.d.ts +0 -11
- package/browser/Updaters/OutModes/OutOfCanvasUpdater.d.ts +0 -13
- package/browser/Updaters/OutModes/Utils.d.ts +0 -3
- package/browser/Updaters/OutModes/index.d.ts +0 -2
- package/browser/Updaters/Roll/RollUpdater.d.ts +0 -6
- package/browser/Updaters/Roll/index.d.ts +0 -2
- package/browser/Updaters/Size/SizeUpdater.d.ts +0 -6
- package/browser/Updaters/Size/index.d.ts +0 -2
- package/browser/Updaters/StrokeColor/StrokeColorUpdater.d.ts +0 -8
- package/browser/Updaters/StrokeColor/index.d.ts +0 -2
- package/browser/Updaters/Tilt/TiltUpdater.d.ts +0 -8
- package/browser/Updaters/Tilt/index.d.ts +0 -2
- package/browser/Updaters/Wobble/WobbleUpdater.d.ts +0 -14
- package/browser/Updaters/Wobble/index.d.ts +0 -2
- package/browser/Utils/CanvasUtils.d.ts +0 -19
- package/browser/Utils/ColorUtils.d.ts +0 -46
- package/browser/Utils/NumberUtils.d.ts +0 -50
- package/browser/Utils/Utils.d.ts +0 -43
- package/browser/Utils/index.d.ts +0 -4
- package/browser/Utils/index.js +0 -4
- package/browser/engine.d.ts +0 -119
- package/browser/index.d.ts +0 -20
- package/browser/index.engine.d.ts +0 -13
- package/browser/index.slim.d.ts +0 -14
- package/browser/pjs.d.ts +0 -41
- package/engine.d.ts +0 -26
- package/engine.js +0 -98
- package/esm/Core/Canvas.d.ts +0 -35
- package/esm/Core/Container.d.ts +0 -68
- package/esm/Core/Interfaces/Colors.d.ts +0 -33
- package/esm/Core/Interfaces/Gradients.d.ts +0 -21
- package/esm/Core/Interfaces/IAttract.d.ts +0 -7
- package/esm/Core/Interfaces/IBounds.d.ts +0 -6
- package/esm/Core/Interfaces/IBubble.d.ts +0 -4
- package/esm/Core/Interfaces/IBubbleParticleData.d.ts +0 -9
- package/esm/Core/Interfaces/ICircleBouncer.d.ts +0 -9
- package/esm/Core/Interfaces/IContainerInteractivity.d.ts +0 -6
- package/esm/Core/Interfaces/IContainerPlugin.d.ts +0 -32
- package/esm/Core/Interfaces/ICoordinates.d.ts +0 -15
- package/esm/Core/Interfaces/IDelta.d.ts +0 -4
- package/esm/Core/Interfaces/IDimension.d.ts +0 -4
- package/esm/Core/Interfaces/IDistance.d.ts +0 -4
- package/esm/Core/Interfaces/IExternalInteractor.d.ts +0 -6
- package/esm/Core/Interfaces/IInteractor.d.ts +0 -6
- package/esm/Core/Interfaces/IMouseData.d.ts +0 -9
- package/esm/Core/Interfaces/IMovePathGenerator.d.ts +0 -8
- package/esm/Core/Interfaces/IParticle.d.ts +0 -55
- package/esm/Core/Interfaces/IParticleGradientAnimation.d.ts +0 -8
- package/esm/Core/Interfaces/IParticleGradientColorAnimation.d.ts +0 -7
- package/esm/Core/Interfaces/IParticleGravity.d.ts +0 -5
- package/esm/Core/Interfaces/IParticleHslAnimation.d.ts +0 -6
- package/esm/Core/Interfaces/IParticleLife.d.ts +0 -7
- package/esm/Core/Interfaces/IParticleLoops.d.ts +0 -4
- package/esm/Core/Interfaces/IParticleRetinaProps.d.ts +0 -12
- package/esm/Core/Interfaces/IParticleRoll.d.ts +0 -9
- package/esm/Core/Interfaces/IParticleSpin.d.ts +0 -9
- package/esm/Core/Interfaces/IParticleUpdater.d.ts +0 -9
- package/esm/Core/Interfaces/IParticleValueAnimation.d.ts +0 -17
- package/esm/Core/Interfaces/IParticleWobble.d.ts +0 -4
- package/esm/Core/Interfaces/IParticlesFrequencies.d.ts +0 -4
- package/esm/Core/Interfaces/IParticlesInteractor.d.ts +0 -7
- package/esm/Core/Interfaces/IPlugin.d.ts +0 -11
- package/esm/Core/Interfaces/IRangeValue.d.ts +0 -4
- package/esm/Core/Interfaces/IRectSideResult.d.ts +0 -5
- package/esm/Core/Interfaces/IRepulse.d.ts +0 -7
- package/esm/Core/Interfaces/IRepulse.js +0 -1
- package/esm/Core/Interfaces/IShapeDrawer.d.ts +0 -10
- package/esm/Core/Interfaces/IShapeValues.d.ts +0 -8
- package/esm/Core/Interfaces/index.d.ts +0 -37
- package/esm/Core/Interfaces/index.js +0 -37
- package/esm/Core/Loader.d.ts +0 -32
- package/esm/Core/Particle.d.ts +0 -73
- package/esm/Core/Particles.d.ts +0 -46
- package/esm/Core/Retina.d.ts +0 -26
- package/esm/Core/Utils/Circle.d.ts +0 -8
- package/esm/Core/Utils/CircleWarp.d.ts +0 -9
- package/esm/Core/Utils/Constants.d.ts +0 -18
- package/esm/Core/Utils/EventListeners.d.ts +0 -33
- package/esm/Core/Utils/ExternalInteractorBase.d.ts +0 -12
- package/esm/Core/Utils/FrameManager.d.ts +0 -6
- package/esm/Core/Utils/InteractionManager.d.ts +0 -14
- package/esm/Core/Utils/ParticlesInteractorBase.d.ts +0 -12
- package/esm/Core/Utils/ParticlesMover.d.ts +0 -13
- package/esm/Core/Utils/ParticlesMover.js +0 -182
- package/esm/Core/Utils/Plugins.d.ts +0 -36
- package/esm/Core/Utils/Point.d.ts +0 -7
- package/esm/Core/Utils/QuadTree.d.ts +0 -23
- package/esm/Core/Utils/Range.d.ts +0 -7
- package/esm/Core/Utils/Rectangle.d.ts +0 -8
- package/esm/Core/Utils/Vector.d.ts +0 -29
- package/esm/Core/Utils/Vector3d.d.ts +0 -18
- package/esm/Core/Utils/index.d.ts +0 -16
- package/esm/Core/Utils/index.js +0 -16
- package/esm/Core/index.d.ts +0 -8
- package/esm/Core/index.js +0 -8
- package/esm/Enums/AnimationStatus.d.ts +0 -4
- package/esm/Enums/Directions/MoveDirection.d.ts +0 -12
- package/esm/Enums/Directions/OutModeDirection.d.ts +0 -6
- package/esm/Enums/Directions/RotateDirection.d.ts +0 -6
- package/esm/Enums/Directions/TiltDirection.d.ts +0 -6
- package/esm/Enums/Directions/index.d.ts +0 -4
- package/esm/Enums/Directions/index.js +0 -4
- package/esm/Enums/InteractivityDetect.d.ts +0 -5
- package/esm/Enums/Modes/ClickMode.d.ts +0 -9
- package/esm/Enums/Modes/CollisionMode.d.ts +0 -5
- package/esm/Enums/Modes/DestroyMode.d.ts +0 -4
- package/esm/Enums/Modes/DivMode.d.ts +0 -5
- package/esm/Enums/Modes/HoverMode.d.ts +0 -11
- package/esm/Enums/Modes/OutMode.d.ts +0 -10
- package/esm/Enums/Modes/ResponsiveMode.d.ts +0 -4
- package/esm/Enums/Modes/RollMode.d.ts +0 -5
- package/esm/Enums/Modes/SizeMode.d.ts +0 -4
- package/esm/Enums/Modes/ThemeMode.d.ts +0 -5
- package/esm/Enums/Modes/index.d.ts +0 -10
- package/esm/Enums/Modes/index.js +0 -10
- package/esm/Enums/Types/AlterType.d.ts +0 -4
- package/esm/Enums/Types/DestroyType.d.ts +0 -5
- package/esm/Enums/Types/DivType.d.ts +0 -4
- package/esm/Enums/Types/EasingType.d.ts +0 -10
- package/esm/Enums/Types/GradientType.d.ts +0 -5
- package/esm/Enums/Types/InteractorType.d.ts +0 -4
- package/esm/Enums/Types/OrbitType.d.ts +0 -4
- package/esm/Enums/Types/OrbitType.js +0 -1
- package/esm/Enums/Types/ShapeType.d.ts +0 -13
- package/esm/Enums/Types/StartValueType.d.ts +0 -5
- package/esm/Enums/Types/index.d.ts +0 -9
- package/esm/Enums/Types/index.js +0 -9
- package/esm/Enums/index.d.ts +0 -5
- package/esm/Enums/index.js +0 -5
- package/esm/Interactions/External/Attract/Attractor.d.ts +0 -11
- package/esm/Interactions/External/Attract/index.d.ts +0 -2
- package/esm/Interactions/External/Bounce/Bouncer.d.ts +0 -11
- package/esm/Interactions/External/Bounce/index.d.ts +0 -2
- package/esm/Interactions/External/Bubble/Bubbler.d.ts +0 -16
- package/esm/Interactions/External/Bubble/IBubblerProcessParam.d.ts +0 -10
- package/esm/Interactions/External/Bubble/ProcessBubbleType.d.ts +0 -5
- package/esm/Interactions/External/Bubble/index.d.ts +0 -2
- package/esm/Interactions/External/Connect/Connector.d.ts +0 -8
- package/esm/Interactions/External/Connect/index.d.ts +0 -2
- package/esm/Interactions/External/Grab/Grabber.d.ts +0 -8
- package/esm/Interactions/External/Grab/index.d.ts +0 -2
- package/esm/Interactions/External/Repulse/Repulser.d.ts +0 -12
- package/esm/Interactions/External/Repulse/index.d.ts +0 -2
- package/esm/Interactions/External/Trail/TrailMaker.d.ts +0 -10
- package/esm/Interactions/External/Trail/index.d.ts +0 -2
- package/esm/Interactions/Particles/Attract/Attractor.d.ts +0 -8
- package/esm/Interactions/Particles/Attract/index.d.ts +0 -2
- package/esm/Interactions/Particles/Collisions/Collider.d.ts +0 -10
- package/esm/Interactions/Particles/Collisions/index.d.ts +0 -2
- package/esm/Interactions/Particles/Links/ILink.d.ts +0 -9
- package/esm/Interactions/Particles/Links/LinkInstance.d.ts +0 -10
- package/esm/Interactions/Particles/Links/LinkParticle.d.ts +0 -5
- package/esm/Interactions/Particles/Links/Linker.d.ts +0 -10
- package/esm/Interactions/Particles/Links/index.d.ts +0 -2
- package/esm/Interactions/Particles/Links/interaction.d.ts +0 -2
- package/esm/Interactions/Particles/Links/plugin.d.ts +0 -2
- package/esm/Options/Classes/AnimatableColor.d.ts +0 -11
- package/esm/Options/Classes/AnimatableGradient.d.ts +0 -53
- package/esm/Options/Classes/AnimationOptions.d.ts +0 -11
- package/esm/Options/Classes/Background/Background.d.ts +0 -14
- package/esm/Options/Classes/BackgroundMask/BackgroundMask.d.ts +0 -11
- package/esm/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +0 -10
- package/esm/Options/Classes/ColorAnimation.d.ts +0 -12
- package/esm/Options/Classes/FullScreen/FullScreen.d.ts +0 -9
- package/esm/Options/Classes/HslAnimation.d.ts +0 -11
- package/esm/Options/Classes/Interactivity/Events/ClickEvent.d.ts +0 -10
- package/esm/Options/Classes/Interactivity/Events/DivEvent.d.ts +0 -18
- package/esm/Options/Classes/Interactivity/Events/Events.d.ts +0 -20
- package/esm/Options/Classes/Interactivity/Events/HoverEvent.d.ts +0 -12
- package/esm/Options/Classes/Interactivity/Events/Parallax.d.ts +0 -10
- package/esm/Options/Classes/Interactivity/Interactivity.d.ts +0 -15
- package/esm/Options/Classes/Interactivity/Modes/Attract.d.ts +0 -14
- package/esm/Options/Classes/Interactivity/Modes/Bounce.d.ts +0 -8
- package/esm/Options/Classes/Interactivity/Modes/Bubble.d.ts +0 -9
- package/esm/Options/Classes/Interactivity/Modes/BubbleBase.d.ts +0 -13
- package/esm/Options/Classes/Interactivity/Modes/BubbleDiv.d.ts +0 -11
- package/esm/Options/Classes/Interactivity/Modes/Connect.d.ts +0 -15
- package/esm/Options/Classes/Interactivity/Modes/ConnectLinks.d.ts +0 -8
- package/esm/Options/Classes/Interactivity/Modes/Grab.d.ts +0 -14
- package/esm/Options/Classes/Interactivity/Modes/GrabLinks.d.ts +0 -12
- package/esm/Options/Classes/Interactivity/Modes/Light.d.ts +0 -11
- package/esm/Options/Classes/Interactivity/Modes/LightArea.d.ts +0 -10
- package/esm/Options/Classes/Interactivity/Modes/LightGradient.d.ts +0 -10
- package/esm/Options/Classes/Interactivity/Modes/LightShadow.d.ts +0 -10
- package/esm/Options/Classes/Interactivity/Modes/Modes.d.ts +0 -29
- package/esm/Options/Classes/Interactivity/Modes/Push.d.ts +0 -12
- package/esm/Options/Classes/Interactivity/Modes/Remove.d.ts +0 -10
- package/esm/Options/Classes/Interactivity/Modes/Repulse.d.ts +0 -9
- package/esm/Options/Classes/Interactivity/Modes/RepulseBase.d.ts +0 -14
- package/esm/Options/Classes/Interactivity/Modes/RepulseDiv.d.ts +0 -11
- package/esm/Options/Classes/Interactivity/Modes/Slow.d.ts +0 -11
- package/esm/Options/Classes/Interactivity/Modes/Trail.d.ts +0 -12
- package/esm/Options/Classes/ManualParticle.d.ts +0 -10
- package/esm/Options/Classes/Motion/Motion.d.ts +0 -10
- package/esm/Options/Classes/Motion/MotionReduce.d.ts +0 -9
- package/esm/Options/Classes/Options.d.ts +0 -48
- package/esm/Options/Classes/OptionsColor.d.ts +0 -10
- package/esm/Options/Classes/Particles/Bounce/Bounce.d.ts +0 -10
- package/esm/Options/Classes/Particles/Bounce/BounceFactor.d.ts +0 -4
- package/esm/Options/Classes/Particles/Collisions/Collisions.d.ts +0 -14
- package/esm/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +0 -9
- package/esm/Options/Classes/Particles/Destroy/Destroy.d.ts +0 -11
- package/esm/Options/Classes/Particles/Destroy/Split.d.ts +0 -15
- package/esm/Options/Classes/Particles/Destroy/SplitFactor.d.ts +0 -4
- package/esm/Options/Classes/Particles/Destroy/SplitRate.d.ts +0 -4
- package/esm/Options/Classes/Particles/Life/Life.d.ts +0 -12
- package/esm/Options/Classes/Particles/Life/LifeDelay.d.ts +0 -9
- package/esm/Options/Classes/Particles/Life/LifeDuration.d.ts +0 -9
- package/esm/Options/Classes/Particles/Links/Links.d.ts +0 -22
- package/esm/Options/Classes/Particles/Links/LinksShadow.d.ts +0 -11
- package/esm/Options/Classes/Particles/Links/LinksTriangle.d.ts +0 -12
- package/esm/Options/Classes/Particles/Move/Attract.d.ts +0 -15
- package/esm/Options/Classes/Particles/Move/Move.d.ts +0 -44
- package/esm/Options/Classes/Particles/Move/MoveAngle.d.ts +0 -9
- package/esm/Options/Classes/Particles/Move/MoveGravity.d.ts +0 -11
- package/esm/Options/Classes/Particles/Move/OutModes.d.ts +0 -13
- package/esm/Options/Classes/Particles/Move/Path/Path.d.ts +0 -13
- package/esm/Options/Classes/Particles/Move/Path/PathDelay.d.ts +0 -4
- package/esm/Options/Classes/Particles/Move/Spin.d.ts +0 -11
- package/esm/Options/Classes/Particles/Move/Trail.d.ts +0 -11
- package/esm/Options/Classes/Particles/Number/Density.d.ts +0 -12
- package/esm/Options/Classes/Particles/Number/ParticlesNumber.d.ts +0 -13
- package/esm/Options/Classes/Particles/Opacity/Opacity.d.ts +0 -12
- package/esm/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +0 -14
- package/esm/Options/Classes/Particles/Orbit/Orbit.d.ts +0 -18
- package/esm/Options/Classes/Particles/Orbit/OrbitRotation.d.ts +0 -7
- package/esm/Options/Classes/Particles/ParticlesOptions.d.ts +0 -58
- package/esm/Options/Classes/Particles/Repulse/Repulse.d.ts +0 -13
- package/esm/Options/Classes/Particles/Roll/Roll.d.ts +0 -16
- package/esm/Options/Classes/Particles/Roll/RollLight.d.ts +0 -9
- package/esm/Options/Classes/Particles/Rotate/Rotate.d.ts +0 -13
- package/esm/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +0 -10
- package/esm/Options/Classes/Particles/Shadow.d.ts +0 -13
- package/esm/Options/Classes/Particles/Shape/Shape.d.ts +0 -27
- package/esm/Options/Classes/Particles/Size/Size.d.ts +0 -12
- package/esm/Options/Classes/Particles/Size/SizeAnimation.d.ts +0 -14
- package/esm/Options/Classes/Particles/Stroke.d.ts +0 -11
- package/esm/Options/Classes/Particles/Tilt/Tilt.d.ts +0 -13
- package/esm/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +0 -10
- package/esm/Options/Classes/Particles/Twinkle/Twinkle.d.ts +0 -10
- package/esm/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +0 -12
- package/esm/Options/Classes/Particles/Wobble/Wobble.d.ts +0 -10
- package/esm/Options/Classes/Particles/ZIndex/ZIndex.d.ts +0 -11
- package/esm/Options/Classes/Random.d.ts +0 -9
- package/esm/Options/Classes/Responsive.d.ts +0 -12
- package/esm/Options/Classes/Theme/Theme.d.ts +0 -12
- package/esm/Options/Classes/Theme/ThemeDefault.d.ts +0 -11
- package/esm/Options/Classes/ValueWithRandom.d.ts +0 -10
- package/esm/Options/Interfaces/Background/IBackground.d.ts +0 -9
- package/esm/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +0 -7
- package/esm/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.d.ts +0 -5
- package/esm/Options/Interfaces/FullScreen/IFullScreen.d.ts +0 -4
- package/esm/Options/Interfaces/IAnimatable.d.ts +0 -4
- package/esm/Options/Interfaces/IAnimatableColor.d.ts +0 -6
- package/esm/Options/Interfaces/IAnimatableGradient.d.ts +0 -8
- package/esm/Options/Interfaces/IAnimation.d.ts +0 -7
- package/esm/Options/Interfaces/IColorAnimation.d.ts +0 -5
- package/esm/Options/Interfaces/IHslAnimation.d.ts +0 -6
- package/esm/Options/Interfaces/IManualParticle.d.ts +0 -7
- package/esm/Options/Interfaces/IOptionLoader.d.ts +0 -4
- package/esm/Options/Interfaces/IOptions.d.ts +0 -34
- package/esm/Options/Interfaces/IOptionsColor.d.ts +0 -2
- package/esm/Options/Interfaces/IOptionsGradient.d.ts +0 -13
- package/esm/Options/Interfaces/IRandom.d.ts +0 -4
- package/esm/Options/Interfaces/IResponsive.d.ts +0 -8
- package/esm/Options/Interfaces/IValueWithRandom.d.ts +0 -6
- package/esm/Options/Interfaces/Interactivity/Events/IClickEvent.d.ts +0 -6
- package/esm/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +0 -11
- package/esm/Options/Interfaces/Interactivity/Events/IEvents.d.ts +0 -13
- package/esm/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +0 -8
- package/esm/Options/Interfaces/Interactivity/Events/IParallax.d.ts +0 -5
- package/esm/Options/Interfaces/Interactivity/IInteractivity.d.ts +0 -9
- package/esm/Options/Interfaces/Interactivity/Modes/IAttract.d.ts +0 -9
- package/esm/Options/Interfaces/Interactivity/Modes/IBounce.d.ts +0 -3
- package/esm/Options/Interfaces/Interactivity/Modes/IBubble.d.ts +0 -6
- package/esm/Options/Interfaces/Interactivity/Modes/IBubbleBase.d.ts +0 -10
- package/esm/Options/Interfaces/Interactivity/Modes/IBubbleDiv.d.ts +0 -4
- package/esm/Options/Interfaces/Interactivity/Modes/IConnect.d.ts +0 -8
- package/esm/Options/Interfaces/Interactivity/Modes/IConnectLinks.d.ts +0 -3
- package/esm/Options/Interfaces/Interactivity/Modes/IGrab.d.ts +0 -7
- package/esm/Options/Interfaces/Interactivity/Modes/IGrabLinks.d.ts +0 -7
- package/esm/Options/Interfaces/Interactivity/Modes/ILight.d.ts +0 -6
- package/esm/Options/Interfaces/Interactivity/Modes/ILightArea.d.ts +0 -9
- package/esm/Options/Interfaces/Interactivity/Modes/ILightShadow.d.ts +0 -5
- package/esm/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +0 -5
- package/esm/Options/Interfaces/Interactivity/Modes/IModes.d.ts +0 -22
- package/esm/Options/Interfaces/Interactivity/Modes/IPush.d.ts +0 -6
- package/esm/Options/Interfaces/Interactivity/Modes/IRemove.d.ts +0 -4
- package/esm/Options/Interfaces/Interactivity/Modes/IRepulse.d.ts +0 -6
- package/esm/Options/Interfaces/Interactivity/Modes/IRepulseBase.d.ts +0 -9
- package/esm/Options/Interfaces/Interactivity/Modes/IRepulseDiv.d.ts +0 -4
- package/esm/Options/Interfaces/Interactivity/Modes/ISlow.d.ts +0 -5
- package/esm/Options/Interfaces/Interactivity/Modes/ITrail.d.ts +0 -8
- package/esm/Options/Interfaces/Motion/IMotion.d.ts +0 -5
- package/esm/Options/Interfaces/Motion/IMotionReduce.d.ts +0 -4
- package/esm/Options/Interfaces/Particles/Bounce/IBounce.d.ts +0 -5
- package/esm/Options/Interfaces/Particles/Collisions/ICollisions.d.ts +0 -9
- package/esm/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.d.ts +0 -4
- package/esm/Options/Interfaces/Particles/Destroy/IDestroy.d.ts +0 -6
- package/esm/Options/Interfaces/Particles/Destroy/ISplit.d.ts +0 -10
- package/esm/Options/Interfaces/Particles/IParticles.d.ts +0 -52
- package/esm/Options/Interfaces/Particles/IShadow.d.ts +0 -8
- package/esm/Options/Interfaces/Particles/IStroke.d.ts +0 -7
- package/esm/Options/Interfaces/Particles/Life/ILife.d.ts +0 -7
- package/esm/Options/Interfaces/Particles/Life/ILifeDelay.d.ts +0 -4
- package/esm/Options/Interfaces/Particles/Life/ILifeDuration.d.ts +0 -4
- package/esm/Options/Interfaces/Particles/Links/ILinks.d.ts +0 -17
- package/esm/Options/Interfaces/Particles/Links/ILinksShadow.d.ts +0 -6
- package/esm/Options/Interfaces/Particles/Links/ILinksTriangle.d.ts +0 -7
- package/esm/Options/Interfaces/Particles/Move/IAttract.d.ts +0 -9
- package/esm/Options/Interfaces/Particles/Move/IMove.d.ts +0 -35
- package/esm/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +0 -5
- package/esm/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +0 -7
- package/esm/Options/Interfaces/Particles/Move/IOutModes.d.ts +0 -8
- package/esm/Options/Interfaces/Particles/Move/ISpin.d.ts +0 -7
- package/esm/Options/Interfaces/Particles/Move/ITrail.d.ts +0 -6
- package/esm/Options/Interfaces/Particles/Move/Path/IPath.d.ts +0 -9
- package/esm/Options/Interfaces/Particles/Number/IDensity.d.ts +0 -6
- package/esm/Options/Interfaces/Particles/Number/IParticlesNumber.d.ts +0 -7
- package/esm/Options/Interfaces/Particles/Opacity/IOpacity.d.ts +0 -6
- package/esm/Options/Interfaces/Particles/Opacity/IOpacityAnimation.d.ts +0 -8
- package/esm/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +0 -13
- package/esm/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +0 -9
- package/esm/Options/Interfaces/Particles/Roll/IRoll.d.ts +0 -12
- package/esm/Options/Interfaces/Particles/Roll/IRollLight.d.ts +0 -5
- package/esm/Options/Interfaces/Particles/Rotate/IRotate.d.ts +0 -8
- package/esm/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +0 -6
- package/esm/Options/Interfaces/Particles/Shape/ICharacterShape.d.ts +0 -8
- package/esm/Options/Interfaces/Particles/Shape/IImageShape.d.ts +0 -8
- package/esm/Options/Interfaces/Particles/Shape/IPolygonShape.d.ts +0 -5
- package/esm/Options/Interfaces/Particles/Shape/IShape.d.ts +0 -16
- package/esm/Options/Interfaces/Particles/Shape/IShapeValues.d.ts +0 -1
- package/esm/Options/Interfaces/Particles/Shape/IStarShape.d.ts +0 -6
- package/esm/Options/Interfaces/Particles/Size/ISize.d.ts +0 -6
- package/esm/Options/Interfaces/Particles/Size/ISizeAnimation.d.ts +0 -8
- package/esm/Options/Interfaces/Particles/Tilt/ITilt.d.ts +0 -8
- package/esm/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +0 -6
- package/esm/Options/Interfaces/Particles/Twinkle/ITwinkle.d.ts +0 -5
- package/esm/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +0 -8
- package/esm/Options/Interfaces/Particles/Wobble/IWobble.d.ts +0 -6
- package/esm/Options/Interfaces/Particles/ZIndex/IZIndex.d.ts +0 -6
- package/esm/Options/Interfaces/Theme/ITheme.d.ts +0 -8
- package/esm/Options/Interfaces/Theme/IThemeDefault.d.ts +0 -6
- package/esm/Plugins/Absorbers/AbsorberContainer.d.ts +0 -7
- package/esm/Plugins/Absorbers/AbsorberInstance.d.ts +0 -33
- package/esm/Plugins/Absorbers/Absorbers.d.ts +0 -22
- package/esm/Plugins/Absorbers/Enums/AbsorberClickMode.d.ts +0 -3
- package/esm/Plugins/Absorbers/Enums/index.d.ts +0 -1
- package/esm/Plugins/Absorbers/Enums/index.js +0 -1
- package/esm/Plugins/Absorbers/Options/Classes/Absorber.d.ts +0 -18
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +0 -11
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +0 -9
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +0 -13
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.d.ts +0 -12
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +0 -6
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +0 -4
- package/esm/Plugins/Absorbers/index.d.ts +0 -2
- package/esm/Plugins/Emitters/EmitterContainer.d.ts +0 -10
- package/esm/Plugins/Emitters/EmitterInstance.d.ts +0 -45
- package/esm/Plugins/Emitters/Emitters.d.ts +0 -25
- package/esm/Plugins/Emitters/EmittersEngine.d.ts +0 -7
- package/esm/Plugins/Emitters/Enums/EmitterClickMode.d.ts +0 -3
- package/esm/Plugins/Emitters/Enums/EmitterShapeType.d.ts +0 -4
- package/esm/Plugins/Emitters/Enums/index.d.ts +0 -2
- package/esm/Plugins/Emitters/Enums/index.js +0 -2
- package/esm/Plugins/Emitters/IEmitterShape.d.ts +0 -4
- package/esm/Plugins/Emitters/Options/Classes/Emitter.d.ts +0 -28
- package/esm/Plugins/Emitters/Options/Classes/EmitterLife.d.ts +0 -11
- package/esm/Plugins/Emitters/Options/Classes/EmitterRate.d.ts +0 -9
- package/esm/Plugins/Emitters/Options/Classes/EmitterSize.d.ts +0 -11
- package/esm/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +0 -24
- package/esm/Plugins/Emitters/Options/Interfaces/IEmitterLife.d.ts +0 -6
- package/esm/Plugins/Emitters/Options/Interfaces/IEmitterOptions.d.ts +0 -12
- package/esm/Plugins/Emitters/Options/Interfaces/IEmitterRate.d.ts +0 -5
- package/esm/Plugins/Emitters/Options/Interfaces/IEmitterSize.d.ts +0 -5
- package/esm/Plugins/Emitters/ShapeManager.d.ts +0 -9
- package/esm/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +0 -5
- package/esm/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +0 -5
- package/esm/Plugins/Emitters/index.d.ts +0 -3
- package/esm/Plugins/PolygonMask/Enums/PolygonMaskInlineArrangement.d.ts +0 -8
- package/esm/Plugins/PolygonMask/Enums/PolygonMaskMoveType.d.ts +0 -4
- package/esm/Plugins/PolygonMask/Enums/PolygonMaskType.d.ts +0 -6
- package/esm/Plugins/PolygonMask/Enums/index.d.ts +0 -3
- package/esm/Plugins/PolygonMask/Enums/index.js +0 -3
- package/esm/Plugins/PolygonMask/Interfaces/ISvgPath.d.ts +0 -6
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +0 -24
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.d.ts +0 -15
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.d.ts +0 -11
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +0 -9
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +0 -11
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +0 -10
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +0 -18
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +0 -8
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDrawStroke.d.ts +0 -6
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskInline.d.ts +0 -4
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.d.ts +0 -6
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.d.ts +0 -5
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskOptions.d.ts +0 -4
- package/esm/Plugins/PolygonMask/PolygonMaskInstance.d.ts +0 -38
- package/esm/Plugins/PolygonMask/Types.d.ts +0 -8
- package/esm/Plugins/PolygonMask/Utils.d.ts +0 -11
- package/esm/Plugins/PolygonMask/index.d.ts +0 -2
- package/esm/Plugins/PolygonMask/pathseg.d.ts +0 -0
- package/esm/Shapes/Circle/CircleDrawer.d.ts +0 -5
- package/esm/Shapes/Circle/index.d.ts +0 -2
- package/esm/Shapes/Image/ImageDrawer.d.ts +0 -18
- package/esm/Shapes/Image/Utils.d.ts +0 -28
- package/esm/Shapes/Image/index.d.ts +0 -2
- package/esm/Shapes/Line/LineDrawer.d.ts +0 -5
- package/esm/Shapes/Line/index.d.ts +0 -2
- package/esm/Shapes/Polygon/PolygonDrawer.d.ts +0 -7
- package/esm/Shapes/Polygon/PolygonDrawerBase.d.ts +0 -15
- package/esm/Shapes/Polygon/TriangleDrawer.d.ts +0 -8
- package/esm/Shapes/Polygon/index.d.ts +0 -4
- package/esm/Shapes/Square/SquareDrawer.d.ts +0 -5
- package/esm/Shapes/Square/index.d.ts +0 -2
- package/esm/Shapes/Star/StarDrawer.d.ts +0 -5
- package/esm/Shapes/Star/index.d.ts +0 -2
- package/esm/Shapes/Text/TextDrawer.d.ts +0 -7
- package/esm/Shapes/Text/index.d.ts +0 -2
- package/esm/Types/ParticlesGroups.d.ts +0 -4
- package/esm/Types/PathOptions.d.ts +0 -3
- package/esm/Types/RangeValue.d.ts +0 -2
- package/esm/Types/RecursivePartial.d.ts +0 -3
- package/esm/Types/ShapeData.d.ts +0 -5
- package/esm/Types/ShapeDrawerFunctions.d.ts +0 -11
- package/esm/Types/SingleOrMultiple.d.ts +0 -1
- package/esm/Types/index.d.ts +0 -6
- package/esm/Types/index.js +0 -6
- package/esm/Updaters/Angle/AngleUpdater.d.ts +0 -8
- package/esm/Updaters/Angle/index.d.ts +0 -2
- package/esm/Updaters/Color/ColorUpdater.d.ts +0 -8
- package/esm/Updaters/Color/index.d.ts +0 -2
- package/esm/Updaters/Life/LifeUpdater.d.ts +0 -8
- package/esm/Updaters/Life/index.d.ts +0 -2
- package/esm/Updaters/Opacity/OpacityUpdater.d.ts +0 -8
- package/esm/Updaters/Opacity/index.d.ts +0 -2
- package/esm/Updaters/OutModes/IBounceData.d.ts +0 -11
- package/esm/Updaters/OutModes/OutOfCanvasUpdater.d.ts +0 -13
- package/esm/Updaters/OutModes/Utils.d.ts +0 -3
- package/esm/Updaters/OutModes/index.d.ts +0 -2
- package/esm/Updaters/Roll/RollUpdater.d.ts +0 -6
- package/esm/Updaters/Roll/index.d.ts +0 -2
- package/esm/Updaters/Size/SizeUpdater.d.ts +0 -6
- package/esm/Updaters/Size/index.d.ts +0 -2
- package/esm/Updaters/StrokeColor/StrokeColorUpdater.d.ts +0 -8
- package/esm/Updaters/StrokeColor/index.d.ts +0 -2
- package/esm/Updaters/Tilt/TiltUpdater.d.ts +0 -8
- package/esm/Updaters/Tilt/index.d.ts +0 -2
- package/esm/Updaters/Wobble/WobbleUpdater.d.ts +0 -14
- package/esm/Updaters/Wobble/index.d.ts +0 -2
- package/esm/Utils/CanvasUtils.d.ts +0 -19
- package/esm/Utils/ColorUtils.d.ts +0 -26
- package/esm/Utils/NumberUtils.d.ts +0 -23
- package/esm/Utils/Utils.d.ts +0 -38
- package/esm/Utils/index.d.ts +0 -4
- package/esm/Utils/index.js +0 -4
- package/esm/engine.d.ts +0 -26
- package/esm/full.d.ts +0 -2
- package/esm/index.d.ts +0 -20
- package/esm/index.engine.d.ts +0 -13
- package/esm/index.slim.d.ts +0 -14
- package/esm/pjs.d.ts +0 -14
- package/esm/slim.d.ts +0 -2
- package/full.d.ts +0 -2
- package/full.js +0 -22
- package/index.d.ts +0 -20
- package/index.engine.d.ts +0 -13
- package/index.engine.js +0 -27
- package/index.js +0 -33
- package/index.slim.d.ts +0 -14
- package/index.slim.js +0 -30
- package/pjs.d.ts +0 -14
- package/slim.d.ts +0 -2
- package/slim.js +0 -52
- package/umd/Core/Canvas.d.ts +0 -35
- package/umd/Core/Container.d.ts +0 -68
- package/umd/Core/Interfaces/Colors.d.ts +0 -33
- package/umd/Core/Interfaces/Gradients.d.ts +0 -21
- package/umd/Core/Interfaces/IAttract.d.ts +0 -7
- package/umd/Core/Interfaces/IBounds.d.ts +0 -6
- package/umd/Core/Interfaces/IBubble.d.ts +0 -4
- package/umd/Core/Interfaces/IBubbleParticleData.d.ts +0 -9
- package/umd/Core/Interfaces/ICircleBouncer.d.ts +0 -9
- package/umd/Core/Interfaces/IContainerInteractivity.d.ts +0 -6
- package/umd/Core/Interfaces/IContainerPlugin.d.ts +0 -32
- package/umd/Core/Interfaces/ICoordinates.d.ts +0 -15
- package/umd/Core/Interfaces/IDelta.d.ts +0 -4
- package/umd/Core/Interfaces/IDimension.d.ts +0 -4
- package/umd/Core/Interfaces/IDistance.d.ts +0 -4
- package/umd/Core/Interfaces/IExternalInteractor.d.ts +0 -6
- package/umd/Core/Interfaces/IInteractor.d.ts +0 -6
- package/umd/Core/Interfaces/IMouseData.d.ts +0 -9
- package/umd/Core/Interfaces/IMovePathGenerator.d.ts +0 -8
- package/umd/Core/Interfaces/IParticle.d.ts +0 -55
- package/umd/Core/Interfaces/IParticleGradientAnimation.d.ts +0 -8
- package/umd/Core/Interfaces/IParticleGradientColorAnimation.d.ts +0 -7
- package/umd/Core/Interfaces/IParticleGravity.d.ts +0 -5
- package/umd/Core/Interfaces/IParticleHslAnimation.d.ts +0 -6
- package/umd/Core/Interfaces/IParticleLife.d.ts +0 -7
- package/umd/Core/Interfaces/IParticleLoops.d.ts +0 -4
- package/umd/Core/Interfaces/IParticleRetinaProps.d.ts +0 -12
- package/umd/Core/Interfaces/IParticleRoll.d.ts +0 -9
- package/umd/Core/Interfaces/IParticleSpin.d.ts +0 -9
- package/umd/Core/Interfaces/IParticleUpdater.d.ts +0 -9
- package/umd/Core/Interfaces/IParticleValueAnimation.d.ts +0 -17
- package/umd/Core/Interfaces/IParticleWobble.d.ts +0 -4
- package/umd/Core/Interfaces/IParticlesFrequencies.d.ts +0 -4
- package/umd/Core/Interfaces/IParticlesInteractor.d.ts +0 -7
- package/umd/Core/Interfaces/IPlugin.d.ts +0 -11
- package/umd/Core/Interfaces/IRangeValue.d.ts +0 -4
- package/umd/Core/Interfaces/IRectSideResult.d.ts +0 -5
- package/umd/Core/Interfaces/IRepulse.d.ts +0 -7
- package/umd/Core/Interfaces/IShapeDrawer.d.ts +0 -10
- package/umd/Core/Interfaces/IShapeValues.d.ts +0 -8
- package/umd/Core/Interfaces/index.d.ts +0 -37
- package/umd/Core/Interfaces/index.js +0 -59
- package/umd/Core/Loader.d.ts +0 -32
- package/umd/Core/Particle.d.ts +0 -73
- package/umd/Core/Particles.d.ts +0 -46
- package/umd/Core/Retina.d.ts +0 -26
- package/umd/Core/Utils/Circle.d.ts +0 -8
- package/umd/Core/Utils/CircleWarp.d.ts +0 -9
- package/umd/Core/Utils/Constants.d.ts +0 -18
- package/umd/Core/Utils/EventListeners.d.ts +0 -33
- package/umd/Core/Utils/ExternalInteractorBase.d.ts +0 -12
- package/umd/Core/Utils/FrameManager.d.ts +0 -6
- package/umd/Core/Utils/InteractionManager.d.ts +0 -14
- package/umd/Core/Utils/ParticlesInteractorBase.d.ts +0 -12
- package/umd/Core/Utils/ParticlesMover.d.ts +0 -13
- package/umd/Core/Utils/ParticlesMover.js +0 -196
- package/umd/Core/Utils/Plugins.d.ts +0 -36
- package/umd/Core/Utils/Point.d.ts +0 -7
- package/umd/Core/Utils/QuadTree.d.ts +0 -23
- package/umd/Core/Utils/Range.d.ts +0 -7
- package/umd/Core/Utils/Rectangle.d.ts +0 -8
- package/umd/Core/Utils/Vector.d.ts +0 -29
- package/umd/Core/Utils/Vector3d.d.ts +0 -18
- package/umd/Core/Utils/index.d.ts +0 -16
- package/umd/Core/Utils/index.js +0 -38
- package/umd/Core/index.d.ts +0 -8
- package/umd/Core/index.js +0 -30
- package/umd/Enums/AnimationStatus.d.ts +0 -4
- package/umd/Enums/Directions/MoveDirection.d.ts +0 -12
- package/umd/Enums/Directions/OutModeDirection.d.ts +0 -6
- package/umd/Enums/Directions/RotateDirection.d.ts +0 -6
- package/umd/Enums/Directions/TiltDirection.d.ts +0 -6
- package/umd/Enums/Directions/index.d.ts +0 -4
- package/umd/Enums/Directions/index.js +0 -26
- package/umd/Enums/InteractivityDetect.d.ts +0 -5
- package/umd/Enums/Modes/ClickMode.d.ts +0 -9
- package/umd/Enums/Modes/CollisionMode.d.ts +0 -5
- package/umd/Enums/Modes/DestroyMode.d.ts +0 -4
- package/umd/Enums/Modes/DivMode.d.ts +0 -5
- package/umd/Enums/Modes/HoverMode.d.ts +0 -11
- package/umd/Enums/Modes/OutMode.d.ts +0 -10
- package/umd/Enums/Modes/ResponsiveMode.d.ts +0 -4
- package/umd/Enums/Modes/RollMode.d.ts +0 -5
- package/umd/Enums/Modes/SizeMode.d.ts +0 -4
- package/umd/Enums/Modes/ThemeMode.d.ts +0 -5
- package/umd/Enums/Modes/index.d.ts +0 -10
- package/umd/Enums/Modes/index.js +0 -32
- package/umd/Enums/Types/AlterType.d.ts +0 -4
- package/umd/Enums/Types/DestroyType.d.ts +0 -5
- package/umd/Enums/Types/DivType.d.ts +0 -4
- package/umd/Enums/Types/EasingType.d.ts +0 -10
- package/umd/Enums/Types/GradientType.d.ts +0 -5
- package/umd/Enums/Types/InteractorType.d.ts +0 -4
- package/umd/Enums/Types/OrbitType.d.ts +0 -4
- package/umd/Enums/Types/OrbitType.js +0 -12
- package/umd/Enums/Types/ShapeType.d.ts +0 -13
- package/umd/Enums/Types/StartValueType.d.ts +0 -5
- package/umd/Enums/Types/index.d.ts +0 -9
- package/umd/Enums/Types/index.js +0 -31
- package/umd/Enums/index.d.ts +0 -5
- package/umd/Enums/index.js +0 -27
- package/umd/Interactions/External/Attract/Attractor.d.ts +0 -11
- package/umd/Interactions/External/Attract/index.d.ts +0 -2
- package/umd/Interactions/External/Bounce/Bouncer.d.ts +0 -11
- package/umd/Interactions/External/Bounce/index.d.ts +0 -2
- package/umd/Interactions/External/Bubble/Bubbler.d.ts +0 -16
- package/umd/Interactions/External/Bubble/IBubblerProcessParam.d.ts +0 -10
- package/umd/Interactions/External/Bubble/ProcessBubbleType.d.ts +0 -5
- package/umd/Interactions/External/Bubble/index.d.ts +0 -2
- package/umd/Interactions/External/Connect/Connector.d.ts +0 -8
- package/umd/Interactions/External/Connect/index.d.ts +0 -2
- package/umd/Interactions/External/Grab/Grabber.d.ts +0 -8
- package/umd/Interactions/External/Grab/index.d.ts +0 -2
- package/umd/Interactions/External/Repulse/Repulser.d.ts +0 -12
- package/umd/Interactions/External/Repulse/index.d.ts +0 -2
- package/umd/Interactions/External/Trail/TrailMaker.d.ts +0 -10
- package/umd/Interactions/External/Trail/index.d.ts +0 -2
- package/umd/Interactions/Particles/Attract/Attractor.d.ts +0 -8
- package/umd/Interactions/Particles/Attract/index.d.ts +0 -2
- package/umd/Interactions/Particles/Collisions/Collider.d.ts +0 -10
- package/umd/Interactions/Particles/Collisions/index.d.ts +0 -2
- package/umd/Interactions/Particles/Links/ILink.d.ts +0 -9
- package/umd/Interactions/Particles/Links/LinkInstance.d.ts +0 -10
- package/umd/Interactions/Particles/Links/LinkParticle.d.ts +0 -5
- package/umd/Interactions/Particles/Links/Linker.d.ts +0 -10
- package/umd/Interactions/Particles/Links/index.d.ts +0 -2
- package/umd/Interactions/Particles/Links/interaction.d.ts +0 -2
- package/umd/Interactions/Particles/Links/plugin.d.ts +0 -2
- package/umd/Options/Classes/AnimatableColor.d.ts +0 -11
- package/umd/Options/Classes/AnimatableGradient.d.ts +0 -53
- package/umd/Options/Classes/AnimationOptions.d.ts +0 -11
- package/umd/Options/Classes/Background/Background.d.ts +0 -14
- package/umd/Options/Classes/BackgroundMask/BackgroundMask.d.ts +0 -11
- package/umd/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +0 -10
- package/umd/Options/Classes/ColorAnimation.d.ts +0 -12
- package/umd/Options/Classes/FullScreen/FullScreen.d.ts +0 -9
- package/umd/Options/Classes/HslAnimation.d.ts +0 -11
- package/umd/Options/Classes/Interactivity/Events/ClickEvent.d.ts +0 -10
- package/umd/Options/Classes/Interactivity/Events/DivEvent.d.ts +0 -18
- package/umd/Options/Classes/Interactivity/Events/Events.d.ts +0 -20
- package/umd/Options/Classes/Interactivity/Events/HoverEvent.d.ts +0 -12
- package/umd/Options/Classes/Interactivity/Events/Parallax.d.ts +0 -10
- package/umd/Options/Classes/Interactivity/Interactivity.d.ts +0 -15
- package/umd/Options/Classes/Interactivity/Modes/Attract.d.ts +0 -14
- package/umd/Options/Classes/Interactivity/Modes/Bounce.d.ts +0 -8
- package/umd/Options/Classes/Interactivity/Modes/Bubble.d.ts +0 -9
- package/umd/Options/Classes/Interactivity/Modes/BubbleBase.d.ts +0 -13
- package/umd/Options/Classes/Interactivity/Modes/BubbleDiv.d.ts +0 -11
- package/umd/Options/Classes/Interactivity/Modes/Connect.d.ts +0 -15
- package/umd/Options/Classes/Interactivity/Modes/ConnectLinks.d.ts +0 -8
- package/umd/Options/Classes/Interactivity/Modes/Grab.d.ts +0 -14
- package/umd/Options/Classes/Interactivity/Modes/GrabLinks.d.ts +0 -12
- package/umd/Options/Classes/Interactivity/Modes/Light.d.ts +0 -11
- package/umd/Options/Classes/Interactivity/Modes/LightArea.d.ts +0 -10
- package/umd/Options/Classes/Interactivity/Modes/LightGradient.d.ts +0 -10
- package/umd/Options/Classes/Interactivity/Modes/LightShadow.d.ts +0 -10
- package/umd/Options/Classes/Interactivity/Modes/Modes.d.ts +0 -29
- package/umd/Options/Classes/Interactivity/Modes/Push.d.ts +0 -12
- package/umd/Options/Classes/Interactivity/Modes/Remove.d.ts +0 -10
- package/umd/Options/Classes/Interactivity/Modes/Repulse.d.ts +0 -9
- package/umd/Options/Classes/Interactivity/Modes/RepulseBase.d.ts +0 -14
- package/umd/Options/Classes/Interactivity/Modes/RepulseDiv.d.ts +0 -11
- package/umd/Options/Classes/Interactivity/Modes/Slow.d.ts +0 -11
- package/umd/Options/Classes/Interactivity/Modes/Trail.d.ts +0 -12
- package/umd/Options/Classes/ManualParticle.d.ts +0 -10
- package/umd/Options/Classes/Motion/Motion.d.ts +0 -10
- package/umd/Options/Classes/Motion/MotionReduce.d.ts +0 -9
- package/umd/Options/Classes/Options.d.ts +0 -48
- package/umd/Options/Classes/OptionsColor.d.ts +0 -10
- package/umd/Options/Classes/Particles/Bounce/Bounce.d.ts +0 -10
- package/umd/Options/Classes/Particles/Bounce/BounceFactor.d.ts +0 -4
- package/umd/Options/Classes/Particles/Collisions/Collisions.d.ts +0 -14
- package/umd/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +0 -9
- package/umd/Options/Classes/Particles/Destroy/Destroy.d.ts +0 -11
- package/umd/Options/Classes/Particles/Destroy/Split.d.ts +0 -15
- package/umd/Options/Classes/Particles/Destroy/SplitFactor.d.ts +0 -4
- package/umd/Options/Classes/Particles/Destroy/SplitRate.d.ts +0 -4
- package/umd/Options/Classes/Particles/Life/Life.d.ts +0 -12
- package/umd/Options/Classes/Particles/Life/LifeDelay.d.ts +0 -9
- package/umd/Options/Classes/Particles/Life/LifeDuration.d.ts +0 -9
- package/umd/Options/Classes/Particles/Links/Links.d.ts +0 -22
- package/umd/Options/Classes/Particles/Links/LinksShadow.d.ts +0 -11
- package/umd/Options/Classes/Particles/Links/LinksTriangle.d.ts +0 -12
- package/umd/Options/Classes/Particles/Move/Attract.d.ts +0 -15
- package/umd/Options/Classes/Particles/Move/Move.d.ts +0 -44
- package/umd/Options/Classes/Particles/Move/MoveAngle.d.ts +0 -9
- package/umd/Options/Classes/Particles/Move/MoveGravity.d.ts +0 -11
- package/umd/Options/Classes/Particles/Move/OutModes.d.ts +0 -13
- package/umd/Options/Classes/Particles/Move/Path/Path.d.ts +0 -13
- package/umd/Options/Classes/Particles/Move/Path/PathDelay.d.ts +0 -4
- package/umd/Options/Classes/Particles/Move/Spin.d.ts +0 -11
- package/umd/Options/Classes/Particles/Move/Trail.d.ts +0 -11
- package/umd/Options/Classes/Particles/Number/Density.d.ts +0 -12
- package/umd/Options/Classes/Particles/Number/ParticlesNumber.d.ts +0 -13
- package/umd/Options/Classes/Particles/Opacity/Opacity.d.ts +0 -12
- package/umd/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +0 -14
- package/umd/Options/Classes/Particles/Orbit/Orbit.d.ts +0 -18
- package/umd/Options/Classes/Particles/Orbit/OrbitRotation.d.ts +0 -7
- package/umd/Options/Classes/Particles/ParticlesOptions.d.ts +0 -58
- package/umd/Options/Classes/Particles/Repulse/Repulse.d.ts +0 -13
- package/umd/Options/Classes/Particles/Roll/Roll.d.ts +0 -16
- package/umd/Options/Classes/Particles/Roll/RollLight.d.ts +0 -9
- package/umd/Options/Classes/Particles/Rotate/Rotate.d.ts +0 -13
- package/umd/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +0 -10
- package/umd/Options/Classes/Particles/Shadow.d.ts +0 -13
- package/umd/Options/Classes/Particles/Shape/Shape.d.ts +0 -27
- package/umd/Options/Classes/Particles/Size/Size.d.ts +0 -12
- package/umd/Options/Classes/Particles/Size/SizeAnimation.d.ts +0 -14
- package/umd/Options/Classes/Particles/Stroke.d.ts +0 -11
- package/umd/Options/Classes/Particles/Tilt/Tilt.d.ts +0 -13
- package/umd/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +0 -10
- package/umd/Options/Classes/Particles/Twinkle/Twinkle.d.ts +0 -10
- package/umd/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +0 -12
- package/umd/Options/Classes/Particles/Wobble/Wobble.d.ts +0 -10
- package/umd/Options/Classes/Particles/ZIndex/ZIndex.d.ts +0 -11
- package/umd/Options/Classes/Random.d.ts +0 -9
- package/umd/Options/Classes/Responsive.d.ts +0 -12
- package/umd/Options/Classes/Theme/Theme.d.ts +0 -12
- package/umd/Options/Classes/Theme/ThemeDefault.d.ts +0 -11
- package/umd/Options/Classes/ValueWithRandom.d.ts +0 -10
- package/umd/Options/Interfaces/Background/IBackground.d.ts +0 -9
- package/umd/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +0 -7
- package/umd/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.d.ts +0 -5
- package/umd/Options/Interfaces/FullScreen/IFullScreen.d.ts +0 -4
- package/umd/Options/Interfaces/IAnimatable.d.ts +0 -4
- package/umd/Options/Interfaces/IAnimatableColor.d.ts +0 -6
- package/umd/Options/Interfaces/IAnimatableGradient.d.ts +0 -8
- package/umd/Options/Interfaces/IAnimation.d.ts +0 -7
- package/umd/Options/Interfaces/IColorAnimation.d.ts +0 -5
- package/umd/Options/Interfaces/IHslAnimation.d.ts +0 -6
- package/umd/Options/Interfaces/IManualParticle.d.ts +0 -7
- package/umd/Options/Interfaces/IOptionLoader.d.ts +0 -4
- package/umd/Options/Interfaces/IOptions.d.ts +0 -34
- package/umd/Options/Interfaces/IOptionsColor.d.ts +0 -2
- package/umd/Options/Interfaces/IOptionsGradient.d.ts +0 -13
- package/umd/Options/Interfaces/IRandom.d.ts +0 -4
- package/umd/Options/Interfaces/IResponsive.d.ts +0 -8
- package/umd/Options/Interfaces/IValueWithRandom.d.ts +0 -6
- package/umd/Options/Interfaces/Interactivity/Events/IClickEvent.d.ts +0 -6
- package/umd/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +0 -11
- package/umd/Options/Interfaces/Interactivity/Events/IEvents.d.ts +0 -13
- package/umd/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +0 -8
- package/umd/Options/Interfaces/Interactivity/Events/IParallax.d.ts +0 -5
- package/umd/Options/Interfaces/Interactivity/IInteractivity.d.ts +0 -9
- package/umd/Options/Interfaces/Interactivity/Modes/IAttract.d.ts +0 -9
- package/umd/Options/Interfaces/Interactivity/Modes/IBounce.d.ts +0 -3
- package/umd/Options/Interfaces/Interactivity/Modes/IBubble.d.ts +0 -6
- package/umd/Options/Interfaces/Interactivity/Modes/IBubbleBase.d.ts +0 -10
- package/umd/Options/Interfaces/Interactivity/Modes/IBubbleDiv.d.ts +0 -4
- package/umd/Options/Interfaces/Interactivity/Modes/IConnect.d.ts +0 -8
- package/umd/Options/Interfaces/Interactivity/Modes/IConnectLinks.d.ts +0 -3
- package/umd/Options/Interfaces/Interactivity/Modes/IGrab.d.ts +0 -7
- package/umd/Options/Interfaces/Interactivity/Modes/IGrabLinks.d.ts +0 -7
- package/umd/Options/Interfaces/Interactivity/Modes/ILight.d.ts +0 -6
- package/umd/Options/Interfaces/Interactivity/Modes/ILightArea.d.ts +0 -9
- package/umd/Options/Interfaces/Interactivity/Modes/ILightShadow.d.ts +0 -5
- package/umd/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +0 -5
- package/umd/Options/Interfaces/Interactivity/Modes/IModes.d.ts +0 -22
- package/umd/Options/Interfaces/Interactivity/Modes/IPush.d.ts +0 -6
- package/umd/Options/Interfaces/Interactivity/Modes/IRemove.d.ts +0 -4
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulse.d.ts +0 -6
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulseBase.d.ts +0 -9
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulseDiv.d.ts +0 -4
- package/umd/Options/Interfaces/Interactivity/Modes/ISlow.d.ts +0 -5
- package/umd/Options/Interfaces/Interactivity/Modes/ITrail.d.ts +0 -8
- package/umd/Options/Interfaces/Motion/IMotion.d.ts +0 -5
- package/umd/Options/Interfaces/Motion/IMotionReduce.d.ts +0 -4
- package/umd/Options/Interfaces/Particles/Bounce/IBounce.d.ts +0 -5
- package/umd/Options/Interfaces/Particles/Collisions/ICollisions.d.ts +0 -9
- package/umd/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.d.ts +0 -4
- package/umd/Options/Interfaces/Particles/Destroy/IDestroy.d.ts +0 -6
- package/umd/Options/Interfaces/Particles/Destroy/ISplit.d.ts +0 -10
- package/umd/Options/Interfaces/Particles/IParticles.d.ts +0 -52
- package/umd/Options/Interfaces/Particles/IShadow.d.ts +0 -8
- package/umd/Options/Interfaces/Particles/IStroke.d.ts +0 -7
- package/umd/Options/Interfaces/Particles/Life/ILife.d.ts +0 -7
- package/umd/Options/Interfaces/Particles/Life/ILifeDelay.d.ts +0 -4
- package/umd/Options/Interfaces/Particles/Life/ILifeDuration.d.ts +0 -4
- package/umd/Options/Interfaces/Particles/Links/ILinks.d.ts +0 -17
- package/umd/Options/Interfaces/Particles/Links/ILinksShadow.d.ts +0 -6
- package/umd/Options/Interfaces/Particles/Links/ILinksTriangle.d.ts +0 -7
- package/umd/Options/Interfaces/Particles/Move/IAttract.d.ts +0 -9
- package/umd/Options/Interfaces/Particles/Move/IMove.d.ts +0 -35
- package/umd/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +0 -5
- package/umd/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +0 -7
- package/umd/Options/Interfaces/Particles/Move/IOutModes.d.ts +0 -8
- package/umd/Options/Interfaces/Particles/Move/ISpin.d.ts +0 -7
- package/umd/Options/Interfaces/Particles/Move/ITrail.d.ts +0 -6
- package/umd/Options/Interfaces/Particles/Move/Path/IPath.d.ts +0 -9
- package/umd/Options/Interfaces/Particles/Number/IDensity.d.ts +0 -6
- package/umd/Options/Interfaces/Particles/Number/IParticlesNumber.d.ts +0 -7
- package/umd/Options/Interfaces/Particles/Opacity/IOpacity.d.ts +0 -6
- package/umd/Options/Interfaces/Particles/Opacity/IOpacityAnimation.d.ts +0 -8
- package/umd/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +0 -13
- package/umd/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +0 -9
- package/umd/Options/Interfaces/Particles/Roll/IRoll.d.ts +0 -12
- package/umd/Options/Interfaces/Particles/Roll/IRollLight.d.ts +0 -5
- package/umd/Options/Interfaces/Particles/Rotate/IRotate.d.ts +0 -8
- package/umd/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +0 -6
- package/umd/Options/Interfaces/Particles/Shape/ICharacterShape.d.ts +0 -8
- package/umd/Options/Interfaces/Particles/Shape/IImageShape.d.ts +0 -8
- package/umd/Options/Interfaces/Particles/Shape/IPolygonShape.d.ts +0 -5
- package/umd/Options/Interfaces/Particles/Shape/IShape.d.ts +0 -16
- package/umd/Options/Interfaces/Particles/Shape/IShapeValues.d.ts +0 -1
- package/umd/Options/Interfaces/Particles/Shape/IStarShape.d.ts +0 -6
- package/umd/Options/Interfaces/Particles/Size/ISize.d.ts +0 -6
- package/umd/Options/Interfaces/Particles/Size/ISizeAnimation.d.ts +0 -8
- package/umd/Options/Interfaces/Particles/Tilt/ITilt.d.ts +0 -8
- package/umd/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +0 -6
- package/umd/Options/Interfaces/Particles/Twinkle/ITwinkle.d.ts +0 -5
- package/umd/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +0 -8
- package/umd/Options/Interfaces/Particles/Wobble/IWobble.d.ts +0 -6
- package/umd/Options/Interfaces/Particles/ZIndex/IZIndex.d.ts +0 -6
- package/umd/Options/Interfaces/Theme/ITheme.d.ts +0 -8
- package/umd/Options/Interfaces/Theme/IThemeDefault.d.ts +0 -6
- package/umd/Plugins/Absorbers/AbsorberContainer.d.ts +0 -7
- package/umd/Plugins/Absorbers/AbsorberInstance.d.ts +0 -33
- package/umd/Plugins/Absorbers/Absorbers.d.ts +0 -22
- package/umd/Plugins/Absorbers/Enums/AbsorberClickMode.d.ts +0 -3
- package/umd/Plugins/Absorbers/Enums/index.d.ts +0 -1
- package/umd/Plugins/Absorbers/Enums/index.js +0 -23
- package/umd/Plugins/Absorbers/Options/Classes/Absorber.d.ts +0 -18
- package/umd/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +0 -11
- package/umd/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +0 -9
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +0 -13
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.d.ts +0 -12
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +0 -6
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +0 -4
- package/umd/Plugins/Absorbers/index.d.ts +0 -2
- package/umd/Plugins/Emitters/EmitterContainer.d.ts +0 -10
- package/umd/Plugins/Emitters/EmitterInstance.d.ts +0 -45
- package/umd/Plugins/Emitters/Emitters.d.ts +0 -25
- package/umd/Plugins/Emitters/EmittersEngine.d.ts +0 -7
- package/umd/Plugins/Emitters/Enums/EmitterClickMode.d.ts +0 -3
- package/umd/Plugins/Emitters/Enums/EmitterShapeType.d.ts +0 -4
- package/umd/Plugins/Emitters/Enums/index.d.ts +0 -2
- package/umd/Plugins/Emitters/Enums/index.js +0 -24
- package/umd/Plugins/Emitters/IEmitterShape.d.ts +0 -4
- package/umd/Plugins/Emitters/Options/Classes/Emitter.d.ts +0 -28
- package/umd/Plugins/Emitters/Options/Classes/EmitterLife.d.ts +0 -11
- package/umd/Plugins/Emitters/Options/Classes/EmitterRate.d.ts +0 -9
- package/umd/Plugins/Emitters/Options/Classes/EmitterSize.d.ts +0 -11
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +0 -24
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterLife.d.ts +0 -6
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterOptions.d.ts +0 -12
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterRate.d.ts +0 -5
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterSize.d.ts +0 -5
- package/umd/Plugins/Emitters/ShapeManager.d.ts +0 -9
- package/umd/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +0 -5
- package/umd/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +0 -5
- package/umd/Plugins/Emitters/index.d.ts +0 -3
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskInlineArrangement.d.ts +0 -8
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskMoveType.d.ts +0 -4
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskType.d.ts +0 -6
- package/umd/Plugins/PolygonMask/Enums/index.d.ts +0 -3
- package/umd/Plugins/PolygonMask/Enums/index.js +0 -25
- package/umd/Plugins/PolygonMask/Interfaces/ISvgPath.d.ts +0 -6
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +0 -24
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.d.ts +0 -15
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.d.ts +0 -11
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +0 -9
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +0 -11
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +0 -10
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +0 -18
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +0 -8
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDrawStroke.d.ts +0 -6
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskInline.d.ts +0 -4
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.d.ts +0 -6
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.d.ts +0 -5
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskOptions.d.ts +0 -4
- package/umd/Plugins/PolygonMask/PolygonMaskInstance.d.ts +0 -38
- package/umd/Plugins/PolygonMask/Types.d.ts +0 -8
- package/umd/Plugins/PolygonMask/Utils.d.ts +0 -11
- package/umd/Plugins/PolygonMask/index.d.ts +0 -2
- package/umd/Plugins/PolygonMask/pathseg.d.ts +0 -0
- package/umd/Shapes/Circle/CircleDrawer.d.ts +0 -5
- package/umd/Shapes/Circle/index.d.ts +0 -2
- package/umd/Shapes/Image/ImageDrawer.d.ts +0 -18
- package/umd/Shapes/Image/Utils.d.ts +0 -28
- package/umd/Shapes/Image/index.d.ts +0 -2
- package/umd/Shapes/Line/LineDrawer.d.ts +0 -5
- package/umd/Shapes/Line/index.d.ts +0 -2
- package/umd/Shapes/Polygon/PolygonDrawer.d.ts +0 -7
- package/umd/Shapes/Polygon/PolygonDrawerBase.d.ts +0 -15
- package/umd/Shapes/Polygon/TriangleDrawer.d.ts +0 -8
- package/umd/Shapes/Polygon/index.d.ts +0 -4
- package/umd/Shapes/Square/SquareDrawer.d.ts +0 -5
- package/umd/Shapes/Square/index.d.ts +0 -2
- package/umd/Shapes/Star/StarDrawer.d.ts +0 -5
- package/umd/Shapes/Star/index.d.ts +0 -2
- package/umd/Shapes/Text/TextDrawer.d.ts +0 -7
- package/umd/Shapes/Text/index.d.ts +0 -2
- package/umd/Types/ParticlesGroups.d.ts +0 -4
- package/umd/Types/PathOptions.d.ts +0 -3
- package/umd/Types/RangeValue.d.ts +0 -2
- package/umd/Types/RecursivePartial.d.ts +0 -3
- package/umd/Types/ShapeData.d.ts +0 -5
- package/umd/Types/ShapeDrawerFunctions.d.ts +0 -11
- package/umd/Types/SingleOrMultiple.d.ts +0 -1
- package/umd/Types/index.d.ts +0 -6
- package/umd/Types/index.js +0 -28
- package/umd/Updaters/Angle/AngleUpdater.d.ts +0 -8
- package/umd/Updaters/Angle/index.d.ts +0 -2
- package/umd/Updaters/Color/ColorUpdater.d.ts +0 -8
- package/umd/Updaters/Color/index.d.ts +0 -2
- package/umd/Updaters/Life/LifeUpdater.d.ts +0 -8
- package/umd/Updaters/Life/index.d.ts +0 -2
- package/umd/Updaters/Opacity/OpacityUpdater.d.ts +0 -8
- package/umd/Updaters/Opacity/index.d.ts +0 -2
- package/umd/Updaters/OutModes/IBounceData.d.ts +0 -11
- package/umd/Updaters/OutModes/OutOfCanvasUpdater.d.ts +0 -13
- package/umd/Updaters/OutModes/Utils.d.ts +0 -3
- package/umd/Updaters/OutModes/index.d.ts +0 -2
- package/umd/Updaters/Roll/RollUpdater.d.ts +0 -6
- package/umd/Updaters/Roll/index.d.ts +0 -2
- package/umd/Updaters/Size/SizeUpdater.d.ts +0 -6
- package/umd/Updaters/Size/index.d.ts +0 -2
- package/umd/Updaters/StrokeColor/StrokeColorUpdater.d.ts +0 -8
- package/umd/Updaters/StrokeColor/index.d.ts +0 -2
- package/umd/Updaters/Tilt/TiltUpdater.d.ts +0 -8
- package/umd/Updaters/Tilt/index.d.ts +0 -2
- package/umd/Updaters/Wobble/WobbleUpdater.d.ts +0 -14
- package/umd/Updaters/Wobble/index.d.ts +0 -2
- package/umd/Utils/CanvasUtils.d.ts +0 -19
- package/umd/Utils/ColorUtils.d.ts +0 -26
- package/umd/Utils/NumberUtils.d.ts +0 -23
- package/umd/Utils/Utils.d.ts +0 -38
- package/umd/Utils/index.d.ts +0 -4
- package/umd/Utils/index.js +0 -26
- package/umd/engine.d.ts +0 -26
- package/umd/full.d.ts +0 -2
- package/umd/index.d.ts +0 -20
- package/umd/index.engine.d.ts +0 -13
- package/umd/index.slim.d.ts +0 -14
- package/umd/pjs.d.ts +0 -14
- package/umd/slim.d.ts +0 -2
package/tsparticles.engine.js
CHANGED
|
@@ -75,6 +75,12 @@
|
|
|
75
75
|
Main: function() {
|
|
76
76
|
return Engine;
|
|
77
77
|
},
|
|
78
|
+
Options: function() {
|
|
79
|
+
return Options;
|
|
80
|
+
},
|
|
81
|
+
OptionsColor: function() {
|
|
82
|
+
return OptionsColor;
|
|
83
|
+
},
|
|
78
84
|
Particle: function() {
|
|
79
85
|
return Particle;
|
|
80
86
|
},
|
|
@@ -84,9 +90,6 @@
|
|
|
84
90
|
ParticlesInteractorBase: function() {
|
|
85
91
|
return ParticlesInteractorBase;
|
|
86
92
|
},
|
|
87
|
-
ParticlesMover: function() {
|
|
88
|
-
return ParticlesMover;
|
|
89
|
-
},
|
|
90
93
|
Plugins: function() {
|
|
91
94
|
return Plugins;
|
|
92
95
|
},
|
|
@@ -126,6 +129,21 @@
|
|
|
126
129
|
calcEasing: function() {
|
|
127
130
|
return calcEasing;
|
|
128
131
|
},
|
|
132
|
+
calcExactPositionOrRandomFromSize: function() {
|
|
133
|
+
return calcExactPositionOrRandomFromSize;
|
|
134
|
+
},
|
|
135
|
+
calcExactPositionOrRandomFromSizeRanged: function() {
|
|
136
|
+
return calcExactPositionOrRandomFromSizeRanged;
|
|
137
|
+
},
|
|
138
|
+
calcPositionFromSize: function() {
|
|
139
|
+
return calcPositionFromSize;
|
|
140
|
+
},
|
|
141
|
+
calcPositionOrRandomFromSize: function() {
|
|
142
|
+
return calcPositionOrRandomFromSize;
|
|
143
|
+
},
|
|
144
|
+
calcPositionOrRandomFromSizeRanged: function() {
|
|
145
|
+
return calcPositionOrRandomFromSizeRanged;
|
|
146
|
+
},
|
|
129
147
|
calculateBounds: function() {
|
|
130
148
|
return calculateBounds;
|
|
131
149
|
},
|
|
@@ -331,6 +349,111 @@
|
|
|
331
349
|
return tsParticles;
|
|
332
350
|
}
|
|
333
351
|
});
|
|
352
|
+
class Constants {}
|
|
353
|
+
Constants.generatedAttribute = "generated";
|
|
354
|
+
Constants.randomColorValue = "random";
|
|
355
|
+
Constants.midColorValue = "mid";
|
|
356
|
+
Constants.touchEndEvent = "touchend";
|
|
357
|
+
Constants.mouseDownEvent = "mousedown";
|
|
358
|
+
Constants.mouseUpEvent = "mouseup";
|
|
359
|
+
Constants.mouseMoveEvent = "mousemove";
|
|
360
|
+
Constants.touchStartEvent = "touchstart";
|
|
361
|
+
Constants.touchMoveEvent = "touchmove";
|
|
362
|
+
Constants.mouseLeaveEvent = "mouseleave";
|
|
363
|
+
Constants.mouseOutEvent = "mouseout";
|
|
364
|
+
Constants.touchCancelEvent = "touchcancel";
|
|
365
|
+
Constants.resizeEvent = "resize";
|
|
366
|
+
Constants.visibilityChangeEvent = "visibilitychange";
|
|
367
|
+
Constants.noPolygonDataLoaded = "No polygon data loaded.";
|
|
368
|
+
Constants.noPolygonFound = "No polygon found, you need to specify SVG url in config.";
|
|
369
|
+
class Vector {
|
|
370
|
+
constructor(xOrCoords, y) {
|
|
371
|
+
if (typeof xOrCoords !== "number" && xOrCoords) {
|
|
372
|
+
this.x = xOrCoords.x;
|
|
373
|
+
this.y = xOrCoords.y;
|
|
374
|
+
} else if (xOrCoords !== undefined && y !== undefined) {
|
|
375
|
+
this.x = xOrCoords;
|
|
376
|
+
this.y = y;
|
|
377
|
+
} else {
|
|
378
|
+
throw new Error("tsParticles - Vector not initialized correctly");
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
static clone(source) {
|
|
382
|
+
return Vector.create(source.x, source.y);
|
|
383
|
+
}
|
|
384
|
+
static create(x, y) {
|
|
385
|
+
return new Vector(x, y);
|
|
386
|
+
}
|
|
387
|
+
static get origin() {
|
|
388
|
+
return Vector.create(0, 0);
|
|
389
|
+
}
|
|
390
|
+
get angle() {
|
|
391
|
+
return Math.atan2(this.y, this.x);
|
|
392
|
+
}
|
|
393
|
+
set angle(angle) {
|
|
394
|
+
this.updateFromAngle(angle, this.length);
|
|
395
|
+
}
|
|
396
|
+
get length() {
|
|
397
|
+
return Math.sqrt(this.getLengthSq());
|
|
398
|
+
}
|
|
399
|
+
set length(length) {
|
|
400
|
+
this.updateFromAngle(this.angle, length);
|
|
401
|
+
}
|
|
402
|
+
add(v) {
|
|
403
|
+
return Vector.create(this.x + v.x, this.y + v.y);
|
|
404
|
+
}
|
|
405
|
+
addTo(v) {
|
|
406
|
+
this.x += v.x;
|
|
407
|
+
this.y += v.y;
|
|
408
|
+
}
|
|
409
|
+
sub(v) {
|
|
410
|
+
return Vector.create(this.x - v.x, this.y - v.y);
|
|
411
|
+
}
|
|
412
|
+
subFrom(v) {
|
|
413
|
+
this.x -= v.x;
|
|
414
|
+
this.y -= v.y;
|
|
415
|
+
}
|
|
416
|
+
mult(n) {
|
|
417
|
+
return Vector.create(this.x * n, this.y * n);
|
|
418
|
+
}
|
|
419
|
+
multTo(n) {
|
|
420
|
+
this.x *= n;
|
|
421
|
+
this.y *= n;
|
|
422
|
+
}
|
|
423
|
+
div(n) {
|
|
424
|
+
return Vector.create(this.x / n, this.y / n);
|
|
425
|
+
}
|
|
426
|
+
divTo(n) {
|
|
427
|
+
this.x /= n;
|
|
428
|
+
this.y /= n;
|
|
429
|
+
}
|
|
430
|
+
distanceTo(v) {
|
|
431
|
+
return this.sub(v).length;
|
|
432
|
+
}
|
|
433
|
+
getLengthSq() {
|
|
434
|
+
return this.x ** 2 + this.y ** 2;
|
|
435
|
+
}
|
|
436
|
+
distanceToSq(v) {
|
|
437
|
+
return this.sub(v).getLengthSq();
|
|
438
|
+
}
|
|
439
|
+
manhattanDistanceTo(v) {
|
|
440
|
+
return Math.abs(v.x - this.x) + Math.abs(v.y - this.y);
|
|
441
|
+
}
|
|
442
|
+
copy() {
|
|
443
|
+
return Vector.clone(this);
|
|
444
|
+
}
|
|
445
|
+
setTo(v) {
|
|
446
|
+
this.x = v.x;
|
|
447
|
+
this.y = v.y;
|
|
448
|
+
}
|
|
449
|
+
rotate(angle) {
|
|
450
|
+
return Vector.create(this.x * Math.cos(angle) - this.y * Math.sin(angle), this.x * Math.sin(angle) + this.y * Math.cos(angle));
|
|
451
|
+
}
|
|
452
|
+
updateFromAngle(angle, length) {
|
|
453
|
+
this.x = Math.cos(angle) * length;
|
|
454
|
+
this.y = Math.sin(angle) * length;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
334
457
|
function clamp(num, min, max) {
|
|
335
458
|
return Math.min(Math.max(num, min), max);
|
|
336
459
|
}
|
|
@@ -365,16 +488,14 @@
|
|
|
365
488
|
} : setRangeValue(min, max);
|
|
366
489
|
}
|
|
367
490
|
function getValue(options) {
|
|
368
|
-
const random = options.random
|
|
369
|
-
const {enable: enable, minimumValue: minimumValue} = typeof random === "boolean" ? {
|
|
491
|
+
const random = options.random, {enable: enable, minimumValue: minimumValue} = typeof random === "boolean" ? {
|
|
370
492
|
enable: random,
|
|
371
493
|
minimumValue: 0
|
|
372
494
|
} : random;
|
|
373
495
|
return enable ? getRangeValue(setRangeValue(options.value, minimumValue)) : getRangeValue(options.value);
|
|
374
496
|
}
|
|
375
497
|
function getDistances(pointA, pointB) {
|
|
376
|
-
const dx = pointA.x - pointB.x;
|
|
377
|
-
const dy = pointA.y - pointB.y;
|
|
498
|
+
const dx = pointA.x - pointB.x, dy = pointA.y - pointB.y;
|
|
378
499
|
return {
|
|
379
500
|
dx: dx,
|
|
380
501
|
dy: dy,
|
|
@@ -450,8 +571,7 @@
|
|
|
450
571
|
|
|
451
572
|
case "ease-out-back":
|
|
452
573
|
{
|
|
453
|
-
const c1 = 1.70158;
|
|
454
|
-
const c3 = c1 + 1;
|
|
574
|
+
const c1 = 1.70158, c3 = c1 + 1;
|
|
455
575
|
return 1 + c3 * Math.pow(value - 1, 3) + c1 * Math.pow(value - 1, 2);
|
|
456
576
|
}
|
|
457
577
|
|
|
@@ -462,29 +582,72 @@
|
|
|
462
582
|
return value;
|
|
463
583
|
}
|
|
464
584
|
}
|
|
585
|
+
function calcPositionFromSize(data) {
|
|
586
|
+
var _a, _b;
|
|
587
|
+
return ((_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== undefined && ((_b = data.position) === null || _b === void 0 ? void 0 : _b.y) !== undefined ? {
|
|
588
|
+
x: data.position.x * data.size.width / 100,
|
|
589
|
+
y: data.position.y * data.size.height / 100
|
|
590
|
+
} : undefined;
|
|
591
|
+
}
|
|
592
|
+
function calcPositionOrRandomFromSize(data) {
|
|
593
|
+
var _a, _b, _c, _d;
|
|
594
|
+
return {
|
|
595
|
+
x: ((_b = (_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : Math.random() * 100) * data.size.width / 100,
|
|
596
|
+
y: ((_d = (_c = data.position) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : Math.random() * 100) * data.size.height / 100
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
function calcPositionOrRandomFromSizeRanged(data) {
|
|
600
|
+
var _a, _b;
|
|
601
|
+
const position = {
|
|
602
|
+
x: ((_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== undefined ? getRangeValue(data.position.x) : undefined,
|
|
603
|
+
y: ((_b = data.position) === null || _b === void 0 ? void 0 : _b.y) !== undefined ? getRangeValue(data.position.y) : undefined
|
|
604
|
+
};
|
|
605
|
+
return calcPositionOrRandomFromSize({
|
|
606
|
+
size: data.size,
|
|
607
|
+
position: position
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
function calcExactPositionOrRandomFromSize(data) {
|
|
611
|
+
var _a, _b, _c, _d;
|
|
612
|
+
return {
|
|
613
|
+
x: (_b = (_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : Math.random() * data.size.width,
|
|
614
|
+
y: (_d = (_c = data.position) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : Math.random() * data.size.height
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
function calcExactPositionOrRandomFromSizeRanged(data) {
|
|
618
|
+
var _a, _b;
|
|
619
|
+
const position = {
|
|
620
|
+
x: ((_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== undefined ? getRangeValue(data.position.x) : undefined,
|
|
621
|
+
y: ((_b = data.position) === null || _b === void 0 ? void 0 : _b.y) !== undefined ? getRangeValue(data.position.y) : undefined
|
|
622
|
+
};
|
|
623
|
+
return calcExactPositionOrRandomFromSize({
|
|
624
|
+
size: data.size,
|
|
625
|
+
position: position
|
|
626
|
+
});
|
|
627
|
+
}
|
|
465
628
|
function rectSideBounce(pSide, pOtherSide, rectSide, rectOtherSide, velocity, factor) {
|
|
466
629
|
const res = {
|
|
467
630
|
bounced: false
|
|
468
631
|
};
|
|
469
|
-
if (pOtherSide.min
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
632
|
+
if (pOtherSide.min < rectOtherSide.min || pOtherSide.min > rectOtherSide.max || pOtherSide.max < rectOtherSide.min || pOtherSide.max > rectOtherSide.max) {
|
|
633
|
+
return res;
|
|
634
|
+
}
|
|
635
|
+
if (pSide.max >= rectSide.min && pSide.max <= (rectSide.max + rectSide.min) / 2 && velocity > 0 || pSide.min <= rectSide.max && pSide.min > (rectSide.max + rectSide.min) / 2 && velocity < 0) {
|
|
636
|
+
res.velocity = velocity * -factor;
|
|
637
|
+
res.bounced = true;
|
|
474
638
|
}
|
|
475
639
|
return res;
|
|
476
640
|
}
|
|
477
641
|
function checkSelector(element, selectors) {
|
|
478
|
-
if (selectors instanceof Array) {
|
|
479
|
-
for (const selector of selectors) {
|
|
480
|
-
if (element.matches(selector)) {
|
|
481
|
-
return true;
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
return false;
|
|
485
|
-
} else {
|
|
642
|
+
if (!(selectors instanceof Array)) {
|
|
486
643
|
return element.matches(selectors);
|
|
487
644
|
}
|
|
645
|
+
for (const selector of selectors) {
|
|
646
|
+
if (element.matches(selector)) {
|
|
647
|
+
return true;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
return false;
|
|
488
651
|
}
|
|
489
652
|
function isSsr() {
|
|
490
653
|
return typeof window === "undefined" || !window || typeof window.document === "undefined" || !window.document;
|
|
@@ -557,10 +720,7 @@
|
|
|
557
720
|
if (key === "__proto__") {
|
|
558
721
|
continue;
|
|
559
722
|
}
|
|
560
|
-
const sourceDict = source;
|
|
561
|
-
const value = sourceDict[key];
|
|
562
|
-
const isObject = typeof value === "object";
|
|
563
|
-
const destDict = destination;
|
|
723
|
+
const sourceDict = source, value = sourceDict[key], isObject = typeof value === "object", destDict = destination;
|
|
564
724
|
destDict[key] = isObject && Array.isArray(value) ? value.map((v => deepExtend(destDict[key], v))) : deepExtend(destDict[key], value);
|
|
565
725
|
}
|
|
566
726
|
}
|
|
@@ -572,15 +732,13 @@
|
|
|
572
732
|
function divModeExecute(mode, divs, callback) {
|
|
573
733
|
if (divs instanceof Array) {
|
|
574
734
|
for (const div of divs) {
|
|
575
|
-
const divMode = div.mode;
|
|
576
|
-
const divEnabled = div.enable;
|
|
735
|
+
const divMode = div.mode, divEnabled = div.enable;
|
|
577
736
|
if (divEnabled && isInArray(mode, divMode)) {
|
|
578
737
|
singleDivModeExecute(div, callback);
|
|
579
738
|
}
|
|
580
739
|
}
|
|
581
740
|
} else {
|
|
582
|
-
const divMode = divs.mode;
|
|
583
|
-
const divEnabled = divs.enable;
|
|
741
|
+
const divMode = divs.mode, divEnabled = divs.enable;
|
|
584
742
|
if (divEnabled && isInArray(mode, divMode)) {
|
|
585
743
|
singleDivModeExecute(divs, callback);
|
|
586
744
|
}
|
|
@@ -616,29 +774,18 @@
|
|
|
616
774
|
};
|
|
617
775
|
}
|
|
618
776
|
function circleBounce(p1, p2) {
|
|
619
|
-
const {x: xVelocityDiff, y: yVelocityDiff} = p1.velocity.sub(p2.velocity);
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
if (xVelocityDiff * xDist + yVelocityDiff * yDist >= 0) {
|
|
623
|
-
const angle = -Math.atan2(yDist, xDist);
|
|
624
|
-
const m1 = p1.mass;
|
|
625
|
-
const m2 = p2.mass;
|
|
626
|
-
const u1 = p1.velocity.rotate(angle);
|
|
627
|
-
const u2 = p2.velocity.rotate(angle);
|
|
628
|
-
const v1 = collisionVelocity(u1, u2, m1, m2);
|
|
629
|
-
const v2 = collisionVelocity(u2, u1, m1, m2);
|
|
630
|
-
const vFinal1 = v1.rotate(-angle);
|
|
631
|
-
const vFinal2 = v2.rotate(-angle);
|
|
632
|
-
p1.velocity.x = vFinal1.x * p1.factor.x;
|
|
633
|
-
p1.velocity.y = vFinal1.y * p1.factor.y;
|
|
634
|
-
p2.velocity.x = vFinal2.x * p2.factor.x;
|
|
635
|
-
p2.velocity.y = vFinal2.y * p2.factor.y;
|
|
777
|
+
const {x: xVelocityDiff, y: yVelocityDiff} = p1.velocity.sub(p2.velocity), [pos1, pos2] = [ p1.position, p2.position ], {dx: xDist, dy: yDist} = getDistances(pos2, pos1);
|
|
778
|
+
if (xVelocityDiff * xDist + yVelocityDiff * yDist < 0) {
|
|
779
|
+
return;
|
|
636
780
|
}
|
|
781
|
+
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);
|
|
782
|
+
p1.velocity.x = vFinal1.x * p1.factor.x;
|
|
783
|
+
p1.velocity.y = vFinal1.y * p1.factor.y;
|
|
784
|
+
p2.velocity.x = vFinal2.x * p2.factor.x;
|
|
785
|
+
p2.velocity.y = vFinal2.y * p2.factor.y;
|
|
637
786
|
}
|
|
638
787
|
function rectBounce(particle, divBounds) {
|
|
639
|
-
const pPos = particle.getPosition();
|
|
640
|
-
const size = particle.getRadius();
|
|
641
|
-
const bounds = calculateBounds(pPos, size);
|
|
788
|
+
const pPos = particle.getPosition(), size = particle.getRadius(), bounds = calculateBounds(pPos, size);
|
|
642
789
|
const resH = rectSideBounce({
|
|
643
790
|
min: bounds.left,
|
|
644
791
|
max: bounds.right
|
|
@@ -752,11 +899,7 @@
|
|
|
752
899
|
} : input;
|
|
753
900
|
let res;
|
|
754
901
|
if (typeof color.value === "string") {
|
|
755
|
-
|
|
756
|
-
res = getRandomRgbColor();
|
|
757
|
-
} else {
|
|
758
|
-
res = stringToRgb(color.value);
|
|
759
|
-
}
|
|
902
|
+
res = color.value === Constants.randomColorValue ? getRandomRgbColor() : stringToRgb(color.value);
|
|
760
903
|
} else {
|
|
761
904
|
if (color.value instanceof Array) {
|
|
762
905
|
const colorSelected = itemFromArray(color.value, index, useIndex);
|
|
@@ -764,8 +907,7 @@
|
|
|
764
907
|
value: colorSelected
|
|
765
908
|
});
|
|
766
909
|
} else {
|
|
767
|
-
const colorValue = color.value;
|
|
768
|
-
const rgbColor = (_a = colorValue.rgb) !== null && _a !== void 0 ? _a : color.value;
|
|
910
|
+
const colorValue = color.value, rgbColor = (_a = colorValue.rgb) !== null && _a !== void 0 ? _a : color.value;
|
|
769
911
|
if (rgbColor.r !== undefined) {
|
|
770
912
|
res = rgbColor;
|
|
771
913
|
} else {
|
|
@@ -788,17 +930,14 @@
|
|
|
788
930
|
return rgb !== undefined ? rgbToHsl(rgb) : undefined;
|
|
789
931
|
}
|
|
790
932
|
function rgbToHsl(color) {
|
|
791
|
-
const r1 = color.r / 255;
|
|
792
|
-
const g1 =
|
|
793
|
-
const b1 = color.b / 255;
|
|
794
|
-
const max = Math.max(r1, g1, b1);
|
|
795
|
-
const min = Math.min(r1, g1, b1);
|
|
933
|
+
const r1 = color.r / 255, g1 = color.g / 255, b1 = color.b / 255;
|
|
934
|
+
const max = Math.max(r1, g1, b1), min = Math.min(r1, g1, b1);
|
|
796
935
|
const res = {
|
|
797
936
|
h: 0,
|
|
798
937
|
l: (max + min) / 2,
|
|
799
938
|
s: 0
|
|
800
939
|
};
|
|
801
|
-
if (max
|
|
940
|
+
if (max !== min) {
|
|
802
941
|
res.s = res.l < .5 ? (max - min) / (max + min) : (max - min) / (2 - max - min);
|
|
803
942
|
res.h = r1 === max ? (g1 - b1) / (max - min) : res.h = g1 === max ? 2 + (b1 - r1) / (max - min) : 4 + (r1 - g1) / (max - min);
|
|
804
943
|
}
|
|
@@ -822,8 +961,7 @@
|
|
|
822
961
|
b: 0,
|
|
823
962
|
g: 0,
|
|
824
963
|
r: 0
|
|
825
|
-
}
|
|
826
|
-
const hslPercent = {
|
|
964
|
+
}, hslPercent = {
|
|
827
965
|
h: hsl.h / 360,
|
|
828
966
|
l: hsl.l / 100,
|
|
829
967
|
s: hsl.s / 100
|
|
@@ -833,8 +971,7 @@
|
|
|
833
971
|
result.g = hslPercent.l;
|
|
834
972
|
result.r = hslPercent.l;
|
|
835
973
|
} else {
|
|
836
|
-
const q = hslPercent.l < .5 ? hslPercent.l * (1 + hslPercent.s) : hslPercent.l + hslPercent.s - hslPercent.l * hslPercent.s;
|
|
837
|
-
const p = 2 * hslPercent.l - q;
|
|
974
|
+
const q = hslPercent.l < .5 ? hslPercent.l * (1 + hslPercent.s) : hslPercent.l + hslPercent.s - hslPercent.l * hslPercent.s, p = 2 * hslPercent.l - q;
|
|
838
975
|
result.r = hue2rgb(p, q, hslPercent.h + 1 / 3);
|
|
839
976
|
result.g = hue2rgb(p, q, hslPercent.h);
|
|
840
977
|
result.b = hue2rgb(p, q, hslPercent.h - 1 / 3);
|
|
@@ -854,8 +991,7 @@
|
|
|
854
991
|
};
|
|
855
992
|
}
|
|
856
993
|
function hslToHsv(hsl) {
|
|
857
|
-
const l = hsl.l / 100, sl = hsl.s / 100;
|
|
858
|
-
const v = l + sl * Math.min(l, 1 - l), sv = !v ? 0 : 2 * (1 - l / v);
|
|
994
|
+
const l = hsl.l / 100, sl = hsl.s / 100, v = l + sl * Math.min(l, 1 - l), sv = !v ? 0 : 2 * (1 - l / v);
|
|
859
995
|
return {
|
|
860
996
|
h: hsl.h,
|
|
861
997
|
s: sv * 100,
|
|
@@ -872,8 +1008,7 @@
|
|
|
872
1008
|
};
|
|
873
1009
|
}
|
|
874
1010
|
function hsvToHsl(hsv) {
|
|
875
|
-
const v = hsv.v / 100, sv = hsv.s / 100;
|
|
876
|
-
const l = v * (1 - sv / 2), sl = l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l);
|
|
1011
|
+
const v = hsv.v / 100, sv = hsv.s / 100, l = v * (1 - sv / 2), sl = l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l);
|
|
877
1012
|
return {
|
|
878
1013
|
h: hsv.h,
|
|
879
1014
|
l: l * 100,
|
|
@@ -894,8 +1029,7 @@
|
|
|
894
1029
|
b: 0,
|
|
895
1030
|
g: 0,
|
|
896
1031
|
r: 0
|
|
897
|
-
}
|
|
898
|
-
const hsvPercent = {
|
|
1032
|
+
}, hsvPercent = {
|
|
899
1033
|
h: hsv.h / 60,
|
|
900
1034
|
s: hsv.s / 100,
|
|
901
1035
|
v: hsv.v / 100
|
|
@@ -1004,8 +1138,7 @@
|
|
|
1004
1138
|
return getStyleFromHsl(hsvToHsl(color), opacity);
|
|
1005
1139
|
}
|
|
1006
1140
|
function colorMix(color1, color2, size1, size2) {
|
|
1007
|
-
let rgb1 = color1;
|
|
1008
|
-
let rgb2 = color2;
|
|
1141
|
+
let rgb1 = color1, rgb2 = color2;
|
|
1009
1142
|
if (rgb1.r === undefined) {
|
|
1010
1143
|
rgb1 = hslToRgb(color1);
|
|
1011
1144
|
}
|
|
@@ -1023,8 +1156,7 @@
|
|
|
1023
1156
|
if (linkColor === Constants.randomColorValue) {
|
|
1024
1157
|
return getRandomRgbColor();
|
|
1025
1158
|
} else if (linkColor === "mid") {
|
|
1026
|
-
const sourceColor = (_a = p1.getFillColor()) !== null && _a !== void 0 ? _a : p1.getStrokeColor();
|
|
1027
|
-
const destColor = (_b = p2 === null || p2 === void 0 ? void 0 : p2.getFillColor()) !== null && _b !== void 0 ? _b : p2 === null || p2 === void 0 ? void 0 : p2.getStrokeColor();
|
|
1159
|
+
const sourceColor = (_a = p1.getFillColor()) !== null && _a !== void 0 ? _a : p1.getStrokeColor(), destColor = (_b = p2 === null || p2 === void 0 ? void 0 : p2.getFillColor()) !== null && _b !== void 0 ? _b : p2 === null || p2 === void 0 ? void 0 : p2.getStrokeColor();
|
|
1028
1160
|
if (sourceColor && destColor && p2) {
|
|
1029
1161
|
return colorMix(sourceColor, destColor, p1.getRadius(), p2.getRadius());
|
|
1030
1162
|
} else {
|
|
@@ -1128,13 +1260,11 @@
|
|
|
1128
1260
|
drawLine(context, begin, end);
|
|
1129
1261
|
drawn = true;
|
|
1130
1262
|
} else if (warp) {
|
|
1131
|
-
let pi1;
|
|
1132
|
-
let pi2;
|
|
1263
|
+
let pi1, pi2;
|
|
1133
1264
|
const endNE = {
|
|
1134
1265
|
x: end.x - canvasSize.width,
|
|
1135
1266
|
y: end.y
|
|
1136
|
-
};
|
|
1137
|
-
const d1 = getDistances(begin, endNE);
|
|
1267
|
+
}, d1 = getDistances(begin, endNE);
|
|
1138
1268
|
if (d1.distance <= maxDistance) {
|
|
1139
1269
|
const yi = begin.y - d1.dy / d1.dx * begin.x;
|
|
1140
1270
|
pi1 = {
|
|
@@ -1149,11 +1279,9 @@
|
|
|
1149
1279
|
const endSW = {
|
|
1150
1280
|
x: end.x,
|
|
1151
1281
|
y: end.y - canvasSize.height
|
|
1152
|
-
};
|
|
1153
|
-
const d2 = getDistances(begin, endSW);
|
|
1282
|
+
}, d2 = getDistances(begin, endSW);
|
|
1154
1283
|
if (d2.distance <= maxDistance) {
|
|
1155
|
-
const yi = begin.y - d2.dy / d2.dx * begin.x;
|
|
1156
|
-
const xi = -yi / (d2.dy / d2.dx);
|
|
1284
|
+
const yi = begin.y - d2.dy / d2.dx * begin.x, xi = -yi / (d2.dy / d2.dx);
|
|
1157
1285
|
pi1 = {
|
|
1158
1286
|
x: xi,
|
|
1159
1287
|
y: 0
|
|
@@ -1166,11 +1294,9 @@
|
|
|
1166
1294
|
const endSE = {
|
|
1167
1295
|
x: end.x - canvasSize.width,
|
|
1168
1296
|
y: end.y - canvasSize.height
|
|
1169
|
-
};
|
|
1170
|
-
const d3 = getDistances(begin, endSE);
|
|
1297
|
+
}, d3 = getDistances(begin, endSE);
|
|
1171
1298
|
if (d3.distance <= maxDistance) {
|
|
1172
|
-
const yi = begin.y - d3.dy / d3.dx * begin.x;
|
|
1173
|
-
const xi = -yi / (d3.dy / d3.dx);
|
|
1299
|
+
const yi = begin.y - d3.dy / d3.dx * begin.x, xi = -yi / (d3.dy / d3.dx);
|
|
1174
1300
|
pi1 = {
|
|
1175
1301
|
x: xi,
|
|
1176
1302
|
y: yi
|
|
@@ -1222,16 +1348,11 @@
|
|
|
1222
1348
|
context.restore();
|
|
1223
1349
|
}
|
|
1224
1350
|
function gradient(context, p1, p2, opacity) {
|
|
1225
|
-
const gradStop = Math.floor(p2.getRadius() / p1.getRadius());
|
|
1226
|
-
const color1 = p1.getFillColor();
|
|
1227
|
-
const color2 = p2.getFillColor();
|
|
1351
|
+
const gradStop = Math.floor(p2.getRadius() / p1.getRadius()), color1 = p1.getFillColor(), color2 = p2.getFillColor();
|
|
1228
1352
|
if (!color1 || !color2) {
|
|
1229
1353
|
return;
|
|
1230
1354
|
}
|
|
1231
|
-
const sourcePos = p1.getPosition();
|
|
1232
|
-
const destPos = p2.getPosition();
|
|
1233
|
-
const midRgb = colorMix(color1, color2, p1.getRadius(), p2.getRadius());
|
|
1234
|
-
const grad = context.createLinearGradient(sourcePos.x, sourcePos.y, destPos.x, destPos.y);
|
|
1355
|
+
const sourcePos = p1.getPosition(), destPos = p2.getPosition(), midRgb = colorMix(color1, color2, p1.getRadius(), p2.getRadius()), grad = context.createLinearGradient(sourcePos.x, sourcePos.y, destPos.x, destPos.y);
|
|
1235
1356
|
grad.addColorStop(0, getStyleFromHsl(color1, opacity));
|
|
1236
1357
|
grad.addColorStop(gradStop > 1 ? 1 : gradStop, getStyleFromRgb(midRgb, opacity));
|
|
1237
1358
|
grad.addColorStop(1, getStyleFromHsl(color2, opacity));
|
|
@@ -1245,17 +1366,12 @@
|
|
|
1245
1366
|
context.stroke();
|
|
1246
1367
|
context.restore();
|
|
1247
1368
|
}
|
|
1248
|
-
function drawParticle(container, context, particle, delta,
|
|
1249
|
-
var _a, _b, _c, _d
|
|
1250
|
-
const pos = particle.getPosition();
|
|
1251
|
-
const tiltOptions = particle.options.tilt;
|
|
1252
|
-
const rollOptions = particle.options.roll;
|
|
1369
|
+
function drawParticle(container, context, particle, delta, colorStyles, backgroundMask, composite, radius, opacity, shadow) {
|
|
1370
|
+
var _a, _b, _c, _d;
|
|
1371
|
+
const pos = particle.getPosition(), tiltOptions = particle.options.tilt, rollOptions = particle.options.roll;
|
|
1253
1372
|
context.save();
|
|
1254
1373
|
if (tiltOptions.enable || rollOptions.enable) {
|
|
1255
|
-
const roll = rollOptions.enable && particle.roll;
|
|
1256
|
-
const tilt = tiltOptions.enable && particle.tilt;
|
|
1257
|
-
const rollHorizontal = roll && (rollOptions.mode === "horizontal" || rollOptions.mode === "both");
|
|
1258
|
-
const rollVertical = roll && (rollOptions.mode === "vertical" || rollOptions.mode === "both");
|
|
1374
|
+
const roll = rollOptions.enable && particle.roll, tilt = tiltOptions.enable && particle.tilt, rollHorizontal = roll && (rollOptions.mode === "horizontal" || rollOptions.mode === "both"), rollVertical = roll && (rollOptions.mode === "vertical" || rollOptions.mode === "both");
|
|
1259
1375
|
context.setTransform(rollHorizontal ? Math.cos(particle.roll.angle) : 1, tilt ? Math.cos(particle.tilt.value) * particle.tilt.cosDirection : 0, tilt ? Math.sin(particle.tilt.value) * particle.tilt.sinDirection : 0, rollVertical ? Math.sin(particle.roll.angle) : 1, pos.x, pos.y);
|
|
1260
1376
|
} else {
|
|
1261
1377
|
context.translate(pos.x, pos.y);
|
|
@@ -1275,29 +1391,16 @@
|
|
|
1275
1391
|
context.shadowOffsetX = shadow.offset.x;
|
|
1276
1392
|
context.shadowOffsetY = shadow.offset.y;
|
|
1277
1393
|
}
|
|
1278
|
-
if (
|
|
1279
|
-
|
|
1280
|
-
const fillGradient = gradient.type === "radial" ? context.createRadialGradient(0, 0, 0, 0, 0, radius) : context.createLinearGradient(Math.cos(gradientAngle) * -radius, Math.sin(gradientAngle) * -radius, Math.cos(gradientAngle) * radius, Math.sin(gradientAngle) * radius);
|
|
1281
|
-
for (const color of gradient.colors) {
|
|
1282
|
-
fillGradient.addColorStop(color.stop, getStyleFromHsl({
|
|
1283
|
-
h: color.value.h.value,
|
|
1284
|
-
s: color.value.s.value,
|
|
1285
|
-
l: color.value.l.value
|
|
1286
|
-
}, (_d = (_c = color.opacity) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : opacity));
|
|
1287
|
-
}
|
|
1288
|
-
context.fillStyle = fillGradient;
|
|
1289
|
-
} else {
|
|
1290
|
-
if (fillColorValue) {
|
|
1291
|
-
context.fillStyle = fillColorValue;
|
|
1292
|
-
}
|
|
1394
|
+
if (colorStyles.fill) {
|
|
1395
|
+
context.fillStyle = colorStyles.fill;
|
|
1293
1396
|
}
|
|
1294
1397
|
const stroke = particle.stroke;
|
|
1295
|
-
context.lineWidth = (
|
|
1296
|
-
if (
|
|
1297
|
-
context.strokeStyle =
|
|
1398
|
+
context.lineWidth = (_c = particle.strokeWidth) !== null && _c !== void 0 ? _c : 0;
|
|
1399
|
+
if (colorStyles.stroke) {
|
|
1400
|
+
context.strokeStyle = colorStyles.stroke;
|
|
1298
1401
|
}
|
|
1299
1402
|
drawShape(container, context, particle, radius, opacity, delta);
|
|
1300
|
-
if (((
|
|
1403
|
+
if (((_d = stroke === null || stroke === void 0 ? void 0 : stroke.width) !== null && _d !== void 0 ? _d : 0) > 0) {
|
|
1301
1404
|
context.stroke();
|
|
1302
1405
|
}
|
|
1303
1406
|
if (particle.close) {
|
|
@@ -1351,20 +1454,21 @@
|
|
|
1351
1454
|
context.restore();
|
|
1352
1455
|
}
|
|
1353
1456
|
function drawParticlePlugin(context, plugin, particle, delta) {
|
|
1354
|
-
if (plugin.drawParticle
|
|
1355
|
-
|
|
1356
|
-
plugin.drawParticle(context, particle, delta);
|
|
1357
|
-
context.restore();
|
|
1457
|
+
if (!plugin.drawParticle) {
|
|
1458
|
+
return;
|
|
1358
1459
|
}
|
|
1460
|
+
context.save();
|
|
1461
|
+
plugin.drawParticle(context, particle, delta);
|
|
1462
|
+
context.restore();
|
|
1359
1463
|
}
|
|
1360
1464
|
function drawEllipse(context, particle, fillColorValue, radius, opacity, width, rotation, start, end) {
|
|
1465
|
+
if (width <= 0) {
|
|
1466
|
+
return;
|
|
1467
|
+
}
|
|
1361
1468
|
const pos = particle.getPosition();
|
|
1362
1469
|
if (fillColorValue) {
|
|
1363
1470
|
context.strokeStyle = getStyleFromHsl(fillColorValue, opacity);
|
|
1364
1471
|
}
|
|
1365
|
-
if (width === 0) {
|
|
1366
|
-
return;
|
|
1367
|
-
}
|
|
1368
1472
|
context.lineWidth = width;
|
|
1369
1473
|
const rotationRadian = rotation * Math.PI / 180;
|
|
1370
1474
|
context.beginPath();
|
|
@@ -1378,151 +1482,293 @@
|
|
|
1378
1482
|
l: color.l + (type === "darken" ? -1 : 1) * value
|
|
1379
1483
|
};
|
|
1380
1484
|
}
|
|
1381
|
-
class
|
|
1382
|
-
constructor(
|
|
1383
|
-
this.
|
|
1384
|
-
|
|
1385
|
-
|
|
1485
|
+
class Canvas {
|
|
1486
|
+
constructor(container) {
|
|
1487
|
+
this.container = container;
|
|
1488
|
+
this.size = {
|
|
1489
|
+
height: 0,
|
|
1490
|
+
width: 0
|
|
1386
1491
|
};
|
|
1492
|
+
this.context = null;
|
|
1493
|
+
this.generatedCanvas = false;
|
|
1387
1494
|
}
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
this.
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
return getDistance(point, this.position) <= this.radius;
|
|
1495
|
+
init() {
|
|
1496
|
+
this.resize();
|
|
1497
|
+
this.initStyle();
|
|
1498
|
+
this.initCover();
|
|
1499
|
+
this.initTrail();
|
|
1500
|
+
this.initBackground();
|
|
1501
|
+
this.paint();
|
|
1396
1502
|
}
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
const pos2 = range.position;
|
|
1402
|
-
const xDist = Math.abs(pos2.x - pos1.x);
|
|
1403
|
-
const yDist = Math.abs(pos2.y - pos1.y);
|
|
1404
|
-
const r = this.radius;
|
|
1405
|
-
if (circle.radius !== undefined) {
|
|
1406
|
-
const rSum = r + circle.radius;
|
|
1407
|
-
const dist = Math.sqrt(xDist * xDist + yDist + yDist);
|
|
1408
|
-
return rSum > dist;
|
|
1409
|
-
} else if (rect.size !== undefined) {
|
|
1410
|
-
const w = rect.size.width;
|
|
1411
|
-
const h = rect.size.height;
|
|
1412
|
-
const edges = Math.pow(xDist - w, 2) + Math.pow(yDist - h, 2);
|
|
1413
|
-
if (xDist > r + w || yDist > r + h) {
|
|
1414
|
-
return false;
|
|
1415
|
-
}
|
|
1416
|
-
if (xDist <= w || yDist <= h) {
|
|
1417
|
-
return true;
|
|
1418
|
-
}
|
|
1419
|
-
return edges <= r * r;
|
|
1503
|
+
loadCanvas(canvas) {
|
|
1504
|
+
var _a;
|
|
1505
|
+
if (this.generatedCanvas) {
|
|
1506
|
+
(_a = this.element) === null || _a === void 0 ? void 0 : _a.remove();
|
|
1420
1507
|
}
|
|
1421
|
-
|
|
1508
|
+
this.generatedCanvas = canvas.dataset && Constants.generatedAttribute in canvas.dataset ? canvas.dataset[Constants.generatedAttribute] === "true" : this.generatedCanvas;
|
|
1509
|
+
this.element = canvas;
|
|
1510
|
+
this.originalStyle = deepExtend({}, this.element.style);
|
|
1511
|
+
this.size.height = canvas.offsetHeight;
|
|
1512
|
+
this.size.width = canvas.offsetWidth;
|
|
1513
|
+
this.context = this.element.getContext("2d");
|
|
1514
|
+
this.container.retina.init();
|
|
1515
|
+
this.initBackground();
|
|
1422
1516
|
}
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
};
|
|
1517
|
+
destroy() {
|
|
1518
|
+
var _a;
|
|
1519
|
+
if (this.generatedCanvas) {
|
|
1520
|
+
(_a = this.element) === null || _a === void 0 ? void 0 : _a.remove();
|
|
1521
|
+
}
|
|
1522
|
+
this.draw((ctx => {
|
|
1523
|
+
clear(ctx, this.size);
|
|
1524
|
+
}));
|
|
1431
1525
|
}
|
|
1432
|
-
|
|
1433
|
-
const
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1526
|
+
paint() {
|
|
1527
|
+
const options = this.container.actualOptions;
|
|
1528
|
+
this.draw((ctx => {
|
|
1529
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
1530
|
+
clear(ctx, this.size);
|
|
1531
|
+
this.paintBase(this.coverColorStyle);
|
|
1532
|
+
} else {
|
|
1533
|
+
this.paintBase();
|
|
1534
|
+
}
|
|
1535
|
+
}));
|
|
1437
1536
|
}
|
|
1438
|
-
|
|
1439
|
-
const
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
const size2 = rect.size;
|
|
1449
|
-
const w2 = size2.width;
|
|
1450
|
-
const h2 = size2.height;
|
|
1451
|
-
return pos2.x < pos1.x + w && pos2.x + w2 > pos1.x && pos2.y < pos1.y + h && pos2.y + h2 > pos1.y;
|
|
1537
|
+
clear() {
|
|
1538
|
+
const options = this.container.actualOptions, trail = options.particles.move.trail;
|
|
1539
|
+
if (options.backgroundMask.enable) {
|
|
1540
|
+
this.paint();
|
|
1541
|
+
} else if (trail.enable && trail.length > 0 && this.trailFillColor) {
|
|
1542
|
+
this.paintBase(getStyleFromRgb(this.trailFillColor, 1 / trail.length));
|
|
1543
|
+
} else {
|
|
1544
|
+
this.draw((ctx => {
|
|
1545
|
+
clear(ctx, this.size);
|
|
1546
|
+
}));
|
|
1452
1547
|
}
|
|
1453
|
-
return false;
|
|
1454
|
-
}
|
|
1455
|
-
}
|
|
1456
|
-
class CircleWarp extends Circle {
|
|
1457
|
-
constructor(x, y, radius, canvasSize) {
|
|
1458
|
-
super(x, y, radius);
|
|
1459
|
-
this.canvasSize = canvasSize;
|
|
1460
|
-
this.canvasSize = {
|
|
1461
|
-
height: canvasSize.height,
|
|
1462
|
-
width: canvasSize.width
|
|
1463
|
-
};
|
|
1464
1548
|
}
|
|
1465
|
-
|
|
1466
|
-
if (
|
|
1467
|
-
return
|
|
1549
|
+
async windowResize() {
|
|
1550
|
+
if (!this.element) {
|
|
1551
|
+
return;
|
|
1468
1552
|
}
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1553
|
+
this.resize();
|
|
1554
|
+
const container = this.container, needsRefresh = container.updateActualOptions();
|
|
1555
|
+
container.particles.setDensity();
|
|
1556
|
+
for (const [, plugin] of container.plugins) {
|
|
1557
|
+
if (plugin.resize !== undefined) {
|
|
1558
|
+
plugin.resize();
|
|
1559
|
+
}
|
|
1475
1560
|
}
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
y: point.y - this.canvasSize.height
|
|
1479
|
-
};
|
|
1480
|
-
if (super.contains(posSE)) {
|
|
1481
|
-
return true;
|
|
1561
|
+
if (needsRefresh) {
|
|
1562
|
+
await container.refresh();
|
|
1482
1563
|
}
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1564
|
+
}
|
|
1565
|
+
resize() {
|
|
1566
|
+
if (!this.element) {
|
|
1567
|
+
return;
|
|
1568
|
+
}
|
|
1569
|
+
const container = this.container, pxRatio = container.retina.pixelRatio, size = container.canvas.size, newSize = {
|
|
1570
|
+
width: this.element.offsetWidth * pxRatio,
|
|
1571
|
+
height: this.element.offsetHeight * pxRatio
|
|
1486
1572
|
};
|
|
1487
|
-
|
|
1573
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
1574
|
+
return;
|
|
1575
|
+
}
|
|
1576
|
+
const oldSize = Object.assign({}, size);
|
|
1577
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
1578
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
1579
|
+
if (this.container.started) {
|
|
1580
|
+
this.resizeFactor = {
|
|
1581
|
+
width: size.width / oldSize.width,
|
|
1582
|
+
height: size.height / oldSize.height
|
|
1583
|
+
};
|
|
1584
|
+
}
|
|
1488
1585
|
}
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1586
|
+
drawConnectLine(p1, p2) {
|
|
1587
|
+
this.draw((ctx => {
|
|
1588
|
+
var _a;
|
|
1589
|
+
const lineStyle = this.lineStyle(p1, p2);
|
|
1590
|
+
if (!lineStyle) {
|
|
1591
|
+
return;
|
|
1592
|
+
}
|
|
1593
|
+
const pos1 = p1.getPosition(), pos2 = p2.getPosition();
|
|
1594
|
+
drawConnectLine(ctx, (_a = p1.retina.linksWidth) !== null && _a !== void 0 ? _a : this.container.retina.linksWidth, lineStyle, pos1, pos2);
|
|
1595
|
+
}));
|
|
1596
|
+
}
|
|
1597
|
+
drawGrabLine(particle, lineColor, opacity, mousePos) {
|
|
1598
|
+
const container = this.container;
|
|
1599
|
+
this.draw((ctx => {
|
|
1600
|
+
var _a;
|
|
1601
|
+
const beginPos = particle.getPosition();
|
|
1602
|
+
drawGrabLine(ctx, (_a = particle.retina.linksWidth) !== null && _a !== void 0 ? _a : container.retina.linksWidth, beginPos, mousePos, lineColor, opacity);
|
|
1603
|
+
}));
|
|
1604
|
+
}
|
|
1605
|
+
drawParticle(particle, delta) {
|
|
1606
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1607
|
+
if (particle.spawning || particle.destroyed) {
|
|
1608
|
+
return;
|
|
1492
1609
|
}
|
|
1493
|
-
const
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1610
|
+
const radius = particle.getRadius();
|
|
1611
|
+
if (radius <= 0) {
|
|
1612
|
+
return;
|
|
1613
|
+
}
|
|
1614
|
+
const pfColor = particle.getFillColor(), psColor = (_a = particle.getStrokeColor()) !== null && _a !== void 0 ? _a : pfColor;
|
|
1615
|
+
if (!pfColor && !psColor) {
|
|
1616
|
+
return;
|
|
1617
|
+
}
|
|
1618
|
+
let [fColor, sColor] = this.getPluginParticleColors(particle);
|
|
1619
|
+
if (!fColor || !sColor) {
|
|
1620
|
+
if (!fColor) {
|
|
1621
|
+
fColor = pfColor ? pfColor : undefined;
|
|
1622
|
+
}
|
|
1623
|
+
if (!sColor) {
|
|
1624
|
+
sColor = psColor ? psColor : undefined;
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
const options = this.container.actualOptions, zIndexOptions = particle.options.zIndex, zOpacityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.opacityRate, opacity = (_d = (_b = particle.bubble.opacity) !== null && _b !== void 0 ? _b : (_c = particle.opacity) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : 1, strokeOpacity = (_f = (_e = particle.stroke) === null || _e === void 0 ? void 0 : _e.opacity) !== null && _f !== void 0 ? _f : opacity, zOpacity = opacity * zOpacityFactor, zStrokeOpacity = strokeOpacity * zOpacityFactor;
|
|
1628
|
+
const colorStyles = {
|
|
1629
|
+
fill: fColor ? getStyleFromHsl(fColor, zOpacity) : undefined
|
|
1498
1630
|
};
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1631
|
+
colorStyles.stroke = sColor ? getStyleFromHsl(sColor, zStrokeOpacity) : colorStyles.fill;
|
|
1632
|
+
this.draw((ctx => {
|
|
1633
|
+
const zSizeFactor = (1 - particle.zIndexFactor) ** zIndexOptions.sizeRate, container = this.container;
|
|
1634
|
+
for (const updater of container.particles.updaters) {
|
|
1635
|
+
if (updater.beforeDraw) {
|
|
1636
|
+
updater.beforeDraw(particle);
|
|
1637
|
+
}
|
|
1638
|
+
if (updater.getColorStyles) {
|
|
1639
|
+
const {fill: fill, stroke: stroke} = updater.getColorStyles(particle, ctx, radius, zOpacity);
|
|
1640
|
+
if (fill) {
|
|
1641
|
+
colorStyles.fill = fill;
|
|
1642
|
+
}
|
|
1643
|
+
if (stroke) {
|
|
1644
|
+
colorStyles.stroke = stroke;
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
drawParticle(container, ctx, particle, delta, colorStyles, options.backgroundMask.enable, options.backgroundMask.composite, radius * zSizeFactor, zOpacity, particle.options.shadow);
|
|
1649
|
+
for (const updater of container.particles.updaters) {
|
|
1650
|
+
if (updater.afterDraw) {
|
|
1651
|
+
updater.afterDraw(particle);
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
}));
|
|
1655
|
+
}
|
|
1656
|
+
drawPlugin(plugin, delta) {
|
|
1657
|
+
this.draw((ctx => {
|
|
1658
|
+
drawPlugin(ctx, plugin, delta);
|
|
1659
|
+
}));
|
|
1660
|
+
}
|
|
1661
|
+
drawParticlePlugin(plugin, particle, delta) {
|
|
1662
|
+
this.draw((ctx => {
|
|
1663
|
+
drawParticlePlugin(ctx, plugin, particle, delta);
|
|
1664
|
+
}));
|
|
1665
|
+
}
|
|
1666
|
+
initBackground() {
|
|
1667
|
+
const options = this.container.actualOptions, background = options.background, element = this.element, elementStyle = element === null || element === void 0 ? void 0 : element.style;
|
|
1668
|
+
if (!elementStyle) {
|
|
1669
|
+
return;
|
|
1505
1670
|
}
|
|
1506
|
-
|
|
1671
|
+
if (background.color) {
|
|
1672
|
+
const color = colorToRgb(background.color);
|
|
1673
|
+
elementStyle.backgroundColor = color ? getStyleFromRgb(color, background.opacity) : "";
|
|
1674
|
+
} else {
|
|
1675
|
+
elementStyle.backgroundColor = "";
|
|
1676
|
+
}
|
|
1677
|
+
elementStyle.backgroundImage = background.image || "";
|
|
1678
|
+
elementStyle.backgroundPosition = background.position || "";
|
|
1679
|
+
elementStyle.backgroundRepeat = background.repeat || "";
|
|
1680
|
+
elementStyle.backgroundSize = background.size || "";
|
|
1681
|
+
}
|
|
1682
|
+
draw(cb) {
|
|
1683
|
+
if (!this.context) {
|
|
1684
|
+
return;
|
|
1685
|
+
}
|
|
1686
|
+
return cb(this.context);
|
|
1687
|
+
}
|
|
1688
|
+
initCover() {
|
|
1689
|
+
const options = this.container.actualOptions, cover = options.backgroundMask.cover, color = cover.color, coverRgb = colorToRgb(color);
|
|
1690
|
+
if (coverRgb) {
|
|
1691
|
+
const coverColor = {
|
|
1692
|
+
r: coverRgb.r,
|
|
1693
|
+
g: coverRgb.g,
|
|
1694
|
+
b: coverRgb.b,
|
|
1695
|
+
a: cover.opacity
|
|
1696
|
+
};
|
|
1697
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
initTrail() {
|
|
1701
|
+
const options = this.container.actualOptions, trail = options.particles.move.trail, fillColor = colorToRgb(trail.fillColor);
|
|
1702
|
+
if (fillColor) {
|
|
1703
|
+
const trail = options.particles.move.trail;
|
|
1704
|
+
this.trailFillColor = {
|
|
1705
|
+
r: fillColor.r,
|
|
1706
|
+
g: fillColor.g,
|
|
1707
|
+
b: fillColor.b,
|
|
1708
|
+
a: 1 / trail.length
|
|
1709
|
+
};
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
getPluginParticleColors(particle) {
|
|
1713
|
+
let fColor, sColor;
|
|
1714
|
+
for (const [, plugin] of this.container.plugins) {
|
|
1715
|
+
if (!fColor && plugin.particleFillColor) {
|
|
1716
|
+
fColor = colorToHsl(plugin.particleFillColor(particle));
|
|
1717
|
+
}
|
|
1718
|
+
if (!sColor && plugin.particleStrokeColor) {
|
|
1719
|
+
sColor = colorToHsl(plugin.particleStrokeColor(particle));
|
|
1720
|
+
}
|
|
1721
|
+
if (fColor && sColor) {
|
|
1722
|
+
break;
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
return [ fColor, sColor ];
|
|
1726
|
+
}
|
|
1727
|
+
initStyle() {
|
|
1728
|
+
const element = this.element, options = this.container.actualOptions;
|
|
1729
|
+
if (!element) {
|
|
1730
|
+
return;
|
|
1731
|
+
}
|
|
1732
|
+
const originalStyle = this.originalStyle;
|
|
1733
|
+
if (options.fullScreen.enable) {
|
|
1734
|
+
this.originalStyle = deepExtend({}, element.style);
|
|
1735
|
+
element.style.setProperty("position", "fixed", "important");
|
|
1736
|
+
element.style.setProperty("z-index", options.fullScreen.zIndex.toString(10), "important");
|
|
1737
|
+
element.style.setProperty("top", "0", "important");
|
|
1738
|
+
element.style.setProperty("left", "0", "important");
|
|
1739
|
+
element.style.setProperty("width", "100%", "important");
|
|
1740
|
+
element.style.setProperty("height", "100%", "important");
|
|
1741
|
+
} else if (originalStyle) {
|
|
1742
|
+
element.style.position = originalStyle.position;
|
|
1743
|
+
element.style.zIndex = originalStyle.zIndex;
|
|
1744
|
+
element.style.top = originalStyle.top;
|
|
1745
|
+
element.style.left = originalStyle.left;
|
|
1746
|
+
element.style.width = originalStyle.width;
|
|
1747
|
+
element.style.height = originalStyle.height;
|
|
1748
|
+
}
|
|
1749
|
+
for (const key in options.style) {
|
|
1750
|
+
if (!key || !options.style) {
|
|
1751
|
+
continue;
|
|
1752
|
+
}
|
|
1753
|
+
const value = options.style[key];
|
|
1754
|
+
if (!value) {
|
|
1755
|
+
continue;
|
|
1756
|
+
}
|
|
1757
|
+
element.style.setProperty(key, value, "important");
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
paintBase(baseColor) {
|
|
1761
|
+
this.draw((ctx => {
|
|
1762
|
+
paintBase(ctx, this.size, baseColor);
|
|
1763
|
+
}));
|
|
1764
|
+
}
|
|
1765
|
+
lineStyle(p1, p2) {
|
|
1766
|
+
return this.draw((ctx => {
|
|
1767
|
+
const options = this.container.actualOptions, connectOptions = options.interactivity.modes.connect;
|
|
1768
|
+
return gradient(ctx, p1, p2, connectOptions.links.opacity);
|
|
1769
|
+
}));
|
|
1507
1770
|
}
|
|
1508
1771
|
}
|
|
1509
|
-
class Constants {}
|
|
1510
|
-
Constants.generatedAttribute = "generated";
|
|
1511
|
-
Constants.randomColorValue = "random";
|
|
1512
|
-
Constants.midColorValue = "mid";
|
|
1513
|
-
Constants.touchEndEvent = "touchend";
|
|
1514
|
-
Constants.mouseDownEvent = "mousedown";
|
|
1515
|
-
Constants.mouseUpEvent = "mouseup";
|
|
1516
|
-
Constants.mouseMoveEvent = "mousemove";
|
|
1517
|
-
Constants.touchStartEvent = "touchstart";
|
|
1518
|
-
Constants.touchMoveEvent = "touchmove";
|
|
1519
|
-
Constants.mouseLeaveEvent = "mouseleave";
|
|
1520
|
-
Constants.mouseOutEvent = "mouseout";
|
|
1521
|
-
Constants.touchCancelEvent = "touchcancel";
|
|
1522
|
-
Constants.resizeEvent = "resize";
|
|
1523
|
-
Constants.visibilityChangeEvent = "visibilitychange";
|
|
1524
|
-
Constants.noPolygonDataLoaded = "No polygon data loaded.";
|
|
1525
|
-
Constants.noPolygonFound = "No polygon found, you need to specify SVG url in config.";
|
|
1526
1772
|
function manageListener(element, event, handler, add, options) {
|
|
1527
1773
|
if (add) {
|
|
1528
1774
|
let addOptions = {
|
|
@@ -1565,9 +1811,7 @@
|
|
|
1565
1811
|
}
|
|
1566
1812
|
manageListeners(add) {
|
|
1567
1813
|
var _a;
|
|
1568
|
-
const container = this.container;
|
|
1569
|
-
const options = container.actualOptions;
|
|
1570
|
-
const detectType = options.interactivity.detectsOn;
|
|
1814
|
+
const container = this.container, options = container.actualOptions, detectType = options.interactivity.detectsOn;
|
|
1571
1815
|
let mouseLeaveEvent = Constants.mouseLeaveEvent;
|
|
1572
1816
|
if (detectType === "window") {
|
|
1573
1817
|
container.interactivity.element = window;
|
|
@@ -1649,8 +1893,7 @@
|
|
|
1649
1893
|
}), 500);
|
|
1650
1894
|
}
|
|
1651
1895
|
handleVisibilityChange() {
|
|
1652
|
-
const container = this.container;
|
|
1653
|
-
const options = container.actualOptions;
|
|
1896
|
+
const container = this.container, options = container.actualOptions;
|
|
1654
1897
|
this.mouseTouchFinish();
|
|
1655
1898
|
if (!options.pauseOnBlur) {
|
|
1656
1899
|
return;
|
|
@@ -1677,9 +1920,8 @@
|
|
|
1677
1920
|
}
|
|
1678
1921
|
mouseTouchMove(e) {
|
|
1679
1922
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
1680
|
-
const container = this.container;
|
|
1681
|
-
|
|
1682
|
-
if (((_a = container.interactivity) === null || _a === void 0 ? void 0 : _a.element) === undefined) {
|
|
1923
|
+
const container = this.container, options = container.actualOptions;
|
|
1924
|
+
if (!((_a = container.interactivity) === null || _a === void 0 ? void 0 : _a.element)) {
|
|
1683
1925
|
return;
|
|
1684
1926
|
}
|
|
1685
1927
|
container.interactivity.mouse.inside = true;
|
|
@@ -1705,1074 +1947,146 @@
|
|
|
1705
1947
|
const targetRect = target.getBoundingClientRect();
|
|
1706
1948
|
const canvasRect = canvasEl.getBoundingClientRect();
|
|
1707
1949
|
pos = {
|
|
1708
|
-
x: mouseEvent.offsetX + 2 * sourceRect.left - (targetRect.left + canvasRect.left),
|
|
1709
|
-
y: mouseEvent.offsetY + 2 * sourceRect.top - (targetRect.top + canvasRect.top)
|
|
1710
|
-
};
|
|
1711
|
-
} else {
|
|
1712
|
-
pos = {
|
|
1713
|
-
x: (_b = mouseEvent.offsetX) !== null && _b !== void 0 ? _b : mouseEvent.clientX,
|
|
1714
|
-
y: (_c = mouseEvent.offsetY) !== null && _c !== void 0 ? _c : mouseEvent.clientY
|
|
1715
|
-
};
|
|
1716
|
-
}
|
|
1717
|
-
} else {
|
|
1718
|
-
if (mouseEvent.target === container.canvas.element) {
|
|
1719
|
-
pos = {
|
|
1720
|
-
x: (_d = mouseEvent.offsetX) !== null && _d !== void 0 ? _d : mouseEvent.clientX,
|
|
1721
|
-
y: (_e = mouseEvent.offsetY) !== null && _e !== void 0 ? _e : mouseEvent.clientY
|
|
1722
|
-
};
|
|
1723
|
-
}
|
|
1724
|
-
}
|
|
1725
|
-
} else {
|
|
1726
|
-
this.canPush = e.type !== "touchmove";
|
|
1727
|
-
const touchEvent = e;
|
|
1728
|
-
const lastTouch = touchEvent.touches[touchEvent.touches.length - 1];
|
|
1729
|
-
const canvasRect = canvas === null || canvas === void 0 ? void 0 : canvas.getBoundingClientRect();
|
|
1730
|
-
pos = {
|
|
1731
|
-
x: lastTouch.clientX - ((_f = canvasRect === null || canvasRect === void 0 ? void 0 : canvasRect.left) !== null && _f !== void 0 ? _f : 0),
|
|
1732
|
-
y: lastTouch.clientY - ((_g = canvasRect === null || canvasRect === void 0 ? void 0 : canvasRect.top) !== null && _g !== void 0 ? _g : 0)
|
|
1733
|
-
};
|
|
1734
|
-
}
|
|
1735
|
-
const pxRatio = container.retina.pixelRatio;
|
|
1736
|
-
if (pos) {
|
|
1737
|
-
pos.x *= pxRatio;
|
|
1738
|
-
pos.y *= pxRatio;
|
|
1739
|
-
}
|
|
1740
|
-
container.interactivity.mouse.position = pos;
|
|
1741
|
-
container.interactivity.status = Constants.mouseMoveEvent;
|
|
1742
|
-
}
|
|
1743
|
-
mouseTouchFinish() {
|
|
1744
|
-
const interactivity = this.container.interactivity;
|
|
1745
|
-
if (interactivity === undefined) {
|
|
1746
|
-
return;
|
|
1747
|
-
}
|
|
1748
|
-
const mouse = interactivity.mouse;
|
|
1749
|
-
delete mouse.position;
|
|
1750
|
-
delete mouse.clickPosition;
|
|
1751
|
-
delete mouse.downPosition;
|
|
1752
|
-
interactivity.status = Constants.mouseLeaveEvent;
|
|
1753
|
-
mouse.inside = false;
|
|
1754
|
-
mouse.clicking = false;
|
|
1755
|
-
}
|
|
1756
|
-
mouseTouchClick(e) {
|
|
1757
|
-
const container = this.container;
|
|
1758
|
-
const options = container.actualOptions;
|
|
1759
|
-
const mouse = container.interactivity.mouse;
|
|
1760
|
-
mouse.inside = true;
|
|
1761
|
-
let handled = false;
|
|
1762
|
-
const mousePosition = mouse.position;
|
|
1763
|
-
if (mousePosition === undefined || !options.interactivity.events.onClick.enable) {
|
|
1764
|
-
return;
|
|
1765
|
-
}
|
|
1766
|
-
for (const [, plugin] of container.plugins) {
|
|
1767
|
-
if (plugin.clickPositionValid !== undefined) {
|
|
1768
|
-
handled = plugin.clickPositionValid(mousePosition);
|
|
1769
|
-
if (handled) {
|
|
1770
|
-
break;
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
if (!handled) {
|
|
1775
|
-
this.doMouseTouchClick(e);
|
|
1776
|
-
}
|
|
1777
|
-
mouse.clicking = false;
|
|
1778
|
-
}
|
|
1779
|
-
doMouseTouchClick(e) {
|
|
1780
|
-
const container = this.container;
|
|
1781
|
-
const options = container.actualOptions;
|
|
1782
|
-
if (this.canPush) {
|
|
1783
|
-
const mousePos = container.interactivity.mouse.position;
|
|
1784
|
-
if (mousePos) {
|
|
1785
|
-
container.interactivity.mouse.clickPosition = {
|
|
1786
|
-
x: mousePos.x,
|
|
1787
|
-
y: mousePos.y
|
|
1788
|
-
};
|
|
1789
|
-
} else {
|
|
1790
|
-
return;
|
|
1791
|
-
}
|
|
1792
|
-
container.interactivity.mouse.clickTime = (new Date).getTime();
|
|
1793
|
-
const onClick = options.interactivity.events.onClick;
|
|
1794
|
-
if (onClick.mode instanceof Array) {
|
|
1795
|
-
for (const mode of onClick.mode) {
|
|
1796
|
-
this.handleClickMode(mode);
|
|
1797
|
-
}
|
|
1798
|
-
} else {
|
|
1799
|
-
this.handleClickMode(onClick.mode);
|
|
1800
|
-
}
|
|
1801
|
-
}
|
|
1802
|
-
if (e.type === "touchend") {
|
|
1803
|
-
setTimeout((() => this.mouseTouchFinish()), 500);
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
|
-
handleThemeChange(e) {
|
|
1807
|
-
const mediaEvent = e;
|
|
1808
|
-
const themeName = mediaEvent.matches ? this.container.options.defaultDarkTheme : this.container.options.defaultLightTheme;
|
|
1809
|
-
const theme = this.container.options.themes.find((theme => theme.name === themeName));
|
|
1810
|
-
if (theme && theme.default.auto) {
|
|
1811
|
-
this.container.loadTheme(themeName);
|
|
1812
|
-
}
|
|
1813
|
-
}
|
|
1814
|
-
handleClickMode(mode) {
|
|
1815
|
-
const container = this.container;
|
|
1816
|
-
const options = container.actualOptions;
|
|
1817
|
-
const pushNb = options.interactivity.modes.push.quantity;
|
|
1818
|
-
const removeNb = options.interactivity.modes.remove.quantity;
|
|
1819
|
-
switch (mode) {
|
|
1820
|
-
case "push":
|
|
1821
|
-
{
|
|
1822
|
-
if (pushNb > 0) {
|
|
1823
|
-
const pushOptions = options.interactivity.modes.push;
|
|
1824
|
-
const group = itemFromArray([ undefined, ...pushOptions.groups ]);
|
|
1825
|
-
const groupOptions = group !== undefined ? container.actualOptions.particles.groups[group] : undefined;
|
|
1826
|
-
container.particles.push(pushNb, container.interactivity.mouse, groupOptions, group);
|
|
1827
|
-
}
|
|
1828
|
-
break;
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
case "remove":
|
|
1832
|
-
container.particles.removeQuantity(removeNb);
|
|
1833
|
-
break;
|
|
1834
|
-
|
|
1835
|
-
case "bubble":
|
|
1836
|
-
container.bubble.clicking = true;
|
|
1837
|
-
break;
|
|
1838
|
-
|
|
1839
|
-
case "repulse":
|
|
1840
|
-
container.repulse.clicking = true;
|
|
1841
|
-
container.repulse.count = 0;
|
|
1842
|
-
for (const particle of container.repulse.particles) {
|
|
1843
|
-
particle.velocity.setTo(particle.initialVelocity);
|
|
1844
|
-
}
|
|
1845
|
-
container.repulse.particles = [];
|
|
1846
|
-
container.repulse.finish = false;
|
|
1847
|
-
setTimeout((() => {
|
|
1848
|
-
if (!container.destroyed) {
|
|
1849
|
-
container.repulse.clicking = false;
|
|
1850
|
-
}
|
|
1851
|
-
}), options.interactivity.modes.repulse.duration * 1e3);
|
|
1852
|
-
break;
|
|
1853
|
-
|
|
1854
|
-
case "attract":
|
|
1855
|
-
container.attract.clicking = true;
|
|
1856
|
-
container.attract.count = 0;
|
|
1857
|
-
for (const particle of container.attract.particles) {
|
|
1858
|
-
particle.velocity.setTo(particle.initialVelocity);
|
|
1859
|
-
}
|
|
1860
|
-
container.attract.particles = [];
|
|
1861
|
-
container.attract.finish = false;
|
|
1862
|
-
setTimeout((() => {
|
|
1863
|
-
if (!container.destroyed) {
|
|
1864
|
-
container.attract.clicking = false;
|
|
1865
|
-
}
|
|
1866
|
-
}), options.interactivity.modes.attract.duration * 1e3);
|
|
1867
|
-
break;
|
|
1868
|
-
|
|
1869
|
-
case "pause":
|
|
1870
|
-
if (container.getAnimationStatus()) {
|
|
1871
|
-
container.pause();
|
|
1872
|
-
} else {
|
|
1873
|
-
container.play();
|
|
1874
|
-
}
|
|
1875
|
-
break;
|
|
1876
|
-
}
|
|
1877
|
-
for (const [, plugin] of container.plugins) {
|
|
1878
|
-
if (plugin.handleClickMode) {
|
|
1879
|
-
plugin.handleClickMode(mode);
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
class ExternalInteractorBase {
|
|
1885
|
-
constructor(container) {
|
|
1886
|
-
this.container = container;
|
|
1887
|
-
this.type = 0;
|
|
1888
|
-
}
|
|
1889
|
-
}
|
|
1890
|
-
class FrameManager {
|
|
1891
|
-
constructor(container) {
|
|
1892
|
-
this.container = container;
|
|
1893
|
-
}
|
|
1894
|
-
async nextFrame(timestamp) {
|
|
1895
|
-
var _a;
|
|
1896
|
-
try {
|
|
1897
|
-
const container = this.container;
|
|
1898
|
-
if (container.lastFrameTime !== undefined && timestamp < container.lastFrameTime + 1e3 / container.fpsLimit) {
|
|
1899
|
-
container.draw(false);
|
|
1900
|
-
return;
|
|
1901
|
-
}
|
|
1902
|
-
(_a = container.lastFrameTime) !== null && _a !== void 0 ? _a : container.lastFrameTime = timestamp;
|
|
1903
|
-
const deltaValue = timestamp - container.lastFrameTime;
|
|
1904
|
-
const delta = {
|
|
1905
|
-
value: deltaValue,
|
|
1906
|
-
factor: 60 * deltaValue / 1e3
|
|
1907
|
-
};
|
|
1908
|
-
container.lifeTime += delta.value;
|
|
1909
|
-
container.lastFrameTime = timestamp;
|
|
1910
|
-
if (deltaValue > 1e3) {
|
|
1911
|
-
container.draw(false);
|
|
1912
|
-
return;
|
|
1913
|
-
}
|
|
1914
|
-
await container.particles.draw(delta);
|
|
1915
|
-
if (container.duration > 0 && container.lifeTime > container.duration) {
|
|
1916
|
-
container.destroy();
|
|
1917
|
-
return;
|
|
1918
|
-
}
|
|
1919
|
-
if (container.getAnimationStatus()) {
|
|
1920
|
-
container.draw(false);
|
|
1921
|
-
}
|
|
1922
|
-
} catch (e) {
|
|
1923
|
-
console.error("tsParticles error in animation loop", e);
|
|
1924
|
-
}
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
var __classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
1928
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
1929
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
1930
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
1931
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
1932
|
-
value;
|
|
1933
|
-
};
|
|
1934
|
-
var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
1935
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
1936
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1937
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
1938
|
-
};
|
|
1939
|
-
var _InteractionManager_engine;
|
|
1940
|
-
class InteractionManager {
|
|
1941
|
-
constructor(engine, container) {
|
|
1942
|
-
this.container = container;
|
|
1943
|
-
_InteractionManager_engine.set(this, void 0);
|
|
1944
|
-
__classPrivateFieldSet(this, _InteractionManager_engine, engine, "f");
|
|
1945
|
-
this.externalInteractors = [];
|
|
1946
|
-
this.particleInteractors = [];
|
|
1947
|
-
this.init();
|
|
1948
|
-
}
|
|
1949
|
-
init() {
|
|
1950
|
-
const interactors = __classPrivateFieldGet(this, _InteractionManager_engine, "f").plugins.getInteractors(this.container, true);
|
|
1951
|
-
this.externalInteractors = [];
|
|
1952
|
-
this.particleInteractors = [];
|
|
1953
|
-
for (const interactor of interactors) {
|
|
1954
|
-
switch (interactor.type) {
|
|
1955
|
-
case 0:
|
|
1956
|
-
this.externalInteractors.push(interactor);
|
|
1957
|
-
break;
|
|
1958
|
-
|
|
1959
|
-
case 1:
|
|
1960
|
-
this.particleInteractors.push(interactor);
|
|
1961
|
-
break;
|
|
1962
|
-
}
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1965
|
-
async externalInteract(delta) {
|
|
1966
|
-
for (const interactor of this.externalInteractors) {
|
|
1967
|
-
if (interactor.isEnabled()) {
|
|
1968
|
-
await interactor.interact(delta);
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
1971
|
-
}
|
|
1972
|
-
async particlesInteract(particle, delta) {
|
|
1973
|
-
for (const interactor of this.externalInteractors) {
|
|
1974
|
-
interactor.reset(particle);
|
|
1975
|
-
}
|
|
1976
|
-
for (const interactor of this.particleInteractors) {
|
|
1977
|
-
if (interactor.isEnabled(particle)) {
|
|
1978
|
-
await interactor.interact(particle, delta);
|
|
1979
|
-
}
|
|
1980
|
-
}
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
_InteractionManager_engine = new WeakMap;
|
|
1984
|
-
class ParticlesInteractorBase {
|
|
1985
|
-
constructor(container) {
|
|
1986
|
-
this.container = container;
|
|
1987
|
-
this.type = 1;
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
1990
|
-
function applyDistance(particle) {
|
|
1991
|
-
const initialPosition = particle.initialPosition;
|
|
1992
|
-
const {dx: dx, dy: dy} = getDistances(initialPosition, particle.position);
|
|
1993
|
-
const dxFixed = Math.abs(dx), dyFixed = Math.abs(dy);
|
|
1994
|
-
const hDistance = particle.retina.maxDistance.horizontal;
|
|
1995
|
-
const vDistance = particle.retina.maxDistance.vertical;
|
|
1996
|
-
if (!hDistance && !vDistance) {
|
|
1997
|
-
return;
|
|
1998
|
-
}
|
|
1999
|
-
if ((hDistance && dxFixed >= hDistance || vDistance && dyFixed >= vDistance) && !particle.misplaced) {
|
|
2000
|
-
particle.misplaced = !!hDistance && dxFixed > hDistance || !!vDistance && dyFixed > vDistance;
|
|
2001
|
-
if (hDistance) {
|
|
2002
|
-
particle.velocity.x = particle.velocity.y / 2 - particle.velocity.x;
|
|
2003
|
-
}
|
|
2004
|
-
if (vDistance) {
|
|
2005
|
-
particle.velocity.y = particle.velocity.x / 2 - particle.velocity.y;
|
|
2006
|
-
}
|
|
2007
|
-
} else if ((!hDistance || dxFixed < hDistance) && (!vDistance || dyFixed < vDistance) && particle.misplaced) {
|
|
2008
|
-
particle.misplaced = false;
|
|
2009
|
-
} else if (particle.misplaced) {
|
|
2010
|
-
const pos = particle.position, vel = particle.velocity;
|
|
2011
|
-
if (hDistance && (pos.x < initialPosition.x && vel.x < 0 || pos.x > initialPosition.x && vel.x > 0)) {
|
|
2012
|
-
vel.x *= -Math.random();
|
|
2013
|
-
}
|
|
2014
|
-
if (vDistance && (pos.y < initialPosition.y && vel.y < 0 || pos.y > initialPosition.y && vel.y > 0)) {
|
|
2015
|
-
vel.y *= -Math.random();
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
}
|
|
2019
|
-
class ParticlesMover {
|
|
2020
|
-
constructor(container) {
|
|
2021
|
-
this.container = container;
|
|
2022
|
-
}
|
|
2023
|
-
move(particle, delta) {
|
|
2024
|
-
if (particle.destroyed) {
|
|
2025
|
-
return;
|
|
2026
|
-
}
|
|
2027
|
-
this.moveParticle(particle, delta);
|
|
2028
|
-
this.moveParallax(particle);
|
|
2029
|
-
}
|
|
2030
|
-
moveParticle(particle, delta) {
|
|
2031
|
-
var _a, _b, _c;
|
|
2032
|
-
var _d, _e;
|
|
2033
|
-
const particleOptions = particle.options;
|
|
2034
|
-
const moveOptions = particleOptions.move;
|
|
2035
|
-
if (!moveOptions.enable) {
|
|
2036
|
-
return;
|
|
2037
|
-
}
|
|
2038
|
-
const container = this.container, slowFactor = this.getProximitySpeedFactor(particle), baseSpeed = ((_a = (_d = particle.retina).moveSpeed) !== null && _a !== void 0 ? _a : _d.moveSpeed = getRangeValue(moveOptions.speed) * container.retina.pixelRatio) * container.retina.reduceFactor, moveDrift = (_b = (_e = particle.retina).moveDrift) !== null && _b !== void 0 ? _b : _e.moveDrift = getRangeValue(particle.options.move.drift) * container.retina.pixelRatio, maxSize = getRangeMax(particleOptions.size.value) * container.retina.pixelRatio, sizeFactor = moveOptions.size ? particle.getRadius() / maxSize : 1, diffFactor = 2, speedFactor = sizeFactor * slowFactor * (delta.factor || 1) / diffFactor, moveSpeed = baseSpeed * speedFactor;
|
|
2039
|
-
this.applyPath(particle, delta);
|
|
2040
|
-
const gravityOptions = particle.gravity;
|
|
2041
|
-
const gravityFactor = gravityOptions.enable && gravityOptions.inverse ? -1 : 1;
|
|
2042
|
-
if (gravityOptions.enable && moveSpeed) {
|
|
2043
|
-
particle.velocity.y += gravityFactor * (gravityOptions.acceleration * delta.factor) / (60 * moveSpeed);
|
|
2044
|
-
}
|
|
2045
|
-
if (moveDrift && moveSpeed) {
|
|
2046
|
-
particle.velocity.x += moveDrift * delta.factor / (60 * moveSpeed);
|
|
2047
|
-
}
|
|
2048
|
-
const decay = particle.moveDecay;
|
|
2049
|
-
if (decay != 1) {
|
|
2050
|
-
particle.velocity.multTo(decay);
|
|
2051
|
-
}
|
|
2052
|
-
const velocity = particle.velocity.mult(moveSpeed);
|
|
2053
|
-
const maxSpeed = (_c = particle.retina.maxSpeed) !== null && _c !== void 0 ? _c : container.retina.maxSpeed;
|
|
2054
|
-
if (gravityOptions.enable && maxSpeed > 0 && (!gravityOptions.inverse && velocity.y >= 0 && velocity.y >= maxSpeed || gravityOptions.inverse && velocity.y <= 0 && velocity.y <= -maxSpeed)) {
|
|
2055
|
-
velocity.y = gravityFactor * maxSpeed;
|
|
2056
|
-
if (moveSpeed) {
|
|
2057
|
-
particle.velocity.y = velocity.y / moveSpeed;
|
|
2058
|
-
}
|
|
2059
|
-
}
|
|
2060
|
-
const zIndexOptions = particle.options.zIndex, zVelocityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.velocityRate;
|
|
2061
|
-
if (moveOptions.spin.enable) {
|
|
2062
|
-
this.spin(particle, moveSpeed);
|
|
2063
|
-
} else {
|
|
2064
|
-
if (zVelocityFactor != 1) {
|
|
2065
|
-
velocity.multTo(zVelocityFactor);
|
|
2066
|
-
}
|
|
2067
|
-
particle.position.addTo(velocity);
|
|
2068
|
-
if (moveOptions.vibrate) {
|
|
2069
|
-
particle.position.x += Math.sin(particle.position.x * Math.cos(particle.position.y));
|
|
2070
|
-
particle.position.y += Math.cos(particle.position.y * Math.sin(particle.position.x));
|
|
2071
|
-
}
|
|
2072
|
-
}
|
|
2073
|
-
applyDistance(particle);
|
|
2074
|
-
}
|
|
2075
|
-
spin(particle, moveSpeed) {
|
|
2076
|
-
const container = this.container;
|
|
2077
|
-
if (!particle.spin) {
|
|
2078
|
-
return;
|
|
2079
|
-
}
|
|
2080
|
-
const updateFunc = {
|
|
2081
|
-
x: particle.spin.direction === "clockwise" ? Math.cos : Math.sin,
|
|
2082
|
-
y: particle.spin.direction === "clockwise" ? Math.sin : Math.cos
|
|
2083
|
-
};
|
|
2084
|
-
particle.position.x = particle.spin.center.x + particle.spin.radius * updateFunc.x(particle.spin.angle);
|
|
2085
|
-
particle.position.y = particle.spin.center.y + particle.spin.radius * updateFunc.y(particle.spin.angle);
|
|
2086
|
-
particle.spin.radius += particle.spin.acceleration;
|
|
2087
|
-
const maxCanvasSize = Math.max(container.canvas.size.width, container.canvas.size.height);
|
|
2088
|
-
if (particle.spin.radius > maxCanvasSize / 2) {
|
|
2089
|
-
particle.spin.radius = maxCanvasSize / 2;
|
|
2090
|
-
particle.spin.acceleration *= -1;
|
|
2091
|
-
} else if (particle.spin.radius < 0) {
|
|
2092
|
-
particle.spin.radius = 0;
|
|
2093
|
-
particle.spin.acceleration *= -1;
|
|
2094
|
-
}
|
|
2095
|
-
particle.spin.angle += moveSpeed / 100 * (1 - particle.spin.radius / maxCanvasSize);
|
|
2096
|
-
}
|
|
2097
|
-
applyPath(particle, delta) {
|
|
2098
|
-
const particlesOptions = particle.options;
|
|
2099
|
-
const pathOptions = particlesOptions.move.path;
|
|
2100
|
-
const pathEnabled = pathOptions.enable;
|
|
2101
|
-
if (!pathEnabled) {
|
|
2102
|
-
return;
|
|
2103
|
-
}
|
|
2104
|
-
const container = this.container;
|
|
2105
|
-
if (particle.lastPathTime <= particle.pathDelay) {
|
|
2106
|
-
particle.lastPathTime += delta.value;
|
|
2107
|
-
return;
|
|
2108
|
-
}
|
|
2109
|
-
const path = container.pathGenerator.generate(particle);
|
|
2110
|
-
particle.velocity.addTo(path);
|
|
2111
|
-
if (pathOptions.clamp) {
|
|
2112
|
-
particle.velocity.x = clamp(particle.velocity.x, -1, 1);
|
|
2113
|
-
particle.velocity.y = clamp(particle.velocity.y, -1, 1);
|
|
2114
|
-
}
|
|
2115
|
-
particle.lastPathTime -= particle.pathDelay;
|
|
2116
|
-
}
|
|
2117
|
-
moveParallax(particle) {
|
|
2118
|
-
const container = this.container;
|
|
2119
|
-
const options = container.actualOptions;
|
|
2120
|
-
if (isSsr() || !options.interactivity.events.onHover.parallax.enable) {
|
|
2121
|
-
return;
|
|
2122
|
-
}
|
|
2123
|
-
const parallaxForce = options.interactivity.events.onHover.parallax.force;
|
|
2124
|
-
const mousePos = container.interactivity.mouse.position;
|
|
2125
|
-
if (!mousePos) {
|
|
2126
|
-
return;
|
|
2127
|
-
}
|
|
2128
|
-
const canvasCenter = {
|
|
2129
|
-
x: container.canvas.size.width / 2,
|
|
2130
|
-
y: container.canvas.size.height / 2
|
|
2131
|
-
};
|
|
2132
|
-
const parallaxSmooth = options.interactivity.events.onHover.parallax.smooth;
|
|
2133
|
-
const factor = particle.getRadius() / parallaxForce;
|
|
2134
|
-
const tmp = {
|
|
2135
|
-
x: (mousePos.x - canvasCenter.x) * factor,
|
|
2136
|
-
y: (mousePos.y - canvasCenter.y) * factor
|
|
2137
|
-
};
|
|
2138
|
-
particle.offset.x += (tmp.x - particle.offset.x) / parallaxSmooth;
|
|
2139
|
-
particle.offset.y += (tmp.y - particle.offset.y) / parallaxSmooth;
|
|
2140
|
-
}
|
|
2141
|
-
getProximitySpeedFactor(particle) {
|
|
2142
|
-
const container = this.container;
|
|
2143
|
-
const options = container.actualOptions;
|
|
2144
|
-
const active = isInArray("slow", options.interactivity.events.onHover.mode);
|
|
2145
|
-
if (!active) {
|
|
2146
|
-
return 1;
|
|
2147
|
-
}
|
|
2148
|
-
const mousePos = this.container.interactivity.mouse.position;
|
|
2149
|
-
if (!mousePos) {
|
|
2150
|
-
return 1;
|
|
2151
|
-
}
|
|
2152
|
-
const particlePos = particle.getPosition();
|
|
2153
|
-
const dist = getDistance(mousePos, particlePos);
|
|
2154
|
-
const radius = container.retina.slowModeRadius;
|
|
2155
|
-
if (dist > radius) {
|
|
2156
|
-
return 1;
|
|
2157
|
-
}
|
|
2158
|
-
const proximityFactor = dist / radius || 0;
|
|
2159
|
-
const slowFactor = options.interactivity.modes.slow.factor;
|
|
2160
|
-
return proximityFactor / slowFactor;
|
|
2161
|
-
}
|
|
2162
|
-
}
|
|
2163
|
-
var Plugins_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
2164
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
2165
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
2166
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
2167
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
2168
|
-
value;
|
|
2169
|
-
};
|
|
2170
|
-
var _Plugins_engine;
|
|
2171
|
-
class Plugins {
|
|
2172
|
-
constructor(engine) {
|
|
2173
|
-
_Plugins_engine.set(this, void 0);
|
|
2174
|
-
Plugins_classPrivateFieldSet(this, _Plugins_engine, engine, "f");
|
|
2175
|
-
this.plugins = [];
|
|
2176
|
-
this.interactorsInitializers = new Map;
|
|
2177
|
-
this.updatersInitializers = new Map;
|
|
2178
|
-
this.interactors = new Map;
|
|
2179
|
-
this.updaters = new Map;
|
|
2180
|
-
this.presets = new Map;
|
|
2181
|
-
this.drawers = new Map;
|
|
2182
|
-
this.pathGenerators = new Map;
|
|
2183
|
-
}
|
|
2184
|
-
getPlugin(plugin) {
|
|
2185
|
-
return this.plugins.find((t => t.id === plugin));
|
|
2186
|
-
}
|
|
2187
|
-
addPlugin(plugin) {
|
|
2188
|
-
if (!this.getPlugin(plugin.id)) {
|
|
2189
|
-
this.plugins.push(plugin);
|
|
2190
|
-
}
|
|
2191
|
-
}
|
|
2192
|
-
getAvailablePlugins(container) {
|
|
2193
|
-
const res = new Map;
|
|
2194
|
-
for (const plugin of this.plugins) {
|
|
2195
|
-
if (!plugin.needsPlugin(container.actualOptions)) {
|
|
2196
|
-
continue;
|
|
2197
|
-
}
|
|
2198
|
-
res.set(plugin.id, plugin.getPlugin(container));
|
|
2199
|
-
}
|
|
2200
|
-
return res;
|
|
2201
|
-
}
|
|
2202
|
-
loadOptions(options, sourceOptions) {
|
|
2203
|
-
for (const plugin of this.plugins) {
|
|
2204
|
-
plugin.loadOptions(options, sourceOptions);
|
|
2205
|
-
}
|
|
2206
|
-
}
|
|
2207
|
-
getPreset(preset) {
|
|
2208
|
-
return this.presets.get(preset);
|
|
2209
|
-
}
|
|
2210
|
-
addPreset(presetKey, options, override = false) {
|
|
2211
|
-
if (override || !this.getPreset(presetKey)) {
|
|
2212
|
-
this.presets.set(presetKey, options);
|
|
2213
|
-
}
|
|
2214
|
-
}
|
|
2215
|
-
addShapeDrawer(type, drawer) {
|
|
2216
|
-
if (!this.getShapeDrawer(type)) {
|
|
2217
|
-
this.drawers.set(type, drawer);
|
|
2218
|
-
}
|
|
2219
|
-
}
|
|
2220
|
-
getShapeDrawer(type) {
|
|
2221
|
-
return this.drawers.get(type);
|
|
2222
|
-
}
|
|
2223
|
-
getSupportedShapes() {
|
|
2224
|
-
return this.drawers.keys();
|
|
2225
|
-
}
|
|
2226
|
-
getPathGenerator(type) {
|
|
2227
|
-
return this.pathGenerators.get(type);
|
|
2228
|
-
}
|
|
2229
|
-
addPathGenerator(type, pathGenerator) {
|
|
2230
|
-
if (!this.getPathGenerator(type)) {
|
|
2231
|
-
this.pathGenerators.set(type, pathGenerator);
|
|
2232
|
-
}
|
|
2233
|
-
}
|
|
2234
|
-
getInteractors(container, force = false) {
|
|
2235
|
-
let res = this.interactors.get(container);
|
|
2236
|
-
if (!res || force) {
|
|
2237
|
-
res = [ ...this.interactorsInitializers.values() ].map((t => t(container)));
|
|
2238
|
-
this.interactors.set(container, res);
|
|
2239
|
-
}
|
|
2240
|
-
return res;
|
|
2241
|
-
}
|
|
2242
|
-
addInteractor(name, initInteractor) {
|
|
2243
|
-
this.interactorsInitializers.set(name, initInteractor);
|
|
2244
|
-
}
|
|
2245
|
-
getUpdaters(container, force = false) {
|
|
2246
|
-
let res = this.updaters.get(container);
|
|
2247
|
-
if (!res || force) {
|
|
2248
|
-
res = [ ...this.updatersInitializers.values() ].map((t => t(container)));
|
|
2249
|
-
this.updaters.set(container, res);
|
|
2250
|
-
}
|
|
2251
|
-
return res;
|
|
2252
|
-
}
|
|
2253
|
-
addParticleUpdater(name, initUpdater) {
|
|
2254
|
-
this.updatersInitializers.set(name, initUpdater);
|
|
2255
|
-
}
|
|
2256
|
-
}
|
|
2257
|
-
_Plugins_engine = new WeakMap;
|
|
2258
|
-
class Point {
|
|
2259
|
-
constructor(position, particle) {
|
|
2260
|
-
this.position = position;
|
|
2261
|
-
this.particle = particle;
|
|
2262
|
-
}
|
|
2263
|
-
}
|
|
2264
|
-
class QuadTree {
|
|
2265
|
-
constructor(rectangle, capacity) {
|
|
2266
|
-
this.rectangle = rectangle;
|
|
2267
|
-
this.capacity = capacity;
|
|
2268
|
-
this.points = [];
|
|
2269
|
-
this.divided = false;
|
|
2270
|
-
}
|
|
2271
|
-
subdivide() {
|
|
2272
|
-
const x = this.rectangle.position.x;
|
|
2273
|
-
const y = this.rectangle.position.y;
|
|
2274
|
-
const w = this.rectangle.size.width;
|
|
2275
|
-
const h = this.rectangle.size.height;
|
|
2276
|
-
const capacity = this.capacity;
|
|
2277
|
-
this.northEast = new QuadTree(new Rectangle(x, y, w / 2, h / 2), capacity);
|
|
2278
|
-
this.northWest = new QuadTree(new Rectangle(x + w / 2, y, w / 2, h / 2), capacity);
|
|
2279
|
-
this.southEast = new QuadTree(new Rectangle(x, y + h / 2, w / 2, h / 2), capacity);
|
|
2280
|
-
this.southWest = new QuadTree(new Rectangle(x + w / 2, y + h / 2, w / 2, h / 2), capacity);
|
|
2281
|
-
this.divided = true;
|
|
2282
|
-
}
|
|
2283
|
-
insert(point) {
|
|
2284
|
-
var _a, _b, _c, _d, _e;
|
|
2285
|
-
if (!this.rectangle.contains(point.position)) {
|
|
2286
|
-
return false;
|
|
2287
|
-
}
|
|
2288
|
-
if (this.points.length < this.capacity) {
|
|
2289
|
-
this.points.push(point);
|
|
2290
|
-
return true;
|
|
2291
|
-
}
|
|
2292
|
-
if (!this.divided) {
|
|
2293
|
-
this.subdivide();
|
|
2294
|
-
}
|
|
2295
|
-
return (_e = ((_a = this.northEast) === null || _a === void 0 ? void 0 : _a.insert(point)) || ((_b = this.northWest) === null || _b === void 0 ? void 0 : _b.insert(point)) || ((_c = this.southEast) === null || _c === void 0 ? void 0 : _c.insert(point)) || ((_d = this.southWest) === null || _d === void 0 ? void 0 : _d.insert(point))) !== null && _e !== void 0 ? _e : false;
|
|
2296
|
-
}
|
|
2297
|
-
queryCircle(position, radius) {
|
|
2298
|
-
return this.query(new Circle(position.x, position.y, radius));
|
|
2299
|
-
}
|
|
2300
|
-
queryCircleWarp(position, radius, containerOrSize) {
|
|
2301
|
-
const container = containerOrSize;
|
|
2302
|
-
const size = containerOrSize;
|
|
2303
|
-
return this.query(new CircleWarp(position.x, position.y, radius, container.canvas !== undefined ? container.canvas.size : size));
|
|
2304
|
-
}
|
|
2305
|
-
queryRectangle(position, size) {
|
|
2306
|
-
return this.query(new Rectangle(position.x, position.y, size.width, size.height));
|
|
2307
|
-
}
|
|
2308
|
-
query(range, found) {
|
|
2309
|
-
var _a, _b, _c, _d;
|
|
2310
|
-
const res = found !== null && found !== void 0 ? found : [];
|
|
2311
|
-
if (!range.intersects(this.rectangle)) {
|
|
2312
|
-
return [];
|
|
2313
|
-
} else {
|
|
2314
|
-
for (const p of this.points) {
|
|
2315
|
-
if (!range.contains(p.position) && getDistance(range.position, p.position) > p.particle.getRadius()) {
|
|
2316
|
-
continue;
|
|
2317
|
-
}
|
|
2318
|
-
res.push(p.particle);
|
|
2319
|
-
}
|
|
2320
|
-
if (this.divided) {
|
|
2321
|
-
(_a = this.northEast) === null || _a === void 0 ? void 0 : _a.query(range, res);
|
|
2322
|
-
(_b = this.northWest) === null || _b === void 0 ? void 0 : _b.query(range, res);
|
|
2323
|
-
(_c = this.southEast) === null || _c === void 0 ? void 0 : _c.query(range, res);
|
|
2324
|
-
(_d = this.southWest) === null || _d === void 0 ? void 0 : _d.query(range, res);
|
|
2325
|
-
}
|
|
2326
|
-
}
|
|
2327
|
-
return res;
|
|
2328
|
-
}
|
|
2329
|
-
}
|
|
2330
|
-
class Vector {
|
|
2331
|
-
constructor(x, y) {
|
|
2332
|
-
let defX, defY;
|
|
2333
|
-
if (y === undefined) {
|
|
2334
|
-
if (typeof x === "number") {
|
|
2335
|
-
throw new Error("tsParticles - Vector not initialized correctly");
|
|
2336
|
-
}
|
|
2337
|
-
const coords = x;
|
|
2338
|
-
[defX, defY] = [ coords.x, coords.y ];
|
|
2339
|
-
} else {
|
|
2340
|
-
[defX, defY] = [ x, y ];
|
|
2341
|
-
}
|
|
2342
|
-
this.x = defX;
|
|
2343
|
-
this.y = defY;
|
|
2344
|
-
}
|
|
2345
|
-
static clone(source) {
|
|
2346
|
-
return Vector.create(source.x, source.y);
|
|
2347
|
-
}
|
|
2348
|
-
static create(x, y) {
|
|
2349
|
-
return new Vector(x, y);
|
|
2350
|
-
}
|
|
2351
|
-
static get origin() {
|
|
2352
|
-
return Vector.create(0, 0);
|
|
2353
|
-
}
|
|
2354
|
-
get angle() {
|
|
2355
|
-
return Math.atan2(this.y, this.x);
|
|
2356
|
-
}
|
|
2357
|
-
set angle(angle) {
|
|
2358
|
-
this.updateFromAngle(angle, this.length);
|
|
2359
|
-
}
|
|
2360
|
-
get length() {
|
|
2361
|
-
return Math.sqrt(this.x ** 2 + this.y ** 2);
|
|
2362
|
-
}
|
|
2363
|
-
set length(length) {
|
|
2364
|
-
this.updateFromAngle(this.angle, length);
|
|
2365
|
-
}
|
|
2366
|
-
add(v) {
|
|
2367
|
-
return Vector.create(this.x + v.x, this.y + v.y);
|
|
2368
|
-
}
|
|
2369
|
-
addTo(v) {
|
|
2370
|
-
this.x += v.x;
|
|
2371
|
-
this.y += v.y;
|
|
2372
|
-
}
|
|
2373
|
-
sub(v) {
|
|
2374
|
-
return Vector.create(this.x - v.x, this.y - v.y);
|
|
2375
|
-
}
|
|
2376
|
-
subFrom(v) {
|
|
2377
|
-
this.x -= v.x;
|
|
2378
|
-
this.y -= v.y;
|
|
2379
|
-
}
|
|
2380
|
-
mult(n) {
|
|
2381
|
-
return Vector.create(this.x * n, this.y * n);
|
|
2382
|
-
}
|
|
2383
|
-
multTo(n) {
|
|
2384
|
-
this.x *= n;
|
|
2385
|
-
this.y *= n;
|
|
2386
|
-
}
|
|
2387
|
-
div(n) {
|
|
2388
|
-
return Vector.create(this.x / n, this.y / n);
|
|
2389
|
-
}
|
|
2390
|
-
divTo(n) {
|
|
2391
|
-
this.x /= n;
|
|
2392
|
-
this.y /= n;
|
|
2393
|
-
}
|
|
2394
|
-
distanceTo(v) {
|
|
2395
|
-
return this.sub(v).length;
|
|
2396
|
-
}
|
|
2397
|
-
getLengthSq() {
|
|
2398
|
-
return this.x ** 2 + this.y ** 2;
|
|
2399
|
-
}
|
|
2400
|
-
distanceToSq(v) {
|
|
2401
|
-
return this.sub(v).getLengthSq();
|
|
2402
|
-
}
|
|
2403
|
-
manhattanDistanceTo(v) {
|
|
2404
|
-
return Math.abs(v.x - this.x) + Math.abs(v.y - this.y);
|
|
2405
|
-
}
|
|
2406
|
-
copy() {
|
|
2407
|
-
return Vector.clone(this);
|
|
2408
|
-
}
|
|
2409
|
-
setTo(velocity) {
|
|
2410
|
-
this.x = velocity.x;
|
|
2411
|
-
this.y = velocity.y;
|
|
2412
|
-
}
|
|
2413
|
-
rotate(angle) {
|
|
2414
|
-
return Vector.create(this.x * Math.cos(angle) - this.y * Math.sin(angle), this.x * Math.sin(angle) + this.y * Math.cos(angle));
|
|
2415
|
-
}
|
|
2416
|
-
updateFromAngle(angle, length) {
|
|
2417
|
-
this.x = Math.cos(angle) * length;
|
|
2418
|
-
this.y = Math.sin(angle) * length;
|
|
2419
|
-
}
|
|
2420
|
-
}
|
|
2421
|
-
class Vector3d extends Vector {
|
|
2422
|
-
constructor(x, y, z) {
|
|
2423
|
-
super(x, y);
|
|
2424
|
-
this.z = z === undefined ? x.z : z;
|
|
2425
|
-
}
|
|
2426
|
-
static clone(source) {
|
|
2427
|
-
return Vector3d.create(source.x, source.y, source.z);
|
|
2428
|
-
}
|
|
2429
|
-
static create(x, y, z) {
|
|
2430
|
-
return new Vector3d(x, y, z);
|
|
2431
|
-
}
|
|
2432
|
-
add(v) {
|
|
2433
|
-
return v instanceof Vector3d ? Vector3d.create(this.x + v.x, this.y + v.y, this.z + v.z) : super.add(v);
|
|
2434
|
-
}
|
|
2435
|
-
addTo(v) {
|
|
2436
|
-
super.addTo(v);
|
|
2437
|
-
if (v instanceof Vector3d) {
|
|
2438
|
-
this.z += v.z;
|
|
2439
|
-
}
|
|
2440
|
-
}
|
|
2441
|
-
sub(v) {
|
|
2442
|
-
return v instanceof Vector3d ? Vector3d.create(this.x - v.x, this.y - v.y, this.z - v.z) : super.sub(v);
|
|
2443
|
-
}
|
|
2444
|
-
subFrom(v) {
|
|
2445
|
-
super.subFrom(v);
|
|
2446
|
-
if (v instanceof Vector3d) {
|
|
2447
|
-
this.z -= v.z;
|
|
2448
|
-
}
|
|
2449
|
-
}
|
|
2450
|
-
mult(n) {
|
|
2451
|
-
return Vector3d.create(this.x * n, this.y * n, this.z * n);
|
|
2452
|
-
}
|
|
2453
|
-
multTo(n) {
|
|
2454
|
-
super.multTo(n);
|
|
2455
|
-
this.z *= n;
|
|
2456
|
-
}
|
|
2457
|
-
div(n) {
|
|
2458
|
-
return Vector3d.create(this.x / n, this.y / n, this.z / n);
|
|
2459
|
-
}
|
|
2460
|
-
divTo(n) {
|
|
2461
|
-
super.divTo(n);
|
|
2462
|
-
this.z /= n;
|
|
2463
|
-
}
|
|
2464
|
-
copy() {
|
|
2465
|
-
return Vector3d.clone(this);
|
|
2466
|
-
}
|
|
2467
|
-
setTo(v) {
|
|
2468
|
-
super.setTo(v);
|
|
2469
|
-
if (v instanceof Vector3d) {
|
|
2470
|
-
this.z = v.z;
|
|
2471
|
-
}
|
|
2472
|
-
}
|
|
2473
|
-
}
|
|
2474
|
-
class Canvas {
|
|
2475
|
-
constructor(container) {
|
|
2476
|
-
this.container = container;
|
|
2477
|
-
this.size = {
|
|
2478
|
-
height: 0,
|
|
2479
|
-
width: 0
|
|
2480
|
-
};
|
|
2481
|
-
this.context = null;
|
|
2482
|
-
this.generatedCanvas = false;
|
|
2483
|
-
}
|
|
2484
|
-
init() {
|
|
2485
|
-
this.resize();
|
|
2486
|
-
this.initStyle();
|
|
2487
|
-
this.initCover();
|
|
2488
|
-
this.initTrail();
|
|
2489
|
-
this.initBackground();
|
|
2490
|
-
this.paint();
|
|
2491
|
-
}
|
|
2492
|
-
loadCanvas(canvas) {
|
|
2493
|
-
var _a;
|
|
2494
|
-
if (this.generatedCanvas) {
|
|
2495
|
-
(_a = this.element) === null || _a === void 0 ? void 0 : _a.remove();
|
|
2496
|
-
}
|
|
2497
|
-
this.generatedCanvas = canvas.dataset && Constants.generatedAttribute in canvas.dataset ? canvas.dataset[Constants.generatedAttribute] === "true" : this.generatedCanvas;
|
|
2498
|
-
this.element = canvas;
|
|
2499
|
-
this.originalStyle = deepExtend({}, this.element.style);
|
|
2500
|
-
this.size.height = canvas.offsetHeight;
|
|
2501
|
-
this.size.width = canvas.offsetWidth;
|
|
2502
|
-
this.context = this.element.getContext("2d");
|
|
2503
|
-
this.container.retina.init();
|
|
2504
|
-
this.initBackground();
|
|
2505
|
-
}
|
|
2506
|
-
destroy() {
|
|
2507
|
-
var _a;
|
|
2508
|
-
if (this.generatedCanvas) {
|
|
2509
|
-
(_a = this.element) === null || _a === void 0 ? void 0 : _a.remove();
|
|
2510
|
-
}
|
|
2511
|
-
this.draw((ctx => {
|
|
2512
|
-
clear(ctx, this.size);
|
|
2513
|
-
}));
|
|
2514
|
-
}
|
|
2515
|
-
paint() {
|
|
2516
|
-
const options = this.container.actualOptions;
|
|
2517
|
-
this.draw((ctx => {
|
|
2518
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
2519
|
-
clear(ctx, this.size);
|
|
2520
|
-
this.paintBase(this.coverColorStyle);
|
|
2521
|
-
} else {
|
|
2522
|
-
this.paintBase();
|
|
2523
|
-
}
|
|
2524
|
-
}));
|
|
2525
|
-
}
|
|
2526
|
-
clear() {
|
|
2527
|
-
const options = this.container.actualOptions;
|
|
2528
|
-
const trail = options.particles.move.trail;
|
|
2529
|
-
if (options.backgroundMask.enable) {
|
|
2530
|
-
this.paint();
|
|
2531
|
-
} else if (trail.enable && trail.length > 0 && this.trailFillColor) {
|
|
2532
|
-
this.paintBase(getStyleFromRgb(this.trailFillColor, 1 / trail.length));
|
|
2533
|
-
} else {
|
|
2534
|
-
this.draw((ctx => {
|
|
2535
|
-
clear(ctx, this.size);
|
|
2536
|
-
}));
|
|
2537
|
-
}
|
|
2538
|
-
}
|
|
2539
|
-
async windowResize() {
|
|
2540
|
-
if (!this.element) {
|
|
2541
|
-
return;
|
|
2542
|
-
}
|
|
2543
|
-
const container = this.container;
|
|
2544
|
-
this.resize();
|
|
2545
|
-
const needsRefresh = container.updateActualOptions();
|
|
2546
|
-
container.particles.setDensity();
|
|
2547
|
-
for (const [, plugin] of container.plugins) {
|
|
2548
|
-
if (plugin.resize !== undefined) {
|
|
2549
|
-
plugin.resize();
|
|
1950
|
+
x: mouseEvent.offsetX + 2 * sourceRect.left - (targetRect.left + canvasRect.left),
|
|
1951
|
+
y: mouseEvent.offsetY + 2 * sourceRect.top - (targetRect.top + canvasRect.top)
|
|
1952
|
+
};
|
|
1953
|
+
} else {
|
|
1954
|
+
pos = {
|
|
1955
|
+
x: (_b = mouseEvent.offsetX) !== null && _b !== void 0 ? _b : mouseEvent.clientX,
|
|
1956
|
+
y: (_c = mouseEvent.offsetY) !== null && _c !== void 0 ? _c : mouseEvent.clientY
|
|
1957
|
+
};
|
|
1958
|
+
}
|
|
1959
|
+
} else {
|
|
1960
|
+
if (mouseEvent.target === container.canvas.element) {
|
|
1961
|
+
pos = {
|
|
1962
|
+
x: (_d = mouseEvent.offsetX) !== null && _d !== void 0 ? _d : mouseEvent.clientX,
|
|
1963
|
+
y: (_e = mouseEvent.offsetY) !== null && _e !== void 0 ? _e : mouseEvent.clientY
|
|
1964
|
+
};
|
|
1965
|
+
}
|
|
2550
1966
|
}
|
|
1967
|
+
} else {
|
|
1968
|
+
this.canPush = e.type !== "touchmove";
|
|
1969
|
+
const touchEvent = e;
|
|
1970
|
+
const lastTouch = touchEvent.touches[touchEvent.touches.length - 1];
|
|
1971
|
+
const canvasRect = canvas === null || canvas === void 0 ? void 0 : canvas.getBoundingClientRect();
|
|
1972
|
+
pos = {
|
|
1973
|
+
x: lastTouch.clientX - ((_f = canvasRect === null || canvasRect === void 0 ? void 0 : canvasRect.left) !== null && _f !== void 0 ? _f : 0),
|
|
1974
|
+
y: lastTouch.clientY - ((_g = canvasRect === null || canvasRect === void 0 ? void 0 : canvasRect.top) !== null && _g !== void 0 ? _g : 0)
|
|
1975
|
+
};
|
|
2551
1976
|
}
|
|
2552
|
-
if (needsRefresh) {
|
|
2553
|
-
await container.refresh();
|
|
2554
|
-
}
|
|
2555
|
-
}
|
|
2556
|
-
resize() {
|
|
2557
|
-
if (!this.element) {
|
|
2558
|
-
return;
|
|
2559
|
-
}
|
|
2560
|
-
const container = this.container;
|
|
2561
1977
|
const pxRatio = container.retina.pixelRatio;
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
2566
|
-
this.element.width = size.width;
|
|
2567
|
-
this.element.height = size.height;
|
|
2568
|
-
if (this.container.started) {
|
|
2569
|
-
this.resizeFactor = {
|
|
2570
|
-
width: size.width / oldSize.width,
|
|
2571
|
-
height: size.height / oldSize.height
|
|
2572
|
-
};
|
|
1978
|
+
if (pos) {
|
|
1979
|
+
pos.x *= pxRatio;
|
|
1980
|
+
pos.y *= pxRatio;
|
|
2573
1981
|
}
|
|
1982
|
+
container.interactivity.mouse.position = pos;
|
|
1983
|
+
container.interactivity.status = Constants.mouseMoveEvent;
|
|
2574
1984
|
}
|
|
2575
|
-
|
|
2576
|
-
this.
|
|
2577
|
-
|
|
2578
|
-
const lineStyle = this.lineStyle(p1, p2);
|
|
2579
|
-
if (!lineStyle) {
|
|
2580
|
-
return;
|
|
2581
|
-
}
|
|
2582
|
-
const pos1 = p1.getPosition();
|
|
2583
|
-
const pos2 = p2.getPosition();
|
|
2584
|
-
drawConnectLine(ctx, (_a = p1.retina.linksWidth) !== null && _a !== void 0 ? _a : this.container.retina.linksWidth, lineStyle, pos1, pos2);
|
|
2585
|
-
}));
|
|
2586
|
-
}
|
|
2587
|
-
drawGrabLine(particle, lineColor, opacity, mousePos) {
|
|
2588
|
-
const container = this.container;
|
|
2589
|
-
this.draw((ctx => {
|
|
2590
|
-
var _a;
|
|
2591
|
-
const beginPos = particle.getPosition();
|
|
2592
|
-
drawGrabLine(ctx, (_a = particle.retina.linksWidth) !== null && _a !== void 0 ? _a : container.retina.linksWidth, beginPos, mousePos, lineColor, opacity);
|
|
2593
|
-
}));
|
|
2594
|
-
}
|
|
2595
|
-
drawParticle(particle, delta) {
|
|
2596
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2597
|
-
if (particle.spawning || particle.destroyed) {
|
|
1985
|
+
mouseTouchFinish() {
|
|
1986
|
+
const interactivity = this.container.interactivity;
|
|
1987
|
+
if (!interactivity) {
|
|
2598
1988
|
return;
|
|
2599
1989
|
}
|
|
2600
|
-
const
|
|
2601
|
-
|
|
2602
|
-
|
|
1990
|
+
const mouse = interactivity.mouse;
|
|
1991
|
+
delete mouse.position;
|
|
1992
|
+
delete mouse.clickPosition;
|
|
1993
|
+
delete mouse.downPosition;
|
|
1994
|
+
interactivity.status = Constants.mouseLeaveEvent;
|
|
1995
|
+
mouse.inside = false;
|
|
1996
|
+
mouse.clicking = false;
|
|
1997
|
+
}
|
|
1998
|
+
mouseTouchClick(e) {
|
|
1999
|
+
const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse;
|
|
2000
|
+
mouse.inside = true;
|
|
2001
|
+
let handled = false;
|
|
2002
|
+
const mousePosition = mouse.position;
|
|
2003
|
+
if (!mousePosition || !options.interactivity.events.onClick.enable) {
|
|
2603
2004
|
return;
|
|
2604
2005
|
}
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
const twinkling = twinkle.enable && Math.random() < twinkle.frequency;
|
|
2609
|
-
if (!fColor || !sColor) {
|
|
2610
|
-
const twinkleRgb = colorToHsl(twinkle.color);
|
|
2611
|
-
if (!fColor) {
|
|
2612
|
-
fColor = twinkling && twinkleRgb !== undefined ? twinkleRgb : pfColor ? pfColor : undefined;
|
|
2006
|
+
for (const [, plugin] of container.plugins) {
|
|
2007
|
+
if (!plugin.clickPositionValid) {
|
|
2008
|
+
continue;
|
|
2613
2009
|
}
|
|
2614
|
-
|
|
2615
|
-
|
|
2010
|
+
handled = plugin.clickPositionValid(mousePosition);
|
|
2011
|
+
if (handled) {
|
|
2012
|
+
break;
|
|
2616
2013
|
}
|
|
2617
2014
|
}
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
const zOpacityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.opacityRate;
|
|
2621
|
-
const radius = particle.getRadius();
|
|
2622
|
-
const opacity = twinkling ? getRangeValue(twinkle.opacity) : (_d = (_b = particle.bubble.opacity) !== null && _b !== void 0 ? _b : (_c = particle.opacity) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : 1;
|
|
2623
|
-
const strokeOpacity = (_f = (_e = particle.stroke) === null || _e === void 0 ? void 0 : _e.opacity) !== null && _f !== void 0 ? _f : opacity;
|
|
2624
|
-
const zOpacity = opacity * zOpacityFactor;
|
|
2625
|
-
const fillColorValue = fColor ? getStyleFromHsl(fColor, zOpacity) : undefined;
|
|
2626
|
-
if (!fillColorValue && !sColor) {
|
|
2627
|
-
return;
|
|
2015
|
+
if (!handled) {
|
|
2016
|
+
this.doMouseTouchClick(e);
|
|
2628
2017
|
}
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2018
|
+
mouse.clicking = false;
|
|
2019
|
+
}
|
|
2020
|
+
doMouseTouchClick(e) {
|
|
2021
|
+
const container = this.container, options = container.actualOptions;
|
|
2022
|
+
if (this.canPush) {
|
|
2023
|
+
const mousePos = container.interactivity.mouse.position;
|
|
2024
|
+
if (!mousePos) {
|
|
2634
2025
|
return;
|
|
2635
2026
|
}
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
updater.afterDraw(particle);
|
|
2027
|
+
container.interactivity.mouse.clickPosition = {
|
|
2028
|
+
x: mousePos.x,
|
|
2029
|
+
y: mousePos.y
|
|
2030
|
+
};
|
|
2031
|
+
container.interactivity.mouse.clickTime = (new Date).getTime();
|
|
2032
|
+
const onClick = options.interactivity.events.onClick;
|
|
2033
|
+
if (onClick.mode instanceof Array) {
|
|
2034
|
+
for (const mode of onClick.mode) {
|
|
2035
|
+
this.handleClickMode(mode);
|
|
2646
2036
|
}
|
|
2037
|
+
} else {
|
|
2038
|
+
this.handleClickMode(onClick.mode);
|
|
2647
2039
|
}
|
|
2648
|
-
}));
|
|
2649
|
-
}
|
|
2650
|
-
drawPlugin(plugin, delta) {
|
|
2651
|
-
this.draw((ctx => {
|
|
2652
|
-
drawPlugin(ctx, plugin, delta);
|
|
2653
|
-
}));
|
|
2654
|
-
}
|
|
2655
|
-
drawParticlePlugin(plugin, particle, delta) {
|
|
2656
|
-
this.draw((ctx => {
|
|
2657
|
-
drawParticlePlugin(ctx, plugin, particle, delta);
|
|
2658
|
-
}));
|
|
2659
|
-
}
|
|
2660
|
-
initBackground() {
|
|
2661
|
-
const options = this.container.actualOptions;
|
|
2662
|
-
const background = options.background;
|
|
2663
|
-
const element = this.element;
|
|
2664
|
-
const elementStyle = element === null || element === void 0 ? void 0 : element.style;
|
|
2665
|
-
if (!elementStyle) {
|
|
2666
|
-
return;
|
|
2667
2040
|
}
|
|
2668
|
-
if (
|
|
2669
|
-
|
|
2670
|
-
elementStyle.backgroundColor = color ? getStyleFromRgb(color, background.opacity) : "";
|
|
2671
|
-
} else {
|
|
2672
|
-
elementStyle.backgroundColor = "";
|
|
2041
|
+
if (e.type === "touchend") {
|
|
2042
|
+
setTimeout((() => this.mouseTouchFinish()), 500);
|
|
2673
2043
|
}
|
|
2674
|
-
elementStyle.backgroundImage = background.image || "";
|
|
2675
|
-
elementStyle.backgroundPosition = background.position || "";
|
|
2676
|
-
elementStyle.backgroundRepeat = background.repeat || "";
|
|
2677
|
-
elementStyle.backgroundSize = background.size || "";
|
|
2678
2044
|
}
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2045
|
+
handleThemeChange(e) {
|
|
2046
|
+
const mediaEvent = e, themeName = mediaEvent.matches ? this.container.options.defaultDarkTheme : this.container.options.defaultLightTheme, theme = this.container.options.themes.find((theme => theme.name === themeName));
|
|
2047
|
+
if (theme && theme.default.auto) {
|
|
2048
|
+
this.container.loadTheme(themeName);
|
|
2682
2049
|
}
|
|
2683
|
-
return cb(this.context);
|
|
2684
2050
|
}
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
const cover = options.backgroundMask.cover;
|
|
2688
|
-
const color = cover.color;
|
|
2689
|
-
const coverRgb = colorToRgb(color);
|
|
2690
|
-
if (coverRgb) {
|
|
2691
|
-
const coverColor = {
|
|
2692
|
-
r: coverRgb.r,
|
|
2693
|
-
g: coverRgb.g,
|
|
2694
|
-
b: coverRgb.b,
|
|
2695
|
-
a: cover.opacity
|
|
2696
|
-
};
|
|
2697
|
-
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
2698
|
-
console.log(this.coverColorStyle);
|
|
2699
|
-
}
|
|
2051
|
+
handleClickMode(mode) {
|
|
2052
|
+
this.container.handleClickMode(mode);
|
|
2700
2053
|
}
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
if (fillColor) {
|
|
2706
|
-
const trail = options.particles.move.trail;
|
|
2707
|
-
this.trailFillColor = {
|
|
2708
|
-
r: fillColor.r,
|
|
2709
|
-
g: fillColor.g,
|
|
2710
|
-
b: fillColor.b,
|
|
2711
|
-
a: 1 / trail.length
|
|
2712
|
-
};
|
|
2713
|
-
}
|
|
2054
|
+
}
|
|
2055
|
+
class FrameManager {
|
|
2056
|
+
constructor(container) {
|
|
2057
|
+
this.container = container;
|
|
2714
2058
|
}
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
if (
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
if (!sColor && plugin.particleStrokeColor) {
|
|
2723
|
-
sColor = colorToHsl(plugin.particleStrokeColor(particle));
|
|
2059
|
+
async nextFrame(timestamp) {
|
|
2060
|
+
var _a;
|
|
2061
|
+
try {
|
|
2062
|
+
const container = this.container;
|
|
2063
|
+
if (container.lastFrameTime !== undefined && timestamp < container.lastFrameTime + 1e3 / container.fpsLimit) {
|
|
2064
|
+
container.draw(false);
|
|
2065
|
+
return;
|
|
2724
2066
|
}
|
|
2725
|
-
|
|
2726
|
-
|
|
2067
|
+
(_a = container.lastFrameTime) !== null && _a !== void 0 ? _a : container.lastFrameTime = timestamp;
|
|
2068
|
+
const deltaValue = timestamp - container.lastFrameTime, delta = {
|
|
2069
|
+
value: deltaValue,
|
|
2070
|
+
factor: 60 * deltaValue / 1e3
|
|
2071
|
+
};
|
|
2072
|
+
container.lifeTime += delta.value;
|
|
2073
|
+
container.lastFrameTime = timestamp;
|
|
2074
|
+
if (deltaValue > 1e3) {
|
|
2075
|
+
container.draw(false);
|
|
2076
|
+
return;
|
|
2727
2077
|
}
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
const element = this.element, options = this.container.actualOptions;
|
|
2733
|
-
if (!element) {
|
|
2734
|
-
return;
|
|
2735
|
-
}
|
|
2736
|
-
const originalStyle = this.originalStyle;
|
|
2737
|
-
if (options.fullScreen.enable) {
|
|
2738
|
-
this.originalStyle = deepExtend({}, element.style);
|
|
2739
|
-
element.style.setProperty("position", "fixed", "important");
|
|
2740
|
-
element.style.setProperty("z-index", options.fullScreen.zIndex.toString(10), "important");
|
|
2741
|
-
element.style.setProperty("top", "0", "important");
|
|
2742
|
-
element.style.setProperty("left", "0", "important");
|
|
2743
|
-
element.style.setProperty("width", "100%", "important");
|
|
2744
|
-
element.style.setProperty("height", "100%", "important");
|
|
2745
|
-
} else if (originalStyle) {
|
|
2746
|
-
element.style.position = originalStyle.position;
|
|
2747
|
-
element.style.zIndex = originalStyle.zIndex;
|
|
2748
|
-
element.style.top = originalStyle.top;
|
|
2749
|
-
element.style.left = originalStyle.left;
|
|
2750
|
-
element.style.width = originalStyle.width;
|
|
2751
|
-
element.style.height = originalStyle.height;
|
|
2752
|
-
}
|
|
2753
|
-
for (const key in options.style) {
|
|
2754
|
-
if (!key || !options.style) {
|
|
2755
|
-
continue;
|
|
2078
|
+
await container.particles.draw(delta);
|
|
2079
|
+
if (container.duration > 0 && container.lifeTime > container.duration) {
|
|
2080
|
+
container.destroy();
|
|
2081
|
+
return;
|
|
2756
2082
|
}
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
continue;
|
|
2083
|
+
if (container.getAnimationStatus()) {
|
|
2084
|
+
container.draw(false);
|
|
2760
2085
|
}
|
|
2761
|
-
|
|
2086
|
+
} catch (e) {
|
|
2087
|
+
console.error("tsParticles error in animation loop", e);
|
|
2762
2088
|
}
|
|
2763
2089
|
}
|
|
2764
|
-
paintBase(baseColor) {
|
|
2765
|
-
this.draw((ctx => {
|
|
2766
|
-
paintBase(ctx, this.size, baseColor);
|
|
2767
|
-
}));
|
|
2768
|
-
}
|
|
2769
|
-
lineStyle(p1, p2) {
|
|
2770
|
-
return this.draw((ctx => {
|
|
2771
|
-
const options = this.container.actualOptions;
|
|
2772
|
-
const connectOptions = options.interactivity.modes.connect;
|
|
2773
|
-
return gradient(ctx, p1, p2, connectOptions.links.opacity);
|
|
2774
|
-
}));
|
|
2775
|
-
}
|
|
2776
2090
|
}
|
|
2777
2091
|
class OptionsColor {
|
|
2778
2092
|
constructor() {
|
|
@@ -5235,14 +4549,14 @@
|
|
|
5235
4549
|
}
|
|
5236
4550
|
}
|
|
5237
4551
|
}
|
|
5238
|
-
var
|
|
4552
|
+
var __classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
5239
4553
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
5240
4554
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5241
4555
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5242
4556
|
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
5243
4557
|
value;
|
|
5244
4558
|
};
|
|
5245
|
-
var
|
|
4559
|
+
var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
5246
4560
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
5247
4561
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5248
4562
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -5252,7 +4566,7 @@
|
|
|
5252
4566
|
constructor(engine) {
|
|
5253
4567
|
_Options_instances.add(this);
|
|
5254
4568
|
_Options_engine.set(this, void 0);
|
|
5255
|
-
|
|
4569
|
+
__classPrivateFieldSet(this, _Options_engine, engine, "f");
|
|
5256
4570
|
this.autoPlay = true;
|
|
5257
4571
|
this.background = new Background;
|
|
5258
4572
|
this.backgroundMask = new BackgroundMask;
|
|
@@ -5345,7 +4659,7 @@
|
|
|
5345
4659
|
this.motion.load(data.motion);
|
|
5346
4660
|
this.particles.load(data.particles);
|
|
5347
4661
|
this.style = deepExtend(this.style, data.style);
|
|
5348
|
-
|
|
4662
|
+
__classPrivateFieldGet(this, _Options_engine, "f").plugins.loadOptions(this, data);
|
|
5349
4663
|
if (data.responsive !== undefined) {
|
|
5350
4664
|
for (const responsive of data.responsive) {
|
|
5351
4665
|
const optResponsive = new Responsive;
|
|
@@ -5361,8 +4675,8 @@
|
|
|
5361
4675
|
this.themes.push(optTheme);
|
|
5362
4676
|
}
|
|
5363
4677
|
}
|
|
5364
|
-
this.defaultDarkTheme = (_d =
|
|
5365
|
-
this.defaultLightTheme = (_e =
|
|
4678
|
+
this.defaultDarkTheme = (_d = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "dark")) === null || _d === void 0 ? void 0 : _d.name;
|
|
4679
|
+
this.defaultLightTheme = (_e = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "light")) === null || _e === void 0 ? void 0 : _e.name;
|
|
5366
4680
|
}
|
|
5367
4681
|
setTheme(name) {
|
|
5368
4682
|
if (name) {
|
|
@@ -5371,7 +4685,7 @@
|
|
|
5371
4685
|
this.load(chosenTheme.options);
|
|
5372
4686
|
}
|
|
5373
4687
|
} else {
|
|
5374
|
-
const mediaMatch = typeof matchMedia !== "undefined" && matchMedia("(prefers-color-scheme: dark)"), clientDarkMode = mediaMatch && mediaMatch.matches, defaultTheme =
|
|
4688
|
+
const mediaMatch = typeof matchMedia !== "undefined" && matchMedia("(prefers-color-scheme: dark)"), clientDarkMode = mediaMatch && mediaMatch.matches, defaultTheme = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, clientDarkMode ? "dark" : "light");
|
|
5375
4689
|
if (defaultTheme) {
|
|
5376
4690
|
this.load(defaultTheme.options);
|
|
5377
4691
|
}
|
|
@@ -5384,13 +4698,140 @@
|
|
|
5384
4698
|
return responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.maxWidth;
|
|
5385
4699
|
}
|
|
5386
4700
|
importPreset(preset) {
|
|
5387
|
-
this.load(
|
|
4701
|
+
this.load(__classPrivateFieldGet(this, _Options_engine, "f").plugins.getPreset(preset));
|
|
5388
4702
|
}
|
|
5389
4703
|
}
|
|
5390
4704
|
_Options_engine = new WeakMap, _Options_instances = new WeakSet, _Options_findDefaultTheme = function _Options_findDefaultTheme(mode) {
|
|
5391
4705
|
var _a;
|
|
5392
4706
|
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"));
|
|
5393
4707
|
};
|
|
4708
|
+
var InteractionManager_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
4709
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4710
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4711
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
4712
|
+
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
4713
|
+
value;
|
|
4714
|
+
};
|
|
4715
|
+
var InteractionManager_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
4716
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4717
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4718
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
4719
|
+
};
|
|
4720
|
+
var _InteractionManager_engine;
|
|
4721
|
+
class InteractionManager {
|
|
4722
|
+
constructor(engine, container) {
|
|
4723
|
+
this.container = container;
|
|
4724
|
+
_InteractionManager_engine.set(this, void 0);
|
|
4725
|
+
InteractionManager_classPrivateFieldSet(this, _InteractionManager_engine, engine, "f");
|
|
4726
|
+
this.externalInteractors = [];
|
|
4727
|
+
this.particleInteractors = [];
|
|
4728
|
+
this.init();
|
|
4729
|
+
}
|
|
4730
|
+
init() {
|
|
4731
|
+
const interactors = InteractionManager_classPrivateFieldGet(this, _InteractionManager_engine, "f").plugins.getInteractors(this.container, true);
|
|
4732
|
+
this.externalInteractors = [];
|
|
4733
|
+
this.particleInteractors = [];
|
|
4734
|
+
for (const interactor of interactors) {
|
|
4735
|
+
switch (interactor.type) {
|
|
4736
|
+
case 0:
|
|
4737
|
+
this.externalInteractors.push(interactor);
|
|
4738
|
+
break;
|
|
4739
|
+
|
|
4740
|
+
case 1:
|
|
4741
|
+
this.particleInteractors.push(interactor);
|
|
4742
|
+
break;
|
|
4743
|
+
}
|
|
4744
|
+
}
|
|
4745
|
+
}
|
|
4746
|
+
async externalInteract(delta) {
|
|
4747
|
+
for (const interactor of this.externalInteractors) {
|
|
4748
|
+
if (interactor.isEnabled()) {
|
|
4749
|
+
await interactor.interact(delta);
|
|
4750
|
+
}
|
|
4751
|
+
}
|
|
4752
|
+
}
|
|
4753
|
+
async particlesInteract(particle, delta) {
|
|
4754
|
+
for (const interactor of this.externalInteractors) {
|
|
4755
|
+
interactor.reset(particle);
|
|
4756
|
+
}
|
|
4757
|
+
for (const interactor of this.particleInteractors) {
|
|
4758
|
+
if (interactor.isEnabled(particle)) {
|
|
4759
|
+
await interactor.interact(particle, delta);
|
|
4760
|
+
}
|
|
4761
|
+
}
|
|
4762
|
+
}
|
|
4763
|
+
handleClickMode(mode) {
|
|
4764
|
+
for (const interactor of this.externalInteractors) {
|
|
4765
|
+
if (interactor.handleClickMode) {
|
|
4766
|
+
interactor.handleClickMode(mode);
|
|
4767
|
+
}
|
|
4768
|
+
}
|
|
4769
|
+
}
|
|
4770
|
+
}
|
|
4771
|
+
_InteractionManager_engine = new WeakMap;
|
|
4772
|
+
class Vector3d extends Vector {
|
|
4773
|
+
constructor(xOrCoords, y, z) {
|
|
4774
|
+
super(xOrCoords, y);
|
|
4775
|
+
if (typeof xOrCoords !== "number" && xOrCoords) {
|
|
4776
|
+
this.z = xOrCoords.z;
|
|
4777
|
+
} else if (z !== undefined) {
|
|
4778
|
+
this.z = z;
|
|
4779
|
+
} else {
|
|
4780
|
+
throw new Error("tsParticles - Vector not initialized correctly");
|
|
4781
|
+
}
|
|
4782
|
+
}
|
|
4783
|
+
static clone(source) {
|
|
4784
|
+
return Vector3d.create(source.x, source.y, source.z);
|
|
4785
|
+
}
|
|
4786
|
+
static create(x, y, z) {
|
|
4787
|
+
return new Vector3d(x, y, z);
|
|
4788
|
+
}
|
|
4789
|
+
static get origin() {
|
|
4790
|
+
return Vector3d.create(0, 0, 0);
|
|
4791
|
+
}
|
|
4792
|
+
add(v) {
|
|
4793
|
+
return v instanceof Vector3d ? Vector3d.create(this.x + v.x, this.y + v.y, this.z + v.z) : super.add(v);
|
|
4794
|
+
}
|
|
4795
|
+
addTo(v) {
|
|
4796
|
+
super.addTo(v);
|
|
4797
|
+
if (v instanceof Vector3d) {
|
|
4798
|
+
this.z += v.z;
|
|
4799
|
+
}
|
|
4800
|
+
}
|
|
4801
|
+
sub(v) {
|
|
4802
|
+
return v instanceof Vector3d ? Vector3d.create(this.x - v.x, this.y - v.y, this.z - v.z) : super.sub(v);
|
|
4803
|
+
}
|
|
4804
|
+
subFrom(v) {
|
|
4805
|
+
super.subFrom(v);
|
|
4806
|
+
if (v instanceof Vector3d) {
|
|
4807
|
+
this.z -= v.z;
|
|
4808
|
+
}
|
|
4809
|
+
}
|
|
4810
|
+
mult(n) {
|
|
4811
|
+
return Vector3d.create(this.x * n, this.y * n, this.z * n);
|
|
4812
|
+
}
|
|
4813
|
+
multTo(n) {
|
|
4814
|
+
super.multTo(n);
|
|
4815
|
+
this.z *= n;
|
|
4816
|
+
}
|
|
4817
|
+
div(n) {
|
|
4818
|
+
return Vector3d.create(this.x / n, this.y / n, this.z / n);
|
|
4819
|
+
}
|
|
4820
|
+
divTo(n) {
|
|
4821
|
+
super.divTo(n);
|
|
4822
|
+
this.z /= n;
|
|
4823
|
+
}
|
|
4824
|
+
copy() {
|
|
4825
|
+
return Vector3d.clone(this);
|
|
4826
|
+
}
|
|
4827
|
+
setTo(v) {
|
|
4828
|
+
super.setTo(v);
|
|
4829
|
+
const v3d = v;
|
|
4830
|
+
if (v3d.z !== undefined) {
|
|
4831
|
+
this.z = v3d.z;
|
|
4832
|
+
}
|
|
4833
|
+
}
|
|
4834
|
+
}
|
|
5394
4835
|
var Particle_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
5395
4836
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
5396
4837
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -5405,17 +4846,18 @@
|
|
|
5405
4846
|
};
|
|
5406
4847
|
var _Particle_engine;
|
|
5407
4848
|
const fixOutMode = data => {
|
|
5408
|
-
if (isInArray(data.outMode, data.checkModes) || isInArray(data.outMode, data.checkModes)) {
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
4849
|
+
if (!(isInArray(data.outMode, data.checkModes) || isInArray(data.outMode, data.checkModes))) {
|
|
4850
|
+
return;
|
|
4851
|
+
}
|
|
4852
|
+
if (data.coord > data.maxCoord - data.radius * 2) {
|
|
4853
|
+
data.setCb(-data.radius);
|
|
4854
|
+
} else if (data.coord < data.radius * 2) {
|
|
4855
|
+
data.setCb(data.radius);
|
|
5414
4856
|
}
|
|
5415
4857
|
};
|
|
5416
4858
|
class Particle {
|
|
5417
4859
|
constructor(engine, id, container, position, overrideOptions, group) {
|
|
5418
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
4860
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
5419
4861
|
this.id = id;
|
|
5420
4862
|
this.container = container;
|
|
5421
4863
|
this.group = group;
|
|
@@ -5432,12 +4874,9 @@
|
|
|
5432
4874
|
maxDistance: {}
|
|
5433
4875
|
};
|
|
5434
4876
|
this.ignoresResizeRatio = true;
|
|
5435
|
-
const pxRatio = container.retina.pixelRatio;
|
|
5436
|
-
const mainOptions = container.actualOptions;
|
|
5437
|
-
const particlesOptions = new ParticlesOptions;
|
|
4877
|
+
const pxRatio = container.retina.pixelRatio, mainOptions = container.actualOptions, particlesOptions = new ParticlesOptions;
|
|
5438
4878
|
particlesOptions.load(mainOptions.particles);
|
|
5439
|
-
const shapeType = particlesOptions.shape.type;
|
|
5440
|
-
const reduceDuplicates = particlesOptions.reduceDuplicates;
|
|
4879
|
+
const shapeType = particlesOptions.shape.type, reduceDuplicates = particlesOptions.reduceDuplicates;
|
|
5441
4880
|
this.shape = shapeType instanceof Array ? itemFromArray(shapeType, this.id, reduceDuplicates) : shapeType;
|
|
5442
4881
|
if (overrideOptions === null || overrideOptions === void 0 ? void 0 : overrideOptions.shape) {
|
|
5443
4882
|
if (overrideOptions.shape.type) {
|
|
@@ -5535,25 +4974,6 @@
|
|
|
5535
4974
|
}
|
|
5536
4975
|
this.life = this.loadLife();
|
|
5537
4976
|
this.spawning = this.life.delay > 0;
|
|
5538
|
-
if (this.options.move.spin.enable) {
|
|
5539
|
-
const spinPos = (_h = this.options.move.spin.position) !== null && _h !== void 0 ? _h : {
|
|
5540
|
-
x: 50,
|
|
5541
|
-
y: 50
|
|
5542
|
-
};
|
|
5543
|
-
const spinCenter = {
|
|
5544
|
-
x: spinPos.x / 100 * container.canvas.size.width,
|
|
5545
|
-
y: spinPos.y / 100 * container.canvas.size.height
|
|
5546
|
-
};
|
|
5547
|
-
const pos = this.getPosition();
|
|
5548
|
-
const distance = getDistance(pos, spinCenter);
|
|
5549
|
-
this.spin = {
|
|
5550
|
-
center: spinCenter,
|
|
5551
|
-
direction: this.velocity.x >= 0 ? "clockwise" : "counter-clockwise",
|
|
5552
|
-
angle: this.velocity.angle,
|
|
5553
|
-
radius: distance,
|
|
5554
|
-
acceleration: (_j = this.retina.spinAcceleration) !== null && _j !== void 0 ? _j : getRangeValue(this.options.move.spin.acceleration)
|
|
5555
|
-
};
|
|
5556
|
-
}
|
|
5557
4977
|
this.shadowColor = colorToRgb(this.options.shadow.color);
|
|
5558
4978
|
for (const updater of container.particles.updaters) {
|
|
5559
4979
|
if (updater.init) {
|
|
@@ -5573,8 +4993,7 @@
|
|
|
5573
4993
|
return !this.destroyed && !this.spawning && this.isInsideCanvas();
|
|
5574
4994
|
}
|
|
5575
4995
|
isInsideCanvas() {
|
|
5576
|
-
const radius = this.getRadius();
|
|
5577
|
-
const canvasSize = this.container.canvas.size;
|
|
4996
|
+
const radius = this.getRadius(), canvasSize = this.container.canvas.size;
|
|
5578
4997
|
return this.position.x >= -radius && this.position.y >= -radius && this.position.y <= canvasSize.height + radius && this.position.x <= canvasSize.width + radius;
|
|
5579
4998
|
}
|
|
5580
4999
|
draw(delta) {
|
|
@@ -5656,17 +5075,17 @@
|
|
|
5656
5075
|
}
|
|
5657
5076
|
}
|
|
5658
5077
|
calcPosition(container, position, zIndex, tryCount = 0) {
|
|
5659
|
-
var _a, _b, _c, _d
|
|
5078
|
+
var _a, _b, _c, _d;
|
|
5660
5079
|
for (const [, plugin] of container.plugins) {
|
|
5661
5080
|
const pluginPos = plugin.particlePosition !== undefined ? plugin.particlePosition(position, this) : undefined;
|
|
5662
5081
|
if (pluginPos !== undefined) {
|
|
5663
5082
|
return Vector3d.create(pluginPos.x, pluginPos.y, zIndex);
|
|
5664
5083
|
}
|
|
5665
5084
|
}
|
|
5666
|
-
const canvasSize = container.canvas.size
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5085
|
+
const canvasSize = container.canvas.size, exactPosition = calcExactPositionOrRandomFromSize({
|
|
5086
|
+
size: canvasSize,
|
|
5087
|
+
position: position
|
|
5088
|
+
}), pos = Vector3d.create(exactPosition.x, exactPosition.y, zIndex), radius = this.getRadius(), outModes = this.options.move.outModes, fixHorizontal = outMode => {
|
|
5670
5089
|
fixOutMode({
|
|
5671
5090
|
outMode: outMode,
|
|
5672
5091
|
checkModes: [ "bounce", "bounce-horizontal" ],
|
|
@@ -5685,78 +5104,246 @@
|
|
|
5685
5104
|
radius: radius
|
|
5686
5105
|
});
|
|
5687
5106
|
};
|
|
5688
|
-
fixHorizontal((
|
|
5689
|
-
fixHorizontal((
|
|
5690
|
-
fixVertical((
|
|
5691
|
-
fixVertical((
|
|
5692
|
-
if (this.checkOverlap(pos, tryCount)) {
|
|
5693
|
-
return this.calcPosition(container, undefined, zIndex, tryCount + 1);
|
|
5107
|
+
fixHorizontal((_a = outModes.left) !== null && _a !== void 0 ? _a : outModes.default);
|
|
5108
|
+
fixHorizontal((_b = outModes.right) !== null && _b !== void 0 ? _b : outModes.default);
|
|
5109
|
+
fixVertical((_c = outModes.top) !== null && _c !== void 0 ? _c : outModes.default);
|
|
5110
|
+
fixVertical((_d = outModes.bottom) !== null && _d !== void 0 ? _d : outModes.default);
|
|
5111
|
+
if (this.checkOverlap(pos, tryCount)) {
|
|
5112
|
+
return this.calcPosition(container, undefined, zIndex, tryCount + 1);
|
|
5113
|
+
}
|
|
5114
|
+
return pos;
|
|
5115
|
+
}
|
|
5116
|
+
checkOverlap(pos, tryCount = 0) {
|
|
5117
|
+
const collisionsOptions = this.options.collisions, radius = this.getRadius();
|
|
5118
|
+
if (!collisionsOptions.enable) {
|
|
5119
|
+
return false;
|
|
5120
|
+
}
|
|
5121
|
+
const overlapOptions = collisionsOptions.overlap;
|
|
5122
|
+
if (overlapOptions.enable) {
|
|
5123
|
+
return false;
|
|
5124
|
+
}
|
|
5125
|
+
const retries = overlapOptions.retries;
|
|
5126
|
+
if (retries >= 0 && tryCount > retries) {
|
|
5127
|
+
throw new Error("Particle is overlapping and can't be placed");
|
|
5128
|
+
}
|
|
5129
|
+
let overlaps = false;
|
|
5130
|
+
for (const particle of this.container.particles.array) {
|
|
5131
|
+
if (getDistance(pos, particle.position) < radius + particle.getRadius()) {
|
|
5132
|
+
overlaps = true;
|
|
5133
|
+
break;
|
|
5134
|
+
}
|
|
5135
|
+
}
|
|
5136
|
+
return overlaps;
|
|
5137
|
+
}
|
|
5138
|
+
calculateVelocity() {
|
|
5139
|
+
const baseVelocity = getParticleBaseVelocity(this.direction), res = baseVelocity.copy(), moveOptions = this.options.move, rad = Math.PI / 180 * getRangeValue(moveOptions.angle.value), radOffset = Math.PI / 180 * getRangeValue(moveOptions.angle.offset), range = {
|
|
5140
|
+
left: radOffset - rad / 2,
|
|
5141
|
+
right: radOffset + rad / 2
|
|
5142
|
+
};
|
|
5143
|
+
if (!moveOptions.straight) {
|
|
5144
|
+
res.angle += randomInRange(setRangeValue(range.left, range.right));
|
|
5145
|
+
}
|
|
5146
|
+
if (moveOptions.random && typeof moveOptions.speed === "number") {
|
|
5147
|
+
res.length *= Math.random();
|
|
5148
|
+
}
|
|
5149
|
+
return res;
|
|
5150
|
+
}
|
|
5151
|
+
loadShapeData(shapeOptions, reduceDuplicates) {
|
|
5152
|
+
const shapeData = shapeOptions.options[this.shape];
|
|
5153
|
+
if (shapeData) {
|
|
5154
|
+
return deepExtend({}, shapeData instanceof Array ? itemFromArray(shapeData, this.id, reduceDuplicates) : shapeData);
|
|
5155
|
+
}
|
|
5156
|
+
}
|
|
5157
|
+
loadLife() {
|
|
5158
|
+
const container = this.container, particlesOptions = this.options, lifeOptions = particlesOptions.life, life = {
|
|
5159
|
+
delay: container.retina.reduceFactor ? getRangeValue(lifeOptions.delay.value) * (lifeOptions.delay.sync ? 1 : Math.random()) / container.retina.reduceFactor * 1e3 : 0,
|
|
5160
|
+
delayTime: 0,
|
|
5161
|
+
duration: container.retina.reduceFactor ? getRangeValue(lifeOptions.duration.value) * (lifeOptions.duration.sync ? 1 : Math.random()) / container.retina.reduceFactor * 1e3 : 0,
|
|
5162
|
+
time: 0,
|
|
5163
|
+
count: particlesOptions.life.count
|
|
5164
|
+
};
|
|
5165
|
+
if (life.duration <= 0) {
|
|
5166
|
+
life.duration = -1;
|
|
5167
|
+
}
|
|
5168
|
+
if (life.count <= 0) {
|
|
5169
|
+
life.count = -1;
|
|
5170
|
+
}
|
|
5171
|
+
return life;
|
|
5172
|
+
}
|
|
5173
|
+
}
|
|
5174
|
+
_Particle_engine = new WeakMap;
|
|
5175
|
+
class Point {
|
|
5176
|
+
constructor(position, particle) {
|
|
5177
|
+
this.position = position;
|
|
5178
|
+
this.particle = particle;
|
|
5179
|
+
}
|
|
5180
|
+
}
|
|
5181
|
+
class Range {
|
|
5182
|
+
constructor(x, y) {
|
|
5183
|
+
this.position = {
|
|
5184
|
+
x: x,
|
|
5185
|
+
y: y
|
|
5186
|
+
};
|
|
5187
|
+
}
|
|
5188
|
+
}
|
|
5189
|
+
class Circle extends Range {
|
|
5190
|
+
constructor(x, y, radius) {
|
|
5191
|
+
super(x, y);
|
|
5192
|
+
this.radius = radius;
|
|
5193
|
+
}
|
|
5194
|
+
contains(point) {
|
|
5195
|
+
return getDistance(point, this.position) <= this.radius;
|
|
5196
|
+
}
|
|
5197
|
+
intersects(range) {
|
|
5198
|
+
const rect = range, circle = range, pos1 = this.position, pos2 = range.position, xDist = Math.abs(pos2.x - pos1.x), yDist = Math.abs(pos2.y - pos1.y), r = this.radius;
|
|
5199
|
+
if (circle.radius !== undefined) {
|
|
5200
|
+
const rSum = r + circle.radius, dist = Math.sqrt(xDist * xDist + yDist + yDist);
|
|
5201
|
+
return rSum > dist;
|
|
5202
|
+
} else if (rect.size !== undefined) {
|
|
5203
|
+
const w = rect.size.width, h = rect.size.height, edges = Math.pow(xDist - w, 2) + Math.pow(yDist - h, 2);
|
|
5204
|
+
if (xDist > r + w || yDist > r + h) {
|
|
5205
|
+
return false;
|
|
5206
|
+
}
|
|
5207
|
+
if (xDist <= w || yDist <= h) {
|
|
5208
|
+
return true;
|
|
5209
|
+
}
|
|
5210
|
+
return edges <= r * r;
|
|
5211
|
+
}
|
|
5212
|
+
return false;
|
|
5213
|
+
}
|
|
5214
|
+
}
|
|
5215
|
+
class Rectangle extends Range {
|
|
5216
|
+
constructor(x, y, width, height) {
|
|
5217
|
+
super(x, y);
|
|
5218
|
+
this.size = {
|
|
5219
|
+
height: height,
|
|
5220
|
+
width: width
|
|
5221
|
+
};
|
|
5222
|
+
}
|
|
5223
|
+
contains(point) {
|
|
5224
|
+
const w = this.size.width, h = this.size.height, pos = this.position;
|
|
5225
|
+
return point.x >= pos.x && point.x <= pos.x + w && point.y >= pos.y && point.y <= pos.y + h;
|
|
5226
|
+
}
|
|
5227
|
+
intersects(range) {
|
|
5228
|
+
const rect = range, circle = range, w = this.size.width, h = this.size.height, pos1 = this.position, pos2 = range.position;
|
|
5229
|
+
if (circle.radius !== undefined) {
|
|
5230
|
+
return circle.intersects(this);
|
|
5231
|
+
}
|
|
5232
|
+
if (!rect.size) {
|
|
5233
|
+
return false;
|
|
5234
|
+
}
|
|
5235
|
+
const size2 = rect.size, w2 = size2.width, h2 = size2.height;
|
|
5236
|
+
return pos2.x < pos1.x + w && pos2.x + w2 > pos1.x && pos2.y < pos1.y + h && pos2.y + h2 > pos1.y;
|
|
5237
|
+
}
|
|
5238
|
+
}
|
|
5239
|
+
class CircleWarp extends Circle {
|
|
5240
|
+
constructor(x, y, radius, canvasSize) {
|
|
5241
|
+
super(x, y, radius);
|
|
5242
|
+
this.canvasSize = canvasSize;
|
|
5243
|
+
this.canvasSize = Object.assign({}, canvasSize);
|
|
5244
|
+
}
|
|
5245
|
+
contains(point) {
|
|
5246
|
+
if (super.contains(point)) {
|
|
5247
|
+
return true;
|
|
5248
|
+
}
|
|
5249
|
+
const posNE = {
|
|
5250
|
+
x: point.x - this.canvasSize.width,
|
|
5251
|
+
y: point.y
|
|
5252
|
+
};
|
|
5253
|
+
if (super.contains(posNE)) {
|
|
5254
|
+
return true;
|
|
5255
|
+
}
|
|
5256
|
+
const posSE = {
|
|
5257
|
+
x: point.x - this.canvasSize.width,
|
|
5258
|
+
y: point.y - this.canvasSize.height
|
|
5259
|
+
};
|
|
5260
|
+
if (super.contains(posSE)) {
|
|
5261
|
+
return true;
|
|
5694
5262
|
}
|
|
5695
|
-
|
|
5263
|
+
const posSW = {
|
|
5264
|
+
x: point.x,
|
|
5265
|
+
y: point.y - this.canvasSize.height
|
|
5266
|
+
};
|
|
5267
|
+
return super.contains(posSW);
|
|
5696
5268
|
}
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
if (!collisionsOptions.enable) {
|
|
5701
|
-
return false;
|
|
5269
|
+
intersects(range) {
|
|
5270
|
+
if (super.intersects(range)) {
|
|
5271
|
+
return true;
|
|
5702
5272
|
}
|
|
5703
|
-
const
|
|
5704
|
-
|
|
5273
|
+
const rect = range, circle = range, newPos = {
|
|
5274
|
+
x: range.position.x - this.canvasSize.width,
|
|
5275
|
+
y: range.position.y - this.canvasSize.height
|
|
5276
|
+
};
|
|
5277
|
+
if (circle.radius !== undefined) {
|
|
5278
|
+
const biggerCircle = new Circle(newPos.x, newPos.y, circle.radius * 2);
|
|
5279
|
+
return super.intersects(biggerCircle);
|
|
5280
|
+
} else if (rect.size !== undefined) {
|
|
5281
|
+
const rectSW = new Rectangle(newPos.x, newPos.y, rect.size.width * 2, rect.size.height * 2);
|
|
5282
|
+
return super.intersects(rectSW);
|
|
5283
|
+
}
|
|
5284
|
+
return false;
|
|
5285
|
+
}
|
|
5286
|
+
}
|
|
5287
|
+
class QuadTree {
|
|
5288
|
+
constructor(rectangle, capacity) {
|
|
5289
|
+
this.rectangle = rectangle;
|
|
5290
|
+
this.capacity = capacity;
|
|
5291
|
+
this.points = [];
|
|
5292
|
+
this.divided = false;
|
|
5293
|
+
}
|
|
5294
|
+
insert(point) {
|
|
5295
|
+
var _a, _b, _c, _d, _e;
|
|
5296
|
+
if (!this.rectangle.contains(point.position)) {
|
|
5705
5297
|
return false;
|
|
5706
5298
|
}
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5299
|
+
if (this.points.length < this.capacity) {
|
|
5300
|
+
this.points.push(point);
|
|
5301
|
+
return true;
|
|
5710
5302
|
}
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
if (getDistance(pos, particle.position) < radius + particle.getRadius()) {
|
|
5714
|
-
overlaps = true;
|
|
5715
|
-
break;
|
|
5716
|
-
}
|
|
5303
|
+
if (!this.divided) {
|
|
5304
|
+
this.subdivide();
|
|
5717
5305
|
}
|
|
5718
|
-
return
|
|
5306
|
+
return (_e = ((_a = this.northEast) === null || _a === void 0 ? void 0 : _a.insert(point)) || ((_b = this.northWest) === null || _b === void 0 ? void 0 : _b.insert(point)) || ((_c = this.southEast) === null || _c === void 0 ? void 0 : _c.insert(point)) || ((_d = this.southWest) === null || _d === void 0 ? void 0 : _d.insert(point))) !== null && _e !== void 0 ? _e : false;
|
|
5719
5307
|
}
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
left: radOffset - rad / 2,
|
|
5723
|
-
right: radOffset + rad / 2
|
|
5724
|
-
};
|
|
5725
|
-
if (!moveOptions.straight) {
|
|
5726
|
-
res.angle += randomInRange(setRangeValue(range.left, range.right));
|
|
5727
|
-
}
|
|
5728
|
-
if (moveOptions.random && typeof moveOptions.speed === "number") {
|
|
5729
|
-
res.length *= Math.random();
|
|
5730
|
-
}
|
|
5731
|
-
return res;
|
|
5308
|
+
queryCircle(position, radius) {
|
|
5309
|
+
return this.query(new Circle(position.x, position.y, radius));
|
|
5732
5310
|
}
|
|
5733
|
-
|
|
5734
|
-
const
|
|
5735
|
-
|
|
5736
|
-
return deepExtend({}, shapeData instanceof Array ? itemFromArray(shapeData, this.id, reduceDuplicates) : shapeData);
|
|
5737
|
-
}
|
|
5311
|
+
queryCircleWarp(position, radius, containerOrSize) {
|
|
5312
|
+
const container = containerOrSize, size = containerOrSize;
|
|
5313
|
+
return this.query(new CircleWarp(position.x, position.y, radius, container.canvas !== undefined ? container.canvas.size : size));
|
|
5738
5314
|
}
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
time: 0,
|
|
5748
|
-
count: particlesOptions.life.count
|
|
5749
|
-
};
|
|
5750
|
-
if (life.duration <= 0) {
|
|
5751
|
-
life.duration = -1;
|
|
5315
|
+
queryRectangle(position, size) {
|
|
5316
|
+
return this.query(new Rectangle(position.x, position.y, size.width, size.height));
|
|
5317
|
+
}
|
|
5318
|
+
query(range, found) {
|
|
5319
|
+
var _a, _b, _c, _d;
|
|
5320
|
+
const res = found !== null && found !== void 0 ? found : [];
|
|
5321
|
+
if (!range.intersects(this.rectangle)) {
|
|
5322
|
+
return [];
|
|
5752
5323
|
}
|
|
5753
|
-
|
|
5754
|
-
|
|
5324
|
+
for (const p of this.points) {
|
|
5325
|
+
if (!range.contains(p.position) && getDistance(range.position, p.position) > p.particle.getRadius()) {
|
|
5326
|
+
continue;
|
|
5327
|
+
}
|
|
5328
|
+
res.push(p.particle);
|
|
5755
5329
|
}
|
|
5756
|
-
|
|
5330
|
+
if (this.divided) {
|
|
5331
|
+
(_a = this.northEast) === null || _a === void 0 ? void 0 : _a.query(range, res);
|
|
5332
|
+
(_b = this.northWest) === null || _b === void 0 ? void 0 : _b.query(range, res);
|
|
5333
|
+
(_c = this.southEast) === null || _c === void 0 ? void 0 : _c.query(range, res);
|
|
5334
|
+
(_d = this.southWest) === null || _d === void 0 ? void 0 : _d.query(range, res);
|
|
5335
|
+
}
|
|
5336
|
+
return res;
|
|
5337
|
+
}
|
|
5338
|
+
subdivide() {
|
|
5339
|
+
const x = this.rectangle.position.x, y = this.rectangle.position.y, w = this.rectangle.size.width, h = this.rectangle.size.height, capacity = this.capacity;
|
|
5340
|
+
this.northEast = new QuadTree(new Rectangle(x, y, w / 2, h / 2), capacity);
|
|
5341
|
+
this.northWest = new QuadTree(new Rectangle(x + w / 2, y, w / 2, h / 2), capacity);
|
|
5342
|
+
this.southEast = new QuadTree(new Rectangle(x, y + h / 2, w / 2, h / 2), capacity);
|
|
5343
|
+
this.southWest = new QuadTree(new Rectangle(x + w / 2, y + h / 2, w / 2, h / 2), capacity);
|
|
5344
|
+
this.divided = true;
|
|
5757
5345
|
}
|
|
5758
5346
|
}
|
|
5759
|
-
_Particle_engine = new WeakMap;
|
|
5760
5347
|
var Particles_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
5761
5348
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
5762
5349
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -5778,7 +5365,6 @@
|
|
|
5778
5365
|
this.nextId = 0;
|
|
5779
5366
|
this.array = [];
|
|
5780
5367
|
this.zArray = [];
|
|
5781
|
-
this.mover = new ParticlesMover(container);
|
|
5782
5368
|
this.limit = 0;
|
|
5783
5369
|
this.needsSort = false;
|
|
5784
5370
|
this.lastZIndex = 0;
|
|
@@ -5790,6 +5376,7 @@
|
|
|
5790
5376
|
const canvasSize = this.container.canvas.size;
|
|
5791
5377
|
this.linksColors = new Map;
|
|
5792
5378
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
5379
|
+
this.movers = Particles_classPrivateFieldGet(this, _Particles_engine, "f").plugins.getMovers(container, true);
|
|
5793
5380
|
this.updaters = Particles_classPrivateFieldGet(this, _Particles_engine, "f").plugins.getUpdaters(container, true);
|
|
5794
5381
|
}
|
|
5795
5382
|
get count() {
|
|
@@ -5797,8 +5384,7 @@
|
|
|
5797
5384
|
}
|
|
5798
5385
|
init() {
|
|
5799
5386
|
var _a;
|
|
5800
|
-
const container = this.container;
|
|
5801
|
-
const options = container.actualOptions;
|
|
5387
|
+
const container = this.container, options = container.actualOptions;
|
|
5802
5388
|
this.lastZIndex = 0;
|
|
5803
5389
|
this.needsSort = false;
|
|
5804
5390
|
this.freqs.links = new Map;
|
|
@@ -5858,8 +5444,7 @@
|
|
|
5858
5444
|
this.removeAt(this.array.indexOf(particle), undefined, group, override);
|
|
5859
5445
|
}
|
|
5860
5446
|
async update(delta) {
|
|
5861
|
-
const container = this.container;
|
|
5862
|
-
const particlesToDelete = [];
|
|
5447
|
+
const container = this.container, particlesToDelete = [];
|
|
5863
5448
|
container.pathGenerator.update();
|
|
5864
5449
|
for (const [, plugin] of container.plugins) {
|
|
5865
5450
|
if (plugin.update !== undefined) {
|
|
@@ -5882,7 +5467,11 @@
|
|
|
5882
5467
|
plugin.particleUpdate(particle, delta);
|
|
5883
5468
|
}
|
|
5884
5469
|
}
|
|
5885
|
-
this.
|
|
5470
|
+
for (const mover of this.movers) {
|
|
5471
|
+
if (mover.isEnabled(particle)) {
|
|
5472
|
+
mover.move(particle, delta);
|
|
5473
|
+
}
|
|
5474
|
+
}
|
|
5886
5475
|
if (particle.destroyed) {
|
|
5887
5476
|
particlesToDelete.push(particle);
|
|
5888
5477
|
continue;
|
|
@@ -5904,10 +5493,9 @@
|
|
|
5904
5493
|
delete container.canvas.resizeFactor;
|
|
5905
5494
|
}
|
|
5906
5495
|
async draw(delta) {
|
|
5907
|
-
const container = this.container;
|
|
5908
|
-
container.canvas.clear();
|
|
5909
|
-
const canvasSize = this.container.canvas.size;
|
|
5496
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
5910
5497
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
5498
|
+
container.canvas.clear();
|
|
5911
5499
|
await this.update(delta);
|
|
5912
5500
|
if (this.needsSort) {
|
|
5913
5501
|
this.zArray.sort(((a, b) => b.position.z - a.position.z || a.id - b.id));
|
|
@@ -5958,8 +5546,7 @@
|
|
|
5958
5546
|
options.size.value.max /= factor;
|
|
5959
5547
|
}
|
|
5960
5548
|
options.load(splitOptions.particles);
|
|
5961
|
-
const offset = splitOptions.sizeOffset ? setRangeValue(-parent.size.value, parent.size.value) : 0
|
|
5962
|
-
const position = {
|
|
5549
|
+
const offset = splitOptions.sizeOffset ? setRangeValue(-parent.size.value, parent.size.value) : 0, position = {
|
|
5963
5550
|
x: parent.position.x + randomInRange(offset),
|
|
5964
5551
|
y: parent.position.y + randomInRange(offset)
|
|
5965
5552
|
};
|
|
@@ -6010,11 +5597,10 @@
|
|
|
6010
5597
|
addManualParticles() {
|
|
6011
5598
|
const container = this.container, options = container.actualOptions;
|
|
6012
5599
|
for (const particle of options.manualParticles) {
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
}
|
|
6017
|
-
this.addParticle(pos, particle.options);
|
|
5600
|
+
this.addParticle(calcPositionFromSize({
|
|
5601
|
+
size: container.canvas.size,
|
|
5602
|
+
position: particle.position
|
|
5603
|
+
}), particle.options);
|
|
6018
5604
|
}
|
|
6019
5605
|
}
|
|
6020
5606
|
setDensity() {
|
|
@@ -6024,17 +5610,15 @@
|
|
|
6024
5610
|
}
|
|
6025
5611
|
this.applyDensity(options.particles, options.manualParticles.length);
|
|
6026
5612
|
}
|
|
5613
|
+
handleClickMode(mode) {
|
|
5614
|
+
this.interactionManager.handleClickMode(mode);
|
|
5615
|
+
}
|
|
6027
5616
|
applyDensity(options, manualCount, group) {
|
|
6028
5617
|
var _a;
|
|
6029
5618
|
if (!((_a = options.number.density) === null || _a === void 0 ? void 0 : _a.enable)) {
|
|
6030
5619
|
return;
|
|
6031
5620
|
}
|
|
6032
|
-
const numberOptions = options.number;
|
|
6033
|
-
const densityFactor = this.initDensityFactor(numberOptions.density);
|
|
6034
|
-
const optParticlesNumber = numberOptions.value;
|
|
6035
|
-
const optParticlesLimit = numberOptions.limit > 0 ? numberOptions.limit : optParticlesNumber;
|
|
6036
|
-
const particlesNumber = Math.min(optParticlesNumber, optParticlesLimit) * densityFactor + manualCount;
|
|
6037
|
-
const particlesCount = Math.min(this.count, this.array.filter((t => t.group === group)).length);
|
|
5621
|
+
const numberOptions = options.number, densityFactor = this.initDensityFactor(numberOptions.density), optParticlesNumber = numberOptions.value, optParticlesLimit = numberOptions.limit > 0 ? numberOptions.limit : optParticlesNumber, particlesNumber = Math.min(optParticlesNumber, optParticlesLimit) * densityFactor + manualCount, particlesCount = Math.min(this.count, this.array.filter((t => t.group === group)).length);
|
|
6038
5622
|
this.limit = numberOptions.limit * densityFactor;
|
|
6039
5623
|
if (particlesCount < particlesNumber) {
|
|
6040
5624
|
this.push(Math.abs(particlesNumber - particlesCount), undefined, options, group);
|
|
@@ -6076,8 +5660,7 @@
|
|
|
6076
5660
|
this.container = container;
|
|
6077
5661
|
}
|
|
6078
5662
|
init() {
|
|
6079
|
-
const container = this.container;
|
|
6080
|
-
const options = container.actualOptions;
|
|
5663
|
+
const container = this.container, options = container.actualOptions;
|
|
6081
5664
|
this.pixelRatio = !options.detectRetina || isSsr() ? 1 : window.devicePixelRatio;
|
|
6082
5665
|
const motionOptions = this.container.actualOptions.motion;
|
|
6083
5666
|
if (motionOptions && (motionOptions.disable || motionOptions.reduce.value)) {
|
|
@@ -6113,9 +5696,6 @@
|
|
|
6113
5696
|
this.linksWidth = particles.links.width * ratio;
|
|
6114
5697
|
this.sizeAnimationSpeed = getRangeValue(particles.size.animation.speed) * ratio;
|
|
6115
5698
|
this.maxSpeed = getRangeValue(particles.move.gravity.maxSpeed) * ratio;
|
|
6116
|
-
if (particles.orbit.radius !== undefined) {
|
|
6117
|
-
this.orbitRadius = getRangeValue(particles.orbit.radius) * this.container.retina.pixelRatio;
|
|
6118
|
-
}
|
|
6119
5699
|
const modes = options.interactivity.modes;
|
|
6120
5700
|
this.connectModeDistance = modes.connect.distance * ratio;
|
|
6121
5701
|
this.connectModeRadius = modes.connect.radius * ratio;
|
|
@@ -6130,19 +5710,13 @@
|
|
|
6130
5710
|
}
|
|
6131
5711
|
}
|
|
6132
5712
|
initParticle(particle) {
|
|
6133
|
-
const options = particle.options;
|
|
6134
|
-
const ratio = this.pixelRatio;
|
|
6135
|
-
const moveDistance = options.move.distance;
|
|
6136
|
-
const props = particle.retina;
|
|
5713
|
+
const options = particle.options, ratio = this.pixelRatio, moveDistance = options.move.distance, props = particle.retina;
|
|
6137
5714
|
props.attractDistance = getRangeValue(options.move.attract.distance) * ratio;
|
|
6138
5715
|
props.linksDistance = options.links.distance * ratio;
|
|
6139
5716
|
props.linksWidth = options.links.width * ratio;
|
|
6140
5717
|
props.moveDrift = getRangeValue(options.move.drift) * ratio;
|
|
6141
5718
|
props.moveSpeed = getRangeValue(options.move.speed) * ratio;
|
|
6142
5719
|
props.sizeAnimationSpeed = getRangeValue(options.size.animation.speed) * ratio;
|
|
6143
|
-
if (particle.spin) {
|
|
6144
|
-
props.spinAcceleration = getRangeValue(options.move.spin.acceleration) * ratio;
|
|
6145
|
-
}
|
|
6146
5720
|
const maxDistance = props.maxDistance;
|
|
6147
5721
|
maxDistance.horizontal = moveDistance.horizontal !== undefined ? moveDistance.horizontal * ratio : undefined;
|
|
6148
5722
|
maxDistance.vertical = moveDistance.vertical !== undefined ? moveDistance.vertical * ratio : undefined;
|
|
@@ -6209,13 +5783,6 @@
|
|
|
6209
5783
|
inside: false
|
|
6210
5784
|
}
|
|
6211
5785
|
};
|
|
6212
|
-
this.bubble = {};
|
|
6213
|
-
this.repulse = {
|
|
6214
|
-
particles: []
|
|
6215
|
-
};
|
|
6216
|
-
this.attract = {
|
|
6217
|
-
particles: []
|
|
6218
|
-
};
|
|
6219
5786
|
this.plugins = new Map;
|
|
6220
5787
|
this.drawers = new Map;
|
|
6221
5788
|
this.density = 1;
|
|
@@ -6403,8 +5970,7 @@
|
|
|
6403
5970
|
if (this.destroyed) {
|
|
6404
5971
|
return;
|
|
6405
5972
|
}
|
|
6406
|
-
const mouseEvent = e
|
|
6407
|
-
const pos = {
|
|
5973
|
+
const mouseEvent = e, pos = {
|
|
6408
5974
|
x: mouseEvent.offsetX || mouseEvent.clientX,
|
|
6409
5975
|
y: mouseEvent.offsetY || mouseEvent.clientY
|
|
6410
5976
|
};
|
|
@@ -6437,8 +6003,7 @@
|
|
|
6437
6003
|
return;
|
|
6438
6004
|
}
|
|
6439
6005
|
}
|
|
6440
|
-
const canvasRect = (_a = this.canvas.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()
|
|
6441
|
-
const pos = {
|
|
6006
|
+
const canvasRect = (_a = this.canvas.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect(), pos = {
|
|
6442
6007
|
x: lastTouch.clientX - ((_b = canvasRect === null || canvasRect === void 0 ? void 0 : canvasRect.left) !== null && _b !== void 0 ? _b : 0),
|
|
6443
6008
|
y: lastTouch.clientY - ((_c = canvasRect === null || canvasRect === void 0 ? void 0 : canvasRect.top) !== null && _c !== void 0 ? _c : 0)
|
|
6444
6009
|
};
|
|
@@ -6462,6 +6027,14 @@
|
|
|
6462
6027
|
el.addEventListener("touchend", touchEndHandler);
|
|
6463
6028
|
el.addEventListener("touchcancel", touchCancelHandler);
|
|
6464
6029
|
}
|
|
6030
|
+
handleClickMode(mode) {
|
|
6031
|
+
this.particles.handleClickMode(mode);
|
|
6032
|
+
for (const [, plugin] of this.plugins) {
|
|
6033
|
+
if (plugin.handleClickMode) {
|
|
6034
|
+
plugin.handleClickMode(mode);
|
|
6035
|
+
}
|
|
6036
|
+
}
|
|
6037
|
+
}
|
|
6465
6038
|
updateActualOptions() {
|
|
6466
6039
|
this.actualOptions.responsive = [];
|
|
6467
6040
|
const newMaxWidth = this.actualOptions.setResponsive(this.canvas.size.width, this.retina.pixelRatio, this._options);
|
|
@@ -6577,17 +6150,14 @@
|
|
|
6577
6150
|
}
|
|
6578
6151
|
async loadOptions(params) {
|
|
6579
6152
|
var _a, _b, _c;
|
|
6580
|
-
const tagId = (_a = params.tagId) !== null && _a !== void 0 ? _a : `tsparticles${Math.floor(Math.random() * 1e4)}
|
|
6581
|
-
const {options: options, index: index} = params;
|
|
6153
|
+
const tagId = (_a = params.tagId) !== null && _a !== void 0 ? _a : `tsparticles${Math.floor(Math.random() * 1e4)}`, {options: options, index: index} = params;
|
|
6582
6154
|
let domContainer = (_b = params.element) !== null && _b !== void 0 ? _b : document.getElementById(tagId);
|
|
6583
6155
|
if (!domContainer) {
|
|
6584
6156
|
domContainer = document.createElement("div");
|
|
6585
6157
|
domContainer.id = tagId;
|
|
6586
6158
|
(_c = document.querySelector("body")) === null || _c === void 0 ? void 0 : _c.append(domContainer);
|
|
6587
6159
|
}
|
|
6588
|
-
const currentOptions = options instanceof Array ? itemFromArray(options, index) : options;
|
|
6589
|
-
const dom = this.dom();
|
|
6590
|
-
const oldIndex = dom.findIndex((v => v.id === tagId));
|
|
6160
|
+
const currentOptions = options instanceof Array ? itemFromArray(options, index) : options, dom = this.dom(), oldIndex = dom.findIndex((v => v.id === tagId));
|
|
6591
6161
|
if (oldIndex >= 0) {
|
|
6592
6162
|
const old = this.domItem(oldIndex);
|
|
6593
6163
|
if (old && !old.destroyed) {
|
|
@@ -6623,8 +6193,7 @@
|
|
|
6623
6193
|
return newItem;
|
|
6624
6194
|
}
|
|
6625
6195
|
async loadRemoteOptions(params) {
|
|
6626
|
-
const {url: jsonUrl, index: index} = params;
|
|
6627
|
-
const url = jsonUrl instanceof Array ? itemFromArray(jsonUrl, index) : jsonUrl;
|
|
6196
|
+
const {url: jsonUrl, index: index} = params, url = jsonUrl instanceof Array ? itemFromArray(jsonUrl, index) : jsonUrl;
|
|
6628
6197
|
if (!url) {
|
|
6629
6198
|
return;
|
|
6630
6199
|
}
|
|
@@ -6713,7 +6282,7 @@
|
|
|
6713
6282
|
}
|
|
6714
6283
|
setOnClickHandler(callback) {
|
|
6715
6284
|
const dom = this.dom();
|
|
6716
|
-
if (dom.length
|
|
6285
|
+
if (!dom.length) {
|
|
6717
6286
|
throw new Error("Can only set click handlers after calling tsParticles.load() or tsParticles.loadJSON()");
|
|
6718
6287
|
}
|
|
6719
6288
|
for (const domItem of dom) {
|
|
@@ -6722,6 +6291,114 @@
|
|
|
6722
6291
|
}
|
|
6723
6292
|
}
|
|
6724
6293
|
_Loader_engine = new WeakMap;
|
|
6294
|
+
var Plugins_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
6295
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
6296
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
6297
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6298
|
+
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
6299
|
+
value;
|
|
6300
|
+
};
|
|
6301
|
+
var _Plugins_engine;
|
|
6302
|
+
class Plugins {
|
|
6303
|
+
constructor(engine) {
|
|
6304
|
+
_Plugins_engine.set(this, void 0);
|
|
6305
|
+
Plugins_classPrivateFieldSet(this, _Plugins_engine, engine, "f");
|
|
6306
|
+
this.plugins = [];
|
|
6307
|
+
this.interactorsInitializers = new Map;
|
|
6308
|
+
this.moversInitializers = new Map;
|
|
6309
|
+
this.updatersInitializers = new Map;
|
|
6310
|
+
this.interactors = new Map;
|
|
6311
|
+
this.movers = new Map;
|
|
6312
|
+
this.updaters = new Map;
|
|
6313
|
+
this.presets = new Map;
|
|
6314
|
+
this.drawers = new Map;
|
|
6315
|
+
this.pathGenerators = new Map;
|
|
6316
|
+
}
|
|
6317
|
+
getPlugin(plugin) {
|
|
6318
|
+
return this.plugins.find((t => t.id === plugin));
|
|
6319
|
+
}
|
|
6320
|
+
addPlugin(plugin) {
|
|
6321
|
+
if (!this.getPlugin(plugin.id)) {
|
|
6322
|
+
this.plugins.push(plugin);
|
|
6323
|
+
}
|
|
6324
|
+
}
|
|
6325
|
+
getAvailablePlugins(container) {
|
|
6326
|
+
const res = new Map;
|
|
6327
|
+
for (const plugin of this.plugins) {
|
|
6328
|
+
if (!plugin.needsPlugin(container.actualOptions)) {
|
|
6329
|
+
continue;
|
|
6330
|
+
}
|
|
6331
|
+
res.set(plugin.id, plugin.getPlugin(container));
|
|
6332
|
+
}
|
|
6333
|
+
return res;
|
|
6334
|
+
}
|
|
6335
|
+
loadOptions(options, sourceOptions) {
|
|
6336
|
+
for (const plugin of this.plugins) {
|
|
6337
|
+
plugin.loadOptions(options, sourceOptions);
|
|
6338
|
+
}
|
|
6339
|
+
}
|
|
6340
|
+
getPreset(preset) {
|
|
6341
|
+
return this.presets.get(preset);
|
|
6342
|
+
}
|
|
6343
|
+
addPreset(presetKey, options, override = false) {
|
|
6344
|
+
if (override || !this.getPreset(presetKey)) {
|
|
6345
|
+
this.presets.set(presetKey, options);
|
|
6346
|
+
}
|
|
6347
|
+
}
|
|
6348
|
+
getShapeDrawer(type) {
|
|
6349
|
+
return this.drawers.get(type);
|
|
6350
|
+
}
|
|
6351
|
+
addShapeDrawer(type, drawer) {
|
|
6352
|
+
if (!this.getShapeDrawer(type)) {
|
|
6353
|
+
this.drawers.set(type, drawer);
|
|
6354
|
+
}
|
|
6355
|
+
}
|
|
6356
|
+
getSupportedShapes() {
|
|
6357
|
+
return this.drawers.keys();
|
|
6358
|
+
}
|
|
6359
|
+
getPathGenerator(type) {
|
|
6360
|
+
return this.pathGenerators.get(type);
|
|
6361
|
+
}
|
|
6362
|
+
addPathGenerator(type, pathGenerator) {
|
|
6363
|
+
if (!this.getPathGenerator(type)) {
|
|
6364
|
+
this.pathGenerators.set(type, pathGenerator);
|
|
6365
|
+
}
|
|
6366
|
+
}
|
|
6367
|
+
getInteractors(container, force = false) {
|
|
6368
|
+
let res = this.interactors.get(container);
|
|
6369
|
+
if (!res || force) {
|
|
6370
|
+
res = [ ...this.interactorsInitializers.values() ].map((t => t(container)));
|
|
6371
|
+
this.interactors.set(container, res);
|
|
6372
|
+
}
|
|
6373
|
+
return res;
|
|
6374
|
+
}
|
|
6375
|
+
addInteractor(name, initInteractor) {
|
|
6376
|
+
this.interactorsInitializers.set(name, initInteractor);
|
|
6377
|
+
}
|
|
6378
|
+
getUpdaters(container, force = false) {
|
|
6379
|
+
let res = this.updaters.get(container);
|
|
6380
|
+
if (!res || force) {
|
|
6381
|
+
res = [ ...this.updatersInitializers.values() ].map((t => t(container)));
|
|
6382
|
+
this.updaters.set(container, res);
|
|
6383
|
+
}
|
|
6384
|
+
return res;
|
|
6385
|
+
}
|
|
6386
|
+
addParticleUpdater(name, initUpdater) {
|
|
6387
|
+
this.updatersInitializers.set(name, initUpdater);
|
|
6388
|
+
}
|
|
6389
|
+
getMovers(container, force = false) {
|
|
6390
|
+
let res = this.movers.get(container);
|
|
6391
|
+
if (!res || force) {
|
|
6392
|
+
res = [ ...this.moversInitializers.values() ].map((t => t(container)));
|
|
6393
|
+
this.movers.set(container, res);
|
|
6394
|
+
}
|
|
6395
|
+
return res;
|
|
6396
|
+
}
|
|
6397
|
+
addParticleMover(name, initMover) {
|
|
6398
|
+
this.moversInitializers.set(name, initMover);
|
|
6399
|
+
}
|
|
6400
|
+
}
|
|
6401
|
+
_Plugins_engine = new WeakMap;
|
|
6725
6402
|
var engine_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
6726
6403
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
6727
6404
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -6809,6 +6486,10 @@
|
|
|
6809
6486
|
this.plugins.addInteractor(name, interactorInitializer);
|
|
6810
6487
|
await this.refresh();
|
|
6811
6488
|
}
|
|
6489
|
+
async addMover(name, moverInitializer) {
|
|
6490
|
+
this.plugins.addParticleMover(name, moverInitializer);
|
|
6491
|
+
await this.refresh();
|
|
6492
|
+
}
|
|
6812
6493
|
async addParticleUpdater(name, updaterInitializer) {
|
|
6813
6494
|
this.plugins.addParticleUpdater(name, updaterInitializer);
|
|
6814
6495
|
await this.refresh();
|
|
@@ -6835,6 +6516,18 @@
|
|
|
6835
6516
|
pJSDom: pJSDom
|
|
6836
6517
|
};
|
|
6837
6518
|
};
|
|
6519
|
+
class ExternalInteractorBase {
|
|
6520
|
+
constructor(container) {
|
|
6521
|
+
this.container = container;
|
|
6522
|
+
this.type = 0;
|
|
6523
|
+
}
|
|
6524
|
+
}
|
|
6525
|
+
class ParticlesInteractorBase {
|
|
6526
|
+
constructor(container) {
|
|
6527
|
+
this.container = container;
|
|
6528
|
+
this.type = 1;
|
|
6529
|
+
}
|
|
6530
|
+
}
|
|
6838
6531
|
const tsParticles = new Engine;
|
|
6839
6532
|
tsParticles.init();
|
|
6840
6533
|
const {particlesJS: particlesJS, pJSDom: pJSDom} = initPjs(tsParticles);
|