tsparticles 1.35.4 → 1.37.2
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 +5 -2
- package/Core/Container.js +23 -12
- package/Core/InteractionManager.d.ts +1 -0
- package/Core/InteractionManager.js +4 -1
- package/Core/Particles.d.ts +1 -1
- package/Core/Particles.js +3 -1
- 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/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/Plugins.d.ts +2 -2
- package/Utils/Plugins.js +4 -4
- 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 +99 -2
- package/browser/Core/Container.js +106 -12
- package/browser/Core/FrameManager.d.ts +8 -0
- package/browser/Core/FrameManager.js +9 -0
- package/browser/Core/InteractionManager.d.ts +4 -0
- package/browser/Core/InteractionManager.js +8 -1
- 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 +45 -0
- package/browser/Core/Loader.js +51 -0
- 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 +14 -1
- package/browser/Core/Particles.js +28 -1
- 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 +10 -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 +5 -2
- package/browser/Utils/Plugins.js +7 -4
- 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 +99 -6
- 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 +5 -2
- package/esm/Core/Container.js +23 -12
- package/esm/Core/InteractionManager.d.ts +1 -0
- package/esm/Core/InteractionManager.js +4 -1
- package/esm/Core/Particles.d.ts +1 -1
- package/esm/Core/Particles.js +3 -1
- 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/Plugins.d.ts +2 -2
- package/esm/Utils/Plugins.js +4 -4
- 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 +7 -6
- 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 +7 -6
- 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 +10586 -13650
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.js +1472 -0
- package/tsparticles.slim.js +8521 -11340
- package/tsparticles.slim.min.js +2 -2
- package/167.js +0 -1779
package/esm/Utils/Plugins.js
CHANGED
|
@@ -57,9 +57,9 @@ export class Plugins {
|
|
|
57
57
|
pathGenerators.set(type, pathGenerator);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
static getInteractors(container) {
|
|
60
|
+
static getInteractors(container, force = false) {
|
|
61
61
|
let res = interactors.get(container);
|
|
62
|
-
if (!res) {
|
|
62
|
+
if (!res || force) {
|
|
63
63
|
res = [...interactorsInitializers.values()].map((t) => t(container));
|
|
64
64
|
interactors.set(container, res);
|
|
65
65
|
}
|
|
@@ -68,9 +68,9 @@ export class Plugins {
|
|
|
68
68
|
static addInteractor(name, initInteractor) {
|
|
69
69
|
interactorsInitializers.set(name, initInteractor);
|
|
70
70
|
}
|
|
71
|
-
static getUpdaters(container) {
|
|
71
|
+
static getUpdaters(container, force = false) {
|
|
72
72
|
let res = updaters.get(container);
|
|
73
|
-
if (!res) {
|
|
73
|
+
if (!res || force) {
|
|
74
74
|
res = [...updatersInitializers.values()].map((t) => t(container));
|
|
75
75
|
updaters.set(container, res);
|
|
76
76
|
}
|
package/esm/Utils/Utils.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { IBounds, ICircleBouncer, ICoordinates, IDimension, IParticle } from "../Core/Interfaces";
|
|
2
|
-
import { DivMode } from "../Enums";
|
|
2
|
+
import { DivMode, OutModeDirection } from "../Enums";
|
|
3
3
|
import type { ICharacterShape } from "../Options/Interfaces/Particles/Shape/ICharacterShape";
|
|
4
4
|
import type { SingleOrMultiple } from "../Types";
|
|
5
5
|
import { DivEvent } from "../Options/Classes/Interactivity/Events/DivEvent";
|
|
6
6
|
import type { IModeDiv } from "../Options/Interfaces/Interactivity/Modes/IModeDiv";
|
|
7
|
-
import { OutModeDirection } from "../Enums";
|
|
8
7
|
declare global {
|
|
9
8
|
interface Window {
|
|
10
9
|
customRequestAnimationFrame: (callback: FrameRequestCallback) => number;
|
package/esm/full.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "./main";
|
|
2
|
-
export declare function loadFull(tsParticles: Main): void
|
|
2
|
+
export declare function loadFull(tsParticles: Main): Promise<void>;
|
package/esm/full.js
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
import { loadSlim } from "./slim";
|
|
2
|
+
import { loadExternalTrailInteraction } from "./Interactions/External/Trail";
|
|
3
|
+
import { loadTiltUpdater } from "./Updaters/Tilt";
|
|
4
|
+
import { loadWobbleUpdater } from "./Updaters/Wobble";
|
|
1
5
|
import { loadAbsorbersPlugin } from "./Plugins/Absorbers/plugin";
|
|
2
6
|
import { loadEmittersPlugin } from "./Plugins/Emitters/plugin";
|
|
3
7
|
import { loadPolygonMaskPlugin } from "./Plugins/PolygonMask/plugin";
|
|
4
|
-
import {
|
|
5
|
-
export function loadFull(tsParticles) {
|
|
6
|
-
loadSlim(tsParticles);
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import { loadRollUpdater } from "./Updaters/Roll";
|
|
9
|
+
export async function loadFull(tsParticles) {
|
|
10
|
+
await loadSlim(tsParticles);
|
|
11
|
+
await loadExternalTrailInteraction(tsParticles);
|
|
12
|
+
await loadRollUpdater(tsParticles);
|
|
13
|
+
await loadTiltUpdater(tsParticles);
|
|
14
|
+
await loadWobbleUpdater(tsParticles);
|
|
15
|
+
await loadAbsorbersPlugin(tsParticles);
|
|
16
|
+
await loadEmittersPlugin(tsParticles);
|
|
17
|
+
await loadPolygonMaskPlugin(tsParticles);
|
|
10
18
|
}
|
package/esm/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import type { IEmitterOptions } from "./Plugins/Emitters/Options/Interfaces/IEmi
|
|
|
6
6
|
import type { IPolygonMaskOptions } from "./Plugins/PolygonMask/Options/Interfaces/IPolygonMaskOptions";
|
|
7
7
|
import type { RecursivePartial } from "./Types";
|
|
8
8
|
import type { IParticle } from "./Core/Interfaces";
|
|
9
|
-
import { loadFull } from "./full";
|
|
10
9
|
declare const tsParticles: Main;
|
|
11
10
|
declare const particlesJS: import("./pjs").IParticlesJS, pJSDom: import("./Core/Container").Container[];
|
|
12
11
|
export * from "./Core/Particle/Vector";
|
|
@@ -15,7 +14,7 @@ export * from "./Enums";
|
|
|
15
14
|
export * from "./Plugins/Absorbers/Enums";
|
|
16
15
|
export * from "./Plugins/Emitters/Enums";
|
|
17
16
|
export * from "./Plugins/PolygonMask/Enums";
|
|
18
|
-
export { Circle, CircleWarp, Constants, Point, Rectangle, Main
|
|
17
|
+
export { Circle, CircleWarp, Constants, Point, Rectangle, Main };
|
|
19
18
|
export * from "./Utils/CanvasUtils";
|
|
20
19
|
export * from "./Utils/ColorUtils";
|
|
21
20
|
export * from "./Utils/NumberUtils";
|
package/esm/index.js
CHANGED
|
@@ -4,15 +4,15 @@ import { Circle, CircleWarp, Constants, Point, Rectangle } from "./Utils";
|
|
|
4
4
|
import { loadFull } from "./full";
|
|
5
5
|
const tsParticles = new Main();
|
|
6
6
|
tsParticles.init();
|
|
7
|
-
loadFull(tsParticles);
|
|
8
7
|
const { particlesJS, pJSDom } = initPjs(tsParticles);
|
|
8
|
+
loadFull(tsParticles);
|
|
9
9
|
export * from "./Core/Particle/Vector";
|
|
10
10
|
export * from "./Core/Container";
|
|
11
11
|
export * from "./Enums";
|
|
12
12
|
export * from "./Plugins/Absorbers/Enums";
|
|
13
13
|
export * from "./Plugins/Emitters/Enums";
|
|
14
14
|
export * from "./Plugins/PolygonMask/Enums";
|
|
15
|
-
export { Circle, CircleWarp, Constants, Point, Rectangle, Main
|
|
15
|
+
export { Circle, CircleWarp, Constants, Point, Rectangle, Main };
|
|
16
16
|
export * from "./Utils/CanvasUtils";
|
|
17
17
|
export * from "./Utils/ColorUtils";
|
|
18
18
|
export * from "./Utils/NumberUtils";
|
package/esm/index.slim.d.ts
CHANGED
|
@@ -3,13 +3,12 @@ import type { IOptions } from "./Options/Interfaces/IOptions";
|
|
|
3
3
|
import type { RecursivePartial } from "./Types";
|
|
4
4
|
import type { IParticle } from "./Core/Interfaces";
|
|
5
5
|
import { Main } from "./main";
|
|
6
|
-
import { loadSlim } from "./slim";
|
|
7
6
|
declare const tsParticles: Main;
|
|
8
7
|
declare const particlesJS: import("./pjs").IParticlesJS, pJSDom: import("./Core/Container").Container[];
|
|
9
8
|
export * from "./Core/Particle/Vector";
|
|
10
9
|
export * from "./Core/Container";
|
|
11
10
|
export * from "./Enums";
|
|
12
|
-
export { Circle, CircleWarp, Constants, Point, Rectangle, Main
|
|
11
|
+
export { Circle, CircleWarp, Constants, Point, Rectangle, Main };
|
|
13
12
|
export * from "./Utils/CanvasUtils";
|
|
14
13
|
export * from "./Utils/ColorUtils";
|
|
15
14
|
export * from "./Utils/NumberUtils";
|
package/esm/index.slim.js
CHANGED
|
@@ -4,12 +4,12 @@ import { Main } from "./main";
|
|
|
4
4
|
import { loadSlim } from "./slim";
|
|
5
5
|
const tsParticles = new Main();
|
|
6
6
|
tsParticles.init();
|
|
7
|
-
loadSlim(tsParticles);
|
|
8
7
|
const { particlesJS, pJSDom } = initPjs(tsParticles);
|
|
8
|
+
loadSlim(tsParticles);
|
|
9
9
|
export * from "./Core/Particle/Vector";
|
|
10
10
|
export * from "./Core/Container";
|
|
11
11
|
export * from "./Enums";
|
|
12
|
-
export { Circle, CircleWarp, Constants, Point, Rectangle, Main
|
|
12
|
+
export { Circle, CircleWarp, Constants, Point, Rectangle, Main };
|
|
13
13
|
export * from "./Utils/CanvasUtils";
|
|
14
14
|
export * from "./Utils/ColorUtils";
|
|
15
15
|
export * from "./Utils/NumberUtils";
|
package/esm/main.d.ts
CHANGED
|
@@ -15,10 +15,11 @@ export declare class Main {
|
|
|
15
15
|
setOnClickHandler(callback: (e: Event, particles?: Particle[]) => void): void;
|
|
16
16
|
dom(): Container[];
|
|
17
17
|
domItem(index: number): Container | undefined;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
refresh(): Promise<void>;
|
|
19
|
+
addShape(shape: string, drawer: IShapeDrawer | ShapeDrawerDrawFunction, init?: ShapeDrawerInitFunction, afterEffect?: ShapeDrawerAfterEffectFunction, destroy?: ShapeDrawerDestroyFunction): Promise<void>;
|
|
20
|
+
addPreset(preset: string, options: RecursivePartial<IOptions>, override?: boolean): Promise<void>;
|
|
21
|
+
addPlugin(plugin: IPlugin): Promise<void>;
|
|
22
|
+
addPathGenerator(name: string, generator: IMovePathGenerator): Promise<void>;
|
|
23
|
+
addInteractor(name: string, interactorInitializer: (container: Container) => IInteractor): Promise<void>;
|
|
24
|
+
addParticleUpdater(name: string, updaterInitializer: (container: Container) => IParticleUpdater): Promise<void>;
|
|
24
25
|
}
|
package/esm/main.js
CHANGED
|
@@ -31,7 +31,7 @@ export class Main {
|
|
|
31
31
|
async set(id, element, options) {
|
|
32
32
|
return Loader.set(id, element, options);
|
|
33
33
|
}
|
|
34
|
-
loadJSON(tagId, pathConfigJson, index) {
|
|
34
|
+
async loadJSON(tagId, pathConfigJson, index) {
|
|
35
35
|
return Loader.loadJSON(tagId, pathConfigJson, index);
|
|
36
36
|
}
|
|
37
37
|
async setJSON(id, element, pathConfigJson, index) {
|
|
@@ -46,7 +46,12 @@ export class Main {
|
|
|
46
46
|
domItem(index) {
|
|
47
47
|
return Loader.domItem(index);
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
async refresh() {
|
|
50
|
+
for (const instance of this.dom()) {
|
|
51
|
+
await instance.refresh();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
async addShape(shape, drawer, init, afterEffect, destroy) {
|
|
50
55
|
let customDrawer;
|
|
51
56
|
if (typeof drawer === "function") {
|
|
52
57
|
customDrawer = {
|
|
@@ -60,21 +65,27 @@ export class Main {
|
|
|
60
65
|
customDrawer = drawer;
|
|
61
66
|
}
|
|
62
67
|
Plugins.addShapeDrawer(shape, customDrawer);
|
|
68
|
+
await this.refresh();
|
|
63
69
|
}
|
|
64
|
-
addPreset(preset, options, override = false) {
|
|
70
|
+
async addPreset(preset, options, override = false) {
|
|
65
71
|
Plugins.addPreset(preset, options, override);
|
|
72
|
+
await this.refresh();
|
|
66
73
|
}
|
|
67
|
-
addPlugin(plugin) {
|
|
74
|
+
async addPlugin(plugin) {
|
|
68
75
|
Plugins.addPlugin(plugin);
|
|
76
|
+
await this.refresh();
|
|
69
77
|
}
|
|
70
|
-
addPathGenerator(name, generator) {
|
|
78
|
+
async addPathGenerator(name, generator) {
|
|
71
79
|
Plugins.addPathGenerator(name, generator);
|
|
80
|
+
await this.refresh();
|
|
72
81
|
}
|
|
73
|
-
addInteractor(name, interactorInitializer) {
|
|
82
|
+
async addInteractor(name, interactorInitializer) {
|
|
74
83
|
Plugins.addInteractor(name, interactorInitializer);
|
|
84
|
+
await this.refresh();
|
|
75
85
|
}
|
|
76
|
-
addParticleUpdater(name, updaterInitializer) {
|
|
86
|
+
async addParticleUpdater(name, updaterInitializer) {
|
|
77
87
|
Plugins.addParticleUpdater(name, updaterInitializer);
|
|
88
|
+
await this.refresh();
|
|
78
89
|
}
|
|
79
90
|
}
|
|
80
91
|
_Main_initialized = new WeakMap();
|
package/esm/slim.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "./main";
|
|
2
|
-
export declare function loadSlim(tsParticles: Main): void
|
|
2
|
+
export declare function loadSlim(tsParticles: Main): Promise<void>;
|
package/esm/slim.js
CHANGED
|
@@ -1,56 +1,48 @@
|
|
|
1
1
|
import { loadCircleShape } from "./Shapes/Circle";
|
|
2
|
-
import { loadImageShape } from "./Shapes/Image";
|
|
3
|
-
import { loadLineShape } from "./Shapes/Line";
|
|
4
|
-
import { loadPolygonShape } from "./Shapes/Polygon";
|
|
5
|
-
import { loadSquareShape } from "./Shapes/Square";
|
|
6
|
-
import { loadStarShape } from "./Shapes/Star";
|
|
7
|
-
import { loadTextShape } from "./Shapes/Text";
|
|
8
|
-
import { loadAngleUpdater } from "./Updaters/Angle";
|
|
9
|
-
import { loadColorUpdater } from "./Updaters/Color";
|
|
10
2
|
import { loadLifeUpdater } from "./Updaters/Life";
|
|
3
|
+
import { loadExternalConnectInteraction } from "./Interactions/External/Connect";
|
|
11
4
|
import { loadOpacityUpdater } from "./Updaters/Opacity";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { loadOutModesUpdater } from "./Updaters/OutModes";
|
|
15
|
-
import { loadRollUpdater } from "./Updaters/Roll";
|
|
16
|
-
import { loadTiltUpdater } from "./Updaters/Tilt";
|
|
17
|
-
import { loadWobbleUpdater } from "./Updaters/Wobble";
|
|
18
|
-
import { loadExternalAttractInteraction } from "./Interactions/External/Attract";
|
|
19
|
-
import { loadExternalBounceInteraction } from "./Interactions/External/Bounce";
|
|
5
|
+
import { loadImageShape } from "./Shapes/Image";
|
|
6
|
+
import { loadPolygonShape } from "./Shapes/Polygon";
|
|
20
7
|
import { loadExternalBubbleInteraction } from "./Interactions/External/Bubble";
|
|
21
|
-
import {
|
|
8
|
+
import { loadExternalAttractInteraction } from "./Interactions/External/Attract";
|
|
22
9
|
import { loadExternalGrabInteraction } from "./Interactions/External/Grab";
|
|
23
|
-
import {
|
|
24
|
-
import { loadExternalTrailInteraction } from "./Interactions/External/Trail";
|
|
10
|
+
import { loadStarShape } from "./Shapes/Star";
|
|
25
11
|
import { loadParticlesAttractInteraction } from "./Interactions/Particles/Attract";
|
|
12
|
+
import { loadSquareShape } from "./Shapes/Square";
|
|
13
|
+
import { loadStrokeColorUpdater } from "./Updaters/StrokeColor";
|
|
14
|
+
import { loadColorUpdater } from "./Updaters/Color";
|
|
26
15
|
import { loadParticlesCollisionsInteraction } from "./Interactions/Particles/Collisions";
|
|
16
|
+
import { loadAngleUpdater } from "./Updaters/Angle";
|
|
17
|
+
import { loadOutModesUpdater } from "./Updaters/OutModes";
|
|
18
|
+
import { loadExternalRepulseInteraction } from "./Interactions/External/Repulse";
|
|
19
|
+
import { loadLineShape } from "./Shapes/Line";
|
|
20
|
+
import { loadExternalBounceInteraction } from "./Interactions/External/Bounce";
|
|
21
|
+
import { loadTextShape } from "./Shapes/Text";
|
|
27
22
|
import { loadParticlesLinksInteraction } from "./Interactions/Particles/Links";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
loadParticlesAttractInteraction(tsParticles);
|
|
37
|
-
loadParticlesCollisionsInteraction(tsParticles);
|
|
38
|
-
loadParticlesLinksInteraction(tsParticles);
|
|
39
|
-
loadCircleShape(tsParticles);
|
|
40
|
-
loadImageShape(tsParticles);
|
|
41
|
-
loadLineShape(tsParticles);
|
|
42
|
-
loadPolygonShape(tsParticles);
|
|
43
|
-
loadSquareShape(tsParticles);
|
|
44
|
-
loadStarShape(tsParticles);
|
|
45
|
-
loadTextShape(tsParticles);
|
|
46
|
-
loadLifeUpdater(tsParticles);
|
|
47
|
-
loadOpacityUpdater(tsParticles);
|
|
48
|
-
loadSizeUpdater(tsParticles);
|
|
49
|
-
loadAngleUpdater(tsParticles);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
loadColorUpdater(tsParticles);
|
|
54
|
-
loadStrokeColorUpdater(tsParticles);
|
|
55
|
-
loadOutModesUpdater(tsParticles);
|
|
23
|
+
import { loadSizeUpdater } from "./Updaters/Size";
|
|
24
|
+
export async function loadSlim(tsParticles) {
|
|
25
|
+
await loadExternalAttractInteraction(tsParticles);
|
|
26
|
+
await loadExternalBounceInteraction(tsParticles);
|
|
27
|
+
await loadExternalBubbleInteraction(tsParticles);
|
|
28
|
+
await loadExternalConnectInteraction(tsParticles);
|
|
29
|
+
await loadExternalGrabInteraction(tsParticles);
|
|
30
|
+
await loadExternalRepulseInteraction(tsParticles);
|
|
31
|
+
await loadParticlesAttractInteraction(tsParticles);
|
|
32
|
+
await loadParticlesCollisionsInteraction(tsParticles);
|
|
33
|
+
await loadParticlesLinksInteraction(tsParticles);
|
|
34
|
+
await loadCircleShape(tsParticles);
|
|
35
|
+
await loadImageShape(tsParticles);
|
|
36
|
+
await loadLineShape(tsParticles);
|
|
37
|
+
await loadPolygonShape(tsParticles);
|
|
38
|
+
await loadSquareShape(tsParticles);
|
|
39
|
+
await loadStarShape(tsParticles);
|
|
40
|
+
await loadTextShape(tsParticles);
|
|
41
|
+
await loadLifeUpdater(tsParticles);
|
|
42
|
+
await loadOpacityUpdater(tsParticles);
|
|
43
|
+
await loadSizeUpdater(tsParticles);
|
|
44
|
+
await loadAngleUpdater(tsParticles);
|
|
45
|
+
await loadColorUpdater(tsParticles);
|
|
46
|
+
await loadStrokeColorUpdater(tsParticles);
|
|
47
|
+
await loadOutModesUpdater(tsParticles);
|
|
56
48
|
}
|
package/full.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "./main";
|
|
2
|
-
export declare function loadFull(tsParticles: Main): void
|
|
2
|
+
export declare function loadFull(tsParticles: Main): Promise<void>;
|
package/full.js
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.loadFull = void 0;
|
|
4
|
+
const slim_1 = require("./slim");
|
|
5
|
+
const Trail_1 = require("./Interactions/External/Trail");
|
|
6
|
+
const Tilt_1 = require("./Updaters/Tilt");
|
|
7
|
+
const Wobble_1 = require("./Updaters/Wobble");
|
|
4
8
|
const plugin_1 = require("./Plugins/Absorbers/plugin");
|
|
5
9
|
const plugin_2 = require("./Plugins/Emitters/plugin");
|
|
6
10
|
const plugin_3 = require("./Plugins/PolygonMask/plugin");
|
|
7
|
-
const
|
|
8
|
-
function loadFull(tsParticles) {
|
|
9
|
-
(0, slim_1.loadSlim)(tsParticles);
|
|
10
|
-
(0,
|
|
11
|
-
(0,
|
|
12
|
-
(0,
|
|
11
|
+
const Roll_1 = require("./Updaters/Roll");
|
|
12
|
+
async function loadFull(tsParticles) {
|
|
13
|
+
await (0, slim_1.loadSlim)(tsParticles);
|
|
14
|
+
await (0, Trail_1.loadExternalTrailInteraction)(tsParticles);
|
|
15
|
+
await (0, Roll_1.loadRollUpdater)(tsParticles);
|
|
16
|
+
await (0, Tilt_1.loadTiltUpdater)(tsParticles);
|
|
17
|
+
await (0, Wobble_1.loadWobbleUpdater)(tsParticles);
|
|
18
|
+
await (0, plugin_1.loadAbsorbersPlugin)(tsParticles);
|
|
19
|
+
await (0, plugin_2.loadEmittersPlugin)(tsParticles);
|
|
20
|
+
await (0, plugin_3.loadPolygonMaskPlugin)(tsParticles);
|
|
13
21
|
}
|
|
14
22
|
exports.loadFull = loadFull;
|
package/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import type { IEmitterOptions } from "./Plugins/Emitters/Options/Interfaces/IEmi
|
|
|
6
6
|
import type { IPolygonMaskOptions } from "./Plugins/PolygonMask/Options/Interfaces/IPolygonMaskOptions";
|
|
7
7
|
import type { RecursivePartial } from "./Types";
|
|
8
8
|
import type { IParticle } from "./Core/Interfaces";
|
|
9
|
-
import { loadFull } from "./full";
|
|
10
9
|
declare const tsParticles: Main;
|
|
11
10
|
declare const particlesJS: import("./pjs").IParticlesJS, pJSDom: import("./Core/Container").Container[];
|
|
12
11
|
export * from "./Core/Particle/Vector";
|
|
@@ -15,7 +14,7 @@ export * from "./Enums";
|
|
|
15
14
|
export * from "./Plugins/Absorbers/Enums";
|
|
16
15
|
export * from "./Plugins/Emitters/Enums";
|
|
17
16
|
export * from "./Plugins/PolygonMask/Enums";
|
|
18
|
-
export { Circle, CircleWarp, Constants, Point, Rectangle, Main
|
|
17
|
+
export { Circle, CircleWarp, Constants, Point, Rectangle, Main };
|
|
19
18
|
export * from "./Utils/CanvasUtils";
|
|
20
19
|
export * from "./Utils/ColorUtils";
|
|
21
20
|
export * from "./Utils/NumberUtils";
|
package/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.tsParticles = exports.pJSDom = exports.particlesJS = exports.
|
|
13
|
+
exports.tsParticles = exports.pJSDom = exports.particlesJS = exports.Main = exports.Rectangle = exports.Point = exports.Constants = exports.CircleWarp = exports.Circle = void 0;
|
|
14
14
|
const pjs_1 = require("./pjs");
|
|
15
15
|
const main_1 = require("./main");
|
|
16
16
|
Object.defineProperty(exports, "Main", { enumerable: true, get: function () { return main_1.Main; } });
|
|
@@ -21,14 +21,13 @@ Object.defineProperty(exports, "Constants", { enumerable: true, get: function ()
|
|
|
21
21
|
Object.defineProperty(exports, "Point", { enumerable: true, get: function () { return Utils_1.Point; } });
|
|
22
22
|
Object.defineProperty(exports, "Rectangle", { enumerable: true, get: function () { return Utils_1.Rectangle; } });
|
|
23
23
|
const full_1 = require("./full");
|
|
24
|
-
Object.defineProperty(exports, "loadFull", { enumerable: true, get: function () { return full_1.loadFull; } });
|
|
25
24
|
const tsParticles = new main_1.Main();
|
|
26
25
|
exports.tsParticles = tsParticles;
|
|
27
26
|
tsParticles.init();
|
|
28
|
-
(0, full_1.loadFull)(tsParticles);
|
|
29
27
|
const { particlesJS, pJSDom } = (0, pjs_1.initPjs)(tsParticles);
|
|
30
28
|
exports.particlesJS = particlesJS;
|
|
31
29
|
exports.pJSDom = pJSDom;
|
|
30
|
+
(0, full_1.loadFull)(tsParticles);
|
|
32
31
|
__exportStar(require("./Core/Particle/Vector"), exports);
|
|
33
32
|
__exportStar(require("./Core/Container"), exports);
|
|
34
33
|
__exportStar(require("./Enums"), exports);
|
package/index.slim.d.ts
CHANGED
|
@@ -3,13 +3,12 @@ import type { IOptions } from "./Options/Interfaces/IOptions";
|
|
|
3
3
|
import type { RecursivePartial } from "./Types";
|
|
4
4
|
import type { IParticle } from "./Core/Interfaces";
|
|
5
5
|
import { Main } from "./main";
|
|
6
|
-
import { loadSlim } from "./slim";
|
|
7
6
|
declare const tsParticles: Main;
|
|
8
7
|
declare const particlesJS: import("./pjs").IParticlesJS, pJSDom: import("./Core/Container").Container[];
|
|
9
8
|
export * from "./Core/Particle/Vector";
|
|
10
9
|
export * from "./Core/Container";
|
|
11
10
|
export * from "./Enums";
|
|
12
|
-
export { Circle, CircleWarp, Constants, Point, Rectangle, Main
|
|
11
|
+
export { Circle, CircleWarp, Constants, Point, Rectangle, Main };
|
|
13
12
|
export * from "./Utils/CanvasUtils";
|
|
14
13
|
export * from "./Utils/ColorUtils";
|
|
15
14
|
export * from "./Utils/NumberUtils";
|
package/index.slim.js
CHANGED
|
@@ -10,7 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.pJSDom = exports.particlesJS = exports.tsParticles = exports.
|
|
13
|
+
exports.pJSDom = exports.particlesJS = exports.tsParticles = exports.Main = exports.Rectangle = exports.Point = exports.Constants = exports.CircleWarp = exports.Circle = void 0;
|
|
14
14
|
const pjs_1 = require("./pjs");
|
|
15
15
|
const Utils_1 = require("./Utils");
|
|
16
16
|
Object.defineProperty(exports, "Circle", { enumerable: true, get: function () { return Utils_1.Circle; } });
|
|
@@ -21,14 +21,13 @@ Object.defineProperty(exports, "Rectangle", { enumerable: true, get: function ()
|
|
|
21
21
|
const main_1 = require("./main");
|
|
22
22
|
Object.defineProperty(exports, "Main", { enumerable: true, get: function () { return main_1.Main; } });
|
|
23
23
|
const slim_1 = require("./slim");
|
|
24
|
-
Object.defineProperty(exports, "loadSlim", { enumerable: true, get: function () { return slim_1.loadSlim; } });
|
|
25
24
|
const tsParticles = new main_1.Main();
|
|
26
25
|
exports.tsParticles = tsParticles;
|
|
27
26
|
tsParticles.init();
|
|
28
|
-
(0, slim_1.loadSlim)(tsParticles);
|
|
29
27
|
const { particlesJS, pJSDom } = (0, pjs_1.initPjs)(tsParticles);
|
|
30
28
|
exports.particlesJS = particlesJS;
|
|
31
29
|
exports.pJSDom = pJSDom;
|
|
30
|
+
(0, slim_1.loadSlim)(tsParticles);
|
|
32
31
|
__exportStar(require("./Core/Particle/Vector"), exports);
|
|
33
32
|
__exportStar(require("./Core/Container"), exports);
|
|
34
33
|
__exportStar(require("./Enums"), exports);
|
package/main.d.ts
CHANGED
|
@@ -15,10 +15,11 @@ export declare class Main {
|
|
|
15
15
|
setOnClickHandler(callback: (e: Event, particles?: Particle[]) => void): void;
|
|
16
16
|
dom(): Container[];
|
|
17
17
|
domItem(index: number): Container | undefined;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
refresh(): Promise<void>;
|
|
19
|
+
addShape(shape: string, drawer: IShapeDrawer | ShapeDrawerDrawFunction, init?: ShapeDrawerInitFunction, afterEffect?: ShapeDrawerAfterEffectFunction, destroy?: ShapeDrawerDestroyFunction): Promise<void>;
|
|
20
|
+
addPreset(preset: string, options: RecursivePartial<IOptions>, override?: boolean): Promise<void>;
|
|
21
|
+
addPlugin(plugin: IPlugin): Promise<void>;
|
|
22
|
+
addPathGenerator(name: string, generator: IMovePathGenerator): Promise<void>;
|
|
23
|
+
addInteractor(name: string, interactorInitializer: (container: Container) => IInteractor): Promise<void>;
|
|
24
|
+
addParticleUpdater(name: string, updaterInitializer: (container: Container) => IParticleUpdater): Promise<void>;
|
|
24
25
|
}
|
package/main.js
CHANGED
|
@@ -34,7 +34,7 @@ class Main {
|
|
|
34
34
|
async set(id, element, options) {
|
|
35
35
|
return Loader_1.Loader.set(id, element, options);
|
|
36
36
|
}
|
|
37
|
-
loadJSON(tagId, pathConfigJson, index) {
|
|
37
|
+
async loadJSON(tagId, pathConfigJson, index) {
|
|
38
38
|
return Loader_1.Loader.loadJSON(tagId, pathConfigJson, index);
|
|
39
39
|
}
|
|
40
40
|
async setJSON(id, element, pathConfigJson, index) {
|
|
@@ -49,7 +49,12 @@ class Main {
|
|
|
49
49
|
domItem(index) {
|
|
50
50
|
return Loader_1.Loader.domItem(index);
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
async refresh() {
|
|
53
|
+
for (const instance of this.dom()) {
|
|
54
|
+
await instance.refresh();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async addShape(shape, drawer, init, afterEffect, destroy) {
|
|
53
58
|
let customDrawer;
|
|
54
59
|
if (typeof drawer === "function") {
|
|
55
60
|
customDrawer = {
|
|
@@ -63,21 +68,27 @@ class Main {
|
|
|
63
68
|
customDrawer = drawer;
|
|
64
69
|
}
|
|
65
70
|
Utils_1.Plugins.addShapeDrawer(shape, customDrawer);
|
|
71
|
+
await this.refresh();
|
|
66
72
|
}
|
|
67
|
-
addPreset(preset, options, override = false) {
|
|
73
|
+
async addPreset(preset, options, override = false) {
|
|
68
74
|
Utils_1.Plugins.addPreset(preset, options, override);
|
|
75
|
+
await this.refresh();
|
|
69
76
|
}
|
|
70
|
-
addPlugin(plugin) {
|
|
77
|
+
async addPlugin(plugin) {
|
|
71
78
|
Utils_1.Plugins.addPlugin(plugin);
|
|
79
|
+
await this.refresh();
|
|
72
80
|
}
|
|
73
|
-
addPathGenerator(name, generator) {
|
|
81
|
+
async addPathGenerator(name, generator) {
|
|
74
82
|
Utils_1.Plugins.addPathGenerator(name, generator);
|
|
83
|
+
await this.refresh();
|
|
75
84
|
}
|
|
76
|
-
addInteractor(name, interactorInitializer) {
|
|
85
|
+
async addInteractor(name, interactorInitializer) {
|
|
77
86
|
Utils_1.Plugins.addInteractor(name, interactorInitializer);
|
|
87
|
+
await this.refresh();
|
|
78
88
|
}
|
|
79
|
-
addParticleUpdater(name, updaterInitializer) {
|
|
89
|
+
async addParticleUpdater(name, updaterInitializer) {
|
|
80
90
|
Utils_1.Plugins.addParticleUpdater(name, updaterInitializer);
|
|
91
|
+
await this.refresh();
|
|
81
92
|
}
|
|
82
93
|
}
|
|
83
94
|
exports.Main = Main;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsparticles",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.37.2",
|
|
4
4
|
"description": "Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.",
|
|
5
5
|
"homepage": "https://particles.js.org/",
|
|
6
6
|
"scripts": {
|