tsparticles 1.40.2 → 1.41.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/Core/Container.d.ts +1 -1
- package/Core/Container.js +7 -21
- package/browser/Core/Container.d.ts +1 -1
- package/browser/Core/Container.js +7 -21
- package/esm/Core/Container.d.ts +1 -1
- package/esm/Core/Container.js +7 -21
- package/package.json +1 -1
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/tsparticles.engine.js +7 -21
- package/tsparticles.engine.min.js +2 -2
- package/tsparticles.interaction.external.attract.js +7 -21
- package/tsparticles.interaction.external.attract.min.js +1 -1
- package/tsparticles.interaction.external.bounce.js +7 -21
- package/tsparticles.interaction.external.bounce.min.js +1 -1
- package/tsparticles.interaction.external.bubble.js +7 -21
- package/tsparticles.interaction.external.bubble.min.js +1 -1
- package/tsparticles.interaction.external.connect.js +7 -21
- package/tsparticles.interaction.external.connect.min.js +1 -1
- package/tsparticles.interaction.external.grab.js +7 -21
- package/tsparticles.interaction.external.grab.min.js +1 -1
- package/tsparticles.interaction.external.repulse.js +7 -21
- package/tsparticles.interaction.external.repulse.min.js +1 -1
- package/tsparticles.interaction.external.trail.js +7 -21
- package/tsparticles.interaction.external.trail.min.js +1 -1
- package/tsparticles.interaction.particles.attract.js +7 -21
- package/tsparticles.interaction.particles.attract.min.js +1 -1
- package/tsparticles.interaction.particles.collisions.js +7 -21
- package/tsparticles.interaction.particles.collisions.min.js +1 -1
- package/tsparticles.interaction.particles.links.js +7 -21
- package/tsparticles.interaction.particles.links.min.js +1 -1
- package/tsparticles.js +7 -21
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.min.js +1 -1
- package/tsparticles.plugins.absorbers.js +7 -21
- package/tsparticles.plugins.absorbers.min.js +1 -1
- package/tsparticles.plugins.emitters.js +7 -21
- package/tsparticles.plugins.emitters.min.js +1 -1
- package/tsparticles.plugins.polygonMask.js +7 -21
- package/tsparticles.plugins.polygonMask.min.js +1 -1
- package/tsparticles.shape.circle.min.js +1 -1
- package/tsparticles.shape.image.js +7 -21
- package/tsparticles.shape.image.min.js +1 -1
- 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 +7 -21
- package/tsparticles.shape.text.min.js +1 -1
- package/tsparticles.slim.js +7 -21
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.updater.angle.js +7 -21
- package/tsparticles.updater.angle.min.js +1 -1
- package/tsparticles.updater.color.js +7 -21
- package/tsparticles.updater.color.min.js +1 -1
- package/tsparticles.updater.life.js +7 -21
- package/tsparticles.updater.life.min.js +1 -1
- package/tsparticles.updater.opacity.js +7 -21
- package/tsparticles.updater.opacity.min.js +1 -1
- package/tsparticles.updater.outModes.js +7 -21
- package/tsparticles.updater.outModes.min.js +1 -1
- package/tsparticles.updater.roll.js +7 -21
- package/tsparticles.updater.roll.min.js +1 -1
- package/tsparticles.updater.size.js +7 -21
- package/tsparticles.updater.size.min.js +1 -1
- package/tsparticles.updater.strokeColor.js +7 -21
- package/tsparticles.updater.strokeColor.min.js +1 -1
- package/tsparticles.updater.tilt.js +7 -21
- package/tsparticles.updater.tilt.min.js +1 -1
- package/tsparticles.updater.wobble.js +7 -21
- package/tsparticles.updater.wobble.min.js +1 -1
- package/umd/Core/Canvas.d.ts +35 -0
- package/umd/Core/Canvas.js +328 -0
- package/umd/Core/Container.d.ts +68 -0
- package/umd/Core/Container.js +405 -0
- package/umd/Core/Interfaces/Colors.d.ts +33 -0
- package/umd/Core/Interfaces/Colors.js +12 -0
- package/umd/Core/Interfaces/Gradients.d.ts +21 -0
- package/umd/Core/Interfaces/Gradients.js +12 -0
- package/umd/Core/Interfaces/IAttract.d.ts +7 -0
- package/umd/Core/Interfaces/IAttract.js +12 -0
- package/umd/Core/Interfaces/IBounds.d.ts +6 -0
- package/umd/Core/Interfaces/IBounds.js +12 -0
- package/umd/Core/Interfaces/IBubble.d.ts +4 -0
- package/umd/Core/Interfaces/IBubble.js +12 -0
- package/umd/Core/Interfaces/IBubbleParticleData.d.ts +9 -0
- package/umd/Core/Interfaces/IBubbleParticleData.js +12 -0
- package/umd/Core/Interfaces/ICircleBouncer.d.ts +9 -0
- package/umd/Core/Interfaces/ICircleBouncer.js +12 -0
- package/umd/Core/Interfaces/IContainerInteractivity.d.ts +6 -0
- package/umd/Core/Interfaces/IContainerInteractivity.js +12 -0
- package/umd/Core/Interfaces/IContainerPlugin.d.ts +32 -0
- package/umd/Core/Interfaces/IContainerPlugin.js +12 -0
- package/umd/Core/Interfaces/ICoordinates.d.ts +7 -0
- package/umd/Core/Interfaces/ICoordinates.js +12 -0
- package/umd/Core/Interfaces/IDelta.d.ts +4 -0
- package/umd/Core/Interfaces/IDelta.js +12 -0
- package/umd/Core/Interfaces/IDimension.d.ts +4 -0
- package/umd/Core/Interfaces/IDimension.js +12 -0
- package/umd/Core/Interfaces/IDistance.d.ts +4 -0
- package/umd/Core/Interfaces/IDistance.js +12 -0
- package/umd/Core/Interfaces/IExternalInteractor.d.ts +6 -0
- package/umd/Core/Interfaces/IExternalInteractor.js +12 -0
- package/umd/Core/Interfaces/IInteractor.d.ts +6 -0
- package/umd/Core/Interfaces/IInteractor.js +12 -0
- package/umd/Core/Interfaces/IMouseData.d.ts +9 -0
- package/umd/Core/Interfaces/IMouseData.js +12 -0
- package/umd/Core/Interfaces/IMovePathGenerator.d.ts +8 -0
- package/umd/Core/Interfaces/IMovePathGenerator.js +12 -0
- package/umd/Core/Interfaces/IParticle.d.ts +55 -0
- package/umd/Core/Interfaces/IParticle.js +12 -0
- package/umd/Core/Interfaces/IParticleGradientAnimation.d.ts +8 -0
- package/umd/Core/Interfaces/IParticleGradientAnimation.js +12 -0
- package/umd/Core/Interfaces/IParticleGradientColorAnimation.d.ts +7 -0
- package/umd/Core/Interfaces/IParticleGradientColorAnimation.js +12 -0
- package/umd/Core/Interfaces/IParticleHslAnimation.d.ts +6 -0
- package/umd/Core/Interfaces/IParticleHslAnimation.js +12 -0
- package/umd/Core/Interfaces/IParticleLife.d.ts +7 -0
- package/umd/Core/Interfaces/IParticleLife.js +12 -0
- package/umd/Core/Interfaces/IParticleLoops.d.ts +4 -0
- package/umd/Core/Interfaces/IParticleLoops.js +12 -0
- package/umd/Core/Interfaces/IParticleRetinaProps.d.ts +12 -0
- package/umd/Core/Interfaces/IParticleRetinaProps.js +12 -0
- package/umd/Core/Interfaces/IParticleRoll.d.ts +9 -0
- package/umd/Core/Interfaces/IParticleRoll.js +12 -0
- package/umd/Core/Interfaces/IParticleSpin.d.ts +9 -0
- package/umd/Core/Interfaces/IParticleSpin.js +12 -0
- package/umd/Core/Interfaces/IParticleUpdater.d.ts +9 -0
- package/umd/Core/Interfaces/IParticleUpdater.js +12 -0
- package/umd/Core/Interfaces/IParticleValueAnimation.d.ts +17 -0
- package/umd/Core/Interfaces/IParticleValueAnimation.js +12 -0
- package/umd/Core/Interfaces/IParticleWobble.d.ts +4 -0
- package/umd/Core/Interfaces/IParticleWobble.js +12 -0
- package/umd/Core/Interfaces/IParticlesFrequencies.d.ts +4 -0
- package/umd/Core/Interfaces/IParticlesFrequencies.js +12 -0
- package/umd/Core/Interfaces/IParticlesInteractor.d.ts +7 -0
- package/umd/Core/Interfaces/IParticlesInteractor.js +12 -0
- package/umd/Core/Interfaces/IPlugin.d.ts +11 -0
- package/umd/Core/Interfaces/IPlugin.js +12 -0
- package/umd/Core/Interfaces/IRangeValue.d.ts +4 -0
- package/umd/Core/Interfaces/IRangeValue.js +12 -0
- package/umd/Core/Interfaces/IRectSideResult.d.ts +5 -0
- package/umd/Core/Interfaces/IRectSideResult.js +12 -0
- package/umd/Core/Interfaces/IRepulse.d.ts +7 -0
- package/umd/Core/Interfaces/IRepulse.js +12 -0
- package/umd/Core/Interfaces/IShapeDrawer.d.ts +10 -0
- package/umd/Core/Interfaces/IShapeDrawer.js +12 -0
- package/umd/Core/Interfaces/IShapeValues.d.ts +8 -0
- package/umd/Core/Interfaces/IShapeValues.js +12 -0
- package/umd/Core/Interfaces/index.d.ts +36 -0
- package/umd/Core/Interfaces/index.js +58 -0
- package/umd/Core/Loader.d.ts +32 -0
- package/umd/Core/Loader.js +193 -0
- package/umd/Core/Particle.d.ts +71 -0
- package/umd/Core/Particle.js +394 -0
- package/umd/Core/Particles.d.ts +46 -0
- package/umd/Core/Particles.js +331 -0
- package/umd/Core/Retina.d.ts +26 -0
- package/umd/Core/Retina.js +107 -0
- package/umd/Core/Utils/Circle.d.ts +8 -0
- package/umd/Core/Utils/Circle.js +52 -0
- package/umd/Core/Utils/CircleWarp.d.ts +9 -0
- package/umd/Core/Utils/CircleWarp.js +70 -0
- package/umd/Core/Utils/Constants.d.ts +18 -0
- package/umd/Core/Utils/Constants.js +32 -0
- package/umd/Core/Utils/EventListeners.d.ts +33 -0
- package/umd/Core/Utils/EventListeners.js +383 -0
- package/umd/Core/Utils/ExternalInteractorBase.d.ts +12 -0
- package/umd/Core/Utils/ExternalInteractorBase.js +20 -0
- package/umd/Core/Utils/FrameManager.d.ts +6 -0
- package/umd/Core/Utils/FrameManager.js +53 -0
- package/umd/Core/Utils/InteractionManager.d.ts +14 -0
- package/umd/Core/Utils/InteractionManager.js +69 -0
- package/umd/Core/Utils/ParticlesInteractorBase.d.ts +12 -0
- package/umd/Core/Utils/ParticlesInteractorBase.js +20 -0
- package/umd/Core/Utils/ParticlesMover.d.ts +13 -0
- package/umd/Core/Utils/ParticlesMover.js +196 -0
- package/umd/Core/Utils/Plugins.d.ts +36 -0
- package/umd/Core/Utils/Plugins.js +108 -0
- package/umd/Core/Utils/Point.d.ts +7 -0
- package/umd/Core/Utils/Point.js +20 -0
- package/umd/Core/Utils/QuadTree.d.ts +23 -0
- package/umd/Core/Utils/QuadTree.js +88 -0
- package/umd/Core/Utils/Range.d.ts +7 -0
- package/umd/Core/Utils/Range.js +22 -0
- package/umd/Core/Utils/Rectangle.d.ts +8 -0
- package/umd/Core/Utils/Rectangle.js +48 -0
- package/umd/Core/Utils/Vector.d.ts +29 -0
- package/umd/Core/Utils/Vector.js +106 -0
- package/umd/Core/Utils/Vector3d.d.ts +18 -0
- package/umd/Core/Utils/Vector3d.js +68 -0
- package/umd/Core/Utils/index.d.ts +16 -0
- package/umd/Core/Utils/index.js +38 -0
- package/umd/Core/index.d.ts +8 -0
- package/umd/Core/index.js +30 -0
- package/umd/Enums/AnimationStatus.d.ts +4 -0
- package/umd/Enums/AnimationStatus.js +12 -0
- package/umd/Enums/Directions/MoveDirection.d.ts +12 -0
- package/umd/Enums/Directions/MoveDirection.js +12 -0
- package/umd/Enums/Directions/OutModeDirection.d.ts +6 -0
- package/umd/Enums/Directions/OutModeDirection.js +12 -0
- package/umd/Enums/Directions/RotateDirection.d.ts +6 -0
- package/umd/Enums/Directions/RotateDirection.js +12 -0
- package/umd/Enums/Directions/TiltDirection.d.ts +6 -0
- package/umd/Enums/Directions/TiltDirection.js +12 -0
- package/umd/Enums/Directions/index.d.ts +4 -0
- package/umd/Enums/Directions/index.js +26 -0
- package/umd/Enums/InteractivityDetect.d.ts +5 -0
- package/umd/Enums/InteractivityDetect.js +12 -0
- package/umd/Enums/Modes/ClickMode.d.ts +9 -0
- package/umd/Enums/Modes/ClickMode.js +12 -0
- package/umd/Enums/Modes/CollisionMode.d.ts +5 -0
- package/umd/Enums/Modes/CollisionMode.js +12 -0
- package/umd/Enums/Modes/DestroyMode.d.ts +4 -0
- package/umd/Enums/Modes/DestroyMode.js +12 -0
- package/umd/Enums/Modes/DivMode.d.ts +5 -0
- package/umd/Enums/Modes/DivMode.js +12 -0
- package/umd/Enums/Modes/HoverMode.d.ts +11 -0
- package/umd/Enums/Modes/HoverMode.js +12 -0
- package/umd/Enums/Modes/OutMode.d.ts +10 -0
- package/umd/Enums/Modes/OutMode.js +12 -0
- package/umd/Enums/Modes/ResponsiveMode.d.ts +4 -0
- package/umd/Enums/Modes/ResponsiveMode.js +12 -0
- package/umd/Enums/Modes/RollMode.d.ts +5 -0
- package/umd/Enums/Modes/RollMode.js +12 -0
- package/umd/Enums/Modes/SizeMode.d.ts +4 -0
- package/umd/Enums/Modes/SizeMode.js +12 -0
- package/umd/Enums/Modes/ThemeMode.d.ts +5 -0
- package/umd/Enums/Modes/ThemeMode.js +12 -0
- package/umd/Enums/Modes/index.d.ts +10 -0
- package/umd/Enums/Modes/index.js +32 -0
- package/umd/Enums/Types/AlterType.d.ts +4 -0
- package/umd/Enums/Types/AlterType.js +12 -0
- package/umd/Enums/Types/DestroyType.d.ts +5 -0
- package/umd/Enums/Types/DestroyType.js +12 -0
- package/umd/Enums/Types/DivType.d.ts +4 -0
- package/umd/Enums/Types/DivType.js +12 -0
- package/umd/Enums/Types/EasingType.d.ts +10 -0
- package/umd/Enums/Types/EasingType.js +12 -0
- package/umd/Enums/Types/GradientType.d.ts +5 -0
- package/umd/Enums/Types/GradientType.js +12 -0
- package/umd/Enums/Types/InteractorType.d.ts +4 -0
- package/umd/Enums/Types/InteractorType.js +12 -0
- package/umd/Enums/Types/OrbitType.d.ts +4 -0
- package/umd/Enums/Types/OrbitType.js +12 -0
- package/umd/Enums/Types/ShapeType.d.ts +13 -0
- package/umd/Enums/Types/ShapeType.js +12 -0
- package/umd/Enums/Types/StartValueType.d.ts +5 -0
- package/umd/Enums/Types/StartValueType.js +12 -0
- package/umd/Enums/Types/index.d.ts +9 -0
- package/umd/Enums/Types/index.js +31 -0
- package/umd/Enums/index.d.ts +5 -0
- package/umd/Enums/index.js +27 -0
- package/umd/Interactions/External/Attract/Attractor.d.ts +11 -0
- package/umd/Interactions/External/Attract/Attractor.js +85 -0
- package/umd/Interactions/External/Attract/index.d.ts +2 -0
- package/umd/Interactions/External/Attract/index.js +18 -0
- package/umd/Interactions/External/Bounce/Bouncer.d.ts +11 -0
- package/umd/Interactions/External/Bounce/Bouncer.js +77 -0
- package/umd/Interactions/External/Bounce/index.d.ts +2 -0
- package/umd/Interactions/External/Bounce/index.js +18 -0
- package/umd/Interactions/External/Bubble/Bubbler.d.ts +16 -0
- package/umd/Interactions/External/Bubble/Bubbler.js +261 -0
- package/umd/Interactions/External/Bubble/IBubblerProcessParam.d.ts +10 -0
- package/umd/Interactions/External/Bubble/IBubblerProcessParam.js +12 -0
- package/umd/Interactions/External/Bubble/ProcessBubbleType.d.ts +5 -0
- package/umd/Interactions/External/Bubble/ProcessBubbleType.js +12 -0
- package/umd/Interactions/External/Bubble/index.d.ts +2 -0
- package/umd/Interactions/External/Bubble/index.js +18 -0
- package/umd/Interactions/External/Connect/Connector.d.ts +8 -0
- package/umd/Interactions/External/Connect/Connector.js +51 -0
- package/umd/Interactions/External/Connect/index.d.ts +2 -0
- package/umd/Interactions/External/Connect/index.js +18 -0
- package/umd/Interactions/External/Grab/Grabber.d.ts +8 -0
- package/umd/Interactions/External/Grab/Grabber.js +57 -0
- package/umd/Interactions/External/Grab/index.d.ts +2 -0
- package/umd/Interactions/External/Grab/index.js +18 -0
- package/umd/Interactions/External/Repulse/Repulser.d.ts +12 -0
- package/umd/Interactions/External/Repulse/Repulser.js +108 -0
- package/umd/Interactions/External/Repulse/index.d.ts +2 -0
- package/umd/Interactions/External/Repulse/index.js +18 -0
- package/umd/Interactions/External/Trail/TrailMaker.d.ts +10 -0
- package/umd/Interactions/External/Trail/TrailMaker.js +63 -0
- package/umd/Interactions/External/Trail/index.d.ts +2 -0
- package/umd/Interactions/External/Trail/index.js +18 -0
- package/umd/Interactions/Particles/Attract/Attractor.d.ts +8 -0
- package/umd/Interactions/Particles/Attract/Attractor.js +40 -0
- package/umd/Interactions/Particles/Attract/index.d.ts +2 -0
- package/umd/Interactions/Particles/Attract/index.js +18 -0
- package/umd/Interactions/Particles/Collisions/Collider.d.ts +10 -0
- package/umd/Interactions/Particles/Collisions/Collider.js +119 -0
- package/umd/Interactions/Particles/Collisions/index.d.ts +2 -0
- package/umd/Interactions/Particles/Collisions/index.js +18 -0
- package/umd/Interactions/Particles/Links/ILink.d.ts +9 -0
- package/umd/Interactions/Particles/Links/ILink.js +12 -0
- package/umd/Interactions/Particles/Links/LinkInstance.d.ts +10 -0
- package/umd/Interactions/Particles/Links/LinkInstance.js +134 -0
- package/umd/Interactions/Particles/Links/LinkParticle.d.ts +5 -0
- package/umd/Interactions/Particles/Links/LinkParticle.js +12 -0
- package/umd/Interactions/Particles/Links/Linker.d.ts +10 -0
- package/umd/Interactions/Particles/Links/Linker.js +115 -0
- package/umd/Interactions/Particles/Links/index.d.ts +2 -0
- package/umd/Interactions/Particles/Links/index.js +20 -0
- package/umd/Interactions/Particles/Links/interaction.d.ts +2 -0
- package/umd/Interactions/Particles/Links/interaction.js +18 -0
- package/umd/Interactions/Particles/Links/plugin.d.ts +2 -0
- package/umd/Interactions/Particles/Links/plugin.js +32 -0
- package/umd/Options/Classes/AnimatableColor.d.ts +11 -0
- package/umd/Options/Classes/AnimatableColor.js +50 -0
- package/umd/Options/Classes/AnimatableGradient.d.ts +53 -0
- package/umd/Options/Classes/AnimatableGradient.js +156 -0
- package/umd/Options/Classes/AnimationOptions.d.ts +11 -0
- package/umd/Options/Classes/AnimationOptions.js +39 -0
- package/umd/Options/Classes/Background/Background.d.ts +14 -0
- package/umd/Options/Classes/Background/Background.js +49 -0
- package/umd/Options/Classes/BackgroundMask/BackgroundMask.d.ts +11 -0
- package/umd/Options/Classes/BackgroundMask/BackgroundMask.js +38 -0
- package/umd/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +10 -0
- package/umd/Options/Classes/BackgroundMask/BackgroundMaskCover.js +32 -0
- package/umd/Options/Classes/ColorAnimation.d.ts +12 -0
- package/umd/Options/Classes/ColorAnimation.js +44 -0
- package/umd/Options/Classes/FullScreen/FullScreen.d.ts +9 -0
- package/umd/Options/Classes/FullScreen/FullScreen.js +31 -0
- package/umd/Options/Classes/HslAnimation.d.ts +11 -0
- package/umd/Options/Classes/HslAnimation.js +30 -0
- package/umd/Options/Classes/Interactivity/Events/ClickEvent.d.ts +10 -0
- package/umd/Options/Classes/Interactivity/Events/ClickEvent.js +31 -0
- package/umd/Options/Classes/Interactivity/Events/DivEvent.d.ts +18 -0
- package/umd/Options/Classes/Interactivity/Events/DivEvent.js +64 -0
- package/umd/Options/Classes/Interactivity/Events/Events.d.ts +20 -0
- package/umd/Options/Classes/Interactivity/Events/Events.js +68 -0
- package/umd/Options/Classes/Interactivity/Events/HoverEvent.d.ts +12 -0
- package/umd/Options/Classes/Interactivity/Events/HoverEvent.js +34 -0
- package/umd/Options/Classes/Interactivity/Events/Parallax.d.ts +10 -0
- package/umd/Options/Classes/Interactivity/Events/Parallax.js +35 -0
- package/umd/Options/Classes/Interactivity/Interactivity.d.ts +15 -0
- package/umd/Options/Classes/Interactivity/Interactivity.js +51 -0
- package/umd/Options/Classes/Interactivity/Modes/Attract.d.ts +14 -0
- package/umd/Options/Classes/Interactivity/Modes/Attract.js +47 -0
- package/umd/Options/Classes/Interactivity/Modes/Bounce.d.ts +8 -0
- package/umd/Options/Classes/Interactivity/Modes/Bounce.js +27 -0
- package/umd/Options/Classes/Interactivity/Modes/Bubble.d.ts +9 -0
- package/umd/Options/Classes/Interactivity/Modes/Bubble.js +37 -0
- package/umd/Options/Classes/Interactivity/Modes/BubbleBase.d.ts +13 -0
- package/umd/Options/Classes/Interactivity/Modes/BubbleBase.js +53 -0
- package/umd/Options/Classes/Interactivity/Modes/BubbleDiv.d.ts +11 -0
- package/umd/Options/Classes/Interactivity/Modes/BubbleDiv.js +41 -0
- package/umd/Options/Classes/Interactivity/Modes/Connect.d.ts +15 -0
- package/umd/Options/Classes/Interactivity/Modes/Connect.js +47 -0
- package/umd/Options/Classes/Interactivity/Modes/ConnectLinks.d.ts +8 -0
- package/umd/Options/Classes/Interactivity/Modes/ConnectLinks.js +25 -0
- package/umd/Options/Classes/Interactivity/Modes/Grab.d.ts +14 -0
- package/umd/Options/Classes/Interactivity/Modes/Grab.js +43 -0
- package/umd/Options/Classes/Interactivity/Modes/GrabLinks.d.ts +12 -0
- package/umd/Options/Classes/Interactivity/Modes/GrabLinks.js +39 -0
- package/umd/Options/Classes/Interactivity/Modes/Light.d.ts +11 -0
- package/umd/Options/Classes/Interactivity/Modes/Light.js +29 -0
- package/umd/Options/Classes/Interactivity/Modes/LightArea.d.ts +10 -0
- package/umd/Options/Classes/Interactivity/Modes/LightArea.js +30 -0
- package/umd/Options/Classes/Interactivity/Modes/LightGradient.d.ts +10 -0
- package/umd/Options/Classes/Interactivity/Modes/LightGradient.js +30 -0
- package/umd/Options/Classes/Interactivity/Modes/LightShadow.d.ts +10 -0
- package/umd/Options/Classes/Interactivity/Modes/LightShadow.js +31 -0
- package/umd/Options/Classes/Interactivity/Modes/Modes.d.ts +29 -0
- package/umd/Options/Classes/Interactivity/Modes/Modes.js +55 -0
- package/umd/Options/Classes/Interactivity/Modes/Push.d.ts +12 -0
- package/umd/Options/Classes/Interactivity/Modes/Push.js +46 -0
- package/umd/Options/Classes/Interactivity/Modes/Remove.d.ts +10 -0
- package/umd/Options/Classes/Interactivity/Modes/Remove.js +35 -0
- package/umd/Options/Classes/Interactivity/Modes/Repulse.d.ts +9 -0
- package/umd/Options/Classes/Interactivity/Modes/Repulse.js +37 -0
- package/umd/Options/Classes/Interactivity/Modes/RepulseBase.d.ts +14 -0
- package/umd/Options/Classes/Interactivity/Modes/RepulseBase.js +47 -0
- package/umd/Options/Classes/Interactivity/Modes/RepulseDiv.d.ts +11 -0
- package/umd/Options/Classes/Interactivity/Modes/RepulseDiv.js +49 -0
- package/umd/Options/Classes/Interactivity/Modes/Slow.d.ts +11 -0
- package/umd/Options/Classes/Interactivity/Modes/Slow.js +36 -0
- package/umd/Options/Classes/Interactivity/Modes/Trail.d.ts +12 -0
- package/umd/Options/Classes/Interactivity/Modes/Trail.js +39 -0
- package/umd/Options/Classes/ManualParticle.d.ts +10 -0
- package/umd/Options/Classes/ManualParticle.js +32 -0
- package/umd/Options/Classes/Motion/Motion.d.ts +10 -0
- package/umd/Options/Classes/Motion/Motion.js +30 -0
- package/umd/Options/Classes/Motion/MotionReduce.d.ts +9 -0
- package/umd/Options/Classes/Motion/MotionReduce.js +31 -0
- package/umd/Options/Classes/Options.d.ts +48 -0
- package/umd/Options/Classes/Options.js +184 -0
- package/umd/Options/Classes/OptionsColor.d.ts +10 -0
- package/umd/Options/Classes/OptionsColor.js +38 -0
- package/umd/Options/Classes/Particles/Bounce/Bounce.d.ts +10 -0
- package/umd/Options/Classes/Particles/Bounce/Bounce.js +28 -0
- package/umd/Options/Classes/Particles/Bounce/BounceFactor.d.ts +4 -0
- package/umd/Options/Classes/Particles/Bounce/BounceFactor.js +22 -0
- package/umd/Options/Classes/Particles/Collisions/Collisions.d.ts +14 -0
- package/umd/Options/Classes/Particles/Collisions/Collisions.js +37 -0
- package/umd/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +9 -0
- package/umd/Options/Classes/Particles/Collisions/CollisionsOverlap.js +31 -0
- package/umd/Options/Classes/Particles/Destroy/Destroy.d.ts +11 -0
- package/umd/Options/Classes/Particles/Destroy/Destroy.js +30 -0
- package/umd/Options/Classes/Particles/Destroy/Split.d.ts +15 -0
- package/umd/Options/Classes/Particles/Destroy/Split.js +41 -0
- package/umd/Options/Classes/Particles/Destroy/SplitFactor.d.ts +4 -0
- package/umd/Options/Classes/Particles/Destroy/SplitFactor.js +21 -0
- package/umd/Options/Classes/Particles/Destroy/SplitRate.d.ts +4 -0
- package/umd/Options/Classes/Particles/Destroy/SplitRate.js +21 -0
- package/umd/Options/Classes/Particles/Life/Life.d.ts +12 -0
- package/umd/Options/Classes/Particles/Life/Life.js +33 -0
- package/umd/Options/Classes/Particles/Life/LifeDelay.d.ts +9 -0
- package/umd/Options/Classes/Particles/Life/LifeDelay.js +30 -0
- package/umd/Options/Classes/Particles/Life/LifeDuration.d.ts +9 -0
- package/umd/Options/Classes/Particles/Life/LifeDuration.js +31 -0
- package/umd/Options/Classes/Particles/Links/Links.d.ts +22 -0
- package/umd/Options/Classes/Particles/Links/Links.js +67 -0
- package/umd/Options/Classes/Particles/Links/LinksShadow.d.ts +11 -0
- package/umd/Options/Classes/Particles/Links/LinksShadow.js +35 -0
- package/umd/Options/Classes/Particles/Links/LinksTriangle.d.ts +12 -0
- package/umd/Options/Classes/Particles/Links/LinksTriangle.js +38 -0
- package/umd/Options/Classes/Particles/Move/Attract.d.ts +15 -0
- package/umd/Options/Classes/Particles/Move/Attract.js +56 -0
- package/umd/Options/Classes/Particles/Move/Move.d.ts +44 -0
- package/umd/Options/Classes/Particles/Move/Move.js +142 -0
- package/umd/Options/Classes/Particles/Move/MoveAngle.d.ts +9 -0
- package/umd/Options/Classes/Particles/Move/MoveAngle.js +31 -0
- package/umd/Options/Classes/Particles/Move/MoveGravity.d.ts +11 -0
- package/umd/Options/Classes/Particles/Move/MoveGravity.js +39 -0
- package/umd/Options/Classes/Particles/Move/OutModes.d.ts +13 -0
- package/umd/Options/Classes/Particles/Move/OutModes.js +32 -0
- package/umd/Options/Classes/Particles/Move/Path/Path.d.ts +13 -0
- package/umd/Options/Classes/Particles/Move/Path/Path.js +40 -0
- package/umd/Options/Classes/Particles/Move/Path/PathDelay.d.ts +4 -0
- package/umd/Options/Classes/Particles/Move/Path/PathDelay.js +20 -0
- package/umd/Options/Classes/Particles/Move/Spin.d.ts +11 -0
- package/umd/Options/Classes/Particles/Move/Spin.js +33 -0
- package/umd/Options/Classes/Particles/Move/Trail.d.ts +11 -0
- package/umd/Options/Classes/Particles/Move/Trail.js +35 -0
- package/umd/Options/Classes/Particles/Number/Density.d.ts +12 -0
- package/umd/Options/Classes/Particles/Number/Density.js +43 -0
- package/umd/Options/Classes/Particles/Number/ParticlesNumber.d.ts +13 -0
- package/umd/Options/Classes/Particles/Number/ParticlesNumber.js +42 -0
- package/umd/Options/Classes/Particles/Opacity/Opacity.d.ts +12 -0
- package/umd/Options/Classes/Particles/Opacity/Opacity.js +43 -0
- package/umd/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +14 -0
- package/umd/Options/Classes/Particles/Opacity/OpacityAnimation.js +54 -0
- package/umd/Options/Classes/Particles/Orbit/Orbit.d.ts +18 -0
- package/umd/Options/Classes/Particles/Orbit/Orbit.js +48 -0
- package/umd/Options/Classes/Particles/Orbit/OrbitRotation.d.ts +7 -0
- package/umd/Options/Classes/Particles/Orbit/OrbitRotation.js +29 -0
- package/umd/Options/Classes/Particles/ParticlesOptions.d.ts +58 -0
- package/umd/Options/Classes/Particles/ParticlesOptions.js +153 -0
- package/umd/Options/Classes/Particles/Repulse/Repulse.d.ts +13 -0
- package/umd/Options/Classes/Particles/Repulse/Repulse.js +46 -0
- package/umd/Options/Classes/Particles/Roll/Roll.d.ts +16 -0
- package/umd/Options/Classes/Particles/Roll/Roll.js +45 -0
- package/umd/Options/Classes/Particles/Roll/RollLight.d.ts +9 -0
- package/umd/Options/Classes/Particles/Roll/RollLight.js +31 -0
- package/umd/Options/Classes/Particles/Rotate/Rotate.d.ts +13 -0
- package/umd/Options/Classes/Particles/Rotate/Rotate.js +38 -0
- package/umd/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +10 -0
- package/umd/Options/Classes/Particles/Rotate/RotateAnimation.js +35 -0
- package/umd/Options/Classes/Particles/Shadow.d.ts +13 -0
- package/umd/Options/Classes/Particles/Shadow.js +48 -0
- package/umd/Options/Classes/Particles/Shape/Shape.d.ts +27 -0
- package/umd/Options/Classes/Particles/Shape/Shape.js +113 -0
- package/umd/Options/Classes/Particles/Size/Size.d.ts +12 -0
- package/umd/Options/Classes/Particles/Size/Size.js +43 -0
- package/umd/Options/Classes/Particles/Size/SizeAnimation.d.ts +14 -0
- package/umd/Options/Classes/Particles/Size/SizeAnimation.js +54 -0
- package/umd/Options/Classes/Particles/Stroke.d.ts +11 -0
- package/umd/Options/Classes/Particles/Stroke.js +34 -0
- package/umd/Options/Classes/Particles/Tilt/Tilt.d.ts +13 -0
- package/umd/Options/Classes/Particles/Tilt/Tilt.js +38 -0
- package/umd/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +10 -0
- package/umd/Options/Classes/Particles/Tilt/TiltAnimation.js +35 -0
- package/umd/Options/Classes/Particles/Twinkle/Twinkle.d.ts +10 -0
- package/umd/Options/Classes/Particles/Twinkle/Twinkle.js +28 -0
- package/umd/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +12 -0
- package/umd/Options/Classes/Particles/Twinkle/TwinkleValues.js +39 -0
- package/umd/Options/Classes/Particles/Wobble/Wobble.d.ts +10 -0
- package/umd/Options/Classes/Particles/Wobble/Wobble.js +36 -0
- package/umd/Options/Classes/Particles/ZIndex/ZIndex.d.ts +11 -0
- package/umd/Options/Classes/Particles/ZIndex/ZIndex.js +38 -0
- package/umd/Options/Classes/Random.d.ts +9 -0
- package/umd/Options/Classes/Random.js +31 -0
- package/umd/Options/Classes/Responsive.d.ts +12 -0
- package/umd/Options/Classes/Responsive.js +41 -0
- package/umd/Options/Classes/Theme/Theme.d.ts +12 -0
- package/umd/Options/Classes/Theme/Theme.js +34 -0
- package/umd/Options/Classes/Theme/ThemeDefault.d.ts +11 -0
- package/umd/Options/Classes/Theme/ThemeDefault.js +35 -0
- package/umd/Options/Classes/ValueWithRandom.d.ts +10 -0
- package/umd/Options/Classes/ValueWithRandom.js +36 -0
- package/umd/Options/Interfaces/Background/IBackground.d.ts +9 -0
- package/umd/Options/Interfaces/Background/IBackground.js +12 -0
- package/umd/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +7 -0
- package/umd/Options/Interfaces/BackgroundMask/IBackgroundMask.js +12 -0
- package/umd/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.d.ts +5 -0
- package/umd/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.js +12 -0
- package/umd/Options/Interfaces/FullScreen/IFullScreen.d.ts +4 -0
- package/umd/Options/Interfaces/FullScreen/IFullScreen.js +12 -0
- package/umd/Options/Interfaces/IAnimatable.d.ts +4 -0
- package/umd/Options/Interfaces/IAnimatable.js +12 -0
- package/umd/Options/Interfaces/IAnimatableColor.d.ts +6 -0
- package/umd/Options/Interfaces/IAnimatableColor.js +12 -0
- package/umd/Options/Interfaces/IAnimatableGradient.d.ts +8 -0
- package/umd/Options/Interfaces/IAnimatableGradient.js +12 -0
- package/umd/Options/Interfaces/IAnimation.d.ts +6 -0
- package/umd/Options/Interfaces/IAnimation.js +12 -0
- package/umd/Options/Interfaces/IColorAnimation.d.ts +5 -0
- package/umd/Options/Interfaces/IColorAnimation.js +12 -0
- package/umd/Options/Interfaces/IHslAnimation.d.ts +6 -0
- package/umd/Options/Interfaces/IHslAnimation.js +12 -0
- package/umd/Options/Interfaces/IManualParticle.d.ts +7 -0
- package/umd/Options/Interfaces/IManualParticle.js +12 -0
- package/umd/Options/Interfaces/IOptionLoader.d.ts +4 -0
- package/umd/Options/Interfaces/IOptionLoader.js +12 -0
- package/umd/Options/Interfaces/IOptions.d.ts +34 -0
- package/umd/Options/Interfaces/IOptions.js +12 -0
- package/umd/Options/Interfaces/IOptionsColor.d.ts +2 -0
- package/umd/Options/Interfaces/IOptionsColor.js +12 -0
- package/umd/Options/Interfaces/IOptionsGradient.d.ts +13 -0
- package/umd/Options/Interfaces/IOptionsGradient.js +12 -0
- package/umd/Options/Interfaces/IRandom.d.ts +4 -0
- package/umd/Options/Interfaces/IRandom.js +12 -0
- package/umd/Options/Interfaces/IResponsive.d.ts +8 -0
- package/umd/Options/Interfaces/IResponsive.js +12 -0
- package/umd/Options/Interfaces/IValueWithRandom.d.ts +6 -0
- package/umd/Options/Interfaces/IValueWithRandom.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IClickEvent.d.ts +6 -0
- package/umd/Options/Interfaces/Interactivity/Events/IClickEvent.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +11 -0
- package/umd/Options/Interfaces/Interactivity/Events/IDivEvent.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IEvents.d.ts +13 -0
- package/umd/Options/Interfaces/Interactivity/Events/IEvents.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +8 -0
- package/umd/Options/Interfaces/Interactivity/Events/IHoverEvent.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IParallax.d.ts +5 -0
- package/umd/Options/Interfaces/Interactivity/Events/IParallax.js +12 -0
- package/umd/Options/Interfaces/Interactivity/IInteractivity.d.ts +9 -0
- package/umd/Options/Interfaces/Interactivity/IInteractivity.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IAttract.d.ts +9 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IAttract.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBounce.d.ts +3 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBounce.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBubble.d.ts +6 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBubble.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBubbleBase.d.ts +10 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBubbleBase.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBubbleDiv.d.ts +4 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBubbleDiv.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IConnect.d.ts +8 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IConnect.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IConnectLinks.d.ts +3 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IConnectLinks.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IGrab.d.ts +7 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IGrab.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IGrabLinks.d.ts +7 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IGrabLinks.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ILight.d.ts +6 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ILight.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ILightArea.d.ts +9 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ILightArea.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ILightShadow.d.ts +5 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ILightShadow.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +5 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IModeDiv.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IModes.d.ts +22 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IModes.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IPush.d.ts +6 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IPush.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRemove.d.ts +4 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRemove.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulse.d.ts +6 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulse.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulseBase.d.ts +9 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulseBase.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulseDiv.d.ts +4 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulseDiv.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ISlow.d.ts +5 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ISlow.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ITrail.d.ts +8 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ITrail.js +12 -0
- package/umd/Options/Interfaces/Motion/IMotion.d.ts +5 -0
- package/umd/Options/Interfaces/Motion/IMotion.js +12 -0
- package/umd/Options/Interfaces/Motion/IMotionReduce.d.ts +4 -0
- package/umd/Options/Interfaces/Motion/IMotionReduce.js +12 -0
- package/umd/Options/Interfaces/Particles/Bounce/IBounce.d.ts +5 -0
- package/umd/Options/Interfaces/Particles/Bounce/IBounce.js +12 -0
- package/umd/Options/Interfaces/Particles/Collisions/ICollisions.d.ts +9 -0
- package/umd/Options/Interfaces/Particles/Collisions/ICollisions.js +12 -0
- package/umd/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.d.ts +4 -0
- package/umd/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.js +12 -0
- package/umd/Options/Interfaces/Particles/Destroy/IDestroy.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Destroy/IDestroy.js +12 -0
- package/umd/Options/Interfaces/Particles/Destroy/ISplit.d.ts +10 -0
- package/umd/Options/Interfaces/Particles/Destroy/ISplit.js +12 -0
- package/umd/Options/Interfaces/Particles/IParticles.d.ts +52 -0
- package/umd/Options/Interfaces/Particles/IParticles.js +12 -0
- package/umd/Options/Interfaces/Particles/IShadow.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/IShadow.js +12 -0
- package/umd/Options/Interfaces/Particles/IStroke.d.ts +7 -0
- package/umd/Options/Interfaces/Particles/IStroke.js +12 -0
- package/umd/Options/Interfaces/Particles/Life/ILife.d.ts +7 -0
- package/umd/Options/Interfaces/Particles/Life/ILife.js +12 -0
- package/umd/Options/Interfaces/Particles/Life/ILifeDelay.d.ts +4 -0
- package/umd/Options/Interfaces/Particles/Life/ILifeDelay.js +12 -0
- package/umd/Options/Interfaces/Particles/Life/ILifeDuration.d.ts +4 -0
- package/umd/Options/Interfaces/Particles/Life/ILifeDuration.js +12 -0
- package/umd/Options/Interfaces/Particles/Links/ILinks.d.ts +17 -0
- package/umd/Options/Interfaces/Particles/Links/ILinks.js +12 -0
- package/umd/Options/Interfaces/Particles/Links/ILinksShadow.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Links/ILinksShadow.js +12 -0
- package/umd/Options/Interfaces/Particles/Links/ILinksTriangle.d.ts +7 -0
- package/umd/Options/Interfaces/Particles/Links/ILinksTriangle.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IAttract.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Move/IAttract.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IMove.d.ts +35 -0
- package/umd/Options/Interfaces/Particles/Move/IMove.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +4 -0
- package/umd/Options/Interfaces/Particles/Move/IMoveAngle.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Move/IMoveGravity.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IOutModes.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Move/IOutModes.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/ISpin.d.ts +7 -0
- package/umd/Options/Interfaces/Particles/Move/ISpin.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/ITrail.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Move/ITrail.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/Path/IPath.d.ts +9 -0
- package/umd/Options/Interfaces/Particles/Move/Path/IPath.js +12 -0
- package/umd/Options/Interfaces/Particles/Number/IDensity.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Number/IDensity.js +12 -0
- package/umd/Options/Interfaces/Particles/Number/IParticlesNumber.d.ts +7 -0
- package/umd/Options/Interfaces/Particles/Number/IParticlesNumber.js +12 -0
- package/umd/Options/Interfaces/Particles/Opacity/IOpacity.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Opacity/IOpacity.js +12 -0
- package/umd/Options/Interfaces/Particles/Opacity/IOpacityAnimation.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Opacity/IOpacityAnimation.js +12 -0
- package/umd/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +12 -0
- package/umd/Options/Interfaces/Particles/Orbit/IOrbit.js +12 -0
- package/umd/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Repulse/IRepulse.js +12 -0
- package/umd/Options/Interfaces/Particles/Roll/IRoll.d.ts +12 -0
- package/umd/Options/Interfaces/Particles/Roll/IRoll.js +12 -0
- package/umd/Options/Interfaces/Particles/Roll/IRollLight.d.ts +4 -0
- package/umd/Options/Interfaces/Particles/Roll/IRollLight.js +12 -0
- package/umd/Options/Interfaces/Particles/Rotate/IRotate.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Rotate/IRotate.js +12 -0
- package/umd/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +5 -0
- package/umd/Options/Interfaces/Particles/Rotate/IRotateAnimation.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/ICharacterShape.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Shape/ICharacterShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/IImageShape.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Shape/IImageShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/IPolygonShape.d.ts +5 -0
- package/umd/Options/Interfaces/Particles/Shape/IPolygonShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/IShape.d.ts +16 -0
- package/umd/Options/Interfaces/Particles/Shape/IShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/IShapeValues.d.ts +1 -0
- package/umd/Options/Interfaces/Particles/Shape/IShapeValues.js +23 -0
- package/umd/Options/Interfaces/Particles/Shape/IStarShape.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Shape/IStarShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Size/ISize.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Size/ISize.js +12 -0
- package/umd/Options/Interfaces/Particles/Size/ISizeAnimation.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Size/ISizeAnimation.js +12 -0
- package/umd/Options/Interfaces/Particles/Tilt/ITilt.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Tilt/ITilt.js +12 -0
- package/umd/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +5 -0
- package/umd/Options/Interfaces/Particles/Tilt/ITiltAnimation.js +12 -0
- package/umd/Options/Interfaces/Particles/Twinkle/ITwinkle.d.ts +5 -0
- package/umd/Options/Interfaces/Particles/Twinkle/ITwinkle.js +12 -0
- package/umd/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +7 -0
- package/umd/Options/Interfaces/Particles/Twinkle/ITwinkleValues.js +12 -0
- package/umd/Options/Interfaces/Particles/Wobble/IWobble.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Wobble/IWobble.js +12 -0
- package/umd/Options/Interfaces/Particles/ZIndex/IZIndex.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/ZIndex/IZIndex.js +12 -0
- package/umd/Options/Interfaces/Theme/ITheme.d.ts +8 -0
- package/umd/Options/Interfaces/Theme/ITheme.js +12 -0
- package/umd/Options/Interfaces/Theme/IThemeDefault.d.ts +6 -0
- package/umd/Options/Interfaces/Theme/IThemeDefault.js +12 -0
- package/umd/Plugins/Absorbers/AbsorberContainer.d.ts +7 -0
- package/umd/Plugins/Absorbers/AbsorberContainer.js +12 -0
- package/umd/Plugins/Absorbers/AbsorberInstance.d.ts +33 -0
- package/umd/Plugins/Absorbers/AbsorberInstance.js +172 -0
- package/umd/Plugins/Absorbers/Absorbers.d.ts +22 -0
- package/umd/Plugins/Absorbers/Absorbers.js +128 -0
- package/umd/Plugins/Absorbers/Enums/AbsorberClickMode.d.ts +3 -0
- package/umd/Plugins/Absorbers/Enums/AbsorberClickMode.js +12 -0
- package/umd/Plugins/Absorbers/Enums/index.d.ts +1 -0
- package/umd/Plugins/Absorbers/Enums/index.js +23 -0
- package/umd/Plugins/Absorbers/Options/Classes/Absorber.d.ts +18 -0
- package/umd/Plugins/Absorbers/Options/Classes/Absorber.js +57 -0
- package/umd/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +11 -0
- package/umd/Plugins/Absorbers/Options/Classes/AbsorberSize.js +40 -0
- package/umd/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +9 -0
- package/umd/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.js +31 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +13 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorber.js +12 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.d.ts +12 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.js +12 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +6 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.js +12 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +4 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.js +12 -0
- package/umd/Plugins/Absorbers/index.d.ts +2 -0
- package/umd/Plugins/Absorbers/index.js +90 -0
- package/umd/Plugins/Emitters/EmitterContainer.d.ts +10 -0
- package/umd/Plugins/Emitters/EmitterContainer.js +12 -0
- package/umd/Plugins/Emitters/EmitterInstance.d.ts +45 -0
- package/umd/Plugins/Emitters/EmitterInstance.js +278 -0
- package/umd/Plugins/Emitters/Emitters.d.ts +25 -0
- package/umd/Plugins/Emitters/Emitters.js +163 -0
- package/umd/Plugins/Emitters/EmittersEngine.d.ts +7 -0
- package/umd/Plugins/Emitters/EmittersEngine.js +12 -0
- package/umd/Plugins/Emitters/Enums/EmitterClickMode.d.ts +3 -0
- package/umd/Plugins/Emitters/Enums/EmitterClickMode.js +12 -0
- package/umd/Plugins/Emitters/Enums/EmitterShapeType.d.ts +4 -0
- package/umd/Plugins/Emitters/Enums/EmitterShapeType.js +12 -0
- package/umd/Plugins/Emitters/Enums/index.d.ts +2 -0
- package/umd/Plugins/Emitters/Enums/index.js +24 -0
- package/umd/Plugins/Emitters/IEmitterShape.d.ts +4 -0
- package/umd/Plugins/Emitters/IEmitterShape.js +12 -0
- package/umd/Plugins/Emitters/Options/Classes/Emitter.d.ts +28 -0
- package/umd/Plugins/Emitters/Options/Classes/Emitter.js +74 -0
- package/umd/Plugins/Emitters/Options/Classes/EmitterLife.d.ts +11 -0
- package/umd/Plugins/Emitters/Options/Classes/EmitterLife.js +36 -0
- package/umd/Plugins/Emitters/Options/Classes/EmitterRate.d.ts +9 -0
- package/umd/Plugins/Emitters/Options/Classes/EmitterRate.js +32 -0
- package/umd/Plugins/Emitters/Options/Classes/EmitterSize.d.ts +11 -0
- package/umd/Plugins/Emitters/Options/Classes/EmitterSize.js +35 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +24 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitter.js +12 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterLife.d.ts +6 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterLife.js +12 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterOptions.d.ts +12 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterOptions.js +12 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterRate.d.ts +5 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterRate.js +12 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterSize.d.ts +5 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterSize.js +12 -0
- package/umd/Plugins/Emitters/ShapeManager.d.ts +9 -0
- package/umd/Plugins/Emitters/ShapeManager.js +40 -0
- package/umd/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +5 -0
- package/umd/Plugins/Emitters/Shapes/Circle/CircleShape.js +42 -0
- package/umd/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +5 -0
- package/umd/Plugins/Emitters/Shapes/Square/SquareShape.js +53 -0
- package/umd/Plugins/Emitters/index.d.ts +3 -0
- package/umd/Plugins/Emitters/index.js +120 -0
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskInlineArrangement.d.ts +8 -0
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskInlineArrangement.js +12 -0
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskMoveType.d.ts +4 -0
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskMoveType.js +12 -0
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskType.d.ts +6 -0
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskType.js +12 -0
- package/umd/Plugins/PolygonMask/Enums/index.d.ts +3 -0
- package/umd/Plugins/PolygonMask/Enums/index.js +25 -0
- package/umd/Plugins/PolygonMask/Interfaces/ISvgPath.d.ts +6 -0
- package/umd/Plugins/PolygonMask/Interfaces/ISvgPath.js +12 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +24 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMask.js +76 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.d.ts +15 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.js +48 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.d.ts +11 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.js +39 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +9 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.js +27 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +11 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.js +39 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +10 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.js +31 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +18 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.js +12 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +8 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.js +12 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDrawStroke.d.ts +6 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDrawStroke.js +12 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskInline.d.ts +4 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskInline.js +12 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.d.ts +6 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.js +12 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.d.ts +5 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.js +12 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskOptions.d.ts +4 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskOptions.js +12 -0
- package/umd/Plugins/PolygonMask/PolygonMaskInstance.d.ts +38 -0
- package/umd/Plugins/PolygonMask/PolygonMaskInstance.js +396 -0
- package/umd/Plugins/PolygonMask/Types.d.ts +8 -0
- package/umd/Plugins/PolygonMask/Types.js +12 -0
- package/umd/Plugins/PolygonMask/Utils.d.ts +11 -0
- package/umd/Plugins/PolygonMask/Utils.js +134 -0
- package/umd/Plugins/PolygonMask/index.d.ts +2 -0
- package/umd/Plugins/PolygonMask/index.js +67 -0
- package/umd/Plugins/PolygonMask/pathseg.d.ts +0 -0
- package/umd/Plugins/PolygonMask/pathseg.js +1548 -0
- package/umd/Shapes/Circle/CircleDrawer.d.ts +5 -0
- package/umd/Shapes/Circle/CircleDrawer.js +22 -0
- package/umd/Shapes/Circle/index.d.ts +2 -0
- package/umd/Shapes/Circle/index.js +18 -0
- package/umd/Shapes/Image/ImageDrawer.d.ts +18 -0
- package/umd/Shapes/Image/ImageDrawer.js +142 -0
- package/umd/Shapes/Image/Utils.d.ts +28 -0
- package/umd/Shapes/Image/Utils.js +99 -0
- package/umd/Shapes/Image/index.d.ts +2 -0
- package/umd/Shapes/Image/index.js +20 -0
- package/umd/Shapes/Line/LineDrawer.d.ts +5 -0
- package/umd/Shapes/Line/LineDrawer.js +23 -0
- package/umd/Shapes/Line/index.d.ts +2 -0
- package/umd/Shapes/Line/index.js +18 -0
- package/umd/Shapes/Polygon/PolygonDrawer.d.ts +7 -0
- package/umd/Shapes/Polygon/PolygonDrawer.js +36 -0
- package/umd/Shapes/Polygon/PolygonDrawerBase.d.ts +15 -0
- package/umd/Shapes/Polygon/PolygonDrawerBase.js +40 -0
- package/umd/Shapes/Polygon/TriangleDrawer.d.ts +8 -0
- package/umd/Shapes/Polygon/TriangleDrawer.js +35 -0
- package/umd/Shapes/Polygon/index.d.ts +4 -0
- package/umd/Shapes/Polygon/index.js +28 -0
- package/umd/Shapes/Square/SquareDrawer.d.ts +5 -0
- package/umd/Shapes/Square/SquareDrawer.js +23 -0
- package/umd/Shapes/Square/index.d.ts +2 -0
- package/umd/Shapes/Square/index.js +20 -0
- package/umd/Shapes/Star/StarDrawer.d.ts +5 -0
- package/umd/Shapes/Star/StarDrawer.js +34 -0
- package/umd/Shapes/Star/index.d.ts +2 -0
- package/umd/Shapes/Star/index.js +18 -0
- package/umd/Shapes/Text/TextDrawer.d.ts +7 -0
- package/umd/Shapes/Text/TextDrawer.js +75 -0
- package/umd/Shapes/Text/index.d.ts +2 -0
- package/umd/Shapes/Text/index.js +21 -0
- package/umd/Types/ParticlesGroups.d.ts +4 -0
- package/umd/Types/ParticlesGroups.js +12 -0
- package/umd/Types/PathOptions.d.ts +3 -0
- package/umd/Types/PathOptions.js +12 -0
- package/umd/Types/RangeValue.d.ts +2 -0
- package/umd/Types/RangeValue.js +12 -0
- package/umd/Types/RecursivePartial.d.ts +3 -0
- package/umd/Types/RecursivePartial.js +12 -0
- package/umd/Types/ShapeData.d.ts +5 -0
- package/umd/Types/ShapeData.js +12 -0
- package/umd/Types/ShapeDrawerFunctions.d.ts +11 -0
- package/umd/Types/ShapeDrawerFunctions.js +12 -0
- package/umd/Types/SingleOrMultiple.d.ts +1 -0
- package/umd/Types/SingleOrMultiple.js +12 -0
- package/umd/Types/index.d.ts +6 -0
- package/umd/Types/index.js +28 -0
- package/umd/Updaters/Angle/AngleUpdater.d.ts +8 -0
- package/umd/Updaters/Angle/AngleUpdater.js +88 -0
- package/umd/Updaters/Angle/index.d.ts +2 -0
- package/umd/Updaters/Angle/index.js +18 -0
- package/umd/Updaters/Color/ColorUpdater.d.ts +8 -0
- package/umd/Updaters/Color/ColorUpdater.js +77 -0
- package/umd/Updaters/Color/index.d.ts +2 -0
- package/umd/Updaters/Color/index.js +18 -0
- package/umd/Updaters/Life/LifeUpdater.d.ts +8 -0
- package/umd/Updaters/Life/LifeUpdater.js +77 -0
- package/umd/Updaters/Life/index.d.ts +2 -0
- package/umd/Updaters/Life/index.js +18 -0
- package/umd/Updaters/Opacity/OpacityUpdater.d.ts +8 -0
- package/umd/Updaters/Opacity/OpacityUpdater.js +129 -0
- package/umd/Updaters/Opacity/index.d.ts +2 -0
- package/umd/Updaters/Opacity/index.js +18 -0
- package/umd/Updaters/OutModes/IBounceData.d.ts +11 -0
- package/umd/Updaters/OutModes/IBounceData.js +12 -0
- package/umd/Updaters/OutModes/OutOfCanvasUpdater.d.ts +13 -0
- package/umd/Updaters/OutModes/OutOfCanvasUpdater.js +156 -0
- package/umd/Updaters/OutModes/Utils.d.ts +3 -0
- package/umd/Updaters/OutModes/Utils.js +75 -0
- package/umd/Updaters/OutModes/index.d.ts +2 -0
- package/umd/Updaters/OutModes/index.js +18 -0
- package/umd/Updaters/Roll/RollUpdater.d.ts +6 -0
- package/umd/Updaters/Roll/RollUpdater.js +73 -0
- package/umd/Updaters/Roll/index.d.ts +2 -0
- package/umd/Updaters/Roll/index.js +18 -0
- package/umd/Updaters/Size/SizeUpdater.d.ts +6 -0
- package/umd/Updaters/Size/SizeUpdater.js +86 -0
- package/umd/Updaters/Size/index.d.ts +2 -0
- package/umd/Updaters/Size/index.js +18 -0
- package/umd/Updaters/StrokeColor/StrokeColorUpdater.d.ts +8 -0
- package/umd/Updaters/StrokeColor/StrokeColorUpdater.js +94 -0
- package/umd/Updaters/StrokeColor/index.d.ts +2 -0
- package/umd/Updaters/StrokeColor/index.js +18 -0
- package/umd/Updaters/Tilt/TiltUpdater.d.ts +8 -0
- package/umd/Updaters/Tilt/TiltUpdater.js +89 -0
- package/umd/Updaters/Tilt/index.d.ts +2 -0
- package/umd/Updaters/Tilt/index.js +18 -0
- package/umd/Updaters/Wobble/WobbleUpdater.d.ts +14 -0
- package/umd/Updaters/Wobble/WobbleUpdater.js +61 -0
- package/umd/Updaters/Wobble/index.d.ts +2 -0
- package/umd/Updaters/Wobble/index.js +18 -0
- package/umd/Utils/CanvasUtils.d.ts +19 -0
- package/umd/Utils/CanvasUtils.js +297 -0
- package/umd/Utils/ColorUtils.d.ts +26 -0
- package/umd/Utils/ColorUtils.js +486 -0
- package/umd/Utils/NumberUtils.d.ts +23 -0
- package/umd/Utils/NumberUtils.js +138 -0
- package/umd/Utils/Utils.d.ts +38 -0
- package/umd/Utils/Utils.js +279 -0
- package/umd/Utils/index.d.ts +4 -0
- package/umd/Utils/index.js +26 -0
- package/umd/engine.d.ts +26 -0
- package/umd/engine.js +108 -0
- package/umd/full.d.ts +2 -0
- package/umd/full.js +32 -0
- package/umd/index.d.ts +20 -0
- package/umd/index.engine.d.ts +13 -0
- package/umd/index.engine.js +37 -0
- package/umd/index.js +43 -0
- package/umd/index.slim.d.ts +14 -0
- package/umd/index.slim.js +40 -0
- package/umd/pjs.d.ts +14 -0
- package/umd/pjs.js +36 -0
- package/umd/slim.d.ts +2 -0
- package/umd/slim.js +62 -0
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports", "./NumberUtils", "../Core", "./Utils"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getHslAnimationFromHsl = exports.getHslFromAnimation = exports.getLinkRandomColor = exports.getLinkColor = exports.colorMix = exports.getStyleFromHsv = exports.getStyleFromHsl = exports.getStyleFromRgb = exports.getRandomRgbColor = exports.rgbaToHsva = exports.rgbToHsv = exports.hsvaToRgba = exports.hsvToRgb = exports.hsvaToHsla = exports.hsvToHsl = exports.hslaToHsva = exports.hslToHsv = exports.hslaToRgba = exports.hslToRgb = exports.stringToRgb = exports.stringToAlpha = exports.rgbToHsl = exports.colorToHsl = exports.colorToRgb = void 0;
|
|
13
|
+
const NumberUtils_1 = require("./NumberUtils");
|
|
14
|
+
const Core_1 = require("../Core");
|
|
15
|
+
const Utils_1 = require("./Utils");
|
|
16
|
+
function hue2rgb(p, q, t) {
|
|
17
|
+
let tCalc = t;
|
|
18
|
+
if (tCalc < 0) {
|
|
19
|
+
tCalc += 1;
|
|
20
|
+
}
|
|
21
|
+
if (tCalc > 1) {
|
|
22
|
+
tCalc -= 1;
|
|
23
|
+
}
|
|
24
|
+
if (tCalc < 1 / 6) {
|
|
25
|
+
return p + (q - p) * 6 * tCalc;
|
|
26
|
+
}
|
|
27
|
+
if (tCalc < 1 / 2) {
|
|
28
|
+
return q;
|
|
29
|
+
}
|
|
30
|
+
if (tCalc < 2 / 3) {
|
|
31
|
+
return p + (q - p) * (2 / 3 - tCalc) * 6;
|
|
32
|
+
}
|
|
33
|
+
return p;
|
|
34
|
+
}
|
|
35
|
+
function stringToRgba(input) {
|
|
36
|
+
if (input.startsWith("rgb")) {
|
|
37
|
+
const regex = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.]+)\s*)?\)/i;
|
|
38
|
+
const result = regex.exec(input);
|
|
39
|
+
return result
|
|
40
|
+
? {
|
|
41
|
+
a: result.length > 4 ? parseFloat(result[5]) : 1,
|
|
42
|
+
b: parseInt(result[3], 10),
|
|
43
|
+
g: parseInt(result[2], 10),
|
|
44
|
+
r: parseInt(result[1], 10),
|
|
45
|
+
}
|
|
46
|
+
: undefined;
|
|
47
|
+
}
|
|
48
|
+
else if (input.startsWith("hsl")) {
|
|
49
|
+
const regex = /hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i;
|
|
50
|
+
const result = regex.exec(input);
|
|
51
|
+
return result
|
|
52
|
+
? hslaToRgba({
|
|
53
|
+
a: result.length > 4 ? parseFloat(result[5]) : 1,
|
|
54
|
+
h: parseInt(result[1], 10),
|
|
55
|
+
l: parseInt(result[3], 10),
|
|
56
|
+
s: parseInt(result[2], 10),
|
|
57
|
+
})
|
|
58
|
+
: undefined;
|
|
59
|
+
}
|
|
60
|
+
else if (input.startsWith("hsv")) {
|
|
61
|
+
const regex = /hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i;
|
|
62
|
+
const result = regex.exec(input);
|
|
63
|
+
return result
|
|
64
|
+
? hsvaToRgba({
|
|
65
|
+
a: result.length > 4 ? parseFloat(result[5]) : 1,
|
|
66
|
+
h: parseInt(result[1], 10),
|
|
67
|
+
s: parseInt(result[2], 10),
|
|
68
|
+
v: parseInt(result[3], 10),
|
|
69
|
+
})
|
|
70
|
+
: undefined;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;
|
|
74
|
+
const hexFixed = input.replace(shorthandRegex, (_m, r, g, b, a) => {
|
|
75
|
+
return r + r + g + g + b + b + (a !== undefined ? a + a : "");
|
|
76
|
+
});
|
|
77
|
+
const regex = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;
|
|
78
|
+
const result = regex.exec(hexFixed);
|
|
79
|
+
return result
|
|
80
|
+
? {
|
|
81
|
+
a: result[4] !== undefined ? parseInt(result[4], 16) / 0xff : 1,
|
|
82
|
+
b: parseInt(result[3], 16),
|
|
83
|
+
g: parseInt(result[2], 16),
|
|
84
|
+
r: parseInt(result[1], 16),
|
|
85
|
+
}
|
|
86
|
+
: undefined;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function colorToRgb(input, index, useIndex = true) {
|
|
90
|
+
var _a, _b, _c;
|
|
91
|
+
if (input === undefined) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const color = typeof input === "string" ? { value: input } : input;
|
|
95
|
+
let res;
|
|
96
|
+
if (typeof color.value === "string") {
|
|
97
|
+
if (color.value === Core_1.Constants.randomColorValue) {
|
|
98
|
+
res = getRandomRgbColor();
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
res = stringToRgb(color.value);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
if (color.value instanceof Array) {
|
|
106
|
+
const colorSelected = (0, Utils_1.itemFromArray)(color.value, index, useIndex);
|
|
107
|
+
res = colorToRgb({ value: colorSelected });
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
const colorValue = color.value;
|
|
111
|
+
const rgbColor = (_a = colorValue.rgb) !== null && _a !== void 0 ? _a : color.value;
|
|
112
|
+
if (rgbColor.r !== undefined) {
|
|
113
|
+
res = rgbColor;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
const hslColor = (_b = colorValue.hsl) !== null && _b !== void 0 ? _b : color.value;
|
|
117
|
+
if (hslColor.h !== undefined && hslColor.l !== undefined) {
|
|
118
|
+
res = hslToRgb(hslColor);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
const hsvColor = (_c = colorValue.hsv) !== null && _c !== void 0 ? _c : color.value;
|
|
122
|
+
if (hsvColor.h !== undefined && hsvColor.v !== undefined) {
|
|
123
|
+
res = hsvToRgb(hsvColor);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return res;
|
|
130
|
+
}
|
|
131
|
+
exports.colorToRgb = colorToRgb;
|
|
132
|
+
function colorToHsl(color, index, useIndex = true) {
|
|
133
|
+
const rgb = colorToRgb(color, index, useIndex);
|
|
134
|
+
return rgb !== undefined ? rgbToHsl(rgb) : undefined;
|
|
135
|
+
}
|
|
136
|
+
exports.colorToHsl = colorToHsl;
|
|
137
|
+
function rgbToHsl(color) {
|
|
138
|
+
const r1 = color.r / 255;
|
|
139
|
+
const g1 = color.g / 255;
|
|
140
|
+
const b1 = color.b / 255;
|
|
141
|
+
const max = Math.max(r1, g1, b1);
|
|
142
|
+
const min = Math.min(r1, g1, b1);
|
|
143
|
+
const res = {
|
|
144
|
+
h: 0,
|
|
145
|
+
l: (max + min) / 2,
|
|
146
|
+
s: 0,
|
|
147
|
+
};
|
|
148
|
+
if (max != min) {
|
|
149
|
+
res.s = res.l < 0.5 ? (max - min) / (max + min) : (max - min) / (2.0 - max - min);
|
|
150
|
+
res.h =
|
|
151
|
+
r1 === max
|
|
152
|
+
? (g1 - b1) / (max - min)
|
|
153
|
+
: (res.h = g1 === max ? 2.0 + (b1 - r1) / (max - min) : 4.0 + (r1 - g1) / (max - min));
|
|
154
|
+
}
|
|
155
|
+
res.l *= 100;
|
|
156
|
+
res.s *= 100;
|
|
157
|
+
res.h *= 60;
|
|
158
|
+
if (res.h < 0) {
|
|
159
|
+
res.h += 360;
|
|
160
|
+
}
|
|
161
|
+
return res;
|
|
162
|
+
}
|
|
163
|
+
exports.rgbToHsl = rgbToHsl;
|
|
164
|
+
function stringToAlpha(input) {
|
|
165
|
+
var _a;
|
|
166
|
+
return (_a = stringToRgba(input)) === null || _a === void 0 ? void 0 : _a.a;
|
|
167
|
+
}
|
|
168
|
+
exports.stringToAlpha = stringToAlpha;
|
|
169
|
+
function stringToRgb(input) {
|
|
170
|
+
return stringToRgba(input);
|
|
171
|
+
}
|
|
172
|
+
exports.stringToRgb = stringToRgb;
|
|
173
|
+
function hslToRgb(hsl) {
|
|
174
|
+
const result = { b: 0, g: 0, r: 0 };
|
|
175
|
+
const hslPercent = {
|
|
176
|
+
h: hsl.h / 360,
|
|
177
|
+
l: hsl.l / 100,
|
|
178
|
+
s: hsl.s / 100,
|
|
179
|
+
};
|
|
180
|
+
if (hslPercent.s === 0) {
|
|
181
|
+
result.b = hslPercent.l;
|
|
182
|
+
result.g = hslPercent.l;
|
|
183
|
+
result.r = hslPercent.l;
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
const q = hslPercent.l < 0.5
|
|
187
|
+
? hslPercent.l * (1 + hslPercent.s)
|
|
188
|
+
: hslPercent.l + hslPercent.s - hslPercent.l * hslPercent.s;
|
|
189
|
+
const p = 2 * hslPercent.l - q;
|
|
190
|
+
result.r = hue2rgb(p, q, hslPercent.h + 1 / 3);
|
|
191
|
+
result.g = hue2rgb(p, q, hslPercent.h);
|
|
192
|
+
result.b = hue2rgb(p, q, hslPercent.h - 1 / 3);
|
|
193
|
+
}
|
|
194
|
+
result.r = Math.floor(result.r * 255);
|
|
195
|
+
result.g = Math.floor(result.g * 255);
|
|
196
|
+
result.b = Math.floor(result.b * 255);
|
|
197
|
+
return result;
|
|
198
|
+
}
|
|
199
|
+
exports.hslToRgb = hslToRgb;
|
|
200
|
+
function hslaToRgba(hsla) {
|
|
201
|
+
const rgbResult = hslToRgb(hsla);
|
|
202
|
+
return {
|
|
203
|
+
a: hsla.a,
|
|
204
|
+
b: rgbResult.b,
|
|
205
|
+
g: rgbResult.g,
|
|
206
|
+
r: rgbResult.r,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
exports.hslaToRgba = hslaToRgba;
|
|
210
|
+
function hslToHsv(hsl) {
|
|
211
|
+
const l = hsl.l / 100, sl = hsl.s / 100;
|
|
212
|
+
const v = l + sl * Math.min(l, 1 - l), sv = !v ? 0 : 2 * (1 - l / v);
|
|
213
|
+
return {
|
|
214
|
+
h: hsl.h,
|
|
215
|
+
s: sv * 100,
|
|
216
|
+
v: v * 100,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
exports.hslToHsv = hslToHsv;
|
|
220
|
+
function hslaToHsva(hsla) {
|
|
221
|
+
const hsvResult = hslToHsv(hsla);
|
|
222
|
+
return {
|
|
223
|
+
a: hsla.a,
|
|
224
|
+
h: hsvResult.h,
|
|
225
|
+
s: hsvResult.s,
|
|
226
|
+
v: hsvResult.v,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
exports.hslaToHsva = hslaToHsva;
|
|
230
|
+
function hsvToHsl(hsv) {
|
|
231
|
+
const v = hsv.v / 100, sv = hsv.s / 100;
|
|
232
|
+
const l = v * (1 - sv / 2), sl = l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l);
|
|
233
|
+
return {
|
|
234
|
+
h: hsv.h,
|
|
235
|
+
l: l * 100,
|
|
236
|
+
s: sl * 100,
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
exports.hsvToHsl = hsvToHsl;
|
|
240
|
+
function hsvaToHsla(hsva) {
|
|
241
|
+
const hslResult = hsvToHsl(hsva);
|
|
242
|
+
return {
|
|
243
|
+
a: hsva.a,
|
|
244
|
+
h: hslResult.h,
|
|
245
|
+
l: hslResult.l,
|
|
246
|
+
s: hslResult.s,
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
exports.hsvaToHsla = hsvaToHsla;
|
|
250
|
+
function hsvToRgb(hsv) {
|
|
251
|
+
const result = { b: 0, g: 0, r: 0 };
|
|
252
|
+
const hsvPercent = {
|
|
253
|
+
h: hsv.h / 60,
|
|
254
|
+
s: hsv.s / 100,
|
|
255
|
+
v: hsv.v / 100,
|
|
256
|
+
};
|
|
257
|
+
const c = hsvPercent.v * hsvPercent.s, x = c * (1 - Math.abs((hsvPercent.h % 2) - 1));
|
|
258
|
+
let tempRgb;
|
|
259
|
+
if (hsvPercent.h >= 0 && hsvPercent.h <= 1) {
|
|
260
|
+
tempRgb = {
|
|
261
|
+
r: c,
|
|
262
|
+
g: x,
|
|
263
|
+
b: 0,
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
else if (hsvPercent.h > 1 && hsvPercent.h <= 2) {
|
|
267
|
+
tempRgb = {
|
|
268
|
+
r: x,
|
|
269
|
+
g: c,
|
|
270
|
+
b: 0,
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
else if (hsvPercent.h > 2 && hsvPercent.h <= 3) {
|
|
274
|
+
tempRgb = {
|
|
275
|
+
r: 0,
|
|
276
|
+
g: c,
|
|
277
|
+
b: x,
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
else if (hsvPercent.h > 3 && hsvPercent.h <= 4) {
|
|
281
|
+
tempRgb = {
|
|
282
|
+
r: 0,
|
|
283
|
+
g: x,
|
|
284
|
+
b: c,
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
else if (hsvPercent.h > 4 && hsvPercent.h <= 5) {
|
|
288
|
+
tempRgb = {
|
|
289
|
+
r: x,
|
|
290
|
+
g: 0,
|
|
291
|
+
b: c,
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
else if (hsvPercent.h > 5 && hsvPercent.h <= 6) {
|
|
295
|
+
tempRgb = {
|
|
296
|
+
r: c,
|
|
297
|
+
g: 0,
|
|
298
|
+
b: x,
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
if (tempRgb) {
|
|
302
|
+
const m = hsvPercent.v - c;
|
|
303
|
+
result.r = Math.floor((tempRgb.r + m) * 255);
|
|
304
|
+
result.g = Math.floor((tempRgb.g + m) * 255);
|
|
305
|
+
result.b = Math.floor((tempRgb.b + m) * 255);
|
|
306
|
+
}
|
|
307
|
+
return result;
|
|
308
|
+
}
|
|
309
|
+
exports.hsvToRgb = hsvToRgb;
|
|
310
|
+
function hsvaToRgba(hsva) {
|
|
311
|
+
const rgbResult = hsvToRgb(hsva);
|
|
312
|
+
return {
|
|
313
|
+
a: hsva.a,
|
|
314
|
+
b: rgbResult.b,
|
|
315
|
+
g: rgbResult.g,
|
|
316
|
+
r: rgbResult.r,
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
exports.hsvaToRgba = hsvaToRgba;
|
|
320
|
+
function rgbToHsv(rgb) {
|
|
321
|
+
const rgbPercent = {
|
|
322
|
+
r: rgb.r / 255,
|
|
323
|
+
g: rgb.g / 255,
|
|
324
|
+
b: rgb.b / 255,
|
|
325
|
+
}, xMax = Math.max(rgbPercent.r, rgbPercent.g, rgbPercent.b), xMin = Math.min(rgbPercent.r, rgbPercent.g, rgbPercent.b), v = xMax, c = xMax - xMin;
|
|
326
|
+
let h = 0;
|
|
327
|
+
if (v === rgbPercent.r) {
|
|
328
|
+
h = 60 * ((rgbPercent.g - rgbPercent.b) / c);
|
|
329
|
+
}
|
|
330
|
+
else if (v === rgbPercent.g) {
|
|
331
|
+
h = 60 * (2 + (rgbPercent.b - rgbPercent.r) / c);
|
|
332
|
+
}
|
|
333
|
+
else if (v === rgbPercent.b) {
|
|
334
|
+
h = 60 * (4 + (rgbPercent.r - rgbPercent.g) / c);
|
|
335
|
+
}
|
|
336
|
+
const s = !v ? 0 : c / v;
|
|
337
|
+
return {
|
|
338
|
+
h,
|
|
339
|
+
s: s * 100,
|
|
340
|
+
v: v * 100,
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
exports.rgbToHsv = rgbToHsv;
|
|
344
|
+
function rgbaToHsva(rgba) {
|
|
345
|
+
const hsvResult = rgbToHsv(rgba);
|
|
346
|
+
return {
|
|
347
|
+
a: rgba.a,
|
|
348
|
+
h: hsvResult.h,
|
|
349
|
+
s: hsvResult.s,
|
|
350
|
+
v: hsvResult.v,
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
exports.rgbaToHsva = rgbaToHsva;
|
|
354
|
+
function getRandomRgbColor(min) {
|
|
355
|
+
const fixedMin = min !== null && min !== void 0 ? min : 0;
|
|
356
|
+
return {
|
|
357
|
+
b: Math.floor((0, NumberUtils_1.randomInRange)((0, NumberUtils_1.setRangeValue)(fixedMin, 256))),
|
|
358
|
+
g: Math.floor((0, NumberUtils_1.randomInRange)((0, NumberUtils_1.setRangeValue)(fixedMin, 256))),
|
|
359
|
+
r: Math.floor((0, NumberUtils_1.randomInRange)((0, NumberUtils_1.setRangeValue)(fixedMin, 256))),
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
exports.getRandomRgbColor = getRandomRgbColor;
|
|
363
|
+
function getStyleFromRgb(color, opacity) {
|
|
364
|
+
return `rgba(${color.r}, ${color.g}, ${color.b}, ${opacity !== null && opacity !== void 0 ? opacity : 1})`;
|
|
365
|
+
}
|
|
366
|
+
exports.getStyleFromRgb = getStyleFromRgb;
|
|
367
|
+
function getStyleFromHsl(color, opacity) {
|
|
368
|
+
return `hsla(${color.h}, ${color.s}%, ${color.l}%, ${opacity !== null && opacity !== void 0 ? opacity : 1})`;
|
|
369
|
+
}
|
|
370
|
+
exports.getStyleFromHsl = getStyleFromHsl;
|
|
371
|
+
function getStyleFromHsv(color, opacity) {
|
|
372
|
+
return getStyleFromHsl(hsvToHsl(color), opacity);
|
|
373
|
+
}
|
|
374
|
+
exports.getStyleFromHsv = getStyleFromHsv;
|
|
375
|
+
function colorMix(color1, color2, size1, size2) {
|
|
376
|
+
let rgb1 = color1;
|
|
377
|
+
let rgb2 = color2;
|
|
378
|
+
if (rgb1.r === undefined) {
|
|
379
|
+
rgb1 = hslToRgb(color1);
|
|
380
|
+
}
|
|
381
|
+
if (rgb2.r === undefined) {
|
|
382
|
+
rgb2 = hslToRgb(color2);
|
|
383
|
+
}
|
|
384
|
+
return {
|
|
385
|
+
b: (0, NumberUtils_1.mix)(rgb1.b, rgb2.b, size1, size2),
|
|
386
|
+
g: (0, NumberUtils_1.mix)(rgb1.g, rgb2.g, size1, size2),
|
|
387
|
+
r: (0, NumberUtils_1.mix)(rgb1.r, rgb2.r, size1, size2),
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
exports.colorMix = colorMix;
|
|
391
|
+
function getLinkColor(p1, p2, linkColor) {
|
|
392
|
+
var _a, _b;
|
|
393
|
+
if (linkColor === Core_1.Constants.randomColorValue) {
|
|
394
|
+
return getRandomRgbColor();
|
|
395
|
+
}
|
|
396
|
+
else if (linkColor === "mid") {
|
|
397
|
+
const sourceColor = (_a = p1.getFillColor()) !== null && _a !== void 0 ? _a : p1.getStrokeColor();
|
|
398
|
+
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();
|
|
399
|
+
if (sourceColor && destColor && p2) {
|
|
400
|
+
return colorMix(sourceColor, destColor, p1.getRadius(), p2.getRadius());
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
const hslColor = sourceColor !== null && sourceColor !== void 0 ? sourceColor : destColor;
|
|
404
|
+
if (hslColor) {
|
|
405
|
+
return hslToRgb(hslColor);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
else {
|
|
410
|
+
return linkColor;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
exports.getLinkColor = getLinkColor;
|
|
414
|
+
function getLinkRandomColor(optColor, blink, consent) {
|
|
415
|
+
const color = typeof optColor === "string" ? optColor : optColor.value;
|
|
416
|
+
if (color === Core_1.Constants.randomColorValue) {
|
|
417
|
+
if (consent) {
|
|
418
|
+
return colorToRgb({
|
|
419
|
+
value: color,
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
else if (blink) {
|
|
423
|
+
return Core_1.Constants.randomColorValue;
|
|
424
|
+
}
|
|
425
|
+
else {
|
|
426
|
+
return Core_1.Constants.midColorValue;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
else {
|
|
430
|
+
return colorToRgb({
|
|
431
|
+
value: color,
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
exports.getLinkRandomColor = getLinkRandomColor;
|
|
436
|
+
function getHslFromAnimation(animation) {
|
|
437
|
+
return animation !== undefined
|
|
438
|
+
? {
|
|
439
|
+
h: animation.h.value,
|
|
440
|
+
s: animation.s.value,
|
|
441
|
+
l: animation.l.value,
|
|
442
|
+
}
|
|
443
|
+
: undefined;
|
|
444
|
+
}
|
|
445
|
+
exports.getHslFromAnimation = getHslFromAnimation;
|
|
446
|
+
function getHslAnimationFromHsl(hsl, animationOptions, reduceFactor) {
|
|
447
|
+
const resColor = {
|
|
448
|
+
h: {
|
|
449
|
+
enable: false,
|
|
450
|
+
value: hsl.h,
|
|
451
|
+
},
|
|
452
|
+
s: {
|
|
453
|
+
enable: false,
|
|
454
|
+
value: hsl.s,
|
|
455
|
+
},
|
|
456
|
+
l: {
|
|
457
|
+
enable: false,
|
|
458
|
+
value: hsl.l,
|
|
459
|
+
},
|
|
460
|
+
};
|
|
461
|
+
if (animationOptions) {
|
|
462
|
+
setColorAnimation(resColor.h, animationOptions.h, reduceFactor);
|
|
463
|
+
setColorAnimation(resColor.s, animationOptions.s, reduceFactor);
|
|
464
|
+
setColorAnimation(resColor.l, animationOptions.l, reduceFactor);
|
|
465
|
+
}
|
|
466
|
+
return resColor;
|
|
467
|
+
}
|
|
468
|
+
exports.getHslAnimationFromHsl = getHslAnimationFromHsl;
|
|
469
|
+
function setColorAnimation(colorValue, colorAnimation, reduceFactor) {
|
|
470
|
+
colorValue.enable = colorAnimation.enable;
|
|
471
|
+
if (colorValue.enable) {
|
|
472
|
+
colorValue.velocity = (colorAnimation.speed / 100) * reduceFactor;
|
|
473
|
+
if (colorAnimation.sync) {
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
colorValue.status = 0;
|
|
477
|
+
colorValue.velocity *= Math.random();
|
|
478
|
+
if (colorValue.value) {
|
|
479
|
+
colorValue.value *= Math.random();
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
else {
|
|
483
|
+
colorValue.velocity = 0;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EasingType, MoveDirection, MoveDirectionAlt } from "../Enums";
|
|
2
|
+
import type { ICoordinates } from "../Core";
|
|
3
|
+
import type { IValueWithRandom } from "../Options/Interfaces/IValueWithRandom";
|
|
4
|
+
import { RangeValue } from "../Types";
|
|
5
|
+
import { Vector } from "../Core";
|
|
6
|
+
export declare function clamp(num: number, min: number, max: number): number;
|
|
7
|
+
export declare function mix(comp1: number, comp2: number, weight1: number, weight2: number): number;
|
|
8
|
+
export declare function randomInRange(r: RangeValue): number;
|
|
9
|
+
export declare function getRangeValue(value: RangeValue): number;
|
|
10
|
+
export declare function getRangeMin(value: RangeValue): number;
|
|
11
|
+
export declare function getRangeMax(value: RangeValue): number;
|
|
12
|
+
export declare function setRangeValue(source: RangeValue, value?: number): RangeValue;
|
|
13
|
+
export declare function getValue(options: IValueWithRandom): number;
|
|
14
|
+
export declare function getDistances(pointA: ICoordinates, pointB: ICoordinates): {
|
|
15
|
+
dx: number;
|
|
16
|
+
dy: number;
|
|
17
|
+
distance: number;
|
|
18
|
+
};
|
|
19
|
+
export declare function getDistance(pointA: ICoordinates, pointB: ICoordinates): number;
|
|
20
|
+
export declare function getParticleDirectionAngle(direction: MoveDirection | keyof typeof MoveDirection | MoveDirectionAlt | number): number;
|
|
21
|
+
export declare function getParticleBaseVelocity(direction: number): Vector;
|
|
22
|
+
export declare function collisionVelocity(v1: Vector, v2: Vector, m1: number, m2: number): Vector;
|
|
23
|
+
export declare function calcEasing(value: number, type: EasingType): number;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports", "../Core"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.calcEasing = exports.collisionVelocity = exports.getParticleBaseVelocity = exports.getParticleDirectionAngle = exports.getDistance = exports.getDistances = exports.getValue = exports.setRangeValue = exports.getRangeMax = exports.getRangeMin = exports.getRangeValue = exports.randomInRange = exports.mix = exports.clamp = void 0;
|
|
13
|
+
const Core_1 = require("../Core");
|
|
14
|
+
function clamp(num, min, max) {
|
|
15
|
+
return Math.min(Math.max(num, min), max);
|
|
16
|
+
}
|
|
17
|
+
exports.clamp = clamp;
|
|
18
|
+
function mix(comp1, comp2, weight1, weight2) {
|
|
19
|
+
return Math.floor((comp1 * weight1 + comp2 * weight2) / (weight1 + weight2));
|
|
20
|
+
}
|
|
21
|
+
exports.mix = mix;
|
|
22
|
+
function randomInRange(r) {
|
|
23
|
+
const max = getRangeMax(r);
|
|
24
|
+
let min = getRangeMin(r);
|
|
25
|
+
if (max === min) {
|
|
26
|
+
min = 0;
|
|
27
|
+
}
|
|
28
|
+
return Math.random() * (max - min) + min;
|
|
29
|
+
}
|
|
30
|
+
exports.randomInRange = randomInRange;
|
|
31
|
+
function getRangeValue(value) {
|
|
32
|
+
return typeof value === "number" ? value : randomInRange(value);
|
|
33
|
+
}
|
|
34
|
+
exports.getRangeValue = getRangeValue;
|
|
35
|
+
function getRangeMin(value) {
|
|
36
|
+
return typeof value === "number" ? value : value.min;
|
|
37
|
+
}
|
|
38
|
+
exports.getRangeMin = getRangeMin;
|
|
39
|
+
function getRangeMax(value) {
|
|
40
|
+
return typeof value === "number" ? value : value.max;
|
|
41
|
+
}
|
|
42
|
+
exports.getRangeMax = getRangeMax;
|
|
43
|
+
function setRangeValue(source, value) {
|
|
44
|
+
if (source === value || (value === undefined && typeof source === "number")) {
|
|
45
|
+
return source;
|
|
46
|
+
}
|
|
47
|
+
const min = getRangeMin(source), max = getRangeMax(source);
|
|
48
|
+
return value !== undefined
|
|
49
|
+
? {
|
|
50
|
+
min: Math.min(min, value),
|
|
51
|
+
max: Math.max(max, value),
|
|
52
|
+
}
|
|
53
|
+
: setRangeValue(min, max);
|
|
54
|
+
}
|
|
55
|
+
exports.setRangeValue = setRangeValue;
|
|
56
|
+
function getValue(options) {
|
|
57
|
+
const random = options.random;
|
|
58
|
+
const { enable, minimumValue } = typeof random === "boolean" ? { enable: random, minimumValue: 0 } : random;
|
|
59
|
+
return enable ? getRangeValue(setRangeValue(options.value, minimumValue)) : getRangeValue(options.value);
|
|
60
|
+
}
|
|
61
|
+
exports.getValue = getValue;
|
|
62
|
+
function getDistances(pointA, pointB) {
|
|
63
|
+
const dx = pointA.x - pointB.x;
|
|
64
|
+
const dy = pointA.y - pointB.y;
|
|
65
|
+
return { dx: dx, dy: dy, distance: Math.sqrt(dx * dx + dy * dy) };
|
|
66
|
+
}
|
|
67
|
+
exports.getDistances = getDistances;
|
|
68
|
+
function getDistance(pointA, pointB) {
|
|
69
|
+
return getDistances(pointA, pointB).distance;
|
|
70
|
+
}
|
|
71
|
+
exports.getDistance = getDistance;
|
|
72
|
+
function getParticleDirectionAngle(direction) {
|
|
73
|
+
if (typeof direction === "number") {
|
|
74
|
+
return (direction * Math.PI) / 180;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
switch (direction) {
|
|
78
|
+
case "top":
|
|
79
|
+
return -Math.PI / 2;
|
|
80
|
+
case "top-right":
|
|
81
|
+
return -Math.PI / 4;
|
|
82
|
+
case "right":
|
|
83
|
+
return 0;
|
|
84
|
+
case "bottom-right":
|
|
85
|
+
return Math.PI / 4;
|
|
86
|
+
case "bottom":
|
|
87
|
+
return Math.PI / 2;
|
|
88
|
+
case "bottom-left":
|
|
89
|
+
return (3 * Math.PI) / 4;
|
|
90
|
+
case "left":
|
|
91
|
+
return Math.PI;
|
|
92
|
+
case "top-left":
|
|
93
|
+
return (-3 * Math.PI) / 4;
|
|
94
|
+
case "none":
|
|
95
|
+
default:
|
|
96
|
+
return Math.random() * Math.PI * 2;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.getParticleDirectionAngle = getParticleDirectionAngle;
|
|
101
|
+
function getParticleBaseVelocity(direction) {
|
|
102
|
+
const baseVelocity = Core_1.Vector.origin;
|
|
103
|
+
baseVelocity.length = 1;
|
|
104
|
+
baseVelocity.angle = direction;
|
|
105
|
+
return baseVelocity;
|
|
106
|
+
}
|
|
107
|
+
exports.getParticleBaseVelocity = getParticleBaseVelocity;
|
|
108
|
+
function collisionVelocity(v1, v2, m1, m2) {
|
|
109
|
+
return Core_1.Vector.create((v1.x * (m1 - m2)) / (m1 + m2) + (v2.x * 2 * m2) / (m1 + m2), v1.y);
|
|
110
|
+
}
|
|
111
|
+
exports.collisionVelocity = collisionVelocity;
|
|
112
|
+
function calcEasing(value, type) {
|
|
113
|
+
switch (type) {
|
|
114
|
+
case "ease-out-quad":
|
|
115
|
+
return 1 - (1 - value) ** 2;
|
|
116
|
+
case "ease-out-cubic":
|
|
117
|
+
return 1 - (1 - value) ** 3;
|
|
118
|
+
case "ease-out-quart":
|
|
119
|
+
return 1 - (1 - value) ** 4;
|
|
120
|
+
case "ease-out-quint":
|
|
121
|
+
return 1 - (1 - value) ** 5;
|
|
122
|
+
case "ease-out-expo":
|
|
123
|
+
return value === 1 ? 1 : 1 - Math.pow(2, -10 * value);
|
|
124
|
+
case "ease-out-sine":
|
|
125
|
+
return Math.sin((value * Math.PI) / 2);
|
|
126
|
+
case "ease-out-back": {
|
|
127
|
+
const c1 = 1.70158;
|
|
128
|
+
const c3 = c1 + 1;
|
|
129
|
+
return 1 + c3 * Math.pow(value - 1, 3) + c1 * Math.pow(value - 1, 2);
|
|
130
|
+
}
|
|
131
|
+
case "ease-out-circ":
|
|
132
|
+
return Math.sqrt(1 - Math.pow(value - 1, 2));
|
|
133
|
+
default:
|
|
134
|
+
return value;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
exports.calcEasing = calcEasing;
|
|
138
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DivMode, OutModeDirection } from "../Enums";
|
|
2
|
+
import type { IBounds, ICircleBouncer, ICoordinates, IDimension, IParticle } from "../Core";
|
|
3
|
+
import { DivEvent } from "../Options/Classes/Interactivity/Events/DivEvent";
|
|
4
|
+
import type { ICharacterShape } from "../Options/Interfaces/Particles/Shape/ICharacterShape";
|
|
5
|
+
import type { IModeDiv } from "../Options/Interfaces/Interactivity/Modes/IModeDiv";
|
|
6
|
+
import type { SingleOrMultiple } from "../Types";
|
|
7
|
+
declare global {
|
|
8
|
+
interface Window {
|
|
9
|
+
customRequestAnimationFrame: (callback: FrameRequestCallback) => number;
|
|
10
|
+
mozRequestAnimationFrame: (callback: FrameRequestCallback) => number;
|
|
11
|
+
oRequestAnimationFrame: (callback: FrameRequestCallback) => number;
|
|
12
|
+
msRequestAnimationFrame: (callback: FrameRequestCallback) => number;
|
|
13
|
+
webkitRequestAnimationFrame: (callback: FrameRequestCallback) => number;
|
|
14
|
+
customCancelRequestAnimationFrame: (handle: number) => void;
|
|
15
|
+
webkitCancelRequestAnimationFrame: (handle: number) => void;
|
|
16
|
+
mozCancelRequestAnimationFrame: (handle: number) => void;
|
|
17
|
+
oCancelRequestAnimationFrame: (handle: number) => void;
|
|
18
|
+
msCancelRequestAnimationFrame: (handle: number) => void;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export declare function isSsr(): boolean;
|
|
22
|
+
export declare function animate(): (callback: FrameRequestCallback) => number;
|
|
23
|
+
export declare function cancelAnimation(): (handle: number) => void;
|
|
24
|
+
export declare function isInArray<T>(value: T, array: SingleOrMultiple<T>): boolean;
|
|
25
|
+
export declare function loadFont(character: ICharacterShape): Promise<void>;
|
|
26
|
+
export declare function arrayRandomIndex<T>(array: T[]): number;
|
|
27
|
+
export declare function itemFromArray<T>(array: T[], index?: number, useIndex?: boolean): T;
|
|
28
|
+
export declare function isPointInside(point: ICoordinates, size: IDimension, radius?: number, direction?: OutModeDirection): boolean;
|
|
29
|
+
export declare function areBoundsInside(bounds: IBounds, size: IDimension, direction?: OutModeDirection): boolean;
|
|
30
|
+
export declare function calculateBounds(point: ICoordinates, radius: number): IBounds;
|
|
31
|
+
export declare function deepExtend(destination: unknown, ...sources: unknown[]): unknown;
|
|
32
|
+
export declare function isDivModeEnabled(mode: DivMode, divs: SingleOrMultiple<DivEvent>): boolean;
|
|
33
|
+
export declare function divModeExecute(mode: DivMode, divs: SingleOrMultiple<DivEvent>, callback: (id: string, div: DivEvent) => void): void;
|
|
34
|
+
export declare function singleDivModeExecute(div: DivEvent, callback: (selector: string, div: DivEvent) => void): void;
|
|
35
|
+
export declare function divMode<T extends IModeDiv>(divs?: SingleOrMultiple<T>, element?: HTMLElement): T | undefined;
|
|
36
|
+
export declare function circleBounceDataFromParticle(p: IParticle): ICircleBouncer;
|
|
37
|
+
export declare function circleBounce(p1: ICircleBouncer, p2: ICircleBouncer): void;
|
|
38
|
+
export declare function rectBounce(particle: IParticle, divBounds: IBounds): void;
|