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
|
@@ -43,4143 +43,58 @@
|
|
|
43
43
|
return loadRollUpdater;
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
-
|
|
47
|
-
constructor(x, y, radius) {
|
|
48
|
-
super(x, y);
|
|
49
|
-
this.radius = radius;
|
|
50
|
-
}
|
|
51
|
-
contains(point) {
|
|
52
|
-
return getDistance(point, this.position) <= this.radius;
|
|
53
|
-
}
|
|
54
|
-
intersects(range) {
|
|
55
|
-
const rect = range;
|
|
56
|
-
const circle = range;
|
|
57
|
-
const pos1 = this.position;
|
|
58
|
-
const pos2 = range.position;
|
|
59
|
-
const xDist = Math.abs(pos2.x - pos1.x);
|
|
60
|
-
const yDist = Math.abs(pos2.y - pos1.y);
|
|
61
|
-
const r = this.radius;
|
|
62
|
-
if (circle.radius !== undefined) {
|
|
63
|
-
const rSum = r + circle.radius;
|
|
64
|
-
const dist = Math.sqrt(xDist * xDist + yDist + yDist);
|
|
65
|
-
return rSum > dist;
|
|
66
|
-
} else if (rect.size !== undefined) {
|
|
67
|
-
const w = rect.size.width;
|
|
68
|
-
const h = rect.size.height;
|
|
69
|
-
const edges = Math.pow(xDist - w, 2) + Math.pow(yDist - h, 2);
|
|
70
|
-
if (xDist > r + w || yDist > r + h) {
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
if (xDist <= w || yDist <= h) {
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
76
|
-
return edges <= r * r;
|
|
77
|
-
}
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
class CircleWarp_CircleWarp extends(null && Circle){
|
|
82
|
-
constructor(x, y, radius, canvasSize) {
|
|
83
|
-
super(x, y, radius);
|
|
84
|
-
this.canvasSize = canvasSize;
|
|
85
|
-
this.canvasSize = {
|
|
86
|
-
height: canvasSize.height,
|
|
87
|
-
width: canvasSize.width
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
contains(point) {
|
|
91
|
-
if (super.contains(point)) {
|
|
92
|
-
return true;
|
|
93
|
-
}
|
|
94
|
-
const posNE = {
|
|
95
|
-
x: point.x - this.canvasSize.width,
|
|
96
|
-
y: point.y
|
|
97
|
-
};
|
|
98
|
-
if (super.contains(posNE)) {
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
const posSE = {
|
|
102
|
-
x: point.x - this.canvasSize.width,
|
|
103
|
-
y: point.y - this.canvasSize.height
|
|
104
|
-
};
|
|
105
|
-
if (super.contains(posSE)) {
|
|
106
|
-
return true;
|
|
107
|
-
}
|
|
108
|
-
const posSW = {
|
|
109
|
-
x: point.x,
|
|
110
|
-
y: point.y - this.canvasSize.height
|
|
111
|
-
};
|
|
112
|
-
return super.contains(posSW);
|
|
113
|
-
}
|
|
114
|
-
intersects(range) {
|
|
115
|
-
if (super.intersects(range)) {
|
|
116
|
-
return true;
|
|
117
|
-
}
|
|
118
|
-
const rect = range;
|
|
119
|
-
const circle = range;
|
|
120
|
-
const newPos = {
|
|
121
|
-
x: range.position.x - this.canvasSize.width,
|
|
122
|
-
y: range.position.y - this.canvasSize.height
|
|
123
|
-
};
|
|
124
|
-
if (circle.radius !== undefined) {
|
|
125
|
-
const biggerCircle = new Circle(newPos.x, newPos.y, circle.radius * 2);
|
|
126
|
-
return super.intersects(biggerCircle);
|
|
127
|
-
} else if (rect.size !== undefined) {
|
|
128
|
-
const rectSW = new Rectangle(newPos.x, newPos.y, rect.size.width * 2, rect.size.height * 2);
|
|
129
|
-
return super.intersects(rectSW);
|
|
130
|
-
}
|
|
131
|
-
return false;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
class Constants_Constants {}
|
|
135
|
-
Constants_Constants.generatedAttribute = "generated";
|
|
136
|
-
Constants_Constants.randomColorValue = "random";
|
|
137
|
-
Constants_Constants.midColorValue = "mid";
|
|
138
|
-
Constants_Constants.touchEndEvent = "touchend";
|
|
139
|
-
Constants_Constants.mouseDownEvent = "mousedown";
|
|
140
|
-
Constants_Constants.mouseUpEvent = "mouseup";
|
|
141
|
-
Constants_Constants.mouseMoveEvent = "mousemove";
|
|
142
|
-
Constants_Constants.touchStartEvent = "touchstart";
|
|
143
|
-
Constants_Constants.touchMoveEvent = "touchmove";
|
|
144
|
-
Constants_Constants.mouseLeaveEvent = "mouseleave";
|
|
145
|
-
Constants_Constants.mouseOutEvent = "mouseout";
|
|
146
|
-
Constants_Constants.touchCancelEvent = "touchcancel";
|
|
147
|
-
Constants_Constants.resizeEvent = "resize";
|
|
148
|
-
Constants_Constants.visibilityChangeEvent = "visibilitychange";
|
|
149
|
-
Constants_Constants.noPolygonDataLoaded = "No polygon data loaded.";
|
|
150
|
-
Constants_Constants.noPolygonFound = "No polygon found, you need to specify SVG url in config.";
|
|
151
|
-
function manageListener(element, event, handler, add, options) {
|
|
152
|
-
if (add) {
|
|
153
|
-
let addOptions = {
|
|
154
|
-
passive: true
|
|
155
|
-
};
|
|
156
|
-
if (typeof options === "boolean") {
|
|
157
|
-
addOptions.capture = options;
|
|
158
|
-
} else if (options !== undefined) {
|
|
159
|
-
addOptions = options;
|
|
160
|
-
}
|
|
161
|
-
element.addEventListener(event, handler, addOptions);
|
|
162
|
-
} else {
|
|
163
|
-
const removeOptions = options;
|
|
164
|
-
element.removeEventListener(event, handler, removeOptions);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
class EventListeners_EventListeners {
|
|
168
|
-
constructor(container) {
|
|
169
|
-
this.container = container;
|
|
170
|
-
this.canPush = true;
|
|
171
|
-
this.mouseMoveHandler = e => this.mouseTouchMove(e);
|
|
172
|
-
this.touchStartHandler = e => this.mouseTouchMove(e);
|
|
173
|
-
this.touchMoveHandler = e => this.mouseTouchMove(e);
|
|
174
|
-
this.touchEndHandler = () => this.mouseTouchFinish();
|
|
175
|
-
this.mouseLeaveHandler = () => this.mouseTouchFinish();
|
|
176
|
-
this.touchCancelHandler = () => this.mouseTouchFinish();
|
|
177
|
-
this.touchEndClickHandler = e => this.mouseTouchClick(e);
|
|
178
|
-
this.mouseUpHandler = e => this.mouseTouchClick(e);
|
|
179
|
-
this.mouseDownHandler = () => this.mouseDown();
|
|
180
|
-
this.visibilityChangeHandler = () => this.handleVisibilityChange();
|
|
181
|
-
this.themeChangeHandler = e => this.handleThemeChange(e);
|
|
182
|
-
this.oldThemeChangeHandler = e => this.handleThemeChange(e);
|
|
183
|
-
this.resizeHandler = () => this.handleWindowResize();
|
|
184
|
-
}
|
|
185
|
-
addListeners() {
|
|
186
|
-
this.manageListeners(true);
|
|
187
|
-
}
|
|
188
|
-
removeListeners() {
|
|
189
|
-
this.manageListeners(false);
|
|
190
|
-
}
|
|
191
|
-
manageListeners(add) {
|
|
192
|
-
var _a;
|
|
193
|
-
const container = this.container;
|
|
194
|
-
const options = container.actualOptions;
|
|
195
|
-
const detectType = options.interactivity.detectsOn;
|
|
196
|
-
let mouseLeaveEvent = Constants.mouseLeaveEvent;
|
|
197
|
-
if (detectType === "window") {
|
|
198
|
-
container.interactivity.element = window;
|
|
199
|
-
mouseLeaveEvent = Constants.mouseOutEvent;
|
|
200
|
-
} else if (detectType === "parent" && container.canvas.element) {
|
|
201
|
-
const canvasEl = container.canvas.element;
|
|
202
|
-
container.interactivity.element = (_a = canvasEl.parentElement) !== null && _a !== void 0 ? _a : canvasEl.parentNode;
|
|
203
|
-
} else {
|
|
204
|
-
container.interactivity.element = container.canvas.element;
|
|
205
|
-
}
|
|
206
|
-
const mediaMatch = !isSsr() && typeof matchMedia !== "undefined" && matchMedia("(prefers-color-scheme: dark)");
|
|
207
|
-
if (mediaMatch) {
|
|
208
|
-
if (mediaMatch.addEventListener !== undefined) {
|
|
209
|
-
manageListener(mediaMatch, "change", this.themeChangeHandler, add);
|
|
210
|
-
} else if (mediaMatch.addListener !== undefined) {
|
|
211
|
-
if (add) {
|
|
212
|
-
mediaMatch.addListener(this.oldThemeChangeHandler);
|
|
213
|
-
} else {
|
|
214
|
-
mediaMatch.removeListener(this.oldThemeChangeHandler);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
const interactivityEl = container.interactivity.element;
|
|
219
|
-
if (!interactivityEl) {
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
const html = interactivityEl;
|
|
223
|
-
if (options.interactivity.events.onHover.enable || options.interactivity.events.onClick.enable) {
|
|
224
|
-
manageListener(interactivityEl, Constants.mouseMoveEvent, this.mouseMoveHandler, add);
|
|
225
|
-
manageListener(interactivityEl, Constants.touchStartEvent, this.touchStartHandler, add);
|
|
226
|
-
manageListener(interactivityEl, Constants.touchMoveEvent, this.touchMoveHandler, add);
|
|
227
|
-
if (!options.interactivity.events.onClick.enable) {
|
|
228
|
-
manageListener(interactivityEl, Constants.touchEndEvent, this.touchEndHandler, add);
|
|
229
|
-
} else {
|
|
230
|
-
manageListener(interactivityEl, Constants.touchEndEvent, this.touchEndClickHandler, add);
|
|
231
|
-
manageListener(interactivityEl, Constants.mouseUpEvent, this.mouseUpHandler, add);
|
|
232
|
-
manageListener(interactivityEl, Constants.mouseDownEvent, this.mouseDownHandler, add);
|
|
233
|
-
}
|
|
234
|
-
manageListener(interactivityEl, mouseLeaveEvent, this.mouseLeaveHandler, add);
|
|
235
|
-
manageListener(interactivityEl, Constants.touchCancelEvent, this.touchCancelHandler, add);
|
|
236
|
-
}
|
|
237
|
-
if (container.canvas.element) {
|
|
238
|
-
container.canvas.element.style.pointerEvents = html === container.canvas.element ? "initial" : "none";
|
|
239
|
-
}
|
|
240
|
-
if (options.interactivity.events.resize) {
|
|
241
|
-
if (typeof ResizeObserver !== "undefined") {
|
|
242
|
-
if (this.resizeObserver && !add) {
|
|
243
|
-
if (container.canvas.element) {
|
|
244
|
-
this.resizeObserver.unobserve(container.canvas.element);
|
|
245
|
-
}
|
|
246
|
-
this.resizeObserver.disconnect();
|
|
247
|
-
delete this.resizeObserver;
|
|
248
|
-
} else if (!this.resizeObserver && add && container.canvas.element) {
|
|
249
|
-
this.resizeObserver = new ResizeObserver((entries => {
|
|
250
|
-
const entry = entries.find((e => e.target === container.canvas.element));
|
|
251
|
-
if (!entry) {
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
this.handleWindowResize();
|
|
255
|
-
}));
|
|
256
|
-
this.resizeObserver.observe(container.canvas.element);
|
|
257
|
-
}
|
|
258
|
-
} else {
|
|
259
|
-
manageListener(window, Constants.resizeEvent, this.resizeHandler, add);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
if (document) {
|
|
263
|
-
manageListener(document, Constants.visibilityChangeEvent, this.visibilityChangeHandler, add, false);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
handleWindowResize() {
|
|
267
|
-
if (this.resizeTimeout) {
|
|
268
|
-
clearTimeout(this.resizeTimeout);
|
|
269
|
-
delete this.resizeTimeout;
|
|
270
|
-
}
|
|
271
|
-
this.resizeTimeout = setTimeout((async () => {
|
|
272
|
-
var _a;
|
|
273
|
-
return await ((_a = this.container.canvas) === null || _a === void 0 ? void 0 : _a.windowResize());
|
|
274
|
-
}), 500);
|
|
275
|
-
}
|
|
276
|
-
handleVisibilityChange() {
|
|
277
|
-
const container = this.container;
|
|
278
|
-
const options = container.actualOptions;
|
|
279
|
-
this.mouseTouchFinish();
|
|
280
|
-
if (!options.pauseOnBlur) {
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
if (document === null || document === void 0 ? void 0 : document.hidden) {
|
|
284
|
-
container.pageHidden = true;
|
|
285
|
-
container.pause();
|
|
286
|
-
} else {
|
|
287
|
-
container.pageHidden = false;
|
|
288
|
-
if (container.getAnimationStatus()) {
|
|
289
|
-
container.play(true);
|
|
290
|
-
} else {
|
|
291
|
-
container.draw(true);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
mouseDown() {
|
|
296
|
-
const interactivity = this.container.interactivity;
|
|
297
|
-
if (interactivity) {
|
|
298
|
-
const mouse = interactivity.mouse;
|
|
299
|
-
mouse.clicking = true;
|
|
300
|
-
mouse.downPosition = mouse.position;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
mouseTouchMove(e) {
|
|
304
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
305
|
-
const container = this.container;
|
|
306
|
-
const options = container.actualOptions;
|
|
307
|
-
if (((_a = container.interactivity) === null || _a === void 0 ? void 0 : _a.element) === undefined) {
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
container.interactivity.mouse.inside = true;
|
|
311
|
-
let pos;
|
|
312
|
-
const canvas = container.canvas.element;
|
|
313
|
-
if (e.type.startsWith("mouse")) {
|
|
314
|
-
this.canPush = true;
|
|
315
|
-
const mouseEvent = e;
|
|
316
|
-
if (container.interactivity.element === window) {
|
|
317
|
-
if (canvas) {
|
|
318
|
-
const clientRect = canvas.getBoundingClientRect();
|
|
319
|
-
pos = {
|
|
320
|
-
x: mouseEvent.clientX - clientRect.left,
|
|
321
|
-
y: mouseEvent.clientY - clientRect.top
|
|
322
|
-
};
|
|
323
|
-
}
|
|
324
|
-
} else if (options.interactivity.detectsOn === "parent") {
|
|
325
|
-
const source = mouseEvent.target;
|
|
326
|
-
const target = mouseEvent.currentTarget;
|
|
327
|
-
const canvasEl = container.canvas.element;
|
|
328
|
-
if (source && target && canvasEl) {
|
|
329
|
-
const sourceRect = source.getBoundingClientRect();
|
|
330
|
-
const targetRect = target.getBoundingClientRect();
|
|
331
|
-
const canvasRect = canvasEl.getBoundingClientRect();
|
|
332
|
-
pos = {
|
|
333
|
-
x: mouseEvent.offsetX + 2 * sourceRect.left - (targetRect.left + canvasRect.left),
|
|
334
|
-
y: mouseEvent.offsetY + 2 * sourceRect.top - (targetRect.top + canvasRect.top)
|
|
335
|
-
};
|
|
336
|
-
} else {
|
|
337
|
-
pos = {
|
|
338
|
-
x: (_b = mouseEvent.offsetX) !== null && _b !== void 0 ? _b : mouseEvent.clientX,
|
|
339
|
-
y: (_c = mouseEvent.offsetY) !== null && _c !== void 0 ? _c : mouseEvent.clientY
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
} else {
|
|
343
|
-
if (mouseEvent.target === container.canvas.element) {
|
|
344
|
-
pos = {
|
|
345
|
-
x: (_d = mouseEvent.offsetX) !== null && _d !== void 0 ? _d : mouseEvent.clientX,
|
|
346
|
-
y: (_e = mouseEvent.offsetY) !== null && _e !== void 0 ? _e : mouseEvent.clientY
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
} else {
|
|
351
|
-
this.canPush = e.type !== "touchmove";
|
|
352
|
-
const touchEvent = e;
|
|
353
|
-
const lastTouch = touchEvent.touches[touchEvent.touches.length - 1];
|
|
354
|
-
const canvasRect = canvas === null || canvas === void 0 ? void 0 : canvas.getBoundingClientRect();
|
|
355
|
-
pos = {
|
|
356
|
-
x: lastTouch.clientX - ((_f = canvasRect === null || canvasRect === void 0 ? void 0 : canvasRect.left) !== null && _f !== void 0 ? _f : 0),
|
|
357
|
-
y: lastTouch.clientY - ((_g = canvasRect === null || canvasRect === void 0 ? void 0 : canvasRect.top) !== null && _g !== void 0 ? _g : 0)
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
const pxRatio = container.retina.pixelRatio;
|
|
361
|
-
if (pos) {
|
|
362
|
-
pos.x *= pxRatio;
|
|
363
|
-
pos.y *= pxRatio;
|
|
364
|
-
}
|
|
365
|
-
container.interactivity.mouse.position = pos;
|
|
366
|
-
container.interactivity.status = Constants.mouseMoveEvent;
|
|
367
|
-
}
|
|
368
|
-
mouseTouchFinish() {
|
|
369
|
-
const interactivity = this.container.interactivity;
|
|
370
|
-
if (interactivity === undefined) {
|
|
371
|
-
return;
|
|
372
|
-
}
|
|
373
|
-
const mouse = interactivity.mouse;
|
|
374
|
-
delete mouse.position;
|
|
375
|
-
delete mouse.clickPosition;
|
|
376
|
-
delete mouse.downPosition;
|
|
377
|
-
interactivity.status = Constants.mouseLeaveEvent;
|
|
378
|
-
mouse.inside = false;
|
|
379
|
-
mouse.clicking = false;
|
|
380
|
-
}
|
|
381
|
-
mouseTouchClick(e) {
|
|
382
|
-
const container = this.container;
|
|
383
|
-
const options = container.actualOptions;
|
|
384
|
-
const mouse = container.interactivity.mouse;
|
|
385
|
-
mouse.inside = true;
|
|
386
|
-
let handled = false;
|
|
387
|
-
const mousePosition = mouse.position;
|
|
388
|
-
if (mousePosition === undefined || !options.interactivity.events.onClick.enable) {
|
|
389
|
-
return;
|
|
390
|
-
}
|
|
391
|
-
for (const [, plugin] of container.plugins) {
|
|
392
|
-
if (plugin.clickPositionValid !== undefined) {
|
|
393
|
-
handled = plugin.clickPositionValid(mousePosition);
|
|
394
|
-
if (handled) {
|
|
395
|
-
break;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
if (!handled) {
|
|
400
|
-
this.doMouseTouchClick(e);
|
|
401
|
-
}
|
|
402
|
-
mouse.clicking = false;
|
|
403
|
-
}
|
|
404
|
-
doMouseTouchClick(e) {
|
|
405
|
-
const container = this.container;
|
|
406
|
-
const options = container.actualOptions;
|
|
407
|
-
if (this.canPush) {
|
|
408
|
-
const mousePos = container.interactivity.mouse.position;
|
|
409
|
-
if (mousePos) {
|
|
410
|
-
container.interactivity.mouse.clickPosition = {
|
|
411
|
-
x: mousePos.x,
|
|
412
|
-
y: mousePos.y
|
|
413
|
-
};
|
|
414
|
-
} else {
|
|
415
|
-
return;
|
|
416
|
-
}
|
|
417
|
-
container.interactivity.mouse.clickTime = (new Date).getTime();
|
|
418
|
-
const onClick = options.interactivity.events.onClick;
|
|
419
|
-
if (onClick.mode instanceof Array) {
|
|
420
|
-
for (const mode of onClick.mode) {
|
|
421
|
-
this.handleClickMode(mode);
|
|
422
|
-
}
|
|
423
|
-
} else {
|
|
424
|
-
this.handleClickMode(onClick.mode);
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
if (e.type === "touchend") {
|
|
428
|
-
setTimeout((() => this.mouseTouchFinish()), 500);
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
handleThemeChange(e) {
|
|
432
|
-
const mediaEvent = e;
|
|
433
|
-
const themeName = mediaEvent.matches ? this.container.options.defaultDarkTheme : this.container.options.defaultLightTheme;
|
|
434
|
-
const theme = this.container.options.themes.find((theme => theme.name === themeName));
|
|
435
|
-
if (theme && theme.default.auto) {
|
|
436
|
-
this.container.loadTheme(themeName);
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
handleClickMode(mode) {
|
|
440
|
-
const container = this.container;
|
|
441
|
-
const options = container.actualOptions;
|
|
442
|
-
const pushNb = options.interactivity.modes.push.quantity;
|
|
443
|
-
const removeNb = options.interactivity.modes.remove.quantity;
|
|
444
|
-
switch (mode) {
|
|
445
|
-
case "push":
|
|
446
|
-
{
|
|
447
|
-
if (pushNb > 0) {
|
|
448
|
-
const pushOptions = options.interactivity.modes.push;
|
|
449
|
-
const group = itemFromArray([ undefined, ...pushOptions.groups ]);
|
|
450
|
-
const groupOptions = group !== undefined ? container.actualOptions.particles.groups[group] : undefined;
|
|
451
|
-
container.particles.push(pushNb, container.interactivity.mouse, groupOptions, group);
|
|
452
|
-
}
|
|
453
|
-
break;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
case "remove":
|
|
457
|
-
container.particles.removeQuantity(removeNb);
|
|
458
|
-
break;
|
|
459
|
-
|
|
460
|
-
case "bubble":
|
|
461
|
-
container.bubble.clicking = true;
|
|
462
|
-
break;
|
|
463
|
-
|
|
464
|
-
case "repulse":
|
|
465
|
-
container.repulse.clicking = true;
|
|
466
|
-
container.repulse.count = 0;
|
|
467
|
-
for (const particle of container.repulse.particles) {
|
|
468
|
-
particle.velocity.setTo(particle.initialVelocity);
|
|
469
|
-
}
|
|
470
|
-
container.repulse.particles = [];
|
|
471
|
-
container.repulse.finish = false;
|
|
472
|
-
setTimeout((() => {
|
|
473
|
-
if (!container.destroyed) {
|
|
474
|
-
container.repulse.clicking = false;
|
|
475
|
-
}
|
|
476
|
-
}), options.interactivity.modes.repulse.duration * 1e3);
|
|
477
|
-
break;
|
|
478
|
-
|
|
479
|
-
case "attract":
|
|
480
|
-
container.attract.clicking = true;
|
|
481
|
-
container.attract.count = 0;
|
|
482
|
-
for (const particle of container.attract.particles) {
|
|
483
|
-
particle.velocity.setTo(particle.initialVelocity);
|
|
484
|
-
}
|
|
485
|
-
container.attract.particles = [];
|
|
486
|
-
container.attract.finish = false;
|
|
487
|
-
setTimeout((() => {
|
|
488
|
-
if (!container.destroyed) {
|
|
489
|
-
container.attract.clicking = false;
|
|
490
|
-
}
|
|
491
|
-
}), options.interactivity.modes.attract.duration * 1e3);
|
|
492
|
-
break;
|
|
493
|
-
|
|
494
|
-
case "pause":
|
|
495
|
-
if (container.getAnimationStatus()) {
|
|
496
|
-
container.pause();
|
|
497
|
-
} else {
|
|
498
|
-
container.play();
|
|
499
|
-
}
|
|
500
|
-
break;
|
|
501
|
-
}
|
|
502
|
-
for (const [, plugin] of container.plugins) {
|
|
503
|
-
if (plugin.handleClickMode) {
|
|
504
|
-
plugin.handleClickMode(mode);
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
var __classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
510
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
511
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
512
|
-
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");
|
|
513
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
514
|
-
value;
|
|
515
|
-
};
|
|
516
|
-
var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
517
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
518
|
-
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");
|
|
519
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
520
|
-
};
|
|
521
|
-
var _InteractionManager_engine;
|
|
522
|
-
class InteractionManager_InteractionManager {
|
|
523
|
-
constructor(engine, container) {
|
|
524
|
-
this.container = container;
|
|
525
|
-
_InteractionManager_engine.set(this, void 0);
|
|
526
|
-
__classPrivateFieldSet(this, _InteractionManager_engine, engine, "f");
|
|
527
|
-
this.externalInteractors = [];
|
|
528
|
-
this.particleInteractors = [];
|
|
529
|
-
this.init();
|
|
530
|
-
}
|
|
531
|
-
init() {
|
|
532
|
-
const interactors = __classPrivateFieldGet(this, _InteractionManager_engine, "f").plugins.getInteractors(this.container, true);
|
|
533
|
-
this.externalInteractors = [];
|
|
534
|
-
this.particleInteractors = [];
|
|
535
|
-
for (const interactor of interactors) {
|
|
536
|
-
switch (interactor.type) {
|
|
537
|
-
case 0:
|
|
538
|
-
this.externalInteractors.push(interactor);
|
|
539
|
-
break;
|
|
540
|
-
|
|
541
|
-
case 1:
|
|
542
|
-
this.particleInteractors.push(interactor);
|
|
543
|
-
break;
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
async externalInteract(delta) {
|
|
548
|
-
for (const interactor of this.externalInteractors) {
|
|
549
|
-
if (interactor.isEnabled()) {
|
|
550
|
-
await interactor.interact(delta);
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
async particlesInteract(particle, delta) {
|
|
555
|
-
for (const interactor of this.externalInteractors) {
|
|
556
|
-
interactor.reset(particle);
|
|
557
|
-
}
|
|
558
|
-
for (const interactor of this.particleInteractors) {
|
|
559
|
-
if (interactor.isEnabled(particle)) {
|
|
560
|
-
await interactor.interact(particle, delta);
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
_InteractionManager_engine = new WeakMap;
|
|
566
|
-
function applyDistance(particle) {
|
|
567
|
-
const initialPosition = particle.initialPosition;
|
|
568
|
-
const {dx: dx, dy: dy} = getDistances(initialPosition, particle.position);
|
|
569
|
-
const dxFixed = Math.abs(dx), dyFixed = Math.abs(dy);
|
|
570
|
-
const hDistance = particle.retina.maxDistance.horizontal;
|
|
571
|
-
const vDistance = particle.retina.maxDistance.vertical;
|
|
572
|
-
if (!hDistance && !vDistance) {
|
|
573
|
-
return;
|
|
574
|
-
}
|
|
575
|
-
if ((hDistance && dxFixed >= hDistance || vDistance && dyFixed >= vDistance) && !particle.misplaced) {
|
|
576
|
-
particle.misplaced = !!hDistance && dxFixed > hDistance || !!vDistance && dyFixed > vDistance;
|
|
577
|
-
if (hDistance) {
|
|
578
|
-
particle.velocity.x = particle.velocity.y / 2 - particle.velocity.x;
|
|
579
|
-
}
|
|
580
|
-
if (vDistance) {
|
|
581
|
-
particle.velocity.y = particle.velocity.x / 2 - particle.velocity.y;
|
|
582
|
-
}
|
|
583
|
-
} else if ((!hDistance || dxFixed < hDistance) && (!vDistance || dyFixed < vDistance) && particle.misplaced) {
|
|
584
|
-
particle.misplaced = false;
|
|
585
|
-
} else if (particle.misplaced) {
|
|
586
|
-
const pos = particle.position, vel = particle.velocity;
|
|
587
|
-
if (hDistance && (pos.x < initialPosition.x && vel.x < 0 || pos.x > initialPosition.x && vel.x > 0)) {
|
|
588
|
-
vel.x *= -Math.random();
|
|
589
|
-
}
|
|
590
|
-
if (vDistance && (pos.y < initialPosition.y && vel.y < 0 || pos.y > initialPosition.y && vel.y > 0)) {
|
|
591
|
-
vel.y *= -Math.random();
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
class ParticlesMover_ParticlesMover {
|
|
596
|
-
constructor(container) {
|
|
597
|
-
this.container = container;
|
|
598
|
-
}
|
|
599
|
-
move(particle, delta) {
|
|
600
|
-
if (particle.destroyed) {
|
|
601
|
-
return;
|
|
602
|
-
}
|
|
603
|
-
this.moveParticle(particle, delta);
|
|
604
|
-
this.moveParallax(particle);
|
|
605
|
-
}
|
|
606
|
-
moveParticle(particle, delta) {
|
|
607
|
-
var _a, _b, _c;
|
|
608
|
-
var _d, _e;
|
|
609
|
-
const particleOptions = particle.options;
|
|
610
|
-
const moveOptions = particleOptions.move;
|
|
611
|
-
if (!moveOptions.enable) {
|
|
612
|
-
return;
|
|
613
|
-
}
|
|
614
|
-
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;
|
|
615
|
-
this.applyPath(particle, delta);
|
|
616
|
-
const gravityOptions = particle.gravity;
|
|
617
|
-
const gravityFactor = gravityOptions.enable && gravityOptions.inverse ? -1 : 1;
|
|
618
|
-
if (gravityOptions.enable && moveSpeed) {
|
|
619
|
-
particle.velocity.y += gravityFactor * (gravityOptions.acceleration * delta.factor) / (60 * moveSpeed);
|
|
620
|
-
}
|
|
621
|
-
if (moveDrift && moveSpeed) {
|
|
622
|
-
particle.velocity.x += moveDrift * delta.factor / (60 * moveSpeed);
|
|
623
|
-
}
|
|
624
|
-
const decay = particle.moveDecay;
|
|
625
|
-
if (decay != 1) {
|
|
626
|
-
particle.velocity.multTo(decay);
|
|
627
|
-
}
|
|
628
|
-
const velocity = particle.velocity.mult(moveSpeed);
|
|
629
|
-
const maxSpeed = (_c = particle.retina.maxSpeed) !== null && _c !== void 0 ? _c : container.retina.maxSpeed;
|
|
630
|
-
if (gravityOptions.enable && maxSpeed > 0 && (!gravityOptions.inverse && velocity.y >= 0 && velocity.y >= maxSpeed || gravityOptions.inverse && velocity.y <= 0 && velocity.y <= -maxSpeed)) {
|
|
631
|
-
velocity.y = gravityFactor * maxSpeed;
|
|
632
|
-
if (moveSpeed) {
|
|
633
|
-
particle.velocity.y = velocity.y / moveSpeed;
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
const zIndexOptions = particle.options.zIndex, zVelocityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.velocityRate;
|
|
637
|
-
if (moveOptions.spin.enable) {
|
|
638
|
-
this.spin(particle, moveSpeed);
|
|
639
|
-
} else {
|
|
640
|
-
if (zVelocityFactor != 1) {
|
|
641
|
-
velocity.multTo(zVelocityFactor);
|
|
642
|
-
}
|
|
643
|
-
particle.position.addTo(velocity);
|
|
644
|
-
if (moveOptions.vibrate) {
|
|
645
|
-
particle.position.x += Math.sin(particle.position.x * Math.cos(particle.position.y));
|
|
646
|
-
particle.position.y += Math.cos(particle.position.y * Math.sin(particle.position.x));
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
applyDistance(particle);
|
|
650
|
-
}
|
|
651
|
-
spin(particle, moveSpeed) {
|
|
652
|
-
const container = this.container;
|
|
653
|
-
if (!particle.spin) {
|
|
654
|
-
return;
|
|
655
|
-
}
|
|
656
|
-
const updateFunc = {
|
|
657
|
-
x: particle.spin.direction === "clockwise" ? Math.cos : Math.sin,
|
|
658
|
-
y: particle.spin.direction === "clockwise" ? Math.sin : Math.cos
|
|
659
|
-
};
|
|
660
|
-
particle.position.x = particle.spin.center.x + particle.spin.radius * updateFunc.x(particle.spin.angle);
|
|
661
|
-
particle.position.y = particle.spin.center.y + particle.spin.radius * updateFunc.y(particle.spin.angle);
|
|
662
|
-
particle.spin.radius += particle.spin.acceleration;
|
|
663
|
-
const maxCanvasSize = Math.max(container.canvas.size.width, container.canvas.size.height);
|
|
664
|
-
if (particle.spin.radius > maxCanvasSize / 2) {
|
|
665
|
-
particle.spin.radius = maxCanvasSize / 2;
|
|
666
|
-
particle.spin.acceleration *= -1;
|
|
667
|
-
} else if (particle.spin.radius < 0) {
|
|
668
|
-
particle.spin.radius = 0;
|
|
669
|
-
particle.spin.acceleration *= -1;
|
|
670
|
-
}
|
|
671
|
-
particle.spin.angle += moveSpeed / 100 * (1 - particle.spin.radius / maxCanvasSize);
|
|
672
|
-
}
|
|
673
|
-
applyPath(particle, delta) {
|
|
674
|
-
const particlesOptions = particle.options;
|
|
675
|
-
const pathOptions = particlesOptions.move.path;
|
|
676
|
-
const pathEnabled = pathOptions.enable;
|
|
677
|
-
if (!pathEnabled) {
|
|
678
|
-
return;
|
|
679
|
-
}
|
|
680
|
-
const container = this.container;
|
|
681
|
-
if (particle.lastPathTime <= particle.pathDelay) {
|
|
682
|
-
particle.lastPathTime += delta.value;
|
|
683
|
-
return;
|
|
684
|
-
}
|
|
685
|
-
const path = container.pathGenerator.generate(particle);
|
|
686
|
-
particle.velocity.addTo(path);
|
|
687
|
-
if (pathOptions.clamp) {
|
|
688
|
-
particle.velocity.x = clamp(particle.velocity.x, -1, 1);
|
|
689
|
-
particle.velocity.y = clamp(particle.velocity.y, -1, 1);
|
|
690
|
-
}
|
|
691
|
-
particle.lastPathTime -= particle.pathDelay;
|
|
692
|
-
}
|
|
693
|
-
moveParallax(particle) {
|
|
694
|
-
const container = this.container;
|
|
695
|
-
const options = container.actualOptions;
|
|
696
|
-
if (isSsr() || !options.interactivity.events.onHover.parallax.enable) {
|
|
697
|
-
return;
|
|
698
|
-
}
|
|
699
|
-
const parallaxForce = options.interactivity.events.onHover.parallax.force;
|
|
700
|
-
const mousePos = container.interactivity.mouse.position;
|
|
701
|
-
if (!mousePos) {
|
|
702
|
-
return;
|
|
703
|
-
}
|
|
704
|
-
const canvasCenter = {
|
|
705
|
-
x: container.canvas.size.width / 2,
|
|
706
|
-
y: container.canvas.size.height / 2
|
|
707
|
-
};
|
|
708
|
-
const parallaxSmooth = options.interactivity.events.onHover.parallax.smooth;
|
|
709
|
-
const factor = particle.getRadius() / parallaxForce;
|
|
710
|
-
const tmp = {
|
|
711
|
-
x: (mousePos.x - canvasCenter.x) * factor,
|
|
712
|
-
y: (mousePos.y - canvasCenter.y) * factor
|
|
713
|
-
};
|
|
714
|
-
particle.offset.x += (tmp.x - particle.offset.x) / parallaxSmooth;
|
|
715
|
-
particle.offset.y += (tmp.y - particle.offset.y) / parallaxSmooth;
|
|
716
|
-
}
|
|
717
|
-
getProximitySpeedFactor(particle) {
|
|
718
|
-
const container = this.container;
|
|
719
|
-
const options = container.actualOptions;
|
|
720
|
-
const active = isInArray("slow", options.interactivity.events.onHover.mode);
|
|
721
|
-
if (!active) {
|
|
722
|
-
return 1;
|
|
723
|
-
}
|
|
724
|
-
const mousePos = this.container.interactivity.mouse.position;
|
|
725
|
-
if (!mousePos) {
|
|
726
|
-
return 1;
|
|
727
|
-
}
|
|
728
|
-
const particlePos = particle.getPosition();
|
|
729
|
-
const dist = getDistance(mousePos, particlePos);
|
|
730
|
-
const radius = container.retina.slowModeRadius;
|
|
731
|
-
if (dist > radius) {
|
|
732
|
-
return 1;
|
|
733
|
-
}
|
|
734
|
-
const proximityFactor = dist / radius || 0;
|
|
735
|
-
const slowFactor = options.interactivity.modes.slow.factor;
|
|
736
|
-
return proximityFactor / slowFactor;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
var Plugins_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
740
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
741
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
742
|
-
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");
|
|
743
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
744
|
-
value;
|
|
745
|
-
};
|
|
746
|
-
var _Plugins_engine;
|
|
747
|
-
class Plugins {
|
|
748
|
-
constructor(engine) {
|
|
749
|
-
_Plugins_engine.set(this, void 0);
|
|
750
|
-
Plugins_classPrivateFieldSet(this, _Plugins_engine, engine, "f");
|
|
751
|
-
this.plugins = [];
|
|
752
|
-
this.interactorsInitializers = new Map;
|
|
753
|
-
this.updatersInitializers = new Map;
|
|
754
|
-
this.interactors = new Map;
|
|
755
|
-
this.updaters = new Map;
|
|
756
|
-
this.presets = new Map;
|
|
757
|
-
this.drawers = new Map;
|
|
758
|
-
this.pathGenerators = new Map;
|
|
759
|
-
}
|
|
760
|
-
getPlugin(plugin) {
|
|
761
|
-
return this.plugins.find((t => t.id === plugin));
|
|
762
|
-
}
|
|
763
|
-
addPlugin(plugin) {
|
|
764
|
-
if (!this.getPlugin(plugin.id)) {
|
|
765
|
-
this.plugins.push(plugin);
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
getAvailablePlugins(container) {
|
|
769
|
-
const res = new Map;
|
|
770
|
-
for (const plugin of this.plugins) {
|
|
771
|
-
if (!plugin.needsPlugin(container.actualOptions)) {
|
|
772
|
-
continue;
|
|
773
|
-
}
|
|
774
|
-
res.set(plugin.id, plugin.getPlugin(container));
|
|
775
|
-
}
|
|
776
|
-
return res;
|
|
777
|
-
}
|
|
778
|
-
loadOptions(options, sourceOptions) {
|
|
779
|
-
for (const plugin of this.plugins) {
|
|
780
|
-
plugin.loadOptions(options, sourceOptions);
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
getPreset(preset) {
|
|
784
|
-
return this.presets.get(preset);
|
|
785
|
-
}
|
|
786
|
-
addPreset(presetKey, options, override = false) {
|
|
787
|
-
if (override || !this.getPreset(presetKey)) {
|
|
788
|
-
this.presets.set(presetKey, options);
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
addShapeDrawer(type, drawer) {
|
|
792
|
-
if (!this.getShapeDrawer(type)) {
|
|
793
|
-
this.drawers.set(type, drawer);
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
getShapeDrawer(type) {
|
|
797
|
-
return this.drawers.get(type);
|
|
798
|
-
}
|
|
799
|
-
getSupportedShapes() {
|
|
800
|
-
return this.drawers.keys();
|
|
801
|
-
}
|
|
802
|
-
getPathGenerator(type) {
|
|
803
|
-
return this.pathGenerators.get(type);
|
|
804
|
-
}
|
|
805
|
-
addPathGenerator(type, pathGenerator) {
|
|
806
|
-
if (!this.getPathGenerator(type)) {
|
|
807
|
-
this.pathGenerators.set(type, pathGenerator);
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
getInteractors(container, force = false) {
|
|
811
|
-
let res = this.interactors.get(container);
|
|
812
|
-
if (!res || force) {
|
|
813
|
-
res = [ ...this.interactorsInitializers.values() ].map((t => t(container)));
|
|
814
|
-
this.interactors.set(container, res);
|
|
815
|
-
}
|
|
816
|
-
return res;
|
|
817
|
-
}
|
|
818
|
-
addInteractor(name, initInteractor) {
|
|
819
|
-
this.interactorsInitializers.set(name, initInteractor);
|
|
820
|
-
}
|
|
821
|
-
getUpdaters(container, force = false) {
|
|
822
|
-
let res = this.updaters.get(container);
|
|
823
|
-
if (!res || force) {
|
|
824
|
-
res = [ ...this.updatersInitializers.values() ].map((t => t(container)));
|
|
825
|
-
this.updaters.set(container, res);
|
|
826
|
-
}
|
|
827
|
-
return res;
|
|
828
|
-
}
|
|
829
|
-
addParticleUpdater(name, initUpdater) {
|
|
830
|
-
this.updatersInitializers.set(name, initUpdater);
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
_Plugins_engine = new WeakMap;
|
|
834
|
-
class QuadTree_QuadTree {
|
|
835
|
-
constructor(rectangle, capacity) {
|
|
836
|
-
this.rectangle = rectangle;
|
|
837
|
-
this.capacity = capacity;
|
|
838
|
-
this.points = [];
|
|
839
|
-
this.divided = false;
|
|
840
|
-
}
|
|
841
|
-
subdivide() {
|
|
842
|
-
const x = this.rectangle.position.x;
|
|
843
|
-
const y = this.rectangle.position.y;
|
|
844
|
-
const w = this.rectangle.size.width;
|
|
845
|
-
const h = this.rectangle.size.height;
|
|
846
|
-
const capacity = this.capacity;
|
|
847
|
-
this.northEast = new QuadTree_QuadTree(new Rectangle(x, y, w / 2, h / 2), capacity);
|
|
848
|
-
this.northWest = new QuadTree_QuadTree(new Rectangle(x + w / 2, y, w / 2, h / 2), capacity);
|
|
849
|
-
this.southEast = new QuadTree_QuadTree(new Rectangle(x, y + h / 2, w / 2, h / 2), capacity);
|
|
850
|
-
this.southWest = new QuadTree_QuadTree(new Rectangle(x + w / 2, y + h / 2, w / 2, h / 2), capacity);
|
|
851
|
-
this.divided = true;
|
|
852
|
-
}
|
|
853
|
-
insert(point) {
|
|
854
|
-
var _a, _b, _c, _d, _e;
|
|
855
|
-
if (!this.rectangle.contains(point.position)) {
|
|
856
|
-
return false;
|
|
857
|
-
}
|
|
858
|
-
if (this.points.length < this.capacity) {
|
|
859
|
-
this.points.push(point);
|
|
860
|
-
return true;
|
|
861
|
-
}
|
|
862
|
-
if (!this.divided) {
|
|
863
|
-
this.subdivide();
|
|
864
|
-
}
|
|
865
|
-
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;
|
|
866
|
-
}
|
|
867
|
-
queryCircle(position, radius) {
|
|
868
|
-
return this.query(new Circle(position.x, position.y, radius));
|
|
869
|
-
}
|
|
870
|
-
queryCircleWarp(position, radius, containerOrSize) {
|
|
871
|
-
const container = containerOrSize;
|
|
872
|
-
const size = containerOrSize;
|
|
873
|
-
return this.query(new CircleWarp(position.x, position.y, radius, container.canvas !== undefined ? container.canvas.size : size));
|
|
874
|
-
}
|
|
875
|
-
queryRectangle(position, size) {
|
|
876
|
-
return this.query(new Rectangle(position.x, position.y, size.width, size.height));
|
|
877
|
-
}
|
|
878
|
-
query(range, found) {
|
|
879
|
-
var _a, _b, _c, _d;
|
|
880
|
-
const res = found !== null && found !== void 0 ? found : [];
|
|
881
|
-
if (!range.intersects(this.rectangle)) {
|
|
882
|
-
return [];
|
|
883
|
-
} else {
|
|
884
|
-
for (const p of this.points) {
|
|
885
|
-
if (!range.contains(p.position) && getDistance(range.position, p.position) > p.particle.getRadius()) {
|
|
886
|
-
continue;
|
|
887
|
-
}
|
|
888
|
-
res.push(p.particle);
|
|
889
|
-
}
|
|
890
|
-
if (this.divided) {
|
|
891
|
-
(_a = this.northEast) === null || _a === void 0 ? void 0 : _a.query(range, res);
|
|
892
|
-
(_b = this.northWest) === null || _b === void 0 ? void 0 : _b.query(range, res);
|
|
893
|
-
(_c = this.southEast) === null || _c === void 0 ? void 0 : _c.query(range, res);
|
|
894
|
-
(_d = this.southWest) === null || _d === void 0 ? void 0 : _d.query(range, res);
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
return res;
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
class Canvas_Canvas {
|
|
901
|
-
constructor(container) {
|
|
902
|
-
this.container = container;
|
|
903
|
-
this.size = {
|
|
904
|
-
height: 0,
|
|
905
|
-
width: 0
|
|
906
|
-
};
|
|
907
|
-
this.context = null;
|
|
908
|
-
this.generatedCanvas = false;
|
|
909
|
-
}
|
|
910
|
-
init() {
|
|
911
|
-
this.resize();
|
|
912
|
-
this.initStyle();
|
|
913
|
-
this.initCover();
|
|
914
|
-
this.initTrail();
|
|
915
|
-
this.initBackground();
|
|
916
|
-
this.paint();
|
|
917
|
-
}
|
|
918
|
-
loadCanvas(canvas) {
|
|
919
|
-
var _a;
|
|
920
|
-
if (this.generatedCanvas) {
|
|
921
|
-
(_a = this.element) === null || _a === void 0 ? void 0 : _a.remove();
|
|
922
|
-
}
|
|
923
|
-
this.generatedCanvas = canvas.dataset && Constants.generatedAttribute in canvas.dataset ? canvas.dataset[Constants.generatedAttribute] === "true" : this.generatedCanvas;
|
|
924
|
-
this.element = canvas;
|
|
925
|
-
this.originalStyle = deepExtend({}, this.element.style);
|
|
926
|
-
this.size.height = canvas.offsetHeight;
|
|
927
|
-
this.size.width = canvas.offsetWidth;
|
|
928
|
-
this.context = this.element.getContext("2d");
|
|
929
|
-
this.container.retina.init();
|
|
930
|
-
this.initBackground();
|
|
931
|
-
}
|
|
932
|
-
destroy() {
|
|
933
|
-
var _a;
|
|
934
|
-
if (this.generatedCanvas) {
|
|
935
|
-
(_a = this.element) === null || _a === void 0 ? void 0 : _a.remove();
|
|
936
|
-
}
|
|
937
|
-
this.draw((ctx => {
|
|
938
|
-
clear(ctx, this.size);
|
|
939
|
-
}));
|
|
940
|
-
}
|
|
941
|
-
paint() {
|
|
942
|
-
const options = this.container.actualOptions;
|
|
943
|
-
this.draw((ctx => {
|
|
944
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
945
|
-
clear(ctx, this.size);
|
|
946
|
-
this.paintBase(this.coverColorStyle);
|
|
947
|
-
} else {
|
|
948
|
-
this.paintBase();
|
|
949
|
-
}
|
|
950
|
-
}));
|
|
951
|
-
}
|
|
952
|
-
clear() {
|
|
953
|
-
const options = this.container.actualOptions;
|
|
954
|
-
const trail = options.particles.move.trail;
|
|
955
|
-
if (options.backgroundMask.enable) {
|
|
956
|
-
this.paint();
|
|
957
|
-
} else if (trail.enable && trail.length > 0 && this.trailFillColor) {
|
|
958
|
-
this.paintBase(getStyleFromRgb(this.trailFillColor, 1 / trail.length));
|
|
959
|
-
} else {
|
|
960
|
-
this.draw((ctx => {
|
|
961
|
-
clear(ctx, this.size);
|
|
962
|
-
}));
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
async windowResize() {
|
|
966
|
-
if (!this.element) {
|
|
967
|
-
return;
|
|
968
|
-
}
|
|
969
|
-
const container = this.container;
|
|
970
|
-
this.resize();
|
|
971
|
-
const needsRefresh = container.updateActualOptions();
|
|
972
|
-
container.particles.setDensity();
|
|
973
|
-
for (const [, plugin] of container.plugins) {
|
|
974
|
-
if (plugin.resize !== undefined) {
|
|
975
|
-
plugin.resize();
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
if (needsRefresh) {
|
|
979
|
-
await container.refresh();
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
resize() {
|
|
983
|
-
if (!this.element) {
|
|
984
|
-
return;
|
|
985
|
-
}
|
|
986
|
-
const container = this.container;
|
|
987
|
-
const pxRatio = container.retina.pixelRatio;
|
|
988
|
-
const size = container.canvas.size;
|
|
989
|
-
const oldSize = Object.assign({}, size);
|
|
990
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
991
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
992
|
-
this.element.width = size.width;
|
|
993
|
-
this.element.height = size.height;
|
|
994
|
-
if (this.container.started) {
|
|
995
|
-
this.resizeFactor = {
|
|
996
|
-
width: size.width / oldSize.width,
|
|
997
|
-
height: size.height / oldSize.height
|
|
998
|
-
};
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
drawConnectLine(p1, p2) {
|
|
1002
|
-
this.draw((ctx => {
|
|
1003
|
-
var _a;
|
|
1004
|
-
const lineStyle = this.lineStyle(p1, p2);
|
|
1005
|
-
if (!lineStyle) {
|
|
1006
|
-
return;
|
|
1007
|
-
}
|
|
1008
|
-
const pos1 = p1.getPosition();
|
|
1009
|
-
const pos2 = p2.getPosition();
|
|
1010
|
-
drawConnectLine(ctx, (_a = p1.retina.linksWidth) !== null && _a !== void 0 ? _a : this.container.retina.linksWidth, lineStyle, pos1, pos2);
|
|
1011
|
-
}));
|
|
1012
|
-
}
|
|
1013
|
-
drawGrabLine(particle, lineColor, opacity, mousePos) {
|
|
1014
|
-
const container = this.container;
|
|
1015
|
-
this.draw((ctx => {
|
|
1016
|
-
var _a;
|
|
1017
|
-
const beginPos = particle.getPosition();
|
|
1018
|
-
drawGrabLine(ctx, (_a = particle.retina.linksWidth) !== null && _a !== void 0 ? _a : container.retina.linksWidth, beginPos, mousePos, lineColor, opacity);
|
|
1019
|
-
}));
|
|
1020
|
-
}
|
|
1021
|
-
drawParticle(particle, delta) {
|
|
1022
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1023
|
-
if (particle.spawning || particle.destroyed) {
|
|
1024
|
-
return;
|
|
1025
|
-
}
|
|
1026
|
-
const pfColor = particle.getFillColor();
|
|
1027
|
-
const psColor = (_a = particle.getStrokeColor()) !== null && _a !== void 0 ? _a : pfColor;
|
|
1028
|
-
if (!pfColor && !psColor) {
|
|
1029
|
-
return;
|
|
1030
|
-
}
|
|
1031
|
-
let [fColor, sColor] = this.getPluginParticleColors(particle);
|
|
1032
|
-
const pOptions = particle.options;
|
|
1033
|
-
const twinkle = pOptions.twinkle.particles;
|
|
1034
|
-
const twinkling = twinkle.enable && Math.random() < twinkle.frequency;
|
|
1035
|
-
if (!fColor || !sColor) {
|
|
1036
|
-
const twinkleRgb = colorToHsl(twinkle.color);
|
|
1037
|
-
if (!fColor) {
|
|
1038
|
-
fColor = twinkling && twinkleRgb !== undefined ? twinkleRgb : pfColor ? pfColor : undefined;
|
|
1039
|
-
}
|
|
1040
|
-
if (!sColor) {
|
|
1041
|
-
sColor = twinkling && twinkleRgb !== undefined ? twinkleRgb : psColor ? psColor : undefined;
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
const options = this.container.actualOptions;
|
|
1045
|
-
const zIndexOptions = particle.options.zIndex;
|
|
1046
|
-
const zOpacityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.opacityRate;
|
|
1047
|
-
const radius = particle.getRadius();
|
|
1048
|
-
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;
|
|
1049
|
-
const strokeOpacity = (_f = (_e = particle.stroke) === null || _e === void 0 ? void 0 : _e.opacity) !== null && _f !== void 0 ? _f : opacity;
|
|
1050
|
-
const zOpacity = opacity * zOpacityFactor;
|
|
1051
|
-
const fillColorValue = fColor ? getStyleFromHsl(fColor, zOpacity) : undefined;
|
|
1052
|
-
if (!fillColorValue && !sColor) {
|
|
1053
|
-
return;
|
|
1054
|
-
}
|
|
1055
|
-
this.draw((ctx => {
|
|
1056
|
-
const zSizeFactor = (1 - particle.zIndexFactor) ** zIndexOptions.sizeRate;
|
|
1057
|
-
const zStrokeOpacity = strokeOpacity * zOpacityFactor;
|
|
1058
|
-
const strokeColorValue = sColor ? getStyleFromHsl(sColor, zStrokeOpacity) : fillColorValue;
|
|
1059
|
-
if (radius <= 0) {
|
|
1060
|
-
return;
|
|
1061
|
-
}
|
|
1062
|
-
const container = this.container;
|
|
1063
|
-
for (const updater of container.particles.updaters) {
|
|
1064
|
-
if (updater.beforeDraw) {
|
|
1065
|
-
updater.beforeDraw(particle);
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
drawParticle(this.container, ctx, particle, delta, fillColorValue, strokeColorValue, options.backgroundMask.enable, options.backgroundMask.composite, radius * zSizeFactor, zOpacity, particle.options.shadow, particle.gradient);
|
|
1069
|
-
for (const updater of container.particles.updaters) {
|
|
1070
|
-
if (updater.afterDraw) {
|
|
1071
|
-
updater.afterDraw(particle);
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
}));
|
|
1075
|
-
}
|
|
1076
|
-
drawPlugin(plugin, delta) {
|
|
1077
|
-
this.draw((ctx => {
|
|
1078
|
-
drawPlugin(ctx, plugin, delta);
|
|
1079
|
-
}));
|
|
1080
|
-
}
|
|
1081
|
-
drawParticlePlugin(plugin, particle, delta) {
|
|
1082
|
-
this.draw((ctx => {
|
|
1083
|
-
drawParticlePlugin(ctx, plugin, particle, delta);
|
|
1084
|
-
}));
|
|
1085
|
-
}
|
|
1086
|
-
initBackground() {
|
|
1087
|
-
const options = this.container.actualOptions;
|
|
1088
|
-
const background = options.background;
|
|
1089
|
-
const element = this.element;
|
|
1090
|
-
const elementStyle = element === null || element === void 0 ? void 0 : element.style;
|
|
1091
|
-
if (!elementStyle) {
|
|
1092
|
-
return;
|
|
1093
|
-
}
|
|
1094
|
-
if (background.color) {
|
|
1095
|
-
const color = colorToRgb(background.color);
|
|
1096
|
-
elementStyle.backgroundColor = color ? getStyleFromRgb(color, background.opacity) : "";
|
|
1097
|
-
} else {
|
|
1098
|
-
elementStyle.backgroundColor = "";
|
|
1099
|
-
}
|
|
1100
|
-
elementStyle.backgroundImage = background.image || "";
|
|
1101
|
-
elementStyle.backgroundPosition = background.position || "";
|
|
1102
|
-
elementStyle.backgroundRepeat = background.repeat || "";
|
|
1103
|
-
elementStyle.backgroundSize = background.size || "";
|
|
1104
|
-
}
|
|
1105
|
-
draw(cb) {
|
|
1106
|
-
if (!this.context) {
|
|
1107
|
-
return;
|
|
1108
|
-
}
|
|
1109
|
-
return cb(this.context);
|
|
1110
|
-
}
|
|
1111
|
-
initCover() {
|
|
1112
|
-
const options = this.container.actualOptions;
|
|
1113
|
-
const cover = options.backgroundMask.cover;
|
|
1114
|
-
const color = cover.color;
|
|
1115
|
-
const coverRgb = colorToRgb(color);
|
|
1116
|
-
if (coverRgb) {
|
|
1117
|
-
const coverColor = {
|
|
1118
|
-
r: coverRgb.r,
|
|
1119
|
-
g: coverRgb.g,
|
|
1120
|
-
b: coverRgb.b,
|
|
1121
|
-
a: cover.opacity
|
|
1122
|
-
};
|
|
1123
|
-
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1124
|
-
console.log(this.coverColorStyle);
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
initTrail() {
|
|
1128
|
-
const options = this.container.actualOptions;
|
|
1129
|
-
const trail = options.particles.move.trail;
|
|
1130
|
-
const fillColor = colorToRgb(trail.fillColor);
|
|
1131
|
-
if (fillColor) {
|
|
1132
|
-
const trail = options.particles.move.trail;
|
|
1133
|
-
this.trailFillColor = {
|
|
1134
|
-
r: fillColor.r,
|
|
1135
|
-
g: fillColor.g,
|
|
1136
|
-
b: fillColor.b,
|
|
1137
|
-
a: 1 / trail.length
|
|
1138
|
-
};
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
getPluginParticleColors(particle) {
|
|
1142
|
-
let fColor;
|
|
1143
|
-
let sColor;
|
|
1144
|
-
for (const [, plugin] of this.container.plugins) {
|
|
1145
|
-
if (!fColor && plugin.particleFillColor) {
|
|
1146
|
-
fColor = colorToHsl(plugin.particleFillColor(particle));
|
|
1147
|
-
}
|
|
1148
|
-
if (!sColor && plugin.particleStrokeColor) {
|
|
1149
|
-
sColor = colorToHsl(plugin.particleStrokeColor(particle));
|
|
1150
|
-
}
|
|
1151
|
-
if (fColor && sColor) {
|
|
1152
|
-
break;
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
return [ fColor, sColor ];
|
|
1156
|
-
}
|
|
1157
|
-
initStyle() {
|
|
1158
|
-
const element = this.element, options = this.container.actualOptions;
|
|
1159
|
-
if (!element) {
|
|
1160
|
-
return;
|
|
1161
|
-
}
|
|
1162
|
-
const originalStyle = this.originalStyle;
|
|
1163
|
-
if (options.fullScreen.enable) {
|
|
1164
|
-
this.originalStyle = deepExtend({}, element.style);
|
|
1165
|
-
element.style.setProperty("position", "fixed", "important");
|
|
1166
|
-
element.style.setProperty("z-index", options.fullScreen.zIndex.toString(10), "important");
|
|
1167
|
-
element.style.setProperty("top", "0", "important");
|
|
1168
|
-
element.style.setProperty("left", "0", "important");
|
|
1169
|
-
element.style.setProperty("width", "100%", "important");
|
|
1170
|
-
element.style.setProperty("height", "100%", "important");
|
|
1171
|
-
} else if (originalStyle) {
|
|
1172
|
-
element.style.position = originalStyle.position;
|
|
1173
|
-
element.style.zIndex = originalStyle.zIndex;
|
|
1174
|
-
element.style.top = originalStyle.top;
|
|
1175
|
-
element.style.left = originalStyle.left;
|
|
1176
|
-
element.style.width = originalStyle.width;
|
|
1177
|
-
element.style.height = originalStyle.height;
|
|
1178
|
-
}
|
|
1179
|
-
for (const key in options.style) {
|
|
1180
|
-
if (!key || !options.style) {
|
|
1181
|
-
continue;
|
|
1182
|
-
}
|
|
1183
|
-
const value = options.style[key];
|
|
1184
|
-
if (!value) {
|
|
1185
|
-
continue;
|
|
1186
|
-
}
|
|
1187
|
-
element.style.setProperty(key, value, "important");
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
paintBase(baseColor) {
|
|
1191
|
-
this.draw((ctx => {
|
|
1192
|
-
paintBase(ctx, this.size, baseColor);
|
|
1193
|
-
}));
|
|
1194
|
-
}
|
|
1195
|
-
lineStyle(p1, p2) {
|
|
1196
|
-
return this.draw((ctx => {
|
|
1197
|
-
const options = this.container.actualOptions;
|
|
1198
|
-
const connectOptions = options.interactivity.modes.connect;
|
|
1199
|
-
return gradient(ctx, p1, p2, connectOptions.links.opacity);
|
|
1200
|
-
}));
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
class Trail_Trail {
|
|
1204
|
-
constructor() {
|
|
1205
|
-
this.delay = 1;
|
|
1206
|
-
this.pauseOnStop = false;
|
|
1207
|
-
this.quantity = 1;
|
|
1208
|
-
}
|
|
1209
|
-
load(data) {
|
|
1210
|
-
if (data === undefined) {
|
|
1211
|
-
return;
|
|
1212
|
-
}
|
|
1213
|
-
if (data.delay !== undefined) {
|
|
1214
|
-
this.delay = data.delay;
|
|
1215
|
-
}
|
|
1216
|
-
if (data.quantity !== undefined) {
|
|
1217
|
-
this.quantity = data.quantity;
|
|
1218
|
-
}
|
|
1219
|
-
if (data.particles !== undefined) {
|
|
1220
|
-
this.particles = deepExtend({}, data.particles);
|
|
1221
|
-
}
|
|
1222
|
-
if (data.pauseOnStop !== undefined) {
|
|
1223
|
-
this.pauseOnStop = data.pauseOnStop;
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
class Modes_Modes {
|
|
1228
|
-
constructor() {
|
|
1229
|
-
this.attract = new Attract;
|
|
1230
|
-
this.bounce = new Bounce;
|
|
1231
|
-
this.bubble = new Bubble;
|
|
1232
|
-
this.connect = new Connect;
|
|
1233
|
-
this.grab = new Grab;
|
|
1234
|
-
this.light = new Light;
|
|
1235
|
-
this.push = new Push;
|
|
1236
|
-
this.remove = new Remove;
|
|
1237
|
-
this.repulse = new Repulse;
|
|
1238
|
-
this.slow = new Slow;
|
|
1239
|
-
this.trail = new Trail;
|
|
1240
|
-
}
|
|
1241
|
-
load(data) {
|
|
1242
|
-
if (data === undefined) {
|
|
1243
|
-
return;
|
|
1244
|
-
}
|
|
1245
|
-
this.attract.load(data.attract);
|
|
1246
|
-
this.bubble.load(data.bubble);
|
|
1247
|
-
this.connect.load(data.connect);
|
|
1248
|
-
this.grab.load(data.grab);
|
|
1249
|
-
this.light.load(data.light);
|
|
1250
|
-
this.push.load(data.push);
|
|
1251
|
-
this.remove.load(data.remove);
|
|
1252
|
-
this.repulse.load(data.repulse);
|
|
1253
|
-
this.slow.load(data.slow);
|
|
1254
|
-
this.trail.load(data.trail);
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
class Interactivity_Interactivity {
|
|
1258
|
-
constructor() {
|
|
1259
|
-
this.detectsOn = "window";
|
|
1260
|
-
this.events = new Events;
|
|
1261
|
-
this.modes = new Modes;
|
|
1262
|
-
}
|
|
1263
|
-
get detect_on() {
|
|
1264
|
-
return this.detectsOn;
|
|
1265
|
-
}
|
|
1266
|
-
set detect_on(value) {
|
|
1267
|
-
this.detectsOn = value;
|
|
1268
|
-
}
|
|
1269
|
-
load(data) {
|
|
1270
|
-
var _a, _b, _c;
|
|
1271
|
-
if (data === undefined) {
|
|
1272
|
-
return;
|
|
1273
|
-
}
|
|
1274
|
-
const detectsOn = (_a = data.detectsOn) !== null && _a !== void 0 ? _a : data.detect_on;
|
|
1275
|
-
if (detectsOn !== undefined) {
|
|
1276
|
-
this.detectsOn = detectsOn;
|
|
1277
|
-
}
|
|
1278
|
-
this.events.load(data.events);
|
|
1279
|
-
this.modes.load(data.modes);
|
|
1280
|
-
if (((_c = (_b = data.modes) === null || _b === void 0 ? void 0 : _b.slow) === null || _c === void 0 ? void 0 : _c.active) === true) {
|
|
1281
|
-
if (this.events.onHover.mode instanceof Array) {
|
|
1282
|
-
if (this.events.onHover.mode.indexOf("slow") < 0) {
|
|
1283
|
-
this.events.onHover.mode.push("slow");
|
|
1284
|
-
}
|
|
1285
|
-
} else if (this.events.onHover.mode !== "slow") {
|
|
1286
|
-
this.events.onHover.mode = [ this.events.onHover.mode, "slow" ];
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
class ManualParticle_ManualParticle {
|
|
1292
|
-
load(data) {
|
|
1293
|
-
var _a, _b;
|
|
1294
|
-
if (!data) {
|
|
1295
|
-
return;
|
|
1296
|
-
}
|
|
1297
|
-
if (data.position !== undefined) {
|
|
1298
|
-
this.position = {
|
|
1299
|
-
x: (_a = data.position.x) !== null && _a !== void 0 ? _a : 50,
|
|
1300
|
-
y: (_b = data.position.y) !== null && _b !== void 0 ? _b : 50
|
|
1301
|
-
};
|
|
1302
|
-
}
|
|
1303
|
-
if (data.options !== undefined) {
|
|
1304
|
-
this.options = deepExtend({}, data.options);
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
|
-
}
|
|
1308
|
-
class ColorAnimation_ColorAnimation {
|
|
1309
|
-
constructor() {
|
|
1310
|
-
this.count = 0;
|
|
1311
|
-
this.enable = false;
|
|
1312
|
-
this.offset = 0;
|
|
1313
|
-
this.speed = 1;
|
|
1314
|
-
this.sync = true;
|
|
1315
|
-
}
|
|
1316
|
-
load(data) {
|
|
1317
|
-
if (data === undefined) {
|
|
1318
|
-
return;
|
|
1319
|
-
}
|
|
1320
|
-
if (data.count !== undefined) {
|
|
1321
|
-
this.count = setRangeValue(data.count);
|
|
1322
|
-
}
|
|
1323
|
-
if (data.enable !== undefined) {
|
|
1324
|
-
this.enable = data.enable;
|
|
1325
|
-
}
|
|
1326
|
-
if (data.offset !== undefined) {
|
|
1327
|
-
this.offset = setRangeValue(data.offset);
|
|
1328
|
-
}
|
|
1329
|
-
if (data.speed !== undefined) {
|
|
1330
|
-
this.speed = setRangeValue(data.speed);
|
|
1331
|
-
}
|
|
1332
|
-
if (data.sync !== undefined) {
|
|
1333
|
-
this.sync = data.sync;
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
class HslAnimation_HslAnimation {
|
|
1338
|
-
constructor() {
|
|
1339
|
-
this.h = new ColorAnimation;
|
|
1340
|
-
this.s = new ColorAnimation;
|
|
1341
|
-
this.l = new ColorAnimation;
|
|
1342
|
-
}
|
|
1343
|
-
load(data) {
|
|
1344
|
-
if (!data) {
|
|
1345
|
-
return;
|
|
1346
|
-
}
|
|
1347
|
-
this.h.load(data.h);
|
|
1348
|
-
this.s.load(data.s);
|
|
1349
|
-
this.l.load(data.l);
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
class AnimatableColor_AnimatableColor extends(null && OptionsColor){
|
|
1353
|
-
constructor() {
|
|
1354
|
-
super();
|
|
1355
|
-
this.animation = new HslAnimation;
|
|
1356
|
-
}
|
|
1357
|
-
static create(source, data) {
|
|
1358
|
-
const color = new AnimatableColor_AnimatableColor;
|
|
1359
|
-
color.load(source);
|
|
1360
|
-
if (data !== undefined) {
|
|
1361
|
-
if (typeof data === "string" || data instanceof Array) {
|
|
1362
|
-
color.load({
|
|
1363
|
-
value: data
|
|
1364
|
-
});
|
|
1365
|
-
} else {
|
|
1366
|
-
color.load(data);
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
return color;
|
|
1370
|
-
}
|
|
1371
|
-
load(data) {
|
|
1372
|
-
super.load(data);
|
|
1373
|
-
if (!data) {
|
|
1374
|
-
return;
|
|
1375
|
-
}
|
|
1376
|
-
const colorAnimation = data.animation;
|
|
1377
|
-
if (colorAnimation !== undefined) {
|
|
1378
|
-
if (colorAnimation.enable !== undefined) {
|
|
1379
|
-
this.animation.h.load(colorAnimation);
|
|
1380
|
-
} else {
|
|
1381
|
-
this.animation.load(data.animation);
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
}
|
|
1386
|
-
class AnimatableGradient_AnimatableGradient {
|
|
1387
|
-
constructor() {
|
|
1388
|
-
this.angle = new GradientAngle;
|
|
1389
|
-
this.colors = [];
|
|
1390
|
-
this.type = "random";
|
|
1391
|
-
}
|
|
1392
|
-
load(data) {
|
|
1393
|
-
if (!data) {
|
|
1394
|
-
return;
|
|
1395
|
-
}
|
|
1396
|
-
this.angle.load(data.angle);
|
|
1397
|
-
if (data.colors !== undefined) {
|
|
1398
|
-
this.colors = data.colors.map((s => {
|
|
1399
|
-
const tmp = new AnimatableGradientColor;
|
|
1400
|
-
tmp.load(s);
|
|
1401
|
-
return tmp;
|
|
1402
|
-
}));
|
|
1403
|
-
}
|
|
1404
|
-
if (data.type !== undefined) {
|
|
1405
|
-
this.type = data.type;
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
class GradientAngle {
|
|
1410
|
-
constructor() {
|
|
1411
|
-
this.value = 0;
|
|
1412
|
-
this.animation = new GradientAngleAnimation;
|
|
1413
|
-
this.direction = "clockwise";
|
|
1414
|
-
}
|
|
1415
|
-
load(data) {
|
|
1416
|
-
if (!data) {
|
|
1417
|
-
return;
|
|
1418
|
-
}
|
|
1419
|
-
this.animation.load(data.animation);
|
|
1420
|
-
if (data.value !== undefined) {
|
|
1421
|
-
this.value = data.value;
|
|
1422
|
-
}
|
|
1423
|
-
if (data.direction !== undefined) {
|
|
1424
|
-
this.direction = data.direction;
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
}
|
|
1428
|
-
class GradientColorOpacity {
|
|
1429
|
-
constructor() {
|
|
1430
|
-
this.value = 0;
|
|
1431
|
-
this.animation = new GradientColorOpacityAnimation;
|
|
1432
|
-
}
|
|
1433
|
-
load(data) {
|
|
1434
|
-
if (!data) {
|
|
1435
|
-
return;
|
|
1436
|
-
}
|
|
1437
|
-
this.animation.load(data.animation);
|
|
1438
|
-
if (data.value !== undefined) {
|
|
1439
|
-
this.value = setRangeValue(data.value);
|
|
1440
|
-
}
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
class AnimatableGradientColor {
|
|
1444
|
-
constructor() {
|
|
1445
|
-
this.stop = 0;
|
|
1446
|
-
this.value = new AnimatableColor;
|
|
1447
|
-
}
|
|
1448
|
-
load(data) {
|
|
1449
|
-
if (!data) {
|
|
1450
|
-
return;
|
|
1451
|
-
}
|
|
1452
|
-
if (data.stop !== undefined) {
|
|
1453
|
-
this.stop = data.stop;
|
|
1454
|
-
}
|
|
1455
|
-
this.value = AnimatableColor.create(this.value, data.value);
|
|
1456
|
-
if (data.opacity !== undefined) {
|
|
1457
|
-
this.opacity = new GradientColorOpacity;
|
|
1458
|
-
if (typeof data.opacity === "number") {
|
|
1459
|
-
this.opacity.value = data.opacity;
|
|
1460
|
-
} else {
|
|
1461
|
-
this.opacity.load(data.opacity);
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
class GradientAngleAnimation {
|
|
1467
|
-
constructor() {
|
|
1468
|
-
this.count = 0;
|
|
1469
|
-
this.enable = false;
|
|
1470
|
-
this.speed = 0;
|
|
1471
|
-
this.sync = false;
|
|
1472
|
-
}
|
|
1473
|
-
load(data) {
|
|
1474
|
-
if (!data) {
|
|
1475
|
-
return;
|
|
1476
|
-
}
|
|
1477
|
-
if (data.count !== undefined) {
|
|
1478
|
-
this.count = setRangeValue(data.count);
|
|
1479
|
-
}
|
|
1480
|
-
if (data.enable !== undefined) {
|
|
1481
|
-
this.enable = data.enable;
|
|
1482
|
-
}
|
|
1483
|
-
if (data.speed !== undefined) {
|
|
1484
|
-
this.speed = setRangeValue(data.speed);
|
|
1485
|
-
}
|
|
1486
|
-
if (data.sync !== undefined) {
|
|
1487
|
-
this.sync = data.sync;
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
1491
|
-
class GradientColorOpacityAnimation {
|
|
1492
|
-
constructor() {
|
|
1493
|
-
this.count = 0;
|
|
1494
|
-
this.enable = false;
|
|
1495
|
-
this.speed = 0;
|
|
1496
|
-
this.sync = false;
|
|
1497
|
-
this.startValue = "random";
|
|
1498
|
-
}
|
|
1499
|
-
load(data) {
|
|
1500
|
-
if (!data) {
|
|
1501
|
-
return;
|
|
1502
|
-
}
|
|
1503
|
-
if (data.count !== undefined) {
|
|
1504
|
-
this.count = setRangeValue(data.count);
|
|
1505
|
-
}
|
|
1506
|
-
if (data.enable !== undefined) {
|
|
1507
|
-
this.enable = data.enable;
|
|
1508
|
-
}
|
|
1509
|
-
if (data.speed !== undefined) {
|
|
1510
|
-
this.speed = setRangeValue(data.speed);
|
|
1511
|
-
}
|
|
1512
|
-
if (data.sync !== undefined) {
|
|
1513
|
-
this.sync = data.sync;
|
|
1514
|
-
}
|
|
1515
|
-
if (data.startValue !== undefined) {
|
|
1516
|
-
this.startValue = data.startValue;
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1520
|
-
class ValueWithRandom_ValueWithRandom {
|
|
1521
|
-
constructor() {
|
|
1522
|
-
this.random = new Random;
|
|
1523
|
-
this.value = 0;
|
|
1524
|
-
}
|
|
1525
|
-
load(data) {
|
|
1526
|
-
if (!data) {
|
|
1527
|
-
return;
|
|
1528
|
-
}
|
|
1529
|
-
if (typeof data.random === "boolean") {
|
|
1530
|
-
this.random.enable = data.random;
|
|
1531
|
-
} else {
|
|
1532
|
-
this.random.load(data.random);
|
|
1533
|
-
}
|
|
1534
|
-
if (data.value !== undefined) {
|
|
1535
|
-
this.value = setRangeValue(data.value, this.random.enable ? this.random.minimumValue : undefined);
|
|
1536
|
-
}
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
class BounceFactor_BounceFactor extends(null && ValueWithRandom){
|
|
1540
|
-
constructor() {
|
|
1541
|
-
super();
|
|
1542
|
-
this.random.minimumValue = .1;
|
|
1543
|
-
this.value = 1;
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
class Bounce_Bounce {
|
|
1547
|
-
constructor() {
|
|
1548
|
-
this.horizontal = new BounceFactor;
|
|
1549
|
-
this.vertical = new BounceFactor;
|
|
1550
|
-
}
|
|
1551
|
-
load(data) {
|
|
1552
|
-
if (!data) {
|
|
1553
|
-
return;
|
|
1554
|
-
}
|
|
1555
|
-
this.horizontal.load(data.horizontal);
|
|
1556
|
-
this.vertical.load(data.vertical);
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
class Collisions_Collisions {
|
|
1560
|
-
constructor() {
|
|
1561
|
-
this.bounce = new Bounce;
|
|
1562
|
-
this.enable = false;
|
|
1563
|
-
this.mode = "bounce";
|
|
1564
|
-
this.overlap = new CollisionsOverlap;
|
|
1565
|
-
}
|
|
1566
|
-
load(data) {
|
|
1567
|
-
if (data === undefined) {
|
|
1568
|
-
return;
|
|
1569
|
-
}
|
|
1570
|
-
this.bounce.load(data.bounce);
|
|
1571
|
-
if (data.enable !== undefined) {
|
|
1572
|
-
this.enable = data.enable;
|
|
1573
|
-
}
|
|
1574
|
-
if (data.mode !== undefined) {
|
|
1575
|
-
this.mode = data.mode;
|
|
1576
|
-
}
|
|
1577
|
-
this.overlap.load(data.overlap);
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
class SplitFactor_SplitFactor extends(null && ValueWithRandom){
|
|
1581
|
-
constructor() {
|
|
1582
|
-
super();
|
|
1583
|
-
this.value = 3;
|
|
1584
|
-
}
|
|
1585
|
-
}
|
|
1586
|
-
class SplitRate_SplitRate extends(null && ValueWithRandom){
|
|
1587
|
-
constructor() {
|
|
1588
|
-
super();
|
|
1589
|
-
this.value = {
|
|
1590
|
-
min: 4,
|
|
1591
|
-
max: 9
|
|
1592
|
-
};
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
class Split_Split {
|
|
1596
|
-
constructor() {
|
|
1597
|
-
this.count = 1;
|
|
1598
|
-
this.factor = new SplitFactor;
|
|
1599
|
-
this.rate = new SplitRate;
|
|
1600
|
-
this.sizeOffset = true;
|
|
1601
|
-
}
|
|
1602
|
-
load(data) {
|
|
1603
|
-
if (!data) {
|
|
1604
|
-
return;
|
|
1605
|
-
}
|
|
1606
|
-
if (data.count !== undefined) {
|
|
1607
|
-
this.count = data.count;
|
|
1608
|
-
}
|
|
1609
|
-
this.factor.load(data.factor);
|
|
1610
|
-
this.rate.load(data.rate);
|
|
1611
|
-
if (data.particles !== undefined) {
|
|
1612
|
-
this.particles = deepExtend({}, data.particles);
|
|
1613
|
-
}
|
|
1614
|
-
if (data.sizeOffset !== undefined) {
|
|
1615
|
-
this.sizeOffset = data.sizeOffset;
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
class Destroy_Destroy {
|
|
1620
|
-
constructor() {
|
|
1621
|
-
this.mode = "none";
|
|
1622
|
-
this.split = new Split;
|
|
1623
|
-
}
|
|
1624
|
-
load(data) {
|
|
1625
|
-
if (!data) {
|
|
1626
|
-
return;
|
|
1627
|
-
}
|
|
1628
|
-
if (data.mode !== undefined) {
|
|
1629
|
-
this.mode = data.mode;
|
|
1630
|
-
}
|
|
1631
|
-
this.split.load(data.split);
|
|
1632
|
-
}
|
|
1633
|
-
}
|
|
1634
|
-
class LifeDelay_LifeDelay extends(null && ValueWithRandom){
|
|
1635
|
-
constructor() {
|
|
1636
|
-
super();
|
|
1637
|
-
this.sync = false;
|
|
1638
|
-
}
|
|
1639
|
-
load(data) {
|
|
1640
|
-
if (!data) {
|
|
1641
|
-
return;
|
|
1642
|
-
}
|
|
1643
|
-
super.load(data);
|
|
1644
|
-
if (data.sync !== undefined) {
|
|
1645
|
-
this.sync = data.sync;
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
}
|
|
1649
|
-
class LifeDuration_LifeDuration extends(null && ValueWithRandom){
|
|
1650
|
-
constructor() {
|
|
1651
|
-
super();
|
|
1652
|
-
this.random.minimumValue = 1e-4;
|
|
1653
|
-
this.sync = false;
|
|
1654
|
-
}
|
|
1655
|
-
load(data) {
|
|
1656
|
-
if (data === undefined) {
|
|
1657
|
-
return;
|
|
1658
|
-
}
|
|
1659
|
-
super.load(data);
|
|
1660
|
-
if (data.sync !== undefined) {
|
|
1661
|
-
this.sync = data.sync;
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
class Life_Life {
|
|
1666
|
-
constructor() {
|
|
1667
|
-
this.count = 0;
|
|
1668
|
-
this.delay = new LifeDelay;
|
|
1669
|
-
this.duration = new LifeDuration;
|
|
1670
|
-
}
|
|
1671
|
-
load(data) {
|
|
1672
|
-
if (data === undefined) {
|
|
1673
|
-
return;
|
|
1674
|
-
}
|
|
1675
|
-
if (data.count !== undefined) {
|
|
1676
|
-
this.count = data.count;
|
|
1677
|
-
}
|
|
1678
|
-
this.delay.load(data.delay);
|
|
1679
|
-
this.duration.load(data.duration);
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
class Attract_Attract {
|
|
1683
|
-
constructor() {
|
|
1684
|
-
this.distance = 200;
|
|
1685
|
-
this.enable = false;
|
|
1686
|
-
this.rotate = {
|
|
1687
|
-
x: 3e3,
|
|
1688
|
-
y: 3e3
|
|
1689
|
-
};
|
|
1690
|
-
}
|
|
1691
|
-
get rotateX() {
|
|
1692
|
-
return this.rotate.x;
|
|
1693
|
-
}
|
|
1694
|
-
set rotateX(value) {
|
|
1695
|
-
this.rotate.x = value;
|
|
1696
|
-
}
|
|
1697
|
-
get rotateY() {
|
|
1698
|
-
return this.rotate.y;
|
|
1699
|
-
}
|
|
1700
|
-
set rotateY(value) {
|
|
1701
|
-
this.rotate.y = value;
|
|
1702
|
-
}
|
|
1703
|
-
load(data) {
|
|
1704
|
-
var _a, _b, _c, _d;
|
|
1705
|
-
if (!data) {
|
|
1706
|
-
return;
|
|
1707
|
-
}
|
|
1708
|
-
if (data.distance !== undefined) {
|
|
1709
|
-
this.distance = setRangeValue(data.distance);
|
|
1710
|
-
}
|
|
1711
|
-
if (data.enable !== undefined) {
|
|
1712
|
-
this.enable = data.enable;
|
|
1713
|
-
}
|
|
1714
|
-
const rotateX = (_b = (_a = data.rotate) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : data.rotateX;
|
|
1715
|
-
if (rotateX !== undefined) {
|
|
1716
|
-
this.rotate.x = rotateX;
|
|
1717
|
-
}
|
|
1718
|
-
const rotateY = (_d = (_c = data.rotate) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : data.rotateY;
|
|
1719
|
-
if (rotateY !== undefined) {
|
|
1720
|
-
this.rotate.y = rotateY;
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
class MoveAngle_MoveAngle {
|
|
1725
|
-
constructor() {
|
|
1726
|
-
this.offset = 0;
|
|
1727
|
-
this.value = 90;
|
|
1728
|
-
}
|
|
1729
|
-
load(data) {
|
|
1730
|
-
if (data === undefined) {
|
|
1731
|
-
return;
|
|
1732
|
-
}
|
|
1733
|
-
if (data.offset !== undefined) {
|
|
1734
|
-
this.offset = setRangeValue(data.offset);
|
|
1735
|
-
}
|
|
1736
|
-
if (data.value !== undefined) {
|
|
1737
|
-
this.value = setRangeValue(data.value);
|
|
1738
|
-
}
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
|
-
class MoveGravity_MoveGravity {
|
|
1742
|
-
constructor() {
|
|
1743
|
-
this.acceleration = 9.81;
|
|
1744
|
-
this.enable = false;
|
|
1745
|
-
this.inverse = false;
|
|
1746
|
-
this.maxSpeed = 50;
|
|
1747
|
-
}
|
|
1748
|
-
load(data) {
|
|
1749
|
-
if (!data) {
|
|
1750
|
-
return;
|
|
1751
|
-
}
|
|
1752
|
-
if (data.acceleration !== undefined) {
|
|
1753
|
-
this.acceleration = setRangeValue(data.acceleration);
|
|
1754
|
-
}
|
|
1755
|
-
if (data.enable !== undefined) {
|
|
1756
|
-
this.enable = data.enable;
|
|
1757
|
-
}
|
|
1758
|
-
if (data.inverse !== undefined) {
|
|
1759
|
-
this.inverse = data.inverse;
|
|
1760
|
-
}
|
|
1761
|
-
if (data.maxSpeed !== undefined) {
|
|
1762
|
-
this.maxSpeed = setRangeValue(data.maxSpeed);
|
|
1763
|
-
}
|
|
1764
|
-
}
|
|
1765
|
-
}
|
|
1766
|
-
class PathDelay_PathDelay extends(null && ValueWithRandom){
|
|
1767
|
-
constructor() {
|
|
1768
|
-
super();
|
|
1769
|
-
}
|
|
1770
|
-
}
|
|
1771
|
-
class Path_Path {
|
|
1772
|
-
constructor() {
|
|
1773
|
-
this.clamp = true;
|
|
1774
|
-
this.delay = new PathDelay;
|
|
1775
|
-
this.enable = false;
|
|
1776
|
-
this.options = {};
|
|
1777
|
-
}
|
|
1778
|
-
load(data) {
|
|
1779
|
-
if (data === undefined) {
|
|
1780
|
-
return;
|
|
1781
|
-
}
|
|
1782
|
-
if (data.clamp !== undefined) {
|
|
1783
|
-
this.clamp = data.clamp;
|
|
1784
|
-
}
|
|
1785
|
-
this.delay.load(data.delay);
|
|
1786
|
-
if (data.enable !== undefined) {
|
|
1787
|
-
this.enable = data.enable;
|
|
1788
|
-
}
|
|
1789
|
-
this.generator = data.generator;
|
|
1790
|
-
if (data.options) {
|
|
1791
|
-
this.options = deepExtend(this.options, data.options);
|
|
1792
|
-
}
|
|
1793
|
-
}
|
|
1794
|
-
}
|
|
1795
|
-
class Spin_Spin {
|
|
1796
|
-
constructor() {
|
|
1797
|
-
this.acceleration = 0;
|
|
1798
|
-
this.enable = false;
|
|
1799
|
-
}
|
|
1800
|
-
load(data) {
|
|
1801
|
-
if (!data) {
|
|
1802
|
-
return;
|
|
1803
|
-
}
|
|
1804
|
-
if (data.acceleration !== undefined) {
|
|
1805
|
-
this.acceleration = setRangeValue(data.acceleration);
|
|
1806
|
-
}
|
|
1807
|
-
if (data.enable !== undefined) {
|
|
1808
|
-
this.enable = data.enable;
|
|
1809
|
-
}
|
|
1810
|
-
this.position = data.position ? deepExtend({}, data.position) : undefined;
|
|
1811
|
-
}
|
|
1812
|
-
}
|
|
1813
|
-
class Move_Move {
|
|
1814
|
-
constructor() {
|
|
1815
|
-
this.angle = new MoveAngle;
|
|
1816
|
-
this.attract = new Attract;
|
|
1817
|
-
this.decay = 0;
|
|
1818
|
-
this.distance = {};
|
|
1819
|
-
this.direction = "none";
|
|
1820
|
-
this.drift = 0;
|
|
1821
|
-
this.enable = false;
|
|
1822
|
-
this.gravity = new MoveGravity;
|
|
1823
|
-
this.path = new Path;
|
|
1824
|
-
this.outModes = new OutModes;
|
|
1825
|
-
this.random = false;
|
|
1826
|
-
this.size = false;
|
|
1827
|
-
this.speed = 2;
|
|
1828
|
-
this.spin = new Spin;
|
|
1829
|
-
this.straight = false;
|
|
1830
|
-
this.trail = new Trail;
|
|
1831
|
-
this.vibrate = false;
|
|
1832
|
-
this.warp = false;
|
|
1833
|
-
}
|
|
1834
|
-
get collisions() {
|
|
1835
|
-
return false;
|
|
1836
|
-
}
|
|
1837
|
-
set collisions(value) {}
|
|
1838
|
-
get bounce() {
|
|
1839
|
-
return this.collisions;
|
|
1840
|
-
}
|
|
1841
|
-
set bounce(value) {
|
|
1842
|
-
this.collisions = value;
|
|
1843
|
-
}
|
|
1844
|
-
get out_mode() {
|
|
1845
|
-
return this.outMode;
|
|
1846
|
-
}
|
|
1847
|
-
set out_mode(value) {
|
|
1848
|
-
this.outMode = value;
|
|
1849
|
-
}
|
|
1850
|
-
get outMode() {
|
|
1851
|
-
return this.outModes.default;
|
|
1852
|
-
}
|
|
1853
|
-
set outMode(value) {
|
|
1854
|
-
this.outModes.default = value;
|
|
1855
|
-
}
|
|
1856
|
-
get noise() {
|
|
1857
|
-
return this.path;
|
|
1858
|
-
}
|
|
1859
|
-
set noise(value) {
|
|
1860
|
-
this.path = value;
|
|
1861
|
-
}
|
|
1862
|
-
load(data) {
|
|
1863
|
-
var _a, _b, _c;
|
|
1864
|
-
if (data === undefined) {
|
|
1865
|
-
return;
|
|
1866
|
-
}
|
|
1867
|
-
if (data.angle !== undefined) {
|
|
1868
|
-
if (typeof data.angle === "number") {
|
|
1869
|
-
this.angle.value = data.angle;
|
|
1870
|
-
} else {
|
|
1871
|
-
this.angle.load(data.angle);
|
|
1872
|
-
}
|
|
1873
|
-
}
|
|
1874
|
-
this.attract.load(data.attract);
|
|
1875
|
-
if (data.decay !== undefined) {
|
|
1876
|
-
this.decay = data.decay;
|
|
1877
|
-
}
|
|
1878
|
-
if (data.direction !== undefined) {
|
|
1879
|
-
this.direction = data.direction;
|
|
1880
|
-
}
|
|
1881
|
-
if (data.distance !== undefined) {
|
|
1882
|
-
this.distance = typeof data.distance === "number" ? {
|
|
1883
|
-
horizontal: data.distance,
|
|
1884
|
-
vertical: data.distance
|
|
1885
|
-
} : deepExtend({}, data.distance);
|
|
1886
|
-
}
|
|
1887
|
-
if (data.drift !== undefined) {
|
|
1888
|
-
this.drift = setRangeValue(data.drift);
|
|
1889
|
-
}
|
|
1890
|
-
if (data.enable !== undefined) {
|
|
1891
|
-
this.enable = data.enable;
|
|
1892
|
-
}
|
|
1893
|
-
this.gravity.load(data.gravity);
|
|
1894
|
-
const outMode = (_a = data.outMode) !== null && _a !== void 0 ? _a : data.out_mode;
|
|
1895
|
-
if (data.outModes !== undefined || outMode !== undefined) {
|
|
1896
|
-
if (typeof data.outModes === "string" || data.outModes === undefined && outMode !== undefined) {
|
|
1897
|
-
this.outModes.load({
|
|
1898
|
-
default: (_b = data.outModes) !== null && _b !== void 0 ? _b : outMode
|
|
1899
|
-
});
|
|
1900
|
-
} else {
|
|
1901
|
-
this.outModes.load(data.outModes);
|
|
1902
|
-
}
|
|
1903
|
-
}
|
|
1904
|
-
this.path.load((_c = data.path) !== null && _c !== void 0 ? _c : data.noise);
|
|
1905
|
-
if (data.random !== undefined) {
|
|
1906
|
-
this.random = data.random;
|
|
1907
|
-
}
|
|
1908
|
-
if (data.size !== undefined) {
|
|
1909
|
-
this.size = data.size;
|
|
1910
|
-
}
|
|
1911
|
-
if (data.speed !== undefined) {
|
|
1912
|
-
this.speed = setRangeValue(data.speed);
|
|
1913
|
-
}
|
|
1914
|
-
this.spin.load(data.spin);
|
|
1915
|
-
if (data.straight !== undefined) {
|
|
1916
|
-
this.straight = data.straight;
|
|
1917
|
-
}
|
|
1918
|
-
this.trail.load(data.trail);
|
|
1919
|
-
if (data.vibrate !== undefined) {
|
|
1920
|
-
this.vibrate = data.vibrate;
|
|
1921
|
-
}
|
|
1922
|
-
if (data.warp !== undefined) {
|
|
1923
|
-
this.warp = data.warp;
|
|
1924
|
-
}
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
class AnimationOptions_AnimationOptions {
|
|
1928
|
-
constructor() {
|
|
1929
|
-
this.count = 0;
|
|
1930
|
-
this.enable = false;
|
|
1931
|
-
this.speed = 1;
|
|
1932
|
-
this.sync = false;
|
|
1933
|
-
}
|
|
1934
|
-
load(data) {
|
|
1935
|
-
if (!data) {
|
|
1936
|
-
return;
|
|
1937
|
-
}
|
|
1938
|
-
if (data.count !== undefined) {
|
|
1939
|
-
this.count = setRangeValue(data.count);
|
|
1940
|
-
}
|
|
1941
|
-
if (data.enable !== undefined) {
|
|
1942
|
-
this.enable = data.enable;
|
|
1943
|
-
}
|
|
1944
|
-
if (data.speed !== undefined) {
|
|
1945
|
-
this.speed = setRangeValue(data.speed);
|
|
1946
|
-
}
|
|
1947
|
-
if (data.sync !== undefined) {
|
|
1948
|
-
this.sync = data.sync;
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
class OpacityAnimation_OpacityAnimation extends(null && AnimationOptions){
|
|
1953
|
-
constructor() {
|
|
1954
|
-
super();
|
|
1955
|
-
this.destroy = "none";
|
|
1956
|
-
this.enable = false;
|
|
1957
|
-
this.speed = 2;
|
|
1958
|
-
this.startValue = "random";
|
|
1959
|
-
this.sync = false;
|
|
1960
|
-
}
|
|
1961
|
-
get opacity_min() {
|
|
1962
|
-
return this.minimumValue;
|
|
1963
|
-
}
|
|
1964
|
-
set opacity_min(value) {
|
|
1965
|
-
this.minimumValue = value;
|
|
1966
|
-
}
|
|
1967
|
-
load(data) {
|
|
1968
|
-
var _a;
|
|
1969
|
-
if (data === undefined) {
|
|
1970
|
-
return;
|
|
1971
|
-
}
|
|
1972
|
-
super.load(data);
|
|
1973
|
-
if (data.destroy !== undefined) {
|
|
1974
|
-
this.destroy = data.destroy;
|
|
1975
|
-
}
|
|
1976
|
-
if (data.enable !== undefined) {
|
|
1977
|
-
this.enable = data.enable;
|
|
1978
|
-
}
|
|
1979
|
-
this.minimumValue = (_a = data.minimumValue) !== null && _a !== void 0 ? _a : data.opacity_min;
|
|
1980
|
-
if (data.speed !== undefined) {
|
|
1981
|
-
this.speed = data.speed;
|
|
1982
|
-
}
|
|
1983
|
-
if (data.startValue !== undefined) {
|
|
1984
|
-
this.startValue = data.startValue;
|
|
1985
|
-
}
|
|
1986
|
-
if (data.sync !== undefined) {
|
|
1987
|
-
this.sync = data.sync;
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
class Opacity_Opacity extends(null && ValueWithRandom){
|
|
1992
|
-
constructor() {
|
|
1993
|
-
super();
|
|
1994
|
-
this.animation = new OpacityAnimation;
|
|
1995
|
-
this.random.minimumValue = .1;
|
|
1996
|
-
this.value = 1;
|
|
1997
|
-
}
|
|
1998
|
-
get anim() {
|
|
1999
|
-
return this.animation;
|
|
2000
|
-
}
|
|
2001
|
-
set anim(value) {
|
|
2002
|
-
this.animation = value;
|
|
2003
|
-
}
|
|
2004
|
-
load(data) {
|
|
2005
|
-
var _a;
|
|
2006
|
-
if (!data) {
|
|
2007
|
-
return;
|
|
2008
|
-
}
|
|
2009
|
-
super.load(data);
|
|
2010
|
-
const animation = (_a = data.animation) !== null && _a !== void 0 ? _a : data.anim;
|
|
2011
|
-
if (animation !== undefined) {
|
|
2012
|
-
this.animation.load(animation);
|
|
2013
|
-
this.value = setRangeValue(this.value, this.animation.enable ? this.animation.minimumValue : undefined);
|
|
2014
|
-
}
|
|
2015
|
-
}
|
|
2016
|
-
}
|
|
2017
|
-
class OrbitRotation_OrbitRotation extends(null && ValueWithRandom){
|
|
2018
|
-
constructor() {
|
|
2019
|
-
super();
|
|
2020
|
-
this.value = 45;
|
|
2021
|
-
this.random.enable = false;
|
|
2022
|
-
this.random.minimumValue = 0;
|
|
2023
|
-
}
|
|
2024
|
-
load(data) {
|
|
2025
|
-
if (data === undefined) {
|
|
2026
|
-
return;
|
|
2027
|
-
}
|
|
2028
|
-
super.load(data);
|
|
2029
|
-
}
|
|
2030
|
-
}
|
|
2031
|
-
class Orbit_Orbit {
|
|
2032
|
-
constructor() {
|
|
2033
|
-
this.animation = new AnimationOptions;
|
|
2034
|
-
this.enable = false;
|
|
2035
|
-
this.opacity = 1;
|
|
2036
|
-
this.rotation = new OrbitRotation;
|
|
2037
|
-
this.width = 1;
|
|
2038
|
-
}
|
|
2039
|
-
load(data) {
|
|
2040
|
-
if (data === undefined) {
|
|
2041
|
-
return;
|
|
2042
|
-
}
|
|
2043
|
-
this.animation.load(data.animation);
|
|
2044
|
-
this.rotation.load(data.rotation);
|
|
2045
|
-
if (data.enable !== undefined) {
|
|
2046
|
-
this.enable = data.enable;
|
|
2047
|
-
}
|
|
2048
|
-
if (data.opacity !== undefined) {
|
|
2049
|
-
this.opacity = setRangeValue(data.opacity);
|
|
2050
|
-
}
|
|
2051
|
-
if (data.width !== undefined) {
|
|
2052
|
-
this.width = setRangeValue(data.width);
|
|
2053
|
-
}
|
|
2054
|
-
if (data.radius !== undefined) {
|
|
2055
|
-
this.radius = setRangeValue(data.radius);
|
|
2056
|
-
}
|
|
2057
|
-
if (data.color !== undefined) {
|
|
2058
|
-
this.color = OptionsColor.create(this.color, data.color);
|
|
2059
|
-
}
|
|
2060
|
-
}
|
|
2061
|
-
}
|
|
2062
|
-
class Repulse_Repulse extends(null && ValueWithRandom){
|
|
2063
|
-
constructor() {
|
|
2064
|
-
super();
|
|
2065
|
-
this.enabled = false;
|
|
2066
|
-
this.distance = 1;
|
|
2067
|
-
this.duration = 1;
|
|
2068
|
-
this.factor = 1;
|
|
2069
|
-
this.speed = 1;
|
|
2070
|
-
}
|
|
2071
|
-
load(data) {
|
|
2072
|
-
super.load(data);
|
|
2073
|
-
if (!data) {
|
|
2074
|
-
return;
|
|
2075
|
-
}
|
|
2076
|
-
if (data.enabled !== undefined) {
|
|
2077
|
-
this.enabled = data.enabled;
|
|
2078
|
-
}
|
|
2079
|
-
if (data.distance !== undefined) {
|
|
2080
|
-
this.distance = setRangeValue(data.distance);
|
|
2081
|
-
}
|
|
2082
|
-
if (data.duration !== undefined) {
|
|
2083
|
-
this.duration = setRangeValue(data.duration);
|
|
2084
|
-
}
|
|
2085
|
-
if (data.factor !== undefined) {
|
|
2086
|
-
this.factor = setRangeValue(data.factor);
|
|
2087
|
-
}
|
|
2088
|
-
if (data.speed !== undefined) {
|
|
2089
|
-
this.speed = setRangeValue(data.speed);
|
|
2090
|
-
}
|
|
2091
|
-
}
|
|
2092
|
-
}
|
|
2093
|
-
class RollLight_RollLight {
|
|
2094
|
-
constructor() {
|
|
2095
|
-
this.enable = false;
|
|
2096
|
-
this.value = 0;
|
|
2097
|
-
}
|
|
2098
|
-
load(data) {
|
|
2099
|
-
if (!data) {
|
|
2100
|
-
return;
|
|
2101
|
-
}
|
|
2102
|
-
if (data.enable !== undefined) {
|
|
2103
|
-
this.enable = data.enable;
|
|
2104
|
-
}
|
|
2105
|
-
if (data.value !== undefined) {
|
|
2106
|
-
this.value = setRangeValue(data.value);
|
|
2107
|
-
}
|
|
2108
|
-
}
|
|
2109
|
-
}
|
|
2110
|
-
class Roll_Roll {
|
|
2111
|
-
constructor() {
|
|
2112
|
-
this.darken = new RollLight;
|
|
2113
|
-
this.enable = false;
|
|
2114
|
-
this.enlighten = new RollLight;
|
|
2115
|
-
this.mode = "vertical";
|
|
2116
|
-
this.speed = 25;
|
|
2117
|
-
}
|
|
2118
|
-
load(data) {
|
|
2119
|
-
if (!data) {
|
|
2120
|
-
return;
|
|
2121
|
-
}
|
|
2122
|
-
if (data.backColor !== undefined) {
|
|
2123
|
-
this.backColor = OptionsColor.create(this.backColor, data.backColor);
|
|
2124
|
-
}
|
|
2125
|
-
this.darken.load(data.darken);
|
|
2126
|
-
if (data.enable !== undefined) {
|
|
2127
|
-
this.enable = data.enable;
|
|
2128
|
-
}
|
|
2129
|
-
this.enlighten.load(data.enlighten);
|
|
2130
|
-
if (data.mode !== undefined) {
|
|
2131
|
-
this.mode = data.mode;
|
|
2132
|
-
}
|
|
2133
|
-
if (data.speed !== undefined) {
|
|
2134
|
-
this.speed = setRangeValue(data.speed);
|
|
2135
|
-
}
|
|
2136
|
-
}
|
|
2137
|
-
}
|
|
2138
|
-
class RotateAnimation_RotateAnimation {
|
|
2139
|
-
constructor() {
|
|
2140
|
-
this.enable = false;
|
|
2141
|
-
this.speed = 0;
|
|
2142
|
-
this.sync = false;
|
|
2143
|
-
}
|
|
2144
|
-
load(data) {
|
|
2145
|
-
if (data === undefined) {
|
|
2146
|
-
return;
|
|
2147
|
-
}
|
|
2148
|
-
if (data.enable !== undefined) {
|
|
2149
|
-
this.enable = data.enable;
|
|
2150
|
-
}
|
|
2151
|
-
if (data.speed !== undefined) {
|
|
2152
|
-
this.speed = setRangeValue(data.speed);
|
|
2153
|
-
}
|
|
2154
|
-
if (data.sync !== undefined) {
|
|
2155
|
-
this.sync = data.sync;
|
|
2156
|
-
}
|
|
2157
|
-
}
|
|
2158
|
-
}
|
|
2159
|
-
class Rotate_Rotate extends(null && ValueWithRandom){
|
|
2160
|
-
constructor() {
|
|
2161
|
-
super();
|
|
2162
|
-
this.animation = new RotateAnimation;
|
|
2163
|
-
this.direction = "clockwise";
|
|
2164
|
-
this.path = false;
|
|
2165
|
-
this.value = 0;
|
|
2166
|
-
}
|
|
2167
|
-
load(data) {
|
|
2168
|
-
if (!data) {
|
|
2169
|
-
return;
|
|
2170
|
-
}
|
|
2171
|
-
super.load(data);
|
|
2172
|
-
if (data.direction !== undefined) {
|
|
2173
|
-
this.direction = data.direction;
|
|
2174
|
-
}
|
|
2175
|
-
this.animation.load(data.animation);
|
|
2176
|
-
if (data.path !== undefined) {
|
|
2177
|
-
this.path = data.path;
|
|
2178
|
-
}
|
|
2179
|
-
}
|
|
2180
|
-
}
|
|
2181
|
-
class Shape_Shape {
|
|
2182
|
-
constructor() {
|
|
2183
|
-
this.options = {};
|
|
2184
|
-
this.type = "circle";
|
|
2185
|
-
}
|
|
2186
|
-
get image() {
|
|
2187
|
-
var _a;
|
|
2188
|
-
return (_a = this.options["image"]) !== null && _a !== void 0 ? _a : this.options["images"];
|
|
2189
|
-
}
|
|
2190
|
-
set image(value) {
|
|
2191
|
-
this.options["image"] = value;
|
|
2192
|
-
this.options["images"] = value;
|
|
2193
|
-
}
|
|
2194
|
-
get custom() {
|
|
2195
|
-
return this.options;
|
|
2196
|
-
}
|
|
2197
|
-
set custom(value) {
|
|
2198
|
-
this.options = value;
|
|
2199
|
-
}
|
|
2200
|
-
get images() {
|
|
2201
|
-
return this.image;
|
|
2202
|
-
}
|
|
2203
|
-
set images(value) {
|
|
2204
|
-
this.image = value;
|
|
2205
|
-
}
|
|
2206
|
-
get stroke() {
|
|
2207
|
-
return [];
|
|
2208
|
-
}
|
|
2209
|
-
set stroke(_value) {}
|
|
2210
|
-
get character() {
|
|
2211
|
-
var _a;
|
|
2212
|
-
return (_a = this.options["character"]) !== null && _a !== void 0 ? _a : this.options["char"];
|
|
2213
|
-
}
|
|
2214
|
-
set character(value) {
|
|
2215
|
-
this.options["character"] = value;
|
|
2216
|
-
this.options["char"] = value;
|
|
2217
|
-
}
|
|
2218
|
-
get polygon() {
|
|
2219
|
-
var _a;
|
|
2220
|
-
return (_a = this.options["polygon"]) !== null && _a !== void 0 ? _a : this.options["star"];
|
|
2221
|
-
}
|
|
2222
|
-
set polygon(value) {
|
|
2223
|
-
this.options["polygon"] = value;
|
|
2224
|
-
this.options["star"] = value;
|
|
2225
|
-
}
|
|
2226
|
-
load(data) {
|
|
2227
|
-
var _a, _b, _c;
|
|
2228
|
-
if (data === undefined) {
|
|
2229
|
-
return;
|
|
2230
|
-
}
|
|
2231
|
-
const options = (_a = data.options) !== null && _a !== void 0 ? _a : data.custom;
|
|
2232
|
-
if (options !== undefined) {
|
|
2233
|
-
for (const shape in options) {
|
|
2234
|
-
const item = options[shape];
|
|
2235
|
-
if (item !== undefined) {
|
|
2236
|
-
this.options[shape] = deepExtend((_b = this.options[shape]) !== null && _b !== void 0 ? _b : {}, item);
|
|
2237
|
-
}
|
|
2238
|
-
}
|
|
2239
|
-
}
|
|
2240
|
-
this.loadShape(data.character, "character", "char", true);
|
|
2241
|
-
this.loadShape(data.polygon, "polygon", "star", false);
|
|
2242
|
-
this.loadShape((_c = data.image) !== null && _c !== void 0 ? _c : data.images, "image", "images", true);
|
|
2243
|
-
if (data.type !== undefined) {
|
|
2244
|
-
this.type = data.type;
|
|
2245
|
-
}
|
|
2246
|
-
}
|
|
2247
|
-
loadShape(item, mainKey, altKey, altOverride) {
|
|
2248
|
-
var _a, _b, _c, _d;
|
|
2249
|
-
if (item === undefined) {
|
|
2250
|
-
return;
|
|
2251
|
-
}
|
|
2252
|
-
if (item instanceof Array) {
|
|
2253
|
-
if (!(this.options[mainKey] instanceof Array)) {
|
|
2254
|
-
this.options[mainKey] = [];
|
|
2255
|
-
if (!this.options[altKey] || altOverride) {
|
|
2256
|
-
this.options[altKey] = [];
|
|
2257
|
-
}
|
|
2258
|
-
}
|
|
2259
|
-
this.options[mainKey] = deepExtend((_a = this.options[mainKey]) !== null && _a !== void 0 ? _a : [], item);
|
|
2260
|
-
if (!this.options[altKey] || altOverride) {
|
|
2261
|
-
this.options[altKey] = deepExtend((_b = this.options[altKey]) !== null && _b !== void 0 ? _b : [], item);
|
|
2262
|
-
}
|
|
2263
|
-
} else {
|
|
2264
|
-
if (this.options[mainKey] instanceof Array) {
|
|
2265
|
-
this.options[mainKey] = {};
|
|
2266
|
-
if (!this.options[altKey] || altOverride) {
|
|
2267
|
-
this.options[altKey] = {};
|
|
2268
|
-
}
|
|
2269
|
-
}
|
|
2270
|
-
this.options[mainKey] = deepExtend((_c = this.options[mainKey]) !== null && _c !== void 0 ? _c : {}, item);
|
|
2271
|
-
if (!this.options[altKey] || altOverride) {
|
|
2272
|
-
this.options[altKey] = deepExtend((_d = this.options[altKey]) !== null && _d !== void 0 ? _d : {}, item);
|
|
2273
|
-
}
|
|
2274
|
-
}
|
|
2275
|
-
}
|
|
2276
|
-
}
|
|
2277
|
-
class SizeAnimation_SizeAnimation extends(null && AnimationOptions){
|
|
2278
|
-
constructor() {
|
|
2279
|
-
super();
|
|
2280
|
-
this.destroy = "none";
|
|
2281
|
-
this.enable = false;
|
|
2282
|
-
this.speed = 5;
|
|
2283
|
-
this.startValue = "random";
|
|
2284
|
-
this.sync = false;
|
|
2285
|
-
}
|
|
2286
|
-
get size_min() {
|
|
2287
|
-
return this.minimumValue;
|
|
2288
|
-
}
|
|
2289
|
-
set size_min(value) {
|
|
2290
|
-
this.minimumValue = value;
|
|
2291
|
-
}
|
|
2292
|
-
load(data) {
|
|
2293
|
-
var _a;
|
|
2294
|
-
if (data === undefined) {
|
|
2295
|
-
return;
|
|
2296
|
-
}
|
|
2297
|
-
super.load(data);
|
|
2298
|
-
if (data.destroy !== undefined) {
|
|
2299
|
-
this.destroy = data.destroy;
|
|
2300
|
-
}
|
|
2301
|
-
if (data.enable !== undefined) {
|
|
2302
|
-
this.enable = data.enable;
|
|
2303
|
-
}
|
|
2304
|
-
this.minimumValue = (_a = data.minimumValue) !== null && _a !== void 0 ? _a : data.size_min;
|
|
2305
|
-
if (data.speed !== undefined) {
|
|
2306
|
-
this.speed = data.speed;
|
|
2307
|
-
}
|
|
2308
|
-
if (data.startValue !== undefined) {
|
|
2309
|
-
this.startValue = data.startValue;
|
|
2310
|
-
}
|
|
2311
|
-
if (data.sync !== undefined) {
|
|
2312
|
-
this.sync = data.sync;
|
|
2313
|
-
}
|
|
2314
|
-
}
|
|
2315
|
-
}
|
|
2316
|
-
class Size_Size extends(null && ValueWithRandom){
|
|
2317
|
-
constructor() {
|
|
2318
|
-
super();
|
|
2319
|
-
this.animation = new SizeAnimation;
|
|
2320
|
-
this.random.minimumValue = 1;
|
|
2321
|
-
this.value = 3;
|
|
2322
|
-
}
|
|
2323
|
-
get anim() {
|
|
2324
|
-
return this.animation;
|
|
2325
|
-
}
|
|
2326
|
-
set anim(value) {
|
|
2327
|
-
this.animation = value;
|
|
2328
|
-
}
|
|
2329
|
-
load(data) {
|
|
2330
|
-
var _a;
|
|
2331
|
-
if (!data) {
|
|
2332
|
-
return;
|
|
2333
|
-
}
|
|
2334
|
-
super.load(data);
|
|
2335
|
-
const animation = (_a = data.animation) !== null && _a !== void 0 ? _a : data.anim;
|
|
2336
|
-
if (animation !== undefined) {
|
|
2337
|
-
this.animation.load(animation);
|
|
2338
|
-
this.value = setRangeValue(this.value, this.animation.enable ? this.animation.minimumValue : undefined);
|
|
2339
|
-
}
|
|
2340
|
-
}
|
|
2341
|
-
}
|
|
2342
|
-
class Stroke_Stroke {
|
|
2343
|
-
constructor() {
|
|
2344
|
-
this.width = 0;
|
|
2345
|
-
}
|
|
2346
|
-
load(data) {
|
|
2347
|
-
if (data === undefined) {
|
|
2348
|
-
return;
|
|
2349
|
-
}
|
|
2350
|
-
if (data.color !== undefined) {
|
|
2351
|
-
this.color = AnimatableColor.create(this.color, data.color);
|
|
2352
|
-
}
|
|
2353
|
-
if (data.width !== undefined) {
|
|
2354
|
-
this.width = data.width;
|
|
2355
|
-
}
|
|
2356
|
-
if (data.opacity !== undefined) {
|
|
2357
|
-
this.opacity = data.opacity;
|
|
2358
|
-
}
|
|
2359
|
-
}
|
|
2360
|
-
}
|
|
2361
|
-
class TiltAnimation_TiltAnimation {
|
|
2362
|
-
constructor() {
|
|
2363
|
-
this.enable = false;
|
|
2364
|
-
this.speed = 0;
|
|
2365
|
-
this.sync = false;
|
|
2366
|
-
}
|
|
2367
|
-
load(data) {
|
|
2368
|
-
if (data === undefined) {
|
|
2369
|
-
return;
|
|
2370
|
-
}
|
|
2371
|
-
if (data.enable !== undefined) {
|
|
2372
|
-
this.enable = data.enable;
|
|
2373
|
-
}
|
|
2374
|
-
if (data.speed !== undefined) {
|
|
2375
|
-
this.speed = setRangeValue(data.speed);
|
|
2376
|
-
}
|
|
2377
|
-
if (data.sync !== undefined) {
|
|
2378
|
-
this.sync = data.sync;
|
|
2379
|
-
}
|
|
2380
|
-
}
|
|
2381
|
-
}
|
|
2382
|
-
class Tilt_Tilt extends(null && ValueWithRandom){
|
|
2383
|
-
constructor() {
|
|
2384
|
-
super();
|
|
2385
|
-
this.animation = new TiltAnimation;
|
|
2386
|
-
this.direction = "clockwise";
|
|
2387
|
-
this.enable = false;
|
|
2388
|
-
this.value = 0;
|
|
2389
|
-
}
|
|
2390
|
-
load(data) {
|
|
2391
|
-
if (!data) {
|
|
2392
|
-
return;
|
|
2393
|
-
}
|
|
2394
|
-
super.load(data);
|
|
2395
|
-
this.animation.load(data.animation);
|
|
2396
|
-
if (data.direction !== undefined) {
|
|
2397
|
-
this.direction = data.direction;
|
|
2398
|
-
}
|
|
2399
|
-
if (data.enable !== undefined) {
|
|
2400
|
-
this.enable = data.enable;
|
|
2401
|
-
}
|
|
2402
|
-
}
|
|
2403
|
-
}
|
|
2404
|
-
class TwinkleValues_TwinkleValues {
|
|
2405
|
-
constructor() {
|
|
2406
|
-
this.enable = false;
|
|
2407
|
-
this.frequency = .05;
|
|
2408
|
-
this.opacity = 1;
|
|
2409
|
-
}
|
|
2410
|
-
load(data) {
|
|
2411
|
-
if (data === undefined) {
|
|
2412
|
-
return;
|
|
2413
|
-
}
|
|
2414
|
-
if (data.color !== undefined) {
|
|
2415
|
-
this.color = OptionsColor.create(this.color, data.color);
|
|
2416
|
-
}
|
|
2417
|
-
if (data.enable !== undefined) {
|
|
2418
|
-
this.enable = data.enable;
|
|
2419
|
-
}
|
|
2420
|
-
if (data.frequency !== undefined) {
|
|
2421
|
-
this.frequency = data.frequency;
|
|
2422
|
-
}
|
|
2423
|
-
if (data.opacity !== undefined) {
|
|
2424
|
-
this.opacity = setRangeValue(data.opacity);
|
|
2425
|
-
}
|
|
2426
|
-
}
|
|
2427
|
-
}
|
|
2428
|
-
class Twinkle_Twinkle {
|
|
2429
|
-
constructor() {
|
|
2430
|
-
this.lines = new TwinkleValues;
|
|
2431
|
-
this.particles = new TwinkleValues;
|
|
2432
|
-
}
|
|
2433
|
-
load(data) {
|
|
2434
|
-
if (data === undefined) {
|
|
2435
|
-
return;
|
|
2436
|
-
}
|
|
2437
|
-
this.lines.load(data.lines);
|
|
2438
|
-
this.particles.load(data.particles);
|
|
2439
|
-
}
|
|
2440
|
-
}
|
|
2441
|
-
class Wobble_Wobble {
|
|
2442
|
-
constructor() {
|
|
2443
|
-
this.distance = 5;
|
|
2444
|
-
this.enable = false;
|
|
2445
|
-
this.speed = 50;
|
|
2446
|
-
}
|
|
2447
|
-
load(data) {
|
|
2448
|
-
if (!data) {
|
|
2449
|
-
return;
|
|
2450
|
-
}
|
|
2451
|
-
if (data.distance !== undefined) {
|
|
2452
|
-
this.distance = setRangeValue(data.distance);
|
|
2453
|
-
}
|
|
2454
|
-
if (data.enable !== undefined) {
|
|
2455
|
-
this.enable = data.enable;
|
|
2456
|
-
}
|
|
2457
|
-
if (data.speed !== undefined) {
|
|
2458
|
-
this.speed = setRangeValue(data.speed);
|
|
2459
|
-
}
|
|
2460
|
-
}
|
|
2461
|
-
}
|
|
2462
|
-
class ZIndex_ZIndex extends(null && ValueWithRandom){
|
|
2463
|
-
constructor() {
|
|
2464
|
-
super();
|
|
2465
|
-
this.opacityRate = 1;
|
|
2466
|
-
this.sizeRate = 1;
|
|
2467
|
-
this.velocityRate = 1;
|
|
2468
|
-
}
|
|
2469
|
-
load(data) {
|
|
2470
|
-
super.load(data);
|
|
2471
|
-
if (!data) {
|
|
2472
|
-
return;
|
|
2473
|
-
}
|
|
2474
|
-
if (data.opacityRate !== undefined) {
|
|
2475
|
-
this.opacityRate = data.opacityRate;
|
|
2476
|
-
}
|
|
2477
|
-
if (data.sizeRate !== undefined) {
|
|
2478
|
-
this.sizeRate = data.sizeRate;
|
|
2479
|
-
}
|
|
2480
|
-
if (data.velocityRate !== undefined) {
|
|
2481
|
-
this.velocityRate = data.velocityRate;
|
|
2482
|
-
}
|
|
2483
|
-
}
|
|
2484
|
-
}
|
|
2485
|
-
class ParticlesOptions_ParticlesOptions {
|
|
2486
|
-
constructor() {
|
|
2487
|
-
this.bounce = new Bounce;
|
|
2488
|
-
this.collisions = new Collisions;
|
|
2489
|
-
this.color = new AnimatableColor;
|
|
2490
|
-
this.destroy = new Destroy;
|
|
2491
|
-
this.gradient = [];
|
|
2492
|
-
this.groups = {};
|
|
2493
|
-
this.life = new Life;
|
|
2494
|
-
this.links = new Links;
|
|
2495
|
-
this.move = new Move;
|
|
2496
|
-
this.number = new ParticlesNumber;
|
|
2497
|
-
this.opacity = new Opacity;
|
|
2498
|
-
this.orbit = new Orbit;
|
|
2499
|
-
this.reduceDuplicates = false;
|
|
2500
|
-
this.repulse = new Repulse;
|
|
2501
|
-
this.roll = new Roll;
|
|
2502
|
-
this.rotate = new Rotate;
|
|
2503
|
-
this.shadow = new Shadow;
|
|
2504
|
-
this.shape = new Shape;
|
|
2505
|
-
this.size = new Size;
|
|
2506
|
-
this.stroke = new Stroke;
|
|
2507
|
-
this.tilt = new Tilt;
|
|
2508
|
-
this.twinkle = new Twinkle;
|
|
2509
|
-
this.wobble = new Wobble;
|
|
2510
|
-
this.zIndex = new ZIndex;
|
|
2511
|
-
}
|
|
2512
|
-
get line_linked() {
|
|
2513
|
-
return this.links;
|
|
2514
|
-
}
|
|
2515
|
-
set line_linked(value) {
|
|
2516
|
-
this.links = value;
|
|
2517
|
-
}
|
|
2518
|
-
get lineLinked() {
|
|
2519
|
-
return this.links;
|
|
2520
|
-
}
|
|
2521
|
-
set lineLinked(value) {
|
|
2522
|
-
this.links = value;
|
|
2523
|
-
}
|
|
2524
|
-
load(data) {
|
|
2525
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2526
|
-
if (data === undefined) {
|
|
2527
|
-
return;
|
|
2528
|
-
}
|
|
2529
|
-
this.bounce.load(data.bounce);
|
|
2530
|
-
this.color.load(AnimatableColor.create(this.color, data.color));
|
|
2531
|
-
this.destroy.load(data.destroy);
|
|
2532
|
-
this.life.load(data.life);
|
|
2533
|
-
const links = (_b = (_a = data.links) !== null && _a !== void 0 ? _a : data.lineLinked) !== null && _b !== void 0 ? _b : data.line_linked;
|
|
2534
|
-
if (links !== undefined) {
|
|
2535
|
-
this.links.load(links);
|
|
2536
|
-
}
|
|
2537
|
-
if (data.groups !== undefined) {
|
|
2538
|
-
for (const group in data.groups) {
|
|
2539
|
-
const item = data.groups[group];
|
|
2540
|
-
if (item !== undefined) {
|
|
2541
|
-
this.groups[group] = deepExtend((_c = this.groups[group]) !== null && _c !== void 0 ? _c : {}, item);
|
|
2542
|
-
}
|
|
2543
|
-
}
|
|
2544
|
-
}
|
|
2545
|
-
this.move.load(data.move);
|
|
2546
|
-
this.number.load(data.number);
|
|
2547
|
-
this.opacity.load(data.opacity);
|
|
2548
|
-
this.orbit.load(data.orbit);
|
|
2549
|
-
if (data.reduceDuplicates !== undefined) {
|
|
2550
|
-
this.reduceDuplicates = data.reduceDuplicates;
|
|
2551
|
-
}
|
|
2552
|
-
this.repulse.load(data.repulse);
|
|
2553
|
-
this.roll.load(data.roll);
|
|
2554
|
-
this.rotate.load(data.rotate);
|
|
2555
|
-
this.shape.load(data.shape);
|
|
2556
|
-
this.size.load(data.size);
|
|
2557
|
-
this.shadow.load(data.shadow);
|
|
2558
|
-
this.tilt.load(data.tilt);
|
|
2559
|
-
this.twinkle.load(data.twinkle);
|
|
2560
|
-
this.wobble.load(data.wobble);
|
|
2561
|
-
this.zIndex.load(data.zIndex);
|
|
2562
|
-
const collisions = (_e = (_d = data.move) === null || _d === void 0 ? void 0 : _d.collisions) !== null && _e !== void 0 ? _e : (_f = data.move) === null || _f === void 0 ? void 0 : _f.bounce;
|
|
2563
|
-
if (collisions !== undefined) {
|
|
2564
|
-
this.collisions.enable = collisions;
|
|
2565
|
-
}
|
|
2566
|
-
this.collisions.load(data.collisions);
|
|
2567
|
-
const strokeToLoad = (_g = data.stroke) !== null && _g !== void 0 ? _g : (_h = data.shape) === null || _h === void 0 ? void 0 : _h.stroke;
|
|
2568
|
-
if (strokeToLoad) {
|
|
2569
|
-
if (strokeToLoad instanceof Array) {
|
|
2570
|
-
this.stroke = strokeToLoad.map((s => {
|
|
2571
|
-
const tmp = new Stroke;
|
|
2572
|
-
tmp.load(s);
|
|
2573
|
-
return tmp;
|
|
2574
|
-
}));
|
|
2575
|
-
} else {
|
|
2576
|
-
if (this.stroke instanceof Array) {
|
|
2577
|
-
this.stroke = new Stroke;
|
|
2578
|
-
}
|
|
2579
|
-
this.stroke.load(strokeToLoad);
|
|
2580
|
-
}
|
|
2581
|
-
}
|
|
2582
|
-
const gradientToLoad = data.gradient;
|
|
2583
|
-
if (gradientToLoad) {
|
|
2584
|
-
if (gradientToLoad instanceof Array) {
|
|
2585
|
-
this.gradient = gradientToLoad.map((s => {
|
|
2586
|
-
const tmp = new AnimatableGradient;
|
|
2587
|
-
tmp.load(s);
|
|
2588
|
-
return tmp;
|
|
2589
|
-
}));
|
|
2590
|
-
} else {
|
|
2591
|
-
if (this.gradient instanceof Array) {
|
|
2592
|
-
this.gradient = new AnimatableGradient;
|
|
2593
|
-
}
|
|
2594
|
-
this.gradient.load(gradientToLoad);
|
|
2595
|
-
}
|
|
2596
|
-
}
|
|
2597
|
-
}
|
|
2598
|
-
}
|
|
2599
|
-
class Responsive_Responsive {
|
|
2600
|
-
constructor() {
|
|
2601
|
-
this.maxWidth = Infinity;
|
|
2602
|
-
this.options = {};
|
|
2603
|
-
this.mode = "canvas";
|
|
2604
|
-
}
|
|
2605
|
-
load(data) {
|
|
2606
|
-
if (!data) {
|
|
2607
|
-
return;
|
|
2608
|
-
}
|
|
2609
|
-
if (data.maxWidth !== undefined) {
|
|
2610
|
-
this.maxWidth = data.maxWidth;
|
|
2611
|
-
}
|
|
2612
|
-
if (data.mode !== undefined) {
|
|
2613
|
-
if (data.mode === "screen") {
|
|
2614
|
-
this.mode = "screen";
|
|
2615
|
-
} else {
|
|
2616
|
-
this.mode = "canvas";
|
|
2617
|
-
}
|
|
2618
|
-
}
|
|
2619
|
-
if (data.options !== undefined) {
|
|
2620
|
-
this.options = deepExtend({}, data.options);
|
|
2621
|
-
}
|
|
2622
|
-
}
|
|
2623
|
-
}
|
|
2624
|
-
class Theme_Theme {
|
|
2625
|
-
constructor() {
|
|
2626
|
-
this.name = "";
|
|
2627
|
-
this.default = new ThemeDefault;
|
|
2628
|
-
}
|
|
2629
|
-
load(data) {
|
|
2630
|
-
if (data === undefined) {
|
|
2631
|
-
return;
|
|
2632
|
-
}
|
|
2633
|
-
if (data.name !== undefined) {
|
|
2634
|
-
this.name = data.name;
|
|
2635
|
-
}
|
|
2636
|
-
this.default.load(data.default);
|
|
2637
|
-
if (data.options !== undefined) {
|
|
2638
|
-
this.options = deepExtend({}, data.options);
|
|
2639
|
-
}
|
|
2640
|
-
}
|
|
2641
|
-
}
|
|
2642
|
-
var Options_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
2643
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
2644
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
2645
|
-
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");
|
|
2646
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
2647
|
-
value;
|
|
2648
|
-
};
|
|
2649
|
-
var Options_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
2650
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
2651
|
-
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");
|
|
2652
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
2653
|
-
};
|
|
2654
|
-
var _Options_instances, _Options_engine, _Options_findDefaultTheme;
|
|
2655
|
-
class Options_Options {
|
|
2656
|
-
constructor(engine) {
|
|
2657
|
-
_Options_instances.add(this);
|
|
2658
|
-
_Options_engine.set(this, void 0);
|
|
2659
|
-
Options_classPrivateFieldSet(this, _Options_engine, engine, "f");
|
|
2660
|
-
this.autoPlay = true;
|
|
2661
|
-
this.background = new Background;
|
|
2662
|
-
this.backgroundMask = new BackgroundMask;
|
|
2663
|
-
this.fullScreen = new FullScreen;
|
|
2664
|
-
this.detectRetina = true;
|
|
2665
|
-
this.duration = 0;
|
|
2666
|
-
this.fpsLimit = 120;
|
|
2667
|
-
this.interactivity = new Interactivity;
|
|
2668
|
-
this.manualParticles = [];
|
|
2669
|
-
this.motion = new Motion;
|
|
2670
|
-
this.particles = new ParticlesOptions;
|
|
2671
|
-
this.pauseOnBlur = true;
|
|
2672
|
-
this.pauseOnOutsideViewport = true;
|
|
2673
|
-
this.responsive = [];
|
|
2674
|
-
this.style = {};
|
|
2675
|
-
this.themes = [];
|
|
2676
|
-
this.zLayers = 100;
|
|
2677
|
-
}
|
|
2678
|
-
get fps_limit() {
|
|
2679
|
-
return this.fpsLimit;
|
|
2680
|
-
}
|
|
2681
|
-
set fps_limit(value) {
|
|
2682
|
-
this.fpsLimit = value;
|
|
2683
|
-
}
|
|
2684
|
-
get retina_detect() {
|
|
2685
|
-
return this.detectRetina;
|
|
2686
|
-
}
|
|
2687
|
-
set retina_detect(value) {
|
|
2688
|
-
this.detectRetina = value;
|
|
2689
|
-
}
|
|
2690
|
-
get backgroundMode() {
|
|
2691
|
-
return this.fullScreen;
|
|
2692
|
-
}
|
|
2693
|
-
set backgroundMode(value) {
|
|
2694
|
-
this.fullScreen.load(value);
|
|
2695
|
-
}
|
|
2696
|
-
load(data) {
|
|
2697
|
-
var _a, _b, _c, _d, _e;
|
|
2698
|
-
if (data === undefined) {
|
|
2699
|
-
return;
|
|
2700
|
-
}
|
|
2701
|
-
if (data.preset !== undefined) {
|
|
2702
|
-
if (data.preset instanceof Array) {
|
|
2703
|
-
for (const preset of data.preset) {
|
|
2704
|
-
this.importPreset(preset);
|
|
2705
|
-
}
|
|
2706
|
-
} else {
|
|
2707
|
-
this.importPreset(data.preset);
|
|
2708
|
-
}
|
|
2709
|
-
}
|
|
2710
|
-
if (data.autoPlay !== undefined) {
|
|
2711
|
-
this.autoPlay = data.autoPlay;
|
|
2712
|
-
}
|
|
2713
|
-
const detectRetina = (_a = data.detectRetina) !== null && _a !== void 0 ? _a : data.retina_detect;
|
|
2714
|
-
if (detectRetina !== undefined) {
|
|
2715
|
-
this.detectRetina = detectRetina;
|
|
2716
|
-
}
|
|
2717
|
-
if (data.duration !== undefined) {
|
|
2718
|
-
this.duration = data.duration;
|
|
2719
|
-
}
|
|
2720
|
-
const fpsLimit = (_b = data.fpsLimit) !== null && _b !== void 0 ? _b : data.fps_limit;
|
|
2721
|
-
if (fpsLimit !== undefined) {
|
|
2722
|
-
this.fpsLimit = fpsLimit;
|
|
2723
|
-
}
|
|
2724
|
-
if (data.pauseOnBlur !== undefined) {
|
|
2725
|
-
this.pauseOnBlur = data.pauseOnBlur;
|
|
2726
|
-
}
|
|
2727
|
-
if (data.pauseOnOutsideViewport !== undefined) {
|
|
2728
|
-
this.pauseOnOutsideViewport = data.pauseOnOutsideViewport;
|
|
2729
|
-
}
|
|
2730
|
-
if (data.zLayers !== undefined) {
|
|
2731
|
-
this.zLayers = data.zLayers;
|
|
2732
|
-
}
|
|
2733
|
-
this.background.load(data.background);
|
|
2734
|
-
const fullScreen = (_c = data.fullScreen) !== null && _c !== void 0 ? _c : data.backgroundMode;
|
|
2735
|
-
if (typeof fullScreen === "boolean") {
|
|
2736
|
-
this.fullScreen.enable = fullScreen;
|
|
2737
|
-
} else {
|
|
2738
|
-
this.fullScreen.load(fullScreen);
|
|
2739
|
-
}
|
|
2740
|
-
this.backgroundMask.load(data.backgroundMask);
|
|
2741
|
-
this.interactivity.load(data.interactivity);
|
|
2742
|
-
if (data.manualParticles !== undefined) {
|
|
2743
|
-
this.manualParticles = data.manualParticles.map((t => {
|
|
2744
|
-
const tmp = new ManualParticle;
|
|
2745
|
-
tmp.load(t);
|
|
2746
|
-
return tmp;
|
|
2747
|
-
}));
|
|
2748
|
-
}
|
|
2749
|
-
this.motion.load(data.motion);
|
|
2750
|
-
this.particles.load(data.particles);
|
|
2751
|
-
this.style = deepExtend(this.style, data.style);
|
|
2752
|
-
Options_classPrivateFieldGet(this, _Options_engine, "f").plugins.loadOptions(this, data);
|
|
2753
|
-
if (data.responsive !== undefined) {
|
|
2754
|
-
for (const responsive of data.responsive) {
|
|
2755
|
-
const optResponsive = new Responsive;
|
|
2756
|
-
optResponsive.load(responsive);
|
|
2757
|
-
this.responsive.push(optResponsive);
|
|
2758
|
-
}
|
|
2759
|
-
}
|
|
2760
|
-
this.responsive.sort(((a, b) => a.maxWidth - b.maxWidth));
|
|
2761
|
-
if (data.themes !== undefined) {
|
|
2762
|
-
for (const theme of data.themes) {
|
|
2763
|
-
const optTheme = new Theme;
|
|
2764
|
-
optTheme.load(theme);
|
|
2765
|
-
this.themes.push(optTheme);
|
|
2766
|
-
}
|
|
2767
|
-
}
|
|
2768
|
-
this.defaultDarkTheme = (_d = Options_classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "dark")) === null || _d === void 0 ? void 0 : _d.name;
|
|
2769
|
-
this.defaultLightTheme = (_e = Options_classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "light")) === null || _e === void 0 ? void 0 : _e.name;
|
|
2770
|
-
}
|
|
2771
|
-
setTheme(name) {
|
|
2772
|
-
if (name) {
|
|
2773
|
-
const chosenTheme = this.themes.find((theme => theme.name === name));
|
|
2774
|
-
if (chosenTheme) {
|
|
2775
|
-
this.load(chosenTheme.options);
|
|
2776
|
-
}
|
|
2777
|
-
} else {
|
|
2778
|
-
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");
|
|
2779
|
-
if (defaultTheme) {
|
|
2780
|
-
this.load(defaultTheme.options);
|
|
2781
|
-
}
|
|
2782
|
-
}
|
|
2783
|
-
}
|
|
2784
|
-
setResponsive(width, pxRatio, defaultOptions) {
|
|
2785
|
-
this.load(defaultOptions);
|
|
2786
|
-
const responsiveOptions = this.responsive.find((t => t.mode === "screen" && screen ? t.maxWidth * pxRatio > screen.availWidth : t.maxWidth * pxRatio > width));
|
|
2787
|
-
this.load(responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.options);
|
|
2788
|
-
return responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.maxWidth;
|
|
2789
|
-
}
|
|
2790
|
-
importPreset(preset) {
|
|
2791
|
-
this.load(Options_classPrivateFieldGet(this, _Options_engine, "f").plugins.getPreset(preset));
|
|
2792
|
-
}
|
|
2793
|
-
}
|
|
2794
|
-
_Options_engine = new WeakMap, _Options_instances = new WeakSet, _Options_findDefaultTheme = function _Options_findDefaultTheme(mode) {
|
|
2795
|
-
var _a;
|
|
2796
|
-
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"));
|
|
2797
|
-
};
|
|
2798
|
-
var Particle_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
2799
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
2800
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
2801
|
-
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");
|
|
2802
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
2803
|
-
value;
|
|
2804
|
-
};
|
|
2805
|
-
var Particle_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
2806
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
2807
|
-
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");
|
|
2808
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
2809
|
-
};
|
|
2810
|
-
var _Particle_engine;
|
|
2811
|
-
const fixOutMode = data => {
|
|
2812
|
-
if (isInArray(data.outMode, data.checkModes) || isInArray(data.outMode, data.checkModes)) {
|
|
2813
|
-
if (data.coord > data.maxCoord - data.radius * 2) {
|
|
2814
|
-
data.setCb(-data.radius);
|
|
2815
|
-
} else if (data.coord < data.radius * 2) {
|
|
2816
|
-
data.setCb(data.radius);
|
|
2817
|
-
}
|
|
2818
|
-
}
|
|
2819
|
-
};
|
|
2820
|
-
class Particle_Particle {
|
|
2821
|
-
constructor(engine, id, container, position, overrideOptions, group) {
|
|
2822
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2823
|
-
this.id = id;
|
|
2824
|
-
this.container = container;
|
|
2825
|
-
this.group = group;
|
|
2826
|
-
_Particle_engine.set(this, void 0);
|
|
2827
|
-
Particle_classPrivateFieldSet(this, _Particle_engine, engine, "f");
|
|
2828
|
-
this.fill = true;
|
|
2829
|
-
this.close = true;
|
|
2830
|
-
this.lastPathTime = 0;
|
|
2831
|
-
this.destroyed = false;
|
|
2832
|
-
this.unbreakable = false;
|
|
2833
|
-
this.splitCount = 0;
|
|
2834
|
-
this.misplaced = false;
|
|
2835
|
-
this.retina = {
|
|
2836
|
-
maxDistance: {}
|
|
2837
|
-
};
|
|
2838
|
-
this.ignoresResizeRatio = true;
|
|
2839
|
-
const pxRatio = container.retina.pixelRatio;
|
|
2840
|
-
const mainOptions = container.actualOptions;
|
|
2841
|
-
const particlesOptions = new ParticlesOptions;
|
|
2842
|
-
particlesOptions.load(mainOptions.particles);
|
|
2843
|
-
const shapeType = particlesOptions.shape.type;
|
|
2844
|
-
const reduceDuplicates = particlesOptions.reduceDuplicates;
|
|
2845
|
-
this.shape = shapeType instanceof Array ? itemFromArray(shapeType, this.id, reduceDuplicates) : shapeType;
|
|
2846
|
-
if (overrideOptions === null || overrideOptions === void 0 ? void 0 : overrideOptions.shape) {
|
|
2847
|
-
if (overrideOptions.shape.type) {
|
|
2848
|
-
const overrideShapeType = overrideOptions.shape.type;
|
|
2849
|
-
this.shape = overrideShapeType instanceof Array ? itemFromArray(overrideShapeType, this.id, reduceDuplicates) : overrideShapeType;
|
|
2850
|
-
}
|
|
2851
|
-
const shapeOptions = new Shape;
|
|
2852
|
-
shapeOptions.load(overrideOptions.shape);
|
|
2853
|
-
if (this.shape) {
|
|
2854
|
-
this.shapeData = this.loadShapeData(shapeOptions, reduceDuplicates);
|
|
2855
|
-
}
|
|
2856
|
-
} else {
|
|
2857
|
-
this.shapeData = this.loadShapeData(particlesOptions.shape, reduceDuplicates);
|
|
2858
|
-
}
|
|
2859
|
-
if (overrideOptions !== undefined) {
|
|
2860
|
-
particlesOptions.load(overrideOptions);
|
|
2861
|
-
}
|
|
2862
|
-
if (((_a = this.shapeData) === null || _a === void 0 ? void 0 : _a.particles) !== undefined) {
|
|
2863
|
-
particlesOptions.load((_b = this.shapeData) === null || _b === void 0 ? void 0 : _b.particles);
|
|
2864
|
-
}
|
|
2865
|
-
this.fill = (_d = (_c = this.shapeData) === null || _c === void 0 ? void 0 : _c.fill) !== null && _d !== void 0 ? _d : this.fill;
|
|
2866
|
-
this.close = (_f = (_e = this.shapeData) === null || _e === void 0 ? void 0 : _e.close) !== null && _f !== void 0 ? _f : this.close;
|
|
2867
|
-
this.options = particlesOptions;
|
|
2868
|
-
this.pathDelay = getValue(this.options.move.path.delay) * 1e3;
|
|
2869
|
-
const zIndexValue = getRangeValue(this.options.zIndex.value);
|
|
2870
|
-
container.retina.initParticle(this);
|
|
2871
|
-
const sizeOptions = this.options.size, sizeRange = sizeOptions.value;
|
|
2872
|
-
this.size = {
|
|
2873
|
-
enable: sizeOptions.animation.enable,
|
|
2874
|
-
value: getValue(sizeOptions) * container.retina.pixelRatio,
|
|
2875
|
-
max: getRangeMax(sizeRange) * pxRatio,
|
|
2876
|
-
min: getRangeMin(sizeRange) * pxRatio,
|
|
2877
|
-
loops: 0,
|
|
2878
|
-
maxLoops: getRangeValue(sizeOptions.animation.count)
|
|
2879
|
-
};
|
|
2880
|
-
const sizeAnimation = sizeOptions.animation;
|
|
2881
|
-
if (sizeAnimation.enable) {
|
|
2882
|
-
this.size.status = 0;
|
|
2883
|
-
switch (sizeAnimation.startValue) {
|
|
2884
|
-
case "min":
|
|
2885
|
-
this.size.value = this.size.min;
|
|
2886
|
-
this.size.status = 0;
|
|
2887
|
-
break;
|
|
2888
|
-
|
|
2889
|
-
case "random":
|
|
2890
|
-
this.size.value = randomInRange(this.size) * pxRatio;
|
|
2891
|
-
this.size.status = Math.random() >= .5 ? 0 : 1;
|
|
2892
|
-
break;
|
|
2893
|
-
|
|
2894
|
-
case "max":
|
|
2895
|
-
default:
|
|
2896
|
-
this.size.value = this.size.max;
|
|
2897
|
-
this.size.status = 1;
|
|
2898
|
-
break;
|
|
2899
|
-
}
|
|
2900
|
-
this.size.velocity = ((_g = this.retina.sizeAnimationSpeed) !== null && _g !== void 0 ? _g : container.retina.sizeAnimationSpeed) / 100 * container.retina.reduceFactor;
|
|
2901
|
-
if (!sizeAnimation.sync) {
|
|
2902
|
-
this.size.velocity *= Math.random();
|
|
2903
|
-
}
|
|
2904
|
-
}
|
|
2905
|
-
this.direction = getParticleDirectionAngle(this.options.move.direction);
|
|
2906
|
-
this.bubble = {
|
|
2907
|
-
inRange: false
|
|
2908
|
-
};
|
|
2909
|
-
this.initialVelocity = this.calculateVelocity();
|
|
2910
|
-
this.velocity = this.initialVelocity.copy();
|
|
2911
|
-
this.moveDecay = 1 - getRangeValue(this.options.move.decay);
|
|
2912
|
-
const gravityOptions = this.options.move.gravity;
|
|
2913
|
-
this.gravity = {
|
|
2914
|
-
enable: gravityOptions.enable,
|
|
2915
|
-
acceleration: getRangeValue(gravityOptions.acceleration),
|
|
2916
|
-
inverse: gravityOptions.inverse
|
|
2917
|
-
};
|
|
2918
|
-
this.position = this.calcPosition(container, position, clamp(zIndexValue, 0, container.zLayers));
|
|
2919
|
-
this.initialPosition = this.position.copy();
|
|
2920
|
-
this.offset = Vector.origin;
|
|
2921
|
-
const particles = container.particles;
|
|
2922
|
-
particles.needsSort = particles.needsSort || particles.lastZIndex < this.position.z;
|
|
2923
|
-
particles.lastZIndex = this.position.z;
|
|
2924
|
-
this.zIndexFactor = this.position.z / container.zLayers;
|
|
2925
|
-
this.sides = 24;
|
|
2926
|
-
let drawer = container.drawers.get(this.shape);
|
|
2927
|
-
if (!drawer) {
|
|
2928
|
-
drawer = Particle_classPrivateFieldGet(this, _Particle_engine, "f").plugins.getShapeDrawer(this.shape);
|
|
2929
|
-
if (drawer) {
|
|
2930
|
-
container.drawers.set(this.shape, drawer);
|
|
2931
|
-
}
|
|
2932
|
-
}
|
|
2933
|
-
if (drawer === null || drawer === void 0 ? void 0 : drawer.loadShape) {
|
|
2934
|
-
drawer === null || drawer === void 0 ? void 0 : drawer.loadShape(this);
|
|
2935
|
-
}
|
|
2936
|
-
const sideCountFunc = drawer === null || drawer === void 0 ? void 0 : drawer.getSidesCount;
|
|
2937
|
-
if (sideCountFunc) {
|
|
2938
|
-
this.sides = sideCountFunc(this);
|
|
2939
|
-
}
|
|
2940
|
-
this.life = this.loadLife();
|
|
2941
|
-
this.spawning = this.life.delay > 0;
|
|
2942
|
-
if (this.options.move.spin.enable) {
|
|
2943
|
-
const spinPos = (_h = this.options.move.spin.position) !== null && _h !== void 0 ? _h : {
|
|
2944
|
-
x: 50,
|
|
2945
|
-
y: 50
|
|
2946
|
-
};
|
|
2947
|
-
const spinCenter = {
|
|
2948
|
-
x: spinPos.x / 100 * container.canvas.size.width,
|
|
2949
|
-
y: spinPos.y / 100 * container.canvas.size.height
|
|
2950
|
-
};
|
|
2951
|
-
const pos = this.getPosition();
|
|
2952
|
-
const distance = getDistance(pos, spinCenter);
|
|
2953
|
-
this.spin = {
|
|
2954
|
-
center: spinCenter,
|
|
2955
|
-
direction: this.velocity.x >= 0 ? "clockwise" : "counter-clockwise",
|
|
2956
|
-
angle: this.velocity.angle,
|
|
2957
|
-
radius: distance,
|
|
2958
|
-
acceleration: (_j = this.retina.spinAcceleration) !== null && _j !== void 0 ? _j : getRangeValue(this.options.move.spin.acceleration)
|
|
2959
|
-
};
|
|
2960
|
-
}
|
|
2961
|
-
this.shadowColor = colorToRgb(this.options.shadow.color);
|
|
2962
|
-
for (const updater of container.particles.updaters) {
|
|
2963
|
-
if (updater.init) {
|
|
2964
|
-
updater.init(this);
|
|
2965
|
-
}
|
|
2966
|
-
}
|
|
2967
|
-
if (drawer && drawer.particleInit) {
|
|
2968
|
-
drawer.particleInit(container, this);
|
|
2969
|
-
}
|
|
2970
|
-
for (const [, plugin] of container.plugins) {
|
|
2971
|
-
if (plugin.particleCreated) {
|
|
2972
|
-
plugin.particleCreated(this);
|
|
2973
|
-
}
|
|
2974
|
-
}
|
|
2975
|
-
}
|
|
2976
|
-
isVisible() {
|
|
2977
|
-
return !this.destroyed && !this.spawning && this.isInsideCanvas();
|
|
2978
|
-
}
|
|
2979
|
-
isInsideCanvas() {
|
|
2980
|
-
const radius = this.getRadius();
|
|
2981
|
-
const canvasSize = this.container.canvas.size;
|
|
2982
|
-
return this.position.x >= -radius && this.position.y >= -radius && this.position.y <= canvasSize.height + radius && this.position.x <= canvasSize.width + radius;
|
|
2983
|
-
}
|
|
2984
|
-
draw(delta) {
|
|
2985
|
-
const container = this.container;
|
|
2986
|
-
for (const [, plugin] of container.plugins) {
|
|
2987
|
-
container.canvas.drawParticlePlugin(plugin, this, delta);
|
|
2988
|
-
}
|
|
2989
|
-
container.canvas.drawParticle(this, delta);
|
|
2990
|
-
}
|
|
2991
|
-
getPosition() {
|
|
2992
|
-
return {
|
|
2993
|
-
x: this.position.x + this.offset.x,
|
|
2994
|
-
y: this.position.y + this.offset.y,
|
|
2995
|
-
z: this.position.z
|
|
2996
|
-
};
|
|
2997
|
-
}
|
|
2998
|
-
getRadius() {
|
|
2999
|
-
var _a;
|
|
3000
|
-
return (_a = this.bubble.radius) !== null && _a !== void 0 ? _a : this.size.value;
|
|
3001
|
-
}
|
|
3002
|
-
getMass() {
|
|
3003
|
-
return this.getRadius() ** 2 * Math.PI / 2;
|
|
3004
|
-
}
|
|
3005
|
-
getFillColor() {
|
|
3006
|
-
var _a, _b;
|
|
3007
|
-
const color = (_a = this.bubble.color) !== null && _a !== void 0 ? _a : getHslFromAnimation(this.color);
|
|
3008
|
-
if (color && this.roll && (this.backColor || this.roll.alter)) {
|
|
3009
|
-
const backFactor = this.options.roll.mode === "both" ? 2 : 1, backSum = this.options.roll.mode === "horizontal" ? Math.PI / 2 : 0, rolled = Math.floor((((_b = this.roll.angle) !== null && _b !== void 0 ? _b : 0) + backSum) / (Math.PI / backFactor)) % 2;
|
|
3010
|
-
if (rolled) {
|
|
3011
|
-
if (this.backColor) {
|
|
3012
|
-
return this.backColor;
|
|
3013
|
-
}
|
|
3014
|
-
if (this.roll.alter) {
|
|
3015
|
-
return alterHsl(color, this.roll.alter.type, this.roll.alter.value);
|
|
3016
|
-
}
|
|
3017
|
-
}
|
|
3018
|
-
}
|
|
3019
|
-
return color;
|
|
3020
|
-
}
|
|
3021
|
-
getStrokeColor() {
|
|
3022
|
-
var _a, _b;
|
|
3023
|
-
return (_b = (_a = this.bubble.color) !== null && _a !== void 0 ? _a : getHslFromAnimation(this.strokeColor)) !== null && _b !== void 0 ? _b : this.getFillColor();
|
|
3024
|
-
}
|
|
3025
|
-
destroy(override) {
|
|
3026
|
-
this.destroyed = true;
|
|
3027
|
-
this.bubble.inRange = false;
|
|
3028
|
-
if (this.unbreakable) {
|
|
3029
|
-
return;
|
|
3030
|
-
}
|
|
3031
|
-
this.destroyed = true;
|
|
3032
|
-
this.bubble.inRange = false;
|
|
3033
|
-
for (const [, plugin] of this.container.plugins) {
|
|
3034
|
-
if (plugin.particleDestroyed) {
|
|
3035
|
-
plugin.particleDestroyed(this, override);
|
|
3036
|
-
}
|
|
3037
|
-
}
|
|
3038
|
-
if (override) {
|
|
3039
|
-
return;
|
|
3040
|
-
}
|
|
3041
|
-
const destroyOptions = this.options.destroy;
|
|
3042
|
-
if (destroyOptions.mode === "split") {
|
|
3043
|
-
this.split();
|
|
3044
|
-
}
|
|
3045
|
-
}
|
|
3046
|
-
reset() {
|
|
3047
|
-
if (this.opacity) {
|
|
3048
|
-
this.opacity.loops = 0;
|
|
3049
|
-
}
|
|
3050
|
-
this.size.loops = 0;
|
|
3051
|
-
}
|
|
3052
|
-
split() {
|
|
3053
|
-
const splitOptions = this.options.destroy.split;
|
|
3054
|
-
if (splitOptions.count >= 0 && this.splitCount++ > splitOptions.count) {
|
|
3055
|
-
return;
|
|
3056
|
-
}
|
|
3057
|
-
const rate = getRangeValue(splitOptions.rate.value);
|
|
3058
|
-
for (let i = 0; i < rate; i++) {
|
|
3059
|
-
this.container.particles.addSplitParticle(this);
|
|
3060
|
-
}
|
|
3061
|
-
}
|
|
3062
|
-
calcPosition(container, position, zIndex, tryCount = 0) {
|
|
3063
|
-
var _a, _b, _c, _d, _e, _f;
|
|
3064
|
-
for (const [, plugin] of container.plugins) {
|
|
3065
|
-
const pluginPos = plugin.particlePosition !== undefined ? plugin.particlePosition(position, this) : undefined;
|
|
3066
|
-
if (pluginPos !== undefined) {
|
|
3067
|
-
return Vector3d.create(pluginPos.x, pluginPos.y, zIndex);
|
|
3068
|
-
}
|
|
3069
|
-
}
|
|
3070
|
-
const canvasSize = container.canvas.size;
|
|
3071
|
-
const pos = Vector3d.create((_a = position === null || position === void 0 ? void 0 : position.x) !== null && _a !== void 0 ? _a : Math.random() * canvasSize.width, (_b = position === null || position === void 0 ? void 0 : position.y) !== null && _b !== void 0 ? _b : Math.random() * canvasSize.height, zIndex);
|
|
3072
|
-
const radius = this.getRadius();
|
|
3073
|
-
const outModes = this.options.move.outModes, fixHorizontal = outMode => {
|
|
3074
|
-
fixOutMode({
|
|
3075
|
-
outMode: outMode,
|
|
3076
|
-
checkModes: [ "bounce", "bounce-horizontal" ],
|
|
3077
|
-
coord: pos.x,
|
|
3078
|
-
maxCoord: container.canvas.size.width,
|
|
3079
|
-
setCb: value => pos.x += value,
|
|
3080
|
-
radius: radius
|
|
3081
|
-
});
|
|
3082
|
-
}, fixVertical = outMode => {
|
|
3083
|
-
fixOutMode({
|
|
3084
|
-
outMode: outMode,
|
|
3085
|
-
checkModes: [ "bounce", "bounce-vertical" ],
|
|
3086
|
-
coord: pos.y,
|
|
3087
|
-
maxCoord: container.canvas.size.height,
|
|
3088
|
-
setCb: value => pos.y += value,
|
|
3089
|
-
radius: radius
|
|
3090
|
-
});
|
|
3091
|
-
};
|
|
3092
|
-
fixHorizontal((_c = outModes.left) !== null && _c !== void 0 ? _c : outModes.default);
|
|
3093
|
-
fixHorizontal((_d = outModes.right) !== null && _d !== void 0 ? _d : outModes.default);
|
|
3094
|
-
fixVertical((_e = outModes.top) !== null && _e !== void 0 ? _e : outModes.default);
|
|
3095
|
-
fixVertical((_f = outModes.bottom) !== null && _f !== void 0 ? _f : outModes.default);
|
|
3096
|
-
if (this.checkOverlap(pos, tryCount)) {
|
|
3097
|
-
return this.calcPosition(container, undefined, zIndex, tryCount + 1);
|
|
3098
|
-
}
|
|
3099
|
-
return pos;
|
|
3100
|
-
}
|
|
3101
|
-
checkOverlap(pos, tryCount = 0) {
|
|
3102
|
-
const collisionsOptions = this.options.collisions;
|
|
3103
|
-
const radius = this.getRadius();
|
|
3104
|
-
if (!collisionsOptions.enable) {
|
|
3105
|
-
return false;
|
|
3106
|
-
}
|
|
3107
|
-
const overlapOptions = collisionsOptions.overlap;
|
|
3108
|
-
if (overlapOptions.enable) {
|
|
3109
|
-
return false;
|
|
3110
|
-
}
|
|
3111
|
-
const retries = overlapOptions.retries;
|
|
3112
|
-
if (retries >= 0 && tryCount > retries) {
|
|
3113
|
-
throw new Error("Particle is overlapping and can't be placed");
|
|
3114
|
-
}
|
|
3115
|
-
let overlaps = false;
|
|
3116
|
-
for (const particle of this.container.particles.array) {
|
|
3117
|
-
if (getDistance(pos, particle.position) < radius + particle.getRadius()) {
|
|
3118
|
-
overlaps = true;
|
|
3119
|
-
break;
|
|
3120
|
-
}
|
|
3121
|
-
}
|
|
3122
|
-
return overlaps;
|
|
3123
|
-
}
|
|
3124
|
-
calculateVelocity() {
|
|
3125
|
-
const baseVelocity = getParticleBaseVelocity(this.direction), res = baseVelocity.copy(), moveOptions = this.options.move, rad = Math.PI / 180 * getRangeValue(moveOptions.angle.value), radOffset = Math.PI / 180 * getRangeValue(moveOptions.angle.offset), range = {
|
|
3126
|
-
left: radOffset - rad / 2,
|
|
3127
|
-
right: radOffset + rad / 2
|
|
3128
|
-
};
|
|
3129
|
-
if (!moveOptions.straight) {
|
|
3130
|
-
res.angle += randomInRange(setRangeValue(range.left, range.right));
|
|
3131
|
-
}
|
|
3132
|
-
if (moveOptions.random && typeof moveOptions.speed === "number") {
|
|
3133
|
-
res.length *= Math.random();
|
|
3134
|
-
}
|
|
3135
|
-
return res;
|
|
3136
|
-
}
|
|
3137
|
-
loadShapeData(shapeOptions, reduceDuplicates) {
|
|
3138
|
-
const shapeData = shapeOptions.options[this.shape];
|
|
3139
|
-
if (shapeData) {
|
|
3140
|
-
return deepExtend({}, shapeData instanceof Array ? itemFromArray(shapeData, this.id, reduceDuplicates) : shapeData);
|
|
3141
|
-
}
|
|
3142
|
-
}
|
|
3143
|
-
loadLife() {
|
|
3144
|
-
const container = this.container;
|
|
3145
|
-
const particlesOptions = this.options;
|
|
3146
|
-
const lifeOptions = particlesOptions.life;
|
|
3147
|
-
const life = {
|
|
3148
|
-
delay: container.retina.reduceFactor ? getRangeValue(lifeOptions.delay.value) * (lifeOptions.delay.sync ? 1 : Math.random()) / container.retina.reduceFactor * 1e3 : 0,
|
|
3149
|
-
delayTime: 0,
|
|
3150
|
-
duration: container.retina.reduceFactor ? getRangeValue(lifeOptions.duration.value) * (lifeOptions.duration.sync ? 1 : Math.random()) / container.retina.reduceFactor * 1e3 : 0,
|
|
3151
|
-
time: 0,
|
|
3152
|
-
count: particlesOptions.life.count
|
|
3153
|
-
};
|
|
3154
|
-
if (life.duration <= 0) {
|
|
3155
|
-
life.duration = -1;
|
|
3156
|
-
}
|
|
3157
|
-
if (life.count <= 0) {
|
|
3158
|
-
life.count = -1;
|
|
3159
|
-
}
|
|
3160
|
-
return life;
|
|
3161
|
-
}
|
|
3162
|
-
}
|
|
3163
|
-
_Particle_engine = new WeakMap;
|
|
3164
|
-
var Particles_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
3165
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3166
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
3167
|
-
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");
|
|
3168
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
3169
|
-
value;
|
|
3170
|
-
};
|
|
3171
|
-
var Particles_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
3172
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3173
|
-
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");
|
|
3174
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
3175
|
-
};
|
|
3176
|
-
var _Particles_engine;
|
|
3177
|
-
class Particles_Particles {
|
|
3178
|
-
constructor(engine, container) {
|
|
3179
|
-
this.container = container;
|
|
3180
|
-
_Particles_engine.set(this, void 0);
|
|
3181
|
-
Particles_classPrivateFieldSet(this, _Particles_engine, engine, "f");
|
|
3182
|
-
this.nextId = 0;
|
|
3183
|
-
this.array = [];
|
|
3184
|
-
this.zArray = [];
|
|
3185
|
-
this.mover = new ParticlesMover(container);
|
|
3186
|
-
this.limit = 0;
|
|
3187
|
-
this.needsSort = false;
|
|
3188
|
-
this.lastZIndex = 0;
|
|
3189
|
-
this.freqs = {
|
|
3190
|
-
links: new Map,
|
|
3191
|
-
triangles: new Map
|
|
3192
|
-
};
|
|
3193
|
-
this.interactionManager = new InteractionManager(Particles_classPrivateFieldGet(this, _Particles_engine, "f"), container);
|
|
3194
|
-
const canvasSize = this.container.canvas.size;
|
|
3195
|
-
this.linksColors = new Map;
|
|
3196
|
-
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3197
|
-
this.updaters = Particles_classPrivateFieldGet(this, _Particles_engine, "f").plugins.getUpdaters(container, true);
|
|
3198
|
-
}
|
|
3199
|
-
get count() {
|
|
3200
|
-
return this.array.length;
|
|
3201
|
-
}
|
|
3202
|
-
init() {
|
|
3203
|
-
var _a;
|
|
3204
|
-
const container = this.container;
|
|
3205
|
-
const options = container.actualOptions;
|
|
3206
|
-
this.lastZIndex = 0;
|
|
3207
|
-
this.needsSort = false;
|
|
3208
|
-
this.freqs.links = new Map;
|
|
3209
|
-
this.freqs.triangles = new Map;
|
|
3210
|
-
let handled = false;
|
|
3211
|
-
this.updaters = Particles_classPrivateFieldGet(this, _Particles_engine, "f").plugins.getUpdaters(container, true);
|
|
3212
|
-
this.interactionManager.init();
|
|
3213
|
-
for (const [, plugin] of container.plugins) {
|
|
3214
|
-
if (plugin.particlesInitialization !== undefined) {
|
|
3215
|
-
handled = plugin.particlesInitialization();
|
|
3216
|
-
}
|
|
3217
|
-
if (handled) {
|
|
3218
|
-
break;
|
|
3219
|
-
}
|
|
3220
|
-
}
|
|
3221
|
-
this.addManualParticles();
|
|
3222
|
-
if (!handled) {
|
|
3223
|
-
for (const group in options.particles.groups) {
|
|
3224
|
-
const groupOptions = options.particles.groups[group];
|
|
3225
|
-
for (let i = this.count, j = 0; j < ((_a = groupOptions.number) === null || _a === void 0 ? void 0 : _a.value) && i < options.particles.number.value; i++,
|
|
3226
|
-
j++) {
|
|
3227
|
-
this.addParticle(undefined, groupOptions, group);
|
|
3228
|
-
}
|
|
3229
|
-
}
|
|
3230
|
-
for (let i = this.count; i < options.particles.number.value; i++) {
|
|
3231
|
-
this.addParticle();
|
|
3232
|
-
}
|
|
3233
|
-
}
|
|
3234
|
-
container.pathGenerator.init(container);
|
|
3235
|
-
}
|
|
3236
|
-
async redraw() {
|
|
3237
|
-
this.clear();
|
|
3238
|
-
this.init();
|
|
3239
|
-
await this.draw({
|
|
3240
|
-
value: 0,
|
|
3241
|
-
factor: 0
|
|
3242
|
-
});
|
|
3243
|
-
}
|
|
3244
|
-
removeAt(index, quantity = 1, group, override) {
|
|
3245
|
-
if (!(index >= 0 && index <= this.count)) {
|
|
3246
|
-
return;
|
|
3247
|
-
}
|
|
3248
|
-
let deleted = 0;
|
|
3249
|
-
for (let i = index; deleted < quantity && i < this.count; i++) {
|
|
3250
|
-
const particle = this.array[i];
|
|
3251
|
-
if (!particle || particle.group !== group) {
|
|
3252
|
-
continue;
|
|
3253
|
-
}
|
|
3254
|
-
particle.destroy(override);
|
|
3255
|
-
this.array.splice(i--, 1);
|
|
3256
|
-
const zIdx = this.zArray.indexOf(particle);
|
|
3257
|
-
this.zArray.splice(zIdx, 1);
|
|
3258
|
-
deleted++;
|
|
3259
|
-
}
|
|
3260
|
-
}
|
|
3261
|
-
remove(particle, group, override) {
|
|
3262
|
-
this.removeAt(this.array.indexOf(particle), undefined, group, override);
|
|
3263
|
-
}
|
|
3264
|
-
async update(delta) {
|
|
3265
|
-
const container = this.container;
|
|
3266
|
-
const particlesToDelete = [];
|
|
3267
|
-
container.pathGenerator.update();
|
|
3268
|
-
for (const [, plugin] of container.plugins) {
|
|
3269
|
-
if (plugin.update !== undefined) {
|
|
3270
|
-
plugin.update(delta);
|
|
3271
|
-
}
|
|
3272
|
-
}
|
|
3273
|
-
for (const particle of this.array) {
|
|
3274
|
-
const resizeFactor = container.canvas.resizeFactor;
|
|
3275
|
-
if (resizeFactor && !particle.ignoresResizeRatio) {
|
|
3276
|
-
particle.position.x *= resizeFactor.width;
|
|
3277
|
-
particle.position.y *= resizeFactor.height;
|
|
3278
|
-
}
|
|
3279
|
-
particle.ignoresResizeRatio = false;
|
|
3280
|
-
particle.bubble.inRange = false;
|
|
3281
|
-
for (const [, plugin] of this.container.plugins) {
|
|
3282
|
-
if (particle.destroyed) {
|
|
3283
|
-
break;
|
|
3284
|
-
}
|
|
3285
|
-
if (plugin.particleUpdate) {
|
|
3286
|
-
plugin.particleUpdate(particle, delta);
|
|
3287
|
-
}
|
|
3288
|
-
}
|
|
3289
|
-
this.mover.move(particle, delta);
|
|
3290
|
-
if (particle.destroyed) {
|
|
3291
|
-
particlesToDelete.push(particle);
|
|
3292
|
-
continue;
|
|
3293
|
-
}
|
|
3294
|
-
this.quadTree.insert(new Point(particle.getPosition(), particle));
|
|
3295
|
-
}
|
|
3296
|
-
for (const particle of particlesToDelete) {
|
|
3297
|
-
this.remove(particle);
|
|
3298
|
-
}
|
|
3299
|
-
await this.interactionManager.externalInteract(delta);
|
|
3300
|
-
for (const particle of container.particles.array) {
|
|
3301
|
-
for (const updater of this.updaters) {
|
|
3302
|
-
updater.update(particle, delta);
|
|
3303
|
-
}
|
|
3304
|
-
if (!particle.destroyed && !particle.spawning) {
|
|
3305
|
-
await this.interactionManager.particlesInteract(particle, delta);
|
|
3306
|
-
}
|
|
3307
|
-
}
|
|
3308
|
-
delete container.canvas.resizeFactor;
|
|
3309
|
-
}
|
|
3310
|
-
async draw(delta) {
|
|
3311
|
-
const container = this.container;
|
|
3312
|
-
container.canvas.clear();
|
|
3313
|
-
const canvasSize = this.container.canvas.size;
|
|
3314
|
-
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3315
|
-
await this.update(delta);
|
|
3316
|
-
if (this.needsSort) {
|
|
3317
|
-
this.zArray.sort(((a, b) => b.position.z - a.position.z || a.id - b.id));
|
|
3318
|
-
this.lastZIndex = this.zArray[this.zArray.length - 1].position.z;
|
|
3319
|
-
this.needsSort = false;
|
|
3320
|
-
}
|
|
3321
|
-
for (const [, plugin] of container.plugins) {
|
|
3322
|
-
container.canvas.drawPlugin(plugin, delta);
|
|
3323
|
-
}
|
|
3324
|
-
for (const p of this.zArray) {
|
|
3325
|
-
p.draw(delta);
|
|
3326
|
-
}
|
|
3327
|
-
}
|
|
3328
|
-
clear() {
|
|
3329
|
-
this.array = [];
|
|
3330
|
-
this.zArray = [];
|
|
3331
|
-
}
|
|
3332
|
-
push(nb, mouse, overrideOptions, group) {
|
|
3333
|
-
this.pushing = true;
|
|
3334
|
-
for (let i = 0; i < nb; i++) {
|
|
3335
|
-
this.addParticle(mouse === null || mouse === void 0 ? void 0 : mouse.position, overrideOptions, group);
|
|
3336
|
-
}
|
|
3337
|
-
this.pushing = false;
|
|
3338
|
-
}
|
|
3339
|
-
addParticle(position, overrideOptions, group) {
|
|
3340
|
-
const container = this.container, options = container.actualOptions, limit = options.particles.number.limit * container.density;
|
|
3341
|
-
if (limit > 0) {
|
|
3342
|
-
const countToRemove = this.count + 1 - limit;
|
|
3343
|
-
if (countToRemove > 0) {
|
|
3344
|
-
this.removeQuantity(countToRemove);
|
|
3345
|
-
}
|
|
3346
|
-
}
|
|
3347
|
-
return this.pushParticle(position, overrideOptions, group);
|
|
3348
|
-
}
|
|
3349
|
-
addSplitParticle(parent) {
|
|
3350
|
-
const splitOptions = parent.options.destroy.split, options = new ParticlesOptions;
|
|
3351
|
-
options.load(parent.options);
|
|
3352
|
-
const factor = getRangeValue(splitOptions.factor.value);
|
|
3353
|
-
options.color.load({
|
|
3354
|
-
value: {
|
|
3355
|
-
hsl: parent.getFillColor()
|
|
3356
|
-
}
|
|
3357
|
-
});
|
|
3358
|
-
if (typeof options.size.value === "number") {
|
|
3359
|
-
options.size.value /= factor;
|
|
3360
|
-
} else {
|
|
3361
|
-
options.size.value.min /= factor;
|
|
3362
|
-
options.size.value.max /= factor;
|
|
3363
|
-
}
|
|
3364
|
-
options.load(splitOptions.particles);
|
|
3365
|
-
const offset = splitOptions.sizeOffset ? setRangeValue(-parent.size.value, parent.size.value) : 0;
|
|
3366
|
-
const position = {
|
|
3367
|
-
x: parent.position.x + randomInRange(offset),
|
|
3368
|
-
y: parent.position.y + randomInRange(offset)
|
|
3369
|
-
};
|
|
3370
|
-
return this.pushParticle(position, options, parent.group, (particle => {
|
|
3371
|
-
if (particle.size.value < .5) {
|
|
3372
|
-
return false;
|
|
3373
|
-
}
|
|
3374
|
-
particle.velocity.length = randomInRange(setRangeValue(parent.velocity.length, particle.velocity.length));
|
|
3375
|
-
particle.splitCount = parent.splitCount + 1;
|
|
3376
|
-
particle.unbreakable = true;
|
|
3377
|
-
setTimeout((() => {
|
|
3378
|
-
particle.unbreakable = false;
|
|
3379
|
-
}), 500);
|
|
3380
|
-
return true;
|
|
3381
|
-
}));
|
|
3382
|
-
}
|
|
3383
|
-
removeQuantity(quantity, group) {
|
|
3384
|
-
this.removeAt(0, quantity, group);
|
|
3385
|
-
}
|
|
3386
|
-
getLinkFrequency(p1, p2) {
|
|
3387
|
-
const range = setRangeValue(p1.id, p2.id), key = `${getRangeMin(range)}_${getRangeMax(range)}`;
|
|
3388
|
-
let res = this.freqs.links.get(key);
|
|
3389
|
-
if (res === undefined) {
|
|
3390
|
-
res = Math.random();
|
|
3391
|
-
this.freqs.links.set(key, res);
|
|
3392
|
-
}
|
|
3393
|
-
return res;
|
|
3394
|
-
}
|
|
3395
|
-
getTriangleFrequency(p1, p2, p3) {
|
|
3396
|
-
let [id1, id2, id3] = [ p1.id, p2.id, p3.id ];
|
|
3397
|
-
if (id1 > id2) {
|
|
3398
|
-
[id2, id1] = [ id1, id2 ];
|
|
3399
|
-
}
|
|
3400
|
-
if (id2 > id3) {
|
|
3401
|
-
[id3, id2] = [ id2, id3 ];
|
|
3402
|
-
}
|
|
3403
|
-
if (id1 > id3) {
|
|
3404
|
-
[id3, id1] = [ id1, id3 ];
|
|
3405
|
-
}
|
|
3406
|
-
const key = `${id1}_${id2}_${id3}`;
|
|
3407
|
-
let res = this.freqs.triangles.get(key);
|
|
3408
|
-
if (res === undefined) {
|
|
3409
|
-
res = Math.random();
|
|
3410
|
-
this.freqs.triangles.set(key, res);
|
|
3411
|
-
}
|
|
3412
|
-
return res;
|
|
3413
|
-
}
|
|
3414
|
-
addManualParticles() {
|
|
3415
|
-
const container = this.container, options = container.actualOptions;
|
|
3416
|
-
for (const particle of options.manualParticles) {
|
|
3417
|
-
const pos = particle.position ? {
|
|
3418
|
-
x: particle.position.x * container.canvas.size.width / 100,
|
|
3419
|
-
y: particle.position.y * container.canvas.size.height / 100
|
|
3420
|
-
} : undefined;
|
|
3421
|
-
this.addParticle(pos, particle.options);
|
|
3422
|
-
}
|
|
3423
|
-
}
|
|
3424
|
-
setDensity() {
|
|
3425
|
-
const options = this.container.actualOptions;
|
|
3426
|
-
for (const group in options.particles.groups) {
|
|
3427
|
-
this.applyDensity(options.particles.groups[group], 0, group);
|
|
3428
|
-
}
|
|
3429
|
-
this.applyDensity(options.particles, options.manualParticles.length);
|
|
3430
|
-
}
|
|
3431
|
-
applyDensity(options, manualCount, group) {
|
|
3432
|
-
var _a;
|
|
3433
|
-
if (!((_a = options.number.density) === null || _a === void 0 ? void 0 : _a.enable)) {
|
|
3434
|
-
return;
|
|
3435
|
-
}
|
|
3436
|
-
const numberOptions = options.number;
|
|
3437
|
-
const densityFactor = this.initDensityFactor(numberOptions.density);
|
|
3438
|
-
const optParticlesNumber = numberOptions.value;
|
|
3439
|
-
const optParticlesLimit = numberOptions.limit > 0 ? numberOptions.limit : optParticlesNumber;
|
|
3440
|
-
const particlesNumber = Math.min(optParticlesNumber, optParticlesLimit) * densityFactor + manualCount;
|
|
3441
|
-
const particlesCount = Math.min(this.count, this.array.filter((t => t.group === group)).length);
|
|
3442
|
-
this.limit = numberOptions.limit * densityFactor;
|
|
3443
|
-
if (particlesCount < particlesNumber) {
|
|
3444
|
-
this.push(Math.abs(particlesNumber - particlesCount), undefined, options, group);
|
|
3445
|
-
} else if (particlesCount > particlesNumber) {
|
|
3446
|
-
this.removeQuantity(particlesCount - particlesNumber, group);
|
|
3447
|
-
}
|
|
3448
|
-
}
|
|
3449
|
-
initDensityFactor(densityOptions) {
|
|
3450
|
-
const container = this.container;
|
|
3451
|
-
if (!container.canvas.element || !densityOptions.enable) {
|
|
3452
|
-
return 1;
|
|
3453
|
-
}
|
|
3454
|
-
const canvas = container.canvas.element, pxRatio = container.retina.pixelRatio;
|
|
3455
|
-
return canvas.width * canvas.height / (densityOptions.factor * pxRatio ** 2 * densityOptions.area);
|
|
3456
|
-
}
|
|
3457
|
-
pushParticle(position, overrideOptions, group, initializer) {
|
|
3458
|
-
try {
|
|
3459
|
-
const particle = new Particle(Particles_classPrivateFieldGet(this, _Particles_engine, "f"), this.nextId, this.container, position, overrideOptions, group);
|
|
3460
|
-
let canAdd = true;
|
|
3461
|
-
if (initializer) {
|
|
3462
|
-
canAdd = initializer(particle);
|
|
3463
|
-
}
|
|
3464
|
-
if (!canAdd) {
|
|
3465
|
-
return;
|
|
3466
|
-
}
|
|
3467
|
-
this.array.push(particle);
|
|
3468
|
-
this.zArray.push(particle);
|
|
3469
|
-
this.nextId++;
|
|
3470
|
-
return particle;
|
|
3471
|
-
} catch (e) {
|
|
3472
|
-
console.warn(`error adding particle: ${e}`);
|
|
3473
|
-
return;
|
|
3474
|
-
}
|
|
3475
|
-
}
|
|
3476
|
-
}
|
|
3477
|
-
_Particles_engine = new WeakMap;
|
|
3478
|
-
class Retina_Retina {
|
|
3479
|
-
constructor(container) {
|
|
3480
|
-
this.container = container;
|
|
3481
|
-
}
|
|
3482
|
-
init() {
|
|
3483
|
-
const container = this.container;
|
|
3484
|
-
const options = container.actualOptions;
|
|
3485
|
-
this.pixelRatio = !options.detectRetina || isSsr() ? 1 : window.devicePixelRatio;
|
|
3486
|
-
const motionOptions = this.container.actualOptions.motion;
|
|
3487
|
-
if (motionOptions && (motionOptions.disable || motionOptions.reduce.value)) {
|
|
3488
|
-
if (isSsr() || typeof matchMedia === "undefined" || !matchMedia) {
|
|
3489
|
-
this.reduceFactor = 1;
|
|
3490
|
-
} else {
|
|
3491
|
-
const mediaQuery = matchMedia("(prefers-reduced-motion: reduce)");
|
|
3492
|
-
if (mediaQuery) {
|
|
3493
|
-
this.handleMotionChange(mediaQuery);
|
|
3494
|
-
const handleChange = () => {
|
|
3495
|
-
this.handleMotionChange(mediaQuery);
|
|
3496
|
-
container.refresh().catch((() => {}));
|
|
3497
|
-
};
|
|
3498
|
-
if (mediaQuery.addEventListener !== undefined) {
|
|
3499
|
-
mediaQuery.addEventListener("change", handleChange);
|
|
3500
|
-
} else if (mediaQuery.addListener !== undefined) {
|
|
3501
|
-
mediaQuery.addListener(handleChange);
|
|
3502
|
-
}
|
|
3503
|
-
}
|
|
3504
|
-
}
|
|
3505
|
-
} else {
|
|
3506
|
-
this.reduceFactor = 1;
|
|
3507
|
-
}
|
|
3508
|
-
const ratio = this.pixelRatio;
|
|
3509
|
-
if (container.canvas.element) {
|
|
3510
|
-
const element = container.canvas.element;
|
|
3511
|
-
container.canvas.size.width = element.offsetWidth * ratio;
|
|
3512
|
-
container.canvas.size.height = element.offsetHeight * ratio;
|
|
3513
|
-
}
|
|
3514
|
-
const particles = options.particles;
|
|
3515
|
-
this.attractDistance = getRangeValue(particles.move.attract.distance) * ratio;
|
|
3516
|
-
this.linksDistance = particles.links.distance * ratio;
|
|
3517
|
-
this.linksWidth = particles.links.width * ratio;
|
|
3518
|
-
this.sizeAnimationSpeed = getRangeValue(particles.size.animation.speed) * ratio;
|
|
3519
|
-
this.maxSpeed = getRangeValue(particles.move.gravity.maxSpeed) * ratio;
|
|
3520
|
-
if (particles.orbit.radius !== undefined) {
|
|
3521
|
-
this.orbitRadius = getRangeValue(particles.orbit.radius) * this.container.retina.pixelRatio;
|
|
3522
|
-
}
|
|
3523
|
-
const modes = options.interactivity.modes;
|
|
3524
|
-
this.connectModeDistance = modes.connect.distance * ratio;
|
|
3525
|
-
this.connectModeRadius = modes.connect.radius * ratio;
|
|
3526
|
-
this.grabModeDistance = modes.grab.distance * ratio;
|
|
3527
|
-
this.repulseModeDistance = modes.repulse.distance * ratio;
|
|
3528
|
-
this.bounceModeDistance = modes.bounce.distance * ratio;
|
|
3529
|
-
this.attractModeDistance = modes.attract.distance * ratio;
|
|
3530
|
-
this.slowModeRadius = modes.slow.radius * ratio;
|
|
3531
|
-
this.bubbleModeDistance = modes.bubble.distance * ratio;
|
|
3532
|
-
if (modes.bubble.size) {
|
|
3533
|
-
this.bubbleModeSize = modes.bubble.size * ratio;
|
|
3534
|
-
}
|
|
3535
|
-
}
|
|
3536
|
-
initParticle(particle) {
|
|
3537
|
-
const options = particle.options;
|
|
3538
|
-
const ratio = this.pixelRatio;
|
|
3539
|
-
const moveDistance = options.move.distance;
|
|
3540
|
-
const props = particle.retina;
|
|
3541
|
-
props.attractDistance = getRangeValue(options.move.attract.distance) * ratio;
|
|
3542
|
-
props.linksDistance = options.links.distance * ratio;
|
|
3543
|
-
props.linksWidth = options.links.width * ratio;
|
|
3544
|
-
props.moveDrift = getRangeValue(options.move.drift) * ratio;
|
|
3545
|
-
props.moveSpeed = getRangeValue(options.move.speed) * ratio;
|
|
3546
|
-
props.sizeAnimationSpeed = getRangeValue(options.size.animation.speed) * ratio;
|
|
3547
|
-
if (particle.spin) {
|
|
3548
|
-
props.spinAcceleration = getRangeValue(options.move.spin.acceleration) * ratio;
|
|
3549
|
-
}
|
|
3550
|
-
const maxDistance = props.maxDistance;
|
|
3551
|
-
maxDistance.horizontal = moveDistance.horizontal !== undefined ? moveDistance.horizontal * ratio : undefined;
|
|
3552
|
-
maxDistance.vertical = moveDistance.vertical !== undefined ? moveDistance.vertical * ratio : undefined;
|
|
3553
|
-
props.maxSpeed = getRangeValue(options.move.gravity.maxSpeed) * ratio;
|
|
3554
|
-
}
|
|
3555
|
-
handleMotionChange(mediaQuery) {
|
|
3556
|
-
const options = this.container.actualOptions;
|
|
3557
|
-
if (mediaQuery.matches) {
|
|
3558
|
-
const motion = options.motion;
|
|
3559
|
-
this.reduceFactor = motion.disable ? 0 : motion.reduce.value ? 1 / motion.reduce.factor : 1;
|
|
3560
|
-
} else {
|
|
3561
|
-
this.reduceFactor = 1;
|
|
3562
|
-
}
|
|
3563
|
-
}
|
|
3564
|
-
}
|
|
3565
|
-
var Container_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
3566
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3567
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
3568
|
-
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");
|
|
3569
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
3570
|
-
value;
|
|
3571
|
-
};
|
|
3572
|
-
var Container_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
3573
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3574
|
-
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");
|
|
3575
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
3576
|
-
};
|
|
3577
|
-
var _Container_engine;
|
|
3578
|
-
class Container_Container {
|
|
3579
|
-
constructor(engine, id, sourceOptions, ...presets) {
|
|
3580
|
-
this.id = id;
|
|
3581
|
-
_Container_engine.set(this, void 0);
|
|
3582
|
-
Container_classPrivateFieldSet(this, _Container_engine, engine, "f");
|
|
3583
|
-
this.fpsLimit = 120;
|
|
3584
|
-
this.duration = 0;
|
|
3585
|
-
this.lifeTime = 0;
|
|
3586
|
-
this.firstStart = true;
|
|
3587
|
-
this.started = false;
|
|
3588
|
-
this.destroyed = false;
|
|
3589
|
-
this.paused = true;
|
|
3590
|
-
this.lastFrameTime = 0;
|
|
3591
|
-
this.zLayers = 100;
|
|
3592
|
-
this.pageHidden = false;
|
|
3593
|
-
this._sourceOptions = sourceOptions;
|
|
3594
|
-
this._initialSourceOptions = sourceOptions;
|
|
3595
|
-
this.retina = new Retina(this);
|
|
3596
|
-
this.canvas = new Canvas(this);
|
|
3597
|
-
this.particles = new Particles(Container_classPrivateFieldGet(this, _Container_engine, "f"), this);
|
|
3598
|
-
this.drawer = new FrameManager(this);
|
|
3599
|
-
this.presets = presets;
|
|
3600
|
-
this.pathGenerator = {
|
|
3601
|
-
generate: () => {
|
|
3602
|
-
const v = Vector.create(0, 0);
|
|
3603
|
-
v.length = Math.random();
|
|
3604
|
-
v.angle = Math.random() * Math.PI * 2;
|
|
3605
|
-
return v;
|
|
3606
|
-
},
|
|
3607
|
-
init: () => {},
|
|
3608
|
-
update: () => {}
|
|
3609
|
-
};
|
|
3610
|
-
this.interactivity = {
|
|
3611
|
-
mouse: {
|
|
3612
|
-
clicking: false,
|
|
3613
|
-
inside: false
|
|
3614
|
-
}
|
|
3615
|
-
};
|
|
3616
|
-
this.bubble = {};
|
|
3617
|
-
this.repulse = {
|
|
3618
|
-
particles: []
|
|
3619
|
-
};
|
|
3620
|
-
this.attract = {
|
|
3621
|
-
particles: []
|
|
3622
|
-
};
|
|
3623
|
-
this.plugins = new Map;
|
|
3624
|
-
this.drawers = new Map;
|
|
3625
|
-
this.density = 1;
|
|
3626
|
-
this._options = new Options(Container_classPrivateFieldGet(this, _Container_engine, "f"));
|
|
3627
|
-
this.actualOptions = new Options(Container_classPrivateFieldGet(this, _Container_engine, "f"));
|
|
3628
|
-
this.eventListeners = new EventListeners(this);
|
|
3629
|
-
if (typeof IntersectionObserver !== "undefined" && IntersectionObserver) {
|
|
3630
|
-
this.intersectionObserver = new IntersectionObserver((entries => this.intersectionManager(entries)));
|
|
3631
|
-
}
|
|
3632
|
-
}
|
|
3633
|
-
get options() {
|
|
3634
|
-
return this._options;
|
|
3635
|
-
}
|
|
3636
|
-
get sourceOptions() {
|
|
3637
|
-
return this._sourceOptions;
|
|
3638
|
-
}
|
|
3639
|
-
play(force) {
|
|
3640
|
-
const needsUpdate = this.paused || force;
|
|
3641
|
-
if (this.firstStart && !this.actualOptions.autoPlay) {
|
|
3642
|
-
this.firstStart = false;
|
|
3643
|
-
return;
|
|
3644
|
-
}
|
|
3645
|
-
if (this.paused) {
|
|
3646
|
-
this.paused = false;
|
|
3647
|
-
}
|
|
3648
|
-
if (needsUpdate) {
|
|
3649
|
-
for (const [, plugin] of this.plugins) {
|
|
3650
|
-
if (plugin.play) {
|
|
3651
|
-
plugin.play();
|
|
3652
|
-
}
|
|
3653
|
-
}
|
|
3654
|
-
}
|
|
3655
|
-
this.draw(needsUpdate || false);
|
|
3656
|
-
}
|
|
3657
|
-
pause() {
|
|
3658
|
-
if (this.drawAnimationFrame !== undefined) {
|
|
3659
|
-
cancelAnimation()(this.drawAnimationFrame);
|
|
3660
|
-
delete this.drawAnimationFrame;
|
|
3661
|
-
}
|
|
3662
|
-
if (this.paused) {
|
|
3663
|
-
return;
|
|
3664
|
-
}
|
|
3665
|
-
for (const [, plugin] of this.plugins) {
|
|
3666
|
-
if (plugin.pause) {
|
|
3667
|
-
plugin.pause();
|
|
3668
|
-
}
|
|
3669
|
-
}
|
|
3670
|
-
if (!this.pageHidden) {
|
|
3671
|
-
this.paused = true;
|
|
3672
|
-
}
|
|
3673
|
-
}
|
|
3674
|
-
draw(force) {
|
|
3675
|
-
let refreshTime = force;
|
|
3676
|
-
this.drawAnimationFrame = animate()((async timestamp => {
|
|
3677
|
-
if (refreshTime) {
|
|
3678
|
-
this.lastFrameTime = undefined;
|
|
3679
|
-
refreshTime = false;
|
|
3680
|
-
}
|
|
3681
|
-
await this.drawer.nextFrame(timestamp);
|
|
3682
|
-
}));
|
|
3683
|
-
}
|
|
3684
|
-
getAnimationStatus() {
|
|
3685
|
-
return !this.paused && !this.pageHidden;
|
|
3686
|
-
}
|
|
3687
|
-
setNoise(noiseOrGenerator, init, update) {
|
|
3688
|
-
this.setPath(noiseOrGenerator, init, update);
|
|
3689
|
-
}
|
|
3690
|
-
setPath(pathOrGenerator, init, update) {
|
|
3691
|
-
var _a, _b, _c;
|
|
3692
|
-
if (!pathOrGenerator) {
|
|
3693
|
-
return;
|
|
3694
|
-
}
|
|
3695
|
-
if (typeof pathOrGenerator === "function") {
|
|
3696
|
-
this.pathGenerator.generate = pathOrGenerator;
|
|
3697
|
-
if (init) {
|
|
3698
|
-
this.pathGenerator.init = init;
|
|
3699
|
-
}
|
|
3700
|
-
if (update) {
|
|
3701
|
-
this.pathGenerator.update = update;
|
|
3702
|
-
}
|
|
3703
|
-
} else {
|
|
3704
|
-
const oldGenerator = this.pathGenerator;
|
|
3705
|
-
this.pathGenerator = pathOrGenerator;
|
|
3706
|
-
(_a = this.pathGenerator).generate || (_a.generate = oldGenerator.generate);
|
|
3707
|
-
(_b = this.pathGenerator).init || (_b.init = oldGenerator.init);
|
|
3708
|
-
(_c = this.pathGenerator).update || (_c.update = oldGenerator.update);
|
|
3709
|
-
}
|
|
3710
|
-
}
|
|
3711
|
-
destroy() {
|
|
3712
|
-
this.stop();
|
|
3713
|
-
this.canvas.destroy();
|
|
3714
|
-
for (const [, drawer] of this.drawers) {
|
|
3715
|
-
if (drawer.destroy) {
|
|
3716
|
-
drawer.destroy(this);
|
|
3717
|
-
}
|
|
3718
|
-
}
|
|
3719
|
-
for (const key of this.drawers.keys()) {
|
|
3720
|
-
this.drawers.delete(key);
|
|
3721
|
-
}
|
|
3722
|
-
this.destroyed = true;
|
|
3723
|
-
}
|
|
3724
|
-
exportImg(callback) {
|
|
3725
|
-
this.exportImage(callback);
|
|
3726
|
-
}
|
|
3727
|
-
exportImage(callback, type, quality) {
|
|
3728
|
-
var _a;
|
|
3729
|
-
return (_a = this.canvas.element) === null || _a === void 0 ? void 0 : _a.toBlob(callback, type !== null && type !== void 0 ? type : "image/png", quality);
|
|
3730
|
-
}
|
|
3731
|
-
exportConfiguration() {
|
|
3732
|
-
return JSON.stringify(this.actualOptions, undefined, 2);
|
|
3733
|
-
}
|
|
3734
|
-
refresh() {
|
|
3735
|
-
this.stop();
|
|
3736
|
-
return this.start();
|
|
3737
|
-
}
|
|
3738
|
-
reset() {
|
|
3739
|
-
this._options = new Options(Container_classPrivateFieldGet(this, _Container_engine, "f"));
|
|
3740
|
-
return this.refresh();
|
|
3741
|
-
}
|
|
3742
|
-
stop() {
|
|
3743
|
-
if (!this.started) {
|
|
3744
|
-
return;
|
|
3745
|
-
}
|
|
3746
|
-
this.firstStart = true;
|
|
3747
|
-
this.started = false;
|
|
3748
|
-
this.eventListeners.removeListeners();
|
|
3749
|
-
this.pause();
|
|
3750
|
-
this.particles.clear();
|
|
3751
|
-
this.canvas.clear();
|
|
3752
|
-
if (this.interactivity.element instanceof HTMLElement && this.intersectionObserver) {
|
|
3753
|
-
this.intersectionObserver.unobserve(this.interactivity.element);
|
|
3754
|
-
}
|
|
3755
|
-
for (const [, plugin] of this.plugins) {
|
|
3756
|
-
if (plugin.stop) {
|
|
3757
|
-
plugin.stop();
|
|
3758
|
-
}
|
|
3759
|
-
}
|
|
3760
|
-
for (const key of this.plugins.keys()) {
|
|
3761
|
-
this.plugins.delete(key);
|
|
3762
|
-
}
|
|
3763
|
-
this.particles.linksColors = new Map;
|
|
3764
|
-
delete this.particles.grabLineColor;
|
|
3765
|
-
delete this.particles.linksColor;
|
|
3766
|
-
this._sourceOptions = this._options;
|
|
3767
|
-
}
|
|
3768
|
-
async loadTheme(name) {
|
|
3769
|
-
this.currentTheme = name;
|
|
3770
|
-
await this.refresh();
|
|
3771
|
-
}
|
|
3772
|
-
async start() {
|
|
3773
|
-
if (this.started) {
|
|
3774
|
-
return;
|
|
3775
|
-
}
|
|
3776
|
-
await this.init();
|
|
3777
|
-
this.started = true;
|
|
3778
|
-
this.eventListeners.addListeners();
|
|
3779
|
-
if (this.interactivity.element instanceof HTMLElement && this.intersectionObserver) {
|
|
3780
|
-
this.intersectionObserver.observe(this.interactivity.element);
|
|
3781
|
-
}
|
|
3782
|
-
for (const [, plugin] of this.plugins) {
|
|
3783
|
-
if (plugin.startAsync !== undefined) {
|
|
3784
|
-
await plugin.startAsync();
|
|
3785
|
-
} else if (plugin.start !== undefined) {
|
|
3786
|
-
plugin.start();
|
|
3787
|
-
}
|
|
3788
|
-
}
|
|
3789
|
-
this.play();
|
|
3790
|
-
}
|
|
3791
|
-
addClickHandler(callback) {
|
|
3792
|
-
const el = this.interactivity.element;
|
|
3793
|
-
if (!el) {
|
|
3794
|
-
return;
|
|
3795
|
-
}
|
|
3796
|
-
const clickOrTouchHandler = (e, pos, radius) => {
|
|
3797
|
-
if (this.destroyed) {
|
|
3798
|
-
return;
|
|
3799
|
-
}
|
|
3800
|
-
const pxRatio = this.retina.pixelRatio, posRetina = {
|
|
3801
|
-
x: pos.x * pxRatio,
|
|
3802
|
-
y: pos.y * pxRatio
|
|
3803
|
-
}, particles = this.particles.quadTree.queryCircle(posRetina, radius * pxRatio);
|
|
3804
|
-
callback(e, particles);
|
|
3805
|
-
};
|
|
3806
|
-
const clickHandler = e => {
|
|
3807
|
-
if (this.destroyed) {
|
|
3808
|
-
return;
|
|
3809
|
-
}
|
|
3810
|
-
const mouseEvent = e;
|
|
3811
|
-
const pos = {
|
|
3812
|
-
x: mouseEvent.offsetX || mouseEvent.clientX,
|
|
3813
|
-
y: mouseEvent.offsetY || mouseEvent.clientY
|
|
3814
|
-
};
|
|
3815
|
-
clickOrTouchHandler(e, pos, 1);
|
|
3816
|
-
};
|
|
3817
|
-
const touchStartHandler = () => {
|
|
3818
|
-
if (this.destroyed) {
|
|
3819
|
-
return;
|
|
3820
|
-
}
|
|
3821
|
-
touched = true;
|
|
3822
|
-
touchMoved = false;
|
|
3823
|
-
};
|
|
3824
|
-
const touchMoveHandler = () => {
|
|
3825
|
-
if (this.destroyed) {
|
|
3826
|
-
return;
|
|
3827
|
-
}
|
|
3828
|
-
touchMoved = true;
|
|
3829
|
-
};
|
|
3830
|
-
const touchEndHandler = e => {
|
|
3831
|
-
var _a, _b, _c;
|
|
3832
|
-
if (this.destroyed) {
|
|
3833
|
-
return;
|
|
3834
|
-
}
|
|
3835
|
-
if (touched && !touchMoved) {
|
|
3836
|
-
const touchEvent = e;
|
|
3837
|
-
let lastTouch = touchEvent.touches[touchEvent.touches.length - 1];
|
|
3838
|
-
if (!lastTouch) {
|
|
3839
|
-
lastTouch = touchEvent.changedTouches[touchEvent.changedTouches.length - 1];
|
|
3840
|
-
if (!lastTouch) {
|
|
3841
|
-
return;
|
|
3842
|
-
}
|
|
3843
|
-
}
|
|
3844
|
-
const canvasRect = (_a = this.canvas.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
3845
|
-
const pos = {
|
|
3846
|
-
x: lastTouch.clientX - ((_b = canvasRect === null || canvasRect === void 0 ? void 0 : canvasRect.left) !== null && _b !== void 0 ? _b : 0),
|
|
3847
|
-
y: lastTouch.clientY - ((_c = canvasRect === null || canvasRect === void 0 ? void 0 : canvasRect.top) !== null && _c !== void 0 ? _c : 0)
|
|
3848
|
-
};
|
|
3849
|
-
clickOrTouchHandler(e, pos, Math.max(lastTouch.radiusX, lastTouch.radiusY));
|
|
3850
|
-
}
|
|
3851
|
-
touched = false;
|
|
3852
|
-
touchMoved = false;
|
|
3853
|
-
};
|
|
3854
|
-
const touchCancelHandler = () => {
|
|
3855
|
-
if (this.destroyed) {
|
|
3856
|
-
return;
|
|
3857
|
-
}
|
|
3858
|
-
touched = false;
|
|
3859
|
-
touchMoved = false;
|
|
3860
|
-
};
|
|
3861
|
-
let touched = false;
|
|
3862
|
-
let touchMoved = false;
|
|
3863
|
-
el.addEventListener("click", clickHandler);
|
|
3864
|
-
el.addEventListener("touchstart", touchStartHandler);
|
|
3865
|
-
el.addEventListener("touchmove", touchMoveHandler);
|
|
3866
|
-
el.addEventListener("touchend", touchEndHandler);
|
|
3867
|
-
el.addEventListener("touchcancel", touchCancelHandler);
|
|
3868
|
-
}
|
|
3869
|
-
updateActualOptions() {
|
|
3870
|
-
this.actualOptions.responsive = [];
|
|
3871
|
-
const newMaxWidth = this.actualOptions.setResponsive(this.canvas.size.width, this.retina.pixelRatio, this._options);
|
|
3872
|
-
this.actualOptions.setTheme(this.currentTheme);
|
|
3873
|
-
if (this.responsiveMaxWidth != newMaxWidth) {
|
|
3874
|
-
this.responsiveMaxWidth = newMaxWidth;
|
|
3875
|
-
return true;
|
|
3876
|
-
}
|
|
3877
|
-
return false;
|
|
3878
|
-
}
|
|
3879
|
-
async init() {
|
|
3880
|
-
this._options = new Options(Container_classPrivateFieldGet(this, _Container_engine, "f"));
|
|
3881
|
-
for (const preset of this.presets) {
|
|
3882
|
-
this._options.load(Container_classPrivateFieldGet(this, _Container_engine, "f").plugins.getPreset(preset));
|
|
3883
|
-
}
|
|
3884
|
-
const shapes = Container_classPrivateFieldGet(this, _Container_engine, "f").plugins.getSupportedShapes();
|
|
3885
|
-
for (const type of shapes) {
|
|
3886
|
-
const drawer = Container_classPrivateFieldGet(this, _Container_engine, "f").plugins.getShapeDrawer(type);
|
|
3887
|
-
if (drawer) {
|
|
3888
|
-
this.drawers.set(type, drawer);
|
|
3889
|
-
}
|
|
3890
|
-
}
|
|
3891
|
-
this._options.load(this._initialSourceOptions);
|
|
3892
|
-
this._options.load(this._sourceOptions);
|
|
3893
|
-
this.actualOptions = new Options(Container_classPrivateFieldGet(this, _Container_engine, "f"));
|
|
3894
|
-
this.actualOptions.load(this._options);
|
|
3895
|
-
this.retina.init();
|
|
3896
|
-
this.canvas.init();
|
|
3897
|
-
this.updateActualOptions();
|
|
3898
|
-
this.canvas.initBackground();
|
|
3899
|
-
this.canvas.resize();
|
|
3900
|
-
this.zLayers = this.actualOptions.zLayers;
|
|
3901
|
-
this.duration = getRangeValue(this.actualOptions.duration);
|
|
3902
|
-
this.lifeTime = 0;
|
|
3903
|
-
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit : 120;
|
|
3904
|
-
const availablePlugins = Container_classPrivateFieldGet(this, _Container_engine, "f").plugins.getAvailablePlugins(this);
|
|
3905
|
-
for (const [id, plugin] of availablePlugins) {
|
|
3906
|
-
this.plugins.set(id, plugin);
|
|
3907
|
-
}
|
|
3908
|
-
for (const [, drawer] of this.drawers) {
|
|
3909
|
-
if (drawer.init) {
|
|
3910
|
-
await drawer.init(this);
|
|
3911
|
-
}
|
|
3912
|
-
}
|
|
3913
|
-
for (const [, plugin] of this.plugins) {
|
|
3914
|
-
if (plugin.init) {
|
|
3915
|
-
plugin.init(this.actualOptions);
|
|
3916
|
-
} else if (plugin.initAsync !== undefined) {
|
|
3917
|
-
await plugin.initAsync(this.actualOptions);
|
|
3918
|
-
}
|
|
3919
|
-
}
|
|
3920
|
-
const pathOptions = this.actualOptions.particles.move.path;
|
|
3921
|
-
if (pathOptions.generator) {
|
|
3922
|
-
this.setPath(Container_classPrivateFieldGet(this, _Container_engine, "f").plugins.getPathGenerator(pathOptions.generator));
|
|
3923
|
-
}
|
|
3924
|
-
this.particles.init();
|
|
3925
|
-
this.particles.setDensity();
|
|
3926
|
-
for (const [, plugin] of this.plugins) {
|
|
3927
|
-
if (plugin.particlesSetup !== undefined) {
|
|
3928
|
-
plugin.particlesSetup();
|
|
3929
|
-
}
|
|
3930
|
-
}
|
|
3931
|
-
}
|
|
3932
|
-
intersectionManager(entries) {
|
|
3933
|
-
if (!this.actualOptions.pauseOnOutsideViewport) {
|
|
3934
|
-
return;
|
|
3935
|
-
}
|
|
3936
|
-
for (const entry of entries) {
|
|
3937
|
-
if (entry.target !== this.interactivity.element) {
|
|
3938
|
-
continue;
|
|
3939
|
-
}
|
|
3940
|
-
if (entry.isIntersecting) {
|
|
3941
|
-
this.play();
|
|
3942
|
-
} else {
|
|
3943
|
-
this.pause();
|
|
3944
|
-
}
|
|
3945
|
-
}
|
|
3946
|
-
}
|
|
3947
|
-
}
|
|
3948
|
-
_Container_engine = new WeakMap;
|
|
3949
|
-
var Loader_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
3950
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3951
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
3952
|
-
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");
|
|
3953
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
3954
|
-
value;
|
|
3955
|
-
};
|
|
3956
|
-
var Loader_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
3957
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3958
|
-
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");
|
|
3959
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
3960
|
-
};
|
|
3961
|
-
var _Loader_engine;
|
|
3962
|
-
function fetchError(statusCode) {
|
|
3963
|
-
console.error(`Error tsParticles - fetch status: ${statusCode}`);
|
|
3964
|
-
console.error("Error tsParticles - File config not found");
|
|
3965
|
-
}
|
|
3966
|
-
class Loader {
|
|
3967
|
-
constructor(engine) {
|
|
3968
|
-
_Loader_engine.set(this, void 0);
|
|
3969
|
-
Loader_classPrivateFieldSet(this, _Loader_engine, engine, "f");
|
|
3970
|
-
}
|
|
3971
|
-
dom() {
|
|
3972
|
-
return Loader_classPrivateFieldGet(this, _Loader_engine, "f").domArray;
|
|
3973
|
-
}
|
|
3974
|
-
domItem(index) {
|
|
3975
|
-
const dom = this.dom();
|
|
3976
|
-
const item = dom[index];
|
|
3977
|
-
if (item && !item.destroyed) {
|
|
3978
|
-
return item;
|
|
3979
|
-
}
|
|
3980
|
-
dom.splice(index, 1);
|
|
3981
|
-
}
|
|
3982
|
-
async loadOptions(params) {
|
|
3983
|
-
var _a, _b, _c;
|
|
3984
|
-
const tagId = (_a = params.tagId) !== null && _a !== void 0 ? _a : `tsparticles${Math.floor(Math.random() * 1e4)}`;
|
|
3985
|
-
const {options: options, index: index} = params;
|
|
3986
|
-
let domContainer = (_b = params.element) !== null && _b !== void 0 ? _b : document.getElementById(tagId);
|
|
3987
|
-
if (!domContainer) {
|
|
3988
|
-
domContainer = document.createElement("div");
|
|
3989
|
-
domContainer.id = tagId;
|
|
3990
|
-
(_c = document.querySelector("body")) === null || _c === void 0 ? void 0 : _c.append(domContainer);
|
|
3991
|
-
}
|
|
3992
|
-
const currentOptions = options instanceof Array ? itemFromArray(options, index) : options;
|
|
3993
|
-
const dom = this.dom();
|
|
3994
|
-
const oldIndex = dom.findIndex((v => v.id === tagId));
|
|
3995
|
-
if (oldIndex >= 0) {
|
|
3996
|
-
const old = this.domItem(oldIndex);
|
|
3997
|
-
if (old && !old.destroyed) {
|
|
3998
|
-
old.destroy();
|
|
3999
|
-
dom.splice(oldIndex, 1);
|
|
4000
|
-
}
|
|
4001
|
-
}
|
|
4002
|
-
let canvasEl;
|
|
4003
|
-
if (domContainer.tagName.toLowerCase() === "canvas") {
|
|
4004
|
-
canvasEl = domContainer;
|
|
4005
|
-
canvasEl.dataset[Constants.generatedAttribute] = "false";
|
|
4006
|
-
} else {
|
|
4007
|
-
const existingCanvases = domContainer.getElementsByTagName("canvas");
|
|
4008
|
-
if (existingCanvases.length) {
|
|
4009
|
-
canvasEl = existingCanvases[0];
|
|
4010
|
-
canvasEl.dataset[Constants.generatedAttribute] = "false";
|
|
4011
|
-
} else {
|
|
4012
|
-
canvasEl = document.createElement("canvas");
|
|
4013
|
-
canvasEl.dataset[Constants.generatedAttribute] = "true";
|
|
4014
|
-
canvasEl.style.width = "100%";
|
|
4015
|
-
canvasEl.style.height = "100%";
|
|
4016
|
-
domContainer.appendChild(canvasEl);
|
|
4017
|
-
}
|
|
4018
|
-
}
|
|
4019
|
-
const newItem = new Container(Loader_classPrivateFieldGet(this, _Loader_engine, "f"), tagId, currentOptions);
|
|
4020
|
-
if (oldIndex >= 0) {
|
|
4021
|
-
dom.splice(oldIndex, 0, newItem);
|
|
4022
|
-
} else {
|
|
4023
|
-
dom.push(newItem);
|
|
4024
|
-
}
|
|
4025
|
-
newItem.canvas.loadCanvas(canvasEl);
|
|
4026
|
-
await newItem.start();
|
|
4027
|
-
return newItem;
|
|
4028
|
-
}
|
|
4029
|
-
async loadRemoteOptions(params) {
|
|
4030
|
-
const {url: jsonUrl, index: index} = params;
|
|
4031
|
-
const url = jsonUrl instanceof Array ? itemFromArray(jsonUrl, index) : jsonUrl;
|
|
4032
|
-
if (!url) {
|
|
4033
|
-
return;
|
|
4034
|
-
}
|
|
4035
|
-
const response = await fetch(url);
|
|
4036
|
-
if (!response.ok) {
|
|
4037
|
-
fetchError(response.status);
|
|
4038
|
-
return;
|
|
4039
|
-
}
|
|
4040
|
-
const data = await response.json();
|
|
4041
|
-
return this.loadOptions({
|
|
4042
|
-
tagId: params.tagId,
|
|
4043
|
-
element: params.element,
|
|
4044
|
-
index: index,
|
|
4045
|
-
options: data
|
|
4046
|
-
});
|
|
4047
|
-
}
|
|
4048
|
-
load(tagId, options, index) {
|
|
4049
|
-
const params = {
|
|
4050
|
-
index: index
|
|
4051
|
-
};
|
|
4052
|
-
if (typeof tagId === "string") {
|
|
4053
|
-
params.tagId = tagId;
|
|
4054
|
-
} else {
|
|
4055
|
-
params.options = tagId;
|
|
4056
|
-
}
|
|
4057
|
-
if (typeof options === "number") {
|
|
4058
|
-
params.index = options !== null && options !== void 0 ? options : params.index;
|
|
4059
|
-
} else {
|
|
4060
|
-
params.options = options !== null && options !== void 0 ? options : params.options;
|
|
4061
|
-
}
|
|
4062
|
-
return this.loadOptions(params);
|
|
4063
|
-
}
|
|
4064
|
-
async set(id, domContainer, options, index) {
|
|
4065
|
-
const params = {
|
|
4066
|
-
index: index
|
|
4067
|
-
};
|
|
4068
|
-
if (typeof id === "string") {
|
|
4069
|
-
params.tagId = id;
|
|
4070
|
-
} else {
|
|
4071
|
-
params.element = id;
|
|
4072
|
-
}
|
|
4073
|
-
if (domContainer instanceof HTMLElement) {
|
|
4074
|
-
params.element = domContainer;
|
|
4075
|
-
} else {
|
|
4076
|
-
params.options = domContainer;
|
|
4077
|
-
}
|
|
4078
|
-
if (typeof options === "number") {
|
|
4079
|
-
params.index = options;
|
|
4080
|
-
} else {
|
|
4081
|
-
params.options = options !== null && options !== void 0 ? options : params.options;
|
|
4082
|
-
}
|
|
4083
|
-
return this.loadOptions(params);
|
|
4084
|
-
}
|
|
4085
|
-
async loadJSON(tagId, jsonUrl, index) {
|
|
4086
|
-
let url, id;
|
|
4087
|
-
if (typeof jsonUrl === "number" || jsonUrl === undefined) {
|
|
4088
|
-
url = tagId;
|
|
4089
|
-
} else {
|
|
4090
|
-
id = tagId;
|
|
4091
|
-
url = jsonUrl;
|
|
4092
|
-
}
|
|
4093
|
-
return this.loadRemoteOptions({
|
|
4094
|
-
tagId: id,
|
|
4095
|
-
url: url,
|
|
4096
|
-
index: index
|
|
4097
|
-
});
|
|
4098
|
-
}
|
|
4099
|
-
async setJSON(id, domContainer, jsonUrl, index) {
|
|
4100
|
-
let url, newId, newIndex, element;
|
|
4101
|
-
if (id instanceof HTMLElement) {
|
|
4102
|
-
element = id;
|
|
4103
|
-
url = domContainer;
|
|
4104
|
-
newIndex = jsonUrl;
|
|
4105
|
-
} else {
|
|
4106
|
-
newId = id;
|
|
4107
|
-
element = domContainer;
|
|
4108
|
-
url = jsonUrl;
|
|
4109
|
-
newIndex = index;
|
|
4110
|
-
}
|
|
4111
|
-
return this.loadRemoteOptions({
|
|
4112
|
-
tagId: newId,
|
|
4113
|
-
url: url,
|
|
4114
|
-
index: newIndex,
|
|
4115
|
-
element: element
|
|
4116
|
-
});
|
|
4117
|
-
}
|
|
4118
|
-
setOnClickHandler(callback) {
|
|
4119
|
-
const dom = this.dom();
|
|
4120
|
-
if (dom.length === 0) {
|
|
4121
|
-
throw new Error("Can only set click handlers after calling tsParticles.load() or tsParticles.loadJSON()");
|
|
4122
|
-
}
|
|
4123
|
-
for (const domItem of dom) {
|
|
4124
|
-
domItem.addClickHandler(callback);
|
|
4125
|
-
}
|
|
4126
|
-
}
|
|
4127
|
-
}
|
|
4128
|
-
_Loader_engine = new WeakMap;
|
|
4129
|
-
function NumberUtils_clamp(num, min, max) {
|
|
46
|
+
function clamp(num, min, max) {
|
|
4130
47
|
return Math.min(Math.max(num, min), max);
|
|
4131
48
|
}
|
|
4132
49
|
function NumberUtils_mix(comp1, comp2, weight1, weight2) {
|
|
4133
50
|
return Math.floor((comp1 * weight1 + comp2 * weight2) / (weight1 + weight2));
|
|
4134
51
|
}
|
|
4135
|
-
function
|
|
4136
|
-
const max =
|
|
4137
|
-
let min =
|
|
52
|
+
function randomInRange(r) {
|
|
53
|
+
const max = getRangeMax(r);
|
|
54
|
+
let min = getRangeMin(r);
|
|
4138
55
|
if (max === min) {
|
|
4139
56
|
min = 0;
|
|
4140
57
|
}
|
|
4141
58
|
return Math.random() * (max - min) + min;
|
|
4142
59
|
}
|
|
4143
60
|
function NumberUtils_getRangeValue(value) {
|
|
4144
|
-
return typeof value === "number" ? value :
|
|
61
|
+
return typeof value === "number" ? value : randomInRange(value);
|
|
4145
62
|
}
|
|
4146
|
-
function
|
|
63
|
+
function getRangeMin(value) {
|
|
4147
64
|
return typeof value === "number" ? value : value.min;
|
|
4148
65
|
}
|
|
4149
|
-
function
|
|
66
|
+
function getRangeMax(value) {
|
|
4150
67
|
return typeof value === "number" ? value : value.max;
|
|
4151
68
|
}
|
|
4152
|
-
function
|
|
69
|
+
function setRangeValue(source, value) {
|
|
4153
70
|
if (source === value || value === undefined && typeof source === "number") {
|
|
4154
71
|
return source;
|
|
4155
72
|
}
|
|
4156
|
-
const min =
|
|
73
|
+
const min = getRangeMin(source), max = getRangeMax(source);
|
|
4157
74
|
return value !== undefined ? {
|
|
4158
75
|
min: Math.min(min, value),
|
|
4159
76
|
max: Math.max(max, value)
|
|
4160
|
-
} :
|
|
77
|
+
} : setRangeValue(min, max);
|
|
4161
78
|
}
|
|
4162
79
|
function NumberUtils_getValue(options) {
|
|
4163
|
-
const random = options.random
|
|
4164
|
-
const {enable: enable, minimumValue: minimumValue} = typeof random === "boolean" ? {
|
|
80
|
+
const random = options.random, {enable: enable, minimumValue: minimumValue} = typeof random === "boolean" ? {
|
|
4165
81
|
enable: random,
|
|
4166
82
|
minimumValue: 0
|
|
4167
83
|
} : random;
|
|
4168
|
-
return enable ? NumberUtils_getRangeValue(
|
|
84
|
+
return enable ? NumberUtils_getRangeValue(setRangeValue(options.value, minimumValue)) : NumberUtils_getRangeValue(options.value);
|
|
4169
85
|
}
|
|
4170
86
|
function NumberUtils_getDistances(pointA, pointB) {
|
|
4171
|
-
const dx = pointA.x - pointB.x;
|
|
4172
|
-
const dy = pointA.y - pointB.y;
|
|
87
|
+
const dx = pointA.x - pointB.x, dy = pointA.y - pointB.y;
|
|
4173
88
|
return {
|
|
4174
89
|
dx: dx,
|
|
4175
90
|
dy: dy,
|
|
4176
91
|
distance: Math.sqrt(dx * dx + dy * dy)
|
|
4177
92
|
};
|
|
4178
93
|
}
|
|
4179
|
-
function
|
|
94
|
+
function getDistance(pointA, pointB) {
|
|
4180
95
|
return NumberUtils_getDistances(pointA, pointB).distance;
|
|
4181
96
|
}
|
|
4182
|
-
function
|
|
97
|
+
function getParticleDirectionAngle(direction) {
|
|
4183
98
|
if (typeof direction === "number") {
|
|
4184
99
|
return direction * Math.PI / 180;
|
|
4185
100
|
} else {
|
|
@@ -4214,7 +129,7 @@
|
|
|
4214
129
|
}
|
|
4215
130
|
}
|
|
4216
131
|
}
|
|
4217
|
-
function
|
|
132
|
+
function getParticleBaseVelocity(direction) {
|
|
4218
133
|
const baseVelocity = Vector.origin;
|
|
4219
134
|
baseVelocity.length = 1;
|
|
4220
135
|
baseVelocity.angle = direction;
|
|
@@ -4245,8 +160,7 @@
|
|
|
4245
160
|
|
|
4246
161
|
case "ease-out-back":
|
|
4247
162
|
{
|
|
4248
|
-
const c1 = 1.70158;
|
|
4249
|
-
const c3 = c1 + 1;
|
|
163
|
+
const c1 = 1.70158, c3 = c1 + 1;
|
|
4250
164
|
return 1 + c3 * Math.pow(value - 1, 3) + c1 * Math.pow(value - 1, 2);
|
|
4251
165
|
}
|
|
4252
166
|
|
|
@@ -4257,40 +171,100 @@
|
|
|
4257
171
|
return value;
|
|
4258
172
|
}
|
|
4259
173
|
}
|
|
174
|
+
function calcPositionFromSize(data) {
|
|
175
|
+
var _a, _b;
|
|
176
|
+
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 ? {
|
|
177
|
+
x: data.position.x * data.size.width / 100,
|
|
178
|
+
y: data.position.y * data.size.height / 100
|
|
179
|
+
} : undefined;
|
|
180
|
+
}
|
|
181
|
+
function calcPositionOrRandomFromSize(data) {
|
|
182
|
+
var _a, _b, _c, _d;
|
|
183
|
+
return {
|
|
184
|
+
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,
|
|
185
|
+
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
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
function calcPositionOrRandomFromSizeRanged(data) {
|
|
189
|
+
var _a, _b;
|
|
190
|
+
const position = {
|
|
191
|
+
x: ((_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== undefined ? NumberUtils_getRangeValue(data.position.x) : undefined,
|
|
192
|
+
y: ((_b = data.position) === null || _b === void 0 ? void 0 : _b.y) !== undefined ? NumberUtils_getRangeValue(data.position.y) : undefined
|
|
193
|
+
};
|
|
194
|
+
return calcPositionOrRandomFromSize({
|
|
195
|
+
size: data.size,
|
|
196
|
+
position: position
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
function calcExactPositionOrRandomFromSize(data) {
|
|
200
|
+
var _a, _b, _c, _d;
|
|
201
|
+
return {
|
|
202
|
+
x: (_b = (_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : Math.random() * data.size.width,
|
|
203
|
+
y: (_d = (_c = data.position) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : Math.random() * data.size.height
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
function calcExactPositionOrRandomFromSizeRanged(data) {
|
|
207
|
+
var _a, _b;
|
|
208
|
+
const position = {
|
|
209
|
+
x: ((_a = data.position) === null || _a === void 0 ? void 0 : _a.x) !== undefined ? NumberUtils_getRangeValue(data.position.x) : undefined,
|
|
210
|
+
y: ((_b = data.position) === null || _b === void 0 ? void 0 : _b.y) !== undefined ? NumberUtils_getRangeValue(data.position.y) : undefined
|
|
211
|
+
};
|
|
212
|
+
return calcExactPositionOrRandomFromSize({
|
|
213
|
+
size: data.size,
|
|
214
|
+
position: position
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
class Constants_Constants {}
|
|
218
|
+
Constants_Constants.generatedAttribute = "generated";
|
|
219
|
+
Constants_Constants.randomColorValue = "random";
|
|
220
|
+
Constants_Constants.midColorValue = "mid";
|
|
221
|
+
Constants_Constants.touchEndEvent = "touchend";
|
|
222
|
+
Constants_Constants.mouseDownEvent = "mousedown";
|
|
223
|
+
Constants_Constants.mouseUpEvent = "mouseup";
|
|
224
|
+
Constants_Constants.mouseMoveEvent = "mousemove";
|
|
225
|
+
Constants_Constants.touchStartEvent = "touchstart";
|
|
226
|
+
Constants_Constants.touchMoveEvent = "touchmove";
|
|
227
|
+
Constants_Constants.mouseLeaveEvent = "mouseleave";
|
|
228
|
+
Constants_Constants.mouseOutEvent = "mouseout";
|
|
229
|
+
Constants_Constants.touchCancelEvent = "touchcancel";
|
|
230
|
+
Constants_Constants.resizeEvent = "resize";
|
|
231
|
+
Constants_Constants.visibilityChangeEvent = "visibilitychange";
|
|
232
|
+
Constants_Constants.noPolygonDataLoaded = "No polygon data loaded.";
|
|
233
|
+
Constants_Constants.noPolygonFound = "No polygon found, you need to specify SVG url in config.";
|
|
4260
234
|
function rectSideBounce(pSide, pOtherSide, rectSide, rectOtherSide, velocity, factor) {
|
|
4261
235
|
const res = {
|
|
4262
236
|
bounced: false
|
|
4263
237
|
};
|
|
4264
|
-
if (pOtherSide.min
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
238
|
+
if (pOtherSide.min < rectOtherSide.min || pOtherSide.min > rectOtherSide.max || pOtherSide.max < rectOtherSide.min || pOtherSide.max > rectOtherSide.max) {
|
|
239
|
+
return res;
|
|
240
|
+
}
|
|
241
|
+
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) {
|
|
242
|
+
res.velocity = velocity * -factor;
|
|
243
|
+
res.bounced = true;
|
|
4269
244
|
}
|
|
4270
245
|
return res;
|
|
4271
246
|
}
|
|
4272
247
|
function checkSelector(element, selectors) {
|
|
4273
|
-
if (selectors instanceof Array) {
|
|
4274
|
-
for (const selector of selectors) {
|
|
4275
|
-
if (element.matches(selector)) {
|
|
4276
|
-
return true;
|
|
4277
|
-
}
|
|
4278
|
-
}
|
|
4279
|
-
return false;
|
|
4280
|
-
} else {
|
|
248
|
+
if (!(selectors instanceof Array)) {
|
|
4281
249
|
return element.matches(selectors);
|
|
4282
250
|
}
|
|
251
|
+
for (const selector of selectors) {
|
|
252
|
+
if (element.matches(selector)) {
|
|
253
|
+
return true;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return false;
|
|
4283
257
|
}
|
|
4284
|
-
function
|
|
258
|
+
function isSsr() {
|
|
4285
259
|
return typeof window === "undefined" || !window || typeof window.document === "undefined" || !window.document;
|
|
4286
260
|
}
|
|
4287
|
-
function
|
|
4288
|
-
return
|
|
261
|
+
function animate() {
|
|
262
|
+
return isSsr() ? callback => setTimeout(callback) : callback => (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || window.setTimeout)(callback);
|
|
4289
263
|
}
|
|
4290
|
-
function
|
|
4291
|
-
return
|
|
264
|
+
function cancelAnimation() {
|
|
265
|
+
return isSsr() ? handle => clearTimeout(handle) : handle => (window.cancelAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || window.clearTimeout)(handle);
|
|
4292
266
|
}
|
|
4293
|
-
function
|
|
267
|
+
function isInArray(value, array) {
|
|
4294
268
|
return value === array || array instanceof Array && array.indexOf(value) > -1;
|
|
4295
269
|
}
|
|
4296
270
|
async function loadFont(character) {
|
|
@@ -4302,7 +276,7 @@
|
|
|
4302
276
|
function arrayRandomIndex(array) {
|
|
4303
277
|
return Math.floor(Math.random() * array.length);
|
|
4304
278
|
}
|
|
4305
|
-
function
|
|
279
|
+
function itemFromArray(array, index, useIndex = true) {
|
|
4306
280
|
const fixedIndex = index !== undefined && useIndex ? index % array.length : arrayRandomIndex(array);
|
|
4307
281
|
return array[fixedIndex];
|
|
4308
282
|
}
|
|
@@ -4333,7 +307,7 @@
|
|
|
4333
307
|
top: point.y - radius
|
|
4334
308
|
};
|
|
4335
309
|
}
|
|
4336
|
-
function
|
|
310
|
+
function deepExtend(destination, ...sources) {
|
|
4337
311
|
for (const source of sources) {
|
|
4338
312
|
if (source === undefined || source === null) {
|
|
4339
313
|
continue;
|
|
@@ -4352,31 +326,26 @@
|
|
|
4352
326
|
if (key === "__proto__") {
|
|
4353
327
|
continue;
|
|
4354
328
|
}
|
|
4355
|
-
const sourceDict = source;
|
|
4356
|
-
|
|
4357
|
-
const isObject = typeof value === "object";
|
|
4358
|
-
const destDict = destination;
|
|
4359
|
-
destDict[key] = isObject && Array.isArray(value) ? value.map((v => Utils_deepExtend(destDict[key], v))) : Utils_deepExtend(destDict[key], value);
|
|
329
|
+
const sourceDict = source, value = sourceDict[key], isObject = typeof value === "object", destDict = destination;
|
|
330
|
+
destDict[key] = isObject && Array.isArray(value) ? value.map((v => deepExtend(destDict[key], v))) : deepExtend(destDict[key], value);
|
|
4360
331
|
}
|
|
4361
332
|
}
|
|
4362
333
|
return destination;
|
|
4363
334
|
}
|
|
4364
335
|
function isDivModeEnabled(mode, divs) {
|
|
4365
|
-
return divs instanceof Array ? !!divs.find((t => t.enable &&
|
|
336
|
+
return divs instanceof Array ? !!divs.find((t => t.enable && isInArray(mode, t.mode))) : isInArray(mode, divs.mode);
|
|
4366
337
|
}
|
|
4367
338
|
function divModeExecute(mode, divs, callback) {
|
|
4368
339
|
if (divs instanceof Array) {
|
|
4369
340
|
for (const div of divs) {
|
|
4370
|
-
const divMode = div.mode;
|
|
4371
|
-
|
|
4372
|
-
if (divEnabled && Utils_isInArray(mode, divMode)) {
|
|
341
|
+
const divMode = div.mode, divEnabled = div.enable;
|
|
342
|
+
if (divEnabled && isInArray(mode, divMode)) {
|
|
4373
343
|
singleDivModeExecute(div, callback);
|
|
4374
344
|
}
|
|
4375
345
|
}
|
|
4376
346
|
} else {
|
|
4377
|
-
const divMode = divs.mode;
|
|
4378
|
-
|
|
4379
|
-
if (divEnabled && Utils_isInArray(mode, divMode)) {
|
|
347
|
+
const divMode = divs.mode, divEnabled = divs.enable;
|
|
348
|
+
if (divEnabled && isInArray(mode, divMode)) {
|
|
4380
349
|
singleDivModeExecute(divs, callback);
|
|
4381
350
|
}
|
|
4382
351
|
}
|
|
@@ -4411,29 +380,18 @@
|
|
|
4411
380
|
};
|
|
4412
381
|
}
|
|
4413
382
|
function circleBounce(p1, p2) {
|
|
4414
|
-
const {x: xVelocityDiff, y: yVelocityDiff} = p1.velocity.sub(p2.velocity);
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
if (xVelocityDiff * xDist + yVelocityDiff * yDist >= 0) {
|
|
4418
|
-
const angle = -Math.atan2(yDist, xDist);
|
|
4419
|
-
const m1 = p1.mass;
|
|
4420
|
-
const m2 = p2.mass;
|
|
4421
|
-
const u1 = p1.velocity.rotate(angle);
|
|
4422
|
-
const u2 = p2.velocity.rotate(angle);
|
|
4423
|
-
const v1 = collisionVelocity(u1, u2, m1, m2);
|
|
4424
|
-
const v2 = collisionVelocity(u2, u1, m1, m2);
|
|
4425
|
-
const vFinal1 = v1.rotate(-angle);
|
|
4426
|
-
const vFinal2 = v2.rotate(-angle);
|
|
4427
|
-
p1.velocity.x = vFinal1.x * p1.factor.x;
|
|
4428
|
-
p1.velocity.y = vFinal1.y * p1.factor.y;
|
|
4429
|
-
p2.velocity.x = vFinal2.x * p2.factor.x;
|
|
4430
|
-
p2.velocity.y = vFinal2.y * p2.factor.y;
|
|
383
|
+
const {x: xVelocityDiff, y: yVelocityDiff} = p1.velocity.sub(p2.velocity), [pos1, pos2] = [ p1.position, p2.position ], {dx: xDist, dy: yDist} = getDistances(pos2, pos1);
|
|
384
|
+
if (xVelocityDiff * xDist + yVelocityDiff * yDist < 0) {
|
|
385
|
+
return;
|
|
4431
386
|
}
|
|
387
|
+
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);
|
|
388
|
+
p1.velocity.x = vFinal1.x * p1.factor.x;
|
|
389
|
+
p1.velocity.y = vFinal1.y * p1.factor.y;
|
|
390
|
+
p2.velocity.x = vFinal2.x * p2.factor.x;
|
|
391
|
+
p2.velocity.y = vFinal2.y * p2.factor.y;
|
|
4432
392
|
}
|
|
4433
393
|
function rectBounce(particle, divBounds) {
|
|
4434
|
-
const pPos = particle.getPosition();
|
|
4435
|
-
const size = particle.getRadius();
|
|
4436
|
-
const bounds = calculateBounds(pPos, size);
|
|
394
|
+
const pPos = particle.getPosition(), size = particle.getRadius(), bounds = calculateBounds(pPos, size);
|
|
4437
395
|
const resH = rectSideBounce({
|
|
4438
396
|
min: bounds.left,
|
|
4439
397
|
max: bounds.right
|
|
@@ -4537,7 +495,7 @@
|
|
|
4537
495
|
} : undefined;
|
|
4538
496
|
}
|
|
4539
497
|
}
|
|
4540
|
-
function
|
|
498
|
+
function colorToRgb(input, index, useIndex = true) {
|
|
4541
499
|
var _a, _b, _c;
|
|
4542
500
|
if (input === undefined) {
|
|
4543
501
|
return;
|
|
@@ -4547,20 +505,15 @@
|
|
|
4547
505
|
} : input;
|
|
4548
506
|
let res;
|
|
4549
507
|
if (typeof color.value === "string") {
|
|
4550
|
-
|
|
4551
|
-
res = getRandomRgbColor();
|
|
4552
|
-
} else {
|
|
4553
|
-
res = stringToRgb(color.value);
|
|
4554
|
-
}
|
|
508
|
+
res = color.value === Constants_Constants.randomColorValue ? getRandomRgbColor() : stringToRgb(color.value);
|
|
4555
509
|
} else {
|
|
4556
510
|
if (color.value instanceof Array) {
|
|
4557
|
-
const colorSelected =
|
|
4558
|
-
res =
|
|
511
|
+
const colorSelected = itemFromArray(color.value, index, useIndex);
|
|
512
|
+
res = colorToRgb({
|
|
4559
513
|
value: colorSelected
|
|
4560
514
|
});
|
|
4561
515
|
} else {
|
|
4562
|
-
const colorValue = color.value;
|
|
4563
|
-
const rgbColor = (_a = colorValue.rgb) !== null && _a !== void 0 ? _a : color.value;
|
|
516
|
+
const colorValue = color.value, rgbColor = (_a = colorValue.rgb) !== null && _a !== void 0 ? _a : color.value;
|
|
4564
517
|
if (rgbColor.r !== undefined) {
|
|
4565
518
|
res = rgbColor;
|
|
4566
519
|
} else {
|
|
@@ -4578,22 +531,19 @@
|
|
|
4578
531
|
}
|
|
4579
532
|
return res;
|
|
4580
533
|
}
|
|
4581
|
-
function
|
|
4582
|
-
const rgb =
|
|
534
|
+
function colorToHsl(color, index, useIndex = true) {
|
|
535
|
+
const rgb = colorToRgb(color, index, useIndex);
|
|
4583
536
|
return rgb !== undefined ? rgbToHsl(rgb) : undefined;
|
|
4584
537
|
}
|
|
4585
538
|
function rgbToHsl(color) {
|
|
4586
|
-
const r1 = color.r / 255;
|
|
4587
|
-
const g1 =
|
|
4588
|
-
const b1 = color.b / 255;
|
|
4589
|
-
const max = Math.max(r1, g1, b1);
|
|
4590
|
-
const min = Math.min(r1, g1, b1);
|
|
539
|
+
const r1 = color.r / 255, g1 = color.g / 255, b1 = color.b / 255;
|
|
540
|
+
const max = Math.max(r1, g1, b1), min = Math.min(r1, g1, b1);
|
|
4591
541
|
const res = {
|
|
4592
542
|
h: 0,
|
|
4593
543
|
l: (max + min) / 2,
|
|
4594
544
|
s: 0
|
|
4595
545
|
};
|
|
4596
|
-
if (max
|
|
546
|
+
if (max !== min) {
|
|
4597
547
|
res.s = res.l < .5 ? (max - min) / (max + min) : (max - min) / (2 - max - min);
|
|
4598
548
|
res.h = r1 === max ? (g1 - b1) / (max - min) : res.h = g1 === max ? 2 + (b1 - r1) / (max - min) : 4 + (r1 - g1) / (max - min);
|
|
4599
549
|
}
|
|
@@ -4617,8 +567,7 @@
|
|
|
4617
567
|
b: 0,
|
|
4618
568
|
g: 0,
|
|
4619
569
|
r: 0
|
|
4620
|
-
}
|
|
4621
|
-
const hslPercent = {
|
|
570
|
+
}, hslPercent = {
|
|
4622
571
|
h: hsl.h / 360,
|
|
4623
572
|
l: hsl.l / 100,
|
|
4624
573
|
s: hsl.s / 100
|
|
@@ -4628,8 +577,7 @@
|
|
|
4628
577
|
result.g = hslPercent.l;
|
|
4629
578
|
result.r = hslPercent.l;
|
|
4630
579
|
} else {
|
|
4631
|
-
const q = hslPercent.l < .5 ? hslPercent.l * (1 + hslPercent.s) : hslPercent.l + hslPercent.s - hslPercent.l * hslPercent.s;
|
|
4632
|
-
const p = 2 * hslPercent.l - q;
|
|
580
|
+
const q = hslPercent.l < .5 ? hslPercent.l * (1 + hslPercent.s) : hslPercent.l + hslPercent.s - hslPercent.l * hslPercent.s, p = 2 * hslPercent.l - q;
|
|
4633
581
|
result.r = hue2rgb(p, q, hslPercent.h + 1 / 3);
|
|
4634
582
|
result.g = hue2rgb(p, q, hslPercent.h);
|
|
4635
583
|
result.b = hue2rgb(p, q, hslPercent.h - 1 / 3);
|
|
@@ -4649,8 +597,7 @@
|
|
|
4649
597
|
};
|
|
4650
598
|
}
|
|
4651
599
|
function hslToHsv(hsl) {
|
|
4652
|
-
const l = hsl.l / 100, sl = hsl.s / 100;
|
|
4653
|
-
const v = l + sl * Math.min(l, 1 - l), sv = !v ? 0 : 2 * (1 - l / v);
|
|
600
|
+
const l = hsl.l / 100, sl = hsl.s / 100, v = l + sl * Math.min(l, 1 - l), sv = !v ? 0 : 2 * (1 - l / v);
|
|
4654
601
|
return {
|
|
4655
602
|
h: hsl.h,
|
|
4656
603
|
s: sv * 100,
|
|
@@ -4667,8 +614,7 @@
|
|
|
4667
614
|
};
|
|
4668
615
|
}
|
|
4669
616
|
function hsvToHsl(hsv) {
|
|
4670
|
-
const v = hsv.v / 100, sv = hsv.s / 100;
|
|
4671
|
-
const l = v * (1 - sv / 2), sl = l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l);
|
|
617
|
+
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);
|
|
4672
618
|
return {
|
|
4673
619
|
h: hsv.h,
|
|
4674
620
|
l: l * 100,
|
|
@@ -4689,8 +635,7 @@
|
|
|
4689
635
|
b: 0,
|
|
4690
636
|
g: 0,
|
|
4691
637
|
r: 0
|
|
4692
|
-
}
|
|
4693
|
-
const hsvPercent = {
|
|
638
|
+
}, hsvPercent = {
|
|
4694
639
|
h: hsv.h / 60,
|
|
4695
640
|
s: hsv.s / 100,
|
|
4696
641
|
v: hsv.v / 100
|
|
@@ -4784,23 +729,22 @@
|
|
|
4784
729
|
function getRandomRgbColor(min) {
|
|
4785
730
|
const fixedMin = min !== null && min !== void 0 ? min : 0;
|
|
4786
731
|
return {
|
|
4787
|
-
b: Math.floor(
|
|
4788
|
-
g: Math.floor(
|
|
4789
|
-
r: Math.floor(
|
|
732
|
+
b: Math.floor(randomInRange(setRangeValue(fixedMin, 256))),
|
|
733
|
+
g: Math.floor(randomInRange(setRangeValue(fixedMin, 256))),
|
|
734
|
+
r: Math.floor(randomInRange(setRangeValue(fixedMin, 256)))
|
|
4790
735
|
};
|
|
4791
736
|
}
|
|
4792
|
-
function
|
|
737
|
+
function getStyleFromRgb(color, opacity) {
|
|
4793
738
|
return `rgba(${color.r}, ${color.g}, ${color.b}, ${opacity !== null && opacity !== void 0 ? opacity : 1})`;
|
|
4794
739
|
}
|
|
4795
|
-
function
|
|
740
|
+
function getStyleFromHsl(color, opacity) {
|
|
4796
741
|
return `hsla(${color.h}, ${color.s}%, ${color.l}%, ${opacity !== null && opacity !== void 0 ? opacity : 1})`;
|
|
4797
742
|
}
|
|
4798
743
|
function getStyleFromHsv(color, opacity) {
|
|
4799
|
-
return
|
|
744
|
+
return getStyleFromHsl(hsvToHsl(color), opacity);
|
|
4800
745
|
}
|
|
4801
|
-
function
|
|
4802
|
-
let rgb1 = color1;
|
|
4803
|
-
let rgb2 = color2;
|
|
746
|
+
function colorMix(color1, color2, size1, size2) {
|
|
747
|
+
let rgb1 = color1, rgb2 = color2;
|
|
4804
748
|
if (rgb1.r === undefined) {
|
|
4805
749
|
rgb1 = hslToRgb(color1);
|
|
4806
750
|
}
|
|
@@ -4818,10 +762,9 @@
|
|
|
4818
762
|
if (linkColor === Constants.randomColorValue) {
|
|
4819
763
|
return getRandomRgbColor();
|
|
4820
764
|
} else if (linkColor === "mid") {
|
|
4821
|
-
const sourceColor = (_a = p1.getFillColor()) !== null && _a !== void 0 ? _a : p1.getStrokeColor();
|
|
4822
|
-
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();
|
|
765
|
+
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();
|
|
4823
766
|
if (sourceColor && destColor && p2) {
|
|
4824
|
-
return
|
|
767
|
+
return colorMix(sourceColor, destColor, p1.getRadius(), p2.getRadius());
|
|
4825
768
|
} else {
|
|
4826
769
|
const hslColor = sourceColor !== null && sourceColor !== void 0 ? sourceColor : destColor;
|
|
4827
770
|
if (hslColor) {
|
|
@@ -4836,7 +779,7 @@
|
|
|
4836
779
|
const color = typeof optColor === "string" ? optColor : optColor.value;
|
|
4837
780
|
if (color === Constants.randomColorValue) {
|
|
4838
781
|
if (consent) {
|
|
4839
|
-
return
|
|
782
|
+
return colorToRgb({
|
|
4840
783
|
value: color
|
|
4841
784
|
});
|
|
4842
785
|
} else if (blink) {
|
|
@@ -4845,12 +788,12 @@
|
|
|
4845
788
|
return Constants.midColorValue;
|
|
4846
789
|
}
|
|
4847
790
|
} else {
|
|
4848
|
-
return
|
|
791
|
+
return colorToRgb({
|
|
4849
792
|
value: color
|
|
4850
793
|
});
|
|
4851
794
|
}
|
|
4852
795
|
}
|
|
4853
|
-
function
|
|
796
|
+
function getHslFromAnimation(animation) {
|
|
4854
797
|
return animation !== undefined ? {
|
|
4855
798
|
h: animation.h.value,
|
|
4856
799
|
s: animation.s.value,
|
|
@@ -4895,284 +838,6 @@
|
|
|
4895
838
|
colorValue.velocity = 0;
|
|
4896
839
|
}
|
|
4897
840
|
}
|
|
4898
|
-
function drawLine(context, begin, end) {
|
|
4899
|
-
context.beginPath();
|
|
4900
|
-
context.moveTo(begin.x, begin.y);
|
|
4901
|
-
context.lineTo(end.x, end.y);
|
|
4902
|
-
context.closePath();
|
|
4903
|
-
}
|
|
4904
|
-
function drawTriangle(context, p1, p2, p3) {
|
|
4905
|
-
context.beginPath();
|
|
4906
|
-
context.moveTo(p1.x, p1.y);
|
|
4907
|
-
context.lineTo(p2.x, p2.y);
|
|
4908
|
-
context.lineTo(p3.x, p3.y);
|
|
4909
|
-
context.closePath();
|
|
4910
|
-
}
|
|
4911
|
-
function CanvasUtils_paintBase(context, dimension, baseColor) {
|
|
4912
|
-
context.save();
|
|
4913
|
-
context.fillStyle = baseColor !== null && baseColor !== void 0 ? baseColor : "rgba(0,0,0,0)";
|
|
4914
|
-
context.fillRect(0, 0, dimension.width, dimension.height);
|
|
4915
|
-
context.restore();
|
|
4916
|
-
}
|
|
4917
|
-
function CanvasUtils_clear(context, dimension) {
|
|
4918
|
-
context.clearRect(0, 0, dimension.width, dimension.height);
|
|
4919
|
-
}
|
|
4920
|
-
function drawLinkLine(context, width, begin, end, maxDistance, canvasSize, warp, backgroundMask, composite, colorLine, opacity, shadow) {
|
|
4921
|
-
let drawn = false;
|
|
4922
|
-
if (getDistance(begin, end) <= maxDistance) {
|
|
4923
|
-
drawLine(context, begin, end);
|
|
4924
|
-
drawn = true;
|
|
4925
|
-
} else if (warp) {
|
|
4926
|
-
let pi1;
|
|
4927
|
-
let pi2;
|
|
4928
|
-
const endNE = {
|
|
4929
|
-
x: end.x - canvasSize.width,
|
|
4930
|
-
y: end.y
|
|
4931
|
-
};
|
|
4932
|
-
const d1 = getDistances(begin, endNE);
|
|
4933
|
-
if (d1.distance <= maxDistance) {
|
|
4934
|
-
const yi = begin.y - d1.dy / d1.dx * begin.x;
|
|
4935
|
-
pi1 = {
|
|
4936
|
-
x: 0,
|
|
4937
|
-
y: yi
|
|
4938
|
-
};
|
|
4939
|
-
pi2 = {
|
|
4940
|
-
x: canvasSize.width,
|
|
4941
|
-
y: yi
|
|
4942
|
-
};
|
|
4943
|
-
} else {
|
|
4944
|
-
const endSW = {
|
|
4945
|
-
x: end.x,
|
|
4946
|
-
y: end.y - canvasSize.height
|
|
4947
|
-
};
|
|
4948
|
-
const d2 = getDistances(begin, endSW);
|
|
4949
|
-
if (d2.distance <= maxDistance) {
|
|
4950
|
-
const yi = begin.y - d2.dy / d2.dx * begin.x;
|
|
4951
|
-
const xi = -yi / (d2.dy / d2.dx);
|
|
4952
|
-
pi1 = {
|
|
4953
|
-
x: xi,
|
|
4954
|
-
y: 0
|
|
4955
|
-
};
|
|
4956
|
-
pi2 = {
|
|
4957
|
-
x: xi,
|
|
4958
|
-
y: canvasSize.height
|
|
4959
|
-
};
|
|
4960
|
-
} else {
|
|
4961
|
-
const endSE = {
|
|
4962
|
-
x: end.x - canvasSize.width,
|
|
4963
|
-
y: end.y - canvasSize.height
|
|
4964
|
-
};
|
|
4965
|
-
const d3 = getDistances(begin, endSE);
|
|
4966
|
-
if (d3.distance <= maxDistance) {
|
|
4967
|
-
const yi = begin.y - d3.dy / d3.dx * begin.x;
|
|
4968
|
-
const xi = -yi / (d3.dy / d3.dx);
|
|
4969
|
-
pi1 = {
|
|
4970
|
-
x: xi,
|
|
4971
|
-
y: yi
|
|
4972
|
-
};
|
|
4973
|
-
pi2 = {
|
|
4974
|
-
x: pi1.x + canvasSize.width,
|
|
4975
|
-
y: pi1.y + canvasSize.height
|
|
4976
|
-
};
|
|
4977
|
-
}
|
|
4978
|
-
}
|
|
4979
|
-
}
|
|
4980
|
-
if (pi1 && pi2) {
|
|
4981
|
-
drawLine(context, begin, pi1);
|
|
4982
|
-
drawLine(context, end, pi2);
|
|
4983
|
-
drawn = true;
|
|
4984
|
-
}
|
|
4985
|
-
}
|
|
4986
|
-
if (!drawn) {
|
|
4987
|
-
return;
|
|
4988
|
-
}
|
|
4989
|
-
context.lineWidth = width;
|
|
4990
|
-
if (backgroundMask) {
|
|
4991
|
-
context.globalCompositeOperation = composite;
|
|
4992
|
-
}
|
|
4993
|
-
context.strokeStyle = getStyleFromRgb(colorLine, opacity);
|
|
4994
|
-
if (shadow.enable) {
|
|
4995
|
-
const shadowColor = colorToRgb(shadow.color);
|
|
4996
|
-
if (shadowColor) {
|
|
4997
|
-
context.shadowBlur = shadow.blur;
|
|
4998
|
-
context.shadowColor = getStyleFromRgb(shadowColor);
|
|
4999
|
-
}
|
|
5000
|
-
}
|
|
5001
|
-
context.stroke();
|
|
5002
|
-
}
|
|
5003
|
-
function drawLinkTriangle(context, pos1, pos2, pos3, backgroundMask, composite, colorTriangle, opacityTriangle) {
|
|
5004
|
-
drawTriangle(context, pos1, pos2, pos3);
|
|
5005
|
-
if (backgroundMask) {
|
|
5006
|
-
context.globalCompositeOperation = composite;
|
|
5007
|
-
}
|
|
5008
|
-
context.fillStyle = getStyleFromRgb(colorTriangle, opacityTriangle);
|
|
5009
|
-
context.fill();
|
|
5010
|
-
}
|
|
5011
|
-
function CanvasUtils_drawConnectLine(context, width, lineStyle, begin, end) {
|
|
5012
|
-
context.save();
|
|
5013
|
-
drawLine(context, begin, end);
|
|
5014
|
-
context.lineWidth = width;
|
|
5015
|
-
context.strokeStyle = lineStyle;
|
|
5016
|
-
context.stroke();
|
|
5017
|
-
context.restore();
|
|
5018
|
-
}
|
|
5019
|
-
function CanvasUtils_gradient(context, p1, p2, opacity) {
|
|
5020
|
-
const gradStop = Math.floor(p2.getRadius() / p1.getRadius());
|
|
5021
|
-
const color1 = p1.getFillColor();
|
|
5022
|
-
const color2 = p2.getFillColor();
|
|
5023
|
-
if (!color1 || !color2) {
|
|
5024
|
-
return;
|
|
5025
|
-
}
|
|
5026
|
-
const sourcePos = p1.getPosition();
|
|
5027
|
-
const destPos = p2.getPosition();
|
|
5028
|
-
const midRgb = colorMix(color1, color2, p1.getRadius(), p2.getRadius());
|
|
5029
|
-
const grad = context.createLinearGradient(sourcePos.x, sourcePos.y, destPos.x, destPos.y);
|
|
5030
|
-
grad.addColorStop(0, getStyleFromHsl(color1, opacity));
|
|
5031
|
-
grad.addColorStop(gradStop > 1 ? 1 : gradStop, getStyleFromRgb(midRgb, opacity));
|
|
5032
|
-
grad.addColorStop(1, getStyleFromHsl(color2, opacity));
|
|
5033
|
-
return grad;
|
|
5034
|
-
}
|
|
5035
|
-
function CanvasUtils_drawGrabLine(context, width, begin, end, colorLine, opacity) {
|
|
5036
|
-
context.save();
|
|
5037
|
-
drawLine(context, begin, end);
|
|
5038
|
-
context.strokeStyle = getStyleFromRgb(colorLine, opacity);
|
|
5039
|
-
context.lineWidth = width;
|
|
5040
|
-
context.stroke();
|
|
5041
|
-
context.restore();
|
|
5042
|
-
}
|
|
5043
|
-
function CanvasUtils_drawParticle(container, context, particle, delta, fillColorValue, strokeColorValue, backgroundMask, composite, radius, opacity, shadow, gradient) {
|
|
5044
|
-
var _a, _b, _c, _d, _e, _f;
|
|
5045
|
-
const pos = particle.getPosition();
|
|
5046
|
-
const tiltOptions = particle.options.tilt;
|
|
5047
|
-
const rollOptions = particle.options.roll;
|
|
5048
|
-
context.save();
|
|
5049
|
-
if (tiltOptions.enable || rollOptions.enable) {
|
|
5050
|
-
const roll = rollOptions.enable && particle.roll;
|
|
5051
|
-
const tilt = tiltOptions.enable && particle.tilt;
|
|
5052
|
-
const rollHorizontal = roll && (rollOptions.mode === "horizontal" || rollOptions.mode === "both");
|
|
5053
|
-
const rollVertical = roll && (rollOptions.mode === "vertical" || rollOptions.mode === "both");
|
|
5054
|
-
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);
|
|
5055
|
-
} else {
|
|
5056
|
-
context.translate(pos.x, pos.y);
|
|
5057
|
-
}
|
|
5058
|
-
context.beginPath();
|
|
5059
|
-
const angle = ((_b = (_a = particle.rotate) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0) + (particle.options.rotate.path ? particle.velocity.angle : 0);
|
|
5060
|
-
if (angle !== 0) {
|
|
5061
|
-
context.rotate(angle);
|
|
5062
|
-
}
|
|
5063
|
-
if (backgroundMask) {
|
|
5064
|
-
context.globalCompositeOperation = composite;
|
|
5065
|
-
}
|
|
5066
|
-
const shadowColor = particle.shadowColor;
|
|
5067
|
-
if (shadow.enable && shadowColor) {
|
|
5068
|
-
context.shadowBlur = shadow.blur;
|
|
5069
|
-
context.shadowColor = getStyleFromRgb(shadowColor);
|
|
5070
|
-
context.shadowOffsetX = shadow.offset.x;
|
|
5071
|
-
context.shadowOffsetY = shadow.offset.y;
|
|
5072
|
-
}
|
|
5073
|
-
if (gradient) {
|
|
5074
|
-
const gradientAngle = gradient.angle.value;
|
|
5075
|
-
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);
|
|
5076
|
-
for (const color of gradient.colors) {
|
|
5077
|
-
fillGradient.addColorStop(color.stop, getStyleFromHsl({
|
|
5078
|
-
h: color.value.h.value,
|
|
5079
|
-
s: color.value.s.value,
|
|
5080
|
-
l: color.value.l.value
|
|
5081
|
-
}, (_d = (_c = color.opacity) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : opacity));
|
|
5082
|
-
}
|
|
5083
|
-
context.fillStyle = fillGradient;
|
|
5084
|
-
} else {
|
|
5085
|
-
if (fillColorValue) {
|
|
5086
|
-
context.fillStyle = fillColorValue;
|
|
5087
|
-
}
|
|
5088
|
-
}
|
|
5089
|
-
const stroke = particle.stroke;
|
|
5090
|
-
context.lineWidth = (_e = particle.strokeWidth) !== null && _e !== void 0 ? _e : 0;
|
|
5091
|
-
if (strokeColorValue) {
|
|
5092
|
-
context.strokeStyle = strokeColorValue;
|
|
5093
|
-
}
|
|
5094
|
-
drawShape(container, context, particle, radius, opacity, delta);
|
|
5095
|
-
if (((_f = stroke === null || stroke === void 0 ? void 0 : stroke.width) !== null && _f !== void 0 ? _f : 0) > 0) {
|
|
5096
|
-
context.stroke();
|
|
5097
|
-
}
|
|
5098
|
-
if (particle.close) {
|
|
5099
|
-
context.closePath();
|
|
5100
|
-
}
|
|
5101
|
-
if (particle.fill) {
|
|
5102
|
-
context.fill();
|
|
5103
|
-
}
|
|
5104
|
-
context.restore();
|
|
5105
|
-
context.save();
|
|
5106
|
-
if (tiltOptions.enable && particle.tilt) {
|
|
5107
|
-
context.setTransform(1, Math.cos(particle.tilt.value) * particle.tilt.cosDirection, Math.sin(particle.tilt.value) * particle.tilt.sinDirection, 1, pos.x, pos.y);
|
|
5108
|
-
} else {
|
|
5109
|
-
context.translate(pos.x, pos.y);
|
|
5110
|
-
}
|
|
5111
|
-
if (angle !== 0) {
|
|
5112
|
-
context.rotate(angle);
|
|
5113
|
-
}
|
|
5114
|
-
if (backgroundMask) {
|
|
5115
|
-
context.globalCompositeOperation = composite;
|
|
5116
|
-
}
|
|
5117
|
-
drawShapeAfterEffect(container, context, particle, radius, opacity, delta);
|
|
5118
|
-
context.restore();
|
|
5119
|
-
}
|
|
5120
|
-
function drawShape(container, context, particle, radius, opacity, delta) {
|
|
5121
|
-
if (!particle.shape) {
|
|
5122
|
-
return;
|
|
5123
|
-
}
|
|
5124
|
-
const drawer = container.drawers.get(particle.shape);
|
|
5125
|
-
if (!drawer) {
|
|
5126
|
-
return;
|
|
5127
|
-
}
|
|
5128
|
-
drawer.draw(context, particle, radius, opacity, delta, container.retina.pixelRatio);
|
|
5129
|
-
}
|
|
5130
|
-
function drawShapeAfterEffect(container, context, particle, radius, opacity, delta) {
|
|
5131
|
-
if (!particle.shape) {
|
|
5132
|
-
return;
|
|
5133
|
-
}
|
|
5134
|
-
const drawer = container.drawers.get(particle.shape);
|
|
5135
|
-
if (!(drawer === null || drawer === void 0 ? void 0 : drawer.afterEffect)) {
|
|
5136
|
-
return;
|
|
5137
|
-
}
|
|
5138
|
-
drawer.afterEffect(context, particle, radius, opacity, delta, container.retina.pixelRatio);
|
|
5139
|
-
}
|
|
5140
|
-
function CanvasUtils_drawPlugin(context, plugin, delta) {
|
|
5141
|
-
if (!plugin.draw) {
|
|
5142
|
-
return;
|
|
5143
|
-
}
|
|
5144
|
-
context.save();
|
|
5145
|
-
plugin.draw(context, delta);
|
|
5146
|
-
context.restore();
|
|
5147
|
-
}
|
|
5148
|
-
function CanvasUtils_drawParticlePlugin(context, plugin, particle, delta) {
|
|
5149
|
-
if (plugin.drawParticle !== undefined) {
|
|
5150
|
-
context.save();
|
|
5151
|
-
plugin.drawParticle(context, particle, delta);
|
|
5152
|
-
context.restore();
|
|
5153
|
-
}
|
|
5154
|
-
}
|
|
5155
|
-
function drawEllipse(context, particle, fillColorValue, radius, opacity, width, rotation, start, end) {
|
|
5156
|
-
const pos = particle.getPosition();
|
|
5157
|
-
if (fillColorValue) {
|
|
5158
|
-
context.strokeStyle = getStyleFromHsl(fillColorValue, opacity);
|
|
5159
|
-
}
|
|
5160
|
-
if (width === 0) {
|
|
5161
|
-
return;
|
|
5162
|
-
}
|
|
5163
|
-
context.lineWidth = width;
|
|
5164
|
-
const rotationRadian = rotation * Math.PI / 180;
|
|
5165
|
-
context.beginPath();
|
|
5166
|
-
context.ellipse(pos.x, pos.y, radius / 2, radius * 2, rotationRadian, start, end);
|
|
5167
|
-
context.stroke();
|
|
5168
|
-
}
|
|
5169
|
-
function CanvasUtils_alterHsl(color, type, value) {
|
|
5170
|
-
return {
|
|
5171
|
-
h: color.h,
|
|
5172
|
-
s: color.s,
|
|
5173
|
-
l: color.l + (type === "darken" ? -1 : 1) * value
|
|
5174
|
-
};
|
|
5175
|
-
}
|
|
5176
841
|
function updateRoll(particle, delta) {
|
|
5177
842
|
const roll = particle.options.roll;
|
|
5178
843
|
if (!particle.roll || !roll.enable) {
|
|
@@ -5194,7 +859,7 @@
|
|
|
5194
859
|
speed: NumberUtils_getRangeValue(rollOpt.speed) / 360
|
|
5195
860
|
};
|
|
5196
861
|
if (rollOpt.backColor) {
|
|
5197
|
-
particle.backColor =
|
|
862
|
+
particle.backColor = colorToHsl(rollOpt.backColor);
|
|
5198
863
|
} else if (rollOpt.darken.enable && rollOpt.enlighten.enable) {
|
|
5199
864
|
const alterType = Math.random() >= .5 ? "darken" : "enlighten";
|
|
5200
865
|
particle.roll.alter = {
|