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.js
CHANGED
|
@@ -340,6 +340,12 @@
|
|
|
340
340
|
Main: function() {
|
|
341
341
|
return Engine;
|
|
342
342
|
},
|
|
343
|
+
Options: function() {
|
|
344
|
+
return Options;
|
|
345
|
+
},
|
|
346
|
+
OptionsColor: function() {
|
|
347
|
+
return OptionsColor;
|
|
348
|
+
},
|
|
343
349
|
Particle: function() {
|
|
344
350
|
return Particle;
|
|
345
351
|
},
|
|
@@ -349,9 +355,6 @@
|
|
|
349
355
|
ParticlesInteractorBase: function() {
|
|
350
356
|
return ParticlesInteractorBase;
|
|
351
357
|
},
|
|
352
|
-
ParticlesMover: function() {
|
|
353
|
-
return ParticlesMover;
|
|
354
|
-
},
|
|
355
358
|
Plugins: function() {
|
|
356
359
|
return Plugins;
|
|
357
360
|
},
|
|
@@ -391,6 +394,21 @@
|
|
|
391
394
|
calcEasing: function() {
|
|
392
395
|
return calcEasing;
|
|
393
396
|
},
|
|
397
|
+
calcExactPositionOrRandomFromSize: function() {
|
|
398
|
+
return calcExactPositionOrRandomFromSize;
|
|
399
|
+
},
|
|
400
|
+
calcExactPositionOrRandomFromSizeRanged: function() {
|
|
401
|
+
return calcExactPositionOrRandomFromSizeRanged;
|
|
402
|
+
},
|
|
403
|
+
calcPositionFromSize: function() {
|
|
404
|
+
return calcPositionFromSize;
|
|
405
|
+
},
|
|
406
|
+
calcPositionOrRandomFromSize: function() {
|
|
407
|
+
return calcPositionOrRandomFromSize;
|
|
408
|
+
},
|
|
409
|
+
calcPositionOrRandomFromSizeRanged: function() {
|
|
410
|
+
return calcPositionOrRandomFromSizeRanged;
|
|
411
|
+
},
|
|
394
412
|
calculateBounds: function() {
|
|
395
413
|
return calculateBounds;
|
|
396
414
|
},
|
|
@@ -550,9 +568,18 @@
|
|
|
550
568
|
itemFromArray: function() {
|
|
551
569
|
return itemFromArray;
|
|
552
570
|
},
|
|
571
|
+
loadAbsorbersPlugin: function() {
|
|
572
|
+
return loadAbsorbersPlugin;
|
|
573
|
+
},
|
|
574
|
+
loadEmittersPlugin: function() {
|
|
575
|
+
return loadEmittersPlugin;
|
|
576
|
+
},
|
|
553
577
|
loadFont: function() {
|
|
554
578
|
return loadFont;
|
|
555
579
|
},
|
|
580
|
+
loadPolygonMaskPlugin: function() {
|
|
581
|
+
return loadPolygonMaskPlugin;
|
|
582
|
+
},
|
|
556
583
|
mix: function() {
|
|
557
584
|
return mix;
|
|
558
585
|
},
|
|
@@ -596,6 +623,111 @@
|
|
|
596
623
|
return tsParticles;
|
|
597
624
|
}
|
|
598
625
|
});
|
|
626
|
+
class Constants {}
|
|
627
|
+
Constants.generatedAttribute = "generated";
|
|
628
|
+
Constants.randomColorValue = "random";
|
|
629
|
+
Constants.midColorValue = "mid";
|
|
630
|
+
Constants.touchEndEvent = "touchend";
|
|
631
|
+
Constants.mouseDownEvent = "mousedown";
|
|
632
|
+
Constants.mouseUpEvent = "mouseup";
|
|
633
|
+
Constants.mouseMoveEvent = "mousemove";
|
|
634
|
+
Constants.touchStartEvent = "touchstart";
|
|
635
|
+
Constants.touchMoveEvent = "touchmove";
|
|
636
|
+
Constants.mouseLeaveEvent = "mouseleave";
|
|
637
|
+
Constants.mouseOutEvent = "mouseout";
|
|
638
|
+
Constants.touchCancelEvent = "touchcancel";
|
|
639
|
+
Constants.resizeEvent = "resize";
|
|
640
|
+
Constants.visibilityChangeEvent = "visibilitychange";
|
|
641
|
+
Constants.noPolygonDataLoaded = "No polygon data loaded.";
|
|
642
|
+
Constants.noPolygonFound = "No polygon found, you need to specify SVG url in config.";
|
|
643
|
+
class Vector {
|
|
644
|
+
constructor(xOrCoords, y) {
|
|
645
|
+
if (typeof xOrCoords !== "number" && xOrCoords) {
|
|
646
|
+
this.x = xOrCoords.x;
|
|
647
|
+
this.y = xOrCoords.y;
|
|
648
|
+
} else if (xOrCoords !== undefined && y !== undefined) {
|
|
649
|
+
this.x = xOrCoords;
|
|
650
|
+
this.y = y;
|
|
651
|
+
} else {
|
|
652
|
+
throw new Error("tsParticles - Vector not initialized correctly");
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
static clone(source) {
|
|
656
|
+
return Vector.create(source.x, source.y);
|
|
657
|
+
}
|
|
658
|
+
static create(x, y) {
|
|
659
|
+
return new Vector(x, y);
|
|
660
|
+
}
|
|
661
|
+
static get origin() {
|
|
662
|
+
return Vector.create(0, 0);
|
|
663
|
+
}
|
|
664
|
+
get angle() {
|
|
665
|
+
return Math.atan2(this.y, this.x);
|
|
666
|
+
}
|
|
667
|
+
set angle(angle) {
|
|
668
|
+
this.updateFromAngle(angle, this.length);
|
|
669
|
+
}
|
|
670
|
+
get length() {
|
|
671
|
+
return Math.sqrt(this.getLengthSq());
|
|
672
|
+
}
|
|
673
|
+
set length(length) {
|
|
674
|
+
this.updateFromAngle(this.angle, length);
|
|
675
|
+
}
|
|
676
|
+
add(v) {
|
|
677
|
+
return Vector.create(this.x + v.x, this.y + v.y);
|
|
678
|
+
}
|
|
679
|
+
addTo(v) {
|
|
680
|
+
this.x += v.x;
|
|
681
|
+
this.y += v.y;
|
|
682
|
+
}
|
|
683
|
+
sub(v) {
|
|
684
|
+
return Vector.create(this.x - v.x, this.y - v.y);
|
|
685
|
+
}
|
|
686
|
+
subFrom(v) {
|
|
687
|
+
this.x -= v.x;
|
|
688
|
+
this.y -= v.y;
|
|
689
|
+
}
|
|
690
|
+
mult(n) {
|
|
691
|
+
return Vector.create(this.x * n, this.y * n);
|
|
692
|
+
}
|
|
693
|
+
multTo(n) {
|
|
694
|
+
this.x *= n;
|
|
695
|
+
this.y *= n;
|
|
696
|
+
}
|
|
697
|
+
div(n) {
|
|
698
|
+
return Vector.create(this.x / n, this.y / n);
|
|
699
|
+
}
|
|
700
|
+
divTo(n) {
|
|
701
|
+
this.x /= n;
|
|
702
|
+
this.y /= n;
|
|
703
|
+
}
|
|
704
|
+
distanceTo(v) {
|
|
705
|
+
return this.sub(v).length;
|
|
706
|
+
}
|
|
707
|
+
getLengthSq() {
|
|
708
|
+
return this.x ** 2 + this.y ** 2;
|
|
709
|
+
}
|
|
710
|
+
distanceToSq(v) {
|
|
711
|
+
return this.sub(v).getLengthSq();
|
|
712
|
+
}
|
|
713
|
+
manhattanDistanceTo(v) {
|
|
714
|
+
return Math.abs(v.x - this.x) + Math.abs(v.y - this.y);
|
|
715
|
+
}
|
|
716
|
+
copy() {
|
|
717
|
+
return Vector.clone(this);
|
|
718
|
+
}
|
|
719
|
+
setTo(v) {
|
|
720
|
+
this.x = v.x;
|
|
721
|
+
this.y = v.y;
|
|
722
|
+
}
|
|
723
|
+
rotate(angle) {
|
|
724
|
+
return Vector.create(this.x * Math.cos(angle) - this.y * Math.sin(angle), this.x * Math.sin(angle) + this.y * Math.cos(angle));
|
|
725
|
+
}
|
|
726
|
+
updateFromAngle(angle, length) {
|
|
727
|
+
this.x = Math.cos(angle) * length;
|
|
728
|
+
this.y = Math.sin(angle) * length;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
599
731
|
function clamp(num, min, max) {
|
|
600
732
|
return Math.min(Math.max(num, min), max);
|
|
601
733
|
}
|
|
@@ -630,16 +762,14 @@
|
|
|
630
762
|
} : setRangeValue(min, max);
|
|
631
763
|
}
|
|
632
764
|
function getValue(options) {
|
|
633
|
-
const random = options.random
|
|
634
|
-
const {enable: enable, minimumValue: minimumValue} = typeof random === "boolean" ? {
|
|
765
|
+
const random = options.random, {enable: enable, minimumValue: minimumValue} = typeof random === "boolean" ? {
|
|
635
766
|
enable: random,
|
|
636
767
|
minimumValue: 0
|
|
637
768
|
} : random;
|
|
638
769
|
return enable ? getRangeValue(setRangeValue(options.value, minimumValue)) : getRangeValue(options.value);
|
|
639
770
|
}
|
|
640
771
|
function getDistances(pointA, pointB) {
|
|
641
|
-
const dx = pointA.x - pointB.x;
|
|
642
|
-
const dy = pointA.y - pointB.y;
|
|
772
|
+
const dx = pointA.x - pointB.x, dy = pointA.y - pointB.y;
|
|
643
773
|
return {
|
|
644
774
|
dx: dx,
|
|
645
775
|
dy: dy,
|
|
@@ -715,8 +845,7 @@
|
|
|
715
845
|
|
|
716
846
|
case "ease-out-back":
|
|
717
847
|
{
|
|
718
|
-
const c1 = 1.70158;
|
|
719
|
-
const c3 = c1 + 1;
|
|
848
|
+
const c1 = 1.70158, c3 = c1 + 1;
|
|
720
849
|
return 1 + c3 * Math.pow(value - 1, 3) + c1 * Math.pow(value - 1, 2);
|
|
721
850
|
}
|
|
722
851
|
|
|
@@ -727,29 +856,72 @@
|
|
|
727
856
|
return value;
|
|
728
857
|
}
|
|
729
858
|
}
|
|
859
|
+
function calcPositionFromSize(data) {
|
|
860
|
+
var _a, _b;
|
|
861
|
+
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 ? {
|
|
862
|
+
x: data.position.x * data.size.width / 100,
|
|
863
|
+
y: data.position.y * data.size.height / 100
|
|
864
|
+
} : undefined;
|
|
865
|
+
}
|
|
866
|
+
function calcPositionOrRandomFromSize(data) {
|
|
867
|
+
var _a, _b, _c, _d;
|
|
868
|
+
return {
|
|
869
|
+
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,
|
|
870
|
+
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
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
function calcPositionOrRandomFromSizeRanged(data) {
|
|
874
|
+
var _a, _b;
|
|
875
|
+
const position = {
|
|
876
|
+
x: ((_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== undefined ? getRangeValue(data.position.x) : undefined,
|
|
877
|
+
y: ((_b = data.position) === null || _b === void 0 ? void 0 : _b.y) !== undefined ? getRangeValue(data.position.y) : undefined
|
|
878
|
+
};
|
|
879
|
+
return calcPositionOrRandomFromSize({
|
|
880
|
+
size: data.size,
|
|
881
|
+
position: position
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
function calcExactPositionOrRandomFromSize(data) {
|
|
885
|
+
var _a, _b, _c, _d;
|
|
886
|
+
return {
|
|
887
|
+
x: (_b = (_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : Math.random() * data.size.width,
|
|
888
|
+
y: (_d = (_c = data.position) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : Math.random() * data.size.height
|
|
889
|
+
};
|
|
890
|
+
}
|
|
891
|
+
function calcExactPositionOrRandomFromSizeRanged(data) {
|
|
892
|
+
var _a, _b;
|
|
893
|
+
const position = {
|
|
894
|
+
x: ((_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== undefined ? getRangeValue(data.position.x) : undefined,
|
|
895
|
+
y: ((_b = data.position) === null || _b === void 0 ? void 0 : _b.y) !== undefined ? getRangeValue(data.position.y) : undefined
|
|
896
|
+
};
|
|
897
|
+
return calcExactPositionOrRandomFromSize({
|
|
898
|
+
size: data.size,
|
|
899
|
+
position: position
|
|
900
|
+
});
|
|
901
|
+
}
|
|
730
902
|
function rectSideBounce(pSide, pOtherSide, rectSide, rectOtherSide, velocity, factor) {
|
|
731
903
|
const res = {
|
|
732
904
|
bounced: false
|
|
733
905
|
};
|
|
734
|
-
if (pOtherSide.min
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
906
|
+
if (pOtherSide.min < rectOtherSide.min || pOtherSide.min > rectOtherSide.max || pOtherSide.max < rectOtherSide.min || pOtherSide.max > rectOtherSide.max) {
|
|
907
|
+
return res;
|
|
908
|
+
}
|
|
909
|
+
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) {
|
|
910
|
+
res.velocity = velocity * -factor;
|
|
911
|
+
res.bounced = true;
|
|
739
912
|
}
|
|
740
913
|
return res;
|
|
741
914
|
}
|
|
742
915
|
function checkSelector(element, selectors) {
|
|
743
|
-
if (selectors instanceof Array) {
|
|
744
|
-
for (const selector of selectors) {
|
|
745
|
-
if (element.matches(selector)) {
|
|
746
|
-
return true;
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
return false;
|
|
750
|
-
} else {
|
|
916
|
+
if (!(selectors instanceof Array)) {
|
|
751
917
|
return element.matches(selectors);
|
|
752
918
|
}
|
|
919
|
+
for (const selector of selectors) {
|
|
920
|
+
if (element.matches(selector)) {
|
|
921
|
+
return true;
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
return false;
|
|
753
925
|
}
|
|
754
926
|
function isSsr() {
|
|
755
927
|
return typeof window === "undefined" || !window || typeof window.document === "undefined" || !window.document;
|
|
@@ -822,10 +994,7 @@
|
|
|
822
994
|
if (key === "__proto__") {
|
|
823
995
|
continue;
|
|
824
996
|
}
|
|
825
|
-
const sourceDict = source;
|
|
826
|
-
const value = sourceDict[key];
|
|
827
|
-
const isObject = typeof value === "object";
|
|
828
|
-
const destDict = destination;
|
|
997
|
+
const sourceDict = source, value = sourceDict[key], isObject = typeof value === "object", destDict = destination;
|
|
829
998
|
destDict[key] = isObject && Array.isArray(value) ? value.map((v => deepExtend(destDict[key], v))) : deepExtend(destDict[key], value);
|
|
830
999
|
}
|
|
831
1000
|
}
|
|
@@ -837,15 +1006,13 @@
|
|
|
837
1006
|
function divModeExecute(mode, divs, callback) {
|
|
838
1007
|
if (divs instanceof Array) {
|
|
839
1008
|
for (const div of divs) {
|
|
840
|
-
const divMode = div.mode;
|
|
841
|
-
const divEnabled = div.enable;
|
|
1009
|
+
const divMode = div.mode, divEnabled = div.enable;
|
|
842
1010
|
if (divEnabled && isInArray(mode, divMode)) {
|
|
843
1011
|
singleDivModeExecute(div, callback);
|
|
844
1012
|
}
|
|
845
1013
|
}
|
|
846
1014
|
} else {
|
|
847
|
-
const divMode = divs.mode;
|
|
848
|
-
const divEnabled = divs.enable;
|
|
1015
|
+
const divMode = divs.mode, divEnabled = divs.enable;
|
|
849
1016
|
if (divEnabled && isInArray(mode, divMode)) {
|
|
850
1017
|
singleDivModeExecute(divs, callback);
|
|
851
1018
|
}
|
|
@@ -881,29 +1048,18 @@
|
|
|
881
1048
|
};
|
|
882
1049
|
}
|
|
883
1050
|
function circleBounce(p1, p2) {
|
|
884
|
-
const {x: xVelocityDiff, y: yVelocityDiff} = p1.velocity.sub(p2.velocity);
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
if (xVelocityDiff * xDist + yVelocityDiff * yDist >= 0) {
|
|
888
|
-
const angle = -Math.atan2(yDist, xDist);
|
|
889
|
-
const m1 = p1.mass;
|
|
890
|
-
const m2 = p2.mass;
|
|
891
|
-
const u1 = p1.velocity.rotate(angle);
|
|
892
|
-
const u2 = p2.velocity.rotate(angle);
|
|
893
|
-
const v1 = collisionVelocity(u1, u2, m1, m2);
|
|
894
|
-
const v2 = collisionVelocity(u2, u1, m1, m2);
|
|
895
|
-
const vFinal1 = v1.rotate(-angle);
|
|
896
|
-
const vFinal2 = v2.rotate(-angle);
|
|
897
|
-
p1.velocity.x = vFinal1.x * p1.factor.x;
|
|
898
|
-
p1.velocity.y = vFinal1.y * p1.factor.y;
|
|
899
|
-
p2.velocity.x = vFinal2.x * p2.factor.x;
|
|
900
|
-
p2.velocity.y = vFinal2.y * p2.factor.y;
|
|
1051
|
+
const {x: xVelocityDiff, y: yVelocityDiff} = p1.velocity.sub(p2.velocity), [pos1, pos2] = [ p1.position, p2.position ], {dx: xDist, dy: yDist} = getDistances(pos2, pos1);
|
|
1052
|
+
if (xVelocityDiff * xDist + yVelocityDiff * yDist < 0) {
|
|
1053
|
+
return;
|
|
901
1054
|
}
|
|
1055
|
+
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);
|
|
1056
|
+
p1.velocity.x = vFinal1.x * p1.factor.x;
|
|
1057
|
+
p1.velocity.y = vFinal1.y * p1.factor.y;
|
|
1058
|
+
p2.velocity.x = vFinal2.x * p2.factor.x;
|
|
1059
|
+
p2.velocity.y = vFinal2.y * p2.factor.y;
|
|
902
1060
|
}
|
|
903
1061
|
function rectBounce(particle, divBounds) {
|
|
904
|
-
const pPos = particle.getPosition();
|
|
905
|
-
const size = particle.getRadius();
|
|
906
|
-
const bounds = calculateBounds(pPos, size);
|
|
1062
|
+
const pPos = particle.getPosition(), size = particle.getRadius(), bounds = calculateBounds(pPos, size);
|
|
907
1063
|
const resH = rectSideBounce({
|
|
908
1064
|
min: bounds.left,
|
|
909
1065
|
max: bounds.right
|
|
@@ -1017,11 +1173,7 @@
|
|
|
1017
1173
|
} : input;
|
|
1018
1174
|
let res;
|
|
1019
1175
|
if (typeof color.value === "string") {
|
|
1020
|
-
|
|
1021
|
-
res = getRandomRgbColor();
|
|
1022
|
-
} else {
|
|
1023
|
-
res = stringToRgb(color.value);
|
|
1024
|
-
}
|
|
1176
|
+
res = color.value === Constants.randomColorValue ? getRandomRgbColor() : stringToRgb(color.value);
|
|
1025
1177
|
} else {
|
|
1026
1178
|
if (color.value instanceof Array) {
|
|
1027
1179
|
const colorSelected = itemFromArray(color.value, index, useIndex);
|
|
@@ -1029,8 +1181,7 @@
|
|
|
1029
1181
|
value: colorSelected
|
|
1030
1182
|
});
|
|
1031
1183
|
} else {
|
|
1032
|
-
const colorValue = color.value;
|
|
1033
|
-
const rgbColor = (_a = colorValue.rgb) !== null && _a !== void 0 ? _a : color.value;
|
|
1184
|
+
const colorValue = color.value, rgbColor = (_a = colorValue.rgb) !== null && _a !== void 0 ? _a : color.value;
|
|
1034
1185
|
if (rgbColor.r !== undefined) {
|
|
1035
1186
|
res = rgbColor;
|
|
1036
1187
|
} else {
|
|
@@ -1053,17 +1204,14 @@
|
|
|
1053
1204
|
return rgb !== undefined ? rgbToHsl(rgb) : undefined;
|
|
1054
1205
|
}
|
|
1055
1206
|
function rgbToHsl(color) {
|
|
1056
|
-
const r1 = color.r / 255;
|
|
1057
|
-
const g1 =
|
|
1058
|
-
const b1 = color.b / 255;
|
|
1059
|
-
const max = Math.max(r1, g1, b1);
|
|
1060
|
-
const min = Math.min(r1, g1, b1);
|
|
1207
|
+
const r1 = color.r / 255, g1 = color.g / 255, b1 = color.b / 255;
|
|
1208
|
+
const max = Math.max(r1, g1, b1), min = Math.min(r1, g1, b1);
|
|
1061
1209
|
const res = {
|
|
1062
1210
|
h: 0,
|
|
1063
1211
|
l: (max + min) / 2,
|
|
1064
1212
|
s: 0
|
|
1065
1213
|
};
|
|
1066
|
-
if (max
|
|
1214
|
+
if (max !== min) {
|
|
1067
1215
|
res.s = res.l < .5 ? (max - min) / (max + min) : (max - min) / (2 - max - min);
|
|
1068
1216
|
res.h = r1 === max ? (g1 - b1) / (max - min) : res.h = g1 === max ? 2 + (b1 - r1) / (max - min) : 4 + (r1 - g1) / (max - min);
|
|
1069
1217
|
}
|
|
@@ -1087,8 +1235,7 @@
|
|
|
1087
1235
|
b: 0,
|
|
1088
1236
|
g: 0,
|
|
1089
1237
|
r: 0
|
|
1090
|
-
}
|
|
1091
|
-
const hslPercent = {
|
|
1238
|
+
}, hslPercent = {
|
|
1092
1239
|
h: hsl.h / 360,
|
|
1093
1240
|
l: hsl.l / 100,
|
|
1094
1241
|
s: hsl.s / 100
|
|
@@ -1098,8 +1245,7 @@
|
|
|
1098
1245
|
result.g = hslPercent.l;
|
|
1099
1246
|
result.r = hslPercent.l;
|
|
1100
1247
|
} else {
|
|
1101
|
-
const q = hslPercent.l < .5 ? hslPercent.l * (1 + hslPercent.s) : hslPercent.l + hslPercent.s - hslPercent.l * hslPercent.s;
|
|
1102
|
-
const p = 2 * hslPercent.l - q;
|
|
1248
|
+
const q = hslPercent.l < .5 ? hslPercent.l * (1 + hslPercent.s) : hslPercent.l + hslPercent.s - hslPercent.l * hslPercent.s, p = 2 * hslPercent.l - q;
|
|
1103
1249
|
result.r = hue2rgb(p, q, hslPercent.h + 1 / 3);
|
|
1104
1250
|
result.g = hue2rgb(p, q, hslPercent.h);
|
|
1105
1251
|
result.b = hue2rgb(p, q, hslPercent.h - 1 / 3);
|
|
@@ -1119,8 +1265,7 @@
|
|
|
1119
1265
|
};
|
|
1120
1266
|
}
|
|
1121
1267
|
function hslToHsv(hsl) {
|
|
1122
|
-
const l = hsl.l / 100, sl = hsl.s / 100;
|
|
1123
|
-
const v = l + sl * Math.min(l, 1 - l), sv = !v ? 0 : 2 * (1 - l / v);
|
|
1268
|
+
const l = hsl.l / 100, sl = hsl.s / 100, v = l + sl * Math.min(l, 1 - l), sv = !v ? 0 : 2 * (1 - l / v);
|
|
1124
1269
|
return {
|
|
1125
1270
|
h: hsl.h,
|
|
1126
1271
|
s: sv * 100,
|
|
@@ -1137,8 +1282,7 @@
|
|
|
1137
1282
|
};
|
|
1138
1283
|
}
|
|
1139
1284
|
function hsvToHsl(hsv) {
|
|
1140
|
-
const v = hsv.v / 100, sv = hsv.s / 100;
|
|
1141
|
-
const l = v * (1 - sv / 2), sl = l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l);
|
|
1285
|
+
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);
|
|
1142
1286
|
return {
|
|
1143
1287
|
h: hsv.h,
|
|
1144
1288
|
l: l * 100,
|
|
@@ -1159,8 +1303,7 @@
|
|
|
1159
1303
|
b: 0,
|
|
1160
1304
|
g: 0,
|
|
1161
1305
|
r: 0
|
|
1162
|
-
}
|
|
1163
|
-
const hsvPercent = {
|
|
1306
|
+
}, hsvPercent = {
|
|
1164
1307
|
h: hsv.h / 60,
|
|
1165
1308
|
s: hsv.s / 100,
|
|
1166
1309
|
v: hsv.v / 100
|
|
@@ -1269,8 +1412,7 @@
|
|
|
1269
1412
|
return getStyleFromHsl(hsvToHsl(color), opacity);
|
|
1270
1413
|
}
|
|
1271
1414
|
function colorMix(color1, color2, size1, size2) {
|
|
1272
|
-
let rgb1 = color1;
|
|
1273
|
-
let rgb2 = color2;
|
|
1415
|
+
let rgb1 = color1, rgb2 = color2;
|
|
1274
1416
|
if (rgb1.r === undefined) {
|
|
1275
1417
|
rgb1 = hslToRgb(color1);
|
|
1276
1418
|
}
|
|
@@ -1288,8 +1430,7 @@
|
|
|
1288
1430
|
if (linkColor === Constants.randomColorValue) {
|
|
1289
1431
|
return getRandomRgbColor();
|
|
1290
1432
|
} else if (linkColor === "mid") {
|
|
1291
|
-
const sourceColor = (_a = p1.getFillColor()) !== null && _a !== void 0 ? _a : p1.getStrokeColor();
|
|
1292
|
-
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();
|
|
1433
|
+
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();
|
|
1293
1434
|
if (sourceColor && destColor && p2) {
|
|
1294
1435
|
return colorMix(sourceColor, destColor, p1.getRadius(), p2.getRadius());
|
|
1295
1436
|
} else {
|
|
@@ -1393,13 +1534,11 @@
|
|
|
1393
1534
|
drawLine(context, begin, end);
|
|
1394
1535
|
drawn = true;
|
|
1395
1536
|
} else if (warp) {
|
|
1396
|
-
let pi1;
|
|
1397
|
-
let pi2;
|
|
1537
|
+
let pi1, pi2;
|
|
1398
1538
|
const endNE = {
|
|
1399
1539
|
x: end.x - canvasSize.width,
|
|
1400
1540
|
y: end.y
|
|
1401
|
-
};
|
|
1402
|
-
const d1 = getDistances(begin, endNE);
|
|
1541
|
+
}, d1 = getDistances(begin, endNE);
|
|
1403
1542
|
if (d1.distance <= maxDistance) {
|
|
1404
1543
|
const yi = begin.y - d1.dy / d1.dx * begin.x;
|
|
1405
1544
|
pi1 = {
|
|
@@ -1414,11 +1553,9 @@
|
|
|
1414
1553
|
const endSW = {
|
|
1415
1554
|
x: end.x,
|
|
1416
1555
|
y: end.y - canvasSize.height
|
|
1417
|
-
};
|
|
1418
|
-
const d2 = getDistances(begin, endSW);
|
|
1556
|
+
}, d2 = getDistances(begin, endSW);
|
|
1419
1557
|
if (d2.distance <= maxDistance) {
|
|
1420
|
-
const yi = begin.y - d2.dy / d2.dx * begin.x;
|
|
1421
|
-
const xi = -yi / (d2.dy / d2.dx);
|
|
1558
|
+
const yi = begin.y - d2.dy / d2.dx * begin.x, xi = -yi / (d2.dy / d2.dx);
|
|
1422
1559
|
pi1 = {
|
|
1423
1560
|
x: xi,
|
|
1424
1561
|
y: 0
|
|
@@ -1431,11 +1568,9 @@
|
|
|
1431
1568
|
const endSE = {
|
|
1432
1569
|
x: end.x - canvasSize.width,
|
|
1433
1570
|
y: end.y - canvasSize.height
|
|
1434
|
-
};
|
|
1435
|
-
const d3 = getDistances(begin, endSE);
|
|
1571
|
+
}, d3 = getDistances(begin, endSE);
|
|
1436
1572
|
if (d3.distance <= maxDistance) {
|
|
1437
|
-
const yi = begin.y - d3.dy / d3.dx * begin.x;
|
|
1438
|
-
const xi = -yi / (d3.dy / d3.dx);
|
|
1573
|
+
const yi = begin.y - d3.dy / d3.dx * begin.x, xi = -yi / (d3.dy / d3.dx);
|
|
1439
1574
|
pi1 = {
|
|
1440
1575
|
x: xi,
|
|
1441
1576
|
y: yi
|
|
@@ -1487,16 +1622,11 @@
|
|
|
1487
1622
|
context.restore();
|
|
1488
1623
|
}
|
|
1489
1624
|
function gradient(context, p1, p2, opacity) {
|
|
1490
|
-
const gradStop = Math.floor(p2.getRadius() / p1.getRadius());
|
|
1491
|
-
const color1 = p1.getFillColor();
|
|
1492
|
-
const color2 = p2.getFillColor();
|
|
1625
|
+
const gradStop = Math.floor(p2.getRadius() / p1.getRadius()), color1 = p1.getFillColor(), color2 = p2.getFillColor();
|
|
1493
1626
|
if (!color1 || !color2) {
|
|
1494
1627
|
return;
|
|
1495
1628
|
}
|
|
1496
|
-
const sourcePos = p1.getPosition();
|
|
1497
|
-
const destPos = p2.getPosition();
|
|
1498
|
-
const midRgb = colorMix(color1, color2, p1.getRadius(), p2.getRadius());
|
|
1499
|
-
const grad = context.createLinearGradient(sourcePos.x, sourcePos.y, destPos.x, destPos.y);
|
|
1629
|
+
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);
|
|
1500
1630
|
grad.addColorStop(0, getStyleFromHsl(color1, opacity));
|
|
1501
1631
|
grad.addColorStop(gradStop > 1 ? 1 : gradStop, getStyleFromRgb(midRgb, opacity));
|
|
1502
1632
|
grad.addColorStop(1, getStyleFromHsl(color2, opacity));
|
|
@@ -1510,17 +1640,12 @@
|
|
|
1510
1640
|
context.stroke();
|
|
1511
1641
|
context.restore();
|
|
1512
1642
|
}
|
|
1513
|
-
function drawParticle(container, context, particle, delta,
|
|
1514
|
-
var _a, _b, _c, _d
|
|
1515
|
-
const pos = particle.getPosition();
|
|
1516
|
-
const tiltOptions = particle.options.tilt;
|
|
1517
|
-
const rollOptions = particle.options.roll;
|
|
1643
|
+
function drawParticle(container, context, particle, delta, colorStyles, backgroundMask, composite, radius, opacity, shadow) {
|
|
1644
|
+
var _a, _b, _c, _d;
|
|
1645
|
+
const pos = particle.getPosition(), tiltOptions = particle.options.tilt, rollOptions = particle.options.roll;
|
|
1518
1646
|
context.save();
|
|
1519
1647
|
if (tiltOptions.enable || rollOptions.enable) {
|
|
1520
|
-
const roll = rollOptions.enable && particle.roll;
|
|
1521
|
-
const tilt = tiltOptions.enable && particle.tilt;
|
|
1522
|
-
const rollHorizontal = roll && (rollOptions.mode === "horizontal" || rollOptions.mode === "both");
|
|
1523
|
-
const rollVertical = roll && (rollOptions.mode === "vertical" || rollOptions.mode === "both");
|
|
1648
|
+
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");
|
|
1524
1649
|
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);
|
|
1525
1650
|
} else {
|
|
1526
1651
|
context.translate(pos.x, pos.y);
|
|
@@ -1540,29 +1665,16 @@
|
|
|
1540
1665
|
context.shadowOffsetX = shadow.offset.x;
|
|
1541
1666
|
context.shadowOffsetY = shadow.offset.y;
|
|
1542
1667
|
}
|
|
1543
|
-
if (
|
|
1544
|
-
|
|
1545
|
-
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);
|
|
1546
|
-
for (const color of gradient.colors) {
|
|
1547
|
-
fillGradient.addColorStop(color.stop, getStyleFromHsl({
|
|
1548
|
-
h: color.value.h.value,
|
|
1549
|
-
s: color.value.s.value,
|
|
1550
|
-
l: color.value.l.value
|
|
1551
|
-
}, (_d = (_c = color.opacity) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : opacity));
|
|
1552
|
-
}
|
|
1553
|
-
context.fillStyle = fillGradient;
|
|
1554
|
-
} else {
|
|
1555
|
-
if (fillColorValue) {
|
|
1556
|
-
context.fillStyle = fillColorValue;
|
|
1557
|
-
}
|
|
1668
|
+
if (colorStyles.fill) {
|
|
1669
|
+
context.fillStyle = colorStyles.fill;
|
|
1558
1670
|
}
|
|
1559
1671
|
const stroke = particle.stroke;
|
|
1560
|
-
context.lineWidth = (
|
|
1561
|
-
if (
|
|
1562
|
-
context.strokeStyle =
|
|
1672
|
+
context.lineWidth = (_c = particle.strokeWidth) !== null && _c !== void 0 ? _c : 0;
|
|
1673
|
+
if (colorStyles.stroke) {
|
|
1674
|
+
context.strokeStyle = colorStyles.stroke;
|
|
1563
1675
|
}
|
|
1564
1676
|
drawShape(container, context, particle, radius, opacity, delta);
|
|
1565
|
-
if (((
|
|
1677
|
+
if (((_d = stroke === null || stroke === void 0 ? void 0 : stroke.width) !== null && _d !== void 0 ? _d : 0) > 0) {
|
|
1566
1678
|
context.stroke();
|
|
1567
1679
|
}
|
|
1568
1680
|
if (particle.close) {
|
|
@@ -1616,20 +1728,21 @@
|
|
|
1616
1728
|
context.restore();
|
|
1617
1729
|
}
|
|
1618
1730
|
function drawParticlePlugin(context, plugin, particle, delta) {
|
|
1619
|
-
if (plugin.drawParticle
|
|
1620
|
-
|
|
1621
|
-
plugin.drawParticle(context, particle, delta);
|
|
1622
|
-
context.restore();
|
|
1731
|
+
if (!plugin.drawParticle) {
|
|
1732
|
+
return;
|
|
1623
1733
|
}
|
|
1734
|
+
context.save();
|
|
1735
|
+
plugin.drawParticle(context, particle, delta);
|
|
1736
|
+
context.restore();
|
|
1624
1737
|
}
|
|
1625
1738
|
function drawEllipse(context, particle, fillColorValue, radius, opacity, width, rotation, start, end) {
|
|
1739
|
+
if (width <= 0) {
|
|
1740
|
+
return;
|
|
1741
|
+
}
|
|
1626
1742
|
const pos = particle.getPosition();
|
|
1627
1743
|
if (fillColorValue) {
|
|
1628
1744
|
context.strokeStyle = getStyleFromHsl(fillColorValue, opacity);
|
|
1629
1745
|
}
|
|
1630
|
-
if (width === 0) {
|
|
1631
|
-
return;
|
|
1632
|
-
}
|
|
1633
1746
|
context.lineWidth = width;
|
|
1634
1747
|
const rotationRadian = rotation * Math.PI / 180;
|
|
1635
1748
|
context.beginPath();
|
|
@@ -1643,151 +1756,293 @@
|
|
|
1643
1756
|
l: color.l + (type === "darken" ? -1 : 1) * value
|
|
1644
1757
|
};
|
|
1645
1758
|
}
|
|
1646
|
-
class
|
|
1647
|
-
constructor(
|
|
1648
|
-
this.
|
|
1649
|
-
|
|
1650
|
-
|
|
1759
|
+
class Canvas {
|
|
1760
|
+
constructor(container) {
|
|
1761
|
+
this.container = container;
|
|
1762
|
+
this.size = {
|
|
1763
|
+
height: 0,
|
|
1764
|
+
width: 0
|
|
1651
1765
|
};
|
|
1766
|
+
this.context = null;
|
|
1767
|
+
this.generatedCanvas = false;
|
|
1652
1768
|
}
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
this.
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
return getDistance(point, this.position) <= this.radius;
|
|
1769
|
+
init() {
|
|
1770
|
+
this.resize();
|
|
1771
|
+
this.initStyle();
|
|
1772
|
+
this.initCover();
|
|
1773
|
+
this.initTrail();
|
|
1774
|
+
this.initBackground();
|
|
1775
|
+
this.paint();
|
|
1661
1776
|
}
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
const pos2 = range.position;
|
|
1667
|
-
const xDist = Math.abs(pos2.x - pos1.x);
|
|
1668
|
-
const yDist = Math.abs(pos2.y - pos1.y);
|
|
1669
|
-
const r = this.radius;
|
|
1670
|
-
if (circle.radius !== undefined) {
|
|
1671
|
-
const rSum = r + circle.radius;
|
|
1672
|
-
const dist = Math.sqrt(xDist * xDist + yDist + yDist);
|
|
1673
|
-
return rSum > dist;
|
|
1674
|
-
} else if (rect.size !== undefined) {
|
|
1675
|
-
const w = rect.size.width;
|
|
1676
|
-
const h = rect.size.height;
|
|
1677
|
-
const edges = Math.pow(xDist - w, 2) + Math.pow(yDist - h, 2);
|
|
1678
|
-
if (xDist > r + w || yDist > r + h) {
|
|
1679
|
-
return false;
|
|
1680
|
-
}
|
|
1681
|
-
if (xDist <= w || yDist <= h) {
|
|
1682
|
-
return true;
|
|
1683
|
-
}
|
|
1684
|
-
return edges <= r * r;
|
|
1777
|
+
loadCanvas(canvas) {
|
|
1778
|
+
var _a;
|
|
1779
|
+
if (this.generatedCanvas) {
|
|
1780
|
+
(_a = this.element) === null || _a === void 0 ? void 0 : _a.remove();
|
|
1685
1781
|
}
|
|
1686
|
-
|
|
1782
|
+
this.generatedCanvas = canvas.dataset && Constants.generatedAttribute in canvas.dataset ? canvas.dataset[Constants.generatedAttribute] === "true" : this.generatedCanvas;
|
|
1783
|
+
this.element = canvas;
|
|
1784
|
+
this.originalStyle = deepExtend({}, this.element.style);
|
|
1785
|
+
this.size.height = canvas.offsetHeight;
|
|
1786
|
+
this.size.width = canvas.offsetWidth;
|
|
1787
|
+
this.context = this.element.getContext("2d");
|
|
1788
|
+
this.container.retina.init();
|
|
1789
|
+
this.initBackground();
|
|
1687
1790
|
}
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
};
|
|
1791
|
+
destroy() {
|
|
1792
|
+
var _a;
|
|
1793
|
+
if (this.generatedCanvas) {
|
|
1794
|
+
(_a = this.element) === null || _a === void 0 ? void 0 : _a.remove();
|
|
1795
|
+
}
|
|
1796
|
+
this.draw((ctx => {
|
|
1797
|
+
clear(ctx, this.size);
|
|
1798
|
+
}));
|
|
1696
1799
|
}
|
|
1697
|
-
|
|
1698
|
-
const
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1800
|
+
paint() {
|
|
1801
|
+
const options = this.container.actualOptions;
|
|
1802
|
+
this.draw((ctx => {
|
|
1803
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
1804
|
+
clear(ctx, this.size);
|
|
1805
|
+
this.paintBase(this.coverColorStyle);
|
|
1806
|
+
} else {
|
|
1807
|
+
this.paintBase();
|
|
1808
|
+
}
|
|
1809
|
+
}));
|
|
1702
1810
|
}
|
|
1703
|
-
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
const size2 = rect.size;
|
|
1714
|
-
const w2 = size2.width;
|
|
1715
|
-
const h2 = size2.height;
|
|
1716
|
-
return pos2.x < pos1.x + w && pos2.x + w2 > pos1.x && pos2.y < pos1.y + h && pos2.y + h2 > pos1.y;
|
|
1811
|
+
clear() {
|
|
1812
|
+
const options = this.container.actualOptions, trail = options.particles.move.trail;
|
|
1813
|
+
if (options.backgroundMask.enable) {
|
|
1814
|
+
this.paint();
|
|
1815
|
+
} else if (trail.enable && trail.length > 0 && this.trailFillColor) {
|
|
1816
|
+
this.paintBase(getStyleFromRgb(this.trailFillColor, 1 / trail.length));
|
|
1817
|
+
} else {
|
|
1818
|
+
this.draw((ctx => {
|
|
1819
|
+
clear(ctx, this.size);
|
|
1820
|
+
}));
|
|
1717
1821
|
}
|
|
1718
|
-
return false;
|
|
1719
1822
|
}
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
this.
|
|
1725
|
-
this.
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1823
|
+
async windowResize() {
|
|
1824
|
+
if (!this.element) {
|
|
1825
|
+
return;
|
|
1826
|
+
}
|
|
1827
|
+
this.resize();
|
|
1828
|
+
const container = this.container, needsRefresh = container.updateActualOptions();
|
|
1829
|
+
container.particles.setDensity();
|
|
1830
|
+
for (const [, plugin] of container.plugins) {
|
|
1831
|
+
if (plugin.resize !== undefined) {
|
|
1832
|
+
plugin.resize();
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
if (needsRefresh) {
|
|
1836
|
+
await container.refresh();
|
|
1837
|
+
}
|
|
1729
1838
|
}
|
|
1730
|
-
|
|
1731
|
-
if (
|
|
1732
|
-
return
|
|
1839
|
+
resize() {
|
|
1840
|
+
if (!this.element) {
|
|
1841
|
+
return;
|
|
1733
1842
|
}
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1736
|
-
|
|
1843
|
+
const container = this.container, pxRatio = container.retina.pixelRatio, size = container.canvas.size, newSize = {
|
|
1844
|
+
width: this.element.offsetWidth * pxRatio,
|
|
1845
|
+
height: this.element.offsetHeight * pxRatio
|
|
1737
1846
|
};
|
|
1738
|
-
if (
|
|
1739
|
-
return
|
|
1847
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
1848
|
+
return;
|
|
1740
1849
|
}
|
|
1741
|
-
const
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1850
|
+
const oldSize = Object.assign({}, size);
|
|
1851
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
1852
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
1853
|
+
if (this.container.started) {
|
|
1854
|
+
this.resizeFactor = {
|
|
1855
|
+
width: size.width / oldSize.width,
|
|
1856
|
+
height: size.height / oldSize.height
|
|
1857
|
+
};
|
|
1747
1858
|
}
|
|
1748
|
-
const posSW = {
|
|
1749
|
-
x: point.x,
|
|
1750
|
-
y: point.y - this.canvasSize.height
|
|
1751
|
-
};
|
|
1752
|
-
return super.contains(posSW);
|
|
1753
1859
|
}
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1860
|
+
drawConnectLine(p1, p2) {
|
|
1861
|
+
this.draw((ctx => {
|
|
1862
|
+
var _a;
|
|
1863
|
+
const lineStyle = this.lineStyle(p1, p2);
|
|
1864
|
+
if (!lineStyle) {
|
|
1865
|
+
return;
|
|
1866
|
+
}
|
|
1867
|
+
const pos1 = p1.getPosition(), pos2 = p2.getPosition();
|
|
1868
|
+
drawConnectLine(ctx, (_a = p1.retina.linksWidth) !== null && _a !== void 0 ? _a : this.container.retina.linksWidth, lineStyle, pos1, pos2);
|
|
1869
|
+
}));
|
|
1870
|
+
}
|
|
1871
|
+
drawGrabLine(particle, lineColor, opacity, mousePos) {
|
|
1872
|
+
const container = this.container;
|
|
1873
|
+
this.draw((ctx => {
|
|
1874
|
+
var _a;
|
|
1875
|
+
const beginPos = particle.getPosition();
|
|
1876
|
+
drawGrabLine(ctx, (_a = particle.retina.linksWidth) !== null && _a !== void 0 ? _a : container.retina.linksWidth, beginPos, mousePos, lineColor, opacity);
|
|
1877
|
+
}));
|
|
1878
|
+
}
|
|
1879
|
+
drawParticle(particle, delta) {
|
|
1880
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1881
|
+
if (particle.spawning || particle.destroyed) {
|
|
1882
|
+
return;
|
|
1757
1883
|
}
|
|
1758
|
-
const
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1884
|
+
const radius = particle.getRadius();
|
|
1885
|
+
if (radius <= 0) {
|
|
1886
|
+
return;
|
|
1887
|
+
}
|
|
1888
|
+
const pfColor = particle.getFillColor(), psColor = (_a = particle.getStrokeColor()) !== null && _a !== void 0 ? _a : pfColor;
|
|
1889
|
+
if (!pfColor && !psColor) {
|
|
1890
|
+
return;
|
|
1891
|
+
}
|
|
1892
|
+
let [fColor, sColor] = this.getPluginParticleColors(particle);
|
|
1893
|
+
if (!fColor || !sColor) {
|
|
1894
|
+
if (!fColor) {
|
|
1895
|
+
fColor = pfColor ? pfColor : undefined;
|
|
1896
|
+
}
|
|
1897
|
+
if (!sColor) {
|
|
1898
|
+
sColor = psColor ? psColor : undefined;
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
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;
|
|
1902
|
+
const colorStyles = {
|
|
1903
|
+
fill: fColor ? getStyleFromHsl(fColor, zOpacity) : undefined
|
|
1763
1904
|
};
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1905
|
+
colorStyles.stroke = sColor ? getStyleFromHsl(sColor, zStrokeOpacity) : colorStyles.fill;
|
|
1906
|
+
this.draw((ctx => {
|
|
1907
|
+
const zSizeFactor = (1 - particle.zIndexFactor) ** zIndexOptions.sizeRate, container = this.container;
|
|
1908
|
+
for (const updater of container.particles.updaters) {
|
|
1909
|
+
if (updater.beforeDraw) {
|
|
1910
|
+
updater.beforeDraw(particle);
|
|
1911
|
+
}
|
|
1912
|
+
if (updater.getColorStyles) {
|
|
1913
|
+
const {fill: fill, stroke: stroke} = updater.getColorStyles(particle, ctx, radius, zOpacity);
|
|
1914
|
+
if (fill) {
|
|
1915
|
+
colorStyles.fill = fill;
|
|
1916
|
+
}
|
|
1917
|
+
if (stroke) {
|
|
1918
|
+
colorStyles.stroke = stroke;
|
|
1919
|
+
}
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
drawParticle(container, ctx, particle, delta, colorStyles, options.backgroundMask.enable, options.backgroundMask.composite, radius * zSizeFactor, zOpacity, particle.options.shadow);
|
|
1923
|
+
for (const updater of container.particles.updaters) {
|
|
1924
|
+
if (updater.afterDraw) {
|
|
1925
|
+
updater.afterDraw(particle);
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
}));
|
|
1929
|
+
}
|
|
1930
|
+
drawPlugin(plugin, delta) {
|
|
1931
|
+
this.draw((ctx => {
|
|
1932
|
+
drawPlugin(ctx, plugin, delta);
|
|
1933
|
+
}));
|
|
1934
|
+
}
|
|
1935
|
+
drawParticlePlugin(plugin, particle, delta) {
|
|
1936
|
+
this.draw((ctx => {
|
|
1937
|
+
drawParticlePlugin(ctx, plugin, particle, delta);
|
|
1938
|
+
}));
|
|
1939
|
+
}
|
|
1940
|
+
initBackground() {
|
|
1941
|
+
const options = this.container.actualOptions, background = options.background, element = this.element, elementStyle = element === null || element === void 0 ? void 0 : element.style;
|
|
1942
|
+
if (!elementStyle) {
|
|
1943
|
+
return;
|
|
1770
1944
|
}
|
|
1771
|
-
|
|
1945
|
+
if (background.color) {
|
|
1946
|
+
const color = colorToRgb(background.color);
|
|
1947
|
+
elementStyle.backgroundColor = color ? getStyleFromRgb(color, background.opacity) : "";
|
|
1948
|
+
} else {
|
|
1949
|
+
elementStyle.backgroundColor = "";
|
|
1950
|
+
}
|
|
1951
|
+
elementStyle.backgroundImage = background.image || "";
|
|
1952
|
+
elementStyle.backgroundPosition = background.position || "";
|
|
1953
|
+
elementStyle.backgroundRepeat = background.repeat || "";
|
|
1954
|
+
elementStyle.backgroundSize = background.size || "";
|
|
1955
|
+
}
|
|
1956
|
+
draw(cb) {
|
|
1957
|
+
if (!this.context) {
|
|
1958
|
+
return;
|
|
1959
|
+
}
|
|
1960
|
+
return cb(this.context);
|
|
1961
|
+
}
|
|
1962
|
+
initCover() {
|
|
1963
|
+
const options = this.container.actualOptions, cover = options.backgroundMask.cover, color = cover.color, coverRgb = colorToRgb(color);
|
|
1964
|
+
if (coverRgb) {
|
|
1965
|
+
const coverColor = {
|
|
1966
|
+
r: coverRgb.r,
|
|
1967
|
+
g: coverRgb.g,
|
|
1968
|
+
b: coverRgb.b,
|
|
1969
|
+
a: cover.opacity
|
|
1970
|
+
};
|
|
1971
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
initTrail() {
|
|
1975
|
+
const options = this.container.actualOptions, trail = options.particles.move.trail, fillColor = colorToRgb(trail.fillColor);
|
|
1976
|
+
if (fillColor) {
|
|
1977
|
+
const trail = options.particles.move.trail;
|
|
1978
|
+
this.trailFillColor = {
|
|
1979
|
+
r: fillColor.r,
|
|
1980
|
+
g: fillColor.g,
|
|
1981
|
+
b: fillColor.b,
|
|
1982
|
+
a: 1 / trail.length
|
|
1983
|
+
};
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
getPluginParticleColors(particle) {
|
|
1987
|
+
let fColor, sColor;
|
|
1988
|
+
for (const [, plugin] of this.container.plugins) {
|
|
1989
|
+
if (!fColor && plugin.particleFillColor) {
|
|
1990
|
+
fColor = colorToHsl(plugin.particleFillColor(particle));
|
|
1991
|
+
}
|
|
1992
|
+
if (!sColor && plugin.particleStrokeColor) {
|
|
1993
|
+
sColor = colorToHsl(plugin.particleStrokeColor(particle));
|
|
1994
|
+
}
|
|
1995
|
+
if (fColor && sColor) {
|
|
1996
|
+
break;
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
return [ fColor, sColor ];
|
|
2000
|
+
}
|
|
2001
|
+
initStyle() {
|
|
2002
|
+
const element = this.element, options = this.container.actualOptions;
|
|
2003
|
+
if (!element) {
|
|
2004
|
+
return;
|
|
2005
|
+
}
|
|
2006
|
+
const originalStyle = this.originalStyle;
|
|
2007
|
+
if (options.fullScreen.enable) {
|
|
2008
|
+
this.originalStyle = deepExtend({}, element.style);
|
|
2009
|
+
element.style.setProperty("position", "fixed", "important");
|
|
2010
|
+
element.style.setProperty("z-index", options.fullScreen.zIndex.toString(10), "important");
|
|
2011
|
+
element.style.setProperty("top", "0", "important");
|
|
2012
|
+
element.style.setProperty("left", "0", "important");
|
|
2013
|
+
element.style.setProperty("width", "100%", "important");
|
|
2014
|
+
element.style.setProperty("height", "100%", "important");
|
|
2015
|
+
} else if (originalStyle) {
|
|
2016
|
+
element.style.position = originalStyle.position;
|
|
2017
|
+
element.style.zIndex = originalStyle.zIndex;
|
|
2018
|
+
element.style.top = originalStyle.top;
|
|
2019
|
+
element.style.left = originalStyle.left;
|
|
2020
|
+
element.style.width = originalStyle.width;
|
|
2021
|
+
element.style.height = originalStyle.height;
|
|
2022
|
+
}
|
|
2023
|
+
for (const key in options.style) {
|
|
2024
|
+
if (!key || !options.style) {
|
|
2025
|
+
continue;
|
|
2026
|
+
}
|
|
2027
|
+
const value = options.style[key];
|
|
2028
|
+
if (!value) {
|
|
2029
|
+
continue;
|
|
2030
|
+
}
|
|
2031
|
+
element.style.setProperty(key, value, "important");
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
paintBase(baseColor) {
|
|
2035
|
+
this.draw((ctx => {
|
|
2036
|
+
paintBase(ctx, this.size, baseColor);
|
|
2037
|
+
}));
|
|
2038
|
+
}
|
|
2039
|
+
lineStyle(p1, p2) {
|
|
2040
|
+
return this.draw((ctx => {
|
|
2041
|
+
const options = this.container.actualOptions, connectOptions = options.interactivity.modes.connect;
|
|
2042
|
+
return gradient(ctx, p1, p2, connectOptions.links.opacity);
|
|
2043
|
+
}));
|
|
1772
2044
|
}
|
|
1773
2045
|
}
|
|
1774
|
-
class Constants {}
|
|
1775
|
-
Constants.generatedAttribute = "generated";
|
|
1776
|
-
Constants.randomColorValue = "random";
|
|
1777
|
-
Constants.midColorValue = "mid";
|
|
1778
|
-
Constants.touchEndEvent = "touchend";
|
|
1779
|
-
Constants.mouseDownEvent = "mousedown";
|
|
1780
|
-
Constants.mouseUpEvent = "mouseup";
|
|
1781
|
-
Constants.mouseMoveEvent = "mousemove";
|
|
1782
|
-
Constants.touchStartEvent = "touchstart";
|
|
1783
|
-
Constants.touchMoveEvent = "touchmove";
|
|
1784
|
-
Constants.mouseLeaveEvent = "mouseleave";
|
|
1785
|
-
Constants.mouseOutEvent = "mouseout";
|
|
1786
|
-
Constants.touchCancelEvent = "touchcancel";
|
|
1787
|
-
Constants.resizeEvent = "resize";
|
|
1788
|
-
Constants.visibilityChangeEvent = "visibilitychange";
|
|
1789
|
-
Constants.noPolygonDataLoaded = "No polygon data loaded.";
|
|
1790
|
-
Constants.noPolygonFound = "No polygon found, you need to specify SVG url in config.";
|
|
1791
2046
|
function manageListener(element, event, handler, add, options) {
|
|
1792
2047
|
if (add) {
|
|
1793
2048
|
let addOptions = {
|
|
@@ -1830,9 +2085,7 @@
|
|
|
1830
2085
|
}
|
|
1831
2086
|
manageListeners(add) {
|
|
1832
2087
|
var _a;
|
|
1833
|
-
const container = this.container;
|
|
1834
|
-
const options = container.actualOptions;
|
|
1835
|
-
const detectType = options.interactivity.detectsOn;
|
|
2088
|
+
const container = this.container, options = container.actualOptions, detectType = options.interactivity.detectsOn;
|
|
1836
2089
|
let mouseLeaveEvent = Constants.mouseLeaveEvent;
|
|
1837
2090
|
if (detectType === "window") {
|
|
1838
2091
|
container.interactivity.element = window;
|
|
@@ -1914,8 +2167,7 @@
|
|
|
1914
2167
|
}), 500);
|
|
1915
2168
|
}
|
|
1916
2169
|
handleVisibilityChange() {
|
|
1917
|
-
const container = this.container;
|
|
1918
|
-
const options = container.actualOptions;
|
|
2170
|
+
const container = this.container, options = container.actualOptions;
|
|
1919
2171
|
this.mouseTouchFinish();
|
|
1920
2172
|
if (!options.pauseOnBlur) {
|
|
1921
2173
|
return;
|
|
@@ -1942,9 +2194,8 @@
|
|
|
1942
2194
|
}
|
|
1943
2195
|
mouseTouchMove(e) {
|
|
1944
2196
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
1945
|
-
const container = this.container;
|
|
1946
|
-
|
|
1947
|
-
if (((_a = container.interactivity) === null || _a === void 0 ? void 0 : _a.element) === undefined) {
|
|
2197
|
+
const container = this.container, options = container.actualOptions;
|
|
2198
|
+
if (!((_a = container.interactivity) === null || _a === void 0 ? void 0 : _a.element)) {
|
|
1948
2199
|
return;
|
|
1949
2200
|
}
|
|
1950
2201
|
container.interactivity.mouse.inside = true;
|
|
@@ -2003,1041 +2254,113 @@
|
|
|
2003
2254
|
pos.y *= pxRatio;
|
|
2004
2255
|
}
|
|
2005
2256
|
container.interactivity.mouse.position = pos;
|
|
2006
|
-
container.interactivity.status = Constants.mouseMoveEvent;
|
|
2007
|
-
}
|
|
2008
|
-
mouseTouchFinish() {
|
|
2009
|
-
const interactivity = this.container.interactivity;
|
|
2010
|
-
if (interactivity === undefined) {
|
|
2011
|
-
return;
|
|
2012
|
-
}
|
|
2013
|
-
const mouse = interactivity.mouse;
|
|
2014
|
-
delete mouse.position;
|
|
2015
|
-
delete mouse.clickPosition;
|
|
2016
|
-
delete mouse.downPosition;
|
|
2017
|
-
interactivity.status = Constants.mouseLeaveEvent;
|
|
2018
|
-
mouse.inside = false;
|
|
2019
|
-
mouse.clicking = false;
|
|
2020
|
-
}
|
|
2021
|
-
mouseTouchClick(e) {
|
|
2022
|
-
const container = this.container;
|
|
2023
|
-
const options = container.actualOptions;
|
|
2024
|
-
const mouse = container.interactivity.mouse;
|
|
2025
|
-
mouse.inside = true;
|
|
2026
|
-
let handled = false;
|
|
2027
|
-
const mousePosition = mouse.position;
|
|
2028
|
-
if (mousePosition === undefined || !options.interactivity.events.onClick.enable) {
|
|
2029
|
-
return;
|
|
2030
|
-
}
|
|
2031
|
-
for (const [, plugin] of container.plugins) {
|
|
2032
|
-
if (plugin.clickPositionValid !== undefined) {
|
|
2033
|
-
handled = plugin.clickPositionValid(mousePosition);
|
|
2034
|
-
if (handled) {
|
|
2035
|
-
break;
|
|
2036
|
-
}
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
|
-
if (!handled) {
|
|
2040
|
-
this.doMouseTouchClick(e);
|
|
2041
|
-
}
|
|
2042
|
-
mouse.clicking = false;
|
|
2043
|
-
}
|
|
2044
|
-
doMouseTouchClick(e) {
|
|
2045
|
-
const container = this.container;
|
|
2046
|
-
const options = container.actualOptions;
|
|
2047
|
-
if (this.canPush) {
|
|
2048
|
-
const mousePos = container.interactivity.mouse.position;
|
|
2049
|
-
if (mousePos) {
|
|
2050
|
-
container.interactivity.mouse.clickPosition = {
|
|
2051
|
-
x: mousePos.x,
|
|
2052
|
-
y: mousePos.y
|
|
2053
|
-
};
|
|
2054
|
-
} else {
|
|
2055
|
-
return;
|
|
2056
|
-
}
|
|
2057
|
-
container.interactivity.mouse.clickTime = (new Date).getTime();
|
|
2058
|
-
const onClick = options.interactivity.events.onClick;
|
|
2059
|
-
if (onClick.mode instanceof Array) {
|
|
2060
|
-
for (const mode of onClick.mode) {
|
|
2061
|
-
this.handleClickMode(mode);
|
|
2062
|
-
}
|
|
2063
|
-
} else {
|
|
2064
|
-
this.handleClickMode(onClick.mode);
|
|
2065
|
-
}
|
|
2066
|
-
}
|
|
2067
|
-
if (e.type === "touchend") {
|
|
2068
|
-
setTimeout((() => this.mouseTouchFinish()), 500);
|
|
2069
|
-
}
|
|
2070
|
-
}
|
|
2071
|
-
handleThemeChange(e) {
|
|
2072
|
-
const mediaEvent = e;
|
|
2073
|
-
const themeName = mediaEvent.matches ? this.container.options.defaultDarkTheme : this.container.options.defaultLightTheme;
|
|
2074
|
-
const theme = this.container.options.themes.find((theme => theme.name === themeName));
|
|
2075
|
-
if (theme && theme.default.auto) {
|
|
2076
|
-
this.container.loadTheme(themeName);
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
handleClickMode(mode) {
|
|
2080
|
-
const container = this.container;
|
|
2081
|
-
const options = container.actualOptions;
|
|
2082
|
-
const pushNb = options.interactivity.modes.push.quantity;
|
|
2083
|
-
const removeNb = options.interactivity.modes.remove.quantity;
|
|
2084
|
-
switch (mode) {
|
|
2085
|
-
case "push":
|
|
2086
|
-
{
|
|
2087
|
-
if (pushNb > 0) {
|
|
2088
|
-
const pushOptions = options.interactivity.modes.push;
|
|
2089
|
-
const group = itemFromArray([ undefined, ...pushOptions.groups ]);
|
|
2090
|
-
const groupOptions = group !== undefined ? container.actualOptions.particles.groups[group] : undefined;
|
|
2091
|
-
container.particles.push(pushNb, container.interactivity.mouse, groupOptions, group);
|
|
2092
|
-
}
|
|
2093
|
-
break;
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
case "remove":
|
|
2097
|
-
container.particles.removeQuantity(removeNb);
|
|
2098
|
-
break;
|
|
2099
|
-
|
|
2100
|
-
case "bubble":
|
|
2101
|
-
container.bubble.clicking = true;
|
|
2102
|
-
break;
|
|
2103
|
-
|
|
2104
|
-
case "repulse":
|
|
2105
|
-
container.repulse.clicking = true;
|
|
2106
|
-
container.repulse.count = 0;
|
|
2107
|
-
for (const particle of container.repulse.particles) {
|
|
2108
|
-
particle.velocity.setTo(particle.initialVelocity);
|
|
2109
|
-
}
|
|
2110
|
-
container.repulse.particles = [];
|
|
2111
|
-
container.repulse.finish = false;
|
|
2112
|
-
setTimeout((() => {
|
|
2113
|
-
if (!container.destroyed) {
|
|
2114
|
-
container.repulse.clicking = false;
|
|
2115
|
-
}
|
|
2116
|
-
}), options.interactivity.modes.repulse.duration * 1e3);
|
|
2117
|
-
break;
|
|
2118
|
-
|
|
2119
|
-
case "attract":
|
|
2120
|
-
container.attract.clicking = true;
|
|
2121
|
-
container.attract.count = 0;
|
|
2122
|
-
for (const particle of container.attract.particles) {
|
|
2123
|
-
particle.velocity.setTo(particle.initialVelocity);
|
|
2124
|
-
}
|
|
2125
|
-
container.attract.particles = [];
|
|
2126
|
-
container.attract.finish = false;
|
|
2127
|
-
setTimeout((() => {
|
|
2128
|
-
if (!container.destroyed) {
|
|
2129
|
-
container.attract.clicking = false;
|
|
2130
|
-
}
|
|
2131
|
-
}), options.interactivity.modes.attract.duration * 1e3);
|
|
2132
|
-
break;
|
|
2133
|
-
|
|
2134
|
-
case "pause":
|
|
2135
|
-
if (container.getAnimationStatus()) {
|
|
2136
|
-
container.pause();
|
|
2137
|
-
} else {
|
|
2138
|
-
container.play();
|
|
2139
|
-
}
|
|
2140
|
-
break;
|
|
2141
|
-
}
|
|
2142
|
-
for (const [, plugin] of container.plugins) {
|
|
2143
|
-
if (plugin.handleClickMode) {
|
|
2144
|
-
plugin.handleClickMode(mode);
|
|
2145
|
-
}
|
|
2146
|
-
}
|
|
2147
|
-
}
|
|
2148
|
-
}
|
|
2149
|
-
class ExternalInteractorBase {
|
|
2150
|
-
constructor(container) {
|
|
2151
|
-
this.container = container;
|
|
2152
|
-
this.type = 0;
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
|
-
class FrameManager {
|
|
2156
|
-
constructor(container) {
|
|
2157
|
-
this.container = container;
|
|
2158
|
-
}
|
|
2159
|
-
async nextFrame(timestamp) {
|
|
2160
|
-
var _a;
|
|
2161
|
-
try {
|
|
2162
|
-
const container = this.container;
|
|
2163
|
-
if (container.lastFrameTime !== undefined && timestamp < container.lastFrameTime + 1e3 / container.fpsLimit) {
|
|
2164
|
-
container.draw(false);
|
|
2165
|
-
return;
|
|
2166
|
-
}
|
|
2167
|
-
(_a = container.lastFrameTime) !== null && _a !== void 0 ? _a : container.lastFrameTime = timestamp;
|
|
2168
|
-
const deltaValue = timestamp - container.lastFrameTime;
|
|
2169
|
-
const delta = {
|
|
2170
|
-
value: deltaValue,
|
|
2171
|
-
factor: 60 * deltaValue / 1e3
|
|
2172
|
-
};
|
|
2173
|
-
container.lifeTime += delta.value;
|
|
2174
|
-
container.lastFrameTime = timestamp;
|
|
2175
|
-
if (deltaValue > 1e3) {
|
|
2176
|
-
container.draw(false);
|
|
2177
|
-
return;
|
|
2178
|
-
}
|
|
2179
|
-
await container.particles.draw(delta);
|
|
2180
|
-
if (container.duration > 0 && container.lifeTime > container.duration) {
|
|
2181
|
-
container.destroy();
|
|
2182
|
-
return;
|
|
2183
|
-
}
|
|
2184
|
-
if (container.getAnimationStatus()) {
|
|
2185
|
-
container.draw(false);
|
|
2186
|
-
}
|
|
2187
|
-
} catch (e) {
|
|
2188
|
-
console.error("tsParticles error in animation loop", e);
|
|
2189
|
-
}
|
|
2190
|
-
}
|
|
2191
|
-
}
|
|
2192
|
-
var __classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
2193
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
2194
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
2195
|
-
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");
|
|
2196
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
2197
|
-
value;
|
|
2198
|
-
};
|
|
2199
|
-
var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
2200
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
2201
|
-
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");
|
|
2202
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
2203
|
-
};
|
|
2204
|
-
var _InteractionManager_engine;
|
|
2205
|
-
class InteractionManager {
|
|
2206
|
-
constructor(engine, container) {
|
|
2207
|
-
this.container = container;
|
|
2208
|
-
_InteractionManager_engine.set(this, void 0);
|
|
2209
|
-
__classPrivateFieldSet(this, _InteractionManager_engine, engine, "f");
|
|
2210
|
-
this.externalInteractors = [];
|
|
2211
|
-
this.particleInteractors = [];
|
|
2212
|
-
this.init();
|
|
2213
|
-
}
|
|
2214
|
-
init() {
|
|
2215
|
-
const interactors = __classPrivateFieldGet(this, _InteractionManager_engine, "f").plugins.getInteractors(this.container, true);
|
|
2216
|
-
this.externalInteractors = [];
|
|
2217
|
-
this.particleInteractors = [];
|
|
2218
|
-
for (const interactor of interactors) {
|
|
2219
|
-
switch (interactor.type) {
|
|
2220
|
-
case 0:
|
|
2221
|
-
this.externalInteractors.push(interactor);
|
|
2222
|
-
break;
|
|
2223
|
-
|
|
2224
|
-
case 1:
|
|
2225
|
-
this.particleInteractors.push(interactor);
|
|
2226
|
-
break;
|
|
2227
|
-
}
|
|
2228
|
-
}
|
|
2229
|
-
}
|
|
2230
|
-
async externalInteract(delta) {
|
|
2231
|
-
for (const interactor of this.externalInteractors) {
|
|
2232
|
-
if (interactor.isEnabled()) {
|
|
2233
|
-
await interactor.interact(delta);
|
|
2234
|
-
}
|
|
2235
|
-
}
|
|
2236
|
-
}
|
|
2237
|
-
async particlesInteract(particle, delta) {
|
|
2238
|
-
for (const interactor of this.externalInteractors) {
|
|
2239
|
-
interactor.reset(particle);
|
|
2240
|
-
}
|
|
2241
|
-
for (const interactor of this.particleInteractors) {
|
|
2242
|
-
if (interactor.isEnabled(particle)) {
|
|
2243
|
-
await interactor.interact(particle, delta);
|
|
2244
|
-
}
|
|
2245
|
-
}
|
|
2246
|
-
}
|
|
2247
|
-
}
|
|
2248
|
-
_InteractionManager_engine = new WeakMap;
|
|
2249
|
-
class ParticlesInteractorBase {
|
|
2250
|
-
constructor(container) {
|
|
2251
|
-
this.container = container;
|
|
2252
|
-
this.type = 1;
|
|
2253
|
-
}
|
|
2254
|
-
}
|
|
2255
|
-
function applyDistance(particle) {
|
|
2256
|
-
const initialPosition = particle.initialPosition;
|
|
2257
|
-
const {dx: dx, dy: dy} = getDistances(initialPosition, particle.position);
|
|
2258
|
-
const dxFixed = Math.abs(dx), dyFixed = Math.abs(dy);
|
|
2259
|
-
const hDistance = particle.retina.maxDistance.horizontal;
|
|
2260
|
-
const vDistance = particle.retina.maxDistance.vertical;
|
|
2261
|
-
if (!hDistance && !vDistance) {
|
|
2262
|
-
return;
|
|
2263
|
-
}
|
|
2264
|
-
if ((hDistance && dxFixed >= hDistance || vDistance && dyFixed >= vDistance) && !particle.misplaced) {
|
|
2265
|
-
particle.misplaced = !!hDistance && dxFixed > hDistance || !!vDistance && dyFixed > vDistance;
|
|
2266
|
-
if (hDistance) {
|
|
2267
|
-
particle.velocity.x = particle.velocity.y / 2 - particle.velocity.x;
|
|
2268
|
-
}
|
|
2269
|
-
if (vDistance) {
|
|
2270
|
-
particle.velocity.y = particle.velocity.x / 2 - particle.velocity.y;
|
|
2271
|
-
}
|
|
2272
|
-
} else if ((!hDistance || dxFixed < hDistance) && (!vDistance || dyFixed < vDistance) && particle.misplaced) {
|
|
2273
|
-
particle.misplaced = false;
|
|
2274
|
-
} else if (particle.misplaced) {
|
|
2275
|
-
const pos = particle.position, vel = particle.velocity;
|
|
2276
|
-
if (hDistance && (pos.x < initialPosition.x && vel.x < 0 || pos.x > initialPosition.x && vel.x > 0)) {
|
|
2277
|
-
vel.x *= -Math.random();
|
|
2278
|
-
}
|
|
2279
|
-
if (vDistance && (pos.y < initialPosition.y && vel.y < 0 || pos.y > initialPosition.y && vel.y > 0)) {
|
|
2280
|
-
vel.y *= -Math.random();
|
|
2281
|
-
}
|
|
2282
|
-
}
|
|
2283
|
-
}
|
|
2284
|
-
class ParticlesMover {
|
|
2285
|
-
constructor(container) {
|
|
2286
|
-
this.container = container;
|
|
2287
|
-
}
|
|
2288
|
-
move(particle, delta) {
|
|
2289
|
-
if (particle.destroyed) {
|
|
2290
|
-
return;
|
|
2291
|
-
}
|
|
2292
|
-
this.moveParticle(particle, delta);
|
|
2293
|
-
this.moveParallax(particle);
|
|
2294
|
-
}
|
|
2295
|
-
moveParticle(particle, delta) {
|
|
2296
|
-
var _a, _b, _c;
|
|
2297
|
-
var _d, _e;
|
|
2298
|
-
const particleOptions = particle.options;
|
|
2299
|
-
const moveOptions = particleOptions.move;
|
|
2300
|
-
if (!moveOptions.enable) {
|
|
2301
|
-
return;
|
|
2302
|
-
}
|
|
2303
|
-
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;
|
|
2304
|
-
this.applyPath(particle, delta);
|
|
2305
|
-
const gravityOptions = particle.gravity;
|
|
2306
|
-
const gravityFactor = gravityOptions.enable && gravityOptions.inverse ? -1 : 1;
|
|
2307
|
-
if (gravityOptions.enable && moveSpeed) {
|
|
2308
|
-
particle.velocity.y += gravityFactor * (gravityOptions.acceleration * delta.factor) / (60 * moveSpeed);
|
|
2309
|
-
}
|
|
2310
|
-
if (moveDrift && moveSpeed) {
|
|
2311
|
-
particle.velocity.x += moveDrift * delta.factor / (60 * moveSpeed);
|
|
2312
|
-
}
|
|
2313
|
-
const decay = particle.moveDecay;
|
|
2314
|
-
if (decay != 1) {
|
|
2315
|
-
particle.velocity.multTo(decay);
|
|
2316
|
-
}
|
|
2317
|
-
const velocity = particle.velocity.mult(moveSpeed);
|
|
2318
|
-
const maxSpeed = (_c = particle.retina.maxSpeed) !== null && _c !== void 0 ? _c : container.retina.maxSpeed;
|
|
2319
|
-
if (gravityOptions.enable && maxSpeed > 0 && (!gravityOptions.inverse && velocity.y >= 0 && velocity.y >= maxSpeed || gravityOptions.inverse && velocity.y <= 0 && velocity.y <= -maxSpeed)) {
|
|
2320
|
-
velocity.y = gravityFactor * maxSpeed;
|
|
2321
|
-
if (moveSpeed) {
|
|
2322
|
-
particle.velocity.y = velocity.y / moveSpeed;
|
|
2323
|
-
}
|
|
2324
|
-
}
|
|
2325
|
-
const zIndexOptions = particle.options.zIndex, zVelocityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.velocityRate;
|
|
2326
|
-
if (moveOptions.spin.enable) {
|
|
2327
|
-
this.spin(particle, moveSpeed);
|
|
2328
|
-
} else {
|
|
2329
|
-
if (zVelocityFactor != 1) {
|
|
2330
|
-
velocity.multTo(zVelocityFactor);
|
|
2331
|
-
}
|
|
2332
|
-
particle.position.addTo(velocity);
|
|
2333
|
-
if (moveOptions.vibrate) {
|
|
2334
|
-
particle.position.x += Math.sin(particle.position.x * Math.cos(particle.position.y));
|
|
2335
|
-
particle.position.y += Math.cos(particle.position.y * Math.sin(particle.position.x));
|
|
2336
|
-
}
|
|
2337
|
-
}
|
|
2338
|
-
applyDistance(particle);
|
|
2339
|
-
}
|
|
2340
|
-
spin(particle, moveSpeed) {
|
|
2341
|
-
const container = this.container;
|
|
2342
|
-
if (!particle.spin) {
|
|
2343
|
-
return;
|
|
2344
|
-
}
|
|
2345
|
-
const updateFunc = {
|
|
2346
|
-
x: particle.spin.direction === "clockwise" ? Math.cos : Math.sin,
|
|
2347
|
-
y: particle.spin.direction === "clockwise" ? Math.sin : Math.cos
|
|
2348
|
-
};
|
|
2349
|
-
particle.position.x = particle.spin.center.x + particle.spin.radius * updateFunc.x(particle.spin.angle);
|
|
2350
|
-
particle.position.y = particle.spin.center.y + particle.spin.radius * updateFunc.y(particle.spin.angle);
|
|
2351
|
-
particle.spin.radius += particle.spin.acceleration;
|
|
2352
|
-
const maxCanvasSize = Math.max(container.canvas.size.width, container.canvas.size.height);
|
|
2353
|
-
if (particle.spin.radius > maxCanvasSize / 2) {
|
|
2354
|
-
particle.spin.radius = maxCanvasSize / 2;
|
|
2355
|
-
particle.spin.acceleration *= -1;
|
|
2356
|
-
} else if (particle.spin.radius < 0) {
|
|
2357
|
-
particle.spin.radius = 0;
|
|
2358
|
-
particle.spin.acceleration *= -1;
|
|
2359
|
-
}
|
|
2360
|
-
particle.spin.angle += moveSpeed / 100 * (1 - particle.spin.radius / maxCanvasSize);
|
|
2361
|
-
}
|
|
2362
|
-
applyPath(particle, delta) {
|
|
2363
|
-
const particlesOptions = particle.options;
|
|
2364
|
-
const pathOptions = particlesOptions.move.path;
|
|
2365
|
-
const pathEnabled = pathOptions.enable;
|
|
2366
|
-
if (!pathEnabled) {
|
|
2367
|
-
return;
|
|
2368
|
-
}
|
|
2369
|
-
const container = this.container;
|
|
2370
|
-
if (particle.lastPathTime <= particle.pathDelay) {
|
|
2371
|
-
particle.lastPathTime += delta.value;
|
|
2372
|
-
return;
|
|
2373
|
-
}
|
|
2374
|
-
const path = container.pathGenerator.generate(particle);
|
|
2375
|
-
particle.velocity.addTo(path);
|
|
2376
|
-
if (pathOptions.clamp) {
|
|
2377
|
-
particle.velocity.x = clamp(particle.velocity.x, -1, 1);
|
|
2378
|
-
particle.velocity.y = clamp(particle.velocity.y, -1, 1);
|
|
2379
|
-
}
|
|
2380
|
-
particle.lastPathTime -= particle.pathDelay;
|
|
2381
|
-
}
|
|
2382
|
-
moveParallax(particle) {
|
|
2383
|
-
const container = this.container;
|
|
2384
|
-
const options = container.actualOptions;
|
|
2385
|
-
if (isSsr() || !options.interactivity.events.onHover.parallax.enable) {
|
|
2386
|
-
return;
|
|
2387
|
-
}
|
|
2388
|
-
const parallaxForce = options.interactivity.events.onHover.parallax.force;
|
|
2389
|
-
const mousePos = container.interactivity.mouse.position;
|
|
2390
|
-
if (!mousePos) {
|
|
2391
|
-
return;
|
|
2392
|
-
}
|
|
2393
|
-
const canvasCenter = {
|
|
2394
|
-
x: container.canvas.size.width / 2,
|
|
2395
|
-
y: container.canvas.size.height / 2
|
|
2396
|
-
};
|
|
2397
|
-
const parallaxSmooth = options.interactivity.events.onHover.parallax.smooth;
|
|
2398
|
-
const factor = particle.getRadius() / parallaxForce;
|
|
2399
|
-
const tmp = {
|
|
2400
|
-
x: (mousePos.x - canvasCenter.x) * factor,
|
|
2401
|
-
y: (mousePos.y - canvasCenter.y) * factor
|
|
2402
|
-
};
|
|
2403
|
-
particle.offset.x += (tmp.x - particle.offset.x) / parallaxSmooth;
|
|
2404
|
-
particle.offset.y += (tmp.y - particle.offset.y) / parallaxSmooth;
|
|
2405
|
-
}
|
|
2406
|
-
getProximitySpeedFactor(particle) {
|
|
2407
|
-
const container = this.container;
|
|
2408
|
-
const options = container.actualOptions;
|
|
2409
|
-
const active = isInArray("slow", options.interactivity.events.onHover.mode);
|
|
2410
|
-
if (!active) {
|
|
2411
|
-
return 1;
|
|
2412
|
-
}
|
|
2413
|
-
const mousePos = this.container.interactivity.mouse.position;
|
|
2414
|
-
if (!mousePos) {
|
|
2415
|
-
return 1;
|
|
2416
|
-
}
|
|
2417
|
-
const particlePos = particle.getPosition();
|
|
2418
|
-
const dist = getDistance(mousePos, particlePos);
|
|
2419
|
-
const radius = container.retina.slowModeRadius;
|
|
2420
|
-
if (dist > radius) {
|
|
2421
|
-
return 1;
|
|
2422
|
-
}
|
|
2423
|
-
const proximityFactor = dist / radius || 0;
|
|
2424
|
-
const slowFactor = options.interactivity.modes.slow.factor;
|
|
2425
|
-
return proximityFactor / slowFactor;
|
|
2426
|
-
}
|
|
2427
|
-
}
|
|
2428
|
-
var Plugins_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
2429
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
2430
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
2431
|
-
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");
|
|
2432
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
2433
|
-
value;
|
|
2434
|
-
};
|
|
2435
|
-
var _Plugins_engine;
|
|
2436
|
-
class Plugins {
|
|
2437
|
-
constructor(engine) {
|
|
2438
|
-
_Plugins_engine.set(this, void 0);
|
|
2439
|
-
Plugins_classPrivateFieldSet(this, _Plugins_engine, engine, "f");
|
|
2440
|
-
this.plugins = [];
|
|
2441
|
-
this.interactorsInitializers = new Map;
|
|
2442
|
-
this.updatersInitializers = new Map;
|
|
2443
|
-
this.interactors = new Map;
|
|
2444
|
-
this.updaters = new Map;
|
|
2445
|
-
this.presets = new Map;
|
|
2446
|
-
this.drawers = new Map;
|
|
2447
|
-
this.pathGenerators = new Map;
|
|
2448
|
-
}
|
|
2449
|
-
getPlugin(plugin) {
|
|
2450
|
-
return this.plugins.find((t => t.id === plugin));
|
|
2451
|
-
}
|
|
2452
|
-
addPlugin(plugin) {
|
|
2453
|
-
if (!this.getPlugin(plugin.id)) {
|
|
2454
|
-
this.plugins.push(plugin);
|
|
2455
|
-
}
|
|
2456
|
-
}
|
|
2457
|
-
getAvailablePlugins(container) {
|
|
2458
|
-
const res = new Map;
|
|
2459
|
-
for (const plugin of this.plugins) {
|
|
2460
|
-
if (!plugin.needsPlugin(container.actualOptions)) {
|
|
2461
|
-
continue;
|
|
2462
|
-
}
|
|
2463
|
-
res.set(plugin.id, plugin.getPlugin(container));
|
|
2464
|
-
}
|
|
2465
|
-
return res;
|
|
2466
|
-
}
|
|
2467
|
-
loadOptions(options, sourceOptions) {
|
|
2468
|
-
for (const plugin of this.plugins) {
|
|
2469
|
-
plugin.loadOptions(options, sourceOptions);
|
|
2470
|
-
}
|
|
2471
|
-
}
|
|
2472
|
-
getPreset(preset) {
|
|
2473
|
-
return this.presets.get(preset);
|
|
2474
|
-
}
|
|
2475
|
-
addPreset(presetKey, options, override = false) {
|
|
2476
|
-
if (override || !this.getPreset(presetKey)) {
|
|
2477
|
-
this.presets.set(presetKey, options);
|
|
2478
|
-
}
|
|
2479
|
-
}
|
|
2480
|
-
addShapeDrawer(type, drawer) {
|
|
2481
|
-
if (!this.getShapeDrawer(type)) {
|
|
2482
|
-
this.drawers.set(type, drawer);
|
|
2483
|
-
}
|
|
2484
|
-
}
|
|
2485
|
-
getShapeDrawer(type) {
|
|
2486
|
-
return this.drawers.get(type);
|
|
2487
|
-
}
|
|
2488
|
-
getSupportedShapes() {
|
|
2489
|
-
return this.drawers.keys();
|
|
2490
|
-
}
|
|
2491
|
-
getPathGenerator(type) {
|
|
2492
|
-
return this.pathGenerators.get(type);
|
|
2493
|
-
}
|
|
2494
|
-
addPathGenerator(type, pathGenerator) {
|
|
2495
|
-
if (!this.getPathGenerator(type)) {
|
|
2496
|
-
this.pathGenerators.set(type, pathGenerator);
|
|
2497
|
-
}
|
|
2498
|
-
}
|
|
2499
|
-
getInteractors(container, force = false) {
|
|
2500
|
-
let res = this.interactors.get(container);
|
|
2501
|
-
if (!res || force) {
|
|
2502
|
-
res = [ ...this.interactorsInitializers.values() ].map((t => t(container)));
|
|
2503
|
-
this.interactors.set(container, res);
|
|
2504
|
-
}
|
|
2505
|
-
return res;
|
|
2506
|
-
}
|
|
2507
|
-
addInteractor(name, initInteractor) {
|
|
2508
|
-
this.interactorsInitializers.set(name, initInteractor);
|
|
2509
|
-
}
|
|
2510
|
-
getUpdaters(container, force = false) {
|
|
2511
|
-
let res = this.updaters.get(container);
|
|
2512
|
-
if (!res || force) {
|
|
2513
|
-
res = [ ...this.updatersInitializers.values() ].map((t => t(container)));
|
|
2514
|
-
this.updaters.set(container, res);
|
|
2515
|
-
}
|
|
2516
|
-
return res;
|
|
2517
|
-
}
|
|
2518
|
-
addParticleUpdater(name, initUpdater) {
|
|
2519
|
-
this.updatersInitializers.set(name, initUpdater);
|
|
2520
|
-
}
|
|
2521
|
-
}
|
|
2522
|
-
_Plugins_engine = new WeakMap;
|
|
2523
|
-
class Point {
|
|
2524
|
-
constructor(position, particle) {
|
|
2525
|
-
this.position = position;
|
|
2526
|
-
this.particle = particle;
|
|
2527
|
-
}
|
|
2528
|
-
}
|
|
2529
|
-
class QuadTree {
|
|
2530
|
-
constructor(rectangle, capacity) {
|
|
2531
|
-
this.rectangle = rectangle;
|
|
2532
|
-
this.capacity = capacity;
|
|
2533
|
-
this.points = [];
|
|
2534
|
-
this.divided = false;
|
|
2535
|
-
}
|
|
2536
|
-
subdivide() {
|
|
2537
|
-
const x = this.rectangle.position.x;
|
|
2538
|
-
const y = this.rectangle.position.y;
|
|
2539
|
-
const w = this.rectangle.size.width;
|
|
2540
|
-
const h = this.rectangle.size.height;
|
|
2541
|
-
const capacity = this.capacity;
|
|
2542
|
-
this.northEast = new QuadTree(new Rectangle(x, y, w / 2, h / 2), capacity);
|
|
2543
|
-
this.northWest = new QuadTree(new Rectangle(x + w / 2, y, w / 2, h / 2), capacity);
|
|
2544
|
-
this.southEast = new QuadTree(new Rectangle(x, y + h / 2, w / 2, h / 2), capacity);
|
|
2545
|
-
this.southWest = new QuadTree(new Rectangle(x + w / 2, y + h / 2, w / 2, h / 2), capacity);
|
|
2546
|
-
this.divided = true;
|
|
2547
|
-
}
|
|
2548
|
-
insert(point) {
|
|
2549
|
-
var _a, _b, _c, _d, _e;
|
|
2550
|
-
if (!this.rectangle.contains(point.position)) {
|
|
2551
|
-
return false;
|
|
2552
|
-
}
|
|
2553
|
-
if (this.points.length < this.capacity) {
|
|
2554
|
-
this.points.push(point);
|
|
2555
|
-
return true;
|
|
2556
|
-
}
|
|
2557
|
-
if (!this.divided) {
|
|
2558
|
-
this.subdivide();
|
|
2559
|
-
}
|
|
2560
|
-
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;
|
|
2561
|
-
}
|
|
2562
|
-
queryCircle(position, radius) {
|
|
2563
|
-
return this.query(new Circle(position.x, position.y, radius));
|
|
2564
|
-
}
|
|
2565
|
-
queryCircleWarp(position, radius, containerOrSize) {
|
|
2566
|
-
const container = containerOrSize;
|
|
2567
|
-
const size = containerOrSize;
|
|
2568
|
-
return this.query(new CircleWarp(position.x, position.y, radius, container.canvas !== undefined ? container.canvas.size : size));
|
|
2569
|
-
}
|
|
2570
|
-
queryRectangle(position, size) {
|
|
2571
|
-
return this.query(new Rectangle(position.x, position.y, size.width, size.height));
|
|
2572
|
-
}
|
|
2573
|
-
query(range, found) {
|
|
2574
|
-
var _a, _b, _c, _d;
|
|
2575
|
-
const res = found !== null && found !== void 0 ? found : [];
|
|
2576
|
-
if (!range.intersects(this.rectangle)) {
|
|
2577
|
-
return [];
|
|
2578
|
-
} else {
|
|
2579
|
-
for (const p of this.points) {
|
|
2580
|
-
if (!range.contains(p.position) && getDistance(range.position, p.position) > p.particle.getRadius()) {
|
|
2581
|
-
continue;
|
|
2582
|
-
}
|
|
2583
|
-
res.push(p.particle);
|
|
2584
|
-
}
|
|
2585
|
-
if (this.divided) {
|
|
2586
|
-
(_a = this.northEast) === null || _a === void 0 ? void 0 : _a.query(range, res);
|
|
2587
|
-
(_b = this.northWest) === null || _b === void 0 ? void 0 : _b.query(range, res);
|
|
2588
|
-
(_c = this.southEast) === null || _c === void 0 ? void 0 : _c.query(range, res);
|
|
2589
|
-
(_d = this.southWest) === null || _d === void 0 ? void 0 : _d.query(range, res);
|
|
2590
|
-
}
|
|
2591
|
-
}
|
|
2592
|
-
return res;
|
|
2593
|
-
}
|
|
2594
|
-
}
|
|
2595
|
-
class Vector {
|
|
2596
|
-
constructor(x, y) {
|
|
2597
|
-
let defX, defY;
|
|
2598
|
-
if (y === undefined) {
|
|
2599
|
-
if (typeof x === "number") {
|
|
2600
|
-
throw new Error("tsParticles - Vector not initialized correctly");
|
|
2601
|
-
}
|
|
2602
|
-
const coords = x;
|
|
2603
|
-
[defX, defY] = [ coords.x, coords.y ];
|
|
2604
|
-
} else {
|
|
2605
|
-
[defX, defY] = [ x, y ];
|
|
2606
|
-
}
|
|
2607
|
-
this.x = defX;
|
|
2608
|
-
this.y = defY;
|
|
2609
|
-
}
|
|
2610
|
-
static clone(source) {
|
|
2611
|
-
return Vector.create(source.x, source.y);
|
|
2612
|
-
}
|
|
2613
|
-
static create(x, y) {
|
|
2614
|
-
return new Vector(x, y);
|
|
2615
|
-
}
|
|
2616
|
-
static get origin() {
|
|
2617
|
-
return Vector.create(0, 0);
|
|
2618
|
-
}
|
|
2619
|
-
get angle() {
|
|
2620
|
-
return Math.atan2(this.y, this.x);
|
|
2621
|
-
}
|
|
2622
|
-
set angle(angle) {
|
|
2623
|
-
this.updateFromAngle(angle, this.length);
|
|
2624
|
-
}
|
|
2625
|
-
get length() {
|
|
2626
|
-
return Math.sqrt(this.x ** 2 + this.y ** 2);
|
|
2627
|
-
}
|
|
2628
|
-
set length(length) {
|
|
2629
|
-
this.updateFromAngle(this.angle, length);
|
|
2630
|
-
}
|
|
2631
|
-
add(v) {
|
|
2632
|
-
return Vector.create(this.x + v.x, this.y + v.y);
|
|
2633
|
-
}
|
|
2634
|
-
addTo(v) {
|
|
2635
|
-
this.x += v.x;
|
|
2636
|
-
this.y += v.y;
|
|
2637
|
-
}
|
|
2638
|
-
sub(v) {
|
|
2639
|
-
return Vector.create(this.x - v.x, this.y - v.y);
|
|
2640
|
-
}
|
|
2641
|
-
subFrom(v) {
|
|
2642
|
-
this.x -= v.x;
|
|
2643
|
-
this.y -= v.y;
|
|
2644
|
-
}
|
|
2645
|
-
mult(n) {
|
|
2646
|
-
return Vector.create(this.x * n, this.y * n);
|
|
2647
|
-
}
|
|
2648
|
-
multTo(n) {
|
|
2649
|
-
this.x *= n;
|
|
2650
|
-
this.y *= n;
|
|
2651
|
-
}
|
|
2652
|
-
div(n) {
|
|
2653
|
-
return Vector.create(this.x / n, this.y / n);
|
|
2654
|
-
}
|
|
2655
|
-
divTo(n) {
|
|
2656
|
-
this.x /= n;
|
|
2657
|
-
this.y /= n;
|
|
2658
|
-
}
|
|
2659
|
-
distanceTo(v) {
|
|
2660
|
-
return this.sub(v).length;
|
|
2661
|
-
}
|
|
2662
|
-
getLengthSq() {
|
|
2663
|
-
return this.x ** 2 + this.y ** 2;
|
|
2664
|
-
}
|
|
2665
|
-
distanceToSq(v) {
|
|
2666
|
-
return this.sub(v).getLengthSq();
|
|
2667
|
-
}
|
|
2668
|
-
manhattanDistanceTo(v) {
|
|
2669
|
-
return Math.abs(v.x - this.x) + Math.abs(v.y - this.y);
|
|
2670
|
-
}
|
|
2671
|
-
copy() {
|
|
2672
|
-
return Vector.clone(this);
|
|
2673
|
-
}
|
|
2674
|
-
setTo(velocity) {
|
|
2675
|
-
this.x = velocity.x;
|
|
2676
|
-
this.y = velocity.y;
|
|
2677
|
-
}
|
|
2678
|
-
rotate(angle) {
|
|
2679
|
-
return Vector.create(this.x * Math.cos(angle) - this.y * Math.sin(angle), this.x * Math.sin(angle) + this.y * Math.cos(angle));
|
|
2680
|
-
}
|
|
2681
|
-
updateFromAngle(angle, length) {
|
|
2682
|
-
this.x = Math.cos(angle) * length;
|
|
2683
|
-
this.y = Math.sin(angle) * length;
|
|
2684
|
-
}
|
|
2685
|
-
}
|
|
2686
|
-
class Vector3d extends Vector {
|
|
2687
|
-
constructor(x, y, z) {
|
|
2688
|
-
super(x, y);
|
|
2689
|
-
this.z = z === undefined ? x.z : z;
|
|
2690
|
-
}
|
|
2691
|
-
static clone(source) {
|
|
2692
|
-
return Vector3d.create(source.x, source.y, source.z);
|
|
2693
|
-
}
|
|
2694
|
-
static create(x, y, z) {
|
|
2695
|
-
return new Vector3d(x, y, z);
|
|
2696
|
-
}
|
|
2697
|
-
add(v) {
|
|
2698
|
-
return v instanceof Vector3d ? Vector3d.create(this.x + v.x, this.y + v.y, this.z + v.z) : super.add(v);
|
|
2699
|
-
}
|
|
2700
|
-
addTo(v) {
|
|
2701
|
-
super.addTo(v);
|
|
2702
|
-
if (v instanceof Vector3d) {
|
|
2703
|
-
this.z += v.z;
|
|
2704
|
-
}
|
|
2705
|
-
}
|
|
2706
|
-
sub(v) {
|
|
2707
|
-
return v instanceof Vector3d ? Vector3d.create(this.x - v.x, this.y - v.y, this.z - v.z) : super.sub(v);
|
|
2708
|
-
}
|
|
2709
|
-
subFrom(v) {
|
|
2710
|
-
super.subFrom(v);
|
|
2711
|
-
if (v instanceof Vector3d) {
|
|
2712
|
-
this.z -= v.z;
|
|
2713
|
-
}
|
|
2714
|
-
}
|
|
2715
|
-
mult(n) {
|
|
2716
|
-
return Vector3d.create(this.x * n, this.y * n, this.z * n);
|
|
2717
|
-
}
|
|
2718
|
-
multTo(n) {
|
|
2719
|
-
super.multTo(n);
|
|
2720
|
-
this.z *= n;
|
|
2721
|
-
}
|
|
2722
|
-
div(n) {
|
|
2723
|
-
return Vector3d.create(this.x / n, this.y / n, this.z / n);
|
|
2724
|
-
}
|
|
2725
|
-
divTo(n) {
|
|
2726
|
-
super.divTo(n);
|
|
2727
|
-
this.z /= n;
|
|
2728
|
-
}
|
|
2729
|
-
copy() {
|
|
2730
|
-
return Vector3d.clone(this);
|
|
2731
|
-
}
|
|
2732
|
-
setTo(v) {
|
|
2733
|
-
super.setTo(v);
|
|
2734
|
-
if (v instanceof Vector3d) {
|
|
2735
|
-
this.z = v.z;
|
|
2736
|
-
}
|
|
2737
|
-
}
|
|
2738
|
-
}
|
|
2739
|
-
class Canvas {
|
|
2740
|
-
constructor(container) {
|
|
2741
|
-
this.container = container;
|
|
2742
|
-
this.size = {
|
|
2743
|
-
height: 0,
|
|
2744
|
-
width: 0
|
|
2745
|
-
};
|
|
2746
|
-
this.context = null;
|
|
2747
|
-
this.generatedCanvas = false;
|
|
2748
|
-
}
|
|
2749
|
-
init() {
|
|
2750
|
-
this.resize();
|
|
2751
|
-
this.initStyle();
|
|
2752
|
-
this.initCover();
|
|
2753
|
-
this.initTrail();
|
|
2754
|
-
this.initBackground();
|
|
2755
|
-
this.paint();
|
|
2756
|
-
}
|
|
2757
|
-
loadCanvas(canvas) {
|
|
2758
|
-
var _a;
|
|
2759
|
-
if (this.generatedCanvas) {
|
|
2760
|
-
(_a = this.element) === null || _a === void 0 ? void 0 : _a.remove();
|
|
2761
|
-
}
|
|
2762
|
-
this.generatedCanvas = canvas.dataset && Constants.generatedAttribute in canvas.dataset ? canvas.dataset[Constants.generatedAttribute] === "true" : this.generatedCanvas;
|
|
2763
|
-
this.element = canvas;
|
|
2764
|
-
this.originalStyle = deepExtend({}, this.element.style);
|
|
2765
|
-
this.size.height = canvas.offsetHeight;
|
|
2766
|
-
this.size.width = canvas.offsetWidth;
|
|
2767
|
-
this.context = this.element.getContext("2d");
|
|
2768
|
-
this.container.retina.init();
|
|
2769
|
-
this.initBackground();
|
|
2770
|
-
}
|
|
2771
|
-
destroy() {
|
|
2772
|
-
var _a;
|
|
2773
|
-
if (this.generatedCanvas) {
|
|
2774
|
-
(_a = this.element) === null || _a === void 0 ? void 0 : _a.remove();
|
|
2775
|
-
}
|
|
2776
|
-
this.draw((ctx => {
|
|
2777
|
-
clear(ctx, this.size);
|
|
2778
|
-
}));
|
|
2779
|
-
}
|
|
2780
|
-
paint() {
|
|
2781
|
-
const options = this.container.actualOptions;
|
|
2782
|
-
this.draw((ctx => {
|
|
2783
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
2784
|
-
clear(ctx, this.size);
|
|
2785
|
-
this.paintBase(this.coverColorStyle);
|
|
2786
|
-
} else {
|
|
2787
|
-
this.paintBase();
|
|
2788
|
-
}
|
|
2789
|
-
}));
|
|
2790
|
-
}
|
|
2791
|
-
clear() {
|
|
2792
|
-
const options = this.container.actualOptions;
|
|
2793
|
-
const trail = options.particles.move.trail;
|
|
2794
|
-
if (options.backgroundMask.enable) {
|
|
2795
|
-
this.paint();
|
|
2796
|
-
} else if (trail.enable && trail.length > 0 && this.trailFillColor) {
|
|
2797
|
-
this.paintBase(getStyleFromRgb(this.trailFillColor, 1 / trail.length));
|
|
2798
|
-
} else {
|
|
2799
|
-
this.draw((ctx => {
|
|
2800
|
-
clear(ctx, this.size);
|
|
2801
|
-
}));
|
|
2802
|
-
}
|
|
2803
|
-
}
|
|
2804
|
-
async windowResize() {
|
|
2805
|
-
if (!this.element) {
|
|
2806
|
-
return;
|
|
2807
|
-
}
|
|
2808
|
-
const container = this.container;
|
|
2809
|
-
this.resize();
|
|
2810
|
-
const needsRefresh = container.updateActualOptions();
|
|
2811
|
-
container.particles.setDensity();
|
|
2812
|
-
for (const [, plugin] of container.plugins) {
|
|
2813
|
-
if (plugin.resize !== undefined) {
|
|
2814
|
-
plugin.resize();
|
|
2815
|
-
}
|
|
2816
|
-
}
|
|
2817
|
-
if (needsRefresh) {
|
|
2818
|
-
await container.refresh();
|
|
2819
|
-
}
|
|
2820
|
-
}
|
|
2821
|
-
resize() {
|
|
2822
|
-
if (!this.element) {
|
|
2823
|
-
return;
|
|
2824
|
-
}
|
|
2825
|
-
const container = this.container;
|
|
2826
|
-
const pxRatio = container.retina.pixelRatio;
|
|
2827
|
-
const size = container.canvas.size;
|
|
2828
|
-
const oldSize = Object.assign({}, size);
|
|
2829
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
2830
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
2831
|
-
this.element.width = size.width;
|
|
2832
|
-
this.element.height = size.height;
|
|
2833
|
-
if (this.container.started) {
|
|
2834
|
-
this.resizeFactor = {
|
|
2835
|
-
width: size.width / oldSize.width,
|
|
2836
|
-
height: size.height / oldSize.height
|
|
2837
|
-
};
|
|
2838
|
-
}
|
|
2839
|
-
}
|
|
2840
|
-
drawConnectLine(p1, p2) {
|
|
2841
|
-
this.draw((ctx => {
|
|
2842
|
-
var _a;
|
|
2843
|
-
const lineStyle = this.lineStyle(p1, p2);
|
|
2844
|
-
if (!lineStyle) {
|
|
2845
|
-
return;
|
|
2846
|
-
}
|
|
2847
|
-
const pos1 = p1.getPosition();
|
|
2848
|
-
const pos2 = p2.getPosition();
|
|
2849
|
-
drawConnectLine(ctx, (_a = p1.retina.linksWidth) !== null && _a !== void 0 ? _a : this.container.retina.linksWidth, lineStyle, pos1, pos2);
|
|
2850
|
-
}));
|
|
2851
|
-
}
|
|
2852
|
-
drawGrabLine(particle, lineColor, opacity, mousePos) {
|
|
2853
|
-
const container = this.container;
|
|
2854
|
-
this.draw((ctx => {
|
|
2855
|
-
var _a;
|
|
2856
|
-
const beginPos = particle.getPosition();
|
|
2857
|
-
drawGrabLine(ctx, (_a = particle.retina.linksWidth) !== null && _a !== void 0 ? _a : container.retina.linksWidth, beginPos, mousePos, lineColor, opacity);
|
|
2858
|
-
}));
|
|
2859
|
-
}
|
|
2860
|
-
drawParticle(particle, delta) {
|
|
2861
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2862
|
-
if (particle.spawning || particle.destroyed) {
|
|
2863
|
-
return;
|
|
2864
|
-
}
|
|
2865
|
-
const pfColor = particle.getFillColor();
|
|
2866
|
-
const psColor = (_a = particle.getStrokeColor()) !== null && _a !== void 0 ? _a : pfColor;
|
|
2867
|
-
if (!pfColor && !psColor) {
|
|
2868
|
-
return;
|
|
2869
|
-
}
|
|
2870
|
-
let [fColor, sColor] = this.getPluginParticleColors(particle);
|
|
2871
|
-
const pOptions = particle.options;
|
|
2872
|
-
const twinkle = pOptions.twinkle.particles;
|
|
2873
|
-
const twinkling = twinkle.enable && Math.random() < twinkle.frequency;
|
|
2874
|
-
if (!fColor || !sColor) {
|
|
2875
|
-
const twinkleRgb = colorToHsl(twinkle.color);
|
|
2876
|
-
if (!fColor) {
|
|
2877
|
-
fColor = twinkling && twinkleRgb !== undefined ? twinkleRgb : pfColor ? pfColor : undefined;
|
|
2878
|
-
}
|
|
2879
|
-
if (!sColor) {
|
|
2880
|
-
sColor = twinkling && twinkleRgb !== undefined ? twinkleRgb : psColor ? psColor : undefined;
|
|
2881
|
-
}
|
|
2882
|
-
}
|
|
2883
|
-
const options = this.container.actualOptions;
|
|
2884
|
-
const zIndexOptions = particle.options.zIndex;
|
|
2885
|
-
const zOpacityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.opacityRate;
|
|
2886
|
-
const radius = particle.getRadius();
|
|
2887
|
-
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;
|
|
2888
|
-
const strokeOpacity = (_f = (_e = particle.stroke) === null || _e === void 0 ? void 0 : _e.opacity) !== null && _f !== void 0 ? _f : opacity;
|
|
2889
|
-
const zOpacity = opacity * zOpacityFactor;
|
|
2890
|
-
const fillColorValue = fColor ? getStyleFromHsl(fColor, zOpacity) : undefined;
|
|
2891
|
-
if (!fillColorValue && !sColor) {
|
|
2892
|
-
return;
|
|
2893
|
-
}
|
|
2894
|
-
this.draw((ctx => {
|
|
2895
|
-
const zSizeFactor = (1 - particle.zIndexFactor) ** zIndexOptions.sizeRate;
|
|
2896
|
-
const zStrokeOpacity = strokeOpacity * zOpacityFactor;
|
|
2897
|
-
const strokeColorValue = sColor ? getStyleFromHsl(sColor, zStrokeOpacity) : fillColorValue;
|
|
2898
|
-
if (radius <= 0) {
|
|
2899
|
-
return;
|
|
2900
|
-
}
|
|
2901
|
-
const container = this.container;
|
|
2902
|
-
for (const updater of container.particles.updaters) {
|
|
2903
|
-
if (updater.beforeDraw) {
|
|
2904
|
-
updater.beforeDraw(particle);
|
|
2905
|
-
}
|
|
2906
|
-
}
|
|
2907
|
-
drawParticle(this.container, ctx, particle, delta, fillColorValue, strokeColorValue, options.backgroundMask.enable, options.backgroundMask.composite, radius * zSizeFactor, zOpacity, particle.options.shadow, particle.gradient);
|
|
2908
|
-
for (const updater of container.particles.updaters) {
|
|
2909
|
-
if (updater.afterDraw) {
|
|
2910
|
-
updater.afterDraw(particle);
|
|
2911
|
-
}
|
|
2912
|
-
}
|
|
2913
|
-
}));
|
|
2914
|
-
}
|
|
2915
|
-
drawPlugin(plugin, delta) {
|
|
2916
|
-
this.draw((ctx => {
|
|
2917
|
-
drawPlugin(ctx, plugin, delta);
|
|
2918
|
-
}));
|
|
2919
|
-
}
|
|
2920
|
-
drawParticlePlugin(plugin, particle, delta) {
|
|
2921
|
-
this.draw((ctx => {
|
|
2922
|
-
drawParticlePlugin(ctx, plugin, particle, delta);
|
|
2923
|
-
}));
|
|
2257
|
+
container.interactivity.status = Constants.mouseMoveEvent;
|
|
2924
2258
|
}
|
|
2925
|
-
|
|
2926
|
-
const
|
|
2927
|
-
|
|
2928
|
-
const element = this.element;
|
|
2929
|
-
const elementStyle = element === null || element === void 0 ? void 0 : element.style;
|
|
2930
|
-
if (!elementStyle) {
|
|
2259
|
+
mouseTouchFinish() {
|
|
2260
|
+
const interactivity = this.container.interactivity;
|
|
2261
|
+
if (!interactivity) {
|
|
2931
2262
|
return;
|
|
2932
2263
|
}
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
elementStyle.backgroundPosition = background.position || "";
|
|
2941
|
-
elementStyle.backgroundRepeat = background.repeat || "";
|
|
2942
|
-
elementStyle.backgroundSize = background.size || "";
|
|
2264
|
+
const mouse = interactivity.mouse;
|
|
2265
|
+
delete mouse.position;
|
|
2266
|
+
delete mouse.clickPosition;
|
|
2267
|
+
delete mouse.downPosition;
|
|
2268
|
+
interactivity.status = Constants.mouseLeaveEvent;
|
|
2269
|
+
mouse.inside = false;
|
|
2270
|
+
mouse.clicking = false;
|
|
2943
2271
|
}
|
|
2944
|
-
|
|
2945
|
-
|
|
2272
|
+
mouseTouchClick(e) {
|
|
2273
|
+
const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse;
|
|
2274
|
+
mouse.inside = true;
|
|
2275
|
+
let handled = false;
|
|
2276
|
+
const mousePosition = mouse.position;
|
|
2277
|
+
if (!mousePosition || !options.interactivity.events.onClick.enable) {
|
|
2946
2278
|
return;
|
|
2947
2279
|
}
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
const coverColor = {
|
|
2957
|
-
r: coverRgb.r,
|
|
2958
|
-
g: coverRgb.g,
|
|
2959
|
-
b: coverRgb.b,
|
|
2960
|
-
a: cover.opacity
|
|
2961
|
-
};
|
|
2962
|
-
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
2963
|
-
console.log(this.coverColorStyle);
|
|
2280
|
+
for (const [, plugin] of container.plugins) {
|
|
2281
|
+
if (!plugin.clickPositionValid) {
|
|
2282
|
+
continue;
|
|
2283
|
+
}
|
|
2284
|
+
handled = plugin.clickPositionValid(mousePosition);
|
|
2285
|
+
if (handled) {
|
|
2286
|
+
break;
|
|
2287
|
+
}
|
|
2964
2288
|
}
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
const options = this.container.actualOptions;
|
|
2968
|
-
const trail = options.particles.move.trail;
|
|
2969
|
-
const fillColor = colorToRgb(trail.fillColor);
|
|
2970
|
-
if (fillColor) {
|
|
2971
|
-
const trail = options.particles.move.trail;
|
|
2972
|
-
this.trailFillColor = {
|
|
2973
|
-
r: fillColor.r,
|
|
2974
|
-
g: fillColor.g,
|
|
2975
|
-
b: fillColor.b,
|
|
2976
|
-
a: 1 / trail.length
|
|
2977
|
-
};
|
|
2289
|
+
if (!handled) {
|
|
2290
|
+
this.doMouseTouchClick(e);
|
|
2978
2291
|
}
|
|
2292
|
+
mouse.clicking = false;
|
|
2979
2293
|
}
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
if (!
|
|
2985
|
-
|
|
2986
|
-
}
|
|
2987
|
-
if (!sColor && plugin.particleStrokeColor) {
|
|
2988
|
-
sColor = colorToHsl(plugin.particleStrokeColor(particle));
|
|
2294
|
+
doMouseTouchClick(e) {
|
|
2295
|
+
const container = this.container, options = container.actualOptions;
|
|
2296
|
+
if (this.canPush) {
|
|
2297
|
+
const mousePos = container.interactivity.mouse.position;
|
|
2298
|
+
if (!mousePos) {
|
|
2299
|
+
return;
|
|
2989
2300
|
}
|
|
2990
|
-
|
|
2991
|
-
|
|
2301
|
+
container.interactivity.mouse.clickPosition = {
|
|
2302
|
+
x: mousePos.x,
|
|
2303
|
+
y: mousePos.y
|
|
2304
|
+
};
|
|
2305
|
+
container.interactivity.mouse.clickTime = (new Date).getTime();
|
|
2306
|
+
const onClick = options.interactivity.events.onClick;
|
|
2307
|
+
if (onClick.mode instanceof Array) {
|
|
2308
|
+
for (const mode of onClick.mode) {
|
|
2309
|
+
this.handleClickMode(mode);
|
|
2310
|
+
}
|
|
2311
|
+
} else {
|
|
2312
|
+
this.handleClickMode(onClick.mode);
|
|
2992
2313
|
}
|
|
2993
2314
|
}
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
initStyle() {
|
|
2997
|
-
const element = this.element, options = this.container.actualOptions;
|
|
2998
|
-
if (!element) {
|
|
2999
|
-
return;
|
|
2315
|
+
if (e.type === "touchend") {
|
|
2316
|
+
setTimeout((() => this.mouseTouchFinish()), 500);
|
|
3000
2317
|
}
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
element.style.setProperty("top", "0", "important");
|
|
3007
|
-
element.style.setProperty("left", "0", "important");
|
|
3008
|
-
element.style.setProperty("width", "100%", "important");
|
|
3009
|
-
element.style.setProperty("height", "100%", "important");
|
|
3010
|
-
} else if (originalStyle) {
|
|
3011
|
-
element.style.position = originalStyle.position;
|
|
3012
|
-
element.style.zIndex = originalStyle.zIndex;
|
|
3013
|
-
element.style.top = originalStyle.top;
|
|
3014
|
-
element.style.left = originalStyle.left;
|
|
3015
|
-
element.style.width = originalStyle.width;
|
|
3016
|
-
element.style.height = originalStyle.height;
|
|
2318
|
+
}
|
|
2319
|
+
handleThemeChange(e) {
|
|
2320
|
+
const mediaEvent = e, themeName = mediaEvent.matches ? this.container.options.defaultDarkTheme : this.container.options.defaultLightTheme, theme = this.container.options.themes.find((theme => theme.name === themeName));
|
|
2321
|
+
if (theme && theme.default.auto) {
|
|
2322
|
+
this.container.loadTheme(themeName);
|
|
3017
2323
|
}
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
2324
|
+
}
|
|
2325
|
+
handleClickMode(mode) {
|
|
2326
|
+
this.container.handleClickMode(mode);
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
class FrameManager {
|
|
2330
|
+
constructor(container) {
|
|
2331
|
+
this.container = container;
|
|
2332
|
+
}
|
|
2333
|
+
async nextFrame(timestamp) {
|
|
2334
|
+
var _a;
|
|
2335
|
+
try {
|
|
2336
|
+
const container = this.container;
|
|
2337
|
+
if (container.lastFrameTime !== undefined && timestamp < container.lastFrameTime + 1e3 / container.fpsLimit) {
|
|
2338
|
+
container.draw(false);
|
|
2339
|
+
return;
|
|
3021
2340
|
}
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
2341
|
+
(_a = container.lastFrameTime) !== null && _a !== void 0 ? _a : container.lastFrameTime = timestamp;
|
|
2342
|
+
const deltaValue = timestamp - container.lastFrameTime, delta = {
|
|
2343
|
+
value: deltaValue,
|
|
2344
|
+
factor: 60 * deltaValue / 1e3
|
|
2345
|
+
};
|
|
2346
|
+
container.lifeTime += delta.value;
|
|
2347
|
+
container.lastFrameTime = timestamp;
|
|
2348
|
+
if (deltaValue > 1e3) {
|
|
2349
|
+
container.draw(false);
|
|
2350
|
+
return;
|
|
3025
2351
|
}
|
|
3026
|
-
|
|
2352
|
+
await container.particles.draw(delta);
|
|
2353
|
+
if (container.duration > 0 && container.lifeTime > container.duration) {
|
|
2354
|
+
container.destroy();
|
|
2355
|
+
return;
|
|
2356
|
+
}
|
|
2357
|
+
if (container.getAnimationStatus()) {
|
|
2358
|
+
container.draw(false);
|
|
2359
|
+
}
|
|
2360
|
+
} catch (e) {
|
|
2361
|
+
console.error("tsParticles error in animation loop", e);
|
|
3027
2362
|
}
|
|
3028
2363
|
}
|
|
3029
|
-
paintBase(baseColor) {
|
|
3030
|
-
this.draw((ctx => {
|
|
3031
|
-
paintBase(ctx, this.size, baseColor);
|
|
3032
|
-
}));
|
|
3033
|
-
}
|
|
3034
|
-
lineStyle(p1, p2) {
|
|
3035
|
-
return this.draw((ctx => {
|
|
3036
|
-
const options = this.container.actualOptions;
|
|
3037
|
-
const connectOptions = options.interactivity.modes.connect;
|
|
3038
|
-
return gradient(ctx, p1, p2, connectOptions.links.opacity);
|
|
3039
|
-
}));
|
|
3040
|
-
}
|
|
3041
2364
|
}
|
|
3042
2365
|
class OptionsColor {
|
|
3043
2366
|
constructor() {
|
|
@@ -5500,14 +4823,14 @@
|
|
|
5500
4823
|
}
|
|
5501
4824
|
}
|
|
5502
4825
|
}
|
|
5503
|
-
var
|
|
4826
|
+
var __classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
5504
4827
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
5505
4828
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5506
4829
|
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");
|
|
5507
4830
|
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
5508
4831
|
value;
|
|
5509
4832
|
};
|
|
5510
|
-
var
|
|
4833
|
+
var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
5511
4834
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
5512
4835
|
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");
|
|
5513
4836
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -5517,7 +4840,7 @@
|
|
|
5517
4840
|
constructor(engine) {
|
|
5518
4841
|
_Options_instances.add(this);
|
|
5519
4842
|
_Options_engine.set(this, void 0);
|
|
5520
|
-
|
|
4843
|
+
__classPrivateFieldSet(this, _Options_engine, engine, "f");
|
|
5521
4844
|
this.autoPlay = true;
|
|
5522
4845
|
this.background = new Background;
|
|
5523
4846
|
this.backgroundMask = new BackgroundMask;
|
|
@@ -5610,7 +4933,7 @@
|
|
|
5610
4933
|
this.motion.load(data.motion);
|
|
5611
4934
|
this.particles.load(data.particles);
|
|
5612
4935
|
this.style = deepExtend(this.style, data.style);
|
|
5613
|
-
|
|
4936
|
+
__classPrivateFieldGet(this, _Options_engine, "f").plugins.loadOptions(this, data);
|
|
5614
4937
|
if (data.responsive !== undefined) {
|
|
5615
4938
|
for (const responsive of data.responsive) {
|
|
5616
4939
|
const optResponsive = new Responsive;
|
|
@@ -5626,36 +4949,163 @@
|
|
|
5626
4949
|
this.themes.push(optTheme);
|
|
5627
4950
|
}
|
|
5628
4951
|
}
|
|
5629
|
-
this.defaultDarkTheme = (_d =
|
|
5630
|
-
this.defaultLightTheme = (_e =
|
|
4952
|
+
this.defaultDarkTheme = (_d = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "dark")) === null || _d === void 0 ? void 0 : _d.name;
|
|
4953
|
+
this.defaultLightTheme = (_e = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "light")) === null || _e === void 0 ? void 0 : _e.name;
|
|
4954
|
+
}
|
|
4955
|
+
setTheme(name) {
|
|
4956
|
+
if (name) {
|
|
4957
|
+
const chosenTheme = this.themes.find((theme => theme.name === name));
|
|
4958
|
+
if (chosenTheme) {
|
|
4959
|
+
this.load(chosenTheme.options);
|
|
4960
|
+
}
|
|
4961
|
+
} else {
|
|
4962
|
+
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");
|
|
4963
|
+
if (defaultTheme) {
|
|
4964
|
+
this.load(defaultTheme.options);
|
|
4965
|
+
}
|
|
4966
|
+
}
|
|
4967
|
+
}
|
|
4968
|
+
setResponsive(width, pxRatio, defaultOptions) {
|
|
4969
|
+
this.load(defaultOptions);
|
|
4970
|
+
const responsiveOptions = this.responsive.find((t => t.mode === "screen" && screen ? t.maxWidth * pxRatio > screen.availWidth : t.maxWidth * pxRatio > width));
|
|
4971
|
+
this.load(responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.options);
|
|
4972
|
+
return responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.maxWidth;
|
|
4973
|
+
}
|
|
4974
|
+
importPreset(preset) {
|
|
4975
|
+
this.load(__classPrivateFieldGet(this, _Options_engine, "f").plugins.getPreset(preset));
|
|
4976
|
+
}
|
|
4977
|
+
}
|
|
4978
|
+
_Options_engine = new WeakMap, _Options_instances = new WeakSet, _Options_findDefaultTheme = function _Options_findDefaultTheme(mode) {
|
|
4979
|
+
var _a;
|
|
4980
|
+
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"));
|
|
4981
|
+
};
|
|
4982
|
+
var InteractionManager_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
4983
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4984
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4985
|
+
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");
|
|
4986
|
+
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
4987
|
+
value;
|
|
4988
|
+
};
|
|
4989
|
+
var InteractionManager_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
4990
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4991
|
+
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");
|
|
4992
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
4993
|
+
};
|
|
4994
|
+
var _InteractionManager_engine;
|
|
4995
|
+
class InteractionManager {
|
|
4996
|
+
constructor(engine, container) {
|
|
4997
|
+
this.container = container;
|
|
4998
|
+
_InteractionManager_engine.set(this, void 0);
|
|
4999
|
+
InteractionManager_classPrivateFieldSet(this, _InteractionManager_engine, engine, "f");
|
|
5000
|
+
this.externalInteractors = [];
|
|
5001
|
+
this.particleInteractors = [];
|
|
5002
|
+
this.init();
|
|
5003
|
+
}
|
|
5004
|
+
init() {
|
|
5005
|
+
const interactors = InteractionManager_classPrivateFieldGet(this, _InteractionManager_engine, "f").plugins.getInteractors(this.container, true);
|
|
5006
|
+
this.externalInteractors = [];
|
|
5007
|
+
this.particleInteractors = [];
|
|
5008
|
+
for (const interactor of interactors) {
|
|
5009
|
+
switch (interactor.type) {
|
|
5010
|
+
case 0:
|
|
5011
|
+
this.externalInteractors.push(interactor);
|
|
5012
|
+
break;
|
|
5013
|
+
|
|
5014
|
+
case 1:
|
|
5015
|
+
this.particleInteractors.push(interactor);
|
|
5016
|
+
break;
|
|
5017
|
+
}
|
|
5018
|
+
}
|
|
5019
|
+
}
|
|
5020
|
+
async externalInteract(delta) {
|
|
5021
|
+
for (const interactor of this.externalInteractors) {
|
|
5022
|
+
if (interactor.isEnabled()) {
|
|
5023
|
+
await interactor.interact(delta);
|
|
5024
|
+
}
|
|
5025
|
+
}
|
|
5026
|
+
}
|
|
5027
|
+
async particlesInteract(particle, delta) {
|
|
5028
|
+
for (const interactor of this.externalInteractors) {
|
|
5029
|
+
interactor.reset(particle);
|
|
5030
|
+
}
|
|
5031
|
+
for (const interactor of this.particleInteractors) {
|
|
5032
|
+
if (interactor.isEnabled(particle)) {
|
|
5033
|
+
await interactor.interact(particle, delta);
|
|
5034
|
+
}
|
|
5035
|
+
}
|
|
5036
|
+
}
|
|
5037
|
+
handleClickMode(mode) {
|
|
5038
|
+
for (const interactor of this.externalInteractors) {
|
|
5039
|
+
if (interactor.handleClickMode) {
|
|
5040
|
+
interactor.handleClickMode(mode);
|
|
5041
|
+
}
|
|
5042
|
+
}
|
|
5043
|
+
}
|
|
5044
|
+
}
|
|
5045
|
+
_InteractionManager_engine = new WeakMap;
|
|
5046
|
+
class Vector3d extends Vector {
|
|
5047
|
+
constructor(xOrCoords, y, z) {
|
|
5048
|
+
super(xOrCoords, y);
|
|
5049
|
+
if (typeof xOrCoords !== "number" && xOrCoords) {
|
|
5050
|
+
this.z = xOrCoords.z;
|
|
5051
|
+
} else if (z !== undefined) {
|
|
5052
|
+
this.z = z;
|
|
5053
|
+
} else {
|
|
5054
|
+
throw new Error("tsParticles - Vector not initialized correctly");
|
|
5055
|
+
}
|
|
5056
|
+
}
|
|
5057
|
+
static clone(source) {
|
|
5058
|
+
return Vector3d.create(source.x, source.y, source.z);
|
|
5059
|
+
}
|
|
5060
|
+
static create(x, y, z) {
|
|
5061
|
+
return new Vector3d(x, y, z);
|
|
5062
|
+
}
|
|
5063
|
+
static get origin() {
|
|
5064
|
+
return Vector3d.create(0, 0, 0);
|
|
5065
|
+
}
|
|
5066
|
+
add(v) {
|
|
5067
|
+
return v instanceof Vector3d ? Vector3d.create(this.x + v.x, this.y + v.y, this.z + v.z) : super.add(v);
|
|
5068
|
+
}
|
|
5069
|
+
addTo(v) {
|
|
5070
|
+
super.addTo(v);
|
|
5071
|
+
if (v instanceof Vector3d) {
|
|
5072
|
+
this.z += v.z;
|
|
5073
|
+
}
|
|
5631
5074
|
}
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
const mediaMatch = typeof matchMedia !== "undefined" && matchMedia("(prefers-color-scheme: dark)"), clientDarkMode = mediaMatch && mediaMatch.matches, defaultTheme = Options_classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, clientDarkMode ? "dark" : "light");
|
|
5640
|
-
if (defaultTheme) {
|
|
5641
|
-
this.load(defaultTheme.options);
|
|
5642
|
-
}
|
|
5075
|
+
sub(v) {
|
|
5076
|
+
return v instanceof Vector3d ? Vector3d.create(this.x - v.x, this.y - v.y, this.z - v.z) : super.sub(v);
|
|
5077
|
+
}
|
|
5078
|
+
subFrom(v) {
|
|
5079
|
+
super.subFrom(v);
|
|
5080
|
+
if (v instanceof Vector3d) {
|
|
5081
|
+
this.z -= v.z;
|
|
5643
5082
|
}
|
|
5644
5083
|
}
|
|
5645
|
-
|
|
5646
|
-
this.
|
|
5647
|
-
const responsiveOptions = this.responsive.find((t => t.mode === "screen" && screen ? t.maxWidth * pxRatio > screen.availWidth : t.maxWidth * pxRatio > width));
|
|
5648
|
-
this.load(responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.options);
|
|
5649
|
-
return responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.maxWidth;
|
|
5084
|
+
mult(n) {
|
|
5085
|
+
return Vector3d.create(this.x * n, this.y * n, this.z * n);
|
|
5650
5086
|
}
|
|
5651
|
-
|
|
5652
|
-
|
|
5087
|
+
multTo(n) {
|
|
5088
|
+
super.multTo(n);
|
|
5089
|
+
this.z *= n;
|
|
5090
|
+
}
|
|
5091
|
+
div(n) {
|
|
5092
|
+
return Vector3d.create(this.x / n, this.y / n, this.z / n);
|
|
5093
|
+
}
|
|
5094
|
+
divTo(n) {
|
|
5095
|
+
super.divTo(n);
|
|
5096
|
+
this.z /= n;
|
|
5097
|
+
}
|
|
5098
|
+
copy() {
|
|
5099
|
+
return Vector3d.clone(this);
|
|
5100
|
+
}
|
|
5101
|
+
setTo(v) {
|
|
5102
|
+
super.setTo(v);
|
|
5103
|
+
const v3d = v;
|
|
5104
|
+
if (v3d.z !== undefined) {
|
|
5105
|
+
this.z = v3d.z;
|
|
5106
|
+
}
|
|
5653
5107
|
}
|
|
5654
5108
|
}
|
|
5655
|
-
_Options_engine = new WeakMap, _Options_instances = new WeakSet, _Options_findDefaultTheme = function _Options_findDefaultTheme(mode) {
|
|
5656
|
-
var _a;
|
|
5657
|
-
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"));
|
|
5658
|
-
};
|
|
5659
5109
|
var Particle_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
5660
5110
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
5661
5111
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -5670,17 +5120,18 @@
|
|
|
5670
5120
|
};
|
|
5671
5121
|
var _Particle_engine;
|
|
5672
5122
|
const fixOutMode = data => {
|
|
5673
|
-
if (isInArray(data.outMode, data.checkModes) || isInArray(data.outMode, data.checkModes)) {
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5123
|
+
if (!(isInArray(data.outMode, data.checkModes) || isInArray(data.outMode, data.checkModes))) {
|
|
5124
|
+
return;
|
|
5125
|
+
}
|
|
5126
|
+
if (data.coord > data.maxCoord - data.radius * 2) {
|
|
5127
|
+
data.setCb(-data.radius);
|
|
5128
|
+
} else if (data.coord < data.radius * 2) {
|
|
5129
|
+
data.setCb(data.radius);
|
|
5679
5130
|
}
|
|
5680
5131
|
};
|
|
5681
5132
|
class Particle {
|
|
5682
5133
|
constructor(engine, id, container, position, overrideOptions, group) {
|
|
5683
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
5134
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
5684
5135
|
this.id = id;
|
|
5685
5136
|
this.container = container;
|
|
5686
5137
|
this.group = group;
|
|
@@ -5697,12 +5148,9 @@
|
|
|
5697
5148
|
maxDistance: {}
|
|
5698
5149
|
};
|
|
5699
5150
|
this.ignoresResizeRatio = true;
|
|
5700
|
-
const pxRatio = container.retina.pixelRatio;
|
|
5701
|
-
const mainOptions = container.actualOptions;
|
|
5702
|
-
const particlesOptions = new ParticlesOptions;
|
|
5151
|
+
const pxRatio = container.retina.pixelRatio, mainOptions = container.actualOptions, particlesOptions = new ParticlesOptions;
|
|
5703
5152
|
particlesOptions.load(mainOptions.particles);
|
|
5704
|
-
const shapeType = particlesOptions.shape.type;
|
|
5705
|
-
const reduceDuplicates = particlesOptions.reduceDuplicates;
|
|
5153
|
+
const shapeType = particlesOptions.shape.type, reduceDuplicates = particlesOptions.reduceDuplicates;
|
|
5706
5154
|
this.shape = shapeType instanceof Array ? itemFromArray(shapeType, this.id, reduceDuplicates) : shapeType;
|
|
5707
5155
|
if (overrideOptions === null || overrideOptions === void 0 ? void 0 : overrideOptions.shape) {
|
|
5708
5156
|
if (overrideOptions.shape.type) {
|
|
@@ -5800,25 +5248,6 @@
|
|
|
5800
5248
|
}
|
|
5801
5249
|
this.life = this.loadLife();
|
|
5802
5250
|
this.spawning = this.life.delay > 0;
|
|
5803
|
-
if (this.options.move.spin.enable) {
|
|
5804
|
-
const spinPos = (_h = this.options.move.spin.position) !== null && _h !== void 0 ? _h : {
|
|
5805
|
-
x: 50,
|
|
5806
|
-
y: 50
|
|
5807
|
-
};
|
|
5808
|
-
const spinCenter = {
|
|
5809
|
-
x: spinPos.x / 100 * container.canvas.size.width,
|
|
5810
|
-
y: spinPos.y / 100 * container.canvas.size.height
|
|
5811
|
-
};
|
|
5812
|
-
const pos = this.getPosition();
|
|
5813
|
-
const distance = getDistance(pos, spinCenter);
|
|
5814
|
-
this.spin = {
|
|
5815
|
-
center: spinCenter,
|
|
5816
|
-
direction: this.velocity.x >= 0 ? "clockwise" : "counter-clockwise",
|
|
5817
|
-
angle: this.velocity.angle,
|
|
5818
|
-
radius: distance,
|
|
5819
|
-
acceleration: (_j = this.retina.spinAcceleration) !== null && _j !== void 0 ? _j : getRangeValue(this.options.move.spin.acceleration)
|
|
5820
|
-
};
|
|
5821
|
-
}
|
|
5822
5251
|
this.shadowColor = colorToRgb(this.options.shadow.color);
|
|
5823
5252
|
for (const updater of container.particles.updaters) {
|
|
5824
5253
|
if (updater.init) {
|
|
@@ -5838,8 +5267,7 @@
|
|
|
5838
5267
|
return !this.destroyed && !this.spawning && this.isInsideCanvas();
|
|
5839
5268
|
}
|
|
5840
5269
|
isInsideCanvas() {
|
|
5841
|
-
const radius = this.getRadius();
|
|
5842
|
-
const canvasSize = this.container.canvas.size;
|
|
5270
|
+
const radius = this.getRadius(), canvasSize = this.container.canvas.size;
|
|
5843
5271
|
return this.position.x >= -radius && this.position.y >= -radius && this.position.y <= canvasSize.height + radius && this.position.x <= canvasSize.width + radius;
|
|
5844
5272
|
}
|
|
5845
5273
|
draw(delta) {
|
|
@@ -5921,17 +5349,17 @@
|
|
|
5921
5349
|
}
|
|
5922
5350
|
}
|
|
5923
5351
|
calcPosition(container, position, zIndex, tryCount = 0) {
|
|
5924
|
-
var _a, _b, _c, _d
|
|
5352
|
+
var _a, _b, _c, _d;
|
|
5925
5353
|
for (const [, plugin] of container.plugins) {
|
|
5926
5354
|
const pluginPos = plugin.particlePosition !== undefined ? plugin.particlePosition(position, this) : undefined;
|
|
5927
5355
|
if (pluginPos !== undefined) {
|
|
5928
5356
|
return Vector3d.create(pluginPos.x, pluginPos.y, zIndex);
|
|
5929
5357
|
}
|
|
5930
5358
|
}
|
|
5931
|
-
const canvasSize = container.canvas.size
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5359
|
+
const canvasSize = container.canvas.size, exactPosition = calcExactPositionOrRandomFromSize({
|
|
5360
|
+
size: canvasSize,
|
|
5361
|
+
position: position
|
|
5362
|
+
}), pos = Vector3d.create(exactPosition.x, exactPosition.y, zIndex), radius = this.getRadius(), outModes = this.options.move.outModes, fixHorizontal = outMode => {
|
|
5935
5363
|
fixOutMode({
|
|
5936
5364
|
outMode: outMode,
|
|
5937
5365
|
checkModes: [ "bounce", "bounce-horizontal" ],
|
|
@@ -5950,18 +5378,17 @@
|
|
|
5950
5378
|
radius: radius
|
|
5951
5379
|
});
|
|
5952
5380
|
};
|
|
5953
|
-
fixHorizontal((
|
|
5954
|
-
fixHorizontal((
|
|
5955
|
-
fixVertical((
|
|
5956
|
-
fixVertical((
|
|
5381
|
+
fixHorizontal((_a = outModes.left) !== null && _a !== void 0 ? _a : outModes.default);
|
|
5382
|
+
fixHorizontal((_b = outModes.right) !== null && _b !== void 0 ? _b : outModes.default);
|
|
5383
|
+
fixVertical((_c = outModes.top) !== null && _c !== void 0 ? _c : outModes.default);
|
|
5384
|
+
fixVertical((_d = outModes.bottom) !== null && _d !== void 0 ? _d : outModes.default);
|
|
5957
5385
|
if (this.checkOverlap(pos, tryCount)) {
|
|
5958
5386
|
return this.calcPosition(container, undefined, zIndex, tryCount + 1);
|
|
5959
5387
|
}
|
|
5960
5388
|
return pos;
|
|
5961
5389
|
}
|
|
5962
5390
|
checkOverlap(pos, tryCount = 0) {
|
|
5963
|
-
const collisionsOptions = this.options.collisions;
|
|
5964
|
-
const radius = this.getRadius();
|
|
5391
|
+
const collisionsOptions = this.options.collisions, radius = this.getRadius();
|
|
5965
5392
|
if (!collisionsOptions.enable) {
|
|
5966
5393
|
return false;
|
|
5967
5394
|
}
|
|
@@ -6002,10 +5429,7 @@
|
|
|
6002
5429
|
}
|
|
6003
5430
|
}
|
|
6004
5431
|
loadLife() {
|
|
6005
|
-
const container = this.container
|
|
6006
|
-
const particlesOptions = this.options;
|
|
6007
|
-
const lifeOptions = particlesOptions.life;
|
|
6008
|
-
const life = {
|
|
5432
|
+
const container = this.container, particlesOptions = this.options, lifeOptions = particlesOptions.life, life = {
|
|
6009
5433
|
delay: container.retina.reduceFactor ? getRangeValue(lifeOptions.delay.value) * (lifeOptions.delay.sync ? 1 : Math.random()) / container.retina.reduceFactor * 1e3 : 0,
|
|
6010
5434
|
delayTime: 0,
|
|
6011
5435
|
duration: container.retina.reduceFactor ? getRangeValue(lifeOptions.duration.value) * (lifeOptions.duration.sync ? 1 : Math.random()) / container.retina.reduceFactor * 1e3 : 0,
|
|
@@ -6022,6 +5446,178 @@
|
|
|
6022
5446
|
}
|
|
6023
5447
|
}
|
|
6024
5448
|
_Particle_engine = new WeakMap;
|
|
5449
|
+
class Point {
|
|
5450
|
+
constructor(position, particle) {
|
|
5451
|
+
this.position = position;
|
|
5452
|
+
this.particle = particle;
|
|
5453
|
+
}
|
|
5454
|
+
}
|
|
5455
|
+
class Range {
|
|
5456
|
+
constructor(x, y) {
|
|
5457
|
+
this.position = {
|
|
5458
|
+
x: x,
|
|
5459
|
+
y: y
|
|
5460
|
+
};
|
|
5461
|
+
}
|
|
5462
|
+
}
|
|
5463
|
+
class Circle extends Range {
|
|
5464
|
+
constructor(x, y, radius) {
|
|
5465
|
+
super(x, y);
|
|
5466
|
+
this.radius = radius;
|
|
5467
|
+
}
|
|
5468
|
+
contains(point) {
|
|
5469
|
+
return getDistance(point, this.position) <= this.radius;
|
|
5470
|
+
}
|
|
5471
|
+
intersects(range) {
|
|
5472
|
+
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;
|
|
5473
|
+
if (circle.radius !== undefined) {
|
|
5474
|
+
const rSum = r + circle.radius, dist = Math.sqrt(xDist * xDist + yDist + yDist);
|
|
5475
|
+
return rSum > dist;
|
|
5476
|
+
} else if (rect.size !== undefined) {
|
|
5477
|
+
const w = rect.size.width, h = rect.size.height, edges = Math.pow(xDist - w, 2) + Math.pow(yDist - h, 2);
|
|
5478
|
+
if (xDist > r + w || yDist > r + h) {
|
|
5479
|
+
return false;
|
|
5480
|
+
}
|
|
5481
|
+
if (xDist <= w || yDist <= h) {
|
|
5482
|
+
return true;
|
|
5483
|
+
}
|
|
5484
|
+
return edges <= r * r;
|
|
5485
|
+
}
|
|
5486
|
+
return false;
|
|
5487
|
+
}
|
|
5488
|
+
}
|
|
5489
|
+
class Rectangle extends Range {
|
|
5490
|
+
constructor(x, y, width, height) {
|
|
5491
|
+
super(x, y);
|
|
5492
|
+
this.size = {
|
|
5493
|
+
height: height,
|
|
5494
|
+
width: width
|
|
5495
|
+
};
|
|
5496
|
+
}
|
|
5497
|
+
contains(point) {
|
|
5498
|
+
const w = this.size.width, h = this.size.height, pos = this.position;
|
|
5499
|
+
return point.x >= pos.x && point.x <= pos.x + w && point.y >= pos.y && point.y <= pos.y + h;
|
|
5500
|
+
}
|
|
5501
|
+
intersects(range) {
|
|
5502
|
+
const rect = range, circle = range, w = this.size.width, h = this.size.height, pos1 = this.position, pos2 = range.position;
|
|
5503
|
+
if (circle.radius !== undefined) {
|
|
5504
|
+
return circle.intersects(this);
|
|
5505
|
+
}
|
|
5506
|
+
if (!rect.size) {
|
|
5507
|
+
return false;
|
|
5508
|
+
}
|
|
5509
|
+
const size2 = rect.size, w2 = size2.width, h2 = size2.height;
|
|
5510
|
+
return pos2.x < pos1.x + w && pos2.x + w2 > pos1.x && pos2.y < pos1.y + h && pos2.y + h2 > pos1.y;
|
|
5511
|
+
}
|
|
5512
|
+
}
|
|
5513
|
+
class CircleWarp extends Circle {
|
|
5514
|
+
constructor(x, y, radius, canvasSize) {
|
|
5515
|
+
super(x, y, radius);
|
|
5516
|
+
this.canvasSize = canvasSize;
|
|
5517
|
+
this.canvasSize = Object.assign({}, canvasSize);
|
|
5518
|
+
}
|
|
5519
|
+
contains(point) {
|
|
5520
|
+
if (super.contains(point)) {
|
|
5521
|
+
return true;
|
|
5522
|
+
}
|
|
5523
|
+
const posNE = {
|
|
5524
|
+
x: point.x - this.canvasSize.width,
|
|
5525
|
+
y: point.y
|
|
5526
|
+
};
|
|
5527
|
+
if (super.contains(posNE)) {
|
|
5528
|
+
return true;
|
|
5529
|
+
}
|
|
5530
|
+
const posSE = {
|
|
5531
|
+
x: point.x - this.canvasSize.width,
|
|
5532
|
+
y: point.y - this.canvasSize.height
|
|
5533
|
+
};
|
|
5534
|
+
if (super.contains(posSE)) {
|
|
5535
|
+
return true;
|
|
5536
|
+
}
|
|
5537
|
+
const posSW = {
|
|
5538
|
+
x: point.x,
|
|
5539
|
+
y: point.y - this.canvasSize.height
|
|
5540
|
+
};
|
|
5541
|
+
return super.contains(posSW);
|
|
5542
|
+
}
|
|
5543
|
+
intersects(range) {
|
|
5544
|
+
if (super.intersects(range)) {
|
|
5545
|
+
return true;
|
|
5546
|
+
}
|
|
5547
|
+
const rect = range, circle = range, newPos = {
|
|
5548
|
+
x: range.position.x - this.canvasSize.width,
|
|
5549
|
+
y: range.position.y - this.canvasSize.height
|
|
5550
|
+
};
|
|
5551
|
+
if (circle.radius !== undefined) {
|
|
5552
|
+
const biggerCircle = new Circle(newPos.x, newPos.y, circle.radius * 2);
|
|
5553
|
+
return super.intersects(biggerCircle);
|
|
5554
|
+
} else if (rect.size !== undefined) {
|
|
5555
|
+
const rectSW = new Rectangle(newPos.x, newPos.y, rect.size.width * 2, rect.size.height * 2);
|
|
5556
|
+
return super.intersects(rectSW);
|
|
5557
|
+
}
|
|
5558
|
+
return false;
|
|
5559
|
+
}
|
|
5560
|
+
}
|
|
5561
|
+
class QuadTree {
|
|
5562
|
+
constructor(rectangle, capacity) {
|
|
5563
|
+
this.rectangle = rectangle;
|
|
5564
|
+
this.capacity = capacity;
|
|
5565
|
+
this.points = [];
|
|
5566
|
+
this.divided = false;
|
|
5567
|
+
}
|
|
5568
|
+
insert(point) {
|
|
5569
|
+
var _a, _b, _c, _d, _e;
|
|
5570
|
+
if (!this.rectangle.contains(point.position)) {
|
|
5571
|
+
return false;
|
|
5572
|
+
}
|
|
5573
|
+
if (this.points.length < this.capacity) {
|
|
5574
|
+
this.points.push(point);
|
|
5575
|
+
return true;
|
|
5576
|
+
}
|
|
5577
|
+
if (!this.divided) {
|
|
5578
|
+
this.subdivide();
|
|
5579
|
+
}
|
|
5580
|
+
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;
|
|
5581
|
+
}
|
|
5582
|
+
queryCircle(position, radius) {
|
|
5583
|
+
return this.query(new Circle(position.x, position.y, radius));
|
|
5584
|
+
}
|
|
5585
|
+
queryCircleWarp(position, radius, containerOrSize) {
|
|
5586
|
+
const container = containerOrSize, size = containerOrSize;
|
|
5587
|
+
return this.query(new CircleWarp(position.x, position.y, radius, container.canvas !== undefined ? container.canvas.size : size));
|
|
5588
|
+
}
|
|
5589
|
+
queryRectangle(position, size) {
|
|
5590
|
+
return this.query(new Rectangle(position.x, position.y, size.width, size.height));
|
|
5591
|
+
}
|
|
5592
|
+
query(range, found) {
|
|
5593
|
+
var _a, _b, _c, _d;
|
|
5594
|
+
const res = found !== null && found !== void 0 ? found : [];
|
|
5595
|
+
if (!range.intersects(this.rectangle)) {
|
|
5596
|
+
return [];
|
|
5597
|
+
}
|
|
5598
|
+
for (const p of this.points) {
|
|
5599
|
+
if (!range.contains(p.position) && getDistance(range.position, p.position) > p.particle.getRadius()) {
|
|
5600
|
+
continue;
|
|
5601
|
+
}
|
|
5602
|
+
res.push(p.particle);
|
|
5603
|
+
}
|
|
5604
|
+
if (this.divided) {
|
|
5605
|
+
(_a = this.northEast) === null || _a === void 0 ? void 0 : _a.query(range, res);
|
|
5606
|
+
(_b = this.northWest) === null || _b === void 0 ? void 0 : _b.query(range, res);
|
|
5607
|
+
(_c = this.southEast) === null || _c === void 0 ? void 0 : _c.query(range, res);
|
|
5608
|
+
(_d = this.southWest) === null || _d === void 0 ? void 0 : _d.query(range, res);
|
|
5609
|
+
}
|
|
5610
|
+
return res;
|
|
5611
|
+
}
|
|
5612
|
+
subdivide() {
|
|
5613
|
+
const x = this.rectangle.position.x, y = this.rectangle.position.y, w = this.rectangle.size.width, h = this.rectangle.size.height, capacity = this.capacity;
|
|
5614
|
+
this.northEast = new QuadTree(new Rectangle(x, y, w / 2, h / 2), capacity);
|
|
5615
|
+
this.northWest = new QuadTree(new Rectangle(x + w / 2, y, w / 2, h / 2), capacity);
|
|
5616
|
+
this.southEast = new QuadTree(new Rectangle(x, y + h / 2, w / 2, h / 2), capacity);
|
|
5617
|
+
this.southWest = new QuadTree(new Rectangle(x + w / 2, y + h / 2, w / 2, h / 2), capacity);
|
|
5618
|
+
this.divided = true;
|
|
5619
|
+
}
|
|
5620
|
+
}
|
|
6025
5621
|
var Particles_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
6026
5622
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
6027
5623
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -6043,7 +5639,6 @@
|
|
|
6043
5639
|
this.nextId = 0;
|
|
6044
5640
|
this.array = [];
|
|
6045
5641
|
this.zArray = [];
|
|
6046
|
-
this.mover = new ParticlesMover(container);
|
|
6047
5642
|
this.limit = 0;
|
|
6048
5643
|
this.needsSort = false;
|
|
6049
5644
|
this.lastZIndex = 0;
|
|
@@ -6055,6 +5650,7 @@
|
|
|
6055
5650
|
const canvasSize = this.container.canvas.size;
|
|
6056
5651
|
this.linksColors = new Map;
|
|
6057
5652
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
5653
|
+
this.movers = Particles_classPrivateFieldGet(this, _Particles_engine, "f").plugins.getMovers(container, true);
|
|
6058
5654
|
this.updaters = Particles_classPrivateFieldGet(this, _Particles_engine, "f").plugins.getUpdaters(container, true);
|
|
6059
5655
|
}
|
|
6060
5656
|
get count() {
|
|
@@ -6062,8 +5658,7 @@
|
|
|
6062
5658
|
}
|
|
6063
5659
|
init() {
|
|
6064
5660
|
var _a;
|
|
6065
|
-
const container = this.container;
|
|
6066
|
-
const options = container.actualOptions;
|
|
5661
|
+
const container = this.container, options = container.actualOptions;
|
|
6067
5662
|
this.lastZIndex = 0;
|
|
6068
5663
|
this.needsSort = false;
|
|
6069
5664
|
this.freqs.links = new Map;
|
|
@@ -6123,8 +5718,7 @@
|
|
|
6123
5718
|
this.removeAt(this.array.indexOf(particle), undefined, group, override);
|
|
6124
5719
|
}
|
|
6125
5720
|
async update(delta) {
|
|
6126
|
-
const container = this.container;
|
|
6127
|
-
const particlesToDelete = [];
|
|
5721
|
+
const container = this.container, particlesToDelete = [];
|
|
6128
5722
|
container.pathGenerator.update();
|
|
6129
5723
|
for (const [, plugin] of container.plugins) {
|
|
6130
5724
|
if (plugin.update !== undefined) {
|
|
@@ -6147,7 +5741,11 @@
|
|
|
6147
5741
|
plugin.particleUpdate(particle, delta);
|
|
6148
5742
|
}
|
|
6149
5743
|
}
|
|
6150
|
-
this.
|
|
5744
|
+
for (const mover of this.movers) {
|
|
5745
|
+
if (mover.isEnabled(particle)) {
|
|
5746
|
+
mover.move(particle, delta);
|
|
5747
|
+
}
|
|
5748
|
+
}
|
|
6151
5749
|
if (particle.destroyed) {
|
|
6152
5750
|
particlesToDelete.push(particle);
|
|
6153
5751
|
continue;
|
|
@@ -6169,10 +5767,9 @@
|
|
|
6169
5767
|
delete container.canvas.resizeFactor;
|
|
6170
5768
|
}
|
|
6171
5769
|
async draw(delta) {
|
|
6172
|
-
const container = this.container;
|
|
6173
|
-
container.canvas.clear();
|
|
6174
|
-
const canvasSize = this.container.canvas.size;
|
|
5770
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
6175
5771
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
5772
|
+
container.canvas.clear();
|
|
6176
5773
|
await this.update(delta);
|
|
6177
5774
|
if (this.needsSort) {
|
|
6178
5775
|
this.zArray.sort(((a, b) => b.position.z - a.position.z || a.id - b.id));
|
|
@@ -6223,8 +5820,7 @@
|
|
|
6223
5820
|
options.size.value.max /= factor;
|
|
6224
5821
|
}
|
|
6225
5822
|
options.load(splitOptions.particles);
|
|
6226
|
-
const offset = splitOptions.sizeOffset ? setRangeValue(-parent.size.value, parent.size.value) : 0
|
|
6227
|
-
const position = {
|
|
5823
|
+
const offset = splitOptions.sizeOffset ? setRangeValue(-parent.size.value, parent.size.value) : 0, position = {
|
|
6228
5824
|
x: parent.position.x + randomInRange(offset),
|
|
6229
5825
|
y: parent.position.y + randomInRange(offset)
|
|
6230
5826
|
};
|
|
@@ -6275,11 +5871,10 @@
|
|
|
6275
5871
|
addManualParticles() {
|
|
6276
5872
|
const container = this.container, options = container.actualOptions;
|
|
6277
5873
|
for (const particle of options.manualParticles) {
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
}
|
|
6282
|
-
this.addParticle(pos, particle.options);
|
|
5874
|
+
this.addParticle(calcPositionFromSize({
|
|
5875
|
+
size: container.canvas.size,
|
|
5876
|
+
position: particle.position
|
|
5877
|
+
}), particle.options);
|
|
6283
5878
|
}
|
|
6284
5879
|
}
|
|
6285
5880
|
setDensity() {
|
|
@@ -6289,17 +5884,15 @@
|
|
|
6289
5884
|
}
|
|
6290
5885
|
this.applyDensity(options.particles, options.manualParticles.length);
|
|
6291
5886
|
}
|
|
5887
|
+
handleClickMode(mode) {
|
|
5888
|
+
this.interactionManager.handleClickMode(mode);
|
|
5889
|
+
}
|
|
6292
5890
|
applyDensity(options, manualCount, group) {
|
|
6293
5891
|
var _a;
|
|
6294
5892
|
if (!((_a = options.number.density) === null || _a === void 0 ? void 0 : _a.enable)) {
|
|
6295
5893
|
return;
|
|
6296
5894
|
}
|
|
6297
|
-
const numberOptions = options.number;
|
|
6298
|
-
const densityFactor = this.initDensityFactor(numberOptions.density);
|
|
6299
|
-
const optParticlesNumber = numberOptions.value;
|
|
6300
|
-
const optParticlesLimit = numberOptions.limit > 0 ? numberOptions.limit : optParticlesNumber;
|
|
6301
|
-
const particlesNumber = Math.min(optParticlesNumber, optParticlesLimit) * densityFactor + manualCount;
|
|
6302
|
-
const particlesCount = Math.min(this.count, this.array.filter((t => t.group === group)).length);
|
|
5895
|
+
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);
|
|
6303
5896
|
this.limit = numberOptions.limit * densityFactor;
|
|
6304
5897
|
if (particlesCount < particlesNumber) {
|
|
6305
5898
|
this.push(Math.abs(particlesNumber - particlesCount), undefined, options, group);
|
|
@@ -6341,8 +5934,7 @@
|
|
|
6341
5934
|
this.container = container;
|
|
6342
5935
|
}
|
|
6343
5936
|
init() {
|
|
6344
|
-
const container = this.container;
|
|
6345
|
-
const options = container.actualOptions;
|
|
5937
|
+
const container = this.container, options = container.actualOptions;
|
|
6346
5938
|
this.pixelRatio = !options.detectRetina || isSsr() ? 1 : window.devicePixelRatio;
|
|
6347
5939
|
const motionOptions = this.container.actualOptions.motion;
|
|
6348
5940
|
if (motionOptions && (motionOptions.disable || motionOptions.reduce.value)) {
|
|
@@ -6378,9 +5970,6 @@
|
|
|
6378
5970
|
this.linksWidth = particles.links.width * ratio;
|
|
6379
5971
|
this.sizeAnimationSpeed = getRangeValue(particles.size.animation.speed) * ratio;
|
|
6380
5972
|
this.maxSpeed = getRangeValue(particles.move.gravity.maxSpeed) * ratio;
|
|
6381
|
-
if (particles.orbit.radius !== undefined) {
|
|
6382
|
-
this.orbitRadius = getRangeValue(particles.orbit.radius) * this.container.retina.pixelRatio;
|
|
6383
|
-
}
|
|
6384
5973
|
const modes = options.interactivity.modes;
|
|
6385
5974
|
this.connectModeDistance = modes.connect.distance * ratio;
|
|
6386
5975
|
this.connectModeRadius = modes.connect.radius * ratio;
|
|
@@ -6395,19 +5984,13 @@
|
|
|
6395
5984
|
}
|
|
6396
5985
|
}
|
|
6397
5986
|
initParticle(particle) {
|
|
6398
|
-
const options = particle.options;
|
|
6399
|
-
const ratio = this.pixelRatio;
|
|
6400
|
-
const moveDistance = options.move.distance;
|
|
6401
|
-
const props = particle.retina;
|
|
5987
|
+
const options = particle.options, ratio = this.pixelRatio, moveDistance = options.move.distance, props = particle.retina;
|
|
6402
5988
|
props.attractDistance = getRangeValue(options.move.attract.distance) * ratio;
|
|
6403
5989
|
props.linksDistance = options.links.distance * ratio;
|
|
6404
5990
|
props.linksWidth = options.links.width * ratio;
|
|
6405
5991
|
props.moveDrift = getRangeValue(options.move.drift) * ratio;
|
|
6406
5992
|
props.moveSpeed = getRangeValue(options.move.speed) * ratio;
|
|
6407
5993
|
props.sizeAnimationSpeed = getRangeValue(options.size.animation.speed) * ratio;
|
|
6408
|
-
if (particle.spin) {
|
|
6409
|
-
props.spinAcceleration = getRangeValue(options.move.spin.acceleration) * ratio;
|
|
6410
|
-
}
|
|
6411
5994
|
const maxDistance = props.maxDistance;
|
|
6412
5995
|
maxDistance.horizontal = moveDistance.horizontal !== undefined ? moveDistance.horizontal * ratio : undefined;
|
|
6413
5996
|
maxDistance.vertical = moveDistance.vertical !== undefined ? moveDistance.vertical * ratio : undefined;
|
|
@@ -6474,13 +6057,6 @@
|
|
|
6474
6057
|
inside: false
|
|
6475
6058
|
}
|
|
6476
6059
|
};
|
|
6477
|
-
this.bubble = {};
|
|
6478
|
-
this.repulse = {
|
|
6479
|
-
particles: []
|
|
6480
|
-
};
|
|
6481
|
-
this.attract = {
|
|
6482
|
-
particles: []
|
|
6483
|
-
};
|
|
6484
6060
|
this.plugins = new Map;
|
|
6485
6061
|
this.drawers = new Map;
|
|
6486
6062
|
this.density = 1;
|
|
@@ -6668,8 +6244,7 @@
|
|
|
6668
6244
|
if (this.destroyed) {
|
|
6669
6245
|
return;
|
|
6670
6246
|
}
|
|
6671
|
-
const mouseEvent = e
|
|
6672
|
-
const pos = {
|
|
6247
|
+
const mouseEvent = e, pos = {
|
|
6673
6248
|
x: mouseEvent.offsetX || mouseEvent.clientX,
|
|
6674
6249
|
y: mouseEvent.offsetY || mouseEvent.clientY
|
|
6675
6250
|
};
|
|
@@ -6702,8 +6277,7 @@
|
|
|
6702
6277
|
return;
|
|
6703
6278
|
}
|
|
6704
6279
|
}
|
|
6705
|
-
const canvasRect = (_a = this.canvas.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()
|
|
6706
|
-
const pos = {
|
|
6280
|
+
const canvasRect = (_a = this.canvas.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect(), pos = {
|
|
6707
6281
|
x: lastTouch.clientX - ((_b = canvasRect === null || canvasRect === void 0 ? void 0 : canvasRect.left) !== null && _b !== void 0 ? _b : 0),
|
|
6708
6282
|
y: lastTouch.clientY - ((_c = canvasRect === null || canvasRect === void 0 ? void 0 : canvasRect.top) !== null && _c !== void 0 ? _c : 0)
|
|
6709
6283
|
};
|
|
@@ -6727,6 +6301,14 @@
|
|
|
6727
6301
|
el.addEventListener("touchend", touchEndHandler);
|
|
6728
6302
|
el.addEventListener("touchcancel", touchCancelHandler);
|
|
6729
6303
|
}
|
|
6304
|
+
handleClickMode(mode) {
|
|
6305
|
+
this.particles.handleClickMode(mode);
|
|
6306
|
+
for (const [, plugin] of this.plugins) {
|
|
6307
|
+
if (plugin.handleClickMode) {
|
|
6308
|
+
plugin.handleClickMode(mode);
|
|
6309
|
+
}
|
|
6310
|
+
}
|
|
6311
|
+
}
|
|
6730
6312
|
updateActualOptions() {
|
|
6731
6313
|
this.actualOptions.responsive = [];
|
|
6732
6314
|
const newMaxWidth = this.actualOptions.setResponsive(this.canvas.size.width, this.retina.pixelRatio, this._options);
|
|
@@ -6842,17 +6424,14 @@
|
|
|
6842
6424
|
}
|
|
6843
6425
|
async loadOptions(params) {
|
|
6844
6426
|
var _a, _b, _c;
|
|
6845
|
-
const tagId = (_a = params.tagId) !== null && _a !== void 0 ? _a : `tsparticles${Math.floor(Math.random() * 1e4)}
|
|
6846
|
-
const {options: options, index: index} = params;
|
|
6427
|
+
const tagId = (_a = params.tagId) !== null && _a !== void 0 ? _a : `tsparticles${Math.floor(Math.random() * 1e4)}`, {options: options, index: index} = params;
|
|
6847
6428
|
let domContainer = (_b = params.element) !== null && _b !== void 0 ? _b : document.getElementById(tagId);
|
|
6848
6429
|
if (!domContainer) {
|
|
6849
6430
|
domContainer = document.createElement("div");
|
|
6850
6431
|
domContainer.id = tagId;
|
|
6851
6432
|
(_c = document.querySelector("body")) === null || _c === void 0 ? void 0 : _c.append(domContainer);
|
|
6852
6433
|
}
|
|
6853
|
-
const currentOptions = options instanceof Array ? itemFromArray(options, index) : options;
|
|
6854
|
-
const dom = this.dom();
|
|
6855
|
-
const oldIndex = dom.findIndex((v => v.id === tagId));
|
|
6434
|
+
const currentOptions = options instanceof Array ? itemFromArray(options, index) : options, dom = this.dom(), oldIndex = dom.findIndex((v => v.id === tagId));
|
|
6856
6435
|
if (oldIndex >= 0) {
|
|
6857
6436
|
const old = this.domItem(oldIndex);
|
|
6858
6437
|
if (old && !old.destroyed) {
|
|
@@ -6888,8 +6467,7 @@
|
|
|
6888
6467
|
return newItem;
|
|
6889
6468
|
}
|
|
6890
6469
|
async loadRemoteOptions(params) {
|
|
6891
|
-
const {url: jsonUrl, index: index} = params;
|
|
6892
|
-
const url = jsonUrl instanceof Array ? itemFromArray(jsonUrl, index) : jsonUrl;
|
|
6470
|
+
const {url: jsonUrl, index: index} = params, url = jsonUrl instanceof Array ? itemFromArray(jsonUrl, index) : jsonUrl;
|
|
6893
6471
|
if (!url) {
|
|
6894
6472
|
return;
|
|
6895
6473
|
}
|
|
@@ -6978,7 +6556,7 @@
|
|
|
6978
6556
|
}
|
|
6979
6557
|
setOnClickHandler(callback) {
|
|
6980
6558
|
const dom = this.dom();
|
|
6981
|
-
if (dom.length
|
|
6559
|
+
if (!dom.length) {
|
|
6982
6560
|
throw new Error("Can only set click handlers after calling tsParticles.load() or tsParticles.loadJSON()");
|
|
6983
6561
|
}
|
|
6984
6562
|
for (const domItem of dom) {
|
|
@@ -6987,6 +6565,114 @@
|
|
|
6987
6565
|
}
|
|
6988
6566
|
}
|
|
6989
6567
|
_Loader_engine = new WeakMap;
|
|
6568
|
+
var Plugins_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
6569
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
6570
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
6571
|
+
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");
|
|
6572
|
+
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
6573
|
+
value;
|
|
6574
|
+
};
|
|
6575
|
+
var _Plugins_engine;
|
|
6576
|
+
class Plugins {
|
|
6577
|
+
constructor(engine) {
|
|
6578
|
+
_Plugins_engine.set(this, void 0);
|
|
6579
|
+
Plugins_classPrivateFieldSet(this, _Plugins_engine, engine, "f");
|
|
6580
|
+
this.plugins = [];
|
|
6581
|
+
this.interactorsInitializers = new Map;
|
|
6582
|
+
this.moversInitializers = new Map;
|
|
6583
|
+
this.updatersInitializers = new Map;
|
|
6584
|
+
this.interactors = new Map;
|
|
6585
|
+
this.movers = new Map;
|
|
6586
|
+
this.updaters = new Map;
|
|
6587
|
+
this.presets = new Map;
|
|
6588
|
+
this.drawers = new Map;
|
|
6589
|
+
this.pathGenerators = new Map;
|
|
6590
|
+
}
|
|
6591
|
+
getPlugin(plugin) {
|
|
6592
|
+
return this.plugins.find((t => t.id === plugin));
|
|
6593
|
+
}
|
|
6594
|
+
addPlugin(plugin) {
|
|
6595
|
+
if (!this.getPlugin(plugin.id)) {
|
|
6596
|
+
this.plugins.push(plugin);
|
|
6597
|
+
}
|
|
6598
|
+
}
|
|
6599
|
+
getAvailablePlugins(container) {
|
|
6600
|
+
const res = new Map;
|
|
6601
|
+
for (const plugin of this.plugins) {
|
|
6602
|
+
if (!plugin.needsPlugin(container.actualOptions)) {
|
|
6603
|
+
continue;
|
|
6604
|
+
}
|
|
6605
|
+
res.set(plugin.id, plugin.getPlugin(container));
|
|
6606
|
+
}
|
|
6607
|
+
return res;
|
|
6608
|
+
}
|
|
6609
|
+
loadOptions(options, sourceOptions) {
|
|
6610
|
+
for (const plugin of this.plugins) {
|
|
6611
|
+
plugin.loadOptions(options, sourceOptions);
|
|
6612
|
+
}
|
|
6613
|
+
}
|
|
6614
|
+
getPreset(preset) {
|
|
6615
|
+
return this.presets.get(preset);
|
|
6616
|
+
}
|
|
6617
|
+
addPreset(presetKey, options, override = false) {
|
|
6618
|
+
if (override || !this.getPreset(presetKey)) {
|
|
6619
|
+
this.presets.set(presetKey, options);
|
|
6620
|
+
}
|
|
6621
|
+
}
|
|
6622
|
+
getShapeDrawer(type) {
|
|
6623
|
+
return this.drawers.get(type);
|
|
6624
|
+
}
|
|
6625
|
+
addShapeDrawer(type, drawer) {
|
|
6626
|
+
if (!this.getShapeDrawer(type)) {
|
|
6627
|
+
this.drawers.set(type, drawer);
|
|
6628
|
+
}
|
|
6629
|
+
}
|
|
6630
|
+
getSupportedShapes() {
|
|
6631
|
+
return this.drawers.keys();
|
|
6632
|
+
}
|
|
6633
|
+
getPathGenerator(type) {
|
|
6634
|
+
return this.pathGenerators.get(type);
|
|
6635
|
+
}
|
|
6636
|
+
addPathGenerator(type, pathGenerator) {
|
|
6637
|
+
if (!this.getPathGenerator(type)) {
|
|
6638
|
+
this.pathGenerators.set(type, pathGenerator);
|
|
6639
|
+
}
|
|
6640
|
+
}
|
|
6641
|
+
getInteractors(container, force = false) {
|
|
6642
|
+
let res = this.interactors.get(container);
|
|
6643
|
+
if (!res || force) {
|
|
6644
|
+
res = [ ...this.interactorsInitializers.values() ].map((t => t(container)));
|
|
6645
|
+
this.interactors.set(container, res);
|
|
6646
|
+
}
|
|
6647
|
+
return res;
|
|
6648
|
+
}
|
|
6649
|
+
addInteractor(name, initInteractor) {
|
|
6650
|
+
this.interactorsInitializers.set(name, initInteractor);
|
|
6651
|
+
}
|
|
6652
|
+
getUpdaters(container, force = false) {
|
|
6653
|
+
let res = this.updaters.get(container);
|
|
6654
|
+
if (!res || force) {
|
|
6655
|
+
res = [ ...this.updatersInitializers.values() ].map((t => t(container)));
|
|
6656
|
+
this.updaters.set(container, res);
|
|
6657
|
+
}
|
|
6658
|
+
return res;
|
|
6659
|
+
}
|
|
6660
|
+
addParticleUpdater(name, initUpdater) {
|
|
6661
|
+
this.updatersInitializers.set(name, initUpdater);
|
|
6662
|
+
}
|
|
6663
|
+
getMovers(container, force = false) {
|
|
6664
|
+
let res = this.movers.get(container);
|
|
6665
|
+
if (!res || force) {
|
|
6666
|
+
res = [ ...this.moversInitializers.values() ].map((t => t(container)));
|
|
6667
|
+
this.movers.set(container, res);
|
|
6668
|
+
}
|
|
6669
|
+
return res;
|
|
6670
|
+
}
|
|
6671
|
+
addParticleMover(name, initMover) {
|
|
6672
|
+
this.moversInitializers.set(name, initMover);
|
|
6673
|
+
}
|
|
6674
|
+
}
|
|
6675
|
+
_Plugins_engine = new WeakMap;
|
|
6990
6676
|
var engine_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
6991
6677
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
6992
6678
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -7074,6 +6760,10 @@
|
|
|
7074
6760
|
this.plugins.addInteractor(name, interactorInitializer);
|
|
7075
6761
|
await this.refresh();
|
|
7076
6762
|
}
|
|
6763
|
+
async addMover(name, moverInitializer) {
|
|
6764
|
+
this.plugins.addParticleMover(name, moverInitializer);
|
|
6765
|
+
await this.refresh();
|
|
6766
|
+
}
|
|
7077
6767
|
async addParticleUpdater(name, updaterInitializer) {
|
|
7078
6768
|
this.plugins.addParticleUpdater(name, updaterInitializer);
|
|
7079
6769
|
await this.refresh();
|
|
@@ -7214,8 +6904,7 @@
|
|
|
7214
6904
|
this.position = (_c = (_b = this.initialPosition) === null || _b === void 0 ? void 0 : _b.copy()) !== null && _c !== void 0 ? _c : this.calcPosition();
|
|
7215
6905
|
}
|
|
7216
6906
|
attract(particle) {
|
|
7217
|
-
const container = this.container;
|
|
7218
|
-
const options = this.options;
|
|
6907
|
+
const container = this.container, options = this.options;
|
|
7219
6908
|
if (options.draggable) {
|
|
7220
6909
|
const mouse = container.interactivity.mouse;
|
|
7221
6910
|
if (mouse.clicking && mouse.downPosition) {
|
|
@@ -7231,9 +6920,7 @@
|
|
|
7231
6920
|
this.position.y = mouse.position.y;
|
|
7232
6921
|
}
|
|
7233
6922
|
}
|
|
7234
|
-
const pos = particle.getPosition();
|
|
7235
|
-
const {dx: dx, dy: dy, distance: distance} = getDistances(this.position, pos);
|
|
7236
|
-
const v = Vector.create(dx, dy);
|
|
6923
|
+
const pos = particle.getPosition(), {dx: dx, dy: dy, distance: distance} = getDistances(this.position, pos), v = Vector.create(dx, dy);
|
|
7237
6924
|
v.length = this.mass / Math.pow(distance, 2) * container.retina.reduceFactor;
|
|
7238
6925
|
if (distance < this.size + particle.getRadius()) {
|
|
7239
6926
|
const sizeFactor = particle.getRadius() * .033 * container.retina.pixelRatio;
|
|
@@ -7273,21 +6960,23 @@
|
|
|
7273
6960
|
context.fill();
|
|
7274
6961
|
}
|
|
7275
6962
|
calcPosition() {
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
6963
|
+
const exactPosition = calcPositionOrRandomFromSizeRanged({
|
|
6964
|
+
size: this.container.canvas.size,
|
|
6965
|
+
position: this.options.position
|
|
6966
|
+
});
|
|
6967
|
+
return Vector.create(exactPosition.x, exactPosition.y);
|
|
7280
6968
|
}
|
|
7281
6969
|
updateParticlePosition(particle, v) {
|
|
7282
6970
|
var _a;
|
|
7283
6971
|
if (particle.destroyed) {
|
|
7284
6972
|
return;
|
|
7285
6973
|
}
|
|
7286
|
-
const container = this.container;
|
|
7287
|
-
const canvasSize = container.canvas.size;
|
|
6974
|
+
const container = this.container, canvasSize = container.canvas.size;
|
|
7288
6975
|
if (particle.needsNewPosition) {
|
|
7289
|
-
|
|
7290
|
-
|
|
6976
|
+
const newPosition = calcPositionOrRandomFromSize({
|
|
6977
|
+
size: canvasSize
|
|
6978
|
+
});
|
|
6979
|
+
particle.position.setTo(newPosition);
|
|
7291
6980
|
particle.velocity.setTo(particle.initialVelocity);
|
|
7292
6981
|
particle.absorberOrbit = undefined;
|
|
7293
6982
|
particle.needsNewPosition = false;
|
|
@@ -7305,11 +6994,8 @@
|
|
|
7305
6994
|
if (particle.absorberOrbitDirection === undefined) {
|
|
7306
6995
|
particle.absorberOrbitDirection = particle.velocity.x >= 0 ? "clockwise" : "counter-clockwise";
|
|
7307
6996
|
}
|
|
7308
|
-
const orbitRadius = particle.absorberOrbit.length;
|
|
7309
|
-
|
|
7310
|
-
const orbitDirection = particle.absorberOrbitDirection;
|
|
7311
|
-
particle.velocity.x = 0;
|
|
7312
|
-
particle.velocity.y = 0;
|
|
6997
|
+
const orbitRadius = particle.absorberOrbit.length, orbitAngle = particle.absorberOrbit.angle, orbitDirection = particle.absorberOrbitDirection;
|
|
6998
|
+
particle.velocity.setTo(Vector.origin);
|
|
7313
6999
|
const updateFunc = {
|
|
7314
7000
|
x: orbitDirection === "clockwise" ? Math.cos : Math.sin,
|
|
7315
7001
|
y: orbitDirection === "clockwise" ? Math.sin : Math.cos
|
|
@@ -7402,9 +7088,7 @@
|
|
|
7402
7088
|
}
|
|
7403
7089
|
}
|
|
7404
7090
|
handleClickMode(mode) {
|
|
7405
|
-
const
|
|
7406
|
-
const absorberOptions = this.absorbers;
|
|
7407
|
-
const modeAbsorbers = this.interactivityAbsorbers;
|
|
7091
|
+
const absorberOptions = this.absorbers, modeAbsorbers = this.interactivityAbsorbers;
|
|
7408
7092
|
if (mode === "absorber") {
|
|
7409
7093
|
let absorbersModeOptions;
|
|
7410
7094
|
if (modeAbsorbers instanceof Array) {
|
|
@@ -7414,8 +7098,7 @@
|
|
|
7414
7098
|
} else {
|
|
7415
7099
|
absorbersModeOptions = modeAbsorbers;
|
|
7416
7100
|
}
|
|
7417
|
-
const absorbersOptions = absorbersModeOptions !== null && absorbersModeOptions !== void 0 ? absorbersModeOptions : absorberOptions instanceof Array ? itemFromArray(absorberOptions) : absorberOptions;
|
|
7418
|
-
const aPosition = container.interactivity.mouse.clickPosition;
|
|
7101
|
+
const absorbersOptions = absorbersModeOptions !== null && absorbersModeOptions !== void 0 ? absorbersModeOptions : absorberOptions instanceof Array ? itemFromArray(absorberOptions) : absorberOptions, aPosition = this.container.interactivity.mouse.clickPosition;
|
|
7419
7102
|
this.addAbsorber(absorbersOptions, aPosition);
|
|
7420
7103
|
}
|
|
7421
7104
|
}
|
|
@@ -7444,17 +7127,14 @@
|
|
|
7444
7127
|
return false;
|
|
7445
7128
|
}
|
|
7446
7129
|
const absorbers = options.absorbers;
|
|
7447
|
-
let loadAbsorbers = false;
|
|
7448
7130
|
if (absorbers instanceof Array) {
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
} else if (absorbers !== undefined) {
|
|
7453
|
-
loadAbsorbers = true;
|
|
7131
|
+
return !!absorbers.length;
|
|
7132
|
+
} else if (absorbers) {
|
|
7133
|
+
return true;
|
|
7454
7134
|
} else if (((_c = (_b = (_a = options.interactivity) === null || _a === void 0 ? void 0 : _a.events) === null || _b === void 0 ? void 0 : _b.onClick) === null || _c === void 0 ? void 0 : _c.mode) && isInArray("absorber", options.interactivity.events.onClick.mode)) {
|
|
7455
|
-
|
|
7135
|
+
return true;
|
|
7456
7136
|
}
|
|
7457
|
-
return
|
|
7137
|
+
return false;
|
|
7458
7138
|
}
|
|
7459
7139
|
loadOptions(options, source) {
|
|
7460
7140
|
var _a, _b;
|
|
@@ -7502,9 +7182,7 @@
|
|
|
7502
7182
|
class CircleShape {
|
|
7503
7183
|
randomPosition(position, size, fill) {
|
|
7504
7184
|
const generateTheta = (x, y) => {
|
|
7505
|
-
const u = Math.random() / 4;
|
|
7506
|
-
const theta = Math.atan(y / x * Math.tan(2 * Math.PI * u));
|
|
7507
|
-
const v = Math.random();
|
|
7185
|
+
const u = Math.random() / 4, theta = Math.atan(y / x * Math.tan(2 * Math.PI * u)), v = Math.random();
|
|
7508
7186
|
if (v < .25) {
|
|
7509
7187
|
return theta;
|
|
7510
7188
|
} else if (v < .5) {
|
|
@@ -7514,10 +7192,7 @@
|
|
|
7514
7192
|
} else {
|
|
7515
7193
|
return -theta;
|
|
7516
7194
|
}
|
|
7517
|
-
};
|
|
7518
|
-
const radius = (x, y, theta) => x * y / Math.sqrt((y * Math.cos(theta)) ** 2 + (x * Math.sin(theta)) ** 2);
|
|
7519
|
-
const [a, b] = [ size.width / 2, size.height / 2 ];
|
|
7520
|
-
const randomTheta = generateTheta(a, b), maxRadius = radius(a, b, randomTheta), randomRadius = fill ? maxRadius * Math.sqrt(Math.random()) : maxRadius;
|
|
7195
|
+
}, radius = (x, y, theta) => x * y / Math.sqrt((y * Math.cos(theta)) ** 2 + (x * Math.sin(theta)) ** 2), [a, b] = [ size.width / 2, size.height / 2 ], randomTheta = generateTheta(a, b), maxRadius = radius(a, b, randomTheta), randomRadius = fill ? maxRadius * Math.sqrt(Math.random()) : maxRadius;
|
|
7521
7196
|
return {
|
|
7522
7197
|
x: position.x + randomRadius * Math.cos(randomTheta),
|
|
7523
7198
|
y: position.y + randomRadius * Math.sin(randomTheta)
|
|
@@ -7717,14 +7392,15 @@
|
|
|
7717
7392
|
if (this.paused) {
|
|
7718
7393
|
return;
|
|
7719
7394
|
}
|
|
7720
|
-
if (this.container.retina.reduceFactor && (this.lifeCount > 0 || this.immortal || !this.options.life.count) && (EmitterInstance_classPrivateFieldGet(this, _EmitterInstance_firstSpawn, "f") || this.currentSpawnDelay >= ((_a = this.spawnDelay) !== null && _a !== void 0 ? _a : 0))) {
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7395
|
+
if (!(this.container.retina.reduceFactor && (this.lifeCount > 0 || this.immortal || !this.options.life.count) && (EmitterInstance_classPrivateFieldGet(this, _EmitterInstance_firstSpawn, "f") || this.currentSpawnDelay >= ((_a = this.spawnDelay) !== null && _a !== void 0 ? _a : 0)))) {
|
|
7396
|
+
return;
|
|
7397
|
+
}
|
|
7398
|
+
if (this.emitDelay === undefined) {
|
|
7399
|
+
const delay = getRangeValue(this.options.rate.delay);
|
|
7400
|
+
this.emitDelay = 1e3 * delay / this.container.retina.reduceFactor;
|
|
7401
|
+
}
|
|
7402
|
+
if (this.lifeCount > 0 || this.immortal) {
|
|
7403
|
+
this.prepareToDie();
|
|
7728
7404
|
}
|
|
7729
7405
|
}
|
|
7730
7406
|
pause() {
|
|
@@ -7831,13 +7507,10 @@
|
|
|
7831
7507
|
this.emitters.removeEmitter(this);
|
|
7832
7508
|
}
|
|
7833
7509
|
calcPosition() {
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
x: getRangeValue((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100 * container.canvas.size.width,
|
|
7839
|
-
y: getRangeValue((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100 * container.canvas.size.height
|
|
7840
|
-
};
|
|
7510
|
+
return calcPositionOrRandomFromSizeRanged({
|
|
7511
|
+
size: this.container.canvas.size,
|
|
7512
|
+
position: this.options.position
|
|
7513
|
+
});
|
|
7841
7514
|
}
|
|
7842
7515
|
emit() {
|
|
7843
7516
|
if (this.paused) {
|
|
@@ -7848,9 +7521,7 @@
|
|
|
7848
7521
|
}
|
|
7849
7522
|
emitParticles(quantity) {
|
|
7850
7523
|
var _a, _b, _c;
|
|
7851
|
-
const
|
|
7852
|
-
const position = this.getPosition();
|
|
7853
|
-
const size = this.getSize();
|
|
7524
|
+
const position = this.getPosition(), size = this.getSize();
|
|
7854
7525
|
for (let i = 0; i < quantity; i++) {
|
|
7855
7526
|
const particlesOptions = deepExtend({}, this.particlesOptions);
|
|
7856
7527
|
if (this.spawnColor) {
|
|
@@ -7872,7 +7543,7 @@
|
|
|
7872
7543
|
return;
|
|
7873
7544
|
}
|
|
7874
7545
|
const pPosition = (_c = (_b = this.shape) === null || _b === void 0 ? void 0 : _b.randomPosition(position, size, this.fill)) !== null && _c !== void 0 ? _c : position;
|
|
7875
|
-
container.particles.addParticle(pPosition, particlesOptions);
|
|
7546
|
+
this.container.particles.addParticle(pPosition, particlesOptions);
|
|
7876
7547
|
}
|
|
7877
7548
|
}
|
|
7878
7549
|
setColorAnimation(animation, initValue, maxValue) {
|
|
@@ -7881,10 +7552,7 @@
|
|
|
7881
7552
|
if (!animation.enable) {
|
|
7882
7553
|
return initValue;
|
|
7883
7554
|
}
|
|
7884
|
-
const colorOffset = randomInRange(animation.offset);
|
|
7885
|
-
const delay = getRangeValue(this.options.rate.delay);
|
|
7886
|
-
const emitFactor = 1e3 * delay / container.retina.reduceFactor;
|
|
7887
|
-
const colorSpeed = getRangeValue((_a = animation.speed) !== null && _a !== void 0 ? _a : 0);
|
|
7555
|
+
const colorOffset = randomInRange(animation.offset), delay = getRangeValue(this.options.rate.delay), emitFactor = 1e3 * delay / container.retina.reduceFactor, colorSpeed = getRangeValue((_a = animation.speed) !== null && _a !== void 0 ? _a : 0);
|
|
7888
7556
|
return (initValue + colorSpeed * container.fpsLimit / emitFactor + colorOffset * 3.6) % maxValue;
|
|
7889
7557
|
}
|
|
7890
7558
|
}
|
|
@@ -7994,9 +7662,7 @@
|
|
|
7994
7662
|
}
|
|
7995
7663
|
}
|
|
7996
7664
|
handleClickMode(mode) {
|
|
7997
|
-
const
|
|
7998
|
-
const emitterOptions = this.emitters;
|
|
7999
|
-
const modeEmitters = this.interactivityEmitters;
|
|
7665
|
+
const emitterOptions = this.emitters, modeEmitters = this.interactivityEmitters;
|
|
8000
7666
|
if (mode === "emitter") {
|
|
8001
7667
|
let emitterModeOptions;
|
|
8002
7668
|
if (modeEmitters instanceof Array) {
|
|
@@ -8006,8 +7672,7 @@
|
|
|
8006
7672
|
} else {
|
|
8007
7673
|
emitterModeOptions = modeEmitters;
|
|
8008
7674
|
}
|
|
8009
|
-
const emittersOptions = emitterModeOptions !== null && emitterModeOptions !== void 0 ? emitterModeOptions : emitterOptions instanceof Array ? itemFromArray(emitterOptions) : emitterOptions;
|
|
8010
|
-
const ePosition = container.interactivity.mouse.clickPosition;
|
|
7675
|
+
const emittersOptions = emitterModeOptions !== null && emitterModeOptions !== void 0 ? emitterModeOptions : emitterOptions instanceof Array ? itemFromArray(emitterOptions) : emitterOptions, ePosition = this.container.interactivity.mouse.clickPosition;
|
|
8011
7676
|
this.addEmitter(deepExtend({}, emittersOptions), ePosition);
|
|
8012
7677
|
}
|
|
8013
7678
|
}
|
|
@@ -8184,6 +7849,12 @@
|
|
|
8184
7849
|
engine.addEmitterShape("circle", new CircleShape);
|
|
8185
7850
|
engine.addEmitterShape("square", new SquareShape);
|
|
8186
7851
|
}
|
|
7852
|
+
class ExternalInteractorBase {
|
|
7853
|
+
constructor(container) {
|
|
7854
|
+
this.container = container;
|
|
7855
|
+
this.type = 0;
|
|
7856
|
+
}
|
|
7857
|
+
}
|
|
8187
7858
|
class TrailMaker extends ExternalInteractorBase {
|
|
8188
7859
|
constructor(container) {
|
|
8189
7860
|
super(container);
|
|
@@ -8423,9 +8094,7 @@
|
|
|
8423
8094
|
var _a;
|
|
8424
8095
|
const res = [];
|
|
8425
8096
|
for (const path of paths) {
|
|
8426
|
-
const segments = path.element.pathSegList
|
|
8427
|
-
const len = (_a = segments === null || segments === void 0 ? void 0 : segments.numberOfItems) !== null && _a !== void 0 ? _a : 0;
|
|
8428
|
-
const p = {
|
|
8097
|
+
const segments = path.element.pathSegList, len = (_a = segments === null || segments === void 0 ? void 0 : segments.numberOfItems) !== null && _a !== void 0 ? _a : 0, p = {
|
|
8429
8098
|
x: 0,
|
|
8430
8099
|
y: 0
|
|
8431
8100
|
};
|
|
@@ -8490,10 +8159,7 @@
|
|
|
8490
8159
|
return res;
|
|
8491
8160
|
}
|
|
8492
8161
|
function calcClosestPtOnSegment(s1, s2, pos) {
|
|
8493
|
-
const {dx: dx, dy: dy} = getDistances(pos, s1)
|
|
8494
|
-
const {dx: dxx, dy: dyy} = getDistances(s2, s1);
|
|
8495
|
-
const t = (dx * dxx + dy * dyy) / (dxx ** 2 + dyy ** 2);
|
|
8496
|
-
const res = {
|
|
8162
|
+
const {dx: dx, dy: dy} = getDistances(pos, s1), {dx: dxx, dy: dyy} = getDistances(s2, s1), t = (dx * dxx + dy * dyy) / (dxx ** 2 + dyy ** 2), res = {
|
|
8497
8163
|
x: s1.x + dxx * t,
|
|
8498
8164
|
y: s1.x + dyy * t,
|
|
8499
8165
|
isOnSegment: t >= 0 && t <= 1
|
|
@@ -8508,10 +8174,7 @@
|
|
|
8508
8174
|
return res;
|
|
8509
8175
|
}
|
|
8510
8176
|
function segmentBounce(start, stop, velocity) {
|
|
8511
|
-
const {dx: dx, dy: dy} = getDistances(start, stop);
|
|
8512
|
-
const wallAngle = Math.atan2(dy, dx);
|
|
8513
|
-
const wallNormal = Vector.create(Math.sin(wallAngle), -Math.cos(wallAngle));
|
|
8514
|
-
const d = 2 * (velocity.x * wallNormal.x + velocity.y * wallNormal.y);
|
|
8177
|
+
const {dx: dx, dy: dy} = getDistances(start, stop), wallAngle = Math.atan2(dy, dx), wallNormal = Vector.create(Math.sin(wallAngle), -Math.cos(wallAngle)), d = 2 * (velocity.x * wallNormal.x + velocity.y * wallNormal.y);
|
|
8515
8178
|
wallNormal.multTo(d);
|
|
8516
8179
|
velocity.subFrom(wallNormal);
|
|
8517
8180
|
}
|
|
@@ -8535,8 +8198,7 @@
|
|
|
8535
8198
|
}
|
|
8536
8199
|
}
|
|
8537
8200
|
resize() {
|
|
8538
|
-
const container = this.container;
|
|
8539
|
-
const options = this.options;
|
|
8201
|
+
const container = this.container, options = this.options;
|
|
8540
8202
|
if (!(options.enable && options.type !== "none")) {
|
|
8541
8203
|
return;
|
|
8542
8204
|
}
|
|
@@ -8580,15 +8242,13 @@
|
|
|
8580
8242
|
if (!((_a = this.paths) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
8581
8243
|
return;
|
|
8582
8244
|
}
|
|
8583
|
-
const options = this.options;
|
|
8584
|
-
|
|
8585
|
-
if (!(options.enable && polygonDraw.enable)) {
|
|
8245
|
+
const options = this.options, polygonDraw = options.draw;
|
|
8246
|
+
if (!options.enable || !polygonDraw.enable) {
|
|
8586
8247
|
return;
|
|
8587
8248
|
}
|
|
8588
8249
|
const rawData = this.raw;
|
|
8589
8250
|
for (const path of this.paths) {
|
|
8590
|
-
const path2d = path.path2d;
|
|
8591
|
-
const path2dSupported = this.path2DSupported;
|
|
8251
|
+
const path2d = path.path2d, path2dSupported = this.path2DSupported;
|
|
8592
8252
|
if (!context) {
|
|
8593
8253
|
continue;
|
|
8594
8254
|
}
|
|
@@ -8645,22 +8305,17 @@
|
|
|
8645
8305
|
}
|
|
8646
8306
|
checkInsidePolygon(position) {
|
|
8647
8307
|
var _a, _b;
|
|
8648
|
-
const container = this.container;
|
|
8649
|
-
const options = this.options;
|
|
8308
|
+
const container = this.container, options = this.options;
|
|
8650
8309
|
if (!options.enable || options.type === "none" || options.type === "inline") {
|
|
8651
8310
|
return true;
|
|
8652
8311
|
}
|
|
8653
8312
|
if (!this.raw) {
|
|
8654
8313
|
throw new Error(Constants.noPolygonFound);
|
|
8655
8314
|
}
|
|
8656
|
-
const canvasSize = container.canvas.size;
|
|
8657
|
-
const x = (_a = position === null || position === void 0 ? void 0 : position.x) !== null && _a !== void 0 ? _a : Math.random() * canvasSize.width;
|
|
8658
|
-
const y = (_b = position === null || position === void 0 ? void 0 : position.y) !== null && _b !== void 0 ? _b : Math.random() * canvasSize.height;
|
|
8315
|
+
const canvasSize = container.canvas.size, x = (_a = position === null || position === void 0 ? void 0 : position.x) !== null && _a !== void 0 ? _a : Math.random() * canvasSize.width, y = (_b = position === null || position === void 0 ? void 0 : position.y) !== null && _b !== void 0 ? _b : Math.random() * canvasSize.height;
|
|
8659
8316
|
let inside = false;
|
|
8660
8317
|
for (let i = 0, j = this.raw.length - 1; i < this.raw.length; j = i++) {
|
|
8661
|
-
const pi = this.raw[i];
|
|
8662
|
-
const pj = this.raw[j];
|
|
8663
|
-
const intersect = pi.y > y !== pj.y > y && x < (pj.x - pi.x) * (y - pi.y) / (pj.y - pi.y) + pi.x;
|
|
8318
|
+
const pi = this.raw[i], pj = this.raw[j], intersect = pi.y > y !== pj.y > y && x < (pj.x - pi.x) * (y - pi.y) / (pj.y - pi.y) + pi.x;
|
|
8664
8319
|
if (intersect) {
|
|
8665
8320
|
inside = !inside;
|
|
8666
8321
|
}
|
|
@@ -8673,11 +8328,7 @@
|
|
|
8673
8328
|
if (this.paths !== undefined && !forceDownload) {
|
|
8674
8329
|
return this.raw;
|
|
8675
8330
|
}
|
|
8676
|
-
const container = this.container;
|
|
8677
|
-
const options = this.options;
|
|
8678
|
-
const parser = new DOMParser;
|
|
8679
|
-
const doc = parser.parseFromString(xml, "image/svg+xml");
|
|
8680
|
-
const svg = doc.getElementsByTagName("svg")[0];
|
|
8331
|
+
const container = this.container, options = this.options, parser = new DOMParser, doc = parser.parseFromString(xml, "image/svg+xml"), svg = doc.getElementsByTagName("svg")[0];
|
|
8681
8332
|
let svgPaths = svg.getElementsByTagName("path");
|
|
8682
8333
|
if (!svgPaths.length) {
|
|
8683
8334
|
svgPaths = doc.getElementsByTagName("path");
|
|
@@ -8692,8 +8343,7 @@
|
|
|
8692
8343
|
});
|
|
8693
8344
|
}
|
|
8694
8345
|
}
|
|
8695
|
-
const pxRatio = container.retina.pixelRatio;
|
|
8696
|
-
const scale = options.scale / pxRatio;
|
|
8346
|
+
const pxRatio = container.retina.pixelRatio, scale = options.scale / pxRatio;
|
|
8697
8347
|
this.dimension.width = parseFloat((_a = svg.getAttribute("width")) !== null && _a !== void 0 ? _a : "0") * scale;
|
|
8698
8348
|
this.dimension.height = parseFloat((_b = svg.getAttribute("height")) !== null && _b !== void 0 ? _b : "0") * scale;
|
|
8699
8349
|
const position = (_c = options.position) !== null && _c !== void 0 ? _c : {
|
|
@@ -8707,9 +8357,7 @@
|
|
|
8707
8357
|
return parsePaths(this.paths, scale, this.offset);
|
|
8708
8358
|
}
|
|
8709
8359
|
async downloadSvgPath(svgUrl, force) {
|
|
8710
|
-
const options = this.options;
|
|
8711
|
-
const url = svgUrl || options.url;
|
|
8712
|
-
const forceDownload = force !== null && force !== void 0 ? force : false;
|
|
8360
|
+
const options = this.options, url = svgUrl || options.url, forceDownload = force !== null && force !== void 0 ? force : false;
|
|
8713
8361
|
if (!url || this.paths !== undefined && !forceDownload) {
|
|
8714
8362
|
return this.raw;
|
|
8715
8363
|
}
|
|
@@ -8731,8 +8379,7 @@
|
|
|
8731
8379
|
}
|
|
8732
8380
|
}
|
|
8733
8381
|
randomPoint() {
|
|
8734
|
-
const container = this.container;
|
|
8735
|
-
const options = this.options;
|
|
8382
|
+
const container = this.container, options = this.options;
|
|
8736
8383
|
let position;
|
|
8737
8384
|
if (options.type === "inline") {
|
|
8738
8385
|
switch (options.inline.arrangement) {
|
|
@@ -8781,9 +8428,7 @@
|
|
|
8781
8428
|
if (!this.raw || !this.raw.length || !((_a = this.paths) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
8782
8429
|
throw new Error(Constants.noPolygonDataLoaded);
|
|
8783
8430
|
}
|
|
8784
|
-
const path = itemFromArray(this.paths);
|
|
8785
|
-
const distance = Math.floor(Math.random() * path.length) + 1;
|
|
8786
|
-
const point = path.element.getPointAtLength(distance);
|
|
8431
|
+
const path = itemFromArray(this.paths), distance = Math.floor(Math.random() * path.length) + 1, point = path.element.getPointAtLength(distance);
|
|
8787
8432
|
return {
|
|
8788
8433
|
x: point.x * options.scale + (((_b = this.offset) === null || _b === void 0 ? void 0 : _b.x) || 0),
|
|
8789
8434
|
y: point.y * options.scale + (((_c = this.offset) === null || _c === void 0 ? void 0 : _c.y) || 0)
|
|
@@ -8791,13 +8436,10 @@
|
|
|
8791
8436
|
}
|
|
8792
8437
|
getEquidistantPointByIndex(index) {
|
|
8793
8438
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
8794
|
-
const options = this.container.actualOptions;
|
|
8795
|
-
const polygonMaskOptions = this.options;
|
|
8439
|
+
const options = this.container.actualOptions, polygonMaskOptions = this.options;
|
|
8796
8440
|
if (!this.raw || !this.raw.length || !((_a = this.paths) === null || _a === void 0 ? void 0 : _a.length)) throw new Error(Constants.noPolygonDataLoaded);
|
|
8797
|
-
let offset = 0;
|
|
8798
|
-
|
|
8799
|
-
const totalLength = this.paths.reduce(((tot, path) => tot + path.length), 0);
|
|
8800
|
-
const distance = totalLength / options.particles.number.value;
|
|
8441
|
+
let offset = 0, point;
|
|
8442
|
+
const totalLength = this.paths.reduce(((tot, path) => tot + path.length), 0), distance = totalLength / options.particles.number.value;
|
|
8801
8443
|
for (const path of this.paths) {
|
|
8802
8444
|
const pathDistance = distance * index - offset;
|
|
8803
8445
|
if (pathDistance <= path.length) {
|
|
@@ -8831,10 +8473,7 @@
|
|
|
8831
8473
|
for (const path of this.paths) {
|
|
8832
8474
|
const pathData = (_b = path.element) === null || _b === void 0 ? void 0 : _b.getAttribute("d");
|
|
8833
8475
|
if (pathData) {
|
|
8834
|
-
const path2d = new Path2D(pathData);
|
|
8835
|
-
const matrix = document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGMatrix();
|
|
8836
|
-
const finalPath = new Path2D;
|
|
8837
|
-
const transform = matrix.scale(options.scale);
|
|
8476
|
+
const path2d = new Path2D(pathData), matrix = document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGMatrix(), finalPath = new Path2D, transform = matrix.scale(options.scale);
|
|
8838
8477
|
if (finalPath.addPath) {
|
|
8839
8478
|
finalPath.addPath(path2d, transform);
|
|
8840
8479
|
path.path2d = finalPath;
|
|
@@ -9029,21 +8668,188 @@
|
|
|
9029
8668
|
particle.rotate.velocity *= Math.random();
|
|
9030
8669
|
}
|
|
9031
8670
|
}
|
|
9032
|
-
}
|
|
9033
|
-
isEnabled(particle) {
|
|
9034
|
-
const rotate = particle.options.rotate;
|
|
9035
|
-
const rotateAnimation = rotate.animation;
|
|
9036
|
-
return !particle.destroyed && !particle.spawning && !rotate.path && rotateAnimation.enable;
|
|
9037
|
-
}
|
|
9038
|
-
update(particle, delta) {
|
|
9039
|
-
if (!this.isEnabled(particle)) {
|
|
9040
|
-
return;
|
|
8671
|
+
}
|
|
8672
|
+
isEnabled(particle) {
|
|
8673
|
+
const rotate = particle.options.rotate;
|
|
8674
|
+
const rotateAnimation = rotate.animation;
|
|
8675
|
+
return !particle.destroyed && !particle.spawning && !rotate.path && rotateAnimation.enable;
|
|
8676
|
+
}
|
|
8677
|
+
update(particle, delta) {
|
|
8678
|
+
if (!this.isEnabled(particle)) {
|
|
8679
|
+
return;
|
|
8680
|
+
}
|
|
8681
|
+
updateAngle(particle, delta);
|
|
8682
|
+
}
|
|
8683
|
+
}
|
|
8684
|
+
async function loadAngleUpdater(engine) {
|
|
8685
|
+
await engine.addParticleUpdater("angle", (container => new AngleUpdater(container)));
|
|
8686
|
+
}
|
|
8687
|
+
function applyDistance(particle) {
|
|
8688
|
+
const initialPosition = particle.initialPosition;
|
|
8689
|
+
const {dx: dx, dy: dy} = getDistances(initialPosition, particle.position);
|
|
8690
|
+
const dxFixed = Math.abs(dx), dyFixed = Math.abs(dy);
|
|
8691
|
+
const hDistance = particle.retina.maxDistance.horizontal;
|
|
8692
|
+
const vDistance = particle.retina.maxDistance.vertical;
|
|
8693
|
+
if (!hDistance && !vDistance) {
|
|
8694
|
+
return;
|
|
8695
|
+
}
|
|
8696
|
+
if ((hDistance && dxFixed >= hDistance || vDistance && dyFixed >= vDistance) && !particle.misplaced) {
|
|
8697
|
+
particle.misplaced = !!hDistance && dxFixed > hDistance || !!vDistance && dyFixed > vDistance;
|
|
8698
|
+
if (hDistance) {
|
|
8699
|
+
particle.velocity.x = particle.velocity.y / 2 - particle.velocity.x;
|
|
8700
|
+
}
|
|
8701
|
+
if (vDistance) {
|
|
8702
|
+
particle.velocity.y = particle.velocity.x / 2 - particle.velocity.y;
|
|
8703
|
+
}
|
|
8704
|
+
} else if ((!hDistance || dxFixed < hDistance) && (!vDistance || dyFixed < vDistance) && particle.misplaced) {
|
|
8705
|
+
particle.misplaced = false;
|
|
8706
|
+
} else if (particle.misplaced) {
|
|
8707
|
+
const pos = particle.position, vel = particle.velocity;
|
|
8708
|
+
if (hDistance && (pos.x < initialPosition.x && vel.x < 0 || pos.x > initialPosition.x && vel.x > 0)) {
|
|
8709
|
+
vel.x *= -Math.random();
|
|
8710
|
+
}
|
|
8711
|
+
if (vDistance && (pos.y < initialPosition.y && vel.y < 0 || pos.y > initialPosition.y && vel.y > 0)) {
|
|
8712
|
+
vel.y *= -Math.random();
|
|
8713
|
+
}
|
|
8714
|
+
}
|
|
8715
|
+
}
|
|
8716
|
+
function spin(particle, moveSpeed) {
|
|
8717
|
+
const container = particle.container;
|
|
8718
|
+
if (!particle.spin) {
|
|
8719
|
+
return;
|
|
8720
|
+
}
|
|
8721
|
+
const updateFunc = {
|
|
8722
|
+
x: particle.spin.direction === "clockwise" ? Math.cos : Math.sin,
|
|
8723
|
+
y: particle.spin.direction === "clockwise" ? Math.sin : Math.cos
|
|
8724
|
+
};
|
|
8725
|
+
particle.position.x = particle.spin.center.x + particle.spin.radius * updateFunc.x(particle.spin.angle);
|
|
8726
|
+
particle.position.y = particle.spin.center.y + particle.spin.radius * updateFunc.y(particle.spin.angle);
|
|
8727
|
+
particle.spin.radius += particle.spin.acceleration;
|
|
8728
|
+
const maxCanvasSize = Math.max(container.canvas.size.width, container.canvas.size.height);
|
|
8729
|
+
if (particle.spin.radius > maxCanvasSize / 2) {
|
|
8730
|
+
particle.spin.radius = maxCanvasSize / 2;
|
|
8731
|
+
particle.spin.acceleration *= -1;
|
|
8732
|
+
} else if (particle.spin.radius < 0) {
|
|
8733
|
+
particle.spin.radius = 0;
|
|
8734
|
+
particle.spin.acceleration *= -1;
|
|
8735
|
+
}
|
|
8736
|
+
particle.spin.angle += moveSpeed / 100 * (1 - particle.spin.radius / maxCanvasSize);
|
|
8737
|
+
}
|
|
8738
|
+
function applyPath(particle, delta) {
|
|
8739
|
+
const particlesOptions = particle.options;
|
|
8740
|
+
const pathOptions = particlesOptions.move.path;
|
|
8741
|
+
const pathEnabled = pathOptions.enable;
|
|
8742
|
+
if (!pathEnabled) {
|
|
8743
|
+
return;
|
|
8744
|
+
}
|
|
8745
|
+
const container = particle.container;
|
|
8746
|
+
if (particle.lastPathTime <= particle.pathDelay) {
|
|
8747
|
+
particle.lastPathTime += delta.value;
|
|
8748
|
+
return;
|
|
8749
|
+
}
|
|
8750
|
+
const path = container.pathGenerator.generate(particle);
|
|
8751
|
+
particle.velocity.addTo(path);
|
|
8752
|
+
if (pathOptions.clamp) {
|
|
8753
|
+
particle.velocity.x = clamp(particle.velocity.x, -1, 1);
|
|
8754
|
+
particle.velocity.y = clamp(particle.velocity.y, -1, 1);
|
|
8755
|
+
}
|
|
8756
|
+
particle.lastPathTime -= particle.pathDelay;
|
|
8757
|
+
}
|
|
8758
|
+
function getProximitySpeedFactor(particle) {
|
|
8759
|
+
const container = particle.container;
|
|
8760
|
+
const options = container.actualOptions;
|
|
8761
|
+
const active = isInArray("slow", options.interactivity.events.onHover.mode);
|
|
8762
|
+
if (!active) {
|
|
8763
|
+
return 1;
|
|
8764
|
+
}
|
|
8765
|
+
const mousePos = particle.container.interactivity.mouse.position;
|
|
8766
|
+
if (!mousePos) {
|
|
8767
|
+
return 1;
|
|
8768
|
+
}
|
|
8769
|
+
const particlePos = particle.getPosition();
|
|
8770
|
+
const dist = getDistance(mousePos, particlePos);
|
|
8771
|
+
const radius = container.retina.slowModeRadius;
|
|
8772
|
+
if (dist > radius) {
|
|
8773
|
+
return 1;
|
|
8774
|
+
}
|
|
8775
|
+
const proximityFactor = dist / radius || 0;
|
|
8776
|
+
const slowFactor = options.interactivity.modes.slow.factor;
|
|
8777
|
+
return proximityFactor / slowFactor;
|
|
8778
|
+
}
|
|
8779
|
+
class BaseMover {
|
|
8780
|
+
init(particle) {
|
|
8781
|
+
var _a;
|
|
8782
|
+
const container = particle.container, options = particle.options, spinOptions = options.move.spin;
|
|
8783
|
+
if (spinOptions.enable) {
|
|
8784
|
+
const spinPos = (_a = spinOptions.position) !== null && _a !== void 0 ? _a : {
|
|
8785
|
+
x: 50,
|
|
8786
|
+
y: 50
|
|
8787
|
+
};
|
|
8788
|
+
const spinCenter = {
|
|
8789
|
+
x: spinPos.x / 100 * container.canvas.size.width,
|
|
8790
|
+
y: spinPos.y / 100 * container.canvas.size.height
|
|
8791
|
+
};
|
|
8792
|
+
const pos = particle.getPosition();
|
|
8793
|
+
const distance = getDistance(pos, spinCenter);
|
|
8794
|
+
const spinAcceleration = getRangeValue(spinOptions.acceleration);
|
|
8795
|
+
particle.retina.spinAcceleration = spinAcceleration * container.retina.pixelRatio;
|
|
8796
|
+
particle.spin = {
|
|
8797
|
+
center: spinCenter,
|
|
8798
|
+
direction: particle.velocity.x >= 0 ? "clockwise" : "counter-clockwise",
|
|
8799
|
+
angle: particle.velocity.angle,
|
|
8800
|
+
radius: distance,
|
|
8801
|
+
acceleration: particle.retina.spinAcceleration
|
|
8802
|
+
};
|
|
8803
|
+
}
|
|
8804
|
+
}
|
|
8805
|
+
isEnabled(particle) {
|
|
8806
|
+
return !particle.destroyed && particle.options.move.enable;
|
|
8807
|
+
}
|
|
8808
|
+
move(particle, delta) {
|
|
8809
|
+
var _a, _b, _c;
|
|
8810
|
+
var _d, _e;
|
|
8811
|
+
const particleOptions = particle.options, moveOptions = particleOptions.move;
|
|
8812
|
+
if (!moveOptions.enable) {
|
|
8813
|
+
return;
|
|
8814
|
+
}
|
|
8815
|
+
const container = particle.container, slowFactor = 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, speedFactor = sizeFactor * slowFactor * (delta.factor || 1), diffFactor = 2, moveSpeed = baseSpeed * speedFactor / diffFactor;
|
|
8816
|
+
applyPath(particle, delta);
|
|
8817
|
+
const gravityOptions = particle.gravity, gravityFactor = gravityOptions.enable && gravityOptions.inverse ? -1 : 1;
|
|
8818
|
+
if (gravityOptions.enable && moveSpeed) {
|
|
8819
|
+
particle.velocity.y += gravityFactor * (gravityOptions.acceleration * delta.factor) / (60 * moveSpeed);
|
|
8820
|
+
}
|
|
8821
|
+
if (moveDrift && moveSpeed) {
|
|
8822
|
+
particle.velocity.x += moveDrift * delta.factor / (60 * moveSpeed);
|
|
8823
|
+
}
|
|
8824
|
+
const decay = particle.moveDecay;
|
|
8825
|
+
if (decay != 1) {
|
|
8826
|
+
particle.velocity.multTo(decay);
|
|
8827
|
+
}
|
|
8828
|
+
const velocity = particle.velocity.mult(moveSpeed), maxSpeed = (_c = particle.retina.maxSpeed) !== null && _c !== void 0 ? _c : container.retina.maxSpeed;
|
|
8829
|
+
if (gravityOptions.enable && maxSpeed > 0 && (!gravityOptions.inverse && velocity.y >= 0 && velocity.y >= maxSpeed || gravityOptions.inverse && velocity.y <= 0 && velocity.y <= -maxSpeed)) {
|
|
8830
|
+
velocity.y = gravityFactor * maxSpeed;
|
|
8831
|
+
if (moveSpeed) {
|
|
8832
|
+
particle.velocity.y = velocity.y / moveSpeed;
|
|
8833
|
+
}
|
|
8834
|
+
}
|
|
8835
|
+
const zIndexOptions = particle.options.zIndex, zVelocityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.velocityRate;
|
|
8836
|
+
if (moveOptions.spin.enable) {
|
|
8837
|
+
spin(particle, moveSpeed);
|
|
8838
|
+
} else {
|
|
8839
|
+
if (zVelocityFactor != 1) {
|
|
8840
|
+
velocity.multTo(zVelocityFactor);
|
|
8841
|
+
}
|
|
8842
|
+
particle.position.addTo(velocity);
|
|
8843
|
+
if (moveOptions.vibrate) {
|
|
8844
|
+
particle.position.x += Math.sin(particle.position.x * Math.cos(particle.position.y));
|
|
8845
|
+
particle.position.y += Math.cos(particle.position.y * Math.sin(particle.position.x));
|
|
8846
|
+
}
|
|
9041
8847
|
}
|
|
9042
|
-
|
|
8848
|
+
applyDistance(particle);
|
|
9043
8849
|
}
|
|
9044
8850
|
}
|
|
9045
|
-
async function
|
|
9046
|
-
|
|
8851
|
+
async function loadBaseMover(engine) {
|
|
8852
|
+
engine.addMover("base", (() => new BaseMover));
|
|
9047
8853
|
}
|
|
9048
8854
|
class CircleDrawer {
|
|
9049
8855
|
getSidesCount() {
|
|
@@ -9119,6 +8925,39 @@
|
|
|
9119
8925
|
class Attractor extends ExternalInteractorBase {
|
|
9120
8926
|
constructor(container) {
|
|
9121
8927
|
super(container);
|
|
8928
|
+
if (!container.attract) {
|
|
8929
|
+
container.attract = {
|
|
8930
|
+
particles: []
|
|
8931
|
+
};
|
|
8932
|
+
}
|
|
8933
|
+
this.handleClickMode = mode => {
|
|
8934
|
+
const options = this.container.actualOptions;
|
|
8935
|
+
if (mode !== "attract") {
|
|
8936
|
+
return;
|
|
8937
|
+
}
|
|
8938
|
+
if (!container.attract) {
|
|
8939
|
+
container.attract = {
|
|
8940
|
+
particles: []
|
|
8941
|
+
};
|
|
8942
|
+
}
|
|
8943
|
+
container.attract.clicking = true;
|
|
8944
|
+
container.attract.count = 0;
|
|
8945
|
+
for (const particle of container.attract.particles) {
|
|
8946
|
+
particle.velocity.setTo(particle.initialVelocity);
|
|
8947
|
+
}
|
|
8948
|
+
container.attract.particles = [];
|
|
8949
|
+
container.attract.finish = false;
|
|
8950
|
+
setTimeout((() => {
|
|
8951
|
+
if (!container.destroyed) {
|
|
8952
|
+
if (!container.attract) {
|
|
8953
|
+
container.attract = {
|
|
8954
|
+
particles: []
|
|
8955
|
+
};
|
|
8956
|
+
}
|
|
8957
|
+
container.attract.clicking = false;
|
|
8958
|
+
}
|
|
8959
|
+
}), options.interactivity.modes.attract.duration * 1e3);
|
|
8960
|
+
};
|
|
9122
8961
|
}
|
|
9123
8962
|
isEnabled() {
|
|
9124
8963
|
const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = options.interactivity.events;
|
|
@@ -9160,6 +8999,11 @@
|
|
|
9160
8999
|
}
|
|
9161
9000
|
clickAttract() {
|
|
9162
9001
|
const container = this.container;
|
|
9002
|
+
if (!container.attract) {
|
|
9003
|
+
container.attract = {
|
|
9004
|
+
particles: []
|
|
9005
|
+
};
|
|
9006
|
+
}
|
|
9163
9007
|
if (!container.attract.finish) {
|
|
9164
9008
|
if (!container.attract.count) {
|
|
9165
9009
|
container.attract.count = 0;
|
|
@@ -9209,8 +9053,7 @@
|
|
|
9209
9053
|
}
|
|
9210
9054
|
}
|
|
9211
9055
|
singleSelectorBounce(selector, div) {
|
|
9212
|
-
const container = this.container;
|
|
9213
|
-
const query = document.querySelectorAll(selector);
|
|
9056
|
+
const container = this.container, query = document.querySelectorAll(selector);
|
|
9214
9057
|
if (!query.length) {
|
|
9215
9058
|
return;
|
|
9216
9059
|
}
|
|
@@ -9218,8 +9061,7 @@
|
|
|
9218
9061
|
const elem = item, pxRatio = container.retina.pixelRatio, pos = {
|
|
9219
9062
|
x: (elem.offsetLeft + elem.offsetWidth / 2) * pxRatio,
|
|
9220
9063
|
y: (elem.offsetTop + elem.offsetHeight / 2) * pxRatio
|
|
9221
|
-
}, radius = elem.offsetWidth / 2 * pxRatio, tolerance = 10 * pxRatio;
|
|
9222
|
-
const area = div.type === "circle" ? new Circle(pos.x, pos.y, radius + tolerance) : new Rectangle(elem.offsetLeft * pxRatio - tolerance, elem.offsetTop * pxRatio - tolerance, elem.offsetWidth * pxRatio + tolerance * 2, elem.offsetHeight * pxRatio + tolerance * 2);
|
|
9064
|
+
}, radius = elem.offsetWidth / 2 * pxRatio, tolerance = 10 * pxRatio, area = div.type === "circle" ? new Circle(pos.x, pos.y, radius + tolerance) : new Rectangle(elem.offsetLeft * pxRatio - tolerance, elem.offsetTop * pxRatio - tolerance, elem.offsetWidth * pxRatio + tolerance * 2, elem.offsetHeight * pxRatio + tolerance * 2);
|
|
9223
9065
|
this.processBounce(pos, radius, area);
|
|
9224
9066
|
}));
|
|
9225
9067
|
}
|
|
@@ -9255,6 +9097,18 @@
|
|
|
9255
9097
|
class Bubbler extends ExternalInteractorBase {
|
|
9256
9098
|
constructor(container) {
|
|
9257
9099
|
super(container);
|
|
9100
|
+
if (!container.bubble) {
|
|
9101
|
+
container.bubble = {};
|
|
9102
|
+
}
|
|
9103
|
+
this.handleClickMode = mode => {
|
|
9104
|
+
if (mode !== "bubble") {
|
|
9105
|
+
return;
|
|
9106
|
+
}
|
|
9107
|
+
if (!container.bubble) {
|
|
9108
|
+
container.bubble = {};
|
|
9109
|
+
}
|
|
9110
|
+
container.bubble.clicking = true;
|
|
9111
|
+
};
|
|
9258
9112
|
}
|
|
9259
9113
|
isEnabled() {
|
|
9260
9114
|
const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = options.interactivity.events, divs = events.onDiv, divBubble = isDivModeEnabled("bubble", divs);
|
|
@@ -9320,6 +9174,9 @@
|
|
|
9320
9174
|
if (bubbleParam === particlesParam) {
|
|
9321
9175
|
return;
|
|
9322
9176
|
}
|
|
9177
|
+
if (!container.bubble) {
|
|
9178
|
+
container.bubble = {};
|
|
9179
|
+
}
|
|
9323
9180
|
if (!container.bubble.durationEnd) {
|
|
9324
9181
|
if (distMouse <= bubbleDistance) {
|
|
9325
9182
|
const obj = pObjBubble !== null && pObjBubble !== void 0 ? pObjBubble : pObj;
|
|
@@ -9355,6 +9212,9 @@
|
|
|
9355
9212
|
if (!mouseClickPos) {
|
|
9356
9213
|
return;
|
|
9357
9214
|
}
|
|
9215
|
+
if (!container.bubble) {
|
|
9216
|
+
container.bubble = {};
|
|
9217
|
+
}
|
|
9358
9218
|
const distance = container.retina.bubbleModeDistance, query = container.particles.quadTree.queryCircle(mouseClickPos, distance);
|
|
9359
9219
|
for (const particle of query) {
|
|
9360
9220
|
if (!container.bubble.clicking) {
|
|
@@ -9527,40 +9387,149 @@
|
|
|
9527
9387
|
async interact() {
|
|
9528
9388
|
var _a;
|
|
9529
9389
|
const container = this.container, options = container.actualOptions, interactivity = options.interactivity;
|
|
9530
|
-
if (interactivity.events.onHover.enable
|
|
9531
|
-
|
|
9532
|
-
|
|
9533
|
-
|
|
9390
|
+
if (!interactivity.events.onHover.enable || container.interactivity.status !== Constants.mouseMoveEvent) {
|
|
9391
|
+
return;
|
|
9392
|
+
}
|
|
9393
|
+
const mousePos = container.interactivity.mouse.position;
|
|
9394
|
+
if (!mousePos) {
|
|
9395
|
+
return;
|
|
9396
|
+
}
|
|
9397
|
+
const distance = container.retina.grabModeDistance, query = container.particles.quadTree.queryCircle(mousePos, distance);
|
|
9398
|
+
for (const particle of query) {
|
|
9399
|
+
const pos = particle.getPosition(), pointDistance = getDistance(pos, mousePos);
|
|
9400
|
+
if (pointDistance > distance) {
|
|
9401
|
+
continue;
|
|
9534
9402
|
}
|
|
9535
|
-
const
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
}
|
|
9548
|
-
const colorLine = getLinkColor(particle, undefined, container.particles.grabLineColor);
|
|
9549
|
-
if (!colorLine) {
|
|
9550
|
-
return;
|
|
9551
|
-
}
|
|
9552
|
-
container.canvas.drawGrabLine(particle, colorLine, opacityLine, mousePos);
|
|
9553
|
-
}
|
|
9403
|
+
const grabLineOptions = interactivity.modes.grab.links, lineOpacity = grabLineOptions.opacity, opacityLine = lineOpacity - pointDistance * lineOpacity / distance;
|
|
9404
|
+
if (opacityLine <= 0) {
|
|
9405
|
+
continue;
|
|
9406
|
+
}
|
|
9407
|
+
const optColor = (_a = grabLineOptions.color) !== null && _a !== void 0 ? _a : particle.options.links.color;
|
|
9408
|
+
if (!container.particles.grabLineColor) {
|
|
9409
|
+
const linksOptions = options.interactivity.modes.grab.links;
|
|
9410
|
+
container.particles.grabLineColor = getLinkRandomColor(optColor, linksOptions.blink, linksOptions.consent);
|
|
9411
|
+
}
|
|
9412
|
+
const colorLine = getLinkColor(particle, undefined, container.particles.grabLineColor);
|
|
9413
|
+
if (!colorLine) {
|
|
9414
|
+
return;
|
|
9554
9415
|
}
|
|
9416
|
+
container.canvas.drawGrabLine(particle, colorLine, opacityLine, mousePos);
|
|
9555
9417
|
}
|
|
9556
9418
|
}
|
|
9557
9419
|
}
|
|
9558
9420
|
async function loadExternalGrabInteraction(engine) {
|
|
9559
9421
|
await engine.addInteractor("externalGrab", (container => new Grabber(container)));
|
|
9560
9422
|
}
|
|
9423
|
+
class Pauser extends ExternalInteractorBase {
|
|
9424
|
+
constructor(container) {
|
|
9425
|
+
super(container);
|
|
9426
|
+
this.handleClickMode = mode => {
|
|
9427
|
+
if (mode !== "pause") {
|
|
9428
|
+
return;
|
|
9429
|
+
}
|
|
9430
|
+
const container = this.container;
|
|
9431
|
+
if (container.getAnimationStatus()) {
|
|
9432
|
+
container.pause();
|
|
9433
|
+
} else {
|
|
9434
|
+
container.play();
|
|
9435
|
+
}
|
|
9436
|
+
};
|
|
9437
|
+
}
|
|
9438
|
+
isEnabled() {
|
|
9439
|
+
return true;
|
|
9440
|
+
}
|
|
9441
|
+
reset() {}
|
|
9442
|
+
async interact() {}
|
|
9443
|
+
}
|
|
9444
|
+
async function loadExternalPauseInteraction(engine) {
|
|
9445
|
+
await engine.addInteractor("externalPause", (container => new Pauser(container)));
|
|
9446
|
+
}
|
|
9447
|
+
class Pusher extends ExternalInteractorBase {
|
|
9448
|
+
constructor(container) {
|
|
9449
|
+
super(container);
|
|
9450
|
+
this.handleClickMode = mode => {
|
|
9451
|
+
if (mode !== "push") {
|
|
9452
|
+
return;
|
|
9453
|
+
}
|
|
9454
|
+
const container = this.container;
|
|
9455
|
+
const options = container.actualOptions;
|
|
9456
|
+
const pushNb = options.interactivity.modes.push.quantity;
|
|
9457
|
+
if (pushNb <= 0) {
|
|
9458
|
+
return;
|
|
9459
|
+
}
|
|
9460
|
+
const pushOptions = options.interactivity.modes.push;
|
|
9461
|
+
const group = itemFromArray([ undefined, ...pushOptions.groups ]);
|
|
9462
|
+
const groupOptions = group !== undefined ? container.actualOptions.particles.groups[group] : undefined;
|
|
9463
|
+
container.particles.push(pushNb, container.interactivity.mouse, groupOptions, group);
|
|
9464
|
+
};
|
|
9465
|
+
}
|
|
9466
|
+
isEnabled() {
|
|
9467
|
+
return true;
|
|
9468
|
+
}
|
|
9469
|
+
reset() {}
|
|
9470
|
+
async interact() {}
|
|
9471
|
+
}
|
|
9472
|
+
async function loadExternalPushInteraction(engine) {
|
|
9473
|
+
await engine.addInteractor("externalPush", (container => new Pusher(container)));
|
|
9474
|
+
}
|
|
9475
|
+
class Remover extends ExternalInteractorBase {
|
|
9476
|
+
constructor(container) {
|
|
9477
|
+
super(container);
|
|
9478
|
+
this.handleClickMode = mode => {
|
|
9479
|
+
if (mode !== "remove") {
|
|
9480
|
+
return;
|
|
9481
|
+
}
|
|
9482
|
+
const container = this.container;
|
|
9483
|
+
const options = container.actualOptions;
|
|
9484
|
+
const removeNb = options.interactivity.modes.remove.quantity;
|
|
9485
|
+
container.particles.removeQuantity(removeNb);
|
|
9486
|
+
};
|
|
9487
|
+
}
|
|
9488
|
+
isEnabled() {
|
|
9489
|
+
return true;
|
|
9490
|
+
}
|
|
9491
|
+
reset() {}
|
|
9492
|
+
async interact() {}
|
|
9493
|
+
}
|
|
9494
|
+
async function loadExternalRemoveInteraction(engine) {
|
|
9495
|
+
await engine.addInteractor("externalRemove", (container => new Remover(container)));
|
|
9496
|
+
}
|
|
9561
9497
|
class Repulser extends ExternalInteractorBase {
|
|
9562
9498
|
constructor(container) {
|
|
9563
9499
|
super(container);
|
|
9500
|
+
if (!container.repulse) {
|
|
9501
|
+
container.repulse = {
|
|
9502
|
+
particles: []
|
|
9503
|
+
};
|
|
9504
|
+
}
|
|
9505
|
+
this.handleClickMode = mode => {
|
|
9506
|
+
const options = this.container.actualOptions;
|
|
9507
|
+
if (mode !== "repulse") {
|
|
9508
|
+
return;
|
|
9509
|
+
}
|
|
9510
|
+
if (!container.repulse) {
|
|
9511
|
+
container.repulse = {
|
|
9512
|
+
particles: []
|
|
9513
|
+
};
|
|
9514
|
+
}
|
|
9515
|
+
container.repulse.clicking = true;
|
|
9516
|
+
container.repulse.count = 0;
|
|
9517
|
+
for (const particle of container.repulse.particles) {
|
|
9518
|
+
particle.velocity.setTo(particle.initialVelocity);
|
|
9519
|
+
}
|
|
9520
|
+
container.repulse.particles = [];
|
|
9521
|
+
container.repulse.finish = false;
|
|
9522
|
+
setTimeout((() => {
|
|
9523
|
+
if (!container.destroyed) {
|
|
9524
|
+
if (!container.repulse) {
|
|
9525
|
+
container.repulse = {
|
|
9526
|
+
particles: []
|
|
9527
|
+
};
|
|
9528
|
+
}
|
|
9529
|
+
container.repulse.clicking = false;
|
|
9530
|
+
}
|
|
9531
|
+
}), options.interactivity.modes.repulse.duration * 1e3);
|
|
9532
|
+
};
|
|
9564
9533
|
}
|
|
9565
9534
|
isEnabled() {
|
|
9566
9535
|
const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = options.interactivity.events, divs = events.onDiv, divRepulse = isDivModeEnabled("repulse", divs);
|
|
@@ -9612,6 +9581,11 @@
|
|
|
9612
9581
|
}
|
|
9613
9582
|
clickRepulse() {
|
|
9614
9583
|
const container = this.container;
|
|
9584
|
+
if (!container.repulse) {
|
|
9585
|
+
container.repulse = {
|
|
9586
|
+
particles: []
|
|
9587
|
+
};
|
|
9588
|
+
}
|
|
9615
9589
|
if (!container.repulse.finish) {
|
|
9616
9590
|
if (!container.repulse.count) {
|
|
9617
9591
|
container.repulse.count = 0;
|
|
@@ -9776,25 +9750,6 @@
|
|
|
9776
9750
|
destroy() {
|
|
9777
9751
|
ImageDrawer_classPrivateFieldSet(this, _ImageDrawer_images, [], "f");
|
|
9778
9752
|
}
|
|
9779
|
-
async loadImageShape(container, imageShape) {
|
|
9780
|
-
const source = imageShape.src;
|
|
9781
|
-
if (!source) {
|
|
9782
|
-
throw new Error("Error tsParticles - No image.src");
|
|
9783
|
-
}
|
|
9784
|
-
try {
|
|
9785
|
-
const image = {
|
|
9786
|
-
source: source,
|
|
9787
|
-
type: source.substr(source.length - 3),
|
|
9788
|
-
error: false,
|
|
9789
|
-
loading: true
|
|
9790
|
-
};
|
|
9791
|
-
this.addImage(container, image);
|
|
9792
|
-
const imageFunc = imageShape.replaceColor ? downloadSvgImage : loadImage;
|
|
9793
|
-
await imageFunc(image);
|
|
9794
|
-
} catch (_a) {
|
|
9795
|
-
throw new Error(`tsParticles error - ${imageShape.src} not found`);
|
|
9796
|
-
}
|
|
9797
|
-
}
|
|
9798
9753
|
draw(context, particle, radius, opacity) {
|
|
9799
9754
|
var _a, _b;
|
|
9800
9755
|
const image = particle.image;
|
|
@@ -9859,6 +9814,25 @@
|
|
|
9859
9814
|
particle.fill = imageShape.fill;
|
|
9860
9815
|
particle.close = imageShape.close;
|
|
9861
9816
|
}
|
|
9817
|
+
async loadImageShape(container, imageShape) {
|
|
9818
|
+
const source = imageShape.src;
|
|
9819
|
+
if (!source) {
|
|
9820
|
+
throw new Error("Error tsParticles - No image.src");
|
|
9821
|
+
}
|
|
9822
|
+
try {
|
|
9823
|
+
const image = {
|
|
9824
|
+
source: source,
|
|
9825
|
+
type: source.substr(source.length - 3),
|
|
9826
|
+
error: false,
|
|
9827
|
+
loading: true
|
|
9828
|
+
};
|
|
9829
|
+
this.addImage(container, image);
|
|
9830
|
+
const imageFunc = imageShape.replaceColor ? downloadSvgImage : loadImage;
|
|
9831
|
+
await imageFunc(image);
|
|
9832
|
+
} catch (_a) {
|
|
9833
|
+
throw new Error(`tsParticles error - ${imageShape.src} not found`);
|
|
9834
|
+
}
|
|
9835
|
+
}
|
|
9862
9836
|
}
|
|
9863
9837
|
_ImageDrawer_images = new WeakMap;
|
|
9864
9838
|
async function loadImageShape(engine) {
|
|
@@ -10248,6 +10222,40 @@
|
|
|
10248
10222
|
async function loadOutModesUpdater(engine) {
|
|
10249
10223
|
await engine.addParticleUpdater("outModes", (container => new OutOfCanvasUpdater(container)));
|
|
10250
10224
|
}
|
|
10225
|
+
class ParallaxMover {
|
|
10226
|
+
init() {}
|
|
10227
|
+
isEnabled(particle) {
|
|
10228
|
+
return !isSsr() && !particle.destroyed && particle.container.actualOptions.interactivity.events.onHover.parallax.enable;
|
|
10229
|
+
}
|
|
10230
|
+
move(particle) {
|
|
10231
|
+
const container = particle.container, options = container.actualOptions;
|
|
10232
|
+
if (isSsr() || !options.interactivity.events.onHover.parallax.enable) {
|
|
10233
|
+
return;
|
|
10234
|
+
}
|
|
10235
|
+
const parallaxForce = options.interactivity.events.onHover.parallax.force, mousePos = container.interactivity.mouse.position;
|
|
10236
|
+
if (!mousePos) {
|
|
10237
|
+
return;
|
|
10238
|
+
}
|
|
10239
|
+
const canvasCenter = {
|
|
10240
|
+
x: container.canvas.size.width / 2,
|
|
10241
|
+
y: container.canvas.size.height / 2
|
|
10242
|
+
}, parallaxSmooth = options.interactivity.events.onHover.parallax.smooth, factor = particle.getRadius() / parallaxForce, centerDistance = {
|
|
10243
|
+
x: (mousePos.x - canvasCenter.x) * factor,
|
|
10244
|
+
y: (mousePos.y - canvasCenter.y) * factor
|
|
10245
|
+
};
|
|
10246
|
+
particle.offset.x += (centerDistance.x - particle.offset.x) / parallaxSmooth;
|
|
10247
|
+
particle.offset.y += (centerDistance.y - particle.offset.y) / parallaxSmooth;
|
|
10248
|
+
}
|
|
10249
|
+
}
|
|
10250
|
+
async function loadParallaxMover(engine) {
|
|
10251
|
+
engine.addMover("parallax", (() => new ParallaxMover));
|
|
10252
|
+
}
|
|
10253
|
+
class ParticlesInteractorBase {
|
|
10254
|
+
constructor(container) {
|
|
10255
|
+
this.container = container;
|
|
10256
|
+
this.type = 1;
|
|
10257
|
+
}
|
|
10258
|
+
}
|
|
10251
10259
|
class Attractor_Attractor extends ParticlesInteractorBase {
|
|
10252
10260
|
constructor(container) {
|
|
10253
10261
|
super(container);
|
|
@@ -10302,10 +10310,7 @@
|
|
|
10302
10310
|
}
|
|
10303
10311
|
reset() {}
|
|
10304
10312
|
async interact(p1) {
|
|
10305
|
-
const container = this.container;
|
|
10306
|
-
const pos1 = p1.getPosition();
|
|
10307
|
-
const radius1 = p1.getRadius();
|
|
10308
|
-
const query = container.particles.quadTree.queryCircle(pos1, radius1 * 2);
|
|
10313
|
+
const container = this.container, pos1 = p1.getPosition(), radius1 = p1.getRadius(), query = container.particles.quadTree.queryCircle(pos1, radius1 * 2);
|
|
10309
10314
|
for (const p2 of query) {
|
|
10310
10315
|
if (p1 === p2 || !p2.options.collisions.enable || p1.options.collisions.mode !== p2.options.collisions.mode || p2.destroyed || p2.spawning) {
|
|
10311
10316
|
continue;
|
|
@@ -10314,9 +10319,7 @@
|
|
|
10314
10319
|
if (Math.round(pos1.z) !== Math.round(pos2.z)) {
|
|
10315
10320
|
continue;
|
|
10316
10321
|
}
|
|
10317
|
-
const dist = getDistance(pos1, pos2);
|
|
10318
|
-
const radius2 = p2.getRadius();
|
|
10319
|
-
const distP = radius1 + radius2;
|
|
10322
|
+
const dist = getDistance(pos1, pos2), radius2 = p2.getRadius(), distP = radius1 + radius2;
|
|
10320
10323
|
if (dist <= distP) {
|
|
10321
10324
|
this.resolveCollision(p1, p2);
|
|
10322
10325
|
}
|
|
@@ -10325,27 +10328,20 @@
|
|
|
10325
10328
|
resolveCollision(p1, p2) {
|
|
10326
10329
|
switch (p1.options.collisions.mode) {
|
|
10327
10330
|
case "absorb":
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
break;
|
|
10331
|
-
}
|
|
10331
|
+
this.absorb(p1, p2);
|
|
10332
|
+
break;
|
|
10332
10333
|
|
|
10333
10334
|
case "bounce":
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
break;
|
|
10337
|
-
}
|
|
10335
|
+
bounce(p1, p2);
|
|
10336
|
+
break;
|
|
10338
10337
|
|
|
10339
10338
|
case "destroy":
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
break;
|
|
10343
|
-
}
|
|
10339
|
+
destroy(p1, p2);
|
|
10340
|
+
break;
|
|
10344
10341
|
}
|
|
10345
10342
|
}
|
|
10346
10343
|
absorb(p1, p2) {
|
|
10347
|
-
const container = this.container;
|
|
10348
|
-
const fps = container.fpsLimit / 1e3;
|
|
10344
|
+
const container = this.container, fps = container.fpsLimit / 1e3;
|
|
10349
10345
|
if (p1.getRadius() === undefined && p2.getRadius() !== undefined) {
|
|
10350
10346
|
p1.destroy();
|
|
10351
10347
|
} else if (p1.getRadius() !== undefined && p2.getRadius() === undefined) {
|
|
@@ -10413,18 +10409,11 @@
|
|
|
10413
10409
|
async interact(p1) {
|
|
10414
10410
|
var _a;
|
|
10415
10411
|
p1.links = [];
|
|
10416
|
-
const pos1 = p1.getPosition();
|
|
10417
|
-
const container = this.container;
|
|
10418
|
-
const canvasSize = container.canvas.size;
|
|
10412
|
+
const pos1 = p1.getPosition(), container = this.container, canvasSize = container.canvas.size;
|
|
10419
10413
|
if (pos1.x < 0 || pos1.y < 0 || pos1.x > canvasSize.width || pos1.y > canvasSize.height) {
|
|
10420
10414
|
return;
|
|
10421
10415
|
}
|
|
10422
|
-
const linkOpt1 = p1.options.links;
|
|
10423
|
-
const optOpacity = linkOpt1.opacity;
|
|
10424
|
-
const optDistance = (_a = p1.retina.linksDistance) !== null && _a !== void 0 ? _a : container.retina.linksDistance;
|
|
10425
|
-
const warp = linkOpt1.warp;
|
|
10426
|
-
const range = warp ? new CircleWarp(pos1.x, pos1.y, optDistance, canvasSize) : new Circle(pos1.x, pos1.y, optDistance);
|
|
10427
|
-
const query = container.particles.quadTree.query(range);
|
|
10416
|
+
const linkOpt1 = p1.options.links, optOpacity = linkOpt1.opacity, optDistance = (_a = p1.retina.linksDistance) !== null && _a !== void 0 ? _a : container.retina.linksDistance, warp = linkOpt1.warp, range = warp ? new CircleWarp(pos1.x, pos1.y, optDistance, canvasSize) : new Circle(pos1.x, pos1.y, optDistance), query = container.particles.quadTree.query(range);
|
|
10428
10417
|
for (const p2 of query) {
|
|
10429
10418
|
const linkOpt2 = p2.options.links;
|
|
10430
10419
|
if (p1 === p2 || !linkOpt2.enable || linkOpt1.id !== linkOpt2.id || p2.spawning || p2.destroyed || p1.links.map((t => t.destination)).indexOf(p2) !== -1 || p2.links.map((t => t.destination)).indexOf(p1) !== -1) {
|
|
@@ -10447,8 +10436,7 @@
|
|
|
10447
10436
|
}
|
|
10448
10437
|
}
|
|
10449
10438
|
setColor(p1) {
|
|
10450
|
-
const container = this.container;
|
|
10451
|
-
const linksOptions = p1.options.links;
|
|
10439
|
+
const container = this.container, linksOptions = p1.options.links;
|
|
10452
10440
|
let linkColor = linksOptions.id === undefined ? container.particles.linksColor : container.particles.linksColors.get(linksOptions.id);
|
|
10453
10441
|
if (!linkColor) {
|
|
10454
10442
|
const optColor = linksOptions.color;
|
|
@@ -10477,64 +10465,52 @@
|
|
|
10477
10465
|
linkParticle.links = [];
|
|
10478
10466
|
}
|
|
10479
10467
|
drawParticle(context, particle) {
|
|
10480
|
-
const linkParticle = particle;
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
const
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
const
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
const triangleFreq = particles.getTriangleFrequency(linkParticle, p2, p3);
|
|
10502
|
-
if (triangleFreq > pOptions.links.triangles.frequency) {
|
|
10503
|
-
continue;
|
|
10504
|
-
}
|
|
10505
|
-
this.drawLinkTriangle(linkParticle, link, vertex);
|
|
10468
|
+
const linkParticle = particle, container = this.container, particles = container.particles, pOptions = particle.options;
|
|
10469
|
+
if (linkParticle.links.length <= 0) {
|
|
10470
|
+
return;
|
|
10471
|
+
}
|
|
10472
|
+
context.save();
|
|
10473
|
+
const p1Links = linkParticle.links.filter((l => {
|
|
10474
|
+
const linkFreq = container.particles.getLinkFrequency(linkParticle, l.destination);
|
|
10475
|
+
return linkFreq <= pOptions.links.frequency;
|
|
10476
|
+
}));
|
|
10477
|
+
for (const link of p1Links) {
|
|
10478
|
+
const p2 = link.destination;
|
|
10479
|
+
if (pOptions.links.triangles.enable) {
|
|
10480
|
+
const links = p1Links.map((l => l.destination)), vertices = p2.links.filter((t => {
|
|
10481
|
+
const linkFreq = container.particles.getLinkFrequency(p2, t.destination);
|
|
10482
|
+
return linkFreq <= p2.options.links.frequency && links.indexOf(t.destination) >= 0;
|
|
10483
|
+
}));
|
|
10484
|
+
if (vertices.length) {
|
|
10485
|
+
for (const vertex of vertices) {
|
|
10486
|
+
const p3 = vertex.destination, triangleFreq = particles.getTriangleFrequency(linkParticle, p2, p3);
|
|
10487
|
+
if (triangleFreq > pOptions.links.triangles.frequency) {
|
|
10488
|
+
continue;
|
|
10506
10489
|
}
|
|
10490
|
+
this.drawLinkTriangle(linkParticle, link, vertex);
|
|
10507
10491
|
}
|
|
10508
10492
|
}
|
|
10509
|
-
if (link.opacity > 0 && container.retina.linksWidth > 0) {
|
|
10510
|
-
this.drawLinkLine(linkParticle, link);
|
|
10511
|
-
}
|
|
10512
10493
|
}
|
|
10513
|
-
|
|
10494
|
+
if (link.opacity > 0 && container.retina.linksWidth > 0) {
|
|
10495
|
+
this.drawLinkLine(linkParticle, link);
|
|
10496
|
+
}
|
|
10514
10497
|
}
|
|
10498
|
+
context.restore();
|
|
10515
10499
|
}
|
|
10516
10500
|
drawLinkTriangle(p1, link1, link2) {
|
|
10517
10501
|
var _a;
|
|
10518
|
-
const container = this.container;
|
|
10519
|
-
const options = container.actualOptions;
|
|
10520
|
-
const p2 = link1.destination;
|
|
10521
|
-
const p3 = link2.destination;
|
|
10522
|
-
const triangleOptions = p1.options.links.triangles;
|
|
10523
|
-
const opacityTriangle = (_a = triangleOptions.opacity) !== null && _a !== void 0 ? _a : (link1.opacity + link2.opacity) / 2;
|
|
10502
|
+
const container = this.container, options = container.actualOptions, p2 = link1.destination, p3 = link2.destination, triangleOptions = p1.options.links.triangles, opacityTriangle = (_a = triangleOptions.opacity) !== null && _a !== void 0 ? _a : (link1.opacity + link2.opacity) / 2;
|
|
10524
10503
|
if (opacityTriangle <= 0) {
|
|
10525
10504
|
return;
|
|
10526
10505
|
}
|
|
10527
|
-
const pos1 = p1.getPosition();
|
|
10528
|
-
const pos2 = p2.getPosition();
|
|
10529
|
-
const pos3 = p3.getPosition();
|
|
10506
|
+
const pos1 = p1.getPosition(), pos2 = p2.getPosition(), pos3 = p3.getPosition();
|
|
10530
10507
|
container.canvas.draw((ctx => {
|
|
10531
10508
|
if (getDistance(pos1, pos2) > container.retina.linksDistance || getDistance(pos3, pos2) > container.retina.linksDistance || getDistance(pos3, pos1) > container.retina.linksDistance) {
|
|
10532
10509
|
return;
|
|
10533
10510
|
}
|
|
10534
10511
|
let colorTriangle = colorToRgb(triangleOptions.color);
|
|
10535
10512
|
if (!colorTriangle) {
|
|
10536
|
-
const linksOptions = p1.options.links;
|
|
10537
|
-
const linkColor = linksOptions.id !== undefined ? container.particles.linksColors.get(linksOptions.id) : container.particles.linksColor;
|
|
10513
|
+
const linksOptions = p1.options.links, linkColor = linksOptions.id !== undefined ? container.particles.linksColors.get(linksOptions.id) : container.particles.linksColor;
|
|
10538
10514
|
colorTriangle = getLinkColor(p1, p2, linkColor);
|
|
10539
10515
|
}
|
|
10540
10516
|
if (!colorTriangle) {
|
|
@@ -10544,35 +10520,27 @@
|
|
|
10544
10520
|
}));
|
|
10545
10521
|
}
|
|
10546
10522
|
drawLinkLine(p1, link) {
|
|
10547
|
-
const container = this.container;
|
|
10548
|
-
const options = container.actualOptions;
|
|
10549
|
-
const p2 = link.destination;
|
|
10523
|
+
const container = this.container, options = container.actualOptions, p2 = link.destination, pos1 = p1.getPosition(), pos2 = p2.getPosition();
|
|
10550
10524
|
let opacity = link.opacity;
|
|
10551
|
-
const pos1 = p1.getPosition();
|
|
10552
|
-
const pos2 = p2.getPosition();
|
|
10553
10525
|
container.canvas.draw((ctx => {
|
|
10554
10526
|
var _a, _b;
|
|
10555
10527
|
let colorLine;
|
|
10556
10528
|
const twinkle = p1.options.twinkle.lines;
|
|
10557
10529
|
if (twinkle.enable) {
|
|
10558
|
-
const twinkleFreq = twinkle.frequency;
|
|
10559
|
-
|
|
10560
|
-
const twinkling = Math.random() < twinkleFreq;
|
|
10561
|
-
if (twinkling && twinkleRgb !== undefined) {
|
|
10530
|
+
const twinkleFreq = twinkle.frequency, twinkleRgb = colorToRgb(twinkle.color), twinkling = Math.random() < twinkleFreq;
|
|
10531
|
+
if (twinkling && twinkleRgb) {
|
|
10562
10532
|
colorLine = twinkleRgb;
|
|
10563
10533
|
opacity = getRangeValue(twinkle.opacity);
|
|
10564
10534
|
}
|
|
10565
10535
|
}
|
|
10566
10536
|
if (!colorLine) {
|
|
10567
|
-
const linksOptions = p1.options.links;
|
|
10568
|
-
const linkColor = linksOptions.id !== undefined ? container.particles.linksColors.get(linksOptions.id) : container.particles.linksColor;
|
|
10537
|
+
const linksOptions = p1.options.links, linkColor = linksOptions.id !== undefined ? container.particles.linksColors.get(linksOptions.id) : container.particles.linksColor;
|
|
10569
10538
|
colorLine = getLinkColor(p1, p2, linkColor);
|
|
10570
10539
|
}
|
|
10571
10540
|
if (!colorLine) {
|
|
10572
10541
|
return;
|
|
10573
10542
|
}
|
|
10574
|
-
const width = (_a = p1.retina.linksWidth) !== null && _a !== void 0 ? _a : container.retina.linksWidth;
|
|
10575
|
-
const maxDistance = (_b = p1.retina.linksDistance) !== null && _b !== void 0 ? _b : container.retina.linksDistance;
|
|
10543
|
+
const width = (_a = p1.retina.linksWidth) !== null && _a !== void 0 ? _a : container.retina.linksWidth, maxDistance = (_b = p1.retina.linksDistance) !== null && _b !== void 0 ? _b : container.retina.linksDistance;
|
|
10576
10544
|
drawLinkLine(ctx, width, pos1, pos2, maxDistance, container.canvas.size, p1.options.links.warp, options.backgroundMask.enable, options.backgroundMask.composite, colorLine, opacity, p1.options.links.shadow);
|
|
10577
10545
|
}));
|
|
10578
10546
|
}
|
|
@@ -10916,11 +10884,16 @@
|
|
|
10916
10884
|
}
|
|
10917
10885
|
}
|
|
10918
10886
|
async function loadSlim(engine) {
|
|
10887
|
+
await loadBaseMover(engine);
|
|
10888
|
+
await loadParallaxMover(engine);
|
|
10919
10889
|
await loadExternalAttractInteraction(engine);
|
|
10920
10890
|
await loadExternalBounceInteraction(engine);
|
|
10921
10891
|
await loadExternalBubbleInteraction(engine);
|
|
10922
10892
|
await loadExternalConnectInteraction(engine);
|
|
10923
10893
|
await loadExternalGrabInteraction(engine);
|
|
10894
|
+
await loadExternalPauseInteraction(engine);
|
|
10895
|
+
await loadExternalPushInteraction(engine);
|
|
10896
|
+
await loadExternalRemoveInteraction(engine);
|
|
10924
10897
|
await loadExternalRepulseInteraction(engine);
|
|
10925
10898
|
await loadParticlesAttractInteraction(engine);
|
|
10926
10899
|
await loadParticlesCollisionsInteraction(engine);
|
|
@@ -11019,6 +10992,22 @@
|
|
|
11019
10992
|
async function loadTiltUpdater(engine) {
|
|
11020
10993
|
await engine.addParticleUpdater("tilt", (container => new TiltUpdater(container)));
|
|
11021
10994
|
}
|
|
10995
|
+
class TwinkleUpdater {
|
|
10996
|
+
getColorStyles(particle, context, radius, opacity) {
|
|
10997
|
+
const pOptions = particle.options, twinkle = pOptions.twinkle.particles, twinkling = twinkle.enable && Math.random() < twinkle.frequency, zIndexOptions = particle.options.zIndex, zOpacityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.opacityRate, twinklingOpacity = twinkling ? getRangeValue(twinkle.opacity) * zOpacityFactor : opacity, twinkleRgb = colorToHsl(twinkle.color), twinkleStyle = twinkleRgb ? getStyleFromHsl(twinkleRgb, twinklingOpacity) : undefined, res = {}, needsTwinkle = twinkling && twinkleStyle;
|
|
10998
|
+
res.fill = needsTwinkle ? twinkleStyle : undefined;
|
|
10999
|
+
res.stroke = needsTwinkle ? twinkleStyle : undefined;
|
|
11000
|
+
return res;
|
|
11001
|
+
}
|
|
11002
|
+
init() {}
|
|
11003
|
+
isEnabled(particle) {
|
|
11004
|
+
return particle.options.twinkle.particles.enable;
|
|
11005
|
+
}
|
|
11006
|
+
update() {}
|
|
11007
|
+
}
|
|
11008
|
+
async function loadTwinkleUpdater(engine) {
|
|
11009
|
+
await engine.addParticleUpdater("tilt", (() => new TwinkleUpdater));
|
|
11010
|
+
}
|
|
11022
11011
|
function updateWobble(particle, delta) {
|
|
11023
11012
|
var _a;
|
|
11024
11013
|
const wobble = particle.options.wobble;
|
|
@@ -11069,10 +11058,11 @@
|
|
|
11069
11058
|
}
|
|
11070
11059
|
async function loadFull(engine) {
|
|
11071
11060
|
await loadSlim(engine);
|
|
11072
|
-
await loadExternalTrailInteraction(engine);
|
|
11073
11061
|
await loadRollUpdater(engine);
|
|
11074
11062
|
await loadTiltUpdater(engine);
|
|
11063
|
+
await loadTwinkleUpdater(engine);
|
|
11075
11064
|
await loadWobbleUpdater(engine);
|
|
11065
|
+
await loadExternalTrailInteraction(engine);
|
|
11076
11066
|
await loadAbsorbersPlugin(engine);
|
|
11077
11067
|
await loadEmittersPlugin(engine);
|
|
11078
11068
|
await loadPolygonMaskPlugin(engine);
|