tsparticles 1.39.0 → 1.39.1
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/Canvas.d.ts +1 -1
- package/Core/Canvas.js +27 -27
- package/Core/Container.d.ts +5 -5
- package/Core/Container.js +3 -3
- package/Core/Interfaces/Gradients.d.ts +2 -2
- package/Core/Interfaces/ICircleBouncer.d.ts +1 -1
- package/Core/Interfaces/IContainerPlugin.d.ts +4 -4
- package/Core/Interfaces/IExternalInteractor.d.ts +1 -1
- package/Core/Interfaces/IInteractor.d.ts +1 -1
- package/Core/Interfaces/IParticle.d.ts +8 -8
- package/Core/Interfaces/IParticleGradientAnimation.d.ts +1 -1
- package/Core/Interfaces/IParticleSpin.d.ts +1 -1
- package/Core/Interfaces/IParticlesInteractor.d.ts +2 -2
- package/Core/Interfaces/IPlugin.d.ts +1 -1
- package/Core/Loader.d.ts +1 -1
- package/Core/Loader.js +7 -7
- package/Core/Particle.d.ts +3 -3
- package/Core/Particle.js +31 -31
- package/Core/Particles.d.ts +3 -3
- package/Core/Particles.js +15 -15
- package/Core/Utils/Circle.d.ts +1 -1
- package/Core/Utils/CircleWarp.d.ts +1 -1
- package/Core/Utils/CircleWarp.js +1 -1
- package/Core/Utils/EventListeners.js +1 -1
- package/Core/Utils/ExternalInteractorBase.d.ts +1 -1
- package/Core/Utils/InteractionManager.d.ts +1 -1
- package/Core/Utils/ParticlesInteractorBase.d.ts +1 -1
- package/Core/Utils/ParticlesMover.d.ts +1 -1
- package/Core/Utils/Plugins.d.ts +1 -1
- package/Core/Utils/QuadTree.d.ts +3 -3
- package/Core/Utils/QuadTree.js +1 -1
- package/Core/Utils/Rectangle.d.ts +1 -1
- package/Core/Utils/Vector3d.d.ts +1 -1
- package/Interactions/External/Attract/Attractor.d.ts +1 -1
- package/Interactions/External/Attract/Attractor.js +1 -1
- package/Interactions/External/Attract/index.d.ts +1 -1
- package/Interactions/External/Attract/index.js +2 -2
- package/Interactions/External/Bounce/Bouncer.d.ts +1 -1
- package/Interactions/External/Bounce/Bouncer.js +1 -1
- package/Interactions/External/Bounce/index.d.ts +1 -1
- package/Interactions/External/Bounce/index.js +2 -2
- package/Interactions/External/Bubble/Bubbler.d.ts +1 -1
- package/Interactions/External/Bubble/Bubbler.js +1 -1
- package/Interactions/External/Bubble/index.d.ts +1 -1
- package/Interactions/External/Bubble/index.js +2 -2
- package/Interactions/External/Connect/Connector.js +1 -1
- package/Interactions/External/Connect/index.d.ts +1 -1
- package/Interactions/External/Connect/index.js +2 -2
- package/Interactions/External/Grab/Grabber.d.ts +1 -1
- package/Interactions/External/Grab/Grabber.js +1 -1
- package/Interactions/External/Grab/index.d.ts +1 -1
- package/Interactions/External/Grab/index.js +2 -2
- package/Interactions/External/Repulse/Repulser.d.ts +1 -1
- package/Interactions/External/Repulse/Repulser.js +1 -1
- package/Interactions/External/Repulse/index.d.ts +1 -1
- package/Interactions/External/Repulse/index.js +2 -2
- package/Interactions/External/Trail/TrailMaker.js +1 -1
- package/Interactions/External/Trail/index.d.ts +1 -1
- package/Interactions/External/Trail/index.js +2 -2
- package/Interactions/Particles/Attract/Attractor.js +1 -1
- package/Interactions/Particles/Attract/index.d.ts +1 -1
- package/Interactions/Particles/Attract/index.js +2 -2
- package/Interactions/Particles/Collisions/index.d.ts +1 -1
- package/Interactions/Particles/Collisions/index.js +2 -2
- package/Interactions/Particles/Links/LinkParticle.d.ts +1 -1
- package/Interactions/Particles/Links/Linker.d.ts +1 -1
- package/Interactions/Particles/Links/Linker.js +1 -1
- package/Interactions/Particles/Links/index.d.ts +1 -1
- package/Interactions/Particles/Links/index.js +4 -4
- package/Interactions/Particles/Links/interaction.d.ts +1 -1
- package/Interactions/Particles/Links/interaction.js +2 -2
- package/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/Interactions/Particles/Links/plugin.js +2 -2
- package/Options/Classes/AnimatableColor.d.ts +3 -3
- package/Options/Classes/AnimatableColor.js +1 -1
- package/Options/Classes/AnimatableGradient.d.ts +6 -6
- package/Options/Classes/AnimationOptions.d.ts +2 -2
- package/Options/Classes/Background/Background.d.ts +2 -2
- package/Options/Classes/BackgroundMask/BackgroundMask.d.ts +2 -2
- package/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +2 -2
- package/Options/Classes/ColorAnimation.d.ts +1 -1
- package/Options/Classes/HslAnimation.d.ts +2 -2
- package/Options/Classes/Interactivity/Events/ClickEvent.d.ts +2 -2
- package/Options/Classes/Interactivity/Events/DivEvent.d.ts +1 -1
- package/Options/Classes/Interactivity/Events/Events.d.ts +2 -2
- package/Options/Classes/Interactivity/Events/HoverEvent.d.ts +3 -3
- package/Options/Classes/Interactivity/Events/Parallax.d.ts +1 -1
- package/Options/Classes/Interactivity/Interactivity.d.ts +2 -2
- package/Options/Classes/Interactivity/Modes/Attract.d.ts +2 -2
- package/Options/Classes/Interactivity/Modes/Bubble.d.ts +2 -2
- package/Options/Classes/Interactivity/Modes/Bubble.js +1 -1
- package/Options/Classes/Interactivity/Modes/BubbleBase.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/BubbleDiv.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/Connect.d.ts +2 -2
- package/Options/Classes/Interactivity/Modes/ConnectLinks.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/Grab.d.ts +2 -2
- package/Options/Classes/Interactivity/Modes/GrabLinks.d.ts +2 -2
- package/Options/Classes/Interactivity/Modes/Light.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/Modes.d.ts +7 -7
- package/Options/Classes/Interactivity/Modes/Modes.js +4 -4
- package/Options/Classes/Interactivity/Modes/Push.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/Remove.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/Repulse.d.ts +3 -3
- package/Options/Classes/Interactivity/Modes/Repulse.js +1 -1
- package/Options/Classes/Interactivity/Modes/RepulseBase.d.ts +2 -2
- package/Options/Classes/Interactivity/Modes/RepulseDiv.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/Slow.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/Trail.d.ts +2 -2
- package/Options/Classes/ManualParticle.d.ts +2 -2
- package/Options/Classes/Motion/Motion.d.ts +1 -1
- package/Options/Classes/Options.d.ts +7 -7
- package/Options/Classes/Options.js +7 -7
- package/Options/Classes/OptionsColor.d.ts +2 -2
- package/Options/Classes/Particles/Bounce/Bounce.d.ts +1 -1
- package/Options/Classes/Particles/Collisions/Collisions.d.ts +4 -4
- package/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +2 -2
- package/Options/Classes/Particles/Destroy/Destroy.d.ts +1 -1
- package/Options/Classes/Particles/Destroy/Split.d.ts +3 -3
- package/Options/Classes/Particles/Life/Life.d.ts +1 -1
- package/Options/Classes/Particles/Links/Links.d.ts +2 -2
- package/Options/Classes/Particles/Links/LinksShadow.d.ts +2 -2
- package/Options/Classes/Particles/Links/LinksTriangle.d.ts +1 -1
- package/Options/Classes/Particles/Move/Attract.d.ts +2 -2
- package/Options/Classes/Particles/Move/Move.d.ts +5 -5
- package/Options/Classes/Particles/Move/Move.js +3 -3
- package/Options/Classes/Particles/Move/OutModes.d.ts +2 -2
- package/Options/Classes/Particles/Move/Path/Path.d.ts +3 -3
- package/Options/Classes/Particles/Move/Spin.d.ts +3 -3
- package/Options/Classes/Particles/Move/Trail.d.ts +2 -2
- package/Options/Classes/Particles/Number/Density.d.ts +1 -1
- package/Options/Classes/Particles/Number/ParticlesNumber.d.ts +2 -2
- package/Options/Classes/Particles/Opacity/Opacity.d.ts +1 -1
- package/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +3 -3
- package/Options/Classes/Particles/Orbit/Orbit.d.ts +5 -5
- package/Options/Classes/Particles/Orbit/Orbit.js +2 -2
- package/Options/Classes/Particles/Orbit/OrbitRotation.d.ts +1 -1
- package/Options/Classes/Particles/ParticlesOptions.d.ts +16 -16
- package/Options/Classes/Particles/ParticlesOptions.js +13 -13
- package/Options/Classes/Particles/Repulse/Repulse.d.ts +1 -1
- package/Options/Classes/Particles/Roll/Roll.d.ts +2 -2
- package/Options/Classes/Particles/Roll/RollLight.d.ts +1 -1
- package/Options/Classes/Particles/Rotate/Rotate.d.ts +3 -3
- package/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +1 -1
- package/Options/Classes/Particles/Shadow.d.ts +3 -3
- package/Options/Classes/Particles/Shape/Shape.d.ts +5 -5
- package/Options/Classes/Particles/Size/Size.d.ts +2 -2
- package/Options/Classes/Particles/Size/SizeAnimation.d.ts +3 -3
- package/Options/Classes/Particles/Stroke.d.ts +2 -2
- package/Options/Classes/Particles/Tilt/Tilt.d.ts +3 -3
- package/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +1 -1
- package/Options/Classes/Particles/Twinkle/Twinkle.d.ts +1 -1
- package/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
- package/Options/Classes/Particles/Wobble/Wobble.d.ts +2 -2
- package/Options/Classes/Particles/ZIndex/ZIndex.d.ts +1 -1
- package/Options/Classes/Random.d.ts +1 -1
- package/Options/Classes/Responsive.d.ts +2 -2
- package/Options/Classes/Theme/Theme.d.ts +2 -2
- package/Options/Classes/Theme/Theme.js +1 -1
- package/Options/Classes/Theme/ThemeDefault.d.ts +2 -2
- package/Options/Classes/ValueWithRandom.d.ts +2 -2
- package/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +1 -1
- package/Options/Interfaces/IAnimatableColor.d.ts +1 -1
- package/Options/Interfaces/IAnimatableGradient.d.ts +1 -1
- package/Options/Interfaces/IColorAnimation.d.ts +1 -1
- package/Options/Interfaces/IManualParticle.d.ts +1 -1
- package/Options/Interfaces/IOptions.d.ts +6 -6
- package/Options/Interfaces/IOptionsGradient.d.ts +2 -2
- package/Options/Interfaces/IResponsive.d.ts +2 -2
- package/Options/Interfaces/IValueWithRandom.d.ts +1 -1
- package/Options/Interfaces/Interactivity/Events/IEvents.d.ts +1 -1
- package/Options/Interfaces/Interactivity/IInteractivity.d.ts +1 -1
- package/Options/Interfaces/Interactivity/Modes/IBubble.d.ts +2 -2
- package/Options/Interfaces/Interactivity/Modes/IBubbleBase.d.ts +1 -1
- package/Options/Interfaces/Interactivity/Modes/IModes.d.ts +2 -2
- package/Options/Interfaces/Interactivity/Modes/IRepulse.d.ts +2 -2
- package/Options/Interfaces/Interactivity/Modes/IRepulseDiv.d.ts +1 -1
- package/Options/Interfaces/Particles/Destroy/ISplit.d.ts +1 -1
- package/Options/Interfaces/Particles/IParticles.d.ts +14 -14
- package/Options/Interfaces/Particles/IShadow.d.ts +1 -1
- package/Options/Interfaces/Particles/IStroke.d.ts +1 -1
- package/Options/Interfaces/Particles/Links/ILinks.d.ts +1 -1
- package/Options/Interfaces/Particles/Move/IMove.d.ts +5 -5
- package/Options/Interfaces/Particles/Move/Path/{iPath.d.ts → IPath.d.ts} +0 -0
- package/Options/Interfaces/Particles/Move/Path/{iPath.js → IPath.js} +0 -0
- package/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +3 -3
- package/Options/Interfaces/Particles/Roll/IRoll.d.ts +1 -1
- package/Options/Interfaces/Particles/Rotate/IRotate.d.ts +1 -1
- package/Options/Interfaces/Particles/Shape/IShape.d.ts +3 -3
- package/Options/Interfaces/Particles/Tilt/ITilt.d.ts +1 -1
- package/Options/Interfaces/Theme/ITheme.d.ts +2 -2
- package/Plugins/Absorbers/AbsorberInstance.d.ts +5 -4
- package/Plugins/Absorbers/AbsorberInstance.js +18 -18
- package/Plugins/Absorbers/Absorbers.d.ts +3 -3
- package/Plugins/Absorbers/Absorbers.js +1 -1
- package/Plugins/Absorbers/Options/Classes/Absorber.d.ts +4 -4
- package/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -2
- package/Plugins/Absorbers/Options/Classes/AbsorberSize.js +1 -1
- package/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +2 -2
- package/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +1 -2
- package/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.d.ts +1 -1
- package/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +1 -1
- package/Plugins/Absorbers/index.d.ts +1 -1
- package/Plugins/Absorbers/index.js +3 -3
- package/Plugins/Emitters/EmitterContainer.d.ts +2 -1
- package/Plugins/Emitters/EmitterInstance.d.ts +5 -3
- package/Plugins/Emitters/EmitterInstance.js +34 -35
- package/Plugins/Emitters/Emitters.d.ts +3 -3
- package/Plugins/Emitters/Emitters.js +11 -3
- package/Plugins/Emitters/Options/Classes/Emitter.d.ts +7 -7
- package/Plugins/Emitters/Options/Classes/Emitter.js +3 -3
- package/Plugins/Emitters/Options/Classes/EmitterLife.d.ts +1 -1
- package/Plugins/Emitters/Options/Classes/EmitterRate.d.ts +1 -1
- package/Plugins/Emitters/Options/Classes/EmitterSize.d.ts +1 -1
- package/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +6 -6
- package/Plugins/Emitters/Options/Interfaces/IEmitterOptions.d.ts +1 -1
- package/Plugins/Emitters/Options/Interfaces/IEmitterSize.d.ts +1 -1
- package/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +1 -1
- package/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +1 -1
- package/Plugins/Emitters/index.d.ts +1 -1
- package/Plugins/Emitters/index.js +9 -9
- package/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +5 -5
- package/Plugins/PolygonMask/Options/Classes/PolygonMask.js +1 -1
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.d.ts +2 -2
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.js +1 -1
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.d.ts +2 -2
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +2 -2
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +3 -3
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +2 -2
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +3 -3
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +1 -1
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.d.ts +1 -1
- package/Plugins/PolygonMask/PolygonMaskInstance.d.ts +3 -3
- package/Plugins/PolygonMask/PolygonMaskInstance.js +12 -12
- package/Plugins/PolygonMask/Types.d.ts +1 -1
- package/Plugins/PolygonMask/index.d.ts +1 -1
- package/Plugins/PolygonMask/index.js +3 -3
- package/README.md +160 -16
- package/Shapes/Circle/index.d.ts +1 -1
- package/Shapes/Circle/index.js +2 -2
- package/Shapes/Image/index.d.ts +1 -1
- package/Shapes/Image/index.js +3 -3
- package/Shapes/Line/index.d.ts +1 -1
- package/Shapes/Line/index.js +2 -2
- package/Shapes/Polygon/PolygonDrawer.d.ts +1 -1
- package/Shapes/Polygon/TriangleDrawer.d.ts +1 -1
- package/Shapes/Polygon/index.d.ts +3 -3
- package/Shapes/Polygon/index.js +7 -7
- package/Shapes/Square/index.d.ts +1 -1
- package/Shapes/Square/index.js +3 -3
- package/Shapes/Star/index.d.ts +1 -1
- package/Shapes/Star/index.js +2 -2
- package/Shapes/Text/index.d.ts +1 -1
- package/Shapes/Text/index.js +2 -2
- package/Types/ShapeData.d.ts +1 -1
- package/Types/ShapeDrawerFunctions.d.ts +1 -1
- package/Updaters/Angle/index.d.ts +1 -1
- package/Updaters/Angle/index.js +2 -2
- package/Updaters/Color/index.d.ts +1 -1
- package/Updaters/Color/index.js +2 -2
- package/Updaters/Life/index.d.ts +1 -1
- package/Updaters/Life/index.js +2 -2
- package/Updaters/Opacity/index.d.ts +1 -1
- package/Updaters/Opacity/index.js +2 -2
- package/Updaters/OutModes/IBounceData.d.ts +1 -1
- package/Updaters/OutModes/OutOfCanvasUpdater.js +9 -9
- package/Updaters/OutModes/index.d.ts +1 -1
- package/Updaters/OutModes/index.js +2 -2
- package/Updaters/Roll/index.d.ts +1 -1
- package/Updaters/Roll/index.js +2 -2
- package/Updaters/Size/index.d.ts +1 -1
- package/Updaters/Size/index.js +2 -2
- package/Updaters/StrokeColor/index.d.ts +1 -1
- package/Updaters/StrokeColor/index.js +2 -2
- package/Updaters/Tilt/index.d.ts +1 -1
- package/Updaters/Tilt/index.js +2 -2
- package/Updaters/Wobble/index.d.ts +1 -1
- package/Updaters/Wobble/index.js +2 -2
- package/Utils/CanvasUtils.d.ts +2 -3
- package/Utils/CanvasUtils.js +1 -1
- package/Utils/ColorUtils.js +1 -1
- package/Utils/NumberUtils.d.ts +2 -2
- package/Utils/Utils.d.ts +3 -3
- package/browser/Core/Canvas.d.ts +1 -1
- package/browser/Core/Canvas.js +1 -1
- package/browser/Core/Container.d.ts +5 -5
- package/browser/Core/Container.js +3 -3
- package/browser/Core/Interfaces/Gradients.d.ts +2 -2
- package/browser/Core/Interfaces/ICircleBouncer.d.ts +1 -1
- package/browser/Core/Interfaces/IContainerPlugin.d.ts +4 -4
- package/browser/Core/Interfaces/IExternalInteractor.d.ts +1 -1
- package/browser/Core/Interfaces/IInteractor.d.ts +1 -1
- package/browser/Core/Interfaces/IParticle.d.ts +8 -8
- package/browser/Core/Interfaces/IParticleGradientAnimation.d.ts +1 -1
- package/browser/Core/Interfaces/IParticleSpin.d.ts +1 -1
- package/browser/Core/Interfaces/IParticlesInteractor.d.ts +2 -2
- package/browser/Core/Interfaces/IPlugin.d.ts +1 -1
- package/browser/Core/Loader.d.ts +1 -1
- package/browser/Core/Loader.js +1 -1
- package/browser/Core/Particle.d.ts +3 -3
- package/browser/Core/Particle.js +2 -2
- package/browser/Core/Particles.d.ts +3 -3
- package/browser/Core/Particles.js +2 -2
- package/browser/Core/Utils/Circle.d.ts +1 -1
- package/browser/Core/Utils/CircleWarp.d.ts +1 -1
- package/browser/Core/Utils/CircleWarp.js +1 -1
- package/browser/Core/Utils/EventListeners.js +1 -1
- package/browser/Core/Utils/ExternalInteractorBase.d.ts +1 -1
- package/browser/Core/Utils/InteractionManager.d.ts +1 -1
- package/browser/Core/Utils/ParticlesInteractorBase.d.ts +1 -1
- package/browser/Core/Utils/ParticlesMover.d.ts +1 -1
- package/browser/Core/Utils/Plugins.d.ts +1 -1
- package/browser/Core/Utils/QuadTree.d.ts +3 -3
- package/browser/Core/Utils/QuadTree.js +1 -1
- package/browser/Core/Utils/Rectangle.d.ts +1 -1
- package/browser/Core/Utils/Vector3d.d.ts +1 -1
- package/browser/Interactions/External/Attract/Attractor.d.ts +1 -1
- package/browser/Interactions/External/Attract/Attractor.js +1 -1
- package/browser/Interactions/External/Attract/index.d.ts +1 -1
- package/browser/Interactions/External/Attract/index.js +2 -2
- package/browser/Interactions/External/Bounce/Bouncer.d.ts +1 -1
- package/browser/Interactions/External/Bounce/Bouncer.js +1 -1
- package/browser/Interactions/External/Bounce/index.d.ts +1 -1
- package/browser/Interactions/External/Bounce/index.js +2 -2
- package/browser/Interactions/External/Bubble/Bubbler.d.ts +1 -1
- package/browser/Interactions/External/Bubble/Bubbler.js +1 -1
- package/browser/Interactions/External/Bubble/index.d.ts +1 -1
- package/browser/Interactions/External/Bubble/index.js +2 -2
- package/browser/Interactions/External/Connect/Connector.js +1 -1
- package/browser/Interactions/External/Connect/index.d.ts +1 -1
- package/browser/Interactions/External/Connect/index.js +2 -2
- package/browser/Interactions/External/Grab/Grabber.d.ts +1 -1
- package/browser/Interactions/External/Grab/Grabber.js +1 -1
- package/browser/Interactions/External/Grab/index.d.ts +1 -1
- package/browser/Interactions/External/Grab/index.js +2 -2
- package/browser/Interactions/External/Repulse/Repulser.d.ts +1 -1
- package/browser/Interactions/External/Repulse/Repulser.js +1 -1
- package/browser/Interactions/External/Repulse/index.d.ts +1 -1
- package/browser/Interactions/External/Repulse/index.js +2 -2
- package/browser/Interactions/External/Trail/TrailMaker.js +1 -1
- package/browser/Interactions/External/Trail/index.d.ts +1 -1
- package/browser/Interactions/External/Trail/index.js +2 -2
- package/browser/Interactions/Particles/Attract/Attractor.js +1 -1
- package/browser/Interactions/Particles/Attract/index.d.ts +1 -1
- package/browser/Interactions/Particles/Attract/index.js +2 -2
- package/browser/Interactions/Particles/Collisions/index.d.ts +1 -1
- package/browser/Interactions/Particles/Collisions/index.js +2 -2
- package/browser/Interactions/Particles/Links/LinkParticle.d.ts +1 -1
- package/browser/Interactions/Particles/Links/Linker.d.ts +1 -1
- package/browser/Interactions/Particles/Links/Linker.js +1 -1
- package/browser/Interactions/Particles/Links/index.d.ts +1 -1
- package/browser/Interactions/Particles/Links/index.js +4 -4
- package/browser/Interactions/Particles/Links/interaction.d.ts +1 -1
- package/browser/Interactions/Particles/Links/interaction.js +2 -2
- package/browser/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/browser/Interactions/Particles/Links/plugin.js +2 -2
- package/browser/Options/Classes/AnimatableColor.d.ts +3 -3
- package/browser/Options/Classes/AnimatableColor.js +1 -1
- package/browser/Options/Classes/AnimatableGradient.d.ts +6 -6
- package/browser/Options/Classes/AnimationOptions.d.ts +2 -2
- package/browser/Options/Classes/Background/Background.d.ts +2 -2
- package/browser/Options/Classes/BackgroundMask/BackgroundMask.d.ts +2 -2
- package/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +2 -2
- package/browser/Options/Classes/ColorAnimation.d.ts +1 -1
- package/browser/Options/Classes/HslAnimation.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Events/ClickEvent.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Events/DivEvent.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Events/Events.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Events/HoverEvent.d.ts +3 -3
- package/browser/Options/Classes/Interactivity/Events/Parallax.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Interactivity.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Modes/Attract.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Modes/Bubble.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Modes/Bubble.js +1 -1
- package/browser/Options/Classes/Interactivity/Modes/BubbleBase.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/BubbleDiv.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Connect.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Modes/ConnectLinks.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Grab.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Modes/GrabLinks.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Modes/Light.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Modes.d.ts +7 -7
- package/browser/Options/Classes/Interactivity/Modes/Modes.js +4 -4
- package/browser/Options/Classes/Interactivity/Modes/Push.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Remove.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Repulse.d.ts +3 -3
- package/browser/Options/Classes/Interactivity/Modes/Repulse.js +1 -1
- package/browser/Options/Classes/Interactivity/Modes/RepulseBase.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Modes/RepulseDiv.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Slow.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Trail.d.ts +2 -2
- package/browser/Options/Classes/ManualParticle.d.ts +2 -2
- package/browser/Options/Classes/Motion/Motion.d.ts +1 -1
- package/browser/Options/Classes/Options.d.ts +7 -7
- package/browser/Options/Classes/Options.js +7 -7
- package/browser/Options/Classes/OptionsColor.d.ts +2 -2
- package/browser/Options/Classes/Particles/Bounce/Bounce.d.ts +1 -1
- package/browser/Options/Classes/Particles/Collisions/Collisions.d.ts +4 -4
- package/browser/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +2 -2
- package/browser/Options/Classes/Particles/Destroy/Destroy.d.ts +1 -1
- package/browser/Options/Classes/Particles/Destroy/Split.d.ts +3 -3
- package/browser/Options/Classes/Particles/Life/Life.d.ts +1 -1
- package/browser/Options/Classes/Particles/Links/Links.d.ts +2 -2
- package/browser/Options/Classes/Particles/Links/LinksShadow.d.ts +2 -2
- package/browser/Options/Classes/Particles/Links/LinksTriangle.d.ts +1 -1
- package/browser/Options/Classes/Particles/Move/Attract.d.ts +2 -2
- package/browser/Options/Classes/Particles/Move/Move.d.ts +5 -5
- package/browser/Options/Classes/Particles/Move/Move.js +3 -3
- package/browser/Options/Classes/Particles/Move/OutModes.d.ts +2 -2
- package/browser/Options/Classes/Particles/Move/Path/Path.d.ts +3 -3
- package/browser/Options/Classes/Particles/Move/Spin.d.ts +3 -3
- package/browser/Options/Classes/Particles/Move/Trail.d.ts +2 -2
- package/browser/Options/Classes/Particles/Number/Density.d.ts +1 -1
- package/browser/Options/Classes/Particles/Number/ParticlesNumber.d.ts +2 -2
- package/browser/Options/Classes/Particles/Opacity/Opacity.d.ts +1 -1
- package/browser/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +3 -3
- package/browser/Options/Classes/Particles/Orbit/Orbit.d.ts +5 -5
- package/browser/Options/Classes/Particles/Orbit/Orbit.js +2 -2
- package/browser/Options/Classes/Particles/Orbit/OrbitRotation.d.ts +1 -1
- package/browser/Options/Classes/Particles/ParticlesOptions.d.ts +16 -16
- package/browser/Options/Classes/Particles/ParticlesOptions.js +13 -13
- package/browser/Options/Classes/Particles/Repulse/Repulse.d.ts +1 -1
- package/browser/Options/Classes/Particles/Roll/Roll.d.ts +2 -2
- package/browser/Options/Classes/Particles/Roll/RollLight.d.ts +1 -1
- package/browser/Options/Classes/Particles/Rotate/Rotate.d.ts +3 -3
- package/browser/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +1 -1
- package/browser/Options/Classes/Particles/Shadow.d.ts +3 -3
- package/browser/Options/Classes/Particles/Shape/Shape.d.ts +5 -5
- package/browser/Options/Classes/Particles/Size/Size.d.ts +2 -2
- package/browser/Options/Classes/Particles/Size/SizeAnimation.d.ts +3 -3
- package/browser/Options/Classes/Particles/Stroke.d.ts +2 -2
- package/browser/Options/Classes/Particles/Tilt/Tilt.d.ts +3 -3
- package/browser/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +1 -1
- package/browser/Options/Classes/Particles/Twinkle/Twinkle.d.ts +1 -1
- package/browser/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
- package/browser/Options/Classes/Particles/Wobble/Wobble.d.ts +2 -2
- package/browser/Options/Classes/Particles/ZIndex/ZIndex.d.ts +1 -1
- package/browser/Options/Classes/Random.d.ts +1 -1
- package/browser/Options/Classes/Responsive.d.ts +2 -2
- package/browser/Options/Classes/Theme/Theme.d.ts +2 -2
- package/browser/Options/Classes/Theme/Theme.js +1 -1
- package/browser/Options/Classes/Theme/ThemeDefault.d.ts +2 -2
- package/browser/Options/Classes/ValueWithRandom.d.ts +2 -2
- package/browser/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +1 -1
- package/browser/Options/Interfaces/IAnimatableColor.d.ts +1 -1
- package/browser/Options/Interfaces/IAnimatableGradient.d.ts +1 -1
- package/browser/Options/Interfaces/IColorAnimation.d.ts +1 -1
- package/browser/Options/Interfaces/IColorAnimation.js +0 -4
- package/browser/Options/Interfaces/IManualParticle.d.ts +1 -1
- package/browser/Options/Interfaces/IOptions.d.ts +6 -6
- package/browser/Options/Interfaces/IOptionsGradient.d.ts +2 -2
- package/browser/Options/Interfaces/IResponsive.d.ts +2 -2
- package/browser/Options/Interfaces/IValueWithRandom.d.ts +1 -1
- package/browser/Options/Interfaces/Interactivity/Events/IEvents.d.ts +1 -1
- package/browser/Options/Interfaces/Interactivity/IInteractivity.d.ts +1 -1
- package/browser/Options/Interfaces/Interactivity/Modes/IBubble.d.ts +2 -2
- package/browser/Options/Interfaces/Interactivity/Modes/IBubbleBase.d.ts +1 -1
- package/browser/Options/Interfaces/Interactivity/Modes/IModes.d.ts +2 -2
- package/browser/Options/Interfaces/Interactivity/Modes/IRepulse.d.ts +2 -2
- package/browser/Options/Interfaces/Interactivity/Modes/IRepulseDiv.d.ts +1 -1
- package/browser/Options/Interfaces/Particles/Destroy/ISplit.d.ts +1 -1
- package/browser/Options/Interfaces/Particles/IParticles.d.ts +14 -14
- package/browser/Options/Interfaces/Particles/IShadow.d.ts +1 -1
- package/browser/Options/Interfaces/Particles/IStroke.d.ts +1 -1
- package/browser/Options/Interfaces/Particles/Links/ILinks.d.ts +1 -1
- package/browser/Options/Interfaces/Particles/Move/IMove.d.ts +5 -5
- package/browser/Options/Interfaces/Particles/Move/Path/{iPath.d.ts → IPath.d.ts} +0 -0
- package/browser/Options/Interfaces/Particles/Move/Path/{iPath.js → IPath.js} +0 -0
- package/browser/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +3 -3
- package/browser/Options/Interfaces/Particles/Roll/IRoll.d.ts +1 -1
- package/browser/Options/Interfaces/Particles/Rotate/IRotate.d.ts +1 -1
- package/browser/Options/Interfaces/Particles/Shape/IShape.d.ts +3 -3
- package/browser/Options/Interfaces/Particles/Tilt/ITilt.d.ts +1 -1
- package/browser/Options/Interfaces/Theme/ITheme.d.ts +2 -2
- package/browser/Plugins/Absorbers/AbsorberInstance.d.ts +5 -4
- package/browser/Plugins/Absorbers/AbsorberInstance.js +18 -18
- package/browser/Plugins/Absorbers/Absorbers.d.ts +3 -3
- package/browser/Plugins/Absorbers/Absorbers.js +1 -1
- package/browser/Plugins/Absorbers/Options/Classes/Absorber.d.ts +4 -4
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -2
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSize.js +1 -1
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +2 -2
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +1 -2
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.d.ts +1 -1
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +1 -1
- package/browser/Plugins/Absorbers/index.d.ts +1 -1
- package/browser/Plugins/Absorbers/index.js +3 -3
- package/browser/Plugins/Emitters/EmitterContainer.d.ts +2 -1
- package/browser/Plugins/Emitters/EmitterInstance.d.ts +5 -3
- package/browser/Plugins/Emitters/EmitterInstance.js +34 -35
- package/browser/Plugins/Emitters/Emitters.d.ts +3 -3
- package/browser/Plugins/Emitters/Emitters.js +11 -3
- package/browser/Plugins/Emitters/Options/Classes/Emitter.d.ts +7 -7
- package/browser/Plugins/Emitters/Options/Classes/Emitter.js +3 -3
- package/browser/Plugins/Emitters/Options/Classes/EmitterLife.d.ts +1 -1
- package/browser/Plugins/Emitters/Options/Classes/EmitterRate.d.ts +1 -1
- package/browser/Plugins/Emitters/Options/Classes/EmitterSize.d.ts +1 -1
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +6 -6
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitterOptions.d.ts +1 -1
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitterSize.d.ts +1 -1
- package/browser/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +1 -1
- package/browser/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +1 -1
- package/browser/Plugins/Emitters/index.d.ts +1 -1
- package/browser/Plugins/Emitters/index.js +9 -9
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +5 -5
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMask.js +1 -1
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.d.ts +2 -2
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.js +1 -1
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.d.ts +2 -2
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +2 -2
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +3 -3
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +2 -2
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +3 -3
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +1 -1
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.d.ts +1 -1
- package/browser/Plugins/PolygonMask/PolygonMaskInstance.d.ts +3 -3
- package/browser/Plugins/PolygonMask/PolygonMaskInstance.js +2 -2
- package/browser/Plugins/PolygonMask/Types.d.ts +1 -1
- package/browser/Plugins/PolygonMask/index.d.ts +1 -1
- package/browser/Plugins/PolygonMask/index.js +3 -3
- package/browser/Shapes/Circle/index.d.ts +1 -1
- package/browser/Shapes/Circle/index.js +2 -2
- package/browser/Shapes/Image/index.d.ts +1 -1
- package/browser/Shapes/Image/index.js +3 -3
- package/browser/Shapes/Line/index.d.ts +1 -1
- package/browser/Shapes/Line/index.js +2 -2
- package/browser/Shapes/Polygon/PolygonDrawer.d.ts +1 -1
- package/browser/Shapes/Polygon/TriangleDrawer.d.ts +1 -1
- package/browser/Shapes/Polygon/index.d.ts +3 -3
- package/browser/Shapes/Polygon/index.js +7 -7
- package/browser/Shapes/Square/index.d.ts +1 -1
- package/browser/Shapes/Square/index.js +3 -3
- package/browser/Shapes/Star/index.d.ts +1 -1
- package/browser/Shapes/Star/index.js +2 -2
- package/browser/Shapes/Text/index.d.ts +1 -1
- package/browser/Shapes/Text/index.js +3 -3
- package/browser/Types/ShapeData.d.ts +1 -1
- package/browser/Types/ShapeDrawerFunctions.d.ts +1 -1
- package/browser/Updaters/Angle/index.d.ts +1 -1
- package/browser/Updaters/Angle/index.js +2 -2
- package/browser/Updaters/Color/index.d.ts +1 -1
- package/browser/Updaters/Color/index.js +2 -2
- package/browser/Updaters/Life/index.d.ts +1 -1
- package/browser/Updaters/Life/index.js +2 -2
- package/browser/Updaters/Opacity/index.d.ts +1 -1
- package/browser/Updaters/Opacity/index.js +2 -2
- package/browser/Updaters/OutModes/IBounceData.d.ts +1 -1
- package/browser/Updaters/OutModes/OutOfCanvasUpdater.js +1 -1
- package/browser/Updaters/OutModes/index.d.ts +1 -1
- package/browser/Updaters/OutModes/index.js +2 -2
- package/browser/Updaters/Roll/index.d.ts +1 -1
- package/browser/Updaters/Roll/index.js +2 -2
- package/browser/Updaters/Size/index.d.ts +1 -1
- package/browser/Updaters/Size/index.js +2 -2
- package/browser/Updaters/StrokeColor/index.d.ts +1 -1
- package/browser/Updaters/StrokeColor/index.js +2 -2
- package/browser/Updaters/Tilt/index.d.ts +1 -1
- package/browser/Updaters/Tilt/index.js +2 -2
- package/browser/Updaters/Wobble/index.d.ts +1 -1
- package/browser/Updaters/Wobble/index.js +2 -2
- package/browser/Utils/CanvasUtils.d.ts +2 -3
- package/browser/Utils/CanvasUtils.js +1 -1
- package/browser/Utils/ColorUtils.js +1 -1
- package/browser/Utils/NumberUtils.d.ts +2 -2
- package/browser/Utils/Utils.d.ts +3 -3
- package/browser/Utils/Utils.js +1 -1
- package/browser/engine.d.ts +2 -2
- package/browser/full.d.ts +1 -1
- package/browser/full.js +14 -14
- package/browser/index.d.ts +1 -1
- package/browser/index.engine.d.ts +1 -1
- package/browser/index.engine.js +1 -1
- package/browser/index.js +1 -1
- package/browser/index.slim.d.ts +1 -1
- package/browser/index.slim.js +1 -1
- package/browser/pjs.d.ts +1 -1
- package/browser/slim.d.ts +1 -1
- package/browser/slim.js +40 -40
- package/engine.d.ts +2 -2
- package/esm/Core/Canvas.d.ts +1 -1
- package/esm/Core/Canvas.js +1 -1
- package/esm/Core/Container.d.ts +5 -5
- package/esm/Core/Container.js +3 -3
- package/esm/Core/Interfaces/Gradients.d.ts +2 -2
- package/esm/Core/Interfaces/ICircleBouncer.d.ts +1 -1
- package/esm/Core/Interfaces/IContainerPlugin.d.ts +4 -4
- package/esm/Core/Interfaces/IExternalInteractor.d.ts +1 -1
- package/esm/Core/Interfaces/IInteractor.d.ts +1 -1
- package/esm/Core/Interfaces/IParticle.d.ts +8 -8
- package/esm/Core/Interfaces/IParticleGradientAnimation.d.ts +1 -1
- package/esm/Core/Interfaces/IParticleSpin.d.ts +1 -1
- package/esm/Core/Interfaces/IParticlesInteractor.d.ts +2 -2
- package/esm/Core/Interfaces/IPlugin.d.ts +1 -1
- package/esm/Core/Loader.d.ts +1 -1
- package/esm/Core/Loader.js +1 -1
- package/esm/Core/Particle.d.ts +3 -3
- package/esm/Core/Particle.js +2 -2
- package/esm/Core/Particles.d.ts +3 -3
- package/esm/Core/Particles.js +2 -2
- package/esm/Core/Utils/Circle.d.ts +1 -1
- package/esm/Core/Utils/CircleWarp.d.ts +1 -1
- package/esm/Core/Utils/CircleWarp.js +1 -1
- package/esm/Core/Utils/EventListeners.js +1 -1
- package/esm/Core/Utils/ExternalInteractorBase.d.ts +1 -1
- package/esm/Core/Utils/InteractionManager.d.ts +1 -1
- package/esm/Core/Utils/ParticlesInteractorBase.d.ts +1 -1
- package/esm/Core/Utils/ParticlesMover.d.ts +1 -1
- package/esm/Core/Utils/Plugins.d.ts +1 -1
- package/esm/Core/Utils/QuadTree.d.ts +3 -3
- package/esm/Core/Utils/QuadTree.js +1 -1
- package/esm/Core/Utils/Rectangle.d.ts +1 -1
- package/esm/Core/Utils/Vector3d.d.ts +1 -1
- package/esm/Interactions/External/Attract/Attractor.d.ts +1 -1
- package/esm/Interactions/External/Attract/Attractor.js +1 -1
- package/esm/Interactions/External/Attract/index.d.ts +1 -1
- package/esm/Interactions/External/Attract/index.js +2 -2
- package/esm/Interactions/External/Bounce/Bouncer.d.ts +1 -1
- package/esm/Interactions/External/Bounce/Bouncer.js +1 -1
- package/esm/Interactions/External/Bounce/index.d.ts +1 -1
- package/esm/Interactions/External/Bounce/index.js +2 -2
- package/esm/Interactions/External/Bubble/Bubbler.d.ts +1 -1
- package/esm/Interactions/External/Bubble/Bubbler.js +1 -1
- package/esm/Interactions/External/Bubble/index.d.ts +1 -1
- package/esm/Interactions/External/Bubble/index.js +2 -2
- package/esm/Interactions/External/Connect/Connector.js +1 -1
- package/esm/Interactions/External/Connect/index.d.ts +1 -1
- package/esm/Interactions/External/Connect/index.js +2 -2
- package/esm/Interactions/External/Grab/Grabber.d.ts +1 -1
- package/esm/Interactions/External/Grab/Grabber.js +1 -1
- package/esm/Interactions/External/Grab/index.d.ts +1 -1
- package/esm/Interactions/External/Grab/index.js +2 -2
- package/esm/Interactions/External/Repulse/Repulser.d.ts +1 -1
- package/esm/Interactions/External/Repulse/Repulser.js +1 -1
- package/esm/Interactions/External/Repulse/index.d.ts +1 -1
- package/esm/Interactions/External/Repulse/index.js +2 -2
- package/esm/Interactions/External/Trail/TrailMaker.js +1 -1
- package/esm/Interactions/External/Trail/index.d.ts +1 -1
- package/esm/Interactions/External/Trail/index.js +2 -2
- package/esm/Interactions/Particles/Attract/Attractor.js +1 -1
- package/esm/Interactions/Particles/Attract/index.d.ts +1 -1
- package/esm/Interactions/Particles/Attract/index.js +2 -2
- package/esm/Interactions/Particles/Collisions/index.d.ts +1 -1
- package/esm/Interactions/Particles/Collisions/index.js +2 -2
- package/esm/Interactions/Particles/Links/LinkParticle.d.ts +1 -1
- package/esm/Interactions/Particles/Links/Linker.d.ts +1 -1
- package/esm/Interactions/Particles/Links/Linker.js +1 -1
- package/esm/Interactions/Particles/Links/index.d.ts +1 -1
- package/esm/Interactions/Particles/Links/index.js +4 -4
- package/esm/Interactions/Particles/Links/interaction.d.ts +1 -1
- package/esm/Interactions/Particles/Links/interaction.js +2 -2
- package/esm/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/esm/Interactions/Particles/Links/plugin.js +2 -2
- package/esm/Options/Classes/AnimatableColor.d.ts +3 -3
- package/esm/Options/Classes/AnimatableColor.js +1 -1
- package/esm/Options/Classes/AnimatableGradient.d.ts +6 -6
- package/esm/Options/Classes/AnimationOptions.d.ts +2 -2
- package/esm/Options/Classes/Background/Background.d.ts +2 -2
- package/esm/Options/Classes/BackgroundMask/BackgroundMask.d.ts +2 -2
- package/esm/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +2 -2
- package/esm/Options/Classes/ColorAnimation.d.ts +1 -1
- package/esm/Options/Classes/HslAnimation.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Events/ClickEvent.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Events/DivEvent.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Events/Events.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Events/HoverEvent.d.ts +3 -3
- package/esm/Options/Classes/Interactivity/Events/Parallax.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Interactivity.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Modes/Attract.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Modes/Bubble.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Modes/Bubble.js +1 -1
- package/esm/Options/Classes/Interactivity/Modes/BubbleBase.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/BubbleDiv.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Connect.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Modes/ConnectLinks.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Grab.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Modes/GrabLinks.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Modes/Light.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Modes.d.ts +7 -7
- package/esm/Options/Classes/Interactivity/Modes/Modes.js +4 -4
- package/esm/Options/Classes/Interactivity/Modes/Push.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Remove.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Repulse.d.ts +3 -3
- package/esm/Options/Classes/Interactivity/Modes/Repulse.js +1 -1
- package/esm/Options/Classes/Interactivity/Modes/RepulseBase.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Modes/RepulseDiv.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Slow.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Trail.d.ts +2 -2
- package/esm/Options/Classes/ManualParticle.d.ts +2 -2
- package/esm/Options/Classes/Motion/Motion.d.ts +1 -1
- package/esm/Options/Classes/Options.d.ts +7 -7
- package/esm/Options/Classes/Options.js +7 -7
- package/esm/Options/Classes/OptionsColor.d.ts +2 -2
- package/esm/Options/Classes/Particles/Bounce/Bounce.d.ts +1 -1
- package/esm/Options/Classes/Particles/Collisions/Collisions.d.ts +4 -4
- package/esm/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +2 -2
- package/esm/Options/Classes/Particles/Destroy/Destroy.d.ts +1 -1
- package/esm/Options/Classes/Particles/Destroy/Split.d.ts +3 -3
- package/esm/Options/Classes/Particles/Life/Life.d.ts +1 -1
- package/esm/Options/Classes/Particles/Links/Links.d.ts +2 -2
- package/esm/Options/Classes/Particles/Links/LinksShadow.d.ts +2 -2
- package/esm/Options/Classes/Particles/Links/LinksTriangle.d.ts +1 -1
- package/esm/Options/Classes/Particles/Move/Attract.d.ts +2 -2
- package/esm/Options/Classes/Particles/Move/Move.d.ts +5 -5
- package/esm/Options/Classes/Particles/Move/Move.js +3 -3
- package/esm/Options/Classes/Particles/Move/OutModes.d.ts +2 -2
- package/esm/Options/Classes/Particles/Move/Path/Path.d.ts +3 -3
- package/esm/Options/Classes/Particles/Move/Spin.d.ts +3 -3
- package/esm/Options/Classes/Particles/Move/Trail.d.ts +2 -2
- package/esm/Options/Classes/Particles/Number/Density.d.ts +1 -1
- package/esm/Options/Classes/Particles/Number/ParticlesNumber.d.ts +2 -2
- package/esm/Options/Classes/Particles/Opacity/Opacity.d.ts +1 -1
- package/esm/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +3 -3
- package/esm/Options/Classes/Particles/Orbit/Orbit.d.ts +5 -5
- package/esm/Options/Classes/Particles/Orbit/Orbit.js +2 -2
- package/esm/Options/Classes/Particles/Orbit/OrbitRotation.d.ts +1 -1
- package/esm/Options/Classes/Particles/ParticlesOptions.d.ts +16 -16
- package/esm/Options/Classes/Particles/ParticlesOptions.js +13 -13
- package/esm/Options/Classes/Particles/Repulse/Repulse.d.ts +1 -1
- package/esm/Options/Classes/Particles/Roll/Roll.d.ts +2 -2
- package/esm/Options/Classes/Particles/Roll/RollLight.d.ts +1 -1
- package/esm/Options/Classes/Particles/Rotate/Rotate.d.ts +3 -3
- package/esm/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +1 -1
- package/esm/Options/Classes/Particles/Shadow.d.ts +3 -3
- package/esm/Options/Classes/Particles/Shape/Shape.d.ts +5 -5
- package/esm/Options/Classes/Particles/Size/Size.d.ts +2 -2
- package/esm/Options/Classes/Particles/Size/SizeAnimation.d.ts +3 -3
- package/esm/Options/Classes/Particles/Stroke.d.ts +2 -2
- package/esm/Options/Classes/Particles/Tilt/Tilt.d.ts +3 -3
- package/esm/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +1 -1
- package/esm/Options/Classes/Particles/Twinkle/Twinkle.d.ts +1 -1
- package/esm/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
- package/esm/Options/Classes/Particles/Wobble/Wobble.d.ts +2 -2
- package/esm/Options/Classes/Particles/ZIndex/ZIndex.d.ts +1 -1
- package/esm/Options/Classes/Random.d.ts +1 -1
- package/esm/Options/Classes/Responsive.d.ts +2 -2
- package/esm/Options/Classes/Theme/Theme.d.ts +2 -2
- package/esm/Options/Classes/Theme/Theme.js +1 -1
- package/esm/Options/Classes/Theme/ThemeDefault.d.ts +2 -2
- package/esm/Options/Classes/ValueWithRandom.d.ts +2 -2
- package/esm/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +1 -1
- package/esm/Options/Interfaces/IAnimatableColor.d.ts +1 -1
- package/esm/Options/Interfaces/IAnimatableGradient.d.ts +1 -1
- package/esm/Options/Interfaces/IColorAnimation.d.ts +1 -1
- package/esm/Options/Interfaces/IManualParticle.d.ts +1 -1
- package/esm/Options/Interfaces/IOptions.d.ts +6 -6
- package/esm/Options/Interfaces/IOptionsGradient.d.ts +2 -2
- package/esm/Options/Interfaces/IResponsive.d.ts +2 -2
- package/esm/Options/Interfaces/IValueWithRandom.d.ts +1 -1
- package/esm/Options/Interfaces/Interactivity/Events/IEvents.d.ts +1 -1
- package/esm/Options/Interfaces/Interactivity/IInteractivity.d.ts +1 -1
- package/esm/Options/Interfaces/Interactivity/Modes/IBubble.d.ts +2 -2
- package/esm/Options/Interfaces/Interactivity/Modes/IBubbleBase.d.ts +1 -1
- package/esm/Options/Interfaces/Interactivity/Modes/IModes.d.ts +2 -2
- package/esm/Options/Interfaces/Interactivity/Modes/IRepulse.d.ts +2 -2
- package/esm/Options/Interfaces/Interactivity/Modes/IRepulseDiv.d.ts +1 -1
- package/esm/Options/Interfaces/Particles/Destroy/ISplit.d.ts +1 -1
- package/esm/Options/Interfaces/Particles/IParticles.d.ts +14 -14
- package/esm/Options/Interfaces/Particles/IShadow.d.ts +1 -1
- package/esm/Options/Interfaces/Particles/IStroke.d.ts +1 -1
- package/esm/Options/Interfaces/Particles/Links/ILinks.d.ts +1 -1
- package/esm/Options/Interfaces/Particles/Move/IMove.d.ts +5 -5
- package/esm/Options/Interfaces/Particles/Move/Path/{iPath.d.ts → IPath.d.ts} +0 -0
- package/esm/Options/Interfaces/Particles/Move/Path/{iPath.js → IPath.js} +0 -0
- package/esm/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +3 -3
- package/esm/Options/Interfaces/Particles/Roll/IRoll.d.ts +1 -1
- package/esm/Options/Interfaces/Particles/Rotate/IRotate.d.ts +1 -1
- package/esm/Options/Interfaces/Particles/Shape/IShape.d.ts +3 -3
- package/esm/Options/Interfaces/Particles/Tilt/ITilt.d.ts +1 -1
- package/esm/Options/Interfaces/Theme/ITheme.d.ts +2 -2
- package/esm/Plugins/Absorbers/AbsorberInstance.d.ts +5 -4
- package/esm/Plugins/Absorbers/AbsorberInstance.js +18 -18
- package/esm/Plugins/Absorbers/Absorbers.d.ts +3 -3
- package/esm/Plugins/Absorbers/Absorbers.js +1 -1
- package/esm/Plugins/Absorbers/Options/Classes/Absorber.d.ts +4 -4
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -2
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSize.js +1 -1
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +2 -2
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +1 -2
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.d.ts +1 -1
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +1 -1
- package/esm/Plugins/Absorbers/index.d.ts +1 -1
- package/esm/Plugins/Absorbers/index.js +3 -3
- package/esm/Plugins/Emitters/EmitterContainer.d.ts +2 -1
- package/esm/Plugins/Emitters/EmitterInstance.d.ts +5 -3
- package/esm/Plugins/Emitters/EmitterInstance.js +34 -35
- package/esm/Plugins/Emitters/Emitters.d.ts +3 -3
- package/esm/Plugins/Emitters/Emitters.js +11 -3
- package/esm/Plugins/Emitters/Options/Classes/Emitter.d.ts +7 -7
- package/esm/Plugins/Emitters/Options/Classes/Emitter.js +3 -3
- package/esm/Plugins/Emitters/Options/Classes/EmitterLife.d.ts +1 -1
- package/esm/Plugins/Emitters/Options/Classes/EmitterRate.d.ts +1 -1
- package/esm/Plugins/Emitters/Options/Classes/EmitterSize.d.ts +1 -1
- package/esm/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +6 -6
- package/esm/Plugins/Emitters/Options/Interfaces/IEmitterOptions.d.ts +1 -1
- package/esm/Plugins/Emitters/Options/Interfaces/IEmitterSize.d.ts +1 -1
- package/esm/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +1 -1
- package/esm/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +1 -1
- package/esm/Plugins/Emitters/index.d.ts +1 -1
- package/esm/Plugins/Emitters/index.js +9 -9
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +5 -5
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMask.js +1 -1
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.d.ts +2 -2
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.js +1 -1
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.d.ts +2 -2
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +2 -2
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +3 -3
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +2 -2
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +3 -3
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +1 -1
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.d.ts +1 -1
- package/esm/Plugins/PolygonMask/PolygonMaskInstance.d.ts +3 -3
- package/esm/Plugins/PolygonMask/PolygonMaskInstance.js +2 -2
- package/esm/Plugins/PolygonMask/Types.d.ts +1 -1
- package/esm/Plugins/PolygonMask/index.d.ts +1 -1
- package/esm/Plugins/PolygonMask/index.js +3 -3
- package/esm/Shapes/Circle/index.d.ts +1 -1
- package/esm/Shapes/Circle/index.js +2 -2
- package/esm/Shapes/Image/index.d.ts +1 -1
- package/esm/Shapes/Image/index.js +3 -3
- package/esm/Shapes/Line/index.d.ts +1 -1
- package/esm/Shapes/Line/index.js +2 -2
- package/esm/Shapes/Polygon/PolygonDrawer.d.ts +1 -1
- package/esm/Shapes/Polygon/TriangleDrawer.d.ts +1 -1
- package/esm/Shapes/Polygon/index.d.ts +3 -3
- package/esm/Shapes/Polygon/index.js +7 -7
- package/esm/Shapes/Square/index.d.ts +1 -1
- package/esm/Shapes/Square/index.js +3 -3
- package/esm/Shapes/Star/index.d.ts +1 -1
- package/esm/Shapes/Star/index.js +2 -2
- package/esm/Shapes/Text/index.d.ts +1 -1
- package/esm/Shapes/Text/index.js +3 -3
- package/esm/Types/ShapeData.d.ts +1 -1
- package/esm/Types/ShapeDrawerFunctions.d.ts +1 -1
- package/esm/Updaters/Angle/index.d.ts +1 -1
- package/esm/Updaters/Angle/index.js +2 -2
- package/esm/Updaters/Color/index.d.ts +1 -1
- package/esm/Updaters/Color/index.js +2 -2
- package/esm/Updaters/Life/index.d.ts +1 -1
- package/esm/Updaters/Life/index.js +2 -2
- package/esm/Updaters/Opacity/index.d.ts +1 -1
- package/esm/Updaters/Opacity/index.js +2 -2
- package/esm/Updaters/OutModes/IBounceData.d.ts +1 -1
- package/esm/Updaters/OutModes/OutOfCanvasUpdater.js +1 -1
- package/esm/Updaters/OutModes/index.d.ts +1 -1
- package/esm/Updaters/OutModes/index.js +2 -2
- package/esm/Updaters/Roll/index.d.ts +1 -1
- package/esm/Updaters/Roll/index.js +2 -2
- package/esm/Updaters/Size/index.d.ts +1 -1
- package/esm/Updaters/Size/index.js +2 -2
- package/esm/Updaters/StrokeColor/index.d.ts +1 -1
- package/esm/Updaters/StrokeColor/index.js +2 -2
- package/esm/Updaters/Tilt/index.d.ts +1 -1
- package/esm/Updaters/Tilt/index.js +2 -2
- package/esm/Updaters/Wobble/index.d.ts +1 -1
- package/esm/Updaters/Wobble/index.js +2 -2
- package/esm/Utils/CanvasUtils.d.ts +2 -3
- package/esm/Utils/CanvasUtils.js +1 -1
- package/esm/Utils/ColorUtils.js +1 -1
- package/esm/Utils/NumberUtils.d.ts +2 -2
- package/esm/Utils/Utils.d.ts +3 -3
- package/esm/Utils/Utils.js +1 -1
- package/esm/engine.d.ts +2 -2
- package/esm/full.d.ts +1 -1
- package/esm/full.js +14 -14
- package/esm/index.d.ts +1 -1
- package/esm/index.engine.d.ts +1 -1
- package/esm/index.engine.js +1 -1
- package/esm/index.js +1 -1
- package/esm/index.slim.d.ts +1 -1
- package/esm/index.slim.js +1 -1
- package/esm/pjs.d.ts +1 -1
- package/esm/slim.d.ts +1 -1
- package/esm/slim.js +40 -40
- package/full.d.ts +1 -1
- package/full.js +14 -14
- package/index.d.ts +1 -1
- package/index.engine.d.ts +1 -1
- package/index.engine.js +1 -1
- package/index.js +1 -1
- package/index.slim.d.ts +1 -1
- package/index.slim.js +1 -1
- package/package.json +1 -1
- package/pjs.d.ts +1 -1
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/slim.d.ts +1 -1
- package/slim.js +40 -40
- package/tsparticles.engine.js +2359 -2359
- package/tsparticles.engine.min.js +2 -2
- package/tsparticles.interaction.external.attract.js +3943 -3943
- package/tsparticles.interaction.external.attract.min.js +2 -2
- package/tsparticles.interaction.external.bounce.js +4058 -4058
- package/tsparticles.interaction.external.bounce.min.js +2 -2
- package/tsparticles.interaction.external.bubble.js +3886 -3886
- package/tsparticles.interaction.external.bubble.min.js +2 -2
- package/tsparticles.interaction.external.connect.js +4040 -4040
- package/tsparticles.interaction.external.connect.min.js +2 -2
- package/tsparticles.interaction.external.grab.js +4040 -4040
- package/tsparticles.interaction.external.grab.min.js +2 -2
- package/tsparticles.interaction.external.repulse.js +4058 -4058
- package/tsparticles.interaction.external.repulse.min.js +2 -2
- package/tsparticles.interaction.external.trail.js +4040 -4040
- package/tsparticles.interaction.external.trail.min.js +2 -2
- package/tsparticles.interaction.particles.attract.js +4042 -4042
- package/tsparticles.interaction.particles.attract.min.js +2 -2
- package/tsparticles.interaction.particles.collisions.js +882 -882
- package/tsparticles.interaction.particles.collisions.min.js +1 -1
- package/tsparticles.interaction.particles.links.js +4002 -4002
- package/tsparticles.interaction.particles.links.min.js +2 -2
- package/tsparticles.js +6215 -6209
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.min.js +1 -1
- package/tsparticles.plugins.absorbers.js +1027 -1028
- package/tsparticles.plugins.absorbers.min.js +2 -2
- package/tsparticles.plugins.emitters.js +1636 -1629
- package/tsparticles.plugins.emitters.min.js +2 -2
- package/tsparticles.plugins.polygonMask.js +2620 -2620
- package/tsparticles.plugins.polygonMask.min.js +2 -2
- package/tsparticles.shape.circle.js +2 -2
- package/tsparticles.shape.circle.min.js +1 -1
- package/tsparticles.shape.image.js +883 -883
- package/tsparticles.shape.image.min.js +1 -1
- package/tsparticles.shape.line.js +2 -2
- package/tsparticles.shape.line.min.js +1 -1
- package/tsparticles.shape.polygon.js +7 -7
- package/tsparticles.shape.polygon.min.js +1 -1
- package/tsparticles.shape.square.js +3 -3
- package/tsparticles.shape.square.min.js +1 -1
- package/tsparticles.shape.star.js +2 -2
- package/tsparticles.shape.star.min.js +1 -1
- package/tsparticles.shape.text.js +882 -882
- package/tsparticles.shape.text.min.js +1 -1
- package/tsparticles.slim.js +3561 -3561
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.updater.angle.js +882 -882
- package/tsparticles.updater.angle.min.js +1 -1
- package/tsparticles.updater.color.js +882 -882
- package/tsparticles.updater.color.min.js +1 -1
- package/tsparticles.updater.life.js +882 -882
- package/tsparticles.updater.life.min.js +1 -1
- package/tsparticles.updater.opacity.js +882 -882
- package/tsparticles.updater.opacity.min.js +1 -1
- package/tsparticles.updater.outModes.js +882 -882
- package/tsparticles.updater.outModes.min.js +1 -1
- package/tsparticles.updater.roll.js +882 -882
- package/tsparticles.updater.roll.min.js +1 -1
- package/tsparticles.updater.size.js +882 -882
- package/tsparticles.updater.size.min.js +1 -1
- package/tsparticles.updater.strokeColor.js +882 -882
- package/tsparticles.updater.strokeColor.min.js +1 -1
- package/tsparticles.updater.tilt.js +882 -882
- package/tsparticles.updater.tilt.min.js +1 -1
- package/tsparticles.updater.wobble.js +882 -882
- package/tsparticles.updater.wobble.min.js +1 -1
package/Core/Canvas.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { IContainerPlugin, ICoordinates, IDelta, IDimension, IParticle, IRgb } from "./Interfaces";
|
|
1
2
|
import type { Container } from "./Container";
|
|
2
3
|
import type { Particle } from "./Particle";
|
|
3
|
-
import type { IContainerPlugin, ICoordinates, IDelta, IDimension, IParticle, IRgb } from "./Interfaces";
|
|
4
4
|
export declare class Canvas {
|
|
5
5
|
private readonly container;
|
|
6
6
|
element?: HTMLCanvasElement;
|
package/Core/Canvas.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Canvas = void 0;
|
|
4
|
-
const Utils_1 = require("
|
|
5
|
-
const Utils_2 = require("
|
|
4
|
+
const Utils_1 = require("../Utils");
|
|
5
|
+
const Utils_2 = require("./Utils");
|
|
6
6
|
class Canvas {
|
|
7
7
|
constructor(container) {
|
|
8
8
|
this.container = container;
|
|
@@ -27,11 +27,11 @@ class Canvas {
|
|
|
27
27
|
(_a = this.element) === null || _a === void 0 ? void 0 : _a.remove();
|
|
28
28
|
}
|
|
29
29
|
this.generatedCanvas =
|
|
30
|
-
canvas.dataset &&
|
|
31
|
-
? canvas.dataset[
|
|
30
|
+
canvas.dataset && Utils_2.Constants.generatedAttribute in canvas.dataset
|
|
31
|
+
? canvas.dataset[Utils_2.Constants.generatedAttribute] === "true"
|
|
32
32
|
: this.generatedCanvas;
|
|
33
33
|
this.element = canvas;
|
|
34
|
-
this.originalStyle = (0,
|
|
34
|
+
this.originalStyle = (0, Utils_1.deepExtend)({}, this.element.style);
|
|
35
35
|
this.size.height = canvas.offsetHeight;
|
|
36
36
|
this.size.width = canvas.offsetWidth;
|
|
37
37
|
this.context = this.element.getContext("2d");
|
|
@@ -44,15 +44,15 @@ class Canvas {
|
|
|
44
44
|
(_a = this.element) === null || _a === void 0 ? void 0 : _a.remove();
|
|
45
45
|
}
|
|
46
46
|
this.draw((ctx) => {
|
|
47
|
-
(0,
|
|
47
|
+
(0, Utils_1.clear)(ctx, this.size);
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
paint() {
|
|
51
51
|
const options = this.container.actualOptions;
|
|
52
52
|
this.draw((ctx) => {
|
|
53
53
|
if (options.backgroundMask.enable && options.backgroundMask.cover && this.coverColor) {
|
|
54
|
-
(0,
|
|
55
|
-
this.paintBase((0,
|
|
54
|
+
(0, Utils_1.clear)(ctx, this.size);
|
|
55
|
+
this.paintBase((0, Utils_1.getStyleFromRgb)(this.coverColor, this.coverColor.a));
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
58
58
|
this.paintBase();
|
|
@@ -66,11 +66,11 @@ class Canvas {
|
|
|
66
66
|
this.paint();
|
|
67
67
|
}
|
|
68
68
|
else if (trail.enable && trail.length > 0 && this.trailFillColor) {
|
|
69
|
-
this.paintBase((0,
|
|
69
|
+
this.paintBase((0, Utils_1.getStyleFromRgb)(this.trailFillColor, 1 / trail.length));
|
|
70
70
|
}
|
|
71
71
|
else {
|
|
72
72
|
this.draw((ctx) => {
|
|
73
|
-
(0,
|
|
73
|
+
(0, Utils_1.clear)(ctx, this.size);
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -122,7 +122,7 @@ class Canvas {
|
|
|
122
122
|
}
|
|
123
123
|
const pos1 = p1.getPosition();
|
|
124
124
|
const pos2 = p2.getPosition();
|
|
125
|
-
(0,
|
|
125
|
+
(0, Utils_1.drawConnectLine)(ctx, (_a = p1.retina.linksWidth) !== null && _a !== void 0 ? _a : this.container.retina.linksWidth, lineStyle, pos1, pos2);
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
drawGrabLine(particle, lineColor, opacity, mousePos) {
|
|
@@ -130,7 +130,7 @@ class Canvas {
|
|
|
130
130
|
this.draw((ctx) => {
|
|
131
131
|
var _a;
|
|
132
132
|
const beginPos = particle.getPosition();
|
|
133
|
-
(0,
|
|
133
|
+
(0, Utils_1.drawGrabLine)(ctx, (_a = particle.retina.linksWidth) !== null && _a !== void 0 ? _a : container.retina.linksWidth, beginPos, mousePos, lineColor, opacity);
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
drawParticle(particle, delta) {
|
|
@@ -148,7 +148,7 @@ class Canvas {
|
|
|
148
148
|
const twinkle = pOptions.twinkle.particles;
|
|
149
149
|
const twinkling = twinkle.enable && Math.random() < twinkle.frequency;
|
|
150
150
|
if (!fColor || !sColor) {
|
|
151
|
-
const twinkleRgb = (0,
|
|
151
|
+
const twinkleRgb = (0, Utils_1.colorToHsl)(twinkle.color);
|
|
152
152
|
if (!fColor) {
|
|
153
153
|
fColor = twinkling && twinkleRgb !== undefined ? twinkleRgb : pfColor ? pfColor : undefined;
|
|
154
154
|
}
|
|
@@ -163,14 +163,14 @@ class Canvas {
|
|
|
163
163
|
const opacity = twinkling ? 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;
|
|
164
164
|
const strokeOpacity = (_f = (_e = particle.stroke) === null || _e === void 0 ? void 0 : _e.opacity) !== null && _f !== void 0 ? _f : opacity;
|
|
165
165
|
const zOpacity = opacity * zOpacityFactor;
|
|
166
|
-
const fillColorValue = fColor ? (0,
|
|
166
|
+
const fillColorValue = fColor ? (0, Utils_1.getStyleFromHsl)(fColor, zOpacity) : undefined;
|
|
167
167
|
if (!fillColorValue && !sColor) {
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
170
170
|
this.draw((ctx) => {
|
|
171
171
|
const zSizeFactor = (1 - particle.zIndexFactor) ** zIndexOptions.sizeRate;
|
|
172
172
|
const zStrokeOpacity = strokeOpacity * zOpacityFactor;
|
|
173
|
-
const strokeColorValue = sColor ? (0,
|
|
173
|
+
const strokeColorValue = sColor ? (0, Utils_1.getStyleFromHsl)(sColor, zStrokeOpacity) : fillColorValue;
|
|
174
174
|
if (radius <= 0) {
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
@@ -180,7 +180,7 @@ class Canvas {
|
|
|
180
180
|
updater.beforeDraw(particle);
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
(0,
|
|
183
|
+
(0, Utils_1.drawParticle)(this.container, ctx, particle, delta, fillColorValue, strokeColorValue, options.backgroundMask.enable, options.backgroundMask.composite, radius * zSizeFactor, zOpacity, particle.options.shadow, particle.gradient);
|
|
184
184
|
for (const updater of container.particles.updaters) {
|
|
185
185
|
if (updater.afterDraw) {
|
|
186
186
|
updater.afterDraw(particle);
|
|
@@ -190,12 +190,12 @@ class Canvas {
|
|
|
190
190
|
}
|
|
191
191
|
drawPlugin(plugin, delta) {
|
|
192
192
|
this.draw((ctx) => {
|
|
193
|
-
(0,
|
|
193
|
+
(0, Utils_1.drawPlugin)(ctx, plugin, delta);
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
drawParticlePlugin(plugin, particle, delta) {
|
|
197
197
|
this.draw((ctx) => {
|
|
198
|
-
(0,
|
|
198
|
+
(0, Utils_1.drawParticlePlugin)(ctx, plugin, particle, delta);
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
initBackground() {
|
|
@@ -207,8 +207,8 @@ class Canvas {
|
|
|
207
207
|
return;
|
|
208
208
|
}
|
|
209
209
|
if (background.color) {
|
|
210
|
-
const color = (0,
|
|
211
|
-
elementStyle.backgroundColor = color ? (0,
|
|
210
|
+
const color = (0, Utils_1.colorToRgb)(background.color);
|
|
211
|
+
elementStyle.backgroundColor = color ? (0, Utils_1.getStyleFromRgb)(color, background.opacity) : "";
|
|
212
212
|
}
|
|
213
213
|
else {
|
|
214
214
|
elementStyle.backgroundColor = "";
|
|
@@ -228,7 +228,7 @@ class Canvas {
|
|
|
228
228
|
const options = this.container.actualOptions;
|
|
229
229
|
const cover = options.backgroundMask.cover;
|
|
230
230
|
const color = cover.color;
|
|
231
|
-
const coverRgb = (0,
|
|
231
|
+
const coverRgb = (0, Utils_1.colorToRgb)(color);
|
|
232
232
|
if (coverRgb) {
|
|
233
233
|
this.coverColor = {
|
|
234
234
|
r: coverRgb.r,
|
|
@@ -241,7 +241,7 @@ class Canvas {
|
|
|
241
241
|
initTrail() {
|
|
242
242
|
const options = this.container.actualOptions;
|
|
243
243
|
const trail = options.particles.move.trail;
|
|
244
|
-
const fillColor = (0,
|
|
244
|
+
const fillColor = (0, Utils_1.colorToRgb)(trail.fillColor);
|
|
245
245
|
if (fillColor) {
|
|
246
246
|
const trail = options.particles.move.trail;
|
|
247
247
|
this.trailFillColor = {
|
|
@@ -257,10 +257,10 @@ class Canvas {
|
|
|
257
257
|
let sColor;
|
|
258
258
|
for (const [, plugin] of this.container.plugins) {
|
|
259
259
|
if (!fColor && plugin.particleFillColor) {
|
|
260
|
-
fColor = (0,
|
|
260
|
+
fColor = (0, Utils_1.colorToHsl)(plugin.particleFillColor(particle));
|
|
261
261
|
}
|
|
262
262
|
if (!sColor && plugin.particleStrokeColor) {
|
|
263
|
-
sColor = (0,
|
|
263
|
+
sColor = (0, Utils_1.colorToHsl)(plugin.particleStrokeColor(particle));
|
|
264
264
|
}
|
|
265
265
|
if (fColor && sColor) {
|
|
266
266
|
break;
|
|
@@ -275,7 +275,7 @@ class Canvas {
|
|
|
275
275
|
}
|
|
276
276
|
const originalStyle = this.originalStyle;
|
|
277
277
|
if (options.fullScreen.enable) {
|
|
278
|
-
this.originalStyle = (0,
|
|
278
|
+
this.originalStyle = (0, Utils_1.deepExtend)({}, element.style);
|
|
279
279
|
element.style.setProperty("position", "fixed", "important");
|
|
280
280
|
element.style.setProperty("z-index", options.fullScreen.zIndex.toString(10), "important");
|
|
281
281
|
element.style.setProperty("top", "0", "important");
|
|
@@ -304,14 +304,14 @@ class Canvas {
|
|
|
304
304
|
}
|
|
305
305
|
paintBase(baseColor) {
|
|
306
306
|
this.draw((ctx) => {
|
|
307
|
-
(0,
|
|
307
|
+
(0, Utils_1.paintBase)(ctx, this.size, baseColor);
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
310
|
lineStyle(p1, p2) {
|
|
311
311
|
return this.draw((ctx) => {
|
|
312
312
|
const options = this.container.actualOptions;
|
|
313
313
|
const connectOptions = options.interactivity.modes.connect;
|
|
314
|
-
return (0,
|
|
314
|
+
return (0, Utils_1.gradient)(ctx, p1, p2, connectOptions.links.opacity);
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
317
|
}
|
package/Core/Container.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { FrameManager, Vector } from "./Utils";
|
|
2
|
+
import type { IAttract, IBubble, IContainerInteractivity, IContainerPlugin, IMovePathGenerator, IRepulse, IShapeDrawer } from "./Interfaces";
|
|
1
3
|
import { Canvas } from "./Canvas";
|
|
2
|
-
import { Particles } from "./Particles";
|
|
3
|
-
import { Retina } from "./Retina";
|
|
4
4
|
import type { IOptions } from "../Options/Interfaces/IOptions";
|
|
5
|
-
import { FrameManager, Vector } from "./Utils";
|
|
6
|
-
import type { RecursivePartial } from "../Types";
|
|
7
5
|
import { Options } from "../Options/Classes/Options";
|
|
8
6
|
import { Particle } from "./Particle";
|
|
9
|
-
import
|
|
7
|
+
import { Particles } from "./Particles";
|
|
8
|
+
import type { RecursivePartial } from "../Types";
|
|
9
|
+
import { Retina } from "./Retina";
|
|
10
10
|
export declare class Container {
|
|
11
11
|
readonly id: string;
|
|
12
12
|
started: boolean;
|
package/Core/Container.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Container = void 0;
|
|
4
|
+
const Utils_1 = require("./Utils");
|
|
5
|
+
const Utils_2 = require("../Utils");
|
|
4
6
|
const Canvas_1 = require("./Canvas");
|
|
7
|
+
const Options_1 = require("../Options/Classes/Options");
|
|
5
8
|
const Particles_1 = require("./Particles");
|
|
6
9
|
const Retina_1 = require("./Retina");
|
|
7
|
-
const Utils_1 = require("./Utils");
|
|
8
|
-
const Options_1 = require("../Options/Classes/Options");
|
|
9
|
-
const Utils_2 = require("../Utils");
|
|
10
10
|
class Container {
|
|
11
11
|
constructor(id, sourceOptions, ...presets) {
|
|
12
12
|
this.id = id;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IColor } from "./Colors";
|
|
2
1
|
import type { GradientType, RotateDirectionAlt } from "../../Enums";
|
|
3
|
-
import type {
|
|
2
|
+
import type { IColor } from "./Colors";
|
|
4
3
|
import type { RangeValue } from "../../Types";
|
|
4
|
+
import type { RotateDirection } from "../../Enums";
|
|
5
5
|
export interface IGradientColorOpacity {
|
|
6
6
|
value: RangeValue;
|
|
7
7
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { ClickMode, OutModeDirection } from "../../Enums";
|
|
2
|
+
import type { IColor } from "./Colors";
|
|
1
3
|
import type { ICoordinates } from "./ICoordinates";
|
|
4
|
+
import type { IDelta } from "./IDelta";
|
|
5
|
+
import type { IOptions } from "../../Options/Interfaces/IOptions";
|
|
2
6
|
import type { Particle } from "../Particle";
|
|
3
|
-
import type { ClickMode, OutModeDirection } from "../../Enums";
|
|
4
7
|
import type { RecursivePartial } from "../../Types";
|
|
5
|
-
import type { IOptions } from "../../Options/Interfaces/IOptions";
|
|
6
|
-
import type { IDelta } from "./IDelta";
|
|
7
|
-
import type { IColor } from "./Colors";
|
|
8
8
|
export interface IContainerPlugin {
|
|
9
9
|
clickPositionValid?: (position: ICoordinates) => boolean;
|
|
10
10
|
draw?: (context: CanvasRenderingContext2D, delta: IDelta) => void;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ICoordinates3d } from "./ICoordinates";
|
|
3
|
-
import type { ShapeType } from "../../Enums";
|
|
1
|
+
import type { IHsl, IRgb } from "./Colors";
|
|
4
2
|
import type { IParticleTiltValueAnimation, IParticleValueAnimation } from "./IParticleValueAnimation";
|
|
5
|
-
import type { IShapeValues } from "./IShapeValues";
|
|
6
3
|
import type { IBubbleParticleData } from "./IBubbleParticleData";
|
|
7
|
-
import type {
|
|
8
|
-
import type { IHsl, IRgb } from "./Colors";
|
|
9
|
-
import type { IParticleHslAnimation } from "./IParticleHslAnimation";
|
|
10
|
-
import type { Vector } from "../Utils";
|
|
4
|
+
import type { ICoordinates3d } from "./ICoordinates";
|
|
11
5
|
import type { IParticleGradientAnimation } from "./IParticleGradientAnimation";
|
|
6
|
+
import type { IParticleHslAnimation } from "./IParticleHslAnimation";
|
|
12
7
|
import type { IParticleRetinaProps } from "./IParticleRetinaProps";
|
|
13
8
|
import type { IParticleRoll } from "./IParticleRoll";
|
|
14
9
|
import type { IParticleWobble } from "./IParticleWobble";
|
|
10
|
+
import type { IParticles } from "../../Options/Interfaces/Particles/IParticles";
|
|
11
|
+
import type { IShapeValues } from "./IShapeValues";
|
|
12
|
+
import type { IStroke } from "../../Options/Interfaces/Particles/IStroke";
|
|
13
|
+
import type { ShapeType } from "../../Enums";
|
|
14
|
+
import type { Vector } from "../Utils";
|
|
15
15
|
export interface IParticle {
|
|
16
16
|
misplaced: boolean;
|
|
17
17
|
randomIndexData?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IParticleValueAnimation } from "./IParticleValueAnimation";
|
|
2
1
|
import type { GradientType } from "../../Enums";
|
|
3
2
|
import type { IParticleGradientColorAnimation } from "./IParticleGradientColorAnimation";
|
|
3
|
+
import type { IParticleValueAnimation } from "./IParticleValueAnimation";
|
|
4
4
|
export interface IParticleGradientAnimation {
|
|
5
5
|
angle: IParticleValueAnimation<number>;
|
|
6
6
|
type: GradientType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Particle } from "../Particle";
|
|
2
|
-
import type { IInteractor } from "./IInteractor";
|
|
3
1
|
import type { IDelta } from "./IDelta";
|
|
2
|
+
import type { IInteractor } from "./IInteractor";
|
|
3
|
+
import type { Particle } from "../Particle";
|
|
4
4
|
export interface IParticlesInteractor extends IInteractor {
|
|
5
5
|
isEnabled(particle: Particle): boolean;
|
|
6
6
|
interact(particle: Particle, delta: IDelta): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Container } from "../Container";
|
|
2
2
|
import type { IContainerPlugin } from "./IContainerPlugin";
|
|
3
3
|
import type { IOptions } from "../../Options/Interfaces/IOptions";
|
|
4
|
-
import type { RecursivePartial } from "../../Types";
|
|
5
4
|
import type { Options } from "../../Options/Classes/Options";
|
|
5
|
+
import type { RecursivePartial } from "../../Types";
|
|
6
6
|
export interface IPlugin {
|
|
7
7
|
readonly id: string;
|
|
8
8
|
needsPlugin(options?: RecursivePartial<IOptions>): boolean;
|
package/Core/Loader.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Container } from "./Container";
|
|
2
2
|
import type { IOptions } from "../Options/Interfaces/IOptions";
|
|
3
|
-
import type { RecursivePartial } from "../Types";
|
|
4
3
|
import type { Particle } from "./Particle";
|
|
4
|
+
import type { RecursivePartial } from "../Types";
|
|
5
5
|
import type { SingleOrMultiple } from "../Types";
|
|
6
6
|
interface LoaderParams {
|
|
7
7
|
element?: HTMLElement;
|
package/Core/Loader.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Loader = void 0;
|
|
4
|
+
const Utils_1 = require("./Utils");
|
|
4
5
|
const Container_1 = require("./Container");
|
|
5
|
-
const
|
|
6
|
-
const Utils_2 = require("./Utils");
|
|
6
|
+
const Utils_2 = require("../Utils");
|
|
7
7
|
const tsParticlesDom = [];
|
|
8
8
|
function fetchError(statusCode) {
|
|
9
9
|
console.error(`Error tsParticles - fetch status: ${statusCode}`);
|
|
@@ -31,7 +31,7 @@ class Loader {
|
|
|
31
31
|
domContainer.id = tagId;
|
|
32
32
|
(_c = document.querySelector("body")) === null || _c === void 0 ? void 0 : _c.append(domContainer);
|
|
33
33
|
}
|
|
34
|
-
const currentOptions = options instanceof Array ? (0,
|
|
34
|
+
const currentOptions = options instanceof Array ? (0, Utils_2.itemFromArray)(options, index) : options;
|
|
35
35
|
const dom = Loader.dom();
|
|
36
36
|
const oldIndex = dom.findIndex((v) => v.id === tagId);
|
|
37
37
|
if (oldIndex >= 0) {
|
|
@@ -44,17 +44,17 @@ class Loader {
|
|
|
44
44
|
let canvasEl;
|
|
45
45
|
if (domContainer.tagName.toLowerCase() === "canvas") {
|
|
46
46
|
canvasEl = domContainer;
|
|
47
|
-
canvasEl.dataset[
|
|
47
|
+
canvasEl.dataset[Utils_1.Constants.generatedAttribute] = "false";
|
|
48
48
|
}
|
|
49
49
|
else {
|
|
50
50
|
const existingCanvases = domContainer.getElementsByTagName("canvas");
|
|
51
51
|
if (existingCanvases.length) {
|
|
52
52
|
canvasEl = existingCanvases[0];
|
|
53
|
-
canvasEl.dataset[
|
|
53
|
+
canvasEl.dataset[Utils_1.Constants.generatedAttribute] = "false";
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
56
|
canvasEl = document.createElement("canvas");
|
|
57
|
-
canvasEl.dataset[
|
|
57
|
+
canvasEl.dataset[Utils_1.Constants.generatedAttribute] = "true";
|
|
58
58
|
canvasEl.style.width = "100%";
|
|
59
59
|
canvasEl.style.height = "100%";
|
|
60
60
|
domContainer.appendChild(canvasEl);
|
|
@@ -73,7 +73,7 @@ class Loader {
|
|
|
73
73
|
}
|
|
74
74
|
static async loadRemoteOptions(params) {
|
|
75
75
|
const { url: jsonUrl, index } = params;
|
|
76
|
-
const url = jsonUrl instanceof Array ? (0,
|
|
76
|
+
const url = jsonUrl instanceof Array ? (0, Utils_2.itemFromArray)(jsonUrl, index) : jsonUrl;
|
|
77
77
|
if (!url) {
|
|
78
78
|
return;
|
|
79
79
|
}
|
package/Core/Particle.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { ShapeType } from "../Enums";
|
|
2
|
+
import type { IBubbleParticleData, ICoordinates, ICoordinates3d, IDelta, IHsl, IParticle, IParticleGradientAnimation, IParticleHslAnimation, IParticleLife, IParticleNumericValueAnimation, IParticleRetinaProps, IParticleRoll, IParticleSpin, IParticleTiltValueAnimation, IParticleValueAnimation, IParticleWobble, IRgb, IShapeValues } from "./Interfaces";
|
|
3
|
+
import { Vector, Vector3d } from "./Utils";
|
|
1
4
|
import type { Container } from "./Container";
|
|
2
5
|
import type { IParticles } from "../Options/Interfaces/Particles/IParticles";
|
|
3
6
|
import { ParticlesOptions } from "../Options/Classes/Particles/ParticlesOptions";
|
|
4
|
-
import { ShapeType } from "../Enums";
|
|
5
7
|
import type { RecursivePartial } from "../Types";
|
|
6
8
|
import type { Stroke } from "../Options/Classes/Particles/Stroke";
|
|
7
|
-
import { Vector, Vector3d } from "./Utils";
|
|
8
|
-
import type { IBubbleParticleData, ICoordinates, ICoordinates3d, IDelta, IHsl, IParticle, IParticleGradientAnimation, IParticleHslAnimation, IParticleLife, IParticleNumericValueAnimation, IParticleSpin, IParticleTiltValueAnimation, IParticleValueAnimation, IRgb, IShapeValues, IParticleRetinaProps, IParticleRoll, IParticleWobble } from "./Interfaces";
|
|
9
9
|
export declare class Particle implements IParticle {
|
|
10
10
|
readonly id: number;
|
|
11
11
|
readonly container: Container;
|
package/Core/Particle.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Particle = void 0;
|
|
4
|
+
const Utils_1 = require("./Utils");
|
|
5
|
+
const Utils_2 = require("../Utils");
|
|
4
6
|
const ParticlesOptions_1 = require("../Options/Classes/Particles/ParticlesOptions");
|
|
5
7
|
const Shape_1 = require("../Options/Classes/Particles/Shape/Shape");
|
|
6
|
-
const Utils_1 = require("../Utils");
|
|
7
|
-
const Utils_2 = require("./Utils");
|
|
8
8
|
const fixOutMode = (data) => {
|
|
9
|
-
if ((0,
|
|
9
|
+
if ((0, Utils_2.isInArray)(data.outMode, data.checkModes) || (0, Utils_2.isInArray)(data.outMode, data.checkModes)) {
|
|
10
10
|
if (data.coord > data.maxCoord - data.radius * 2) {
|
|
11
11
|
data.setCb(-data.radius);
|
|
12
12
|
}
|
|
@@ -37,13 +37,13 @@ class Particle {
|
|
|
37
37
|
particlesOptions.load(mainOptions.particles);
|
|
38
38
|
const shapeType = particlesOptions.shape.type;
|
|
39
39
|
const reduceDuplicates = particlesOptions.reduceDuplicates;
|
|
40
|
-
this.shape = shapeType instanceof Array ? (0,
|
|
40
|
+
this.shape = shapeType instanceof Array ? (0, Utils_2.itemFromArray)(shapeType, this.id, reduceDuplicates) : shapeType;
|
|
41
41
|
if (overrideOptions === null || overrideOptions === void 0 ? void 0 : overrideOptions.shape) {
|
|
42
42
|
if (overrideOptions.shape.type) {
|
|
43
43
|
const overrideShapeType = overrideOptions.shape.type;
|
|
44
44
|
this.shape =
|
|
45
45
|
overrideShapeType instanceof Array
|
|
46
|
-
? (0,
|
|
46
|
+
? (0, Utils_2.itemFromArray)(overrideShapeType, this.id, reduceDuplicates)
|
|
47
47
|
: overrideShapeType;
|
|
48
48
|
}
|
|
49
49
|
const shapeOptions = new Shape_1.Shape();
|
|
@@ -64,15 +64,15 @@ class Particle {
|
|
|
64
64
|
this.fill = (_d = (_c = this.shapeData) === null || _c === void 0 ? void 0 : _c.fill) !== null && _d !== void 0 ? _d : this.fill;
|
|
65
65
|
this.close = (_f = (_e = this.shapeData) === null || _e === void 0 ? void 0 : _e.close) !== null && _f !== void 0 ? _f : this.close;
|
|
66
66
|
this.options = particlesOptions;
|
|
67
|
-
this.pathDelay = (0,
|
|
68
|
-
const zIndexValue = (0,
|
|
67
|
+
this.pathDelay = (0, Utils_2.getValue)(this.options.move.path.delay) * 1000;
|
|
68
|
+
const zIndexValue = (0, Utils_2.getRangeValue)(this.options.zIndex.value);
|
|
69
69
|
container.retina.initParticle(this);
|
|
70
70
|
const sizeOptions = this.options.size, sizeRange = sizeOptions.value;
|
|
71
71
|
this.size = {
|
|
72
72
|
enable: sizeOptions.animation.enable,
|
|
73
|
-
value: (0,
|
|
74
|
-
max: (0,
|
|
75
|
-
min: (0,
|
|
73
|
+
value: (0, Utils_2.getValue)(sizeOptions) * container.retina.pixelRatio,
|
|
74
|
+
max: (0, Utils_2.getRangeMax)(sizeRange) * pxRatio,
|
|
75
|
+
min: (0, Utils_2.getRangeMin)(sizeRange) * pxRatio,
|
|
76
76
|
loops: 0,
|
|
77
77
|
maxLoops: sizeOptions.animation.count,
|
|
78
78
|
};
|
|
@@ -85,7 +85,7 @@ class Particle {
|
|
|
85
85
|
this.size.status = 0;
|
|
86
86
|
break;
|
|
87
87
|
case "random":
|
|
88
|
-
this.size.value = (0,
|
|
88
|
+
this.size.value = (0, Utils_2.randomInRange)(this.size) * pxRatio;
|
|
89
89
|
this.size.status = Math.random() >= 0.5 ? 0 : 1;
|
|
90
90
|
break;
|
|
91
91
|
case "max":
|
|
@@ -101,16 +101,16 @@ class Particle {
|
|
|
101
101
|
this.size.velocity *= Math.random();
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
this.direction = (0,
|
|
104
|
+
this.direction = (0, Utils_2.getParticleDirectionAngle)(this.options.move.direction);
|
|
105
105
|
this.bubble = {
|
|
106
106
|
inRange: false,
|
|
107
107
|
};
|
|
108
108
|
this.initialVelocity = this.calculateVelocity();
|
|
109
109
|
this.velocity = this.initialVelocity.copy();
|
|
110
|
-
this.moveDecay = 1 - (0,
|
|
111
|
-
this.position = this.calcPosition(container, position, (0,
|
|
110
|
+
this.moveDecay = 1 - (0, Utils_2.getRangeValue)(this.options.move.decay);
|
|
111
|
+
this.position = this.calcPosition(container, position, (0, Utils_2.clamp)(zIndexValue, 0, container.zLayers));
|
|
112
112
|
this.initialPosition = this.position.copy();
|
|
113
|
-
this.offset =
|
|
113
|
+
this.offset = Utils_1.Vector.origin;
|
|
114
114
|
const particles = container.particles;
|
|
115
115
|
particles.needsSort = particles.needsSort || particles.lastZIndex < this.position.z;
|
|
116
116
|
particles.lastZIndex = this.position.z;
|
|
@@ -118,7 +118,7 @@ class Particle {
|
|
|
118
118
|
this.sides = 24;
|
|
119
119
|
let drawer = container.drawers.get(this.shape);
|
|
120
120
|
if (!drawer) {
|
|
121
|
-
drawer =
|
|
121
|
+
drawer = Utils_1.Plugins.getShapeDrawer(this.shape);
|
|
122
122
|
if (drawer) {
|
|
123
123
|
container.drawers.set(this.shape, drawer);
|
|
124
124
|
}
|
|
@@ -139,16 +139,16 @@ class Particle {
|
|
|
139
139
|
y: (spinPos.y / 100) * container.canvas.size.height,
|
|
140
140
|
};
|
|
141
141
|
const pos = this.getPosition();
|
|
142
|
-
const distance = (0,
|
|
142
|
+
const distance = (0, Utils_2.getDistance)(pos, spinCenter);
|
|
143
143
|
this.spin = {
|
|
144
144
|
center: spinCenter,
|
|
145
145
|
direction: this.velocity.x >= 0 ? "clockwise" : "counter-clockwise",
|
|
146
146
|
angle: this.velocity.angle,
|
|
147
147
|
radius: distance,
|
|
148
|
-
acceleration: (_j = this.retina.spinAcceleration) !== null && _j !== void 0 ? _j : (0,
|
|
148
|
+
acceleration: (_j = this.retina.spinAcceleration) !== null && _j !== void 0 ? _j : (0, Utils_2.getRangeValue)(this.options.move.spin.acceleration),
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
|
-
this.shadowColor = (0,
|
|
151
|
+
this.shadowColor = (0, Utils_2.colorToRgb)(this.options.shadow.color);
|
|
152
152
|
for (const updater of container.particles.updaters) {
|
|
153
153
|
if (updater.init) {
|
|
154
154
|
updater.init(this);
|
|
@@ -197,7 +197,7 @@ class Particle {
|
|
|
197
197
|
}
|
|
198
198
|
getFillColor() {
|
|
199
199
|
var _a, _b, _c;
|
|
200
|
-
const color = (_a = this.bubble.color) !== null && _a !== void 0 ? _a : (0,
|
|
200
|
+
const color = (_a = this.bubble.color) !== null && _a !== void 0 ? _a : (0, Utils_2.getHslFromAnimation)(this.color);
|
|
201
201
|
if (color && this.roll && (this.backColor || this.roll.alter)) {
|
|
202
202
|
const rolled = Math.floor(((_c = (_b = this.roll) === null || _b === void 0 ? void 0 : _b.angle) !== null && _c !== void 0 ? _c : 0) / (Math.PI / 2)) % 2;
|
|
203
203
|
if (rolled) {
|
|
@@ -205,7 +205,7 @@ class Particle {
|
|
|
205
205
|
return this.backColor;
|
|
206
206
|
}
|
|
207
207
|
if (this.roll.alter) {
|
|
208
|
-
return (0,
|
|
208
|
+
return (0, Utils_2.alterHsl)(color, this.roll.alter.type, this.roll.alter.value);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
}
|
|
@@ -213,7 +213,7 @@ class Particle {
|
|
|
213
213
|
}
|
|
214
214
|
getStrokeColor() {
|
|
215
215
|
var _a, _b;
|
|
216
|
-
return (_b = (_a = this.bubble.color) !== null && _a !== void 0 ? _a : (0,
|
|
216
|
+
return (_b = (_a = this.bubble.color) !== null && _a !== void 0 ? _a : (0, Utils_2.getHslFromAnimation)(this.strokeColor)) !== null && _b !== void 0 ? _b : this.getFillColor();
|
|
217
217
|
}
|
|
218
218
|
destroy(override) {
|
|
219
219
|
this.destroyed = true;
|
|
@@ -247,7 +247,7 @@ class Particle {
|
|
|
247
247
|
if (splitOptions.count >= 0 && this.splitCount++ > splitOptions.count) {
|
|
248
248
|
return;
|
|
249
249
|
}
|
|
250
|
-
const rate = (0,
|
|
250
|
+
const rate = (0, Utils_2.getRangeValue)(splitOptions.rate.value);
|
|
251
251
|
for (let i = 0; i < rate; i++) {
|
|
252
252
|
this.container.particles.addSplitParticle(this);
|
|
253
253
|
}
|
|
@@ -257,11 +257,11 @@ class Particle {
|
|
|
257
257
|
for (const [, plugin] of container.plugins) {
|
|
258
258
|
const pluginPos = plugin.particlePosition !== undefined ? plugin.particlePosition(position, this) : undefined;
|
|
259
259
|
if (pluginPos !== undefined) {
|
|
260
|
-
return
|
|
260
|
+
return Utils_1.Vector3d.create(pluginPos.x, pluginPos.y, zIndex);
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
const canvasSize = container.canvas.size;
|
|
264
|
-
const pos =
|
|
264
|
+
const pos = Utils_1.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);
|
|
265
265
|
const radius = this.getRadius();
|
|
266
266
|
const outModes = this.options.move.outModes, fixHorizontal = (outMode) => {
|
|
267
267
|
fixOutMode({
|
|
@@ -307,7 +307,7 @@ class Particle {
|
|
|
307
307
|
}
|
|
308
308
|
let overlaps = false;
|
|
309
309
|
for (const particle of this.container.particles.array) {
|
|
310
|
-
if ((0,
|
|
310
|
+
if ((0, Utils_2.getDistance)(pos, particle.position) < radius + particle.getRadius()) {
|
|
311
311
|
overlaps = true;
|
|
312
312
|
break;
|
|
313
313
|
}
|
|
@@ -315,7 +315,7 @@ class Particle {
|
|
|
315
315
|
return overlaps;
|
|
316
316
|
}
|
|
317
317
|
calculateVelocity() {
|
|
318
|
-
const baseVelocity = (0,
|
|
318
|
+
const baseVelocity = (0, Utils_2.getParticleBaseVelocity)(this.direction);
|
|
319
319
|
const res = baseVelocity.copy();
|
|
320
320
|
const moveOptions = this.options.move;
|
|
321
321
|
const rad = (Math.PI / 180) * moveOptions.angle.value;
|
|
@@ -325,7 +325,7 @@ class Particle {
|
|
|
325
325
|
right: radOffset + rad / 2,
|
|
326
326
|
};
|
|
327
327
|
if (!moveOptions.straight) {
|
|
328
|
-
res.angle += (0,
|
|
328
|
+
res.angle += (0, Utils_2.randomInRange)((0, Utils_2.setRangeValue)(range.left, range.right));
|
|
329
329
|
}
|
|
330
330
|
if (moveOptions.random && typeof moveOptions.speed === "number") {
|
|
331
331
|
res.length *= Math.random();
|
|
@@ -335,7 +335,7 @@ class Particle {
|
|
|
335
335
|
loadShapeData(shapeOptions, reduceDuplicates) {
|
|
336
336
|
const shapeData = shapeOptions.options[this.shape];
|
|
337
337
|
if (shapeData) {
|
|
338
|
-
return (0,
|
|
338
|
+
return (0, Utils_2.deepExtend)({}, shapeData instanceof Array ? (0, Utils_2.itemFromArray)(shapeData, this.id, reduceDuplicates) : shapeData);
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
loadLife() {
|
|
@@ -344,13 +344,13 @@ class Particle {
|
|
|
344
344
|
const lifeOptions = particlesOptions.life;
|
|
345
345
|
const life = {
|
|
346
346
|
delay: container.retina.reduceFactor
|
|
347
|
-
? (((0,
|
|
347
|
+
? (((0, Utils_2.getRangeValue)(lifeOptions.delay.value) * (lifeOptions.delay.sync ? 1 : Math.random())) /
|
|
348
348
|
container.retina.reduceFactor) *
|
|
349
349
|
1000
|
|
350
350
|
: 0,
|
|
351
351
|
delayTime: 0,
|
|
352
352
|
duration: container.retina.reduceFactor
|
|
353
|
-
? (((0,
|
|
353
|
+
? (((0, Utils_2.getRangeValue)(lifeOptions.duration.value) * (lifeOptions.duration.sync ? 1 : Math.random())) /
|
|
354
354
|
container.retina.reduceFactor) *
|
|
355
355
|
1000
|
|
356
356
|
: 0,
|