tsparticles 1.37.4 → 1.39.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.d.ts +2 -2
- package/Core/Canvas.js +44 -34
- package/Core/Container.d.ts +2 -3
- package/Core/Container.js +7 -8
- package/Core/Interfaces/ICircleBouncer.d.ts +1 -1
- package/Core/Interfaces/IMovePathGenerator.d.ts +1 -1
- package/Core/Interfaces/IParticle.d.ts +1 -1
- package/Core/Interfaces/index.d.ts +3 -1
- package/Core/Interfaces/index.js +3 -1
- package/Core/Loader.js +5 -9
- package/Core/Particle.d.ts +2 -5
- package/Core/Particle.js +16 -18
- package/Core/Particles.d.ts +1 -1
- package/Core/Particles.js +13 -19
- package/{Utils → Core/Utils}/Circle.d.ts +1 -1
- package/{Utils → Core/Utils}/Circle.js +2 -2
- package/{esm → Core}/Utils/CircleWarp.d.ts +1 -2
- package/{Utils → Core/Utils}/CircleWarp.js +0 -0
- package/{Utils → Core/Utils}/Constants.d.ts +1 -1
- package/{Utils → Core/Utils}/Constants.js +1 -1
- package/{Utils → Core/Utils}/EventListeners.d.ts +1 -1
- package/{Utils → Core/Utils}/EventListeners.js +11 -12
- package/Core/{ExternalInteractorBase.d.ts → Utils/ExternalInteractorBase.d.ts} +4 -4
- package/Core/{ExternalInteractorBase.js → Utils/ExternalInteractorBase.js} +1 -2
- package/{esm/Core → Core/Utils}/FrameManager.d.ts +1 -1
- package/Core/{FrameManager.js → Utils/FrameManager.js} +0 -0
- package/{esm/Core → Core/Utils}/InteractionManager.d.ts +3 -3
- package/Core/{InteractionManager.js → Utils/InteractionManager.js} +2 -3
- package/{esm/Core → Core/Utils}/ParticlesInteractorBase.d.ts +4 -4
- package/Core/{ParticlesInteractorBase.js → Utils/ParticlesInteractorBase.js} +1 -2
- package/{esm/Core/Particle/Mover.d.ts → Core/Utils/ParticlesMover.d.ts} +1 -1
- package/Core/{Particle/Mover.js → Utils/ParticlesMover.js} +6 -7
- package/{esm → Core}/Utils/Plugins.d.ts +5 -5
- package/{Utils → Core/Utils}/Plugins.js +0 -0
- package/{Utils → Core/Utils}/Point.d.ts +2 -2
- package/{Utils → Core/Utils}/Point.js +0 -0
- package/{Utils → Core/Utils}/QuadTree.d.ts +3 -3
- package/{Utils → Core/Utils}/QuadTree.js +2 -2
- package/{esm → Core}/Utils/Range.d.ts +1 -1
- package/{Utils → Core/Utils}/Range.js +0 -0
- package/{esm → Core}/Utils/Rectangle.d.ts +1 -2
- package/{Utils → Core/Utils}/Rectangle.js +0 -0
- package/Core/{Particle → Utils}/Vector.d.ts +0 -0
- package/Core/{Particle → Utils}/Vector.js +0 -0
- package/Core/{Particle → Utils}/Vector3d.d.ts +0 -0
- package/Core/{Particle → Utils}/Vector3d.js +0 -0
- package/Core/Utils/index.d.ts +16 -0
- package/Core/Utils/index.js +28 -0
- package/Core/index.d.ts +8 -0
- package/Core/index.js +20 -0
- package/Enums/AnimationStatus.d.ts +1 -1
- package/Enums/AnimationStatus.js +0 -6
- package/Enums/Directions/MoveDirection.d.ts +1 -1
- package/Enums/Directions/MoveDirection.js +0 -13
- package/Enums/Directions/OutModeDirection.d.ts +1 -1
- package/Enums/Directions/OutModeDirection.js +0 -8
- package/Enums/Directions/RotateDirection.d.ts +1 -1
- package/Enums/Directions/RotateDirection.js +0 -7
- package/Enums/Directions/TiltDirection.d.ts +1 -1
- package/Enums/Directions/TiltDirection.js +0 -7
- package/Enums/InteractivityDetect.d.ts +1 -1
- package/Enums/InteractivityDetect.js +0 -7
- package/Enums/Modes/ClickMode.d.ts +1 -1
- package/Enums/Modes/ClickMode.js +0 -11
- package/Enums/Modes/CollisionMode.d.ts +1 -1
- package/Enums/Modes/CollisionMode.js +0 -7
- package/Enums/Modes/DestroyMode.d.ts +1 -1
- package/Enums/Modes/DestroyMode.js +0 -6
- package/Enums/Modes/DivMode.d.ts +1 -1
- package/Enums/Modes/DivMode.js +0 -7
- package/Enums/Modes/HoverMode.d.ts +1 -1
- package/Enums/Modes/HoverMode.js +0 -13
- package/Enums/Modes/OutMode.d.ts +1 -1
- package/Enums/Modes/OutMode.js +0 -11
- package/Enums/Modes/ResponsiveMode.d.ts +1 -1
- package/Enums/Modes/ResponsiveMode.js +0 -6
- package/Enums/Modes/RollMode.d.ts +1 -1
- package/Enums/Modes/RollMode.js +0 -7
- package/Enums/Modes/SizeMode.d.ts +1 -1
- package/Enums/Modes/SizeMode.js +0 -6
- package/Enums/Modes/ThemeMode.d.ts +1 -1
- package/Enums/Modes/ThemeMode.js +0 -7
- package/Enums/Types/AlterType.d.ts +1 -1
- package/Enums/Types/AlterType.js +0 -6
- package/Enums/Types/DestroyType.d.ts +1 -1
- package/Enums/Types/DestroyType.js +0 -7
- package/Enums/Types/DivType.d.ts +1 -1
- package/Enums/Types/DivType.js +0 -6
- package/Enums/Types/EasingType.d.ts +1 -1
- package/Enums/Types/EasingType.js +0 -12
- package/Enums/Types/GradientType.d.ts +1 -1
- package/Enums/Types/GradientType.js +0 -7
- package/Enums/Types/InteractorType.d.ts +1 -1
- package/Enums/Types/InteractorType.js +0 -6
- package/Enums/Types/OrbitType.d.ts +1 -1
- package/Enums/Types/OrbitType.js +0 -6
- package/Enums/Types/ShapeType.d.ts +1 -1
- package/Enums/Types/ShapeType.js +0 -15
- package/Enums/Types/StartValueType.d.ts +1 -1
- package/Enums/Types/StartValueType.js +0 -7
- package/Interactions/External/Attract/Attractor.d.ts +2 -2
- package/Interactions/External/Attract/Attractor.js +9 -11
- package/Interactions/External/Attract/index.d.ts +2 -2
- package/Interactions/External/Bounce/Bouncer.d.ts +2 -2
- package/Interactions/External/Bounce/Bouncer.js +15 -17
- package/Interactions/External/Bounce/index.d.ts +2 -2
- package/Interactions/External/Bubble/Bubbler.d.ts +3 -3
- package/Interactions/External/Bubble/Bubbler.js +20 -22
- package/Interactions/External/Bubble/ProcessBubbleType.d.ts +1 -1
- package/Interactions/External/Bubble/ProcessBubbleType.js +0 -7
- package/Interactions/External/Bubble/index.d.ts +2 -2
- package/Interactions/External/Connect/Connector.d.ts +2 -2
- package/Interactions/External/Connect/Connector.js +3 -4
- package/Interactions/External/Connect/index.d.ts +2 -2
- package/Interactions/External/Grab/Grabber.d.ts +2 -2
- package/Interactions/External/Grab/Grabber.js +4 -5
- package/Interactions/External/Grab/index.d.ts +2 -2
- package/Interactions/External/Repulse/Repulser.d.ts +2 -2
- package/Interactions/External/Repulse/Repulser.js +15 -17
- package/Interactions/External/Repulse/index.d.ts +2 -2
- package/Interactions/External/Trail/TrailMaker.d.ts +2 -3
- package/Interactions/External/Trail/TrailMaker.js +4 -5
- package/Interactions/External/Trail/index.d.ts +2 -2
- package/Interactions/Particles/Attract/Attractor.d.ts +2 -4
- package/Interactions/Particles/Attract/Attractor.js +2 -2
- package/Interactions/Particles/Attract/index.d.ts +2 -2
- package/Interactions/Particles/Collisions/Collider.d.ts +2 -3
- package/Interactions/Particles/Collisions/Collider.js +5 -6
- package/Interactions/Particles/Collisions/index.d.ts +2 -2
- package/Interactions/Particles/Links/LinkInstance.d.ts +1 -3
- package/Interactions/Particles/Links/LinkParticle.d.ts +1 -1
- package/Interactions/Particles/Links/Linker.d.ts +3 -4
- package/Interactions/Particles/Links/Linker.js +4 -4
- package/Interactions/Particles/Links/index.d.ts +2 -3
- package/Interactions/Particles/Links/index.js +3 -7
- package/Interactions/Particles/Links/interaction.d.ts +2 -0
- package/Interactions/Particles/Links/interaction.js +8 -0
- package/Interactions/Particles/Links/plugin.d.ts +2 -2
- package/Interactions/Particles/Links/plugin.js +2 -2
- package/Options/Classes/AnimatableGradient.js +3 -4
- package/Options/Classes/Interactivity/Events/DivEvent.js +1 -2
- package/Options/Classes/Interactivity/Interactivity.js +5 -6
- package/Options/Classes/Interactivity/Modes/Attract.js +1 -2
- package/Options/Classes/Interactivity/Modes/RepulseBase.js +1 -2
- package/Options/Classes/Options.d.ts +1 -0
- package/Options/Classes/Options.js +10 -8
- package/Options/Classes/Particles/Collisions/Collisions.js +1 -2
- package/Options/Classes/Particles/Destroy/Destroy.js +1 -2
- package/Options/Classes/Particles/Move/Move.js +1 -2
- package/Options/Classes/Particles/Move/OutModes.js +1 -2
- package/Options/Classes/Particles/Opacity/OpacityAnimation.js +2 -3
- package/Options/Classes/Particles/Roll/Roll.js +1 -2
- package/Options/Classes/Particles/Rotate/Rotate.js +1 -2
- package/Options/Classes/Particles/Shape/Shape.js +13 -14
- package/Options/Classes/Particles/Size/SizeAnimation.js +2 -3
- package/Options/Classes/Particles/Tilt/Tilt.js +1 -2
- package/Options/Classes/Responsive.js +4 -5
- package/Options/Classes/Theme/ThemeDefault.js +1 -2
- package/Options/Interfaces/IOptions.d.ts +1 -0
- package/Plugins/Absorbers/AbsorberContainer.d.ts +1 -1
- package/Plugins/Absorbers/AbsorberInstance.d.ts +2 -4
- package/Plugins/Absorbers/AbsorberInstance.js +9 -10
- package/Plugins/Absorbers/Absorbers.d.ts +1 -4
- package/Plugins/Absorbers/Absorbers.js +1 -2
- package/Plugins/Absorbers/Enums/AbsorberClickMode.d.ts +1 -1
- package/Plugins/Absorbers/Enums/AbsorberClickMode.js +0 -5
- package/Plugins/Absorbers/index.d.ts +2 -0
- package/Plugins/Absorbers/{plugin.js → index.js} +3 -4
- package/Plugins/Emitters/EmitterContainer.d.ts +1 -1
- package/Plugins/Emitters/EmitterInstance.d.ts +1 -2
- package/Plugins/Emitters/EmitterInstance.js +3 -4
- package/Plugins/Emitters/Emitters.d.ts +1 -2
- package/Plugins/Emitters/Emitters.js +1 -2
- package/Plugins/Emitters/EmittersMain.d.ts +2 -2
- package/Plugins/Emitters/Enums/EmitterClickMode.d.ts +1 -1
- package/Plugins/Emitters/Enums/EmitterClickMode.js +0 -5
- package/Plugins/Emitters/Enums/EmitterShapeType.d.ts +1 -1
- package/Plugins/Emitters/Enums/EmitterShapeType.js +0 -6
- package/Plugins/Emitters/IEmitterShape.d.ts +1 -1
- package/Plugins/Emitters/Options/Classes/Emitter.js +1 -2
- package/Plugins/Emitters/Options/Classes/EmitterSize.js +1 -2
- package/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +1 -1
- package/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +1 -1
- package/Plugins/Emitters/{plugin.d.ts → index.d.ts} +0 -0
- package/Plugins/Emitters/{plugin.js → index.js} +3 -4
- package/Plugins/PolygonMask/Enums/PolygonMaskInlineArrangement.d.ts +8 -0
- package/Plugins/PolygonMask/{Options/Interfaces/IDraw.js → Enums/PolygonMaskInlineArrangement.js} +0 -0
- package/Plugins/PolygonMask/Enums/PolygonMaskMoveType.d.ts +4 -0
- package/Plugins/PolygonMask/{Options/Interfaces/IDrawStroke.js → Enums/PolygonMaskMoveType.js} +0 -0
- package/{esm/Plugins/PolygonMask/Enums/Type.d.ts → Plugins/PolygonMask/Enums/PolygonMaskType.d.ts} +1 -1
- package/Plugins/PolygonMask/{Options/Interfaces/IInline.js → Enums/PolygonMaskType.js} +0 -0
- package/Plugins/PolygonMask/Enums/index.d.ts +3 -3
- package/Plugins/PolygonMask/Enums/index.js +3 -3
- package/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +13 -13
- package/Plugins/PolygonMask/Options/Classes/PolygonMask.js +42 -42
- package/Plugins/PolygonMask/Options/Classes/{Draw.d.ts → PolygonMaskDraw.d.ts} +5 -5
- package/Plugins/PolygonMask/Options/Classes/{Draw.js → PolygonMaskDraw.js} +15 -14
- package/Plugins/PolygonMask/Options/Classes/{DrawStroke.d.ts → PolygonMaskDrawStroke.d.ts} +3 -3
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.js +29 -0
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +9 -0
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.js +17 -0
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +11 -0
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.js +29 -0
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +10 -0
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.js +21 -0
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +12 -13
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +8 -0
- package/Plugins/PolygonMask/Options/Interfaces/{ILocalSvg.js → IPolygonMaskDraw.js} +0 -0
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDrawStroke.d.ts +6 -0
- package/Plugins/PolygonMask/Options/Interfaces/{IMove.js → IPolygonMaskDrawStroke.js} +0 -0
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskInline.d.ts +4 -0
- package/Plugins/PolygonMask/{types.js → Options/Interfaces/IPolygonMaskInline.js} +0 -0
- package/Plugins/PolygonMask/Options/Interfaces/{ILocalSvg.d.ts → IPolygonMaskLocalSvg.d.ts} +2 -2
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.js +2 -0
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.d.ts +5 -0
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.js +2 -0
- package/Plugins/PolygonMask/PolygonMaskInstance.d.ts +2 -4
- package/Plugins/PolygonMask/PolygonMaskInstance.js +33 -30
- package/Plugins/PolygonMask/{types.d.ts → Types.d.ts} +0 -0
- package/Plugins/PolygonMask/Types.js +2 -0
- package/{esm/Plugins/PolygonMask/utils.d.ts → Plugins/PolygonMask/Utils.d.ts} +5 -5
- package/Plugins/PolygonMask/{utils.js → Utils.js} +15 -12
- package/Plugins/PolygonMask/index.d.ts +2 -0
- package/Plugins/PolygonMask/{plugin.js → index.js} +4 -5
- package/Plugins/PolygonMask/pathseg.js +54 -43
- package/README.md +68 -0
- package/Shapes/Circle/CircleDrawer.d.ts +1 -1
- package/Shapes/Circle/index.d.ts +2 -2
- package/Shapes/Image/ImageDrawer.d.ts +3 -7
- package/Shapes/Image/ImageDrawer.js +29 -109
- package/Shapes/Image/Utils.d.ts +8 -5
- package/Shapes/Image/Utils.js +69 -38
- package/Shapes/Image/index.d.ts +2 -2
- package/Shapes/Line/LineDrawer.d.ts +1 -1
- package/Shapes/Line/index.d.ts +2 -2
- package/Shapes/Polygon/PolygonDrawer.d.ts +1 -1
- package/Shapes/Polygon/PolygonDrawerBase.d.ts +1 -1
- package/Shapes/Polygon/TriangleDrawer.d.ts +1 -1
- package/Shapes/Polygon/index.d.ts +4 -4
- package/Shapes/Square/SquareDrawer.d.ts +1 -1
- package/Shapes/Square/index.d.ts +2 -2
- package/Shapes/Star/StarDrawer.d.ts +1 -1
- package/Shapes/Star/index.d.ts +2 -2
- package/Shapes/Text/TextDrawer.d.ts +1 -2
- package/Shapes/Text/index.d.ts +2 -2
- package/Updaters/Angle/AngleUpdater.d.ts +1 -3
- package/Updaters/Angle/AngleUpdater.js +8 -9
- package/Updaters/Angle/index.d.ts +2 -2
- package/Updaters/Color/ColorUpdater.d.ts +1 -3
- package/Updaters/Color/ColorUpdater.js +3 -4
- package/Updaters/Color/index.d.ts +2 -2
- package/Updaters/Life/LifeUpdater.d.ts +1 -3
- package/Updaters/Life/index.d.ts +2 -2
- package/Updaters/Opacity/OpacityUpdater.d.ts +1 -3
- package/Updaters/Opacity/OpacityUpdater.js +13 -14
- package/Updaters/Opacity/index.d.ts +2 -2
- package/Updaters/OutModes/IBounceData.d.ts +1 -2
- package/Updaters/OutModes/OutOfCanvasUpdater.d.ts +1 -3
- package/Updaters/OutModes/OutOfCanvasUpdater.js +19 -20
- package/Updaters/OutModes/Utils.js +12 -13
- package/Updaters/OutModes/index.d.ts +2 -2
- package/Updaters/Roll/RollUpdater.d.ts +1 -2
- package/Updaters/Roll/RollUpdater.js +4 -5
- package/Updaters/Roll/index.d.ts +2 -2
- package/Updaters/Size/SizeUpdater.d.ts +1 -2
- package/Updaters/Size/SizeUpdater.js +6 -7
- package/Updaters/Size/index.d.ts +2 -2
- package/Updaters/StrokeColor/StrokeColorUpdater.d.ts +1 -3
- package/Updaters/StrokeColor/StrokeColorUpdater.js +3 -4
- package/Updaters/StrokeColor/index.d.ts +2 -2
- package/Updaters/Tilt/TiltUpdater.d.ts +1 -3
- package/Updaters/Tilt/TiltUpdater.js +8 -9
- package/Updaters/Tilt/index.d.ts +2 -2
- package/Updaters/Wobble/WobbleUpdater.d.ts +1 -3
- package/Updaters/Wobble/index.d.ts +2 -2
- package/Utils/CanvasUtils.d.ts +3 -3
- package/Utils/CanvasUtils.js +4 -5
- package/Utils/ColorUtils.d.ts +1 -1
- package/Utils/ColorUtils.js +7 -8
- package/Utils/NumberUtils.d.ts +2 -2
- package/Utils/NumberUtils.js +20 -21
- package/Utils/Utils.d.ts +1 -1
- package/Utils/Utils.js +10 -14
- package/Utils/index.d.ts +0 -9
- package/Utils/index.js +0 -9
- package/browser/Core/Canvas.d.ts +2 -2
- package/browser/Core/Canvas.js +25 -15
- package/browser/Core/Container.d.ts +2 -3
- package/browser/Core/Container.js +2 -3
- package/browser/Core/Interfaces/ICircleBouncer.d.ts +1 -1
- package/browser/Core/Interfaces/IMovePathGenerator.d.ts +1 -1
- package/browser/Core/Interfaces/IParticle.d.ts +1 -1
- package/browser/Core/Interfaces/index.d.ts +3 -1
- package/browser/Core/Interfaces/index.js +3 -1
- package/browser/Core/Loader.js +6 -10
- package/browser/Core/Particle.d.ts +2 -5
- package/browser/Core/Particle.js +13 -15
- package/browser/Core/Particles.d.ts +1 -1
- package/browser/Core/Particles.js +8 -14
- package/browser/{Utils → Core/Utils}/Circle.d.ts +1 -1
- package/browser/{Utils → Core/Utils}/Circle.js +1 -1
- package/browser/{Utils → Core/Utils}/CircleWarp.d.ts +1 -2
- package/browser/{Utils → Core/Utils}/CircleWarp.js +0 -0
- package/browser/{Utils → Core/Utils}/Constants.d.ts +1 -4
- package/browser/{Utils → Core/Utils}/Constants.js +1 -4
- package/browser/{Utils → Core/Utils}/EventListeners.d.ts +1 -1
- package/browser/{Utils → Core/Utils}/EventListeners.js +11 -12
- package/{esm/Core → browser/Core/Utils}/ExternalInteractorBase.d.ts +4 -4
- package/browser/Core/{ExternalInteractorBase.js → Utils/ExternalInteractorBase.js} +1 -2
- package/browser/Core/{FrameManager.d.ts → Utils/FrameManager.d.ts} +1 -1
- package/browser/Core/{FrameManager.js → Utils/FrameManager.js} +0 -0
- package/browser/Core/{InteractionManager.d.ts → Utils/InteractionManager.d.ts} +3 -3
- package/browser/Core/{InteractionManager.js → Utils/InteractionManager.js} +2 -3
- package/{Core → browser/Core/Utils}/ParticlesInteractorBase.d.ts +4 -4
- package/{esm/Core → browser/Core/Utils}/ParticlesInteractorBase.js +1 -2
- package/browser/Core/{Particle/Mover.d.ts → Utils/ParticlesMover.d.ts} +1 -1
- package/browser/Core/{Particle/Mover.js → Utils/ParticlesMover.js} +4 -5
- package/browser/{Utils → Core/Utils}/Plugins.d.ts +5 -5
- package/browser/{Utils → Core/Utils}/Plugins.js +0 -0
- package/browser/{Utils → Core/Utils}/Point.d.ts +2 -2
- package/browser/{Utils → Core/Utils}/Point.js +0 -0
- package/browser/{Utils → Core/Utils}/QuadTree.d.ts +3 -3
- package/browser/{Utils → Core/Utils}/QuadTree.js +1 -1
- package/browser/{Utils → Core/Utils}/Range.d.ts +1 -1
- package/browser/{Utils → Core/Utils}/Range.js +0 -0
- package/browser/{Utils → Core/Utils}/Rectangle.d.ts +1 -2
- package/browser/{Utils → Core/Utils}/Rectangle.js +0 -0
- package/browser/Core/{Particle → Utils}/Vector.d.ts +0 -0
- package/browser/Core/{Particle → Utils}/Vector.js +0 -0
- package/browser/Core/{Particle → Utils}/Vector3d.d.ts +0 -0
- package/browser/Core/{Particle → Utils}/Vector3d.js +0 -0
- package/browser/Core/Utils/index.d.ts +16 -0
- package/browser/Core/Utils/index.js +16 -0
- package/browser/Core/index.d.ts +8 -0
- package/browser/Core/index.js +8 -0
- package/browser/Enums/AnimationStatus.d.ts +1 -1
- package/browser/Enums/AnimationStatus.js +1 -5
- package/browser/Enums/Directions/MoveDirection.d.ts +1 -1
- package/browser/Enums/Directions/MoveDirection.js +1 -15
- package/browser/Enums/Directions/OutModeDirection.d.ts +1 -1
- package/browser/Enums/Directions/OutModeDirection.js +1 -7
- package/browser/Enums/Directions/RotateDirection.d.ts +1 -1
- package/browser/Enums/Directions/RotateDirection.js +1 -9
- package/browser/Enums/Directions/TiltDirection.d.ts +1 -1
- package/browser/Enums/Directions/TiltDirection.js +1 -9
- package/browser/Enums/InteractivityDetect.d.ts +1 -1
- package/browser/Enums/InteractivityDetect.js +1 -9
- package/browser/Enums/Modes/ClickMode.d.ts +1 -1
- package/browser/Enums/Modes/ClickMode.js +1 -13
- package/browser/Enums/Modes/CollisionMode.d.ts +1 -1
- package/browser/Enums/Modes/CollisionMode.js +1 -9
- package/browser/Enums/Modes/DestroyMode.d.ts +1 -1
- package/browser/Enums/Modes/DestroyMode.js +1 -5
- package/browser/Enums/Modes/DivMode.d.ts +1 -1
- package/browser/Enums/Modes/DivMode.js +1 -9
- package/browser/Enums/Modes/HoverMode.d.ts +1 -1
- package/browser/Enums/Modes/HoverMode.js +1 -15
- package/browser/Enums/Modes/OutMode.d.ts +1 -1
- package/browser/Enums/Modes/OutMode.js +1 -13
- package/browser/Enums/Modes/ResponsiveMode.d.ts +1 -1
- package/browser/Enums/Modes/ResponsiveMode.js +1 -5
- package/browser/Enums/Modes/RollMode.d.ts +1 -1
- package/browser/Enums/Modes/RollMode.js +1 -6
- package/browser/Enums/Modes/SizeMode.d.ts +1 -1
- package/browser/Enums/Modes/SizeMode.js +1 -8
- package/browser/Enums/Modes/ThemeMode.d.ts +1 -1
- package/browser/Enums/Modes/ThemeMode.js +1 -6
- package/browser/Enums/Types/AlterType.d.ts +1 -1
- package/browser/Enums/Types/AlterType.js +1 -5
- package/browser/Enums/Types/DestroyType.d.ts +1 -1
- package/browser/Enums/Types/DestroyType.js +1 -9
- package/browser/Enums/Types/DivType.d.ts +1 -1
- package/browser/Enums/Types/DivType.js +1 -8
- package/browser/Enums/Types/EasingType.d.ts +1 -1
- package/browser/Enums/Types/EasingType.js +1 -11
- package/browser/Enums/Types/GradientType.d.ts +1 -1
- package/browser/Enums/Types/GradientType.js +1 -6
- package/browser/Enums/Types/InteractorType.d.ts +1 -1
- package/browser/Enums/Types/InteractorType.js +1 -5
- package/browser/Enums/Types/OrbitType.d.ts +1 -1
- package/browser/Enums/Types/OrbitType.js +1 -8
- package/browser/Enums/Types/ShapeType.d.ts +1 -1
- package/browser/Enums/Types/ShapeType.js +1 -17
- package/browser/Enums/Types/StartValueType.d.ts +1 -1
- package/browser/Enums/Types/StartValueType.js +1 -9
- package/browser/Interactions/External/Attract/Attractor.d.ts +2 -2
- package/browser/Interactions/External/Attract/Attractor.js +5 -7
- package/browser/Interactions/External/Attract/index.d.ts +2 -2
- package/browser/Interactions/External/Bounce/Bouncer.d.ts +2 -2
- package/browser/Interactions/External/Bounce/Bouncer.js +7 -9
- package/browser/Interactions/External/Bounce/index.d.ts +2 -2
- package/browser/Interactions/External/Bubble/Bubbler.d.ts +3 -3
- package/browser/Interactions/External/Bubble/Bubbler.js +16 -18
- package/browser/Interactions/External/Bubble/ProcessBubbleType.d.ts +1 -1
- package/browser/Interactions/External/Bubble/ProcessBubbleType.js +1 -9
- package/browser/Interactions/External/Bubble/index.d.ts +2 -2
- package/browser/Interactions/External/Connect/Connector.d.ts +2 -2
- package/browser/Interactions/External/Connect/Connector.js +2 -3
- package/browser/Interactions/External/Connect/index.d.ts +2 -2
- package/browser/Interactions/External/Grab/Grabber.d.ts +2 -2
- package/browser/Interactions/External/Grab/Grabber.js +3 -4
- package/browser/Interactions/External/Grab/index.d.ts +2 -2
- package/browser/Interactions/External/Repulse/Repulser.d.ts +2 -2
- package/browser/Interactions/External/Repulse/Repulser.js +8 -10
- package/browser/Interactions/External/Repulse/index.d.ts +2 -2
- package/browser/Interactions/External/Trail/TrailMaker.d.ts +2 -3
- package/browser/Interactions/External/Trail/TrailMaker.js +3 -4
- package/browser/Interactions/External/Trail/index.d.ts +2 -2
- package/browser/Interactions/Particles/Attract/Attractor.d.ts +2 -4
- package/browser/Interactions/Particles/Attract/Attractor.js +1 -1
- package/browser/Interactions/Particles/Attract/index.d.ts +2 -2
- package/browser/Interactions/Particles/Collisions/Collider.d.ts +2 -3
- package/browser/Interactions/Particles/Collisions/Collider.js +4 -5
- package/browser/Interactions/Particles/Collisions/index.d.ts +2 -2
- package/browser/Interactions/Particles/Links/LinkInstance.d.ts +1 -3
- package/browser/Interactions/Particles/Links/LinkParticle.d.ts +1 -1
- package/browser/Interactions/Particles/Links/Linker.d.ts +3 -4
- package/browser/Interactions/Particles/Links/Linker.js +2 -2
- package/browser/Interactions/Particles/Links/index.d.ts +2 -3
- package/browser/Interactions/Particles/Links/index.js +1 -4
- package/browser/Interactions/Particles/Links/interaction.d.ts +2 -0
- package/browser/Interactions/Particles/Links/interaction.js +4 -0
- package/browser/Interactions/Particles/Links/plugin.d.ts +2 -2
- package/browser/Interactions/Particles/Links/plugin.js +2 -2
- package/browser/Options/Classes/AnimatableGradient.js +3 -4
- package/browser/Options/Classes/Interactivity/Events/DivEvent.js +1 -2
- package/browser/Options/Classes/Interactivity/Interactivity.js +5 -6
- package/browser/Options/Classes/Interactivity/Modes/Attract.js +1 -2
- package/browser/Options/Classes/Interactivity/Modes/RepulseBase.js +1 -2
- package/browser/Options/Classes/Options.d.ts +1 -0
- package/browser/Options/Classes/Options.js +9 -7
- package/browser/Options/Classes/Particles/Collisions/Collisions.js +1 -2
- package/browser/Options/Classes/Particles/Destroy/Destroy.js +1 -2
- package/browser/Options/Classes/Particles/Move/Move.js +1 -2
- package/browser/Options/Classes/Particles/Move/OutModes.js +1 -2
- package/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +2 -3
- package/browser/Options/Classes/Particles/Roll/Roll.js +1 -2
- package/browser/Options/Classes/Particles/Rotate/Rotate.js +1 -2
- package/browser/Options/Classes/Particles/Shape/Shape.js +13 -14
- package/browser/Options/Classes/Particles/Size/SizeAnimation.js +2 -3
- package/browser/Options/Classes/Particles/Tilt/Tilt.js +1 -2
- package/browser/Options/Classes/Responsive.js +4 -5
- package/browser/Options/Classes/Theme/ThemeDefault.js +1 -2
- package/browser/Options/Interfaces/IOptions.d.ts +1 -0
- package/browser/Plugins/Absorbers/AbsorberContainer.d.ts +1 -1
- package/browser/Plugins/Absorbers/AbsorberInstance.d.ts +2 -4
- package/browser/Plugins/Absorbers/AbsorberInstance.js +4 -5
- package/browser/Plugins/Absorbers/Absorbers.d.ts +1 -4
- package/browser/Plugins/Absorbers/Absorbers.js +1 -2
- package/browser/Plugins/Absorbers/Enums/AbsorberClickMode.d.ts +1 -1
- package/browser/Plugins/Absorbers/Enums/AbsorberClickMode.js +1 -7
- package/browser/Plugins/Absorbers/index.d.ts +2 -0
- package/browser/Plugins/Absorbers/{plugin.js → index.js} +3 -4
- package/browser/Plugins/Emitters/EmitterContainer.d.ts +1 -1
- package/browser/Plugins/Emitters/EmitterInstance.d.ts +1 -2
- package/browser/Plugins/Emitters/EmitterInstance.js +3 -4
- package/browser/Plugins/Emitters/Emitters.d.ts +1 -2
- package/browser/Plugins/Emitters/Emitters.js +1 -2
- package/browser/Plugins/Emitters/EmittersMain.d.ts +2 -2
- package/browser/Plugins/Emitters/Enums/EmitterClickMode.d.ts +1 -1
- package/browser/Plugins/Emitters/Enums/EmitterClickMode.js +1 -7
- package/browser/Plugins/Emitters/Enums/EmitterShapeType.d.ts +1 -1
- package/browser/Plugins/Emitters/Enums/EmitterShapeType.js +1 -5
- package/browser/Plugins/Emitters/IEmitterShape.d.ts +1 -1
- package/browser/Plugins/Emitters/Options/Classes/Emitter.js +1 -2
- package/browser/Plugins/Emitters/Options/Classes/EmitterSize.js +1 -2
- package/browser/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +1 -1
- package/browser/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +1 -1
- package/browser/Plugins/Emitters/{plugin.d.ts → index.d.ts} +0 -0
- package/browser/Plugins/Emitters/{plugin.js → index.js} +3 -4
- package/browser/Plugins/PolygonMask/Enums/PolygonMaskInlineArrangement.d.ts +8 -0
- package/browser/Plugins/PolygonMask/{Options/Interfaces/IDraw.js → Enums/PolygonMaskInlineArrangement.js} +0 -0
- package/browser/Plugins/PolygonMask/Enums/PolygonMaskMoveType.d.ts +4 -0
- package/browser/Plugins/PolygonMask/{Options/Interfaces/IDrawStroke.js → Enums/PolygonMaskMoveType.js} +0 -0
- package/{Plugins/PolygonMask/Enums/Type.d.ts → browser/Plugins/PolygonMask/Enums/PolygonMaskType.d.ts} +1 -1
- package/browser/Plugins/PolygonMask/{Options/Interfaces/IInline.js → Enums/PolygonMaskType.js} +0 -0
- package/browser/Plugins/PolygonMask/Enums/index.d.ts +3 -3
- package/browser/Plugins/PolygonMask/Enums/index.js +3 -3
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +13 -13
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMask.js +42 -42
- package/browser/Plugins/PolygonMask/Options/Classes/{Draw.d.ts → PolygonMaskDraw.d.ts} +5 -5
- package/browser/Plugins/PolygonMask/Options/Classes/{Draw.js → PolygonMaskDraw.js} +13 -12
- package/browser/Plugins/PolygonMask/Options/Classes/{DrawStroke.d.ts → PolygonMaskDrawStroke.d.ts} +3 -3
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.js +28 -0
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +12 -0
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.js +16 -0
- package/browser/Plugins/PolygonMask/Options/Classes/{LocalSvg.d.ts → PolygonMaskLocalSvg.d.ts} +4 -4
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.js +28 -0
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +13 -0
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.js +20 -0
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +12 -13
- package/browser/Plugins/PolygonMask/Options/Interfaces/{IDraw.d.ts → IPolygonMaskDraw.d.ts} +4 -4
- package/browser/Plugins/PolygonMask/Options/Interfaces/{ILocalSvg.js → IPolygonMaskDraw.js} +0 -0
- package/browser/Plugins/PolygonMask/Options/Interfaces/{IDrawStroke.d.ts → IPolygonMaskDrawStroke.d.ts} +2 -2
- package/browser/Plugins/PolygonMask/Options/Interfaces/{IMove.js → IPolygonMaskDrawStroke.js} +0 -0
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskInline.d.ts +7 -0
- package/browser/Plugins/PolygonMask/{types.js → Options/Interfaces/IPolygonMaskInline.js} +0 -0
- package/browser/Plugins/PolygonMask/Options/Interfaces/{ILocalSvg.d.ts → IPolygonMaskLocalSvg.d.ts} +2 -2
- package/{esm/Plugins/PolygonMask/Options/Interfaces/IDraw.js → browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.js} +0 -0
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.d.ts +8 -0
- package/{esm/Plugins/PolygonMask/Options/Interfaces/IDrawStroke.js → browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.js} +0 -0
- package/browser/Plugins/PolygonMask/PolygonMaskInstance.d.ts +2 -4
- package/browser/Plugins/PolygonMask/PolygonMaskInstance.js +24 -21
- package/browser/Plugins/PolygonMask/{types.d.ts → Types.d.ts} +0 -0
- package/{esm/Plugins/PolygonMask/Options/Interfaces/IInline.js → browser/Plugins/PolygonMask/Types.js} +0 -0
- package/{Plugins/PolygonMask/utils.d.ts → browser/Plugins/PolygonMask/Utils.d.ts} +5 -5
- package/browser/Plugins/PolygonMask/{utils.js → Utils.js} +15 -12
- package/browser/Plugins/PolygonMask/index.d.ts +2 -0
- package/browser/Plugins/PolygonMask/{plugin.js → index.js} +5 -6
- package/browser/Plugins/PolygonMask/pathseg.js +54 -44
- package/browser/Shapes/Circle/CircleDrawer.d.ts +1 -1
- package/browser/Shapes/Circle/index.d.ts +2 -2
- package/browser/Shapes/Image/ImageDrawer.d.ts +3 -7
- package/browser/Shapes/Image/ImageDrawer.js +28 -111
- package/browser/Shapes/Image/Utils.d.ts +8 -5
- package/browser/Shapes/Image/Utils.js +71 -37
- package/browser/Shapes/Image/index.d.ts +2 -2
- package/browser/Shapes/Line/LineDrawer.d.ts +1 -1
- package/browser/Shapes/Line/index.d.ts +2 -2
- package/browser/Shapes/Polygon/PolygonDrawer.d.ts +1 -1
- package/browser/Shapes/Polygon/PolygonDrawerBase.d.ts +1 -1
- package/browser/Shapes/Polygon/TriangleDrawer.d.ts +1 -1
- package/browser/Shapes/Polygon/index.d.ts +4 -4
- package/browser/Shapes/Square/SquareDrawer.d.ts +1 -1
- package/browser/Shapes/Square/index.d.ts +2 -2
- package/browser/Shapes/Star/StarDrawer.d.ts +1 -1
- package/browser/Shapes/Star/index.d.ts +2 -2
- package/browser/Shapes/Text/TextDrawer.d.ts +1 -2
- package/browser/Shapes/Text/index.d.ts +2 -2
- package/browser/Updaters/Angle/AngleUpdater.d.ts +1 -3
- package/browser/Updaters/Angle/AngleUpdater.js +8 -9
- package/browser/Updaters/Angle/index.d.ts +2 -2
- package/browser/Updaters/Color/ColorUpdater.d.ts +1 -3
- package/browser/Updaters/Color/ColorUpdater.js +3 -4
- package/browser/Updaters/Color/index.d.ts +2 -2
- package/browser/Updaters/Life/LifeUpdater.d.ts +1 -3
- package/browser/Updaters/Life/index.d.ts +2 -2
- package/browser/Updaters/Opacity/OpacityUpdater.d.ts +1 -3
- package/browser/Updaters/Opacity/OpacityUpdater.js +13 -14
- package/browser/Updaters/Opacity/index.d.ts +2 -2
- package/browser/Updaters/OutModes/IBounceData.d.ts +1 -2
- package/browser/Updaters/OutModes/OutOfCanvasUpdater.d.ts +1 -3
- package/browser/Updaters/OutModes/OutOfCanvasUpdater.js +19 -20
- package/browser/Updaters/OutModes/Utils.js +12 -13
- package/browser/Updaters/OutModes/index.d.ts +2 -2
- package/browser/Updaters/Roll/RollUpdater.d.ts +1 -2
- package/browser/Updaters/Roll/RollUpdater.js +4 -5
- package/browser/Updaters/Roll/index.d.ts +2 -2
- package/browser/Updaters/Size/SizeUpdater.d.ts +1 -2
- package/browser/Updaters/Size/SizeUpdater.js +6 -7
- package/browser/Updaters/Size/index.d.ts +2 -2
- package/browser/Updaters/StrokeColor/StrokeColorUpdater.d.ts +1 -3
- package/browser/Updaters/StrokeColor/StrokeColorUpdater.js +3 -4
- package/browser/Updaters/StrokeColor/index.d.ts +2 -2
- package/browser/Updaters/Tilt/TiltUpdater.d.ts +1 -3
- package/browser/Updaters/Tilt/TiltUpdater.js +8 -9
- package/browser/Updaters/Tilt/index.d.ts +2 -2
- package/browser/Updaters/Wobble/WobbleUpdater.d.ts +1 -3
- package/browser/Updaters/Wobble/index.d.ts +2 -2
- package/browser/Utils/CanvasUtils.d.ts +3 -3
- package/browser/Utils/CanvasUtils.js +4 -5
- package/browser/Utils/ColorUtils.d.ts +1 -1
- package/browser/Utils/ColorUtils.js +2 -3
- package/browser/Utils/NumberUtils.d.ts +2 -2
- package/browser/Utils/NumberUtils.js +18 -19
- package/browser/Utils/Utils.d.ts +1 -1
- package/browser/Utils/Utils.js +10 -14
- package/browser/Utils/index.d.ts +0 -9
- package/browser/Utils/index.js +0 -9
- package/browser/{main.d.ts → engine.d.ts} +4 -6
- package/browser/{main.js → engine.js} +10 -11
- package/browser/full.d.ts +2 -2
- package/browser/full.js +3 -3
- package/browser/index.d.ts +6 -16
- package/browser/index.engine.d.ts +13 -0
- package/browser/index.engine.js +12 -0
- package/browser/index.js +5 -13
- package/browser/index.slim.d.ts +6 -16
- package/browser/index.slim.js +5 -13
- package/browser/pjs.d.ts +3 -3
- package/browser/pjs.js +6 -5
- package/browser/slim.d.ts +2 -2
- package/{esm/main.d.ts → engine.d.ts} +2 -4
- package/{main.js → engine.js} +24 -25
- package/esm/Core/Canvas.d.ts +2 -2
- package/esm/Core/Canvas.js +25 -15
- package/esm/Core/Container.d.ts +2 -3
- package/esm/Core/Container.js +2 -3
- package/esm/Core/Interfaces/ICircleBouncer.d.ts +1 -1
- package/esm/Core/Interfaces/IMovePathGenerator.d.ts +1 -1
- package/esm/Core/Interfaces/IParticle.d.ts +1 -1
- package/esm/Core/Interfaces/index.d.ts +3 -1
- package/esm/Core/Interfaces/index.js +3 -1
- package/esm/Core/Loader.js +6 -10
- package/esm/Core/Particle.d.ts +2 -5
- package/esm/Core/Particle.js +13 -15
- package/esm/Core/Particles.d.ts +1 -1
- package/esm/Core/Particles.js +8 -14
- package/esm/{Utils → Core/Utils}/Circle.d.ts +1 -1
- package/esm/{Utils → Core/Utils}/Circle.js +1 -1
- package/{Utils → esm/Core/Utils}/CircleWarp.d.ts +1 -2
- package/esm/{Utils → Core/Utils}/CircleWarp.js +0 -0
- package/esm/{Utils → Core/Utils}/Constants.d.ts +1 -1
- package/esm/{Utils → Core/Utils}/Constants.js +1 -1
- package/esm/{Utils → Core/Utils}/EventListeners.d.ts +1 -1
- package/esm/{Utils → Core/Utils}/EventListeners.js +11 -12
- package/{browser/Core → esm/Core/Utils}/ExternalInteractorBase.d.ts +4 -4
- package/esm/Core/{ExternalInteractorBase.js → Utils/ExternalInteractorBase.js} +1 -2
- package/{Core → esm/Core/Utils}/FrameManager.d.ts +1 -1
- package/esm/Core/{FrameManager.js → Utils/FrameManager.js} +0 -0
- package/{Core → esm/Core/Utils}/InteractionManager.d.ts +3 -3
- package/esm/Core/{InteractionManager.js → Utils/InteractionManager.js} +2 -3
- package/{browser/Core → esm/Core/Utils}/ParticlesInteractorBase.d.ts +4 -4
- package/{browser/Core → esm/Core/Utils}/ParticlesInteractorBase.js +1 -2
- package/{Core/Particle/Mover.d.ts → esm/Core/Utils/ParticlesMover.d.ts} +1 -1
- package/esm/Core/{Particle/Mover.js → Utils/ParticlesMover.js} +4 -5
- package/{Utils → esm/Core/Utils}/Plugins.d.ts +5 -5
- package/esm/{Utils → Core/Utils}/Plugins.js +0 -0
- package/esm/{Utils → Core/Utils}/Point.d.ts +2 -2
- package/esm/{Utils → Core/Utils}/Point.js +0 -0
- package/esm/{Utils → Core/Utils}/QuadTree.d.ts +3 -3
- package/esm/{Utils → Core/Utils}/QuadTree.js +1 -1
- package/{Utils → esm/Core/Utils}/Range.d.ts +1 -1
- package/esm/{Utils → Core/Utils}/Range.js +0 -0
- package/{Utils → esm/Core/Utils}/Rectangle.d.ts +1 -2
- package/esm/{Utils → Core/Utils}/Rectangle.js +0 -0
- package/esm/Core/{Particle → Utils}/Vector.d.ts +0 -0
- package/esm/Core/{Particle → Utils}/Vector.js +0 -0
- package/esm/Core/{Particle → Utils}/Vector3d.d.ts +0 -0
- package/esm/Core/{Particle → Utils}/Vector3d.js +0 -0
- package/esm/Core/Utils/index.d.ts +16 -0
- package/esm/Core/Utils/index.js +16 -0
- package/esm/Core/index.d.ts +8 -0
- package/esm/Core/index.js +8 -0
- package/esm/Enums/AnimationStatus.d.ts +1 -1
- package/esm/Enums/AnimationStatus.js +1 -5
- package/esm/Enums/Directions/MoveDirection.d.ts +1 -1
- package/esm/Enums/Directions/MoveDirection.js +1 -12
- package/esm/Enums/Directions/OutModeDirection.d.ts +1 -1
- package/esm/Enums/Directions/OutModeDirection.js +1 -7
- package/esm/Enums/Directions/RotateDirection.d.ts +1 -1
- package/esm/Enums/Directions/RotateDirection.js +1 -6
- package/esm/Enums/Directions/TiltDirection.d.ts +1 -1
- package/esm/Enums/Directions/TiltDirection.js +1 -6
- package/esm/Enums/InteractivityDetect.d.ts +1 -1
- package/esm/Enums/InteractivityDetect.js +1 -6
- package/esm/Enums/Modes/ClickMode.d.ts +1 -1
- package/esm/Enums/Modes/ClickMode.js +1 -10
- package/esm/Enums/Modes/CollisionMode.d.ts +1 -1
- package/esm/Enums/Modes/CollisionMode.js +1 -6
- package/esm/Enums/Modes/DestroyMode.d.ts +1 -1
- package/esm/Enums/Modes/DestroyMode.js +1 -5
- package/esm/Enums/Modes/DivMode.d.ts +1 -1
- package/esm/Enums/Modes/DivMode.js +1 -6
- package/esm/Enums/Modes/HoverMode.d.ts +1 -1
- package/esm/Enums/Modes/HoverMode.js +1 -12
- package/esm/Enums/Modes/OutMode.d.ts +1 -1
- package/esm/Enums/Modes/OutMode.js +1 -10
- package/esm/Enums/Modes/ResponsiveMode.d.ts +1 -1
- package/esm/Enums/Modes/ResponsiveMode.js +1 -5
- package/esm/Enums/Modes/RollMode.d.ts +1 -1
- package/esm/Enums/Modes/RollMode.js +1 -6
- package/esm/Enums/Modes/SizeMode.d.ts +1 -1
- package/esm/Enums/Modes/SizeMode.js +1 -5
- package/esm/Enums/Modes/ThemeMode.d.ts +1 -1
- package/esm/Enums/Modes/ThemeMode.js +1 -6
- package/esm/Enums/Types/AlterType.d.ts +1 -1
- package/esm/Enums/Types/AlterType.js +1 -5
- package/esm/Enums/Types/DestroyType.d.ts +1 -1
- package/esm/Enums/Types/DestroyType.js +1 -6
- package/esm/Enums/Types/DivType.d.ts +1 -1
- package/esm/Enums/Types/DivType.js +1 -5
- package/esm/Enums/Types/EasingType.d.ts +1 -1
- package/esm/Enums/Types/EasingType.js +1 -11
- package/esm/Enums/Types/GradientType.d.ts +1 -1
- package/esm/Enums/Types/GradientType.js +1 -6
- package/esm/Enums/Types/InteractorType.d.ts +1 -1
- package/esm/Enums/Types/InteractorType.js +1 -5
- package/esm/Enums/Types/OrbitType.d.ts +1 -1
- package/esm/Enums/Types/OrbitType.js +1 -5
- package/esm/Enums/Types/ShapeType.d.ts +1 -1
- package/esm/Enums/Types/ShapeType.js +1 -14
- package/esm/Enums/Types/StartValueType.d.ts +1 -1
- package/esm/Enums/Types/StartValueType.js +1 -6
- package/esm/Interactions/External/Attract/Attractor.d.ts +2 -2
- package/esm/Interactions/External/Attract/Attractor.js +5 -7
- package/esm/Interactions/External/Attract/index.d.ts +2 -2
- package/esm/Interactions/External/Bounce/Bouncer.d.ts +2 -2
- package/esm/Interactions/External/Bounce/Bouncer.js +7 -9
- package/esm/Interactions/External/Bounce/index.d.ts +2 -2
- package/esm/Interactions/External/Bubble/Bubbler.d.ts +3 -3
- package/esm/Interactions/External/Bubble/Bubbler.js +16 -18
- package/esm/Interactions/External/Bubble/ProcessBubbleType.d.ts +1 -1
- package/esm/Interactions/External/Bubble/ProcessBubbleType.js +1 -6
- package/esm/Interactions/External/Bubble/index.d.ts +2 -2
- package/esm/Interactions/External/Connect/Connector.d.ts +2 -2
- package/esm/Interactions/External/Connect/Connector.js +2 -3
- package/esm/Interactions/External/Connect/index.d.ts +2 -2
- package/esm/Interactions/External/Grab/Grabber.d.ts +2 -2
- package/esm/Interactions/External/Grab/Grabber.js +3 -4
- package/esm/Interactions/External/Grab/index.d.ts +2 -2
- package/esm/Interactions/External/Repulse/Repulser.d.ts +2 -2
- package/esm/Interactions/External/Repulse/Repulser.js +8 -10
- package/esm/Interactions/External/Repulse/index.d.ts +2 -2
- package/esm/Interactions/External/Trail/TrailMaker.d.ts +2 -3
- package/esm/Interactions/External/Trail/TrailMaker.js +3 -4
- package/esm/Interactions/External/Trail/index.d.ts +2 -2
- package/esm/Interactions/Particles/Attract/Attractor.d.ts +2 -4
- package/esm/Interactions/Particles/Attract/Attractor.js +1 -1
- package/esm/Interactions/Particles/Attract/index.d.ts +2 -2
- package/esm/Interactions/Particles/Collisions/Collider.d.ts +2 -3
- package/esm/Interactions/Particles/Collisions/Collider.js +4 -5
- package/esm/Interactions/Particles/Collisions/index.d.ts +2 -2
- package/esm/Interactions/Particles/Links/LinkInstance.d.ts +1 -3
- package/esm/Interactions/Particles/Links/LinkParticle.d.ts +1 -1
- package/esm/Interactions/Particles/Links/Linker.d.ts +3 -4
- package/esm/Interactions/Particles/Links/Linker.js +2 -2
- package/esm/Interactions/Particles/Links/index.d.ts +2 -3
- package/esm/Interactions/Particles/Links/index.js +1 -4
- package/esm/Interactions/Particles/Links/interaction.d.ts +2 -0
- package/esm/Interactions/Particles/Links/interaction.js +4 -0
- package/esm/Interactions/Particles/Links/plugin.d.ts +2 -2
- package/esm/Interactions/Particles/Links/plugin.js +2 -2
- package/esm/Options/Classes/AnimatableGradient.js +3 -4
- package/esm/Options/Classes/Interactivity/Events/DivEvent.js +1 -2
- package/esm/Options/Classes/Interactivity/Interactivity.js +5 -6
- package/esm/Options/Classes/Interactivity/Modes/Attract.js +1 -2
- package/esm/Options/Classes/Interactivity/Modes/RepulseBase.js +1 -2
- package/esm/Options/Classes/Options.d.ts +1 -0
- package/esm/Options/Classes/Options.js +9 -7
- package/esm/Options/Classes/Particles/Collisions/Collisions.js +1 -2
- package/esm/Options/Classes/Particles/Destroy/Destroy.js +1 -2
- package/esm/Options/Classes/Particles/Move/Move.js +1 -2
- package/esm/Options/Classes/Particles/Move/OutModes.js +1 -2
- package/esm/Options/Classes/Particles/Opacity/OpacityAnimation.js +2 -3
- package/esm/Options/Classes/Particles/Roll/Roll.js +1 -2
- package/esm/Options/Classes/Particles/Rotate/Rotate.js +1 -2
- package/esm/Options/Classes/Particles/Shape/Shape.js +13 -14
- package/esm/Options/Classes/Particles/Size/SizeAnimation.js +2 -3
- package/esm/Options/Classes/Particles/Tilt/Tilt.js +1 -2
- package/esm/Options/Classes/Responsive.js +4 -5
- package/esm/Options/Classes/Theme/ThemeDefault.js +1 -2
- package/esm/Options/Interfaces/IOptions.d.ts +1 -0
- package/esm/Plugins/Absorbers/AbsorberContainer.d.ts +1 -1
- package/esm/Plugins/Absorbers/AbsorberInstance.d.ts +2 -4
- package/esm/Plugins/Absorbers/AbsorberInstance.js +4 -5
- package/esm/Plugins/Absorbers/Absorbers.d.ts +1 -4
- package/esm/Plugins/Absorbers/Absorbers.js +1 -2
- package/esm/Plugins/Absorbers/Enums/AbsorberClickMode.d.ts +1 -1
- package/esm/Plugins/Absorbers/Enums/AbsorberClickMode.js +1 -4
- package/esm/Plugins/Absorbers/index.d.ts +2 -0
- package/esm/Plugins/Absorbers/{plugin.js → index.js} +3 -4
- package/esm/Plugins/Emitters/EmitterContainer.d.ts +1 -1
- package/esm/Plugins/Emitters/EmitterInstance.d.ts +1 -2
- package/esm/Plugins/Emitters/EmitterInstance.js +3 -4
- package/esm/Plugins/Emitters/Emitters.d.ts +1 -2
- package/esm/Plugins/Emitters/Emitters.js +1 -2
- package/esm/Plugins/Emitters/EmittersMain.d.ts +2 -2
- package/esm/Plugins/Emitters/Enums/EmitterClickMode.d.ts +1 -1
- package/esm/Plugins/Emitters/Enums/EmitterClickMode.js +1 -4
- package/esm/Plugins/Emitters/Enums/EmitterShapeType.d.ts +1 -1
- package/esm/Plugins/Emitters/Enums/EmitterShapeType.js +1 -5
- package/esm/Plugins/Emitters/IEmitterShape.d.ts +1 -1
- package/esm/Plugins/Emitters/Options/Classes/Emitter.js +1 -2
- package/esm/Plugins/Emitters/Options/Classes/EmitterSize.js +1 -2
- package/esm/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +1 -1
- package/esm/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +1 -1
- package/esm/Plugins/Emitters/{plugin.d.ts → index.d.ts} +0 -0
- package/esm/Plugins/Emitters/{plugin.js → index.js} +3 -4
- package/esm/Plugins/PolygonMask/Enums/PolygonMaskInlineArrangement.d.ts +8 -0
- package/esm/Plugins/PolygonMask/{Options/Interfaces/ILocalSvg.js → Enums/PolygonMaskInlineArrangement.js} +0 -0
- package/esm/Plugins/PolygonMask/Enums/PolygonMaskMoveType.d.ts +4 -0
- package/esm/Plugins/PolygonMask/{Options/Interfaces/IMove.js → Enums/PolygonMaskMoveType.js} +0 -0
- package/{browser/Plugins/PolygonMask/Enums/Type.d.ts → esm/Plugins/PolygonMask/Enums/PolygonMaskType.d.ts} +1 -1
- package/esm/Plugins/PolygonMask/{types.js → Enums/PolygonMaskType.js} +0 -0
- package/esm/Plugins/PolygonMask/Enums/index.d.ts +3 -3
- package/esm/Plugins/PolygonMask/Enums/index.js +3 -3
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +13 -13
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMask.js +42 -42
- package/esm/Plugins/PolygonMask/Options/Classes/{Draw.d.ts → PolygonMaskDraw.d.ts} +5 -5
- package/esm/Plugins/PolygonMask/Options/Classes/{Draw.js → PolygonMaskDraw.js} +13 -12
- package/esm/Plugins/PolygonMask/Options/Classes/{DrawStroke.d.ts → PolygonMaskDrawStroke.d.ts} +3 -3
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.js +25 -0
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +9 -0
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.js +13 -0
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +11 -0
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.js +25 -0
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +10 -0
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.js +17 -0
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +12 -13
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +8 -0
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.js +1 -0
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDrawStroke.d.ts +6 -0
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDrawStroke.js +1 -0
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskInline.d.ts +4 -0
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskInline.js +1 -0
- package/esm/Plugins/PolygonMask/Options/Interfaces/{ILocalSvg.d.ts → IPolygonMaskLocalSvg.d.ts} +2 -2
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.js +1 -0
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.d.ts +5 -0
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.js +1 -0
- package/esm/Plugins/PolygonMask/PolygonMaskInstance.d.ts +2 -4
- package/esm/Plugins/PolygonMask/PolygonMaskInstance.js +24 -21
- package/esm/Plugins/PolygonMask/{types.d.ts → Types.d.ts} +0 -0
- package/esm/Plugins/PolygonMask/Types.js +1 -0
- package/{browser/Plugins/PolygonMask/utils.d.ts → esm/Plugins/PolygonMask/Utils.d.ts} +5 -5
- package/esm/Plugins/PolygonMask/{utils.js → Utils.js} +15 -12
- package/esm/Plugins/PolygonMask/index.d.ts +2 -0
- package/esm/Plugins/PolygonMask/{plugin.js → index.js} +4 -5
- package/esm/Plugins/PolygonMask/pathseg.js +54 -43
- package/esm/Shapes/Circle/CircleDrawer.d.ts +1 -1
- package/esm/Shapes/Circle/index.d.ts +2 -2
- package/esm/Shapes/Image/ImageDrawer.d.ts +3 -7
- package/esm/Shapes/Image/ImageDrawer.js +28 -108
- package/esm/Shapes/Image/Utils.d.ts +8 -5
- package/esm/Shapes/Image/Utils.js +67 -36
- package/esm/Shapes/Image/index.d.ts +2 -2
- package/esm/Shapes/Line/LineDrawer.d.ts +1 -1
- package/esm/Shapes/Line/index.d.ts +2 -2
- package/esm/Shapes/Polygon/PolygonDrawer.d.ts +1 -1
- package/esm/Shapes/Polygon/PolygonDrawerBase.d.ts +1 -1
- package/esm/Shapes/Polygon/TriangleDrawer.d.ts +1 -1
- package/esm/Shapes/Polygon/index.d.ts +4 -4
- package/esm/Shapes/Square/SquareDrawer.d.ts +1 -1
- package/esm/Shapes/Square/index.d.ts +2 -2
- package/esm/Shapes/Star/StarDrawer.d.ts +1 -1
- package/esm/Shapes/Star/index.d.ts +2 -2
- package/esm/Shapes/Text/TextDrawer.d.ts +1 -2
- package/esm/Shapes/Text/index.d.ts +2 -2
- package/esm/Updaters/Angle/AngleUpdater.d.ts +1 -3
- package/esm/Updaters/Angle/AngleUpdater.js +8 -9
- package/esm/Updaters/Angle/index.d.ts +2 -2
- package/esm/Updaters/Color/ColorUpdater.d.ts +1 -3
- package/esm/Updaters/Color/ColorUpdater.js +3 -4
- package/esm/Updaters/Color/index.d.ts +2 -2
- package/esm/Updaters/Life/LifeUpdater.d.ts +1 -3
- package/esm/Updaters/Life/index.d.ts +2 -2
- package/esm/Updaters/Opacity/OpacityUpdater.d.ts +1 -3
- package/esm/Updaters/Opacity/OpacityUpdater.js +13 -14
- package/esm/Updaters/Opacity/index.d.ts +2 -2
- package/esm/Updaters/OutModes/IBounceData.d.ts +1 -2
- package/esm/Updaters/OutModes/OutOfCanvasUpdater.d.ts +1 -3
- package/esm/Updaters/OutModes/OutOfCanvasUpdater.js +19 -20
- package/esm/Updaters/OutModes/Utils.js +12 -13
- package/esm/Updaters/OutModes/index.d.ts +2 -2
- package/esm/Updaters/Roll/RollUpdater.d.ts +1 -2
- package/esm/Updaters/Roll/RollUpdater.js +4 -5
- package/esm/Updaters/Roll/index.d.ts +2 -2
- package/esm/Updaters/Size/SizeUpdater.d.ts +1 -2
- package/esm/Updaters/Size/SizeUpdater.js +6 -7
- package/esm/Updaters/Size/index.d.ts +2 -2
- package/esm/Updaters/StrokeColor/StrokeColorUpdater.d.ts +1 -3
- package/esm/Updaters/StrokeColor/StrokeColorUpdater.js +3 -4
- package/esm/Updaters/StrokeColor/index.d.ts +2 -2
- package/esm/Updaters/Tilt/TiltUpdater.d.ts +1 -3
- package/esm/Updaters/Tilt/TiltUpdater.js +8 -9
- package/esm/Updaters/Tilt/index.d.ts +2 -2
- package/esm/Updaters/Wobble/WobbleUpdater.d.ts +1 -3
- package/esm/Updaters/Wobble/index.d.ts +2 -2
- package/esm/Utils/CanvasUtils.d.ts +3 -3
- package/esm/Utils/CanvasUtils.js +4 -5
- package/esm/Utils/ColorUtils.d.ts +1 -1
- package/esm/Utils/ColorUtils.js +2 -3
- package/esm/Utils/NumberUtils.d.ts +2 -2
- package/esm/Utils/NumberUtils.js +18 -19
- package/esm/Utils/Utils.d.ts +1 -1
- package/esm/Utils/Utils.js +10 -14
- package/esm/Utils/index.d.ts +0 -9
- package/esm/Utils/index.js +0 -9
- package/{main.d.ts → esm/engine.d.ts} +2 -4
- package/esm/{main.js → engine.js} +8 -9
- package/esm/full.d.ts +2 -2
- package/esm/full.js +3 -3
- package/esm/index.d.ts +6 -16
- package/esm/index.engine.d.ts +13 -0
- package/esm/index.engine.js +11 -0
- package/esm/index.js +5 -13
- package/esm/index.slim.d.ts +6 -16
- package/esm/index.slim.js +5 -13
- package/esm/pjs.d.ts +3 -3
- package/esm/pjs.js +6 -5
- package/esm/slim.d.ts +2 -2
- package/full.d.ts +2 -2
- package/full.js +6 -6
- package/index.d.ts +6 -16
- package/index.engine.d.ts +13 -0
- package/index.engine.js +27 -0
- package/index.js +7 -19
- package/index.slim.d.ts +6 -16
- package/index.slim.js +7 -19
- package/package.json +1 -1
- package/pjs.d.ts +3 -3
- package/pjs.js +6 -5
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/scripts/install.js +14 -3
- package/slim.d.ts +2 -2
- package/tsparticles.engine.js +6746 -0
- package/tsparticles.engine.min.js +2 -0
- package/tsparticles.interaction.external.attract.js +4976 -0
- package/tsparticles.interaction.external.attract.min.js +2 -0
- package/tsparticles.interaction.external.bounce.js +4997 -0
- package/tsparticles.interaction.external.bounce.min.js +2 -0
- package/tsparticles.interaction.external.bubble.js +5083 -0
- package/tsparticles.interaction.external.bubble.min.js +2 -0
- package/tsparticles.interaction.external.connect.js +4845 -0
- package/tsparticles.interaction.external.connect.min.js +2 -0
- package/tsparticles.interaction.external.grab.js +4851 -0
- package/tsparticles.interaction.external.grab.min.js +2 -0
- package/tsparticles.interaction.external.repulse.js +5028 -0
- package/tsparticles.interaction.external.repulse.min.js +2 -0
- package/tsparticles.interaction.external.trail.js +4853 -0
- package/tsparticles.interaction.external.trail.min.js +2 -0
- package/tsparticles.interaction.particles.attract.js +4834 -0
- package/tsparticles.interaction.particles.attract.min.js +2 -0
- package/tsparticles.interaction.particles.collisions.js +4999 -0
- package/tsparticles.interaction.particles.collisions.min.js +2 -0
- package/tsparticles.interaction.particles.links.js +5071 -0
- package/tsparticles.interaction.particles.links.min.js +2 -0
- package/tsparticles.js +1297 -1605
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.min.js +2 -0
- package/tsparticles.plugins.absorbers.js +5332 -0
- package/tsparticles.plugins.absorbers.min.js +2 -0
- package/tsparticles.plugins.emitters.js +5419 -0
- package/tsparticles.plugins.emitters.min.js +2 -0
- package/tsparticles.plugins.polygonMask.js +5862 -0
- package/tsparticles.plugins.polygonMask.min.js +2 -0
- package/tsparticles.shape.circle.js +59 -0
- package/tsparticles.shape.circle.min.js +2 -0
- package/tsparticles.shape.image.js +5021 -0
- package/tsparticles.shape.image.min.js +2 -0
- package/tsparticles.shape.line.js +60 -0
- package/tsparticles.shape.line.min.js +2 -0
- package/tsparticles.shape.polygon.js +131 -0
- package/tsparticles.shape.polygon.min.js +2 -0
- package/tsparticles.shape.square.js +62 -0
- package/tsparticles.shape.square.min.js +2 -0
- package/tsparticles.shape.star.js +71 -0
- package/tsparticles.shape.star.min.js +2 -0
- package/tsparticles.shape.text.js +4865 -0
- package/tsparticles.shape.text.min.js +2 -0
- package/tsparticles.slim.js +1075 -1336
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.updater.angle.js +4880 -0
- package/tsparticles.updater.angle.min.js +2 -0
- package/tsparticles.updater.color.js +4862 -0
- package/tsparticles.updater.color.min.js +2 -0
- package/tsparticles.updater.life.js +4864 -0
- package/tsparticles.updater.life.min.js +2 -0
- package/tsparticles.updater.opacity.js +4914 -0
- package/tsparticles.updater.opacity.min.js +2 -0
- package/tsparticles.updater.outModes.js +4998 -0
- package/tsparticles.updater.outModes.min.js +2 -0
- package/tsparticles.updater.roll.js +4862 -0
- package/tsparticles.updater.roll.min.js +2 -0
- package/tsparticles.updater.size.js +4870 -0
- package/tsparticles.updater.size.min.js +2 -0
- package/tsparticles.updater.strokeColor.js +4875 -0
- package/tsparticles.updater.strokeColor.min.js +2 -0
- package/tsparticles.updater.tilt.js +4881 -0
- package/tsparticles.updater.tilt.min.js +2 -0
- package/tsparticles.updater.wobble.js +4850 -0
- package/tsparticles.updater.wobble.min.js +2 -0
- package/Plugins/Absorbers/plugin.d.ts +0 -2
- package/Plugins/PolygonMask/Enums/InlineArrangement.d.ts +0 -8
- package/Plugins/PolygonMask/Enums/InlineArrangement.js +0 -11
- package/Plugins/PolygonMask/Enums/MoveType.d.ts +0 -4
- package/Plugins/PolygonMask/Enums/MoveType.js +0 -8
- package/Plugins/PolygonMask/Enums/Type.js +0 -10
- package/Plugins/PolygonMask/Options/Classes/DrawStroke.js +0 -28
- package/Plugins/PolygonMask/Options/Classes/Inline.d.ts +0 -9
- package/Plugins/PolygonMask/Options/Classes/Inline.js +0 -17
- package/Plugins/PolygonMask/Options/Classes/LocalSvg.d.ts +0 -11
- package/Plugins/PolygonMask/Options/Classes/LocalSvg.js +0 -28
- package/Plugins/PolygonMask/Options/Classes/Move.d.ts +0 -10
- package/Plugins/PolygonMask/Options/Classes/Move.js +0 -21
- package/Plugins/PolygonMask/Options/Interfaces/IDraw.d.ts +0 -8
- package/Plugins/PolygonMask/Options/Interfaces/IDrawStroke.d.ts +0 -6
- package/Plugins/PolygonMask/Options/Interfaces/IInline.d.ts +0 -4
- package/Plugins/PolygonMask/Options/Interfaces/IMove.d.ts +0 -5
- package/Plugins/PolygonMask/plugin.d.ts +0 -2
- package/browser/Plugins/Absorbers/plugin.d.ts +0 -2
- package/browser/Plugins/PolygonMask/Enums/InlineArrangement.d.ts +0 -8
- package/browser/Plugins/PolygonMask/Enums/InlineArrangement.js +0 -8
- package/browser/Plugins/PolygonMask/Enums/MoveType.d.ts +0 -4
- package/browser/Plugins/PolygonMask/Enums/MoveType.js +0 -5
- package/browser/Plugins/PolygonMask/Enums/Type.js +0 -7
- package/browser/Plugins/PolygonMask/Options/Classes/DrawStroke.js +0 -27
- package/browser/Plugins/PolygonMask/Options/Classes/Inline.d.ts +0 -12
- package/browser/Plugins/PolygonMask/Options/Classes/Inline.js +0 -16
- package/browser/Plugins/PolygonMask/Options/Classes/LocalSvg.js +0 -27
- package/browser/Plugins/PolygonMask/Options/Classes/Move.d.ts +0 -13
- package/browser/Plugins/PolygonMask/Options/Classes/Move.js +0 -20
- package/browser/Plugins/PolygonMask/Options/Interfaces/IInline.d.ts +0 -7
- package/browser/Plugins/PolygonMask/Options/Interfaces/IMove.d.ts +0 -8
- package/browser/Plugins/PolygonMask/plugin.d.ts +0 -2
- package/esm/Plugins/Absorbers/plugin.d.ts +0 -2
- package/esm/Plugins/PolygonMask/Enums/InlineArrangement.d.ts +0 -8
- package/esm/Plugins/PolygonMask/Enums/InlineArrangement.js +0 -8
- package/esm/Plugins/PolygonMask/Enums/MoveType.d.ts +0 -4
- package/esm/Plugins/PolygonMask/Enums/MoveType.js +0 -5
- package/esm/Plugins/PolygonMask/Enums/Type.js +0 -7
- package/esm/Plugins/PolygonMask/Options/Classes/DrawStroke.js +0 -24
- package/esm/Plugins/PolygonMask/Options/Classes/Inline.d.ts +0 -9
- package/esm/Plugins/PolygonMask/Options/Classes/Inline.js +0 -13
- package/esm/Plugins/PolygonMask/Options/Classes/LocalSvg.d.ts +0 -11
- package/esm/Plugins/PolygonMask/Options/Classes/LocalSvg.js +0 -24
- package/esm/Plugins/PolygonMask/Options/Classes/Move.d.ts +0 -10
- package/esm/Plugins/PolygonMask/Options/Classes/Move.js +0 -17
- package/esm/Plugins/PolygonMask/Options/Interfaces/IDraw.d.ts +0 -8
- package/esm/Plugins/PolygonMask/Options/Interfaces/IDrawStroke.d.ts +0 -6
- package/esm/Plugins/PolygonMask/Options/Interfaces/IInline.d.ts +0 -4
- package/esm/Plugins/PolygonMask/Options/Interfaces/IMove.d.ts +0 -5
- package/esm/Plugins/PolygonMask/plugin.d.ts +0 -2
- package/tsparticles.pathseg.js +0 -1472
package/browser/index.js
CHANGED
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
import { initPjs } from "./pjs";
|
|
2
|
-
import {
|
|
3
|
-
import { Circle, CircleWarp, Constants, Point, Rectangle } from "./Utils";
|
|
2
|
+
import { Engine } from "./engine";
|
|
4
3
|
import { loadFull } from "./full";
|
|
5
|
-
const tsParticles = new
|
|
4
|
+
const tsParticles = new Engine();
|
|
6
5
|
tsParticles.init();
|
|
7
6
|
const { particlesJS, pJSDom } = initPjs(tsParticles);
|
|
8
7
|
loadFull(tsParticles);
|
|
9
|
-
export * from "./Core
|
|
8
|
+
export * from "./Core";
|
|
10
9
|
export * from "./Core/Container";
|
|
11
10
|
export * from "./Enums";
|
|
12
11
|
export * from "./Plugins/Absorbers/Enums";
|
|
13
12
|
export * from "./Plugins/Emitters/Enums";
|
|
14
13
|
export * from "./Plugins/PolygonMask/Enums";
|
|
15
|
-
export {
|
|
16
|
-
export * from "./Utils
|
|
17
|
-
export * from "./Utils/ColorUtils";
|
|
18
|
-
export * from "./Utils/NumberUtils";
|
|
19
|
-
export * from "./Utils/Utils";
|
|
14
|
+
export { Engine, Engine as Main };
|
|
15
|
+
export * from "./Utils";
|
|
20
16
|
export * from "./Types";
|
|
21
|
-
export * from "./Core/Interfaces";
|
|
22
|
-
export * from "./Core/Particle";
|
|
23
|
-
export * from "./Core/ExternalInteractorBase";
|
|
24
|
-
export * from "./Core/ParticlesInteractorBase";
|
|
25
17
|
export { particlesJS, pJSDom, tsParticles };
|
package/browser/index.slim.d.ts
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
import { Circle, CircleWarp, Constants, Point, Rectangle } from "./Utils";
|
|
2
1
|
import type { IOptions } from "./Options/Interfaces/IOptions";
|
|
3
2
|
import type { RecursivePartial } from "./Types";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
declare const
|
|
7
|
-
|
|
8
|
-
export * from "./Core/Particle/Vector";
|
|
3
|
+
import { Engine } from "./engine";
|
|
4
|
+
declare const tsParticles: Engine;
|
|
5
|
+
declare const particlesJS: import("./pjs").IParticlesJS, pJSDom: import("./Core").Container[];
|
|
6
|
+
export * from "./Core";
|
|
9
7
|
export * from "./Core/Container";
|
|
10
8
|
export * from "./Enums";
|
|
11
|
-
export {
|
|
12
|
-
export * from "./Utils
|
|
13
|
-
export * from "./Utils/ColorUtils";
|
|
14
|
-
export * from "./Utils/NumberUtils";
|
|
15
|
-
export * from "./Utils/Utils";
|
|
9
|
+
export { Engine, Engine as Main };
|
|
10
|
+
export * from "./Utils";
|
|
16
11
|
export * from "./Types";
|
|
17
|
-
export * from "./Core/Interfaces";
|
|
18
|
-
export * from "./Core/Particle";
|
|
19
|
-
export * from "./Core/ExternalInteractorBase";
|
|
20
|
-
export * from "./Core/ParticlesInteractorBase";
|
|
21
12
|
export { tsParticles, particlesJS, pJSDom };
|
|
22
13
|
export { IOptions };
|
|
23
|
-
export { IParticle };
|
|
24
14
|
export declare type ISourceOptions = RecursivePartial<IOptions>;
|
package/browser/index.slim.js
CHANGED
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
import { initPjs } from "./pjs";
|
|
2
|
-
import {
|
|
3
|
-
import { Main } from "./main";
|
|
2
|
+
import { Engine } from "./engine";
|
|
4
3
|
import { loadSlim } from "./slim";
|
|
5
4
|
/* ---------- tsParticles functions - start ------------ */
|
|
6
|
-
const tsParticles = new
|
|
5
|
+
const tsParticles = new Engine();
|
|
7
6
|
tsParticles.init();
|
|
8
7
|
const { particlesJS, pJSDom } = initPjs(tsParticles);
|
|
9
8
|
loadSlim(tsParticles);
|
|
10
|
-
export * from "./Core
|
|
9
|
+
export * from "./Core";
|
|
11
10
|
export * from "./Core/Container";
|
|
12
11
|
export * from "./Enums";
|
|
13
|
-
export {
|
|
14
|
-
export * from "./Utils
|
|
15
|
-
export * from "./Utils/ColorUtils";
|
|
16
|
-
export * from "./Utils/NumberUtils";
|
|
17
|
-
export * from "./Utils/Utils";
|
|
12
|
+
export { Engine, Engine as Main };
|
|
13
|
+
export * from "./Utils";
|
|
18
14
|
export * from "./Types";
|
|
19
|
-
export * from "./Core/Interfaces";
|
|
20
|
-
export * from "./Core/Particle";
|
|
21
|
-
export * from "./Core/ExternalInteractorBase";
|
|
22
|
-
export * from "./Core/ParticlesInteractorBase";
|
|
23
15
|
export { tsParticles, particlesJS, pJSDom };
|
package/browser/pjs.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @packageDocumentation
|
|
4
4
|
*/
|
|
5
5
|
import type { IOptions } from "./Options/Interfaces/IOptions";
|
|
6
|
-
import type { Container } from "./Core
|
|
7
|
-
import type {
|
|
6
|
+
import type { Container } from "./Core";
|
|
7
|
+
import type { Engine } from "./engine";
|
|
8
8
|
import type { RecursivePartial } from "./Types";
|
|
9
9
|
/**
|
|
10
10
|
* [[include:pjsMigration.md]]
|
|
@@ -34,7 +34,7 @@ export interface IParticlesJS {
|
|
|
34
34
|
*/
|
|
35
35
|
setOnClickHandler(callback: EventListenerOrEventListenerObject): void;
|
|
36
36
|
}
|
|
37
|
-
declare const initPjs: (
|
|
37
|
+
declare const initPjs: (engine: Engine) => {
|
|
38
38
|
particlesJS: IParticlesJS;
|
|
39
39
|
pJSDom: Container[];
|
|
40
40
|
};
|
package/browser/pjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const initPjs = (
|
|
1
|
+
const initPjs = (engine) => {
|
|
2
2
|
/**
|
|
3
3
|
* Loads the provided options to create a [[Container]] object.
|
|
4
4
|
* @deprecated this method is obsolete, please use the new tsParticles.load
|
|
@@ -6,7 +6,7 @@ const initPjs = (main) => {
|
|
|
6
6
|
* @param options the options object to initialize the [[Container]]
|
|
7
7
|
*/
|
|
8
8
|
const particlesJS = (tagId, options) => {
|
|
9
|
-
return
|
|
9
|
+
return engine.load(tagId, options);
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* Loads the provided json with a GET request.
|
|
@@ -17,7 +17,8 @@ const initPjs = (main) => {
|
|
|
17
17
|
* @param callback called after the [[Container]] is loaded and it will be passed as a parameter
|
|
18
18
|
*/
|
|
19
19
|
particlesJS.load = (tagId, pathConfigJson, callback) => {
|
|
20
|
-
|
|
20
|
+
engine
|
|
21
|
+
.loadJSON(tagId, pathConfigJson)
|
|
21
22
|
.then((container) => {
|
|
22
23
|
if (container) {
|
|
23
24
|
callback(container);
|
|
@@ -33,13 +34,13 @@ const initPjs = (main) => {
|
|
|
33
34
|
* @param callback the function called after the click event is fired
|
|
34
35
|
*/
|
|
35
36
|
particlesJS.setOnClickHandler = (callback) => {
|
|
36
|
-
|
|
37
|
+
engine.setOnClickHandler(callback);
|
|
37
38
|
};
|
|
38
39
|
/**
|
|
39
40
|
* All the [[Container]] objects loaded
|
|
40
41
|
* @deprecated this method is obsolete, please use the new tsParticles.dom
|
|
41
42
|
*/
|
|
42
|
-
const pJSDom =
|
|
43
|
+
const pJSDom = engine.dom();
|
|
43
44
|
return { particlesJS, pJSDom };
|
|
44
45
|
};
|
|
45
46
|
export { initPjs };
|
package/browser/slim.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function loadSlim(tsParticles:
|
|
1
|
+
import type { Engine } from "./engine";
|
|
2
|
+
export declare function loadSlim(tsParticles: Engine): Promise<void>;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { IOptions } from "./Options/Interfaces/IOptions";
|
|
2
|
-
import type { Container } from "./Core
|
|
2
|
+
import type { Container, IInteractor, IMovePathGenerator, IParticleUpdater, IPlugin, IShapeDrawer, Particle } from "./Core";
|
|
3
3
|
import type { ShapeDrawerAfterEffectFunction, ShapeDrawerDestroyFunction, ShapeDrawerDrawFunction, ShapeDrawerInitFunction, RecursivePartial, SingleOrMultiple } from "./Types";
|
|
4
|
-
|
|
5
|
-
import type { IInteractor, IMovePathGenerator, IParticleUpdater, IPlugin, IShapeDrawer } from "./Core/Interfaces";
|
|
6
|
-
export declare class Main {
|
|
4
|
+
export declare class Engine {
|
|
7
5
|
#private;
|
|
8
6
|
constructor();
|
|
9
7
|
init(): void;
|
package/{main.js → engine.js}
RENAMED
|
@@ -10,44 +10,43 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var
|
|
13
|
+
var _Engine_initialized;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
class Main {
|
|
15
|
+
exports.Engine = void 0;
|
|
16
|
+
const Core_1 = require("./Core");
|
|
17
|
+
class Engine {
|
|
19
18
|
constructor() {
|
|
20
|
-
|
|
21
|
-
__classPrivateFieldSet(this,
|
|
19
|
+
_Engine_initialized.set(this, void 0);
|
|
20
|
+
__classPrivateFieldSet(this, _Engine_initialized, false, "f");
|
|
22
21
|
}
|
|
23
22
|
init() {
|
|
24
|
-
if (!__classPrivateFieldGet(this,
|
|
25
|
-
__classPrivateFieldSet(this,
|
|
23
|
+
if (!__classPrivateFieldGet(this, _Engine_initialized, "f")) {
|
|
24
|
+
__classPrivateFieldSet(this, _Engine_initialized, true, "f");
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
async loadFromArray(tagId, options, index) {
|
|
29
|
-
return
|
|
28
|
+
return Core_1.Loader.load(tagId, options, index);
|
|
30
29
|
}
|
|
31
30
|
async load(tagId, options) {
|
|
32
|
-
return
|
|
31
|
+
return Core_1.Loader.load(tagId, options);
|
|
33
32
|
}
|
|
34
33
|
async set(id, element, options) {
|
|
35
|
-
return
|
|
34
|
+
return Core_1.Loader.set(id, element, options);
|
|
36
35
|
}
|
|
37
36
|
async loadJSON(tagId, pathConfigJson, index) {
|
|
38
|
-
return
|
|
37
|
+
return Core_1.Loader.loadJSON(tagId, pathConfigJson, index);
|
|
39
38
|
}
|
|
40
39
|
async setJSON(id, element, pathConfigJson, index) {
|
|
41
|
-
return
|
|
40
|
+
return Core_1.Loader.setJSON(id, element, pathConfigJson, index);
|
|
42
41
|
}
|
|
43
42
|
setOnClickHandler(callback) {
|
|
44
|
-
|
|
43
|
+
Core_1.Loader.setOnClickHandler(callback);
|
|
45
44
|
}
|
|
46
45
|
dom() {
|
|
47
|
-
return
|
|
46
|
+
return Core_1.Loader.dom();
|
|
48
47
|
}
|
|
49
48
|
domItem(index) {
|
|
50
|
-
return
|
|
49
|
+
return Core_1.Loader.domItem(index);
|
|
51
50
|
}
|
|
52
51
|
async refresh() {
|
|
53
52
|
for (const instance of this.dom()) {
|
|
@@ -67,29 +66,29 @@ class Main {
|
|
|
67
66
|
else {
|
|
68
67
|
customDrawer = drawer;
|
|
69
68
|
}
|
|
70
|
-
|
|
69
|
+
Core_1.Plugins.addShapeDrawer(shape, customDrawer);
|
|
71
70
|
await this.refresh();
|
|
72
71
|
}
|
|
73
72
|
async addPreset(preset, options, override = false) {
|
|
74
|
-
|
|
73
|
+
Core_1.Plugins.addPreset(preset, options, override);
|
|
75
74
|
await this.refresh();
|
|
76
75
|
}
|
|
77
76
|
async addPlugin(plugin) {
|
|
78
|
-
|
|
77
|
+
Core_1.Plugins.addPlugin(plugin);
|
|
79
78
|
await this.refresh();
|
|
80
79
|
}
|
|
81
80
|
async addPathGenerator(name, generator) {
|
|
82
|
-
|
|
81
|
+
Core_1.Plugins.addPathGenerator(name, generator);
|
|
83
82
|
await this.refresh();
|
|
84
83
|
}
|
|
85
84
|
async addInteractor(name, interactorInitializer) {
|
|
86
|
-
|
|
85
|
+
Core_1.Plugins.addInteractor(name, interactorInitializer);
|
|
87
86
|
await this.refresh();
|
|
88
87
|
}
|
|
89
88
|
async addParticleUpdater(name, updaterInitializer) {
|
|
90
|
-
|
|
89
|
+
Core_1.Plugins.addParticleUpdater(name, updaterInitializer);
|
|
91
90
|
await this.refresh();
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
|
-
exports.
|
|
95
|
-
|
|
93
|
+
exports.Engine = Engine;
|
|
94
|
+
_Engine_initialized = new WeakMap();
|
package/esm/Core/Canvas.d.ts
CHANGED
|
@@ -13,11 +13,11 @@ export declare class Canvas {
|
|
|
13
13
|
private originalStyle?;
|
|
14
14
|
constructor(container: Container);
|
|
15
15
|
init(): void;
|
|
16
|
-
loadCanvas(canvas: HTMLCanvasElement
|
|
16
|
+
loadCanvas(canvas: HTMLCanvasElement): void;
|
|
17
17
|
destroy(): void;
|
|
18
18
|
paint(): void;
|
|
19
19
|
clear(): void;
|
|
20
|
-
windowResize(): void
|
|
20
|
+
windowResize(): Promise<void>;
|
|
21
21
|
resize(): void;
|
|
22
22
|
drawConnectLine(p1: IParticle, p2: IParticle): void;
|
|
23
23
|
drawGrabLine(particle: IParticle, lineColor: IRgb, opacity: number, mousePos: ICoordinates): void;
|
package/esm/Core/Canvas.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { clear } from "../Utils";
|
|
1
|
+
import { Constants } from "./Utils";
|
|
2
|
+
import { clear, colorToHsl, colorToRgb, deepExtend, drawConnectLine, drawGrabLine, drawParticle, drawParticlePlugin, drawPlugin, getStyleFromHsl, getStyleFromRgb, gradient, paintBase, } from "../Utils";
|
|
3
3
|
export class Canvas {
|
|
4
4
|
constructor(container) {
|
|
5
5
|
this.container = container;
|
|
@@ -18,15 +18,15 @@ export class Canvas {
|
|
|
18
18
|
this.initBackground();
|
|
19
19
|
this.paint();
|
|
20
20
|
}
|
|
21
|
-
loadCanvas(canvas
|
|
21
|
+
loadCanvas(canvas) {
|
|
22
22
|
var _a;
|
|
23
|
-
if (!canvas.className) {
|
|
24
|
-
canvas.className = Constants.canvasClass;
|
|
25
|
-
}
|
|
26
23
|
if (this.generatedCanvas) {
|
|
27
24
|
(_a = this.element) === null || _a === void 0 ? void 0 : _a.remove();
|
|
28
25
|
}
|
|
29
|
-
this.generatedCanvas =
|
|
26
|
+
this.generatedCanvas =
|
|
27
|
+
canvas.dataset && Constants.generatedAttribute in canvas.dataset
|
|
28
|
+
? canvas.dataset[Constants.generatedAttribute] === "true"
|
|
29
|
+
: this.generatedCanvas;
|
|
30
30
|
this.element = canvas;
|
|
31
31
|
this.originalStyle = deepExtend({}, this.element.style);
|
|
32
32
|
this.size.height = canvas.offsetHeight;
|
|
@@ -71,7 +71,7 @@ export class Canvas {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
windowResize() {
|
|
74
|
+
async windowResize() {
|
|
75
75
|
if (!this.element) {
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
@@ -85,7 +85,7 @@ export class Canvas {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
if (needsRefresh) {
|
|
88
|
-
container.refresh();
|
|
88
|
+
await container.refresh();
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
resize() {
|
|
@@ -273,12 +273,12 @@ export class Canvas {
|
|
|
273
273
|
const originalStyle = this.originalStyle;
|
|
274
274
|
if (options.fullScreen.enable) {
|
|
275
275
|
this.originalStyle = deepExtend({}, element.style);
|
|
276
|
-
element.style.position
|
|
277
|
-
element.style.
|
|
278
|
-
element.style.top
|
|
279
|
-
element.style.left
|
|
280
|
-
element.style.width
|
|
281
|
-
element.style.height
|
|
276
|
+
element.style.setProperty("position", "fixed", "important");
|
|
277
|
+
element.style.setProperty("z-index", options.fullScreen.zIndex.toString(10), "important");
|
|
278
|
+
element.style.setProperty("top", "0", "important");
|
|
279
|
+
element.style.setProperty("left", "0", "important");
|
|
280
|
+
element.style.setProperty("width", "100%", "important");
|
|
281
|
+
element.style.setProperty("height", "100%", "important");
|
|
282
282
|
}
|
|
283
283
|
else if (originalStyle) {
|
|
284
284
|
element.style.position = originalStyle.position;
|
|
@@ -288,6 +288,16 @@ export class Canvas {
|
|
|
288
288
|
element.style.width = originalStyle.width;
|
|
289
289
|
element.style.height = originalStyle.height;
|
|
290
290
|
}
|
|
291
|
+
for (const key in options.style) {
|
|
292
|
+
if (!key || !options.style) {
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
const value = options.style[key];
|
|
296
|
+
if (!value) {
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
element.style.setProperty(key, value, "important");
|
|
300
|
+
}
|
|
291
301
|
}
|
|
292
302
|
paintBase(baseColor) {
|
|
293
303
|
this.draw((ctx) => {
|
package/esm/Core/Container.d.ts
CHANGED
|
@@ -2,12 +2,11 @@ import { Canvas } from "./Canvas";
|
|
|
2
2
|
import { Particles } from "./Particles";
|
|
3
3
|
import { Retina } from "./Retina";
|
|
4
4
|
import type { IOptions } from "../Options/Interfaces/IOptions";
|
|
5
|
-
import { FrameManager } from "./
|
|
5
|
+
import { FrameManager, Vector } from "./Utils";
|
|
6
6
|
import type { RecursivePartial } from "../Types";
|
|
7
7
|
import { Options } from "../Options/Classes/Options";
|
|
8
8
|
import { Particle } from "./Particle";
|
|
9
|
-
import {
|
|
10
|
-
import { IAttract, IBubble, IContainerInteractivity, IContainerPlugin, IMovePathGenerator, IRepulse, IShapeDrawer } from "./Interfaces";
|
|
9
|
+
import type { IAttract, IBubble, IContainerInteractivity, IContainerPlugin, IMovePathGenerator, IRepulse, IShapeDrawer } from "./Interfaces";
|
|
11
10
|
export declare class Container {
|
|
12
11
|
readonly id: string;
|
|
13
12
|
started: boolean;
|
package/esm/Core/Container.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Canvas } from "./Canvas";
|
|
2
2
|
import { Particles } from "./Particles";
|
|
3
3
|
import { Retina } from "./Retina";
|
|
4
|
-
import { FrameManager } from "./
|
|
4
|
+
import { EventListeners, FrameManager, Plugins, Vector } from "./Utils";
|
|
5
5
|
import { Options } from "../Options/Classes/Options";
|
|
6
|
-
import { animate, cancelAnimation,
|
|
7
|
-
import { Vector } from "./Particle/Vector";
|
|
6
|
+
import { animate, cancelAnimation, getRangeValue } from "../Utils";
|
|
8
7
|
export class Container {
|
|
9
8
|
constructor(id, sourceOptions, ...presets) {
|
|
10
9
|
this.id = id;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Container } from "../Container";
|
|
2
2
|
import type { Particle } from "../Particle";
|
|
3
|
-
import { Vector } from "../
|
|
3
|
+
import { Vector } from "../Utils";
|
|
4
4
|
export interface IMovePathGenerator {
|
|
5
5
|
generate: (particle: Particle) => Vector;
|
|
6
6
|
init: (container: Container) => void;
|
|
@@ -7,7 +7,7 @@ import type { IBubbleParticleData } from "./IBubbleParticleData";
|
|
|
7
7
|
import type { IParticles } from "../../Options/Interfaces/Particles/IParticles";
|
|
8
8
|
import type { IHsl, IRgb } from "./Colors";
|
|
9
9
|
import type { IParticleHslAnimation } from "./IParticleHslAnimation";
|
|
10
|
-
import type { Vector } from "../
|
|
10
|
+
import type { Vector } from "../Utils";
|
|
11
11
|
import type { IParticleGradientAnimation } from "./IParticleGradientAnimation";
|
|
12
12
|
import type { IParticleRetinaProps } from "./IParticleRetinaProps";
|
|
13
13
|
import type { IParticleRoll } from "./IParticleRoll";
|
|
@@ -19,13 +19,15 @@ export * from "./IParticle";
|
|
|
19
19
|
export * from "./IParticleGradientAnimation";
|
|
20
20
|
export * from "./IParticleGradientColorAnimation";
|
|
21
21
|
export * from "./IParticleHslAnimation";
|
|
22
|
+
export * from "./IParticlesInteractor";
|
|
22
23
|
export * from "./IParticleLife";
|
|
23
24
|
export * from "./IParticleLoops";
|
|
24
25
|
export * from "./IParticleRetinaProps";
|
|
26
|
+
export * from "./IParticleRoll";
|
|
25
27
|
export * from "./IParticleSpin";
|
|
26
28
|
export * from "./IParticleUpdater";
|
|
27
29
|
export * from "./IParticleValueAnimation";
|
|
28
|
-
export * from "./
|
|
30
|
+
export * from "./IParticleWobble";
|
|
29
31
|
export * from "./IPlugin";
|
|
30
32
|
export * from "./IRangeValue";
|
|
31
33
|
export * from "./IRectSideResult";
|
|
@@ -19,13 +19,15 @@ export * from "./IParticle";
|
|
|
19
19
|
export * from "./IParticleGradientAnimation";
|
|
20
20
|
export * from "./IParticleGradientColorAnimation";
|
|
21
21
|
export * from "./IParticleHslAnimation";
|
|
22
|
+
export * from "./IParticlesInteractor";
|
|
22
23
|
export * from "./IParticleLife";
|
|
23
24
|
export * from "./IParticleLoops";
|
|
24
25
|
export * from "./IParticleRetinaProps";
|
|
26
|
+
export * from "./IParticleRoll";
|
|
25
27
|
export * from "./IParticleSpin";
|
|
26
28
|
export * from "./IParticleUpdater";
|
|
27
29
|
export * from "./IParticleValueAnimation";
|
|
28
|
-
export * from "./
|
|
30
|
+
export * from "./IParticleWobble";
|
|
29
31
|
export * from "./IPlugin";
|
|
30
32
|
export * from "./IRangeValue";
|
|
31
33
|
export * from "./IRectSideResult";
|
package/esm/Core/Loader.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Container } from "./Container";
|
|
2
|
-
import {
|
|
2
|
+
import { itemFromArray } from "../Utils";
|
|
3
|
+
import { Constants } from "./Utils";
|
|
3
4
|
const tsParticlesDom = [];
|
|
4
5
|
function fetchError(statusCode) {
|
|
5
6
|
console.error(`Error tsParticles - fetch status: ${statusCode}`);
|
|
@@ -38,24 +39,19 @@ export class Loader {
|
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
let canvasEl;
|
|
41
|
-
let generatedCanvas;
|
|
42
42
|
if (domContainer.tagName.toLowerCase() === "canvas") {
|
|
43
43
|
canvasEl = domContainer;
|
|
44
|
-
|
|
44
|
+
canvasEl.dataset[Constants.generatedAttribute] = "false";
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
47
|
const existingCanvases = domContainer.getElementsByTagName("canvas");
|
|
48
48
|
if (existingCanvases.length) {
|
|
49
49
|
canvasEl = existingCanvases[0];
|
|
50
|
-
|
|
51
|
-
canvasEl.className = Constants.canvasClass;
|
|
52
|
-
}
|
|
53
|
-
generatedCanvas = false;
|
|
50
|
+
canvasEl.dataset[Constants.generatedAttribute] = "false";
|
|
54
51
|
}
|
|
55
52
|
else {
|
|
56
|
-
generatedCanvas = true;
|
|
57
53
|
canvasEl = document.createElement("canvas");
|
|
58
|
-
canvasEl.
|
|
54
|
+
canvasEl.dataset[Constants.generatedAttribute] = "true";
|
|
59
55
|
canvasEl.style.width = "100%";
|
|
60
56
|
canvasEl.style.height = "100%";
|
|
61
57
|
domContainer.appendChild(canvasEl);
|
|
@@ -68,7 +64,7 @@ export class Loader {
|
|
|
68
64
|
else {
|
|
69
65
|
dom.push(newItem);
|
|
70
66
|
}
|
|
71
|
-
newItem.canvas.loadCanvas(canvasEl
|
|
67
|
+
newItem.canvas.loadCanvas(canvasEl);
|
|
72
68
|
await newItem.start();
|
|
73
69
|
return newItem;
|
|
74
70
|
}
|
package/esm/Core/Particle.d.ts
CHANGED
|
@@ -4,11 +4,8 @@ import { ParticlesOptions } from "../Options/Classes/Particles/ParticlesOptions"
|
|
|
4
4
|
import { ShapeType } from "../Enums";
|
|
5
5
|
import type { RecursivePartial } from "../Types";
|
|
6
6
|
import type { Stroke } from "../Options/Classes/Particles/Stroke";
|
|
7
|
-
import { Vector } from "./
|
|
8
|
-
import type { IBubbleParticleData, ICoordinates, ICoordinates3d, IDelta, IHsl, IParticle, IParticleGradientAnimation, IParticleHslAnimation, IParticleLife, IParticleNumericValueAnimation, IParticleSpin, IParticleTiltValueAnimation, IParticleValueAnimation, IRgb, IShapeValues, IParticleRetinaProps } from "./Interfaces";
|
|
9
|
-
import { Vector3d } from "./Particle/Vector3d";
|
|
10
|
-
import { IParticleRoll } from "./Interfaces/IParticleRoll";
|
|
11
|
-
import { IParticleWobble } from "./Interfaces/IParticleWobble";
|
|
7
|
+
import { Vector, Vector3d } from "./Utils";
|
|
8
|
+
import type { IBubbleParticleData, ICoordinates, ICoordinates3d, IDelta, IHsl, IParticle, IParticleGradientAnimation, IParticleHslAnimation, IParticleLife, IParticleNumericValueAnimation, IParticleSpin, IParticleTiltValueAnimation, IParticleValueAnimation, IRgb, IShapeValues, IParticleRetinaProps, IParticleRoll, IParticleWobble } from "./Interfaces";
|
|
12
9
|
export declare class Particle implements IParticle {
|
|
13
10
|
readonly id: number;
|
|
14
11
|
readonly container: Container;
|
package/esm/Core/Particle.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ParticlesOptions } from "../Options/Classes/Particles/ParticlesOptions";
|
|
2
2
|
import { Shape } from "../Options/Classes/Particles/Shape/Shape";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Vector } from "./Particle/Vector";
|
|
6
|
-
import { Vector3d } from "./Particle/Vector3d";
|
|
3
|
+
import { alterHsl, clamp, colorToRgb, deepExtend, getDistance, getHslFromAnimation, getParticleBaseVelocity, getParticleDirectionAngle, getRangeMax, getRangeMin, getRangeValue, getValue, isInArray, itemFromArray, randomInRange, setRangeValue, } from "../Utils";
|
|
4
|
+
import { Plugins, Vector, Vector3d } from "./Utils";
|
|
7
5
|
const fixOutMode = (data) => {
|
|
8
6
|
if (isInArray(data.outMode, data.checkModes) || isInArray(data.outMode, data.checkModes)) {
|
|
9
7
|
if (data.coord > data.maxCoord - data.radius * 2) {
|
|
@@ -77,20 +75,20 @@ export class Particle {
|
|
|
77
75
|
};
|
|
78
76
|
const sizeAnimation = sizeOptions.animation;
|
|
79
77
|
if (sizeAnimation.enable) {
|
|
80
|
-
this.size.status =
|
|
78
|
+
this.size.status = 0;
|
|
81
79
|
switch (sizeAnimation.startValue) {
|
|
82
|
-
case
|
|
80
|
+
case "min":
|
|
83
81
|
this.size.value = this.size.min;
|
|
84
|
-
this.size.status =
|
|
82
|
+
this.size.status = 0;
|
|
85
83
|
break;
|
|
86
|
-
case
|
|
84
|
+
case "random":
|
|
87
85
|
this.size.value = randomInRange(this.size) * pxRatio;
|
|
88
|
-
this.size.status = Math.random() >= 0.5 ?
|
|
86
|
+
this.size.status = Math.random() >= 0.5 ? 0 : 1;
|
|
89
87
|
break;
|
|
90
|
-
case
|
|
88
|
+
case "max":
|
|
91
89
|
default:
|
|
92
90
|
this.size.value = this.size.max;
|
|
93
|
-
this.size.status =
|
|
91
|
+
this.size.status = 1;
|
|
94
92
|
break;
|
|
95
93
|
}
|
|
96
94
|
this.size.velocity =
|
|
@@ -141,7 +139,7 @@ export class Particle {
|
|
|
141
139
|
const distance = getDistance(pos, spinCenter);
|
|
142
140
|
this.spin = {
|
|
143
141
|
center: spinCenter,
|
|
144
|
-
direction: this.velocity.x >= 0 ?
|
|
142
|
+
direction: this.velocity.x >= 0 ? "clockwise" : "counter-clockwise",
|
|
145
143
|
angle: this.velocity.angle,
|
|
146
144
|
radius: distance,
|
|
147
145
|
acceleration: (_j = this.retina.spinAcceleration) !== null && _j !== void 0 ? _j : getRangeValue(this.options.move.spin.acceleration),
|
|
@@ -231,7 +229,7 @@ export class Particle {
|
|
|
231
229
|
return;
|
|
232
230
|
}
|
|
233
231
|
const destroyOptions = this.options.destroy;
|
|
234
|
-
if (destroyOptions.mode ===
|
|
232
|
+
if (destroyOptions.mode === "split") {
|
|
235
233
|
this.split();
|
|
236
234
|
}
|
|
237
235
|
}
|
|
@@ -265,7 +263,7 @@ export class Particle {
|
|
|
265
263
|
const outModes = this.options.move.outModes, fixHorizontal = (outMode) => {
|
|
266
264
|
fixOutMode({
|
|
267
265
|
outMode,
|
|
268
|
-
checkModes: [
|
|
266
|
+
checkModes: ["bounce", "bounce-horizontal"],
|
|
269
267
|
coord: pos.x,
|
|
270
268
|
maxCoord: container.canvas.size.width,
|
|
271
269
|
setCb: (value) => (pos.x += value),
|
|
@@ -274,7 +272,7 @@ export class Particle {
|
|
|
274
272
|
}, fixVertical = (outMode) => {
|
|
275
273
|
fixOutMode({
|
|
276
274
|
outMode,
|
|
277
|
-
checkModes: [
|
|
275
|
+
checkModes: ["bounce", "bounce-vertical"],
|
|
278
276
|
coord: pos.y,
|
|
279
277
|
maxCoord: container.canvas.size.height,
|
|
280
278
|
setCb: (value) => (pos.y += value),
|
package/esm/Core/Particles.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Container } from "./Container";
|
|
2
2
|
import { Particle } from "./Particle";
|
|
3
|
-
import { QuadTree } from "../Utils";
|
|
4
3
|
import type { RecursivePartial } from "../Types";
|
|
5
4
|
import type { IParticles } from "../Options/Interfaces/Particles/IParticles";
|
|
6
5
|
import type { ICoordinates, IDelta, IMouseData, IParticle, IRgb } from "./Interfaces";
|
|
6
|
+
import { QuadTree } from "./Utils";
|
|
7
7
|
export declare class Particles {
|
|
8
8
|
private readonly container;
|
|
9
9
|
get count(): number;
|