tsparticles 1.35.2 → 1.37.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/Canvas.js +4 -6
- package/Core/Container.d.ts +4 -2
- package/Core/Container.js +21 -12
- package/Core/Loader.d.ts +19 -4
- package/Core/Loader.js +80 -18
- package/Enums/Modes/ResponsiveMode.d.ts +4 -0
- package/Enums/Modes/ResponsiveMode.js +8 -0
- package/Enums/Modes/index.d.ts +1 -0
- package/Enums/Modes/index.js +1 -0
- package/Interactions/External/Attract/index.d.ts +1 -1
- package/Interactions/External/Attract/index.js +2 -2
- package/Interactions/External/Bounce/index.d.ts +1 -1
- package/Interactions/External/Bounce/index.js +2 -2
- package/Interactions/External/Bubble/index.d.ts +1 -1
- package/Interactions/External/Bubble/index.js +2 -2
- package/Interactions/External/Connect/index.d.ts +1 -1
- package/Interactions/External/Connect/index.js +2 -2
- package/Interactions/External/Grab/index.d.ts +1 -1
- package/Interactions/External/Grab/index.js +2 -2
- package/Interactions/External/Repulse/index.d.ts +1 -1
- package/Interactions/External/Repulse/index.js +2 -2
- package/Interactions/External/Trail/index.d.ts +1 -1
- package/Interactions/External/Trail/index.js +2 -2
- 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/index.d.ts +2 -2
- package/Interactions/Particles/Links/index.js +5 -5
- package/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/Interactions/Particles/Links/plugin.js +2 -2
- package/Options/Classes/FullScreen/FullScreen.js +2 -2
- package/Options/Classes/Interactivity/Interactivity.js +1 -1
- package/Options/Classes/Options.d.ts +1 -1
- package/Options/Classes/Options.js +5 -2
- package/Options/Classes/Responsive.d.ts +2 -0
- package/Options/Classes/Responsive.js +10 -0
- package/Options/Interfaces/IResponsive.d.ts +2 -0
- package/Plugins/Absorbers/plugin.d.ts +1 -1
- package/Plugins/Absorbers/plugin.js +2 -2
- package/Plugins/Emitters/plugin.d.ts +1 -1
- package/Plugins/Emitters/plugin.js +2 -2
- package/Plugins/PolygonMask/plugin.js +1 -1
- package/README.md +1 -1
- 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/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/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/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/Utils.d.ts +1 -2
- package/browser/Core/Canvas.d.ts +29 -0
- package/browser/Core/Canvas.js +26 -6
- package/browser/Core/Container.d.ts +98 -2
- package/browser/Core/Container.js +104 -12
- package/browser/Core/FrameManager.d.ts +8 -0
- package/browser/Core/FrameManager.js +9 -0
- package/browser/Core/InteractionManager.d.ts +3 -0
- package/browser/Core/InteractionManager.js +4 -0
- package/browser/Core/Interfaces/Colors.d.ts +23 -0
- package/browser/Core/Interfaces/IAttract.d.ts +3 -0
- package/browser/Core/Interfaces/IBounds.d.ts +3 -0
- package/browser/Core/Interfaces/IBubble.d.ts +3 -0
- package/browser/Core/Interfaces/IBubbleParticleData.d.ts +3 -0
- package/browser/Core/Interfaces/IContainerInteractivity.d.ts +3 -0
- package/browser/Core/Interfaces/IContainerPlugin.d.ts +3 -0
- package/browser/Core/Interfaces/ICoordinates.d.ts +3 -0
- package/browser/Core/Interfaces/IDelta.d.ts +3 -0
- package/browser/Core/Interfaces/IDimension.d.ts +3 -0
- package/browser/Core/Interfaces/IExternalInteractor.d.ts +3 -0
- package/browser/Core/Interfaces/IInteractor.d.ts +3 -0
- package/browser/Core/Interfaces/IMouseData.d.ts +3 -0
- package/browser/Core/Interfaces/IMovePathGenerator.d.ts +3 -0
- package/browser/Core/Interfaces/IParticle.d.ts +3 -0
- package/browser/Core/Interfaces/IParticleValueAnimation.d.ts +3 -0
- package/browser/Core/Interfaces/IParticlesInteractor.d.ts +3 -0
- package/browser/Core/Interfaces/IPlugin.d.ts +8 -0
- package/browser/Core/Interfaces/IRepulse.d.ts +3 -0
- package/browser/Core/Interfaces/IShapeDrawer.d.ts +3 -0
- package/browser/Core/Interfaces/IShapeValues.d.ts +3 -0
- package/browser/Core/Loader.d.ts +64 -4
- package/browser/Core/Loader.js +131 -18
- package/browser/Core/Particle/Mover.d.ts +3 -0
- package/browser/Core/Particle/Mover.js +7 -2
- package/browser/Core/Particle.d.ts +7 -0
- package/browser/Core/Particle.js +13 -0
- package/browser/Core/Particles.d.ts +13 -0
- package/browser/Core/Particles.js +25 -0
- package/browser/Core/Retina.d.ts +6 -0
- package/browser/Core/Retina.js +9 -0
- package/browser/Enums/Directions/MoveDirection.d.ts +3 -0
- package/browser/Enums/Directions/MoveDirection.js +3 -0
- package/browser/Enums/Directions/RotateDirection.d.ts +3 -0
- package/browser/Enums/Directions/RotateDirection.js +3 -0
- package/browser/Enums/Directions/TiltDirection.d.ts +3 -0
- package/browser/Enums/Directions/TiltDirection.js +3 -0
- package/browser/Enums/InteractivityDetect.d.ts +3 -0
- package/browser/Enums/InteractivityDetect.js +3 -0
- package/browser/Enums/Modes/ClickMode.d.ts +3 -0
- package/browser/Enums/Modes/ClickMode.js +3 -0
- package/browser/Enums/Modes/CollisionMode.d.ts +3 -0
- package/browser/Enums/Modes/CollisionMode.js +3 -0
- package/browser/Enums/Modes/DivMode.d.ts +3 -0
- package/browser/Enums/Modes/DivMode.js +3 -0
- package/browser/Enums/Modes/HoverMode.d.ts +3 -0
- package/browser/Enums/Modes/HoverMode.js +3 -0
- package/browser/Enums/Modes/OutMode.d.ts +3 -0
- package/browser/Enums/Modes/OutMode.js +3 -0
- package/browser/Enums/Modes/ResponsiveMode.d.ts +4 -0
- package/browser/Enums/Modes/ResponsiveMode.js +5 -0
- package/browser/Enums/Modes/SizeMode.d.ts +3 -0
- package/browser/Enums/Modes/SizeMode.js +3 -0
- package/browser/Enums/Modes/index.d.ts +1 -0
- package/browser/Enums/Modes/index.js +1 -0
- package/browser/Enums/Types/DestroyType.d.ts +3 -0
- package/browser/Enums/Types/DestroyType.js +3 -0
- package/browser/Enums/Types/DivType.d.ts +3 -0
- package/browser/Enums/Types/DivType.js +3 -0
- package/browser/Enums/Types/OrbitType.d.ts +3 -0
- package/browser/Enums/Types/OrbitType.js +3 -0
- package/browser/Enums/Types/ShapeType.d.ts +3 -0
- package/browser/Enums/Types/ShapeType.js +3 -0
- package/browser/Enums/Types/StartValueType.d.ts +3 -0
- package/browser/Enums/Types/StartValueType.js +3 -0
- package/browser/Interactions/External/Attract/Attractor.d.ts +4 -0
- package/browser/Interactions/External/Attract/Attractor.js +5 -0
- 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.js +1 -0
- 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 +4 -0
- package/browser/Interactions/External/Bubble/Bubbler.js +14 -0
- package/browser/Interactions/External/Bubble/IBubblerProcessParam.d.ts +6 -0
- package/browser/Interactions/External/Bubble/ProcessBubbleType.d.ts +3 -0
- package/browser/Interactions/External/Bubble/ProcessBubbleType.js +3 -0
- 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.d.ts +7 -0
- package/browser/Interactions/External/Connect/Connector.js +8 -0
- 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 +4 -0
- package/browser/Interactions/External/Grab/Grabber.js +9 -0
- 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 +4 -0
- package/browser/Interactions/External/Repulse/Repulser.js +162 -0
- 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.d.ts +3 -0
- package/browser/Interactions/External/Trail/TrailMaker.js +4 -0
- 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.d.ts +3 -0
- package/browser/Interactions/Particles/Attract/Attractor.js +4 -0
- package/browser/Interactions/Particles/Attract/index.d.ts +1 -1
- package/browser/Interactions/Particles/Attract/index.js +2 -2
- package/browser/Interactions/Particles/Collisions/Collider.d.ts +3 -0
- package/browser/Interactions/Particles/Collisions/Collider.js +4 -0
- package/browser/Interactions/Particles/Collisions/index.d.ts +1 -1
- package/browser/Interactions/Particles/Collisions/index.js +2 -2
- package/browser/Interactions/Particles/Links/ILink.d.ts +6 -0
- package/browser/Interactions/Particles/Links/LinkInstance.js +8 -0
- package/browser/Interactions/Particles/Links/Linker.js +2 -0
- package/browser/Interactions/Particles/Links/index.d.ts +2 -2
- package/browser/Interactions/Particles/Links/index.js +5 -5
- package/browser/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/browser/Interactions/Particles/Links/plugin.js +3 -2
- package/browser/Options/Classes/AnimatableColor.d.ts +4 -0
- package/browser/Options/Classes/AnimatableColor.js +4 -0
- package/browser/Options/Classes/Background/Background.d.ts +4 -0
- package/browser/Options/Classes/Background/Background.js +4 -0
- package/browser/Options/Classes/BackgroundMask/BackgroundMask.d.ts +14 -0
- package/browser/Options/Classes/BackgroundMask/BackgroundMask.js +4 -0
- package/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +3 -0
- package/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.js +3 -0
- package/browser/Options/Classes/ColorAnimation.d.ts +3 -0
- package/browser/Options/Classes/ColorAnimation.js +3 -0
- package/browser/Options/Classes/FullScreen/FullScreen.d.ts +16 -0
- package/browser/Options/Classes/FullScreen/FullScreen.js +8 -2
- package/browser/Options/Classes/Interactivity/Events/ClickEvent.d.ts +10 -0
- package/browser/Options/Classes/Interactivity/Events/ClickEvent.js +4 -0
- package/browser/Options/Classes/Interactivity/Events/DivEvent.d.ts +37 -0
- package/browser/Options/Classes/Interactivity/Events/DivEvent.js +33 -0
- package/browser/Options/Classes/Interactivity/Events/Events.d.ts +31 -0
- package/browser/Options/Classes/Interactivity/Events/Events.js +31 -0
- package/browser/Options/Classes/Interactivity/Events/HoverEvent.d.ts +4 -0
- package/browser/Options/Classes/Interactivity/Events/HoverEvent.js +4 -0
- package/browser/Options/Classes/Interactivity/Events/Parallax.d.ts +3 -0
- package/browser/Options/Classes/Interactivity/Events/Parallax.js +3 -0
- package/browser/Options/Classes/Interactivity/Interactivity.d.ts +13 -0
- package/browser/Options/Classes/Interactivity/Interactivity.js +14 -1
- package/browser/Options/Classes/Interactivity/Modes/Attract.d.ts +3 -0
- package/browser/Options/Classes/Interactivity/Modes/Attract.js +3 -0
- package/browser/Options/Classes/Interactivity/Modes/Bubble.d.ts +3 -0
- package/browser/Options/Classes/Interactivity/Modes/Bubble.js +3 -0
- package/browser/Options/Classes/Interactivity/Modes/BubbleBase.d.ts +3 -0
- package/browser/Options/Classes/Interactivity/Modes/BubbleBase.js +3 -0
- package/browser/Options/Classes/Interactivity/Modes/BubbleDiv.d.ts +9 -0
- package/browser/Options/Classes/Interactivity/Modes/BubbleDiv.js +9 -0
- package/browser/Options/Classes/Interactivity/Modes/Connect.d.ts +21 -0
- package/browser/Options/Classes/Interactivity/Modes/Connect.js +21 -0
- package/browser/Options/Classes/Interactivity/Modes/ConnectLinks.d.ts +3 -0
- package/browser/Options/Classes/Interactivity/Modes/ConnectLinks.js +3 -0
- package/browser/Options/Classes/Interactivity/Modes/Grab.d.ts +21 -0
- package/browser/Options/Classes/Interactivity/Modes/Grab.js +21 -0
- package/browser/Options/Classes/Interactivity/Modes/GrabLinks.d.ts +3 -0
- package/browser/Options/Classes/Interactivity/Modes/GrabLinks.js +3 -0
- package/browser/Options/Classes/Interactivity/Modes/Modes.d.ts +4 -0
- package/browser/Options/Classes/Interactivity/Modes/Modes.js +4 -0
- package/browser/Options/Classes/Interactivity/Modes/Push.d.ts +12 -0
- package/browser/Options/Classes/Interactivity/Modes/Push.js +12 -0
- package/browser/Options/Classes/Interactivity/Modes/Remove.d.ts +12 -0
- package/browser/Options/Classes/Interactivity/Modes/Remove.js +12 -0
- package/browser/Options/Classes/Interactivity/Modes/Repulse.d.ts +3 -0
- package/browser/Options/Classes/Interactivity/Modes/Repulse.js +3 -0
- package/browser/Options/Classes/Interactivity/Modes/RepulseBase.d.ts +3 -0
- package/browser/Options/Classes/Interactivity/Modes/RepulseBase.js +3 -0
- package/browser/Options/Classes/Interactivity/Modes/RepulseDiv.d.ts +9 -0
- package/browser/Options/Classes/Interactivity/Modes/RepulseDiv.js +11 -0
- package/browser/Options/Classes/Interactivity/Modes/Slow.d.ts +9 -0
- package/browser/Options/Classes/Interactivity/Modes/Slow.js +10 -0
- package/browser/Options/Classes/Interactivity/Modes/Trail.d.ts +3 -0
- package/browser/Options/Classes/Interactivity/Modes/Trail.js +3 -0
- package/browser/Options/Classes/Motion/Motion.d.ts +11 -0
- package/browser/Options/Classes/Motion/Motion.js +4 -0
- package/browser/Options/Classes/Motion/MotionReduce.d.ts +9 -0
- package/browser/Options/Classes/Motion/MotionReduce.js +3 -0
- package/browser/Options/Classes/Options.d.ts +31 -1
- package/browser/Options/Classes/Options.js +36 -3
- package/browser/Options/Classes/OptionsColor.d.ts +4 -0
- package/browser/Options/Classes/OptionsColor.js +4 -0
- package/browser/Options/Classes/Particles/Collisions/Collisions.d.ts +4 -0
- package/browser/Options/Classes/Particles/Collisions/Collisions.js +4 -0
- package/browser/Options/Classes/Particles/Links/Links.d.ts +4 -0
- package/browser/Options/Classes/Particles/Links/Links.js +4 -0
- package/browser/Options/Classes/Particles/Links/LinksShadow.d.ts +3 -0
- package/browser/Options/Classes/Particles/Links/LinksShadow.js +3 -0
- package/browser/Options/Classes/Particles/Links/LinksTriangle.d.ts +3 -0
- package/browser/Options/Classes/Particles/Links/LinksTriangle.js +3 -0
- package/browser/Options/Classes/Particles/Move/Attract.d.ts +21 -0
- package/browser/Options/Classes/Particles/Move/Attract.js +21 -0
- package/browser/Options/Classes/Particles/Move/Move.d.ts +42 -0
- package/browser/Options/Classes/Particles/Move/Move.js +43 -0
- package/browser/Options/Classes/Particles/Move/MoveAngle.d.ts +3 -0
- package/browser/Options/Classes/Particles/Move/MoveAngle.js +4 -1
- package/browser/Options/Classes/Particles/Move/Path/Path.d.ts +3 -0
- package/browser/Options/Classes/Particles/Move/Path/Path.js +3 -0
- package/browser/Options/Classes/Particles/Move/Trail.d.ts +3 -0
- package/browser/Options/Classes/Particles/Move/Trail.js +3 -0
- package/browser/Options/Classes/Particles/Number/Density.d.ts +12 -0
- package/browser/Options/Classes/Particles/Number/Density.js +12 -0
- package/browser/Options/Classes/Particles/Number/ParticlesNumber.d.ts +10 -0
- package/browser/Options/Classes/Particles/Number/ParticlesNumber.js +10 -0
- package/browser/Options/Classes/Particles/Opacity/Opacity.d.ts +13 -0
- package/browser/Options/Classes/Particles/Opacity/Opacity.js +13 -0
- package/browser/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +15 -0
- package/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +12 -0
- package/browser/Options/Classes/Particles/Orbit/Orbit.d.ts +4 -0
- package/browser/Options/Classes/Particles/Orbit/Orbit.js +4 -0
- package/browser/Options/Classes/Particles/Orbit/OrbitRotation.d.ts +3 -0
- package/browser/Options/Classes/Particles/Orbit/OrbitRotation.js +3 -0
- package/browser/Options/Classes/Particles/ParticlesOptions.d.ts +22 -0
- package/browser/Options/Classes/Particles/ParticlesOptions.js +22 -0
- package/browser/Options/Classes/Particles/Repulse/Repulse.d.ts +3 -0
- package/browser/Options/Classes/Particles/Repulse/Repulse.js +3 -0
- package/browser/Options/Classes/Particles/Rotate/Rotate.d.ts +4 -0
- package/browser/Options/Classes/Particles/Rotate/Rotate.js +4 -0
- package/browser/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +3 -0
- package/browser/Options/Classes/Particles/Rotate/RotateAnimation.js +3 -0
- package/browser/Options/Classes/Particles/Shadow.d.ts +4 -0
- package/browser/Options/Classes/Particles/Shadow.js +4 -0
- package/browser/Options/Classes/Particles/Shape/Shape.d.ts +42 -0
- package/browser/Options/Classes/Particles/Shape/Shape.js +43 -0
- package/browser/Options/Classes/Particles/Size/Size.d.ts +13 -0
- package/browser/Options/Classes/Particles/Size/Size.js +13 -0
- package/browser/Options/Classes/Particles/Size/SizeAnimation.d.ts +15 -0
- package/browser/Options/Classes/Particles/Size/SizeAnimation.js +12 -0
- package/browser/Options/Classes/Particles/Stroke.d.ts +4 -0
- package/browser/Options/Classes/Particles/Stroke.js +4 -0
- package/browser/Options/Classes/Particles/Tilt/Tilt.d.ts +4 -0
- package/browser/Options/Classes/Particles/Tilt/Tilt.js +4 -0
- package/browser/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +3 -0
- package/browser/Options/Classes/Particles/Tilt/TiltAnimation.js +3 -0
- package/browser/Options/Classes/Particles/Twinkle/Twinkle.d.ts +4 -0
- package/browser/Options/Classes/Particles/Twinkle/Twinkle.js +4 -0
- package/browser/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +3 -0
- package/browser/Options/Classes/Particles/Twinkle/TwinkleValues.js +3 -0
- package/browser/Options/Classes/Particles/ZIndex/ZIndex.d.ts +3 -0
- package/browser/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
- package/browser/Options/Classes/Responsive.d.ts +2 -0
- package/browser/Options/Classes/Responsive.js +11 -0
- package/browser/Options/Classes/ValueWithRandom.d.ts +3 -0
- package/browser/Options/Interfaces/Background/IBackground.d.ts +35 -0
- package/browser/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +21 -0
- package/browser/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.d.ts +10 -0
- package/browser/Options/Interfaces/FullScreen/IFullScreen.d.ts +16 -0
- package/browser/Options/Interfaces/IAnimatableColor.d.ts +8 -0
- package/browser/Options/Interfaces/IAnimation.d.ts +10 -0
- package/browser/Options/Interfaces/IColorAnimation.d.ts +7 -0
- package/browser/Options/Interfaces/IColorAnimation.js +4 -0
- package/browser/Options/Interfaces/IManualParticle.d.ts +11 -0
- package/browser/Options/Interfaces/IOptionLoader.d.ts +9 -0
- package/browser/Options/Interfaces/IOptions.d.ts +71 -0
- package/browser/Options/Interfaces/IOptionsColor.d.ts +5 -0
- package/browser/Options/Interfaces/IResponsive.d.ts +2 -0
- package/browser/Options/Interfaces/IValueWithRandom.d.ts +3 -0
- package/browser/Options/Interfaces/Interactivity/Events/IClickEvent.d.ts +12 -0
- package/browser/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +13 -0
- package/browser/Options/Interfaces/Interactivity/Events/IEvents.d.ts +13 -0
- package/browser/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +4 -0
- package/browser/Options/Interfaces/Interactivity/Events/IParallax.d.ts +3 -0
- package/browser/Options/Interfaces/Interactivity/IInteractivity.d.ts +20 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IAttract.d.ts +3 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IBubble.d.ts +3 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IBubbleBase.d.ts +3 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IBubbleDiv.d.ts +3 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IConnect.d.ts +9 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IConnectLinks.d.ts +3 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IGrab.d.ts +9 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IGrabLinks.d.ts +3 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +6 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IModes.d.ts +4 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IPush.d.ts +6 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IRemove.d.ts +6 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IRepulse.d.ts +3 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IRepulseBase.d.ts +3 -0
- package/browser/Options/Interfaces/Interactivity/Modes/IRepulseDiv.d.ts +3 -0
- package/browser/Options/Interfaces/Interactivity/Modes/ISlow.d.ts +6 -0
- package/browser/Options/Interfaces/Interactivity/Modes/ITrail.d.ts +3 -0
- package/browser/Options/Interfaces/Motion/IMotion.d.ts +11 -0
- package/browser/Options/Interfaces/Motion/IMotionReduce.d.ts +9 -0
- package/browser/Options/Interfaces/Particles/Collisions/ICollisions.d.ts +4 -0
- package/browser/Options/Interfaces/Particles/Destroy/IDestroy.d.ts +4 -0
- package/browser/Options/Interfaces/Particles/IParticles.d.ts +10 -0
- package/browser/Options/Interfaces/Particles/IShadow.d.ts +4 -0
- package/browser/Options/Interfaces/Particles/IStroke.d.ts +14 -0
- package/browser/Options/Interfaces/Particles/Links/ILinks.d.ts +43 -0
- package/browser/Options/Interfaces/Particles/Links/ILinksShadow.d.ts +3 -0
- package/browser/Options/Interfaces/Particles/Links/ILinksTriangle.d.ts +3 -0
- package/browser/Options/Interfaces/Particles/Move/IAttract.d.ts +9 -0
- package/browser/Options/Interfaces/Particles/Move/IMove.d.ts +19 -0
- package/browser/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +3 -0
- package/browser/Options/Interfaces/Particles/Move/ITrail.d.ts +3 -0
- package/browser/Options/Interfaces/Particles/Move/Path/iPath.d.ts +3 -0
- package/browser/Options/Interfaces/Particles/Number/IDensity.d.ts +6 -0
- package/browser/Options/Interfaces/Particles/Number/IParticlesNumber.d.ts +7 -0
- package/browser/Options/Interfaces/Particles/Opacity/IOpacity.d.ts +7 -0
- package/browser/Options/Interfaces/Particles/Opacity/IOpacityAnimation.d.ts +9 -0
- package/browser/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +7 -0
- package/browser/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +4 -0
- package/browser/Options/Interfaces/Particles/Rotate/IRotate.d.ts +4 -0
- package/browser/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +3 -0
- package/browser/Options/Interfaces/Particles/Shape/ICharacterShape.d.ts +3 -0
- package/browser/Options/Interfaces/Particles/Shape/IImageShape.d.ts +6 -0
- package/browser/Options/Interfaces/Particles/Shape/IPolygonShape.d.ts +6 -0
- package/browser/Options/Interfaces/Particles/Shape/IShape.d.ts +22 -0
- package/browser/Options/Interfaces/Particles/Shape/IStarShape.d.ts +6 -0
- package/browser/Options/Interfaces/Particles/Size/ISize.d.ts +7 -0
- package/browser/Options/Interfaces/Particles/Size/ISizeAnimation.d.ts +9 -0
- package/browser/Options/Interfaces/Particles/Tilt/ITilt.d.ts +4 -0
- package/browser/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +3 -0
- package/browser/Options/Interfaces/Particles/Twinkle/ITwinkle.d.ts +4 -0
- package/browser/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +3 -0
- package/browser/Options/Interfaces/Particles/ZIndex/IZIndex.d.ts +4 -0
- package/browser/Options/Interfaces/Theme/ITheme.d.ts +14 -0
- package/browser/Options/Interfaces/Theme/IThemeDefault.d.ts +16 -0
- package/browser/Plugins/Absorbers/AbsorberInstance.d.ts +3 -0
- package/browser/Plugins/Absorbers/AbsorberInstance.js +3 -0
- package/browser/Plugins/Absorbers/Absorbers.d.ts +3 -0
- package/browser/Plugins/Absorbers/Absorbers.js +3 -0
- package/browser/Plugins/Absorbers/Enums/AbsorberClickMode.d.ts +3 -0
- package/browser/Plugins/Absorbers/Enums/AbsorberClickMode.js +3 -0
- package/browser/Plugins/Absorbers/Options/Classes/Absorber.d.ts +4 -0
- package/browser/Plugins/Absorbers/Options/Classes/Absorber.js +4 -0
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +29 -0
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.d.ts +3 -0
- package/browser/Plugins/Absorbers/plugin.d.ts +1 -1
- package/browser/Plugins/Absorbers/plugin.js +5 -2
- package/browser/Plugins/Emitters/EmitterInstance.d.ts +3 -0
- package/browser/Plugins/Emitters/EmitterInstance.js +3 -0
- package/browser/Plugins/Emitters/Emitters.d.ts +3 -0
- package/browser/Plugins/Emitters/Emitters.js +3 -0
- package/browser/Plugins/Emitters/Enums/EmitterClickMode.d.ts +3 -0
- package/browser/Plugins/Emitters/Enums/EmitterClickMode.js +3 -0
- package/browser/Plugins/Emitters/Options/Classes/Emitter.d.ts +4 -0
- package/browser/Plugins/Emitters/Options/Classes/Emitter.js +4 -0
- package/browser/Plugins/Emitters/Options/Classes/EmitterLife.d.ts +3 -0
- package/browser/Plugins/Emitters/Options/Classes/EmitterLife.js +3 -0
- package/browser/Plugins/Emitters/Options/Classes/EmitterRate.d.ts +3 -0
- package/browser/Plugins/Emitters/Options/Classes/EmitterRate.js +3 -0
- package/browser/Plugins/Emitters/Options/Classes/EmitterSize.d.ts +3 -0
- package/browser/Plugins/Emitters/Options/Classes/EmitterSize.js +3 -0
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +44 -0
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitterLife.d.ts +19 -0
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitterOptions.d.ts +3 -0
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitterRate.d.ts +11 -0
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitterSize.d.ts +3 -0
- package/browser/Plugins/Emitters/Shapes/Square/SquareShape.js +4 -0
- package/browser/Plugins/Emitters/plugin.d.ts +1 -1
- package/browser/Plugins/Emitters/plugin.js +5 -2
- package/browser/Plugins/PolygonMask/Options/Classes/Draw.d.ts +15 -0
- package/browser/Plugins/PolygonMask/Options/Classes/Draw.js +15 -0
- package/browser/Plugins/PolygonMask/Options/Classes/DrawStroke.d.ts +3 -0
- package/browser/Plugins/PolygonMask/Options/Classes/DrawStroke.js +3 -0
- package/browser/Plugins/PolygonMask/Options/Classes/Inline.d.ts +3 -0
- package/browser/Plugins/PolygonMask/Options/Classes/Inline.js +3 -0
- package/browser/Plugins/PolygonMask/Options/Classes/LocalSvg.d.ts +3 -0
- package/browser/Plugins/PolygonMask/Options/Classes/LocalSvg.js +3 -0
- package/browser/Plugins/PolygonMask/Options/Classes/Move.d.ts +3 -0
- package/browser/Plugins/PolygonMask/Options/Classes/Move.js +3 -0
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +10 -0
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMask.js +10 -0
- package/browser/Plugins/PolygonMask/Options/Interfaces/IDraw.d.ts +9 -0
- package/browser/Plugins/PolygonMask/Options/Interfaces/IDrawStroke.d.ts +3 -0
- package/browser/Plugins/PolygonMask/Options/Interfaces/IInline.d.ts +3 -0
- package/browser/Plugins/PolygonMask/Options/Interfaces/ILocalSvg.d.ts +3 -0
- package/browser/Plugins/PolygonMask/Options/Interfaces/IMove.d.ts +3 -0
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +7 -0
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskOptions.d.ts +3 -0
- package/browser/Plugins/PolygonMask/PolygonMaskInstance.d.ts +12 -0
- package/browser/Plugins/PolygonMask/PolygonMaskInstance.js +22 -0
- package/browser/Plugins/PolygonMask/pathseg.js +55 -1
- package/browser/Plugins/PolygonMask/plugin.js +8 -2
- package/browser/Plugins/PolygonMask/utils.js +14 -2
- package/browser/Shapes/Circle/CircleDrawer.d.ts +3 -0
- package/browser/Shapes/Circle/CircleDrawer.js +3 -0
- package/browser/Shapes/Circle/index.d.ts +1 -1
- package/browser/Shapes/Circle/index.js +2 -2
- package/browser/Shapes/Image/ImageDrawer.d.ts +3 -0
- package/browser/Shapes/Image/ImageDrawer.js +6 -0
- package/browser/Shapes/Image/Utils.d.ts +3 -0
- package/browser/Shapes/Image/Utils.js +1 -0
- package/browser/Shapes/Image/index.d.ts +1 -1
- package/browser/Shapes/Image/index.js +3 -3
- package/browser/Shapes/Line/LineDrawer.d.ts +3 -0
- package/browser/Shapes/Line/LineDrawer.js +3 -0
- package/browser/Shapes/Line/index.d.ts +1 -1
- package/browser/Shapes/Line/index.js +2 -2
- package/browser/Shapes/Polygon/PolygonDrawer.d.ts +3 -0
- package/browser/Shapes/Polygon/PolygonDrawer.js +3 -0
- package/browser/Shapes/Polygon/PolygonDrawerBase.d.ts +3 -0
- package/browser/Shapes/Polygon/PolygonDrawerBase.js +5 -1
- package/browser/Shapes/Polygon/TriangleDrawer.d.ts +3 -0
- package/browser/Shapes/Polygon/TriangleDrawer.js +3 -0
- package/browser/Shapes/Polygon/index.d.ts +3 -3
- package/browser/Shapes/Polygon/index.js +7 -7
- package/browser/Shapes/Square/SquareDrawer.d.ts +3 -0
- package/browser/Shapes/Square/SquareDrawer.js +3 -0
- package/browser/Shapes/Square/index.d.ts +1 -1
- package/browser/Shapes/Square/index.js +3 -3
- package/browser/Shapes/Star/StarDrawer.d.ts +3 -0
- package/browser/Shapes/Star/StarDrawer.js +3 -0
- package/browser/Shapes/Star/index.d.ts +1 -1
- package/browser/Shapes/Star/index.js +2 -2
- package/browser/Shapes/Text/TextDrawer.d.ts +3 -0
- package/browser/Shapes/Text/TextDrawer.js +3 -0
- package/browser/Shapes/Text/index.d.ts +1 -1
- package/browser/Shapes/Text/index.js +2 -2
- package/browser/Types/ParticlesGroups.d.ts +4 -0
- package/browser/Types/RecursivePartial.d.ts +3 -0
- package/browser/Types/ShapeData.d.ts +3 -0
- package/browser/Types/ShapeDrawerFunctions.d.ts +21 -0
- package/browser/Types/SingleOrMultiple.d.ts +3 -0
- package/browser/Updaters/Angle/index.d.ts +1 -1
- package/browser/Updaters/Angle/index.js +2 -2
- package/browser/Updaters/Color/ColorUpdater.js +1 -0
- package/browser/Updaters/Color/index.d.ts +1 -1
- package/browser/Updaters/Color/index.js +2 -2
- package/browser/Updaters/Life/LifeUpdater.js +1 -0
- package/browser/Updaters/Life/index.d.ts +1 -1
- package/browser/Updaters/Life/index.js +2 -2
- package/browser/Updaters/Opacity/OpacityUpdater.js +1 -0
- package/browser/Updaters/Opacity/index.d.ts +1 -1
- package/browser/Updaters/Opacity/index.js +2 -2
- package/browser/Updaters/OutModes/OutOfCanvasUpdater.js +1 -0
- 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/SizeUpdater.js +1 -0
- package/browser/Updaters/Size/index.d.ts +1 -1
- package/browser/Updaters/Size/index.js +2 -2
- package/browser/Updaters/StrokeColor/StrokeColorUpdater.js +1 -0
- 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.js +4 -0
- package/browser/Utils/Circle.d.ts +3 -0
- package/browser/Utils/Circle.js +3 -0
- package/browser/Utils/CircleWarp.d.ts +3 -0
- package/browser/Utils/CircleWarp.js +3 -0
- package/browser/Utils/ColorUtils.d.ts +20 -0
- package/browser/Utils/ColorUtils.js +33 -1
- package/browser/Utils/Constants.d.ts +7 -0
- package/browser/Utils/Constants.js +7 -0
- package/browser/Utils/EventListeners.d.ts +32 -0
- package/browser/Utils/EventListeners.js +40 -0
- package/browser/Utils/NumberUtils.d.ts +27 -0
- package/browser/Utils/NumberUtils.js +27 -0
- package/browser/Utils/Plugins.d.ts +3 -0
- package/browser/Utils/Plugins.js +3 -0
- package/browser/Utils/Point.d.ts +3 -0
- package/browser/Utils/Point.js +3 -0
- package/browser/Utils/QuadTree.d.ts +3 -0
- package/browser/Utils/QuadTree.js +3 -0
- package/browser/Utils/Range.d.ts +3 -0
- package/browser/Utils/Range.js +3 -0
- package/browser/Utils/Rectangle.d.ts +3 -0
- package/browser/Utils/Rectangle.js +3 -0
- package/browser/Utils/Utils.d.ts +6 -2
- package/browser/Utils/Utils.js +14 -0
- package/browser/full.d.ts +1 -1
- package/browser/full.js +14 -6
- package/browser/index.d.ts +1 -2
- package/browser/index.js +2 -2
- package/browser/index.slim.d.ts +1 -2
- package/browser/index.slim.js +3 -2
- package/browser/main.d.ts +103 -10
- package/browser/main.js +114 -11
- package/browser/pjs.d.ts +27 -0
- package/browser/pjs.js +23 -0
- package/browser/slim.d.ts +1 -1
- package/browser/slim.js +39 -47
- package/esm/Core/Canvas.js +4 -6
- package/esm/Core/Container.d.ts +4 -2
- package/esm/Core/Container.js +21 -12
- package/esm/Core/Loader.d.ts +19 -4
- package/esm/Core/Loader.js +80 -18
- package/esm/Enums/Modes/ResponsiveMode.d.ts +4 -0
- package/esm/Enums/Modes/ResponsiveMode.js +5 -0
- package/esm/Enums/Modes/index.d.ts +1 -0
- package/esm/Enums/Modes/index.js +1 -0
- package/esm/Interactions/External/Attract/index.d.ts +1 -1
- package/esm/Interactions/External/Attract/index.js +2 -2
- package/esm/Interactions/External/Bounce/index.d.ts +1 -1
- package/esm/Interactions/External/Bounce/index.js +2 -2
- package/esm/Interactions/External/Bubble/index.d.ts +1 -1
- package/esm/Interactions/External/Bubble/index.js +2 -2
- package/esm/Interactions/External/Connect/index.d.ts +1 -1
- package/esm/Interactions/External/Connect/index.js +2 -2
- package/esm/Interactions/External/Grab/index.d.ts +1 -1
- package/esm/Interactions/External/Grab/index.js +2 -2
- package/esm/Interactions/External/Repulse/index.d.ts +1 -1
- package/esm/Interactions/External/Repulse/index.js +2 -2
- package/esm/Interactions/External/Trail/index.d.ts +1 -1
- package/esm/Interactions/External/Trail/index.js +2 -2
- 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/index.d.ts +2 -2
- package/esm/Interactions/Particles/Links/index.js +5 -5
- package/esm/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/esm/Interactions/Particles/Links/plugin.js +2 -2
- package/esm/Options/Classes/FullScreen/FullScreen.js +2 -2
- package/esm/Options/Classes/Interactivity/Interactivity.js +1 -1
- package/esm/Options/Classes/Options.d.ts +1 -1
- package/esm/Options/Classes/Options.js +6 -3
- package/esm/Options/Classes/Responsive.d.ts +2 -0
- package/esm/Options/Classes/Responsive.js +10 -0
- package/esm/Options/Interfaces/IResponsive.d.ts +2 -0
- package/esm/Plugins/Absorbers/plugin.d.ts +1 -1
- package/esm/Plugins/Absorbers/plugin.js +2 -2
- package/esm/Plugins/Emitters/plugin.d.ts +1 -1
- package/esm/Plugins/Emitters/plugin.js +2 -2
- package/esm/Plugins/PolygonMask/plugin.js +1 -1
- 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/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 +2 -2
- 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/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/Utils.d.ts +1 -2
- package/esm/full.d.ts +1 -1
- package/esm/full.js +14 -6
- package/esm/index.d.ts +1 -2
- package/esm/index.js +2 -2
- package/esm/index.slim.d.ts +1 -2
- package/esm/index.slim.js +2 -2
- package/esm/main.d.ts +11 -10
- package/esm/main.js +18 -7
- package/esm/slim.d.ts +1 -1
- package/esm/slim.js +39 -47
- package/full.d.ts +1 -1
- package/full.js +14 -6
- package/index.d.ts +1 -2
- package/index.js +2 -3
- package/index.slim.d.ts +1 -2
- package/index.slim.js +2 -3
- package/main.d.ts +11 -10
- package/main.js +18 -7
- package/package.json +1 -1
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/slim.d.ts +1 -1
- package/slim.js +39 -47
- package/tsparticles.js +10262 -13560
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.js +1472 -0
- package/tsparticles.slim.js +8305 -11259
- package/tsparticles.slim.min.js +2 -2
- package/167.js +0 -1779
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { Container } from "../../../Core/Container";
|
|
2
2
|
import { ExternalInteractorBase } from "../../../Core/ExternalInteractorBase";
|
|
3
|
+
/**
|
|
4
|
+
* Particle attract manager
|
|
5
|
+
* @category Interactions
|
|
6
|
+
*/
|
|
3
7
|
export declare class Attractor extends ExternalInteractorBase {
|
|
4
8
|
constructor(container: Container);
|
|
5
9
|
isEnabled(): boolean;
|
|
@@ -2,6 +2,10 @@ import { ClickMode, HoverMode } from "../../../Enums";
|
|
|
2
2
|
import { Circle, Constants, getDistances, calcEasing, clamp, isInArray } from "../../../Utils";
|
|
3
3
|
import { ExternalInteractorBase } from "../../../Core/ExternalInteractorBase";
|
|
4
4
|
import { Vector } from "../../../Core/Particle/Vector";
|
|
5
|
+
/**
|
|
6
|
+
* Particle attract manager
|
|
7
|
+
* @category Interactions
|
|
8
|
+
*/
|
|
5
9
|
export class Attractor extends ExternalInteractorBase {
|
|
6
10
|
constructor(container) {
|
|
7
11
|
super(container);
|
|
@@ -15,6 +19,7 @@ export class Attractor extends ExternalInteractorBase {
|
|
|
15
19
|
return isInArray(HoverMode.attract, hoverMode) || isInArray(ClickMode.attract, clickMode);
|
|
16
20
|
}
|
|
17
21
|
reset() {
|
|
22
|
+
// do nothing
|
|
18
23
|
}
|
|
19
24
|
interact() {
|
|
20
25
|
const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === Constants.mouseMoveEvent, events = options.interactivity.events, hoverEnabled = events.onHover.enable, hoverMode = events.onHover.mode, clickEnabled = events.onClick.enable, clickMode = events.onClick.mode;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadExternalAttractInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadExternalAttractInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Attractor } from "./Attractor";
|
|
2
|
-
export function loadExternalAttractInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("externalAttract", (container) => new Attractor(container));
|
|
2
|
+
export async function loadExternalAttractInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("externalAttract", (container) => new Attractor(container));
|
|
4
4
|
}
|
|
@@ -21,6 +21,7 @@ export class Bouncer extends ExternalInteractorBase {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
reset() {
|
|
24
|
+
// do nothing
|
|
24
25
|
}
|
|
25
26
|
processMouseBounce() {
|
|
26
27
|
const container = this.container, pxRatio = container.retina.pixelRatio, tolerance = 10 * pxRatio, mousePos = container.interactivity.mouse.position, radius = container.retina.bounceModeDistance;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadExternalBounceInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadExternalBounceInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Bouncer } from "./Bouncer";
|
|
2
|
-
export function loadExternalBounceInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("externalBounce", (container) => new Bouncer(container));
|
|
2
|
+
export async function loadExternalBounceInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("externalBounce", (container) => new Bouncer(container));
|
|
4
4
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { Container } from "../../../Core/Container";
|
|
2
2
|
import { Particle } from "../../../Core/Particle";
|
|
3
3
|
import { ExternalInteractorBase } from "../../../Core/ExternalInteractorBase";
|
|
4
|
+
/**
|
|
5
|
+
* Particle bubble manager
|
|
6
|
+
* @category Interactions
|
|
7
|
+
*/
|
|
4
8
|
export declare class Bubbler extends ExternalInteractorBase {
|
|
5
9
|
constructor(container: Container);
|
|
6
10
|
isEnabled(): boolean;
|
|
@@ -12,6 +12,10 @@ function calculateBubbleValue(particleValue, modeValue, optionsValue, ratio) {
|
|
|
12
12
|
return clamp(value, modeValue, particleValue);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Particle bubble manager
|
|
17
|
+
* @category Interactions
|
|
18
|
+
*/
|
|
15
19
|
export class Bubbler extends ExternalInteractorBase {
|
|
16
20
|
constructor(container) {
|
|
17
21
|
super(container);
|
|
@@ -36,6 +40,7 @@ export class Bubbler extends ExternalInteractorBase {
|
|
|
36
40
|
}
|
|
37
41
|
interact() {
|
|
38
42
|
const options = this.container.actualOptions, events = options.interactivity.events, onHover = events.onHover, onClick = events.onClick, hoverEnabled = onHover.enable, hoverMode = onHover.mode, clickEnabled = onClick.enable, clickMode = onClick.mode, divs = events.onDiv;
|
|
43
|
+
/* on hover event */
|
|
39
44
|
if (hoverEnabled && isInArray(HoverMode.bubble, hoverMode)) {
|
|
40
45
|
this.hoverBubble();
|
|
41
46
|
}
|
|
@@ -69,8 +74,11 @@ export class Bubbler extends ExternalInteractorBase {
|
|
|
69
74
|
this.reset(particle, true);
|
|
70
75
|
particle.bubble.div = elem;
|
|
71
76
|
}
|
|
77
|
+
/* size */
|
|
72
78
|
this.hoverBubbleSize(particle, 1, divBubble);
|
|
79
|
+
/* opacity */
|
|
73
80
|
this.hoverBubbleOpacity(particle, 1, divBubble);
|
|
81
|
+
/* color */
|
|
74
82
|
this.hoverBubbleColor(particle, 1, divBubble);
|
|
75
83
|
}
|
|
76
84
|
});
|
|
@@ -178,19 +186,25 @@ export class Bubbler extends ExternalInteractorBase {
|
|
|
178
186
|
return;
|
|
179
187
|
}
|
|
180
188
|
const distance = container.retina.bubbleModeDistance, query = container.particles.quadTree.queryCircle(mousePos, distance);
|
|
189
|
+
//for (const { distance, particle } of query) {
|
|
181
190
|
for (const particle of query) {
|
|
182
191
|
particle.bubble.inRange = true;
|
|
183
192
|
const pos = particle.getPosition(), pointDistance = getDistance(pos, mousePos), ratio = 1 - pointDistance / distance;
|
|
193
|
+
/* mousemove - check ratio */
|
|
184
194
|
if (pointDistance <= distance) {
|
|
185
195
|
if (ratio >= 0 && container.interactivity.status === Constants.mouseMoveEvent) {
|
|
196
|
+
/* size */
|
|
186
197
|
this.hoverBubbleSize(particle, ratio);
|
|
198
|
+
/* opacity */
|
|
187
199
|
this.hoverBubbleOpacity(particle, ratio);
|
|
200
|
+
/* color */
|
|
188
201
|
this.hoverBubbleColor(particle, ratio);
|
|
189
202
|
}
|
|
190
203
|
}
|
|
191
204
|
else {
|
|
192
205
|
this.reset(particle);
|
|
193
206
|
}
|
|
207
|
+
/* mouseleave */
|
|
194
208
|
if (container.interactivity.status === Constants.mouseLeaveEvent) {
|
|
195
209
|
this.reset(particle);
|
|
196
210
|
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import type { ProcessBubbleType } from "./ProcessBubbleType";
|
|
2
|
+
/**
|
|
3
|
+
* @category Interfaces
|
|
4
|
+
*/
|
|
2
5
|
export interface IBubblerProcessParam {
|
|
3
6
|
bubbleObj: IBubblerProcessParamObj;
|
|
4
7
|
particlesObj: IBubblerProcessParamObj;
|
|
5
8
|
type: ProcessBubbleType;
|
|
6
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* @category Interfaces
|
|
12
|
+
*/
|
|
7
13
|
export interface IBubblerProcessParamObj {
|
|
8
14
|
optValue?: number;
|
|
9
15
|
value?: number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadExternalBubbleInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadExternalBubbleInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Bubbler } from "./Bubbler";
|
|
2
|
-
export function loadExternalBubbleInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("externalBubble", (container) => new Bubbler(container));
|
|
2
|
+
export async function loadExternalBubbleInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("externalBubble", (container) => new Bubbler(container));
|
|
4
4
|
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { Container } from "../../../Core/Container";
|
|
2
2
|
import { ExternalInteractorBase } from "../../../Core/ExternalInteractorBase";
|
|
3
|
+
/**
|
|
4
|
+
* Particle connection manager
|
|
5
|
+
* @category Interactions
|
|
6
|
+
*/
|
|
3
7
|
export declare class Connector extends ExternalInteractorBase {
|
|
4
8
|
constructor(container: Container);
|
|
5
9
|
isEnabled(): boolean;
|
|
6
10
|
reset(): void;
|
|
11
|
+
/**
|
|
12
|
+
* Connecting particles on hover interactivity
|
|
13
|
+
*/
|
|
7
14
|
interact(): void;
|
|
8
15
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { isInArray } from "../../../Utils";
|
|
2
2
|
import { HoverMode } from "../../../Enums";
|
|
3
3
|
import { ExternalInteractorBase } from "../../../Core/ExternalInteractorBase";
|
|
4
|
+
/**
|
|
5
|
+
* Particle connection manager
|
|
6
|
+
* @category Interactions
|
|
7
|
+
*/
|
|
4
8
|
export class Connector extends ExternalInteractorBase {
|
|
5
9
|
constructor(container) {
|
|
6
10
|
super(container);
|
|
@@ -13,7 +17,11 @@ export class Connector extends ExternalInteractorBase {
|
|
|
13
17
|
return isInArray(HoverMode.connect, events.onHover.mode);
|
|
14
18
|
}
|
|
15
19
|
reset() {
|
|
20
|
+
// do nothing
|
|
16
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Connecting particles on hover interactivity
|
|
24
|
+
*/
|
|
17
25
|
interact() {
|
|
18
26
|
const container = this.container, options = container.actualOptions;
|
|
19
27
|
if (options.interactivity.events.onHover.enable && container.interactivity.status === "mousemove") {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadExternalConnectInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadExternalConnectInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Connector } from "./Connector";
|
|
2
|
-
export function loadExternalConnectInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("externalConnect", (container) => new Connector(container));
|
|
2
|
+
export async function loadExternalConnectInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("externalConnect", (container) => new Connector(container));
|
|
4
4
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { Container } from "../../../Core/Container";
|
|
2
2
|
import { ExternalInteractorBase } from "../../../Core/ExternalInteractorBase";
|
|
3
|
+
/**
|
|
4
|
+
* Particle grab manager
|
|
5
|
+
* @category Interactions
|
|
6
|
+
*/
|
|
3
7
|
export declare class Grabber extends ExternalInteractorBase {
|
|
4
8
|
constructor(container: Container);
|
|
5
9
|
isEnabled(): boolean;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Constants, getLinkRandomColor, getLinkColor, getDistance, isInArray } from "../../../Utils";
|
|
2
2
|
import { HoverMode } from "../../../Enums";
|
|
3
3
|
import { ExternalInteractorBase } from "../../../Core/ExternalInteractorBase";
|
|
4
|
+
/**
|
|
5
|
+
* Particle grab manager
|
|
6
|
+
* @category Interactions
|
|
7
|
+
*/
|
|
4
8
|
export class Grabber extends ExternalInteractorBase {
|
|
5
9
|
constructor(container) {
|
|
6
10
|
super(container);
|
|
@@ -10,6 +14,7 @@ export class Grabber extends ExternalInteractorBase {
|
|
|
10
14
|
return events.onHover.enable && !!mouse.position && isInArray(HoverMode.grab, events.onHover.mode);
|
|
11
15
|
}
|
|
12
16
|
reset() {
|
|
17
|
+
// do nothing
|
|
13
18
|
}
|
|
14
19
|
interact() {
|
|
15
20
|
var _a;
|
|
@@ -21,6 +26,10 @@ export class Grabber extends ExternalInteractorBase {
|
|
|
21
26
|
}
|
|
22
27
|
const distance = container.retina.grabModeDistance, query = container.particles.quadTree.queryCircle(mousePos, distance);
|
|
23
28
|
for (const particle of query) {
|
|
29
|
+
/*
|
|
30
|
+
draw a line between the cursor and the particle
|
|
31
|
+
if the distance between them is under the config distance
|
|
32
|
+
*/
|
|
24
33
|
const pos = particle.getPosition(), pointDistance = getDistance(pos, mousePos);
|
|
25
34
|
if (pointDistance <= distance) {
|
|
26
35
|
const grabLineOptions = interactivity.modes.grab.links, lineOpacity = grabLineOptions.opacity, opacityLine = lineOpacity - (pointDistance * lineOpacity) / distance;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadExternalGrabInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadExternalGrabInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Grabber } from "./Grabber";
|
|
2
|
-
export function loadExternalGrabInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("externalGrab", (container) => new Grabber(container));
|
|
2
|
+
export async function loadExternalGrabInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("externalGrab", (container) => new Grabber(container));
|
|
4
4
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { Container } from "../../../Core/Container";
|
|
2
2
|
import { ExternalInteractorBase } from "../../../Core/ExternalInteractorBase";
|
|
3
|
+
/**
|
|
4
|
+
* Particle repulse manager
|
|
5
|
+
* @category Interactions
|
|
6
|
+
*/
|
|
3
7
|
export declare class Repulser extends ExternalInteractorBase {
|
|
4
8
|
constructor(container: Container);
|
|
5
9
|
isEnabled(): boolean;
|
|
@@ -2,6 +2,10 @@ import { ClickMode, DivMode, DivType, HoverMode } from "../../../Enums";
|
|
|
2
2
|
import { calcEasing, Circle, clamp, Constants, divMode, divModeExecute, getDistances, isDivModeEnabled, isInArray, Rectangle, } from "../../../Utils";
|
|
3
3
|
import { Vector } from "../../../Core/Particle/Vector";
|
|
4
4
|
import { ExternalInteractorBase } from "../../../Core/ExternalInteractorBase";
|
|
5
|
+
/**
|
|
6
|
+
* Particle repulse manager
|
|
7
|
+
* @category Interactions
|
|
8
|
+
*/
|
|
5
9
|
export class Repulser extends ExternalInteractorBase {
|
|
6
10
|
constructor(container) {
|
|
7
11
|
super(container);
|
|
@@ -15,6 +19,7 @@ export class Repulser extends ExternalInteractorBase {
|
|
|
15
19
|
return isInArray(HoverMode.repulse, hoverMode) || isInArray(ClickMode.repulse, clickMode) || divRepulse;
|
|
16
20
|
}
|
|
17
21
|
reset() {
|
|
22
|
+
// do nothing
|
|
18
23
|
}
|
|
19
24
|
interact() {
|
|
20
25
|
const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === Constants.mouseMoveEvent, events = options.interactivity.events, hoverEnabled = events.onHover.enable, hoverMode = events.onHover.mode, clickEnabled = events.onClick.enable, clickMode = events.onClick.mode, divs = events.onDiv;
|
|
@@ -94,3 +99,160 @@ export class Repulser extends ExternalInteractorBase {
|
|
|
94
99
|
}
|
|
95
100
|
}
|
|
96
101
|
}
|
|
102
|
+
/* Ready for a future release, breaking change. It's behavior seems more correct than the current.
|
|
103
|
+
export class Repulser implements IExternalInteractor {
|
|
104
|
+
constructor(private readonly container: Container) {}
|
|
105
|
+
|
|
106
|
+
public isEnabled(): boolean {
|
|
107
|
+
const container = this.container;
|
|
108
|
+
const options = container.options;
|
|
109
|
+
|
|
110
|
+
const mouse = container.interactivity.mouse;
|
|
111
|
+
const events = options.interactivity.events;
|
|
112
|
+
const divs = events.onDiv;
|
|
113
|
+
|
|
114
|
+
const divRepulse = isDivModeEnabled(DivMode.repulse, divs);
|
|
115
|
+
|
|
116
|
+
if (
|
|
117
|
+
!(divRepulse || (events.onHover.enable && mouse.position) || (events.onClick.enable && mouse.clickPosition))
|
|
118
|
+
) {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const hoverMode = events.onHover.mode;
|
|
123
|
+
const clickMode = events.onClick.mode;
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
isInArray(HoverMode.repulse, hoverMode) || isInArray(ClickMode.repulse, clickMode) || divRepulse
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
public reset(): void {
|
|
131
|
+
// do nothing
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
public interact(): void {
|
|
135
|
+
const container = this.container;
|
|
136
|
+
const options = container.options;
|
|
137
|
+
const mouseMoveStatus = container.interactivity.status === Constants.mouseMoveEvent;
|
|
138
|
+
const events = options.interactivity.events;
|
|
139
|
+
const hoverEnabled = events.onHover.enable;
|
|
140
|
+
const hoverMode = events.onHover.mode;
|
|
141
|
+
const clickEnabled = events.onClick.enable;
|
|
142
|
+
const clickMode = events.onClick.mode;
|
|
143
|
+
const divs = events.onDiv;
|
|
144
|
+
|
|
145
|
+
if (mouseMoveStatus && hoverEnabled && isInArray(HoverMode.repulse, hoverMode)) {
|
|
146
|
+
this.hoverRepulse();
|
|
147
|
+
} else if (clickEnabled && isInArray(ClickMode.repulse, clickMode)) {
|
|
148
|
+
this.clickRepulse();
|
|
149
|
+
} else {
|
|
150
|
+
divModeExecute(DivMode.repulse, divs, (selector, div): void => this.singleDivRepulse(selector, div));
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
private singleDivRepulse(selector: string, div: DivEvent): void {
|
|
155
|
+
const container = this.container;
|
|
156
|
+
const query = document.querySelectorAll(selector);
|
|
157
|
+
|
|
158
|
+
if (!query.length) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
query.forEach(item => {
|
|
163
|
+
const elem = item as HTMLElement;
|
|
164
|
+
const pxRatio = container.retina.pixelRatio;
|
|
165
|
+
const pos = {
|
|
166
|
+
x: (elem.offsetLeft + elem.offsetWidth / 2) * pxRatio,
|
|
167
|
+
y: (elem.offsetTop + elem.offsetHeight / 2) * pxRatio,
|
|
168
|
+
};
|
|
169
|
+
const repulseRadius = (elem.offsetWidth / 2) * pxRatio;
|
|
170
|
+
|
|
171
|
+
const area =
|
|
172
|
+
div.type === DivType.circle
|
|
173
|
+
? new Circle(pos.x, pos.y, repulseRadius)
|
|
174
|
+
: new Rectangle(
|
|
175
|
+
elem.offsetLeft * pxRatio,
|
|
176
|
+
elem.offsetTop * pxRatio,
|
|
177
|
+
elem.offsetWidth * pxRatio,
|
|
178
|
+
elem.offsetHeight * pxRatio
|
|
179
|
+
);
|
|
180
|
+
|
|
181
|
+
const divs = container.options.interactivity.modes.repulse.divs;
|
|
182
|
+
const divRepulse = divMode(divs, selector);
|
|
183
|
+
const velocity = (divRepulse?.speed ?? container.options.interactivity.modes.repulse.speed) * 100;
|
|
184
|
+
|
|
185
|
+
this.processRepulse(pos, repulseRadius, velocity, area, divRepulse);
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
private hoverRepulse(): void {
|
|
190
|
+
const container = this.container;
|
|
191
|
+
const mousePos = container.interactivity.mouse.position;
|
|
192
|
+
|
|
193
|
+
if (!mousePos) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
const repulseRadius = container.retina.repulseModeDistance;
|
|
198
|
+
const velocity = container.options.interactivity.modes.repulse.speed * 100;
|
|
199
|
+
|
|
200
|
+
this.processRepulse(mousePos, repulseRadius, velocity, new Circle(mousePos.x, mousePos.y, repulseRadius));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
private clickRepulse(): void {
|
|
204
|
+
const container = this.container;
|
|
205
|
+
|
|
206
|
+
if (!container.repulse.finish) {
|
|
207
|
+
if (!container.repulse.count) {
|
|
208
|
+
container.repulse.count = 0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
container.repulse.count++;
|
|
212
|
+
|
|
213
|
+
if (container.repulse.count === container.particles.count) {
|
|
214
|
+
container.repulse.finish = true;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
if (container.repulse.clicking) {
|
|
219
|
+
const mousePos = container.interactivity.mouse.clickPosition;
|
|
220
|
+
|
|
221
|
+
if (!mousePos) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const repulseRadius = container.retina.repulseModeDistance;
|
|
226
|
+
const velocity = container.options.interactivity.modes.repulse.speed * 10;
|
|
227
|
+
|
|
228
|
+
this.processRepulse(mousePos, repulseRadius, velocity, new Circle(mousePos.x, mousePos.y, repulseRadius));
|
|
229
|
+
} else if (container.repulse.clicking === false) {
|
|
230
|
+
container.repulse.particles = [];
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
private processRepulse(
|
|
235
|
+
position: ICoordinates,
|
|
236
|
+
repulseRadius: number,
|
|
237
|
+
velocity: number,
|
|
238
|
+
area: Range,
|
|
239
|
+
divRepulse?: RepulseDiv
|
|
240
|
+
): void {
|
|
241
|
+
const container = this.container;
|
|
242
|
+
const query = container.particles.quadTree.query(area);
|
|
243
|
+
|
|
244
|
+
for (const particle of query) {
|
|
245
|
+
const { dx, dy, distance } = getDistances(particle.position, position);
|
|
246
|
+
const normVec = {
|
|
247
|
+
x: dx / distance,
|
|
248
|
+
y: dy / distance,
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
const repulseFactor = clamp((1 - Math.pow(distance / repulseRadius, 2)) * velocity, 0, 50);
|
|
252
|
+
|
|
253
|
+
particle.position.x += normVec.x * repulseFactor;
|
|
254
|
+
particle.position.y += normVec.y * repulseFactor;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadExternalRepulseInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadExternalRepulseInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Repulser } from "./Repulser";
|
|
2
|
-
export function loadExternalRepulseInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("externalRepulse", (container) => new Repulser(container));
|
|
2
|
+
export async function loadExternalRepulseInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("externalRepulse", (container) => new Repulser(container));
|
|
4
4
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Container } from "../../../Core/Container";
|
|
2
2
|
import type { IDelta } from "../../../Core/Interfaces";
|
|
3
3
|
import { ExternalInteractorBase } from "../../../Core/ExternalInteractorBase";
|
|
4
|
+
/**
|
|
5
|
+
* @category Interactions
|
|
6
|
+
*/
|
|
4
7
|
export declare class TrailMaker extends ExternalInteractorBase {
|
|
5
8
|
private delay;
|
|
6
9
|
private lastPosition?;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { isInArray } from "../../../Utils";
|
|
2
2
|
import { ClickMode, HoverMode } from "../../../Enums";
|
|
3
3
|
import { ExternalInteractorBase } from "../../../Core/ExternalInteractorBase";
|
|
4
|
+
/**
|
|
5
|
+
* @category Interactions
|
|
6
|
+
*/
|
|
4
7
|
export class TrailMaker extends ExternalInteractorBase {
|
|
5
8
|
constructor(container) {
|
|
6
9
|
super(container);
|
|
@@ -46,5 +49,6 @@ export class TrailMaker extends ExternalInteractorBase {
|
|
|
46
49
|
(mouse.inside && !!mouse.position && isInArray(HoverMode.trail, events.onHover.mode)));
|
|
47
50
|
}
|
|
48
51
|
reset() {
|
|
52
|
+
// nothing to do
|
|
49
53
|
}
|
|
50
54
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadExternalTrailInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadExternalTrailInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TrailMaker } from "./TrailMaker";
|
|
2
|
-
export function loadExternalTrailInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("externalTrail", (container) => new TrailMaker(container));
|
|
2
|
+
export async function loadExternalTrailInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("externalTrail", (container) => new TrailMaker(container));
|
|
4
4
|
}
|
|
@@ -2,6 +2,9 @@ import type { IParticle } from "../../../Core/Interfaces";
|
|
|
2
2
|
import type { Container } from "../../../Core/Container";
|
|
3
3
|
import { Particle } from "../../../Core/Particle";
|
|
4
4
|
import { ParticlesInteractorBase } from "../../../Core/ParticlesInteractorBase";
|
|
5
|
+
/**
|
|
6
|
+
* @category Interactions
|
|
7
|
+
*/
|
|
5
8
|
export declare class Attractor extends ParticlesInteractorBase {
|
|
6
9
|
constructor(container: Container);
|
|
7
10
|
interact(p1: IParticle): void;
|