tsparticles 1.38.0 → 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.js +28 -28
- 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 +4 -3
- 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 +0 -0
- package/{Utils → Core/Utils}/Constants.js +0 -0
- package/{Utils → Core/Utils}/EventListeners.d.ts +1 -1
- package/{Utils → Core/Utils}/EventListeners.js +10 -11
- 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.js +8 -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/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/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 +6 -7
- package/Utils/index.d.ts +0 -9
- package/Utils/index.js +0 -9
- package/browser/Core/Canvas.js +9 -9
- 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 +2 -1
- 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 +0 -0
- package/browser/{Utils → Core/Utils}/Constants.js +0 -0
- package/browser/{Utils → Core/Utils}/EventListeners.d.ts +1 -1
- package/browser/{Utils → Core/Utils}/EventListeners.js +10 -11
- 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.js +7 -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/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 +5 -6
- 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.js +9 -9
- 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 +2 -1
- 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 +0 -0
- package/esm/{Utils → Core/Utils}/Constants.js +0 -0
- package/esm/{Utils → Core/Utils}/EventListeners.d.ts +1 -1
- package/esm/{Utils → Core/Utils}/EventListeners.js +10 -11
- 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.js +7 -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/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 +5 -6
- 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/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 +1263 -1572
- 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 +1052 -1314
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/Plugins/PolygonMask/Options/Interfaces/{ILocalSvg.d.ts → IPolygonMaskLocalSvg.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SingleOrMultiple } from "../../../../Types";
|
|
2
|
-
import type { IDimension } from "../../../../Core
|
|
3
|
-
export interface
|
|
2
|
+
import type { IDimension } from "../../../../Core";
|
|
3
|
+
export interface IPolygonMaskLocalSvg {
|
|
4
4
|
path: SingleOrMultiple<string>;
|
|
5
5
|
size: IDimension;
|
|
6
6
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type { Container } from "../../Core
|
|
2
|
-
import type { IContainerPlugin, ICoordinates, IDelta, IDimension } from "../../Core/Interfaces";
|
|
3
|
-
import { Particle } from "../../Core/Particle";
|
|
1
|
+
import type { Container, IContainerPlugin, ICoordinates, IDelta, IDimension, Particle } from "../../Core";
|
|
4
2
|
import type { ISvgPath } from "./Interfaces/ISvgPath";
|
|
5
3
|
import type { RecursivePartial } from "../../Types";
|
|
6
4
|
import { PolygonMask } from "./Options/Classes/PolygonMask";
|
|
7
5
|
import { OutModeDirection } from "../../Enums";
|
|
8
|
-
import type { IPolygonMaskOptions } from "./
|
|
6
|
+
import type { IPolygonMaskOptions } from "./Types";
|
|
9
7
|
export declare class PolygonMaskInstance implements IContainerPlugin {
|
|
10
8
|
private readonly container;
|
|
11
9
|
redrawTimeout?: number;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Constants } from "../../Core";
|
|
2
|
+
import { deepExtend, getDistance, getDistances, itemFromArray } from "../../Utils";
|
|
3
3
|
import { PolygonMask } from "./Options/Classes/PolygonMask";
|
|
4
|
-
import {
|
|
5
|
-
import { calcClosestPtOnSegment, drawPolygonMask, drawPolygonMaskPath, parsePaths, segmentBounce } from "./utils";
|
|
4
|
+
import { calcClosestPtOnSegment, drawPolygonMask, drawPolygonMaskPath, parsePaths, segmentBounce } from "./Utils";
|
|
6
5
|
export class PolygonMaskInstance {
|
|
7
6
|
constructor(container) {
|
|
8
7
|
this.container = container;
|
|
@@ -25,7 +24,7 @@ export class PolygonMaskInstance {
|
|
|
25
24
|
resize() {
|
|
26
25
|
const container = this.container;
|
|
27
26
|
const options = this.options;
|
|
28
|
-
if (!(options.enable && options.type !==
|
|
27
|
+
if (!(options.enable && options.type !== "none")) {
|
|
29
28
|
return;
|
|
30
29
|
}
|
|
31
30
|
if (this.redrawTimeout) {
|
|
@@ -43,9 +42,9 @@ export class PolygonMaskInstance {
|
|
|
43
42
|
particlesInitialization() {
|
|
44
43
|
const options = this.options;
|
|
45
44
|
if (options.enable &&
|
|
46
|
-
options.type ===
|
|
47
|
-
(options.inline.arrangement ===
|
|
48
|
-
options.inline.arrangement ===
|
|
45
|
+
options.type === "inline" &&
|
|
46
|
+
(options.inline.arrangement === "one-per-point" ||
|
|
47
|
+
options.inline.arrangement === "per-point")) {
|
|
49
48
|
this.drawPoints();
|
|
50
49
|
return true;
|
|
51
50
|
}
|
|
@@ -65,8 +64,8 @@ export class PolygonMaskInstance {
|
|
|
65
64
|
clickPositionValid(position) {
|
|
66
65
|
const options = this.options;
|
|
67
66
|
return (options.enable &&
|
|
68
|
-
options.type !==
|
|
69
|
-
options.type !==
|
|
67
|
+
options.type !== "none" &&
|
|
68
|
+
options.type !== "inline" &&
|
|
70
69
|
this.checkInsidePolygon(position));
|
|
71
70
|
}
|
|
72
71
|
draw(context) {
|
|
@@ -96,10 +95,10 @@ export class PolygonMaskInstance {
|
|
|
96
95
|
}
|
|
97
96
|
polygonBounce(particle, _delta, direction) {
|
|
98
97
|
const options = this.options;
|
|
99
|
-
if (!this.raw || !options.enable || direction !==
|
|
98
|
+
if (!this.raw || !options.enable || direction !== "top") {
|
|
100
99
|
return false;
|
|
101
100
|
}
|
|
102
|
-
if (options.type ===
|
|
101
|
+
if (options.type === "inside" || options.type === "outside") {
|
|
103
102
|
let closest, dx, dy;
|
|
104
103
|
const pos = particle.getPosition(), radius = particle.getRadius();
|
|
105
104
|
for (let i = 0, j = this.raw.length - 1; i < this.raw.length; j = i++) {
|
|
@@ -126,7 +125,7 @@ export class PolygonMaskInstance {
|
|
|
126
125
|
return true;
|
|
127
126
|
}
|
|
128
127
|
}
|
|
129
|
-
else if (options.type ===
|
|
128
|
+
else if (options.type === "inline" && particle.initialPosition) {
|
|
130
129
|
const dist = getDistance(particle.initialPosition, particle.getPosition());
|
|
131
130
|
if (dist > this.polygonMaskMoveRadius) {
|
|
132
131
|
particle.velocity.x = particle.velocity.y / 2 - particle.velocity.x;
|
|
@@ -140,7 +139,7 @@ export class PolygonMaskInstance {
|
|
|
140
139
|
var _a, _b;
|
|
141
140
|
const container = this.container;
|
|
142
141
|
const options = this.options;
|
|
143
|
-
if (!options.enable || options.type ===
|
|
142
|
+
if (!options.enable || options.type === "none" || options.type === "inline") {
|
|
144
143
|
return true;
|
|
145
144
|
}
|
|
146
145
|
if (!this.raw) {
|
|
@@ -158,7 +157,11 @@ export class PolygonMaskInstance {
|
|
|
158
157
|
inside = !inside;
|
|
159
158
|
}
|
|
160
159
|
}
|
|
161
|
-
return options.type ===
|
|
160
|
+
return options.type === "inside"
|
|
161
|
+
? inside
|
|
162
|
+
: options.type === "outside"
|
|
163
|
+
? !inside
|
|
164
|
+
: false;
|
|
162
165
|
}
|
|
163
166
|
parseSvgPath(xml, force) {
|
|
164
167
|
var _a, _b, _c;
|
|
@@ -227,19 +230,19 @@ export class PolygonMaskInstance {
|
|
|
227
230
|
const container = this.container;
|
|
228
231
|
const options = this.options;
|
|
229
232
|
let position;
|
|
230
|
-
if (options.type ===
|
|
233
|
+
if (options.type === "inline") {
|
|
231
234
|
switch (options.inline.arrangement) {
|
|
232
|
-
case
|
|
235
|
+
case "random-point":
|
|
233
236
|
position = this.getRandomPoint();
|
|
234
237
|
break;
|
|
235
|
-
case
|
|
238
|
+
case "random-length":
|
|
236
239
|
position = this.getRandomPointByLength();
|
|
237
240
|
break;
|
|
238
|
-
case
|
|
241
|
+
case "equidistant":
|
|
239
242
|
position = this.getEquidistantPointByIndex(container.particles.count);
|
|
240
243
|
break;
|
|
241
|
-
case
|
|
242
|
-
case
|
|
244
|
+
case "one-per-point":
|
|
245
|
+
case "per-point":
|
|
243
246
|
default:
|
|
244
247
|
position = this.getPointByIndex(container.particles.count);
|
|
245
248
|
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ICoordinates } from "../../Core
|
|
2
|
-
import type {
|
|
1
|
+
import type { ICoordinates } from "../../Core";
|
|
2
|
+
import type { IPolygonMaskDrawStroke } from "./Options/Interfaces/IPolygonMaskDrawStroke";
|
|
3
3
|
import type { ISvgPath } from "./Interfaces/ISvgPath";
|
|
4
|
-
import { Vector } from "../../Core
|
|
5
|
-
export declare function drawPolygonMask(context: CanvasRenderingContext2D, rawData: ICoordinates[], stroke:
|
|
6
|
-
export declare function drawPolygonMaskPath(context: CanvasRenderingContext2D, path: Path2D, stroke:
|
|
4
|
+
import { Vector } from "../../Core";
|
|
5
|
+
export declare function drawPolygonMask(context: CanvasRenderingContext2D, rawData: ICoordinates[], stroke: IPolygonMaskDrawStroke): void;
|
|
6
|
+
export declare function drawPolygonMaskPath(context: CanvasRenderingContext2D, path: Path2D, stroke: IPolygonMaskDrawStroke, position: ICoordinates): void;
|
|
7
7
|
export declare function parsePaths(paths: ISvgPath[], scale: number, offset: ICoordinates): ICoordinates[];
|
|
8
8
|
export declare function calcClosestPtOnSegment(s1: ICoordinates, s2: ICoordinates, pos: ICoordinates): ICoordinates & {
|
|
9
9
|
isOnSegment: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { colorToRgb, getDistances, getStyleFromRgb } from "../../Utils";
|
|
2
|
+
import { Vector } from "../../Core";
|
|
2
3
|
export function drawPolygonMask(context, rawData, stroke) {
|
|
3
4
|
const color = colorToRgb(stroke.color);
|
|
4
5
|
if (!color) {
|
|
@@ -90,24 +91,26 @@ export function calcClosestPtOnSegment(s1, s2, pos) {
|
|
|
90
91
|
const { dx, dy } = getDistances(pos, s1);
|
|
91
92
|
const { dx: dxx, dy: dyy } = getDistances(s2, s1);
|
|
92
93
|
const t = (dx * dxx + dy * dyy) / (dxx ** 2 + dyy ** 2);
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
const res = {
|
|
95
|
+
x: s1.x + dxx * t,
|
|
96
|
+
y: s1.x + dyy * t,
|
|
97
|
+
isOnSegment: t >= 0 && t <= 1,
|
|
98
|
+
};
|
|
95
99
|
if (t < 0) {
|
|
96
|
-
x = s1.x;
|
|
97
|
-
y = s1.y;
|
|
100
|
+
res.x = s1.x;
|
|
101
|
+
res.y = s1.y;
|
|
98
102
|
}
|
|
99
103
|
else if (t > 1) {
|
|
100
|
-
x = s2.x;
|
|
101
|
-
y = s2.y;
|
|
104
|
+
res.x = s2.x;
|
|
105
|
+
res.y = s2.y;
|
|
102
106
|
}
|
|
103
|
-
return
|
|
107
|
+
return res;
|
|
104
108
|
}
|
|
105
109
|
export function segmentBounce(start, stop, velocity) {
|
|
106
110
|
const { dx, dy } = getDistances(start, stop);
|
|
107
111
|
const wallAngle = Math.atan2(dy, dx);
|
|
108
|
-
const
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
velocity.
|
|
112
|
-
velocity.y -= d * wallNormalY;
|
|
112
|
+
const wallNormal = Vector.create(Math.sin(wallAngle), -Math.cos(wallAngle));
|
|
113
|
+
const d = 2 * (velocity.x * wallNormal.x + velocity.y * wallNormal.y);
|
|
114
|
+
wallNormal.multTo(d);
|
|
115
|
+
velocity.subFrom(wallNormal);
|
|
113
116
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { PolygonMaskInstance } from "./PolygonMaskInstance";
|
|
2
2
|
import { PolygonMask } from "./Options/Classes/PolygonMask";
|
|
3
|
-
import { Type } from "./Enums";
|
|
4
3
|
import { isSsr } from "../../Utils";
|
|
5
|
-
class
|
|
4
|
+
class PolygonMaskPlugin {
|
|
6
5
|
constructor() {
|
|
7
6
|
this.id = "polygonMask";
|
|
8
7
|
}
|
|
@@ -11,7 +10,7 @@ class Plugin {
|
|
|
11
10
|
}
|
|
12
11
|
needsPlugin(options) {
|
|
13
12
|
var _a, _b, _c;
|
|
14
|
-
return (_b = (_a = options === null || options === void 0 ? void 0 : options.polygon) === null || _a === void 0 ? void 0 : _a.enable) !== null && _b !== void 0 ? _b : (((_c = options === null || options === void 0 ? void 0 : options.polygon) === null || _c === void 0 ? void 0 : _c.type) !== undefined && options.polygon.type !==
|
|
13
|
+
return ((_b = (_a = options === null || options === void 0 ? void 0 : options.polygon) === null || _a === void 0 ? void 0 : _a.enable) !== null && _b !== void 0 ? _b : (((_c = options === null || options === void 0 ? void 0 : options.polygon) === null || _c === void 0 ? void 0 : _c.type) !== undefined && options.polygon.type !== "none"));
|
|
15
14
|
}
|
|
16
15
|
loadOptions(options, source) {
|
|
17
16
|
if (!this.needsPlugin(source)) {
|
|
@@ -26,9 +25,9 @@ class Plugin {
|
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
export async function loadPolygonMaskPlugin(tsParticles) {
|
|
29
|
-
if (!isSsr() && !window
|
|
28
|
+
if (!isSsr() && !("SVGPathSeg" in window)) {
|
|
30
29
|
await import("./pathseg");
|
|
31
30
|
}
|
|
32
|
-
const plugin = new
|
|
31
|
+
const plugin = new PolygonMaskPlugin();
|
|
33
32
|
await tsParticles.addPlugin(plugin);
|
|
34
33
|
}
|
|
@@ -1033,9 +1033,9 @@
|
|
|
1033
1033
|
window.SVGPathElement.prototype.getPathSegAtLength = function (distance) {
|
|
1034
1034
|
if (distance === undefined || !isFinite(distance))
|
|
1035
1035
|
throw "Invalid arguments.";
|
|
1036
|
-
|
|
1036
|
+
const measurementElement = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
1037
1037
|
measurementElement.setAttribute("d", this.getAttribute("d"));
|
|
1038
|
-
|
|
1038
|
+
let lastPathSegment = measurementElement.pathSegList.numberOfItems - 1;
|
|
1039
1039
|
if (lastPathSegment <= 0)
|
|
1040
1040
|
return 0;
|
|
1041
1041
|
do {
|
|
@@ -1103,7 +1103,7 @@
|
|
|
1103
1103
|
window.SVGPathSegList.prototype._updateListFromPathMutations = function (mutationRecords) {
|
|
1104
1104
|
if (!this._pathElement)
|
|
1105
1105
|
return;
|
|
1106
|
-
|
|
1106
|
+
let hasPathMutations = false;
|
|
1107
1107
|
mutationRecords.forEach(function (record) {
|
|
1108
1108
|
if (record.attributeName == "d")
|
|
1109
1109
|
hasPathMutations = true;
|
|
@@ -1169,7 +1169,7 @@
|
|
|
1169
1169
|
window.SVGPathSegList.prototype.removeItem = function (index) {
|
|
1170
1170
|
this._checkPathSynchronizedToList();
|
|
1171
1171
|
this._checkValidIndex(index);
|
|
1172
|
-
|
|
1172
|
+
const item = this._list[index];
|
|
1173
1173
|
this._list.splice(index, 1);
|
|
1174
1174
|
this._writeListToPath();
|
|
1175
1175
|
return item;
|
|
@@ -1185,8 +1185,8 @@
|
|
|
1185
1185
|
return newItem;
|
|
1186
1186
|
};
|
|
1187
1187
|
window.SVGPathSegList._pathSegArrayAsString = function (pathSegArray) {
|
|
1188
|
-
|
|
1189
|
-
|
|
1188
|
+
let string = "";
|
|
1189
|
+
let first = true;
|
|
1190
1190
|
pathSegArray.forEach(function (pathSeg) {
|
|
1191
1191
|
if (first) {
|
|
1192
1192
|
first = false;
|
|
@@ -1201,14 +1201,14 @@
|
|
|
1201
1201
|
window.SVGPathSegList.prototype._parsePath = function (string) {
|
|
1202
1202
|
if (!string || string.length == 0)
|
|
1203
1203
|
return [];
|
|
1204
|
-
|
|
1205
|
-
|
|
1204
|
+
const owningPathSegList = this;
|
|
1205
|
+
const Builder = function () {
|
|
1206
1206
|
this.pathSegList = [];
|
|
1207
1207
|
};
|
|
1208
1208
|
Builder.prototype.appendSegment = function (pathSeg) {
|
|
1209
1209
|
this.pathSegList.push(pathSeg);
|
|
1210
1210
|
};
|
|
1211
|
-
|
|
1211
|
+
const Source = function (string) {
|
|
1212
1212
|
this._string = string;
|
|
1213
1213
|
this._currentIndex = 0;
|
|
1214
1214
|
this._endIndex = this._string.length;
|
|
@@ -1216,9 +1216,13 @@
|
|
|
1216
1216
|
this._skipOptionalSpaces();
|
|
1217
1217
|
};
|
|
1218
1218
|
Source.prototype._isCurrentSpace = function () {
|
|
1219
|
-
|
|
1219
|
+
const character = this._string[this._currentIndex];
|
|
1220
1220
|
return (character <= " " &&
|
|
1221
|
-
(character == " " ||
|
|
1221
|
+
(character == " " ||
|
|
1222
|
+
character == "\n" ||
|
|
1223
|
+
character == "\t" ||
|
|
1224
|
+
character == "\r" ||
|
|
1225
|
+
character == "\f"));
|
|
1222
1226
|
};
|
|
1223
1227
|
Source.prototype._skipOptionalSpaces = function () {
|
|
1224
1228
|
while (this._currentIndex < this._endIndex && this._isCurrentSpace())
|
|
@@ -1242,7 +1246,7 @@
|
|
|
1242
1246
|
return this._currentIndex < this._endIndex;
|
|
1243
1247
|
};
|
|
1244
1248
|
Source.prototype.peekSegmentType = function () {
|
|
1245
|
-
|
|
1249
|
+
const lookahead = this._string[this._currentIndex];
|
|
1246
1250
|
return this._pathSegTypeFromChar(lookahead);
|
|
1247
1251
|
};
|
|
1248
1252
|
Source.prototype._pathSegTypeFromChar = function (lookahead) {
|
|
@@ -1291,7 +1295,10 @@
|
|
|
1291
1295
|
}
|
|
1292
1296
|
};
|
|
1293
1297
|
Source.prototype._nextCommandHelper = function (lookahead, previousCommand) {
|
|
1294
|
-
if ((lookahead == "+" ||
|
|
1298
|
+
if ((lookahead == "+" ||
|
|
1299
|
+
lookahead == "-" ||
|
|
1300
|
+
lookahead == "." ||
|
|
1301
|
+
(lookahead >= "0" && lookahead <= "9")) &&
|
|
1295
1302
|
previousCommand != window.SVGPathSeg.PATHSEG_CLOSEPATH) {
|
|
1296
1303
|
if (previousCommand == window.SVGPathSeg.PATHSEG_MOVETO_ABS)
|
|
1297
1304
|
return window.SVGPathSeg.PATHSEG_LINETO_ABS;
|
|
@@ -1304,17 +1311,18 @@
|
|
|
1304
1311
|
Source.prototype.initialCommandIsMoveTo = function () {
|
|
1305
1312
|
if (!this.hasMoreData())
|
|
1306
1313
|
return true;
|
|
1307
|
-
|
|
1308
|
-
return command == window.SVGPathSeg.PATHSEG_MOVETO_ABS ||
|
|
1314
|
+
const command = this.peekSegmentType();
|
|
1315
|
+
return (command == window.SVGPathSeg.PATHSEG_MOVETO_ABS ||
|
|
1316
|
+
command == window.SVGPathSeg.PATHSEG_MOVETO_REL);
|
|
1309
1317
|
};
|
|
1310
1318
|
Source.prototype._parseNumber = function () {
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1319
|
+
let exponent = 0;
|
|
1320
|
+
let integer = 0;
|
|
1321
|
+
let frac = 1;
|
|
1322
|
+
let decimal = 0;
|
|
1323
|
+
let sign = 1;
|
|
1324
|
+
let expsign = 1;
|
|
1325
|
+
const startIndex = this._currentIndex;
|
|
1318
1326
|
this._skipOptionalSpaces();
|
|
1319
1327
|
if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == "+")
|
|
1320
1328
|
this._currentIndex++;
|
|
@@ -1323,17 +1331,18 @@
|
|
|
1323
1331
|
sign = -1;
|
|
1324
1332
|
}
|
|
1325
1333
|
if (this._currentIndex == this._endIndex ||
|
|
1326
|
-
((this._string.charAt(this._currentIndex) < "0" ||
|
|
1334
|
+
((this._string.charAt(this._currentIndex) < "0" ||
|
|
1335
|
+
this._string.charAt(this._currentIndex) > "9") &&
|
|
1327
1336
|
this._string.charAt(this._currentIndex) != "."))
|
|
1328
1337
|
return undefined;
|
|
1329
|
-
|
|
1338
|
+
const startIntPartIndex = this._currentIndex;
|
|
1330
1339
|
while (this._currentIndex < this._endIndex &&
|
|
1331
1340
|
this._string.charAt(this._currentIndex) >= "0" &&
|
|
1332
1341
|
this._string.charAt(this._currentIndex) <= "9")
|
|
1333
1342
|
this._currentIndex++;
|
|
1334
1343
|
if (this._currentIndex != startIntPartIndex) {
|
|
1335
|
-
|
|
1336
|
-
|
|
1344
|
+
let scanIntPartIndex = this._currentIndex - 1;
|
|
1345
|
+
let multiplier = 1;
|
|
1337
1346
|
while (scanIntPartIndex >= startIntPartIndex) {
|
|
1338
1347
|
integer += multiplier * (this._string.charAt(scanIntPartIndex--) - "0");
|
|
1339
1348
|
multiplier *= 10;
|
|
@@ -1355,7 +1364,8 @@
|
|
|
1355
1364
|
}
|
|
1356
1365
|
if (this._currentIndex != startIndex &&
|
|
1357
1366
|
this._currentIndex + 1 < this._endIndex &&
|
|
1358
|
-
(this._string.charAt(this._currentIndex) == "e" ||
|
|
1367
|
+
(this._string.charAt(this._currentIndex) == "e" ||
|
|
1368
|
+
this._string.charAt(this._currentIndex) == "E") &&
|
|
1359
1369
|
this._string.charAt(this._currentIndex + 1) != "x" &&
|
|
1360
1370
|
this._string.charAt(this._currentIndex + 1) != "m") {
|
|
1361
1371
|
this._currentIndex++;
|
|
@@ -1378,7 +1388,7 @@
|
|
|
1378
1388
|
this._currentIndex++;
|
|
1379
1389
|
}
|
|
1380
1390
|
}
|
|
1381
|
-
|
|
1391
|
+
let number = integer + decimal;
|
|
1382
1392
|
number *= sign;
|
|
1383
1393
|
if (exponent)
|
|
1384
1394
|
number *= Math.pow(10, expsign * exponent);
|
|
@@ -1390,8 +1400,8 @@
|
|
|
1390
1400
|
Source.prototype._parseArcFlag = function () {
|
|
1391
1401
|
if (this._currentIndex >= this._endIndex)
|
|
1392
1402
|
return undefined;
|
|
1393
|
-
|
|
1394
|
-
|
|
1403
|
+
let flag = false;
|
|
1404
|
+
const flagChar = this._string.charAt(this._currentIndex++);
|
|
1395
1405
|
if (flagChar == "0")
|
|
1396
1406
|
flag = false;
|
|
1397
1407
|
else if (flagChar == "1")
|
|
@@ -1402,8 +1412,8 @@
|
|
|
1402
1412
|
return flag;
|
|
1403
1413
|
};
|
|
1404
1414
|
Source.prototype.parseSegment = function () {
|
|
1405
|
-
|
|
1406
|
-
|
|
1415
|
+
const lookahead = this._string[this._currentIndex];
|
|
1416
|
+
let command = this._pathSegTypeFromChar(lookahead);
|
|
1407
1417
|
if (command == window.SVGPathSeg.PATHSEG_UNKNOWN) {
|
|
1408
1418
|
if (this._previousCommand == window.SVGPathSeg.PATHSEG_UNKNOWN)
|
|
1409
1419
|
return null;
|
|
@@ -1415,6 +1425,7 @@
|
|
|
1415
1425
|
this._currentIndex++;
|
|
1416
1426
|
}
|
|
1417
1427
|
this._previousCommand = command;
|
|
1428
|
+
let points;
|
|
1418
1429
|
switch (command) {
|
|
1419
1430
|
case window.SVGPathSeg.PATHSEG_MOVETO_REL:
|
|
1420
1431
|
return new window.SVGPathSegMovetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());
|
|
@@ -1436,7 +1447,7 @@
|
|
|
1436
1447
|
this._skipOptionalSpaces();
|
|
1437
1448
|
return new window.SVGPathSegClosePath(owningPathSegList);
|
|
1438
1449
|
case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:
|
|
1439
|
-
|
|
1450
|
+
points = {
|
|
1440
1451
|
x1: this._parseNumber(),
|
|
1441
1452
|
y1: this._parseNumber(),
|
|
1442
1453
|
x2: this._parseNumber(),
|
|
@@ -1446,7 +1457,7 @@
|
|
|
1446
1457
|
};
|
|
1447
1458
|
return new window.SVGPathSegCurvetoCubicRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);
|
|
1448
1459
|
case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:
|
|
1449
|
-
|
|
1460
|
+
points = {
|
|
1450
1461
|
x1: this._parseNumber(),
|
|
1451
1462
|
y1: this._parseNumber(),
|
|
1452
1463
|
x2: this._parseNumber(),
|
|
@@ -1456,7 +1467,7 @@
|
|
|
1456
1467
|
};
|
|
1457
1468
|
return new window.SVGPathSegCurvetoCubicAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);
|
|
1458
1469
|
case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:
|
|
1459
|
-
|
|
1470
|
+
points = {
|
|
1460
1471
|
x2: this._parseNumber(),
|
|
1461
1472
|
y2: this._parseNumber(),
|
|
1462
1473
|
x: this._parseNumber(),
|
|
@@ -1464,7 +1475,7 @@
|
|
|
1464
1475
|
};
|
|
1465
1476
|
return new window.SVGPathSegCurvetoCubicSmoothRel(owningPathSegList, points.x, points.y, points.x2, points.y2);
|
|
1466
1477
|
case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
|
|
1467
|
-
|
|
1478
|
+
points = {
|
|
1468
1479
|
x2: this._parseNumber(),
|
|
1469
1480
|
y2: this._parseNumber(),
|
|
1470
1481
|
x: this._parseNumber(),
|
|
@@ -1472,7 +1483,7 @@
|
|
|
1472
1483
|
};
|
|
1473
1484
|
return new window.SVGPathSegCurvetoCubicSmoothAbs(owningPathSegList, points.x, points.y, points.x2, points.y2);
|
|
1474
1485
|
case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:
|
|
1475
|
-
|
|
1486
|
+
points = {
|
|
1476
1487
|
x1: this._parseNumber(),
|
|
1477
1488
|
y1: this._parseNumber(),
|
|
1478
1489
|
x: this._parseNumber(),
|
|
@@ -1480,7 +1491,7 @@
|
|
|
1480
1491
|
};
|
|
1481
1492
|
return new window.SVGPathSegCurvetoQuadraticRel(owningPathSegList, points.x, points.y, points.x1, points.y1);
|
|
1482
1493
|
case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:
|
|
1483
|
-
|
|
1494
|
+
points = {
|
|
1484
1495
|
x1: this._parseNumber(),
|
|
1485
1496
|
y1: this._parseNumber(),
|
|
1486
1497
|
x: this._parseNumber(),
|
|
@@ -1492,7 +1503,7 @@
|
|
|
1492
1503
|
case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:
|
|
1493
1504
|
return new window.SVGPathSegCurvetoQuadraticSmoothAbs(owningPathSegList, this._parseNumber(), this._parseNumber());
|
|
1494
1505
|
case window.SVGPathSeg.PATHSEG_ARC_REL:
|
|
1495
|
-
|
|
1506
|
+
points = {
|
|
1496
1507
|
x1: this._parseNumber(),
|
|
1497
1508
|
y1: this._parseNumber(),
|
|
1498
1509
|
arcAngle: this._parseNumber(),
|
|
@@ -1503,7 +1514,7 @@
|
|
|
1503
1514
|
};
|
|
1504
1515
|
return new window.SVGPathSegArcRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);
|
|
1505
1516
|
case window.SVGPathSeg.PATHSEG_ARC_ABS:
|
|
1506
|
-
|
|
1517
|
+
points = {
|
|
1507
1518
|
x1: this._parseNumber(),
|
|
1508
1519
|
y1: this._parseNumber(),
|
|
1509
1520
|
arcAngle: this._parseNumber(),
|
|
@@ -1517,12 +1528,12 @@
|
|
|
1517
1528
|
throw "Unknown path seg type.";
|
|
1518
1529
|
}
|
|
1519
1530
|
};
|
|
1520
|
-
|
|
1521
|
-
|
|
1531
|
+
const builder = new Builder();
|
|
1532
|
+
const source = new Source(string);
|
|
1522
1533
|
if (!source.initialCommandIsMoveTo())
|
|
1523
1534
|
return [];
|
|
1524
1535
|
while (source.hasMoreData()) {
|
|
1525
|
-
|
|
1536
|
+
const pathSeg = source.parseSegment();
|
|
1526
1537
|
if (!pathSeg)
|
|
1527
1538
|
return [];
|
|
1528
1539
|
builder.appendSegment(pathSeg);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IParticle, IShapeDrawer } from "../../Core
|
|
1
|
+
import type { IParticle, IShapeDrawer } from "../../Core";
|
|
2
2
|
export declare class CircleDrawer implements IShapeDrawer {
|
|
3
3
|
getSidesCount(): number;
|
|
4
4
|
draw(context: CanvasRenderingContext2D, particle: IParticle, radius: number): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function loadCircleShape(tsParticles:
|
|
1
|
+
import type { Engine } from "../../engine";
|
|
2
|
+
export declare function loadCircleShape(tsParticles: Engine): Promise<void>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { IImage } from "./Utils";
|
|
4
|
-
import { Particle } from "../../Core/Particle";
|
|
1
|
+
import type { Container, IShapeDrawer, Particle } from "../../Core";
|
|
2
|
+
import type { IImage, IImageParticle } from "./Utils";
|
|
5
3
|
interface ContainerImage {
|
|
6
4
|
id: string;
|
|
7
5
|
images: IImage[];
|
|
@@ -12,11 +10,9 @@ export declare class ImageDrawer implements IShapeDrawer {
|
|
|
12
10
|
getSidesCount(): number;
|
|
13
11
|
getImages(container: Container): ContainerImage;
|
|
14
12
|
addImage(container: Container, image: IImage): void;
|
|
15
|
-
init(container: Container): Promise<void>;
|
|
16
13
|
destroy(): void;
|
|
17
|
-
private loadImagesFromParticlesOptions;
|
|
18
14
|
private loadImageShape;
|
|
19
|
-
draw(context: CanvasRenderingContext2D, particle:
|
|
15
|
+
draw(context: CanvasRenderingContext2D, particle: IImageParticle, radius: number, opacity: number): void;
|
|
20
16
|
loadShape(particle: Particle): void;
|
|
21
17
|
}
|
|
22
18
|
export {};
|