tsparticles 1.39.0 → 1.39.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Core/Canvas.d.ts +1 -1
- package/Core/Canvas.js +27 -27
- package/Core/Container.d.ts +5 -5
- package/Core/Container.js +3 -3
- package/Core/Interfaces/Gradients.d.ts +2 -2
- package/Core/Interfaces/ICircleBouncer.d.ts +1 -1
- package/Core/Interfaces/IContainerPlugin.d.ts +4 -4
- package/Core/Interfaces/IExternalInteractor.d.ts +1 -1
- package/Core/Interfaces/IInteractor.d.ts +1 -1
- package/Core/Interfaces/IParticle.d.ts +8 -8
- package/Core/Interfaces/IParticleGradientAnimation.d.ts +1 -1
- package/Core/Interfaces/IParticleSpin.d.ts +1 -1
- package/Core/Interfaces/IParticlesInteractor.d.ts +2 -2
- package/Core/Interfaces/IPlugin.d.ts +1 -1
- package/Core/Loader.d.ts +1 -1
- package/Core/Loader.js +7 -7
- package/Core/Particle.d.ts +3 -3
- package/Core/Particle.js +31 -31
- package/Core/Particles.d.ts +3 -3
- package/Core/Particles.js +15 -15
- package/Core/Utils/Circle.d.ts +1 -1
- package/Core/Utils/CircleWarp.d.ts +1 -1
- package/Core/Utils/CircleWarp.js +1 -1
- package/Core/Utils/EventListeners.js +1 -1
- package/Core/Utils/ExternalInteractorBase.d.ts +1 -1
- package/Core/Utils/InteractionManager.d.ts +1 -1
- package/Core/Utils/ParticlesInteractorBase.d.ts +1 -1
- package/Core/Utils/ParticlesMover.d.ts +1 -1
- package/Core/Utils/Plugins.d.ts +1 -1
- package/Core/Utils/QuadTree.d.ts +3 -3
- package/Core/Utils/QuadTree.js +1 -1
- package/Core/Utils/Rectangle.d.ts +1 -1
- package/Core/Utils/Vector3d.d.ts +1 -1
- package/Interactions/External/Attract/Attractor.d.ts +1 -1
- package/Interactions/External/Attract/Attractor.js +1 -1
- package/Interactions/External/Attract/index.d.ts +1 -1
- package/Interactions/External/Attract/index.js +2 -2
- package/Interactions/External/Bounce/Bouncer.d.ts +1 -1
- package/Interactions/External/Bounce/Bouncer.js +1 -1
- package/Interactions/External/Bounce/index.d.ts +1 -1
- package/Interactions/External/Bounce/index.js +2 -2
- package/Interactions/External/Bubble/Bubbler.d.ts +1 -1
- package/Interactions/External/Bubble/Bubbler.js +1 -1
- package/Interactions/External/Bubble/index.d.ts +1 -1
- package/Interactions/External/Bubble/index.js +2 -2
- package/Interactions/External/Connect/Connector.js +1 -1
- package/Interactions/External/Connect/index.d.ts +1 -1
- package/Interactions/External/Connect/index.js +2 -2
- package/Interactions/External/Grab/Grabber.d.ts +1 -1
- package/Interactions/External/Grab/Grabber.js +1 -1
- package/Interactions/External/Grab/index.d.ts +1 -1
- package/Interactions/External/Grab/index.js +2 -2
- package/Interactions/External/Repulse/Repulser.d.ts +1 -1
- package/Interactions/External/Repulse/Repulser.js +1 -1
- package/Interactions/External/Repulse/index.d.ts +1 -1
- package/Interactions/External/Repulse/index.js +2 -2
- package/Interactions/External/Trail/TrailMaker.js +1 -1
- package/Interactions/External/Trail/index.d.ts +1 -1
- package/Interactions/External/Trail/index.js +2 -2
- package/Interactions/Particles/Attract/Attractor.js +1 -1
- package/Interactions/Particles/Attract/index.d.ts +1 -1
- package/Interactions/Particles/Attract/index.js +2 -2
- package/Interactions/Particles/Collisions/index.d.ts +1 -1
- package/Interactions/Particles/Collisions/index.js +2 -2
- package/Interactions/Particles/Links/LinkParticle.d.ts +1 -1
- package/Interactions/Particles/Links/Linker.d.ts +1 -1
- package/Interactions/Particles/Links/Linker.js +1 -1
- package/Interactions/Particles/Links/index.d.ts +1 -1
- package/Interactions/Particles/Links/index.js +4 -4
- package/Interactions/Particles/Links/interaction.d.ts +1 -1
- package/Interactions/Particles/Links/interaction.js +2 -2
- package/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/Interactions/Particles/Links/plugin.js +2 -2
- package/Options/Classes/AnimatableColor.d.ts +3 -3
- package/Options/Classes/AnimatableColor.js +1 -1
- package/Options/Classes/AnimatableGradient.d.ts +6 -6
- package/Options/Classes/AnimationOptions.d.ts +2 -2
- package/Options/Classes/Background/Background.d.ts +2 -2
- package/Options/Classes/BackgroundMask/BackgroundMask.d.ts +2 -2
- package/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +2 -2
- package/Options/Classes/ColorAnimation.d.ts +1 -1
- package/Options/Classes/HslAnimation.d.ts +2 -2
- package/Options/Classes/Interactivity/Events/ClickEvent.d.ts +2 -2
- package/Options/Classes/Interactivity/Events/DivEvent.d.ts +1 -1
- package/Options/Classes/Interactivity/Events/Events.d.ts +2 -2
- package/Options/Classes/Interactivity/Events/HoverEvent.d.ts +3 -3
- package/Options/Classes/Interactivity/Events/Parallax.d.ts +1 -1
- package/Options/Classes/Interactivity/Interactivity.d.ts +2 -2
- package/Options/Classes/Interactivity/Modes/Attract.d.ts +2 -2
- package/Options/Classes/Interactivity/Modes/Bubble.d.ts +2 -2
- package/Options/Classes/Interactivity/Modes/Bubble.js +1 -1
- package/Options/Classes/Interactivity/Modes/BubbleBase.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/BubbleDiv.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/Connect.d.ts +2 -2
- package/Options/Classes/Interactivity/Modes/ConnectLinks.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/Grab.d.ts +2 -2
- package/Options/Classes/Interactivity/Modes/GrabLinks.d.ts +2 -2
- package/Options/Classes/Interactivity/Modes/Light.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/Modes.d.ts +7 -7
- package/Options/Classes/Interactivity/Modes/Modes.js +4 -4
- package/Options/Classes/Interactivity/Modes/Push.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/Remove.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/Repulse.d.ts +3 -3
- package/Options/Classes/Interactivity/Modes/Repulse.js +1 -1
- package/Options/Classes/Interactivity/Modes/RepulseBase.d.ts +2 -2
- package/Options/Classes/Interactivity/Modes/RepulseDiv.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/Slow.d.ts +1 -1
- package/Options/Classes/Interactivity/Modes/Trail.d.ts +2 -2
- package/Options/Classes/ManualParticle.d.ts +2 -2
- package/Options/Classes/Motion/Motion.d.ts +1 -1
- package/Options/Classes/Options.d.ts +7 -7
- package/Options/Classes/Options.js +7 -7
- package/Options/Classes/OptionsColor.d.ts +2 -2
- package/Options/Classes/Particles/Bounce/Bounce.d.ts +1 -1
- package/Options/Classes/Particles/Collisions/Collisions.d.ts +4 -4
- package/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +2 -2
- package/Options/Classes/Particles/Destroy/Destroy.d.ts +1 -1
- package/Options/Classes/Particles/Destroy/Split.d.ts +3 -3
- package/Options/Classes/Particles/Life/Life.d.ts +1 -1
- package/Options/Classes/Particles/Links/Links.d.ts +2 -2
- package/Options/Classes/Particles/Links/LinksShadow.d.ts +2 -2
- package/Options/Classes/Particles/Links/LinksTriangle.d.ts +1 -1
- package/Options/Classes/Particles/Move/Attract.d.ts +2 -2
- package/Options/Classes/Particles/Move/Move.d.ts +5 -5
- package/Options/Classes/Particles/Move/Move.js +3 -3
- package/Options/Classes/Particles/Move/OutModes.d.ts +2 -2
- package/Options/Classes/Particles/Move/Path/Path.d.ts +3 -3
- package/Options/Classes/Particles/Move/Spin.d.ts +3 -3
- package/Options/Classes/Particles/Move/Trail.d.ts +2 -2
- package/Options/Classes/Particles/Number/Density.d.ts +1 -1
- package/Options/Classes/Particles/Number/ParticlesNumber.d.ts +2 -2
- package/Options/Classes/Particles/Opacity/Opacity.d.ts +1 -1
- package/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +3 -3
- package/Options/Classes/Particles/Orbit/Orbit.d.ts +5 -5
- package/Options/Classes/Particles/Orbit/Orbit.js +2 -2
- package/Options/Classes/Particles/Orbit/OrbitRotation.d.ts +1 -1
- package/Options/Classes/Particles/ParticlesOptions.d.ts +16 -16
- package/Options/Classes/Particles/ParticlesOptions.js +13 -13
- package/Options/Classes/Particles/Repulse/Repulse.d.ts +1 -1
- package/Options/Classes/Particles/Roll/Roll.d.ts +2 -2
- package/Options/Classes/Particles/Roll/RollLight.d.ts +1 -1
- package/Options/Classes/Particles/Rotate/Rotate.d.ts +3 -3
- package/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +1 -1
- package/Options/Classes/Particles/Shadow.d.ts +3 -3
- package/Options/Classes/Particles/Shape/Shape.d.ts +5 -5
- package/Options/Classes/Particles/Size/Size.d.ts +2 -2
- package/Options/Classes/Particles/Size/SizeAnimation.d.ts +3 -3
- package/Options/Classes/Particles/Stroke.d.ts +2 -2
- package/Options/Classes/Particles/Tilt/Tilt.d.ts +3 -3
- package/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +1 -1
- package/Options/Classes/Particles/Twinkle/Twinkle.d.ts +1 -1
- package/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
- package/Options/Classes/Particles/Wobble/Wobble.d.ts +2 -2
- package/Options/Classes/Particles/ZIndex/ZIndex.d.ts +1 -1
- package/Options/Classes/Random.d.ts +1 -1
- package/Options/Classes/Responsive.d.ts +2 -2
- package/Options/Classes/Theme/Theme.d.ts +2 -2
- package/Options/Classes/Theme/Theme.js +1 -1
- package/Options/Classes/Theme/ThemeDefault.d.ts +2 -2
- package/Options/Classes/ValueWithRandom.d.ts +2 -2
- package/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +1 -1
- package/Options/Interfaces/IAnimatableColor.d.ts +1 -1
- package/Options/Interfaces/IAnimatableGradient.d.ts +1 -1
- package/Options/Interfaces/IColorAnimation.d.ts +1 -1
- package/Options/Interfaces/IManualParticle.d.ts +1 -1
- package/Options/Interfaces/IOptions.d.ts +6 -6
- package/Options/Interfaces/IOptionsGradient.d.ts +2 -2
- package/Options/Interfaces/IResponsive.d.ts +2 -2
- package/Options/Interfaces/IValueWithRandom.d.ts +1 -1
- package/Options/Interfaces/Interactivity/Events/IEvents.d.ts +1 -1
- package/Options/Interfaces/Interactivity/IInteractivity.d.ts +1 -1
- package/Options/Interfaces/Interactivity/Modes/IBubble.d.ts +2 -2
- package/Options/Interfaces/Interactivity/Modes/IBubbleBase.d.ts +1 -1
- package/Options/Interfaces/Interactivity/Modes/IModes.d.ts +2 -2
- package/Options/Interfaces/Interactivity/Modes/IRepulse.d.ts +2 -2
- package/Options/Interfaces/Interactivity/Modes/IRepulseDiv.d.ts +1 -1
- package/Options/Interfaces/Particles/Destroy/ISplit.d.ts +1 -1
- package/Options/Interfaces/Particles/IParticles.d.ts +14 -14
- package/Options/Interfaces/Particles/IShadow.d.ts +1 -1
- package/Options/Interfaces/Particles/IStroke.d.ts +1 -1
- package/Options/Interfaces/Particles/Links/ILinks.d.ts +1 -1
- package/Options/Interfaces/Particles/Move/IMove.d.ts +5 -5
- package/Options/Interfaces/Particles/Move/Path/{iPath.d.ts → IPath.d.ts} +0 -0
- package/Options/Interfaces/Particles/Move/Path/{iPath.js → IPath.js} +0 -0
- package/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +3 -3
- package/Options/Interfaces/Particles/Roll/IRoll.d.ts +1 -1
- package/Options/Interfaces/Particles/Rotate/IRotate.d.ts +1 -1
- package/Options/Interfaces/Particles/Shape/IShape.d.ts +3 -3
- package/Options/Interfaces/Particles/Tilt/ITilt.d.ts +1 -1
- package/Options/Interfaces/Theme/ITheme.d.ts +2 -2
- package/Plugins/Absorbers/AbsorberInstance.d.ts +5 -4
- package/Plugins/Absorbers/AbsorberInstance.js +18 -18
- package/Plugins/Absorbers/Absorbers.d.ts +3 -3
- package/Plugins/Absorbers/Absorbers.js +1 -1
- package/Plugins/Absorbers/Options/Classes/Absorber.d.ts +4 -4
- package/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -2
- package/Plugins/Absorbers/Options/Classes/AbsorberSize.js +1 -1
- package/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +2 -2
- package/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +1 -2
- package/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.d.ts +1 -1
- package/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +1 -1
- package/Plugins/Absorbers/index.d.ts +1 -1
- package/Plugins/Absorbers/index.js +3 -3
- package/Plugins/Emitters/EmitterContainer.d.ts +2 -1
- package/Plugins/Emitters/EmitterInstance.d.ts +5 -3
- package/Plugins/Emitters/EmitterInstance.js +34 -35
- package/Plugins/Emitters/Emitters.d.ts +3 -3
- package/Plugins/Emitters/Emitters.js +11 -3
- package/Plugins/Emitters/Options/Classes/Emitter.d.ts +7 -7
- package/Plugins/Emitters/Options/Classes/Emitter.js +3 -3
- package/Plugins/Emitters/Options/Classes/EmitterLife.d.ts +1 -1
- package/Plugins/Emitters/Options/Classes/EmitterRate.d.ts +1 -1
- package/Plugins/Emitters/Options/Classes/EmitterSize.d.ts +1 -1
- package/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +6 -6
- package/Plugins/Emitters/Options/Interfaces/IEmitterOptions.d.ts +1 -1
- package/Plugins/Emitters/Options/Interfaces/IEmitterSize.d.ts +1 -1
- package/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +1 -1
- package/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +1 -1
- package/Plugins/Emitters/index.d.ts +1 -1
- package/Plugins/Emitters/index.js +9 -9
- package/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +5 -5
- package/Plugins/PolygonMask/Options/Classes/PolygonMask.js +1 -1
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.d.ts +2 -2
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.js +1 -1
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.d.ts +2 -2
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +2 -2
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +3 -3
- package/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +2 -2
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +3 -3
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +1 -1
- package/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.d.ts +1 -1
- package/Plugins/PolygonMask/PolygonMaskInstance.d.ts +3 -3
- package/Plugins/PolygonMask/PolygonMaskInstance.js +12 -12
- package/Plugins/PolygonMask/Types.d.ts +1 -1
- package/Plugins/PolygonMask/index.d.ts +1 -1
- package/Plugins/PolygonMask/index.js +3 -3
- package/README.md +160 -16
- package/Shapes/Circle/index.d.ts +1 -1
- package/Shapes/Circle/index.js +2 -2
- package/Shapes/Image/index.d.ts +1 -1
- package/Shapes/Image/index.js +3 -3
- package/Shapes/Line/index.d.ts +1 -1
- package/Shapes/Line/index.js +2 -2
- package/Shapes/Polygon/PolygonDrawer.d.ts +1 -1
- package/Shapes/Polygon/TriangleDrawer.d.ts +1 -1
- package/Shapes/Polygon/index.d.ts +3 -3
- package/Shapes/Polygon/index.js +7 -7
- package/Shapes/Square/index.d.ts +1 -1
- package/Shapes/Square/index.js +3 -3
- package/Shapes/Star/index.d.ts +1 -1
- package/Shapes/Star/index.js +2 -2
- package/Shapes/Text/index.d.ts +1 -1
- package/Shapes/Text/index.js +2 -2
- package/Types/ShapeData.d.ts +1 -1
- package/Types/ShapeDrawerFunctions.d.ts +1 -1
- package/Updaters/Angle/index.d.ts +1 -1
- package/Updaters/Angle/index.js +2 -2
- package/Updaters/Color/index.d.ts +1 -1
- package/Updaters/Color/index.js +2 -2
- package/Updaters/Life/index.d.ts +1 -1
- package/Updaters/Life/index.js +2 -2
- package/Updaters/Opacity/index.d.ts +1 -1
- package/Updaters/Opacity/index.js +2 -2
- package/Updaters/OutModes/IBounceData.d.ts +1 -1
- package/Updaters/OutModes/OutOfCanvasUpdater.js +9 -9
- package/Updaters/OutModes/index.d.ts +1 -1
- package/Updaters/OutModes/index.js +2 -2
- package/Updaters/Roll/index.d.ts +1 -1
- package/Updaters/Roll/index.js +2 -2
- package/Updaters/Size/index.d.ts +1 -1
- package/Updaters/Size/index.js +2 -2
- package/Updaters/StrokeColor/index.d.ts +1 -1
- package/Updaters/StrokeColor/index.js +2 -2
- package/Updaters/Tilt/index.d.ts +1 -1
- package/Updaters/Tilt/index.js +2 -2
- package/Updaters/Wobble/index.d.ts +1 -1
- package/Updaters/Wobble/index.js +2 -2
- package/Utils/CanvasUtils.d.ts +2 -3
- package/Utils/CanvasUtils.js +1 -1
- package/Utils/ColorUtils.js +1 -1
- package/Utils/NumberUtils.d.ts +2 -2
- package/Utils/Utils.d.ts +3 -3
- package/browser/Core/Canvas.d.ts +1 -1
- package/browser/Core/Canvas.js +1 -1
- package/browser/Core/Container.d.ts +5 -5
- package/browser/Core/Container.js +3 -3
- package/browser/Core/Interfaces/Gradients.d.ts +2 -2
- package/browser/Core/Interfaces/ICircleBouncer.d.ts +1 -1
- package/browser/Core/Interfaces/IContainerPlugin.d.ts +4 -4
- package/browser/Core/Interfaces/IExternalInteractor.d.ts +1 -1
- package/browser/Core/Interfaces/IInteractor.d.ts +1 -1
- package/browser/Core/Interfaces/IParticle.d.ts +8 -8
- package/browser/Core/Interfaces/IParticleGradientAnimation.d.ts +1 -1
- package/browser/Core/Interfaces/IParticleSpin.d.ts +1 -1
- package/browser/Core/Interfaces/IParticlesInteractor.d.ts +2 -2
- package/browser/Core/Interfaces/IPlugin.d.ts +1 -1
- package/browser/Core/Loader.d.ts +1 -1
- package/browser/Core/Loader.js +1 -1
- package/browser/Core/Particle.d.ts +3 -3
- package/browser/Core/Particle.js +2 -2
- package/browser/Core/Particles.d.ts +3 -3
- package/browser/Core/Particles.js +2 -2
- package/browser/Core/Utils/Circle.d.ts +1 -1
- package/browser/Core/Utils/CircleWarp.d.ts +1 -1
- package/browser/Core/Utils/CircleWarp.js +1 -1
- package/browser/Core/Utils/EventListeners.js +1 -1
- package/browser/Core/Utils/ExternalInteractorBase.d.ts +1 -1
- package/browser/Core/Utils/InteractionManager.d.ts +1 -1
- package/browser/Core/Utils/ParticlesInteractorBase.d.ts +1 -1
- package/browser/Core/Utils/ParticlesMover.d.ts +1 -1
- package/browser/Core/Utils/Plugins.d.ts +1 -1
- package/browser/Core/Utils/QuadTree.d.ts +3 -3
- package/browser/Core/Utils/QuadTree.js +1 -1
- package/browser/Core/Utils/Rectangle.d.ts +1 -1
- package/browser/Core/Utils/Vector3d.d.ts +1 -1
- package/browser/Interactions/External/Attract/Attractor.d.ts +1 -1
- package/browser/Interactions/External/Attract/Attractor.js +1 -1
- package/browser/Interactions/External/Attract/index.d.ts +1 -1
- package/browser/Interactions/External/Attract/index.js +2 -2
- package/browser/Interactions/External/Bounce/Bouncer.d.ts +1 -1
- package/browser/Interactions/External/Bounce/Bouncer.js +1 -1
- package/browser/Interactions/External/Bounce/index.d.ts +1 -1
- package/browser/Interactions/External/Bounce/index.js +2 -2
- package/browser/Interactions/External/Bubble/Bubbler.d.ts +1 -1
- package/browser/Interactions/External/Bubble/Bubbler.js +1 -1
- package/browser/Interactions/External/Bubble/index.d.ts +1 -1
- package/browser/Interactions/External/Bubble/index.js +2 -2
- package/browser/Interactions/External/Connect/Connector.js +1 -1
- package/browser/Interactions/External/Connect/index.d.ts +1 -1
- package/browser/Interactions/External/Connect/index.js +2 -2
- package/browser/Interactions/External/Grab/Grabber.d.ts +1 -1
- package/browser/Interactions/External/Grab/Grabber.js +1 -1
- package/browser/Interactions/External/Grab/index.d.ts +1 -1
- package/browser/Interactions/External/Grab/index.js +2 -2
- package/browser/Interactions/External/Repulse/Repulser.d.ts +1 -1
- package/browser/Interactions/External/Repulse/Repulser.js +1 -1
- package/browser/Interactions/External/Repulse/index.d.ts +1 -1
- package/browser/Interactions/External/Repulse/index.js +2 -2
- package/browser/Interactions/External/Trail/TrailMaker.js +1 -1
- package/browser/Interactions/External/Trail/index.d.ts +1 -1
- package/browser/Interactions/External/Trail/index.js +2 -2
- package/browser/Interactions/Particles/Attract/Attractor.js +1 -1
- package/browser/Interactions/Particles/Attract/index.d.ts +1 -1
- package/browser/Interactions/Particles/Attract/index.js +2 -2
- package/browser/Interactions/Particles/Collisions/index.d.ts +1 -1
- package/browser/Interactions/Particles/Collisions/index.js +2 -2
- package/browser/Interactions/Particles/Links/LinkParticle.d.ts +1 -1
- package/browser/Interactions/Particles/Links/Linker.d.ts +1 -1
- package/browser/Interactions/Particles/Links/Linker.js +1 -1
- package/browser/Interactions/Particles/Links/index.d.ts +1 -1
- package/browser/Interactions/Particles/Links/index.js +4 -4
- package/browser/Interactions/Particles/Links/interaction.d.ts +1 -1
- package/browser/Interactions/Particles/Links/interaction.js +2 -2
- package/browser/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/browser/Interactions/Particles/Links/plugin.js +2 -2
- package/browser/Options/Classes/AnimatableColor.d.ts +3 -3
- package/browser/Options/Classes/AnimatableColor.js +1 -1
- package/browser/Options/Classes/AnimatableGradient.d.ts +6 -6
- package/browser/Options/Classes/AnimationOptions.d.ts +2 -2
- package/browser/Options/Classes/Background/Background.d.ts +2 -2
- package/browser/Options/Classes/BackgroundMask/BackgroundMask.d.ts +2 -2
- package/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +2 -2
- package/browser/Options/Classes/ColorAnimation.d.ts +1 -1
- package/browser/Options/Classes/HslAnimation.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Events/ClickEvent.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Events/DivEvent.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Events/Events.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Events/HoverEvent.d.ts +3 -3
- package/browser/Options/Classes/Interactivity/Events/Parallax.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Interactivity.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Modes/Attract.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Modes/Bubble.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Modes/Bubble.js +1 -1
- package/browser/Options/Classes/Interactivity/Modes/BubbleBase.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/BubbleDiv.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Connect.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Modes/ConnectLinks.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Grab.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Modes/GrabLinks.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Modes/Light.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Modes.d.ts +7 -7
- package/browser/Options/Classes/Interactivity/Modes/Modes.js +4 -4
- package/browser/Options/Classes/Interactivity/Modes/Push.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Remove.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Repulse.d.ts +3 -3
- package/browser/Options/Classes/Interactivity/Modes/Repulse.js +1 -1
- package/browser/Options/Classes/Interactivity/Modes/RepulseBase.d.ts +2 -2
- package/browser/Options/Classes/Interactivity/Modes/RepulseDiv.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Slow.d.ts +1 -1
- package/browser/Options/Classes/Interactivity/Modes/Trail.d.ts +2 -2
- package/browser/Options/Classes/ManualParticle.d.ts +2 -2
- package/browser/Options/Classes/Motion/Motion.d.ts +1 -1
- package/browser/Options/Classes/Options.d.ts +7 -7
- package/browser/Options/Classes/Options.js +7 -7
- package/browser/Options/Classes/OptionsColor.d.ts +2 -2
- package/browser/Options/Classes/Particles/Bounce/Bounce.d.ts +1 -1
- package/browser/Options/Classes/Particles/Collisions/Collisions.d.ts +4 -4
- package/browser/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +2 -2
- package/browser/Options/Classes/Particles/Destroy/Destroy.d.ts +1 -1
- package/browser/Options/Classes/Particles/Destroy/Split.d.ts +3 -3
- package/browser/Options/Classes/Particles/Life/Life.d.ts +1 -1
- package/browser/Options/Classes/Particles/Links/Links.d.ts +2 -2
- package/browser/Options/Classes/Particles/Links/LinksShadow.d.ts +2 -2
- package/browser/Options/Classes/Particles/Links/LinksTriangle.d.ts +1 -1
- package/browser/Options/Classes/Particles/Move/Attract.d.ts +2 -2
- package/browser/Options/Classes/Particles/Move/Move.d.ts +5 -5
- package/browser/Options/Classes/Particles/Move/Move.js +3 -3
- package/browser/Options/Classes/Particles/Move/OutModes.d.ts +2 -2
- package/browser/Options/Classes/Particles/Move/Path/Path.d.ts +3 -3
- package/browser/Options/Classes/Particles/Move/Spin.d.ts +3 -3
- package/browser/Options/Classes/Particles/Move/Trail.d.ts +2 -2
- package/browser/Options/Classes/Particles/Number/Density.d.ts +1 -1
- package/browser/Options/Classes/Particles/Number/ParticlesNumber.d.ts +2 -2
- package/browser/Options/Classes/Particles/Opacity/Opacity.d.ts +1 -1
- package/browser/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +3 -3
- package/browser/Options/Classes/Particles/Orbit/Orbit.d.ts +5 -5
- package/browser/Options/Classes/Particles/Orbit/Orbit.js +2 -2
- package/browser/Options/Classes/Particles/Orbit/OrbitRotation.d.ts +1 -1
- package/browser/Options/Classes/Particles/ParticlesOptions.d.ts +16 -16
- package/browser/Options/Classes/Particles/ParticlesOptions.js +13 -13
- package/browser/Options/Classes/Particles/Repulse/Repulse.d.ts +1 -1
- package/browser/Options/Classes/Particles/Roll/Roll.d.ts +2 -2
- package/browser/Options/Classes/Particles/Roll/RollLight.d.ts +1 -1
- package/browser/Options/Classes/Particles/Rotate/Rotate.d.ts +3 -3
- package/browser/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +1 -1
- package/browser/Options/Classes/Particles/Shadow.d.ts +3 -3
- package/browser/Options/Classes/Particles/Shape/Shape.d.ts +5 -5
- package/browser/Options/Classes/Particles/Size/Size.d.ts +2 -2
- package/browser/Options/Classes/Particles/Size/SizeAnimation.d.ts +3 -3
- package/browser/Options/Classes/Particles/Stroke.d.ts +2 -2
- package/browser/Options/Classes/Particles/Tilt/Tilt.d.ts +3 -3
- package/browser/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +1 -1
- package/browser/Options/Classes/Particles/Twinkle/Twinkle.d.ts +1 -1
- package/browser/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
- package/browser/Options/Classes/Particles/Wobble/Wobble.d.ts +2 -2
- package/browser/Options/Classes/Particles/ZIndex/ZIndex.d.ts +1 -1
- package/browser/Options/Classes/Random.d.ts +1 -1
- package/browser/Options/Classes/Responsive.d.ts +2 -2
- package/browser/Options/Classes/Theme/Theme.d.ts +2 -2
- package/browser/Options/Classes/Theme/Theme.js +1 -1
- package/browser/Options/Classes/Theme/ThemeDefault.d.ts +2 -2
- package/browser/Options/Classes/ValueWithRandom.d.ts +2 -2
- package/browser/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +1 -1
- package/browser/Options/Interfaces/IAnimatableColor.d.ts +1 -1
- package/browser/Options/Interfaces/IAnimatableGradient.d.ts +1 -1
- package/browser/Options/Interfaces/IColorAnimation.d.ts +1 -1
- package/browser/Options/Interfaces/IColorAnimation.js +0 -4
- package/browser/Options/Interfaces/IManualParticle.d.ts +1 -1
- package/browser/Options/Interfaces/IOptions.d.ts +6 -6
- package/browser/Options/Interfaces/IOptionsGradient.d.ts +2 -2
- package/browser/Options/Interfaces/IResponsive.d.ts +2 -2
- package/browser/Options/Interfaces/IValueWithRandom.d.ts +1 -1
- package/browser/Options/Interfaces/Interactivity/Events/IEvents.d.ts +1 -1
- package/browser/Options/Interfaces/Interactivity/IInteractivity.d.ts +1 -1
- package/browser/Options/Interfaces/Interactivity/Modes/IBubble.d.ts +2 -2
- package/browser/Options/Interfaces/Interactivity/Modes/IBubbleBase.d.ts +1 -1
- package/browser/Options/Interfaces/Interactivity/Modes/IModes.d.ts +2 -2
- package/browser/Options/Interfaces/Interactivity/Modes/IRepulse.d.ts +2 -2
- package/browser/Options/Interfaces/Interactivity/Modes/IRepulseDiv.d.ts +1 -1
- package/browser/Options/Interfaces/Particles/Destroy/ISplit.d.ts +1 -1
- package/browser/Options/Interfaces/Particles/IParticles.d.ts +14 -14
- package/browser/Options/Interfaces/Particles/IShadow.d.ts +1 -1
- package/browser/Options/Interfaces/Particles/IStroke.d.ts +1 -1
- package/browser/Options/Interfaces/Particles/Links/ILinks.d.ts +1 -1
- package/browser/Options/Interfaces/Particles/Move/IMove.d.ts +5 -5
- package/browser/Options/Interfaces/Particles/Move/Path/{iPath.d.ts → IPath.d.ts} +0 -0
- package/browser/Options/Interfaces/Particles/Move/Path/{iPath.js → IPath.js} +0 -0
- package/browser/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +3 -3
- package/browser/Options/Interfaces/Particles/Roll/IRoll.d.ts +1 -1
- package/browser/Options/Interfaces/Particles/Rotate/IRotate.d.ts +1 -1
- package/browser/Options/Interfaces/Particles/Shape/IShape.d.ts +3 -3
- package/browser/Options/Interfaces/Particles/Tilt/ITilt.d.ts +1 -1
- package/browser/Options/Interfaces/Theme/ITheme.d.ts +2 -2
- package/browser/Plugins/Absorbers/AbsorberInstance.d.ts +5 -4
- package/browser/Plugins/Absorbers/AbsorberInstance.js +18 -18
- package/browser/Plugins/Absorbers/Absorbers.d.ts +3 -3
- package/browser/Plugins/Absorbers/Absorbers.js +1 -1
- package/browser/Plugins/Absorbers/Options/Classes/Absorber.d.ts +4 -4
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -2
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSize.js +1 -1
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +2 -2
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +1 -2
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.d.ts +1 -1
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +1 -1
- package/browser/Plugins/Absorbers/index.d.ts +1 -1
- package/browser/Plugins/Absorbers/index.js +3 -3
- package/browser/Plugins/Emitters/EmitterContainer.d.ts +2 -1
- package/browser/Plugins/Emitters/EmitterInstance.d.ts +5 -3
- package/browser/Plugins/Emitters/EmitterInstance.js +34 -35
- package/browser/Plugins/Emitters/Emitters.d.ts +3 -3
- package/browser/Plugins/Emitters/Emitters.js +11 -3
- package/browser/Plugins/Emitters/Options/Classes/Emitter.d.ts +7 -7
- package/browser/Plugins/Emitters/Options/Classes/Emitter.js +3 -3
- package/browser/Plugins/Emitters/Options/Classes/EmitterLife.d.ts +1 -1
- package/browser/Plugins/Emitters/Options/Classes/EmitterRate.d.ts +1 -1
- package/browser/Plugins/Emitters/Options/Classes/EmitterSize.d.ts +1 -1
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +6 -6
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitterOptions.d.ts +1 -1
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitterSize.d.ts +1 -1
- package/browser/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +1 -1
- package/browser/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +1 -1
- package/browser/Plugins/Emitters/index.d.ts +1 -1
- package/browser/Plugins/Emitters/index.js +9 -9
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +5 -5
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMask.js +1 -1
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.d.ts +2 -2
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.js +1 -1
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.d.ts +2 -2
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +2 -2
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +3 -3
- package/browser/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +2 -2
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +3 -3
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +1 -1
- package/browser/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.d.ts +1 -1
- package/browser/Plugins/PolygonMask/PolygonMaskInstance.d.ts +3 -3
- package/browser/Plugins/PolygonMask/PolygonMaskInstance.js +2 -2
- package/browser/Plugins/PolygonMask/Types.d.ts +1 -1
- package/browser/Plugins/PolygonMask/index.d.ts +1 -1
- package/browser/Plugins/PolygonMask/index.js +3 -3
- package/browser/Shapes/Circle/index.d.ts +1 -1
- package/browser/Shapes/Circle/index.js +2 -2
- package/browser/Shapes/Image/index.d.ts +1 -1
- package/browser/Shapes/Image/index.js +3 -3
- package/browser/Shapes/Line/index.d.ts +1 -1
- package/browser/Shapes/Line/index.js +2 -2
- package/browser/Shapes/Polygon/PolygonDrawer.d.ts +1 -1
- package/browser/Shapes/Polygon/TriangleDrawer.d.ts +1 -1
- package/browser/Shapes/Polygon/index.d.ts +3 -3
- package/browser/Shapes/Polygon/index.js +7 -7
- package/browser/Shapes/Square/index.d.ts +1 -1
- package/browser/Shapes/Square/index.js +3 -3
- package/browser/Shapes/Star/index.d.ts +1 -1
- package/browser/Shapes/Star/index.js +2 -2
- package/browser/Shapes/Text/index.d.ts +1 -1
- package/browser/Shapes/Text/index.js +3 -3
- package/browser/Types/ShapeData.d.ts +1 -1
- package/browser/Types/ShapeDrawerFunctions.d.ts +1 -1
- package/browser/Updaters/Angle/index.d.ts +1 -1
- package/browser/Updaters/Angle/index.js +2 -2
- package/browser/Updaters/Color/index.d.ts +1 -1
- package/browser/Updaters/Color/index.js +2 -2
- package/browser/Updaters/Life/index.d.ts +1 -1
- package/browser/Updaters/Life/index.js +2 -2
- package/browser/Updaters/Opacity/index.d.ts +1 -1
- package/browser/Updaters/Opacity/index.js +2 -2
- package/browser/Updaters/OutModes/IBounceData.d.ts +1 -1
- package/browser/Updaters/OutModes/OutOfCanvasUpdater.js +1 -1
- package/browser/Updaters/OutModes/index.d.ts +1 -1
- package/browser/Updaters/OutModes/index.js +2 -2
- package/browser/Updaters/Roll/index.d.ts +1 -1
- package/browser/Updaters/Roll/index.js +2 -2
- package/browser/Updaters/Size/index.d.ts +1 -1
- package/browser/Updaters/Size/index.js +2 -2
- package/browser/Updaters/StrokeColor/index.d.ts +1 -1
- package/browser/Updaters/StrokeColor/index.js +2 -2
- package/browser/Updaters/Tilt/index.d.ts +1 -1
- package/browser/Updaters/Tilt/index.js +2 -2
- package/browser/Updaters/Wobble/index.d.ts +1 -1
- package/browser/Updaters/Wobble/index.js +2 -2
- package/browser/Utils/CanvasUtils.d.ts +2 -3
- package/browser/Utils/CanvasUtils.js +1 -1
- package/browser/Utils/ColorUtils.js +1 -1
- package/browser/Utils/NumberUtils.d.ts +2 -2
- package/browser/Utils/Utils.d.ts +3 -3
- package/browser/Utils/Utils.js +1 -1
- package/browser/engine.d.ts +2 -2
- package/browser/full.d.ts +1 -1
- package/browser/full.js +14 -14
- package/browser/index.d.ts +1 -1
- package/browser/index.engine.d.ts +1 -1
- package/browser/index.engine.js +1 -1
- package/browser/index.js +1 -1
- package/browser/index.slim.d.ts +1 -1
- package/browser/index.slim.js +1 -1
- package/browser/pjs.d.ts +1 -1
- package/browser/slim.d.ts +1 -1
- package/browser/slim.js +40 -40
- package/engine.d.ts +2 -2
- package/esm/Core/Canvas.d.ts +1 -1
- package/esm/Core/Canvas.js +1 -1
- package/esm/Core/Container.d.ts +5 -5
- package/esm/Core/Container.js +3 -3
- package/esm/Core/Interfaces/Gradients.d.ts +2 -2
- package/esm/Core/Interfaces/ICircleBouncer.d.ts +1 -1
- package/esm/Core/Interfaces/IContainerPlugin.d.ts +4 -4
- package/esm/Core/Interfaces/IExternalInteractor.d.ts +1 -1
- package/esm/Core/Interfaces/IInteractor.d.ts +1 -1
- package/esm/Core/Interfaces/IParticle.d.ts +8 -8
- package/esm/Core/Interfaces/IParticleGradientAnimation.d.ts +1 -1
- package/esm/Core/Interfaces/IParticleSpin.d.ts +1 -1
- package/esm/Core/Interfaces/IParticlesInteractor.d.ts +2 -2
- package/esm/Core/Interfaces/IPlugin.d.ts +1 -1
- package/esm/Core/Loader.d.ts +1 -1
- package/esm/Core/Loader.js +1 -1
- package/esm/Core/Particle.d.ts +3 -3
- package/esm/Core/Particle.js +2 -2
- package/esm/Core/Particles.d.ts +3 -3
- package/esm/Core/Particles.js +2 -2
- package/esm/Core/Utils/Circle.d.ts +1 -1
- package/esm/Core/Utils/CircleWarp.d.ts +1 -1
- package/esm/Core/Utils/CircleWarp.js +1 -1
- package/esm/Core/Utils/EventListeners.js +1 -1
- package/esm/Core/Utils/ExternalInteractorBase.d.ts +1 -1
- package/esm/Core/Utils/InteractionManager.d.ts +1 -1
- package/esm/Core/Utils/ParticlesInteractorBase.d.ts +1 -1
- package/esm/Core/Utils/ParticlesMover.d.ts +1 -1
- package/esm/Core/Utils/Plugins.d.ts +1 -1
- package/esm/Core/Utils/QuadTree.d.ts +3 -3
- package/esm/Core/Utils/QuadTree.js +1 -1
- package/esm/Core/Utils/Rectangle.d.ts +1 -1
- package/esm/Core/Utils/Vector3d.d.ts +1 -1
- package/esm/Interactions/External/Attract/Attractor.d.ts +1 -1
- package/esm/Interactions/External/Attract/Attractor.js +1 -1
- package/esm/Interactions/External/Attract/index.d.ts +1 -1
- package/esm/Interactions/External/Attract/index.js +2 -2
- package/esm/Interactions/External/Bounce/Bouncer.d.ts +1 -1
- package/esm/Interactions/External/Bounce/Bouncer.js +1 -1
- package/esm/Interactions/External/Bounce/index.d.ts +1 -1
- package/esm/Interactions/External/Bounce/index.js +2 -2
- package/esm/Interactions/External/Bubble/Bubbler.d.ts +1 -1
- package/esm/Interactions/External/Bubble/Bubbler.js +1 -1
- package/esm/Interactions/External/Bubble/index.d.ts +1 -1
- package/esm/Interactions/External/Bubble/index.js +2 -2
- package/esm/Interactions/External/Connect/Connector.js +1 -1
- package/esm/Interactions/External/Connect/index.d.ts +1 -1
- package/esm/Interactions/External/Connect/index.js +2 -2
- package/esm/Interactions/External/Grab/Grabber.d.ts +1 -1
- package/esm/Interactions/External/Grab/Grabber.js +1 -1
- package/esm/Interactions/External/Grab/index.d.ts +1 -1
- package/esm/Interactions/External/Grab/index.js +2 -2
- package/esm/Interactions/External/Repulse/Repulser.d.ts +1 -1
- package/esm/Interactions/External/Repulse/Repulser.js +1 -1
- package/esm/Interactions/External/Repulse/index.d.ts +1 -1
- package/esm/Interactions/External/Repulse/index.js +2 -2
- package/esm/Interactions/External/Trail/TrailMaker.js +1 -1
- package/esm/Interactions/External/Trail/index.d.ts +1 -1
- package/esm/Interactions/External/Trail/index.js +2 -2
- package/esm/Interactions/Particles/Attract/Attractor.js +1 -1
- package/esm/Interactions/Particles/Attract/index.d.ts +1 -1
- package/esm/Interactions/Particles/Attract/index.js +2 -2
- package/esm/Interactions/Particles/Collisions/index.d.ts +1 -1
- package/esm/Interactions/Particles/Collisions/index.js +2 -2
- package/esm/Interactions/Particles/Links/LinkParticle.d.ts +1 -1
- package/esm/Interactions/Particles/Links/Linker.d.ts +1 -1
- package/esm/Interactions/Particles/Links/Linker.js +1 -1
- package/esm/Interactions/Particles/Links/index.d.ts +1 -1
- package/esm/Interactions/Particles/Links/index.js +4 -4
- package/esm/Interactions/Particles/Links/interaction.d.ts +1 -1
- package/esm/Interactions/Particles/Links/interaction.js +2 -2
- package/esm/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/esm/Interactions/Particles/Links/plugin.js +2 -2
- package/esm/Options/Classes/AnimatableColor.d.ts +3 -3
- package/esm/Options/Classes/AnimatableColor.js +1 -1
- package/esm/Options/Classes/AnimatableGradient.d.ts +6 -6
- package/esm/Options/Classes/AnimationOptions.d.ts +2 -2
- package/esm/Options/Classes/Background/Background.d.ts +2 -2
- package/esm/Options/Classes/BackgroundMask/BackgroundMask.d.ts +2 -2
- package/esm/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +2 -2
- package/esm/Options/Classes/ColorAnimation.d.ts +1 -1
- package/esm/Options/Classes/HslAnimation.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Events/ClickEvent.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Events/DivEvent.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Events/Events.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Events/HoverEvent.d.ts +3 -3
- package/esm/Options/Classes/Interactivity/Events/Parallax.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Interactivity.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Modes/Attract.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Modes/Bubble.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Modes/Bubble.js +1 -1
- package/esm/Options/Classes/Interactivity/Modes/BubbleBase.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/BubbleDiv.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Connect.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Modes/ConnectLinks.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Grab.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Modes/GrabLinks.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Modes/Light.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Modes.d.ts +7 -7
- package/esm/Options/Classes/Interactivity/Modes/Modes.js +4 -4
- package/esm/Options/Classes/Interactivity/Modes/Push.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Remove.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Repulse.d.ts +3 -3
- package/esm/Options/Classes/Interactivity/Modes/Repulse.js +1 -1
- package/esm/Options/Classes/Interactivity/Modes/RepulseBase.d.ts +2 -2
- package/esm/Options/Classes/Interactivity/Modes/RepulseDiv.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Slow.d.ts +1 -1
- package/esm/Options/Classes/Interactivity/Modes/Trail.d.ts +2 -2
- package/esm/Options/Classes/ManualParticle.d.ts +2 -2
- package/esm/Options/Classes/Motion/Motion.d.ts +1 -1
- package/esm/Options/Classes/Options.d.ts +7 -7
- package/esm/Options/Classes/Options.js +7 -7
- package/esm/Options/Classes/OptionsColor.d.ts +2 -2
- package/esm/Options/Classes/Particles/Bounce/Bounce.d.ts +1 -1
- package/esm/Options/Classes/Particles/Collisions/Collisions.d.ts +4 -4
- package/esm/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +2 -2
- package/esm/Options/Classes/Particles/Destroy/Destroy.d.ts +1 -1
- package/esm/Options/Classes/Particles/Destroy/Split.d.ts +3 -3
- package/esm/Options/Classes/Particles/Life/Life.d.ts +1 -1
- package/esm/Options/Classes/Particles/Links/Links.d.ts +2 -2
- package/esm/Options/Classes/Particles/Links/LinksShadow.d.ts +2 -2
- package/esm/Options/Classes/Particles/Links/LinksTriangle.d.ts +1 -1
- package/esm/Options/Classes/Particles/Move/Attract.d.ts +2 -2
- package/esm/Options/Classes/Particles/Move/Move.d.ts +5 -5
- package/esm/Options/Classes/Particles/Move/Move.js +3 -3
- package/esm/Options/Classes/Particles/Move/OutModes.d.ts +2 -2
- package/esm/Options/Classes/Particles/Move/Path/Path.d.ts +3 -3
- package/esm/Options/Classes/Particles/Move/Spin.d.ts +3 -3
- package/esm/Options/Classes/Particles/Move/Trail.d.ts +2 -2
- package/esm/Options/Classes/Particles/Number/Density.d.ts +1 -1
- package/esm/Options/Classes/Particles/Number/ParticlesNumber.d.ts +2 -2
- package/esm/Options/Classes/Particles/Opacity/Opacity.d.ts +1 -1
- package/esm/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +3 -3
- package/esm/Options/Classes/Particles/Orbit/Orbit.d.ts +5 -5
- package/esm/Options/Classes/Particles/Orbit/Orbit.js +2 -2
- package/esm/Options/Classes/Particles/Orbit/OrbitRotation.d.ts +1 -1
- package/esm/Options/Classes/Particles/ParticlesOptions.d.ts +16 -16
- package/esm/Options/Classes/Particles/ParticlesOptions.js +13 -13
- package/esm/Options/Classes/Particles/Repulse/Repulse.d.ts +1 -1
- package/esm/Options/Classes/Particles/Roll/Roll.d.ts +2 -2
- package/esm/Options/Classes/Particles/Roll/RollLight.d.ts +1 -1
- package/esm/Options/Classes/Particles/Rotate/Rotate.d.ts +3 -3
- package/esm/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +1 -1
- package/esm/Options/Classes/Particles/Shadow.d.ts +3 -3
- package/esm/Options/Classes/Particles/Shape/Shape.d.ts +5 -5
- package/esm/Options/Classes/Particles/Size/Size.d.ts +2 -2
- package/esm/Options/Classes/Particles/Size/SizeAnimation.d.ts +3 -3
- package/esm/Options/Classes/Particles/Stroke.d.ts +2 -2
- package/esm/Options/Classes/Particles/Tilt/Tilt.d.ts +3 -3
- package/esm/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +1 -1
- package/esm/Options/Classes/Particles/Twinkle/Twinkle.d.ts +1 -1
- package/esm/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
- package/esm/Options/Classes/Particles/Wobble/Wobble.d.ts +2 -2
- package/esm/Options/Classes/Particles/ZIndex/ZIndex.d.ts +1 -1
- package/esm/Options/Classes/Random.d.ts +1 -1
- package/esm/Options/Classes/Responsive.d.ts +2 -2
- package/esm/Options/Classes/Theme/Theme.d.ts +2 -2
- package/esm/Options/Classes/Theme/Theme.js +1 -1
- package/esm/Options/Classes/Theme/ThemeDefault.d.ts +2 -2
- package/esm/Options/Classes/ValueWithRandom.d.ts +2 -2
- package/esm/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +1 -1
- package/esm/Options/Interfaces/IAnimatableColor.d.ts +1 -1
- package/esm/Options/Interfaces/IAnimatableGradient.d.ts +1 -1
- package/esm/Options/Interfaces/IColorAnimation.d.ts +1 -1
- package/esm/Options/Interfaces/IManualParticle.d.ts +1 -1
- package/esm/Options/Interfaces/IOptions.d.ts +6 -6
- package/esm/Options/Interfaces/IOptionsGradient.d.ts +2 -2
- package/esm/Options/Interfaces/IResponsive.d.ts +2 -2
- package/esm/Options/Interfaces/IValueWithRandom.d.ts +1 -1
- package/esm/Options/Interfaces/Interactivity/Events/IEvents.d.ts +1 -1
- package/esm/Options/Interfaces/Interactivity/IInteractivity.d.ts +1 -1
- package/esm/Options/Interfaces/Interactivity/Modes/IBubble.d.ts +2 -2
- package/esm/Options/Interfaces/Interactivity/Modes/IBubbleBase.d.ts +1 -1
- package/esm/Options/Interfaces/Interactivity/Modes/IModes.d.ts +2 -2
- package/esm/Options/Interfaces/Interactivity/Modes/IRepulse.d.ts +2 -2
- package/esm/Options/Interfaces/Interactivity/Modes/IRepulseDiv.d.ts +1 -1
- package/esm/Options/Interfaces/Particles/Destroy/ISplit.d.ts +1 -1
- package/esm/Options/Interfaces/Particles/IParticles.d.ts +14 -14
- package/esm/Options/Interfaces/Particles/IShadow.d.ts +1 -1
- package/esm/Options/Interfaces/Particles/IStroke.d.ts +1 -1
- package/esm/Options/Interfaces/Particles/Links/ILinks.d.ts +1 -1
- package/esm/Options/Interfaces/Particles/Move/IMove.d.ts +5 -5
- package/esm/Options/Interfaces/Particles/Move/Path/{iPath.d.ts → IPath.d.ts} +0 -0
- package/esm/Options/Interfaces/Particles/Move/Path/{iPath.js → IPath.js} +0 -0
- package/esm/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +3 -3
- package/esm/Options/Interfaces/Particles/Roll/IRoll.d.ts +1 -1
- package/esm/Options/Interfaces/Particles/Rotate/IRotate.d.ts +1 -1
- package/esm/Options/Interfaces/Particles/Shape/IShape.d.ts +3 -3
- package/esm/Options/Interfaces/Particles/Tilt/ITilt.d.ts +1 -1
- package/esm/Options/Interfaces/Theme/ITheme.d.ts +2 -2
- package/esm/Plugins/Absorbers/AbsorberInstance.d.ts +5 -4
- package/esm/Plugins/Absorbers/AbsorberInstance.js +18 -18
- package/esm/Plugins/Absorbers/Absorbers.d.ts +3 -3
- package/esm/Plugins/Absorbers/Absorbers.js +1 -1
- package/esm/Plugins/Absorbers/Options/Classes/Absorber.d.ts +4 -4
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -2
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSize.js +1 -1
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +2 -2
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +1 -2
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.d.ts +1 -1
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +1 -1
- package/esm/Plugins/Absorbers/index.d.ts +1 -1
- package/esm/Plugins/Absorbers/index.js +3 -3
- package/esm/Plugins/Emitters/EmitterContainer.d.ts +2 -1
- package/esm/Plugins/Emitters/EmitterInstance.d.ts +5 -3
- package/esm/Plugins/Emitters/EmitterInstance.js +34 -35
- package/esm/Plugins/Emitters/Emitters.d.ts +3 -3
- package/esm/Plugins/Emitters/Emitters.js +11 -3
- package/esm/Plugins/Emitters/Options/Classes/Emitter.d.ts +7 -7
- package/esm/Plugins/Emitters/Options/Classes/Emitter.js +3 -3
- package/esm/Plugins/Emitters/Options/Classes/EmitterLife.d.ts +1 -1
- package/esm/Plugins/Emitters/Options/Classes/EmitterRate.d.ts +1 -1
- package/esm/Plugins/Emitters/Options/Classes/EmitterSize.d.ts +1 -1
- package/esm/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +6 -6
- package/esm/Plugins/Emitters/Options/Interfaces/IEmitterOptions.d.ts +1 -1
- package/esm/Plugins/Emitters/Options/Interfaces/IEmitterSize.d.ts +1 -1
- package/esm/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +1 -1
- package/esm/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +1 -1
- package/esm/Plugins/Emitters/index.d.ts +1 -1
- package/esm/Plugins/Emitters/index.js +9 -9
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +5 -5
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMask.js +1 -1
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.d.ts +2 -2
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.js +1 -1
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.d.ts +2 -2
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +2 -2
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +3 -3
- package/esm/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +2 -2
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +3 -3
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +1 -1
- package/esm/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.d.ts +1 -1
- package/esm/Plugins/PolygonMask/PolygonMaskInstance.d.ts +3 -3
- package/esm/Plugins/PolygonMask/PolygonMaskInstance.js +2 -2
- package/esm/Plugins/PolygonMask/Types.d.ts +1 -1
- package/esm/Plugins/PolygonMask/index.d.ts +1 -1
- package/esm/Plugins/PolygonMask/index.js +3 -3
- package/esm/Shapes/Circle/index.d.ts +1 -1
- package/esm/Shapes/Circle/index.js +2 -2
- package/esm/Shapes/Image/index.d.ts +1 -1
- package/esm/Shapes/Image/index.js +3 -3
- package/esm/Shapes/Line/index.d.ts +1 -1
- package/esm/Shapes/Line/index.js +2 -2
- package/esm/Shapes/Polygon/PolygonDrawer.d.ts +1 -1
- package/esm/Shapes/Polygon/TriangleDrawer.d.ts +1 -1
- package/esm/Shapes/Polygon/index.d.ts +3 -3
- package/esm/Shapes/Polygon/index.js +7 -7
- package/esm/Shapes/Square/index.d.ts +1 -1
- package/esm/Shapes/Square/index.js +3 -3
- package/esm/Shapes/Star/index.d.ts +1 -1
- package/esm/Shapes/Star/index.js +2 -2
- package/esm/Shapes/Text/index.d.ts +1 -1
- package/esm/Shapes/Text/index.js +3 -3
- package/esm/Types/ShapeData.d.ts +1 -1
- package/esm/Types/ShapeDrawerFunctions.d.ts +1 -1
- package/esm/Updaters/Angle/index.d.ts +1 -1
- package/esm/Updaters/Angle/index.js +2 -2
- package/esm/Updaters/Color/index.d.ts +1 -1
- package/esm/Updaters/Color/index.js +2 -2
- package/esm/Updaters/Life/index.d.ts +1 -1
- package/esm/Updaters/Life/index.js +2 -2
- package/esm/Updaters/Opacity/index.d.ts +1 -1
- package/esm/Updaters/Opacity/index.js +2 -2
- package/esm/Updaters/OutModes/IBounceData.d.ts +1 -1
- package/esm/Updaters/OutModes/OutOfCanvasUpdater.js +1 -1
- package/esm/Updaters/OutModes/index.d.ts +1 -1
- package/esm/Updaters/OutModes/index.js +2 -2
- package/esm/Updaters/Roll/index.d.ts +1 -1
- package/esm/Updaters/Roll/index.js +2 -2
- package/esm/Updaters/Size/index.d.ts +1 -1
- package/esm/Updaters/Size/index.js +2 -2
- package/esm/Updaters/StrokeColor/index.d.ts +1 -1
- package/esm/Updaters/StrokeColor/index.js +2 -2
- package/esm/Updaters/Tilt/index.d.ts +1 -1
- package/esm/Updaters/Tilt/index.js +2 -2
- package/esm/Updaters/Wobble/index.d.ts +1 -1
- package/esm/Updaters/Wobble/index.js +2 -2
- package/esm/Utils/CanvasUtils.d.ts +2 -3
- package/esm/Utils/CanvasUtils.js +1 -1
- package/esm/Utils/ColorUtils.js +1 -1
- package/esm/Utils/NumberUtils.d.ts +2 -2
- package/esm/Utils/Utils.d.ts +3 -3
- package/esm/Utils/Utils.js +1 -1
- package/esm/engine.d.ts +2 -2
- package/esm/full.d.ts +1 -1
- package/esm/full.js +14 -14
- package/esm/index.d.ts +1 -1
- package/esm/index.engine.d.ts +1 -1
- package/esm/index.engine.js +1 -1
- package/esm/index.js +1 -1
- package/esm/index.slim.d.ts +1 -1
- package/esm/index.slim.js +1 -1
- package/esm/pjs.d.ts +1 -1
- package/esm/slim.d.ts +1 -1
- package/esm/slim.js +40 -40
- package/full.d.ts +1 -1
- package/full.js +14 -14
- package/index.d.ts +1 -1
- package/index.engine.d.ts +1 -1
- package/index.engine.js +1 -1
- package/index.js +1 -1
- package/index.slim.d.ts +1 -1
- package/index.slim.js +1 -1
- package/package.json +1 -1
- package/pjs.d.ts +1 -1
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/slim.d.ts +1 -1
- package/slim.js +40 -40
- package/tsparticles.engine.js +2359 -2359
- package/tsparticles.engine.min.js +2 -2
- package/tsparticles.interaction.external.attract.js +3943 -3943
- package/tsparticles.interaction.external.attract.min.js +2 -2
- package/tsparticles.interaction.external.bounce.js +4058 -4058
- package/tsparticles.interaction.external.bounce.min.js +2 -2
- package/tsparticles.interaction.external.bubble.js +3886 -3886
- package/tsparticles.interaction.external.bubble.min.js +2 -2
- package/tsparticles.interaction.external.connect.js +4040 -4040
- package/tsparticles.interaction.external.connect.min.js +2 -2
- package/tsparticles.interaction.external.grab.js +4040 -4040
- package/tsparticles.interaction.external.grab.min.js +2 -2
- package/tsparticles.interaction.external.repulse.js +4058 -4058
- package/tsparticles.interaction.external.repulse.min.js +2 -2
- package/tsparticles.interaction.external.trail.js +4040 -4040
- package/tsparticles.interaction.external.trail.min.js +2 -2
- package/tsparticles.interaction.particles.attract.js +4042 -4042
- package/tsparticles.interaction.particles.attract.min.js +2 -2
- package/tsparticles.interaction.particles.collisions.js +882 -882
- package/tsparticles.interaction.particles.collisions.min.js +1 -1
- package/tsparticles.interaction.particles.links.js +4002 -4002
- package/tsparticles.interaction.particles.links.min.js +2 -2
- package/tsparticles.js +6215 -6209
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.min.js +1 -1
- package/tsparticles.plugins.absorbers.js +1027 -1028
- package/tsparticles.plugins.absorbers.min.js +2 -2
- package/tsparticles.plugins.emitters.js +1636 -1629
- package/tsparticles.plugins.emitters.min.js +2 -2
- package/tsparticles.plugins.polygonMask.js +2620 -2620
- package/tsparticles.plugins.polygonMask.min.js +2 -2
- package/tsparticles.shape.circle.js +2 -2
- package/tsparticles.shape.circle.min.js +1 -1
- package/tsparticles.shape.image.js +883 -883
- package/tsparticles.shape.image.min.js +1 -1
- package/tsparticles.shape.line.js +2 -2
- package/tsparticles.shape.line.min.js +1 -1
- package/tsparticles.shape.polygon.js +7 -7
- package/tsparticles.shape.polygon.min.js +1 -1
- package/tsparticles.shape.square.js +3 -3
- package/tsparticles.shape.square.min.js +1 -1
- package/tsparticles.shape.star.js +2 -2
- package/tsparticles.shape.star.min.js +1 -1
- package/tsparticles.shape.text.js +882 -882
- package/tsparticles.shape.text.min.js +1 -1
- package/tsparticles.slim.js +3561 -3561
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.updater.angle.js +882 -882
- package/tsparticles.updater.angle.min.js +1 -1
- package/tsparticles.updater.color.js +882 -882
- package/tsparticles.updater.color.min.js +1 -1
- package/tsparticles.updater.life.js +882 -882
- package/tsparticles.updater.life.min.js +1 -1
- package/tsparticles.updater.opacity.js +882 -882
- package/tsparticles.updater.opacity.min.js +1 -1
- package/tsparticles.updater.outModes.js +882 -882
- package/tsparticles.updater.outModes.min.js +1 -1
- package/tsparticles.updater.roll.js +882 -882
- package/tsparticles.updater.roll.min.js +1 -1
- package/tsparticles.updater.size.js +882 -882
- package/tsparticles.updater.size.min.js +1 -1
- package/tsparticles.updater.strokeColor.js +882 -882
- package/tsparticles.updater.strokeColor.min.js +1 -1
- package/tsparticles.updater.tilt.js +882 -882
- package/tsparticles.updater.tilt.min.js +1 -1
- package/tsparticles.updater.wobble.js +882 -882
- package/tsparticles.updater.wobble.min.js +1 -1
|
@@ -11,10 +11,11 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
11
11
|
};
|
|
12
12
|
var _EmitterInstance_firstSpawn, _EmitterInstance_startParticlesAdded;
|
|
13
13
|
import { colorToHsl, deepExtend, getRangeValue, isPointInside, randomInRange } from "../../Utils";
|
|
14
|
+
import { Emitter } from "./Options/Classes/Emitter";
|
|
14
15
|
import { EmitterSize } from "./Options/Classes/EmitterSize";
|
|
15
16
|
import { ShapeManager } from "./ShapeManager";
|
|
16
17
|
export class EmitterInstance {
|
|
17
|
-
constructor(emitters, container,
|
|
18
|
+
constructor(emitters, container, options, position) {
|
|
18
19
|
var _a, _b, _c, _d, _e, _f;
|
|
19
20
|
var _g;
|
|
20
21
|
this.emitters = emitters;
|
|
@@ -25,25 +26,31 @@ export class EmitterInstance {
|
|
|
25
26
|
this.currentEmitDelay = 0;
|
|
26
27
|
this.currentSpawnDelay = 0;
|
|
27
28
|
this.initialPosition = position;
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
if (options instanceof Emitter) {
|
|
30
|
+
this.options = options;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this.options = new Emitter();
|
|
34
|
+
this.options.load(options);
|
|
35
|
+
}
|
|
36
|
+
this.spawnDelay = (((_a = this.options.life.delay) !== null && _a !== void 0 ? _a : 0) * 1000) / this.container.retina.reduceFactor;
|
|
30
37
|
this.position = (_b = this.initialPosition) !== null && _b !== void 0 ? _b : this.calcPosition();
|
|
31
|
-
this.name =
|
|
32
|
-
this.shape = ShapeManager.getShape(
|
|
33
|
-
this.fill =
|
|
34
|
-
__classPrivateFieldSet(this, _EmitterInstance_firstSpawn, !this.
|
|
38
|
+
this.name = this.options.name;
|
|
39
|
+
this.shape = ShapeManager.getShape(this.options.shape);
|
|
40
|
+
this.fill = this.options.fill;
|
|
41
|
+
__classPrivateFieldSet(this, _EmitterInstance_firstSpawn, !this.options.life.wait, "f");
|
|
35
42
|
__classPrivateFieldSet(this, _EmitterInstance_startParticlesAdded, false, "f");
|
|
36
|
-
let particlesOptions = deepExtend({}, this.
|
|
43
|
+
let particlesOptions = deepExtend({}, this.options.particles);
|
|
37
44
|
particlesOptions !== null && particlesOptions !== void 0 ? particlesOptions : (particlesOptions = {});
|
|
38
45
|
(_c = particlesOptions.move) !== null && _c !== void 0 ? _c : (particlesOptions.move = {});
|
|
39
|
-
(_d = (_g = particlesOptions.move).direction) !== null && _d !== void 0 ? _d : (_g.direction = this.
|
|
40
|
-
if (this.
|
|
41
|
-
this.spawnColor = colorToHsl(this.
|
|
46
|
+
(_d = (_g = particlesOptions.move).direction) !== null && _d !== void 0 ? _d : (_g.direction = this.options.direction);
|
|
47
|
+
if (this.options.spawnColor) {
|
|
48
|
+
this.spawnColor = colorToHsl(this.options.spawnColor);
|
|
42
49
|
}
|
|
43
|
-
this.paused = !this.
|
|
50
|
+
this.paused = !this.options.autoPlay;
|
|
44
51
|
this.particlesOptions = particlesOptions;
|
|
45
52
|
this.size =
|
|
46
|
-
(_e = this.
|
|
53
|
+
(_e = this.options.size) !== null && _e !== void 0 ? _e : (() => {
|
|
47
54
|
const size = new EmitterSize();
|
|
48
55
|
size.load({
|
|
49
56
|
height: 0,
|
|
@@ -52,7 +59,7 @@ export class EmitterInstance {
|
|
|
52
59
|
});
|
|
53
60
|
return size;
|
|
54
61
|
})();
|
|
55
|
-
this.lifeCount = (_f = this.
|
|
62
|
+
this.lifeCount = (_f = this.options.life.count) !== null && _f !== void 0 ? _f : -1;
|
|
56
63
|
this.immortal = this.lifeCount <= 0;
|
|
57
64
|
this.play();
|
|
58
65
|
}
|
|
@@ -70,10 +77,10 @@ export class EmitterInstance {
|
|
|
70
77
|
return;
|
|
71
78
|
}
|
|
72
79
|
if (this.container.retina.reduceFactor &&
|
|
73
|
-
(this.lifeCount > 0 || this.immortal || !this.
|
|
80
|
+
(this.lifeCount > 0 || this.immortal || !this.options.life.count) &&
|
|
74
81
|
(__classPrivateFieldGet(this, _EmitterInstance_firstSpawn, "f") || this.currentSpawnDelay >= ((_a = this.spawnDelay) !== null && _a !== void 0 ? _a : 0))) {
|
|
75
82
|
if (this.emitDelay === undefined) {
|
|
76
|
-
const delay = getRangeValue(this.
|
|
83
|
+
const delay = getRangeValue(this.options.rate.delay);
|
|
77
84
|
this.emitDelay = (1000 * delay) / this.container.retina.reduceFactor;
|
|
78
85
|
}
|
|
79
86
|
if (this.lifeCount > 0 || this.immortal) {
|
|
@@ -106,7 +113,7 @@ export class EmitterInstance {
|
|
|
106
113
|
}
|
|
107
114
|
if (!__classPrivateFieldGet(this, _EmitterInstance_startParticlesAdded, "f")) {
|
|
108
115
|
__classPrivateFieldSet(this, _EmitterInstance_startParticlesAdded, true, "f");
|
|
109
|
-
this.emitParticles(this.
|
|
116
|
+
this.emitParticles(this.options.startCount);
|
|
110
117
|
}
|
|
111
118
|
if (this.duration !== undefined) {
|
|
112
119
|
this.currentDuration += delta.value;
|
|
@@ -120,8 +127,7 @@ export class EmitterInstance {
|
|
|
120
127
|
}
|
|
121
128
|
if (this.lifeCount > 0 || this.immortal) {
|
|
122
129
|
this.position = this.calcPosition();
|
|
123
|
-
this.spawnDelay =
|
|
124
|
-
(((_c = this.emitterOptions.life.delay) !== null && _c !== void 0 ? _c : 0) * 1000) / this.container.retina.reduceFactor;
|
|
130
|
+
this.spawnDelay = (((_c = this.options.life.delay) !== null && _c !== void 0 ? _c : 0) * 1000) / this.container.retina.reduceFactor;
|
|
125
131
|
}
|
|
126
132
|
else {
|
|
127
133
|
this.destroy();
|
|
@@ -151,7 +157,7 @@ export class EmitterInstance {
|
|
|
151
157
|
if (this.paused) {
|
|
152
158
|
return;
|
|
153
159
|
}
|
|
154
|
-
const duration = (_a = this.
|
|
160
|
+
const duration = (_a = this.options.life) === null || _a === void 0 ? void 0 : _a.duration;
|
|
155
161
|
if (this.container.retina.reduceFactor &&
|
|
156
162
|
(this.lifeCount > 0 || this.immortal) &&
|
|
157
163
|
duration !== undefined &&
|
|
@@ -165,7 +171,7 @@ export class EmitterInstance {
|
|
|
165
171
|
calcPosition() {
|
|
166
172
|
var _a, _b;
|
|
167
173
|
const container = this.container;
|
|
168
|
-
const percentPosition = this.
|
|
174
|
+
const percentPosition = this.options.position;
|
|
169
175
|
return {
|
|
170
176
|
x: (((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100) * container.canvas.size.width,
|
|
171
177
|
y: (((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100) * container.canvas.size.height,
|
|
@@ -175,7 +181,7 @@ export class EmitterInstance {
|
|
|
175
181
|
if (this.paused) {
|
|
176
182
|
return;
|
|
177
183
|
}
|
|
178
|
-
const quantity = getRangeValue(this.
|
|
184
|
+
const quantity = getRangeValue(this.options.rate.quantity);
|
|
179
185
|
this.emitParticles(quantity);
|
|
180
186
|
}
|
|
181
187
|
emitParticles(quantity) {
|
|
@@ -193,18 +199,11 @@ export class EmitterInstance {
|
|
|
193
199
|
for (let i = 0; i < quantity; i++) {
|
|
194
200
|
const particlesOptions = deepExtend({}, this.particlesOptions);
|
|
195
201
|
if (this.spawnColor) {
|
|
196
|
-
const
|
|
197
|
-
if (
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
const hslAnimation = colorAnimation;
|
|
204
|
-
this.spawnColor.h = this.setColorAnimation(hslAnimation.h, this.spawnColor.h, 360);
|
|
205
|
-
this.spawnColor.s = this.setColorAnimation(hslAnimation.s, this.spawnColor.s, 100);
|
|
206
|
-
this.spawnColor.l = this.setColorAnimation(hslAnimation.l, this.spawnColor.l, 100);
|
|
207
|
-
}
|
|
202
|
+
const hslAnimation = (_a = this.options.spawnColor) === null || _a === void 0 ? void 0 : _a.animation;
|
|
203
|
+
if (hslAnimation) {
|
|
204
|
+
this.spawnColor.h = this.setColorAnimation(hslAnimation.h, this.spawnColor.h, 360);
|
|
205
|
+
this.spawnColor.s = this.setColorAnimation(hslAnimation.s, this.spawnColor.s, 100);
|
|
206
|
+
this.spawnColor.l = this.setColorAnimation(hslAnimation.l, this.spawnColor.l, 100);
|
|
208
207
|
}
|
|
209
208
|
if (!particlesOptions.color) {
|
|
210
209
|
particlesOptions.color = {
|
|
@@ -226,7 +225,7 @@ export class EmitterInstance {
|
|
|
226
225
|
return initValue;
|
|
227
226
|
}
|
|
228
227
|
const colorOffset = randomInRange(animation.offset);
|
|
229
|
-
const delay = getRangeValue(this.
|
|
228
|
+
const delay = getRangeValue(this.options.rate.delay);
|
|
230
229
|
const emitFactor = (1000 * delay) / container.retina.reduceFactor;
|
|
231
230
|
const colorSpeed = (_a = animation.speed) !== null && _a !== void 0 ? _a : 0;
|
|
232
231
|
return (initValue + (colorSpeed * container.fpsLimit) / emitFactor + colorOffset * 3.6) % maxValue;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Container, IContainerPlugin, ICoordinates, IDelta } from "../../Core";
|
|
2
|
-
import { EmitterInstance } from "./EmitterInstance";
|
|
3
|
-
import type { IEmitter } from "./Options/Interfaces/IEmitter";
|
|
4
2
|
import type { RecursivePartial, SingleOrMultiple } from "../../Types";
|
|
5
3
|
import { Emitter } from "./Options/Classes/Emitter";
|
|
6
|
-
import
|
|
4
|
+
import { EmitterInstance } from "./EmitterInstance";
|
|
5
|
+
import type { IEmitter } from "./Options/Interfaces/IEmitter";
|
|
7
6
|
import type { IEmitterOptions } from "./Options/Interfaces/IEmitterOptions";
|
|
7
|
+
import type { IOptions } from "../../Options/Interfaces/IOptions";
|
|
8
8
|
export declare class Emitters implements IContainerPlugin {
|
|
9
9
|
private readonly container;
|
|
10
10
|
array: EmitterInstance[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EmitterInstance } from "./EmitterInstance";
|
|
2
|
-
import { Emitter } from "./Options/Classes/Emitter";
|
|
3
1
|
import { deepExtend, itemFromArray } from "../../Utils";
|
|
2
|
+
import { Emitter } from "./Options/Classes/Emitter";
|
|
3
|
+
import { EmitterInstance } from "./EmitterInstance";
|
|
4
4
|
export class Emitters {
|
|
5
5
|
constructor(container) {
|
|
6
6
|
this.container = container;
|
|
@@ -12,6 +12,12 @@ export class Emitters {
|
|
|
12
12
|
? this.array[idxOrName || 0]
|
|
13
13
|
: this.array.find((t) => t.name === idxOrName);
|
|
14
14
|
overridableContainer.addEmitter = (options, position) => this.addEmitter(options, position);
|
|
15
|
+
overridableContainer.removeEmitter = (idxOrName) => {
|
|
16
|
+
const emitter = overridableContainer.getEmitter(idxOrName);
|
|
17
|
+
if (emitter) {
|
|
18
|
+
this.removeEmitter(emitter);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
15
21
|
overridableContainer.playEmitter = (idxOrName) => {
|
|
16
22
|
const emitter = overridableContainer.getEmitter(idxOrName);
|
|
17
23
|
if (emitter) {
|
|
@@ -113,7 +119,9 @@ export class Emitters {
|
|
|
113
119
|
}
|
|
114
120
|
}
|
|
115
121
|
addEmitter(options, position) {
|
|
116
|
-
const
|
|
122
|
+
const emitterOptions = new Emitter();
|
|
123
|
+
emitterOptions.load(options);
|
|
124
|
+
const emitter = new EmitterInstance(this, this.container, emitterOptions, position);
|
|
117
125
|
this.array.push(emitter);
|
|
118
126
|
return emitter;
|
|
119
127
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { IEmitter } from "../Interfaces/IEmitter";
|
|
2
|
-
import type { RecursivePartial } from "../../../../Types";
|
|
3
|
-
import type { ICoordinates } from "../../../../Core/Interfaces";
|
|
4
1
|
import { MoveDirection, MoveDirectionAlt } from "../../../../Enums";
|
|
5
|
-
import
|
|
6
|
-
import { EmitterRate } from "./EmitterRate";
|
|
2
|
+
import { AnimatableColor } from "../../../../Options/Classes/AnimatableColor";
|
|
7
3
|
import { EmitterLife } from "./EmitterLife";
|
|
4
|
+
import { EmitterRate } from "./EmitterRate";
|
|
5
|
+
import { EmitterShapeType } from "../../Enums";
|
|
8
6
|
import { EmitterSize } from "./EmitterSize";
|
|
7
|
+
import type { ICoordinates } from "../../../../Core";
|
|
8
|
+
import type { IEmitter } from "../Interfaces/IEmitter";
|
|
9
9
|
import type { IOptionLoader } from "../../../../Options/Interfaces/IOptionLoader";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import type { IParticles } from "../../../../Options/Interfaces/Particles/IParticles";
|
|
11
|
+
import type { RecursivePartial } from "../../../../Types";
|
|
12
12
|
export declare class Emitter implements IEmitter, IOptionLoader<IEmitter> {
|
|
13
13
|
autoPlay: boolean;
|
|
14
14
|
size?: EmitterSize;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnimatableColor } from "../../../../Options/Classes/AnimatableColor";
|
|
2
2
|
import { EmitterLife } from "./EmitterLife";
|
|
3
|
-
import {
|
|
3
|
+
import { EmitterRate } from "./EmitterRate";
|
|
4
4
|
import { EmitterSize } from "./EmitterSize";
|
|
5
|
-
import {
|
|
5
|
+
import { deepExtend } from "../../../../Utils";
|
|
6
6
|
export class Emitter {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.autoPlay = true;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IEmitterLife } from "../Interfaces/IEmitterLife";
|
|
2
|
-
import type { RecursivePartial } from "../../../../Types";
|
|
3
2
|
import type { IOptionLoader } from "../../../../Options/Interfaces/IOptionLoader";
|
|
3
|
+
import type { RecursivePartial } from "../../../../Types";
|
|
4
4
|
export declare class EmitterLife implements IEmitterLife, IOptionLoader<IEmitterLife> {
|
|
5
5
|
count?: number;
|
|
6
6
|
delay?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IEmitterRate } from "../Interfaces/IEmitterRate";
|
|
2
1
|
import type { RangeValue, RecursivePartial } from "../../../../Types";
|
|
2
|
+
import type { IEmitterRate } from "../Interfaces/IEmitterRate";
|
|
3
3
|
import type { IOptionLoader } from "../../../../Options/Interfaces/IOptionLoader";
|
|
4
4
|
export declare class EmitterRate implements IEmitterRate, IOptionLoader<IEmitterRate> {
|
|
5
5
|
quantity: RangeValue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IEmitterSize } from "../Interfaces/IEmitterSize";
|
|
2
|
+
import type { IOptionLoader } from "../../../../Options/Interfaces/IOptionLoader";
|
|
2
3
|
import type { RecursivePartial } from "../../../../Types";
|
|
3
4
|
import { SizeMode } from "../../../../Enums";
|
|
4
|
-
import type { IOptionLoader } from "../../../../Options/Interfaces/IOptionLoader";
|
|
5
5
|
export declare class EmitterSize implements IEmitterSize, IOptionLoader<IEmitterSize> {
|
|
6
6
|
mode: SizeMode | keyof typeof SizeMode;
|
|
7
7
|
height: number;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { ICoordinates } from "../../../../Core/Interfaces";
|
|
2
1
|
import type { MoveDirection, MoveDirectionAlt } from "../../../../Enums";
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
2
|
+
import type { EmitterShapeType } from "../../Enums";
|
|
3
|
+
import type { IAnimatableColor } from "../../../../Options/Interfaces/IAnimatableColor";
|
|
4
|
+
import type { ICoordinates } from "../../../../Core";
|
|
5
5
|
import type { IEmitterLife } from "./IEmitterLife";
|
|
6
|
-
import type {
|
|
6
|
+
import type { IEmitterRate } from "./IEmitterRate";
|
|
7
7
|
import type { IEmitterSize } from "./IEmitterSize";
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
8
|
+
import type { IParticles } from "../../../../Options/Interfaces/Particles/IParticles";
|
|
9
|
+
import type { RecursivePartial } from "../../../../Types";
|
|
10
10
|
export interface IEmitter {
|
|
11
11
|
autoPlay: boolean;
|
|
12
12
|
size?: IEmitterSize;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { SingleOrMultiple } from "../../../../Types";
|
|
2
1
|
import type { IEmitter } from "./IEmitter";
|
|
3
2
|
import type { IInteractivity } from "../../../../Options/Interfaces/Interactivity/IInteractivity";
|
|
4
3
|
import type { IModes } from "../../../../Options/Interfaces/Interactivity/Modes/IModes";
|
|
4
|
+
import type { SingleOrMultiple } from "../../../../Types";
|
|
5
5
|
export interface IEmitterOptions {
|
|
6
6
|
emitters: SingleOrMultiple<IEmitter>;
|
|
7
7
|
interactivity: IInteractivity & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SizeMode } from "../../../../Enums";
|
|
2
1
|
import type { IDimension } from "../../../../Core/Interfaces/IDimension";
|
|
2
|
+
import type { SizeMode } from "../../../../Enums";
|
|
3
3
|
export interface IEmitterSize extends IDimension {
|
|
4
4
|
mode: SizeMode | keyof typeof SizeMode;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IEmitterShape } from "../../IEmitterShape";
|
|
2
1
|
import type { ICoordinates } from "../../../../Core";
|
|
2
|
+
import type { IEmitterShape } from "../../IEmitterShape";
|
|
3
3
|
export declare class CircleShape implements IEmitterShape {
|
|
4
4
|
randomPosition(position: ICoordinates, offset: ICoordinates, fill: boolean): ICoordinates;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IEmitterShape } from "../../IEmitterShape";
|
|
2
1
|
import type { ICoordinates } from "../../../../Core";
|
|
2
|
+
import type { IEmitterShape } from "../../IEmitterShape";
|
|
3
3
|
export declare class SquareShape implements IEmitterShape {
|
|
4
4
|
randomPosition(position: ICoordinates, offset: ICoordinates, fill: boolean): ICoordinates;
|
|
5
5
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Emitters } from "./Emitters";
|
|
1
|
+
import { CircleShape } from "./Shapes/Circle/CircleShape";
|
|
3
2
|
import { Emitter } from "./Options/Classes/Emitter";
|
|
3
|
+
import { Emitters } from "./Emitters";
|
|
4
4
|
import { ShapeManager } from "./ShapeManager";
|
|
5
|
-
import { CircleShape } from "./Shapes/Circle/CircleShape";
|
|
6
5
|
import { SquareShape } from "./Shapes/Square/SquareShape";
|
|
6
|
+
import { isInArray } from "../../Utils";
|
|
7
7
|
class EmittersPlugin {
|
|
8
8
|
constructor() {
|
|
9
9
|
this.id = "emitters";
|
|
@@ -63,15 +63,15 @@ class EmittersPlugin {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
export async function loadEmittersPlugin(
|
|
66
|
+
export async function loadEmittersPlugin(engine) {
|
|
67
67
|
const plugin = new EmittersPlugin();
|
|
68
|
-
await
|
|
69
|
-
if (!
|
|
70
|
-
|
|
68
|
+
await engine.addPlugin(plugin);
|
|
69
|
+
if (!engine.addEmitterShape) {
|
|
70
|
+
engine.addEmitterShape = (name, shape) => {
|
|
71
71
|
ShapeManager.addShape(name, shape);
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
engine.addEmitterShape("circle", new CircleShape());
|
|
75
|
+
engine.addEmitterShape("square", new SquareShape());
|
|
76
76
|
}
|
|
77
77
|
export * from "./EmittersMain";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { IPolygonMask } from "../Interfaces/IPolygonMask";
|
|
2
1
|
import { PolygonMaskInlineArrangement, PolygonMaskInlineArrangementAlt, PolygonMaskType } from "../../Enums";
|
|
2
|
+
import type { ICoordinates } from "../../../../Core";
|
|
3
|
+
import type { IOptionLoader } from "../../../../Options/Interfaces/IOptionLoader";
|
|
4
|
+
import type { IPolygonMask } from "../Interfaces/IPolygonMask";
|
|
3
5
|
import { PolygonMaskDraw } from "./PolygonMaskDraw";
|
|
4
|
-
import { PolygonMaskMove } from "./PolygonMaskMove";
|
|
5
6
|
import { PolygonMaskInline } from "./PolygonMaskInline";
|
|
6
|
-
import type { RecursivePartial } from "../../../../Types";
|
|
7
|
-
import type { ICoordinates } from "../../../../Core";
|
|
8
7
|
import { PolygonMaskLocalSvg } from "./PolygonMaskLocalSvg";
|
|
9
|
-
import
|
|
8
|
+
import { PolygonMaskMove } from "./PolygonMaskMove";
|
|
9
|
+
import type { RecursivePartial } from "../../../../Types";
|
|
10
10
|
export declare class PolygonMask implements IPolygonMask, IOptionLoader<IPolygonMask> {
|
|
11
11
|
get inlineArrangement(): PolygonMaskInlineArrangement | keyof typeof PolygonMaskInlineArrangement | PolygonMaskInlineArrangementAlt;
|
|
12
12
|
set inlineArrangement(value: PolygonMaskInlineArrangement | keyof typeof PolygonMaskInlineArrangement | PolygonMaskInlineArrangementAlt);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PolygonMaskDraw } from "./PolygonMaskDraw";
|
|
2
|
-
import { PolygonMaskMove } from "./PolygonMaskMove";
|
|
3
2
|
import { PolygonMaskInline } from "./PolygonMaskInline";
|
|
4
3
|
import { PolygonMaskLocalSvg } from "./PolygonMaskLocalSvg";
|
|
4
|
+
import { PolygonMaskMove } from "./PolygonMaskMove";
|
|
5
5
|
import { deepExtend } from "../../../../Utils";
|
|
6
6
|
export class PolygonMask {
|
|
7
7
|
constructor() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import type { IOptionLoader } from "../../../../Options/Interfaces/IOptionLoader";
|
|
1
2
|
import type { IPolygonMaskDraw } from "../Interfaces/IPolygonMaskDraw";
|
|
3
|
+
import { OptionsColor } from "../../../../Options/Classes/OptionsColor";
|
|
2
4
|
import { PolygonMaskDrawStroke } from "./PolygonMaskDrawStroke";
|
|
3
5
|
import type { RecursivePartial } from "../../../../Types";
|
|
4
|
-
import { OptionsColor } from "../../../../Options/Classes/OptionsColor";
|
|
5
|
-
import type { IOptionLoader } from "../../../../Options/Interfaces/IOptionLoader";
|
|
6
6
|
export declare class PolygonMaskDraw implements IPolygonMaskDraw, IOptionLoader<IPolygonMaskDraw> {
|
|
7
7
|
get lineWidth(): number;
|
|
8
8
|
set lineWidth(value: number);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PolygonMaskDrawStroke } from "./PolygonMaskDrawStroke";
|
|
2
1
|
import { OptionsColor } from "../../../../Options/Classes/OptionsColor";
|
|
2
|
+
import { PolygonMaskDrawStroke } from "./PolygonMaskDrawStroke";
|
|
3
3
|
export class PolygonMaskDraw {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.enable = false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { IOptionLoader } from "../../../../Options/Interfaces/IOptionLoader";
|
|
1
2
|
import type { IPolygonMaskDrawStroke } from "../Interfaces/IPolygonMaskDrawStroke";
|
|
2
|
-
import type { RecursivePartial } from "../../../../Types";
|
|
3
3
|
import { OptionsColor } from "../../../../Options/Classes/OptionsColor";
|
|
4
|
-
import type {
|
|
4
|
+
import type { RecursivePartial } from "../../../../Types";
|
|
5
5
|
export declare class PolygonMaskDrawStroke implements IPolygonMaskDrawStroke, IOptionLoader<IPolygonMaskDrawStroke> {
|
|
6
6
|
color: OptionsColor;
|
|
7
7
|
width: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IPolygonMaskInline } from "../Interfaces/IPolygonMaskInline";
|
|
2
1
|
import { PolygonMaskInlineArrangement, PolygonMaskInlineArrangementAlt } from "../../Enums";
|
|
3
|
-
import type { RecursivePartial } from "../../../../Types";
|
|
4
2
|
import type { IOptionLoader } from "../../../../Options/Interfaces/IOptionLoader";
|
|
3
|
+
import type { IPolygonMaskInline } from "../Interfaces/IPolygonMaskInline";
|
|
4
|
+
import type { RecursivePartial } from "../../../../Types";
|
|
5
5
|
export declare class PolygonMaskInline implements IPolygonMaskInline, IOptionLoader<IPolygonMaskInline> {
|
|
6
6
|
arrangement: PolygonMaskInlineArrangement | keyof typeof PolygonMaskInlineArrangement | PolygonMaskInlineArrangementAlt;
|
|
7
7
|
constructor();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { IPolygonMaskLocalSvg } from "../Interfaces/IPolygonMaskLocalSvg";
|
|
2
|
-
import type { SingleOrMultiple } from "../../../../Types";
|
|
3
1
|
import type { IDimension } from "../../../../Core";
|
|
4
|
-
import type { RecursivePartial } from "../../../../Types";
|
|
5
2
|
import type { IOptionLoader } from "../../../../Options/Interfaces/IOptionLoader";
|
|
3
|
+
import type { IPolygonMaskLocalSvg } from "../Interfaces/IPolygonMaskLocalSvg";
|
|
4
|
+
import type { RecursivePartial } from "../../../../Types";
|
|
5
|
+
import type { SingleOrMultiple } from "../../../../Types";
|
|
6
6
|
export declare class PolygonMaskLocalSvg implements IPolygonMaskLocalSvg, IOptionLoader<IPolygonMaskLocalSvg> {
|
|
7
7
|
path: SingleOrMultiple<string>;
|
|
8
8
|
size: IDimension;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { IOptionLoader } from "../../../../Options/Interfaces/IOptionLoader";
|
|
1
2
|
import type { IPolygonMaskMove } from "../Interfaces/IPolygonMaskMove";
|
|
2
|
-
import type { RecursivePartial } from "../../../../Types";
|
|
3
3
|
import { PolygonMaskMoveType } from "../../Enums";
|
|
4
|
-
import type {
|
|
4
|
+
import type { RecursivePartial } from "../../../../Types";
|
|
5
5
|
export declare class PolygonMaskMove implements IPolygonMaskMove, IOptionLoader<IPolygonMaskMove> {
|
|
6
6
|
radius: number;
|
|
7
7
|
type: PolygonMaskMoveType | keyof typeof PolygonMaskMoveType;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { PolygonMaskInlineArrangement, PolygonMaskInlineArrangementAlt, PolygonMaskType } from "../../Enums";
|
|
2
|
+
import type { ICoordinates } from "../../../../Core";
|
|
1
3
|
import type { IPolygonMaskDraw } from "./IPolygonMaskDraw";
|
|
2
|
-
import type { IPolygonMaskMove } from "./IPolygonMaskMove";
|
|
3
|
-
import type { PolygonMaskType, PolygonMaskInlineArrangement, PolygonMaskInlineArrangementAlt } from "../../Enums";
|
|
4
4
|
import type { IPolygonMaskInline } from "./IPolygonMaskInline";
|
|
5
|
-
import type { ICoordinates } from "../../../../Core";
|
|
6
5
|
import type { IPolygonMaskLocalSvg } from "./IPolygonMaskLocalSvg";
|
|
6
|
+
import type { IPolygonMaskMove } from "./IPolygonMaskMove";
|
|
7
7
|
export interface IPolygonMask {
|
|
8
8
|
draw: IPolygonMaskDraw;
|
|
9
9
|
enable: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IPolygonMaskDrawStroke } from "./IPolygonMaskDrawStroke";
|
|
2
1
|
import type { IColor } from "../../../../Core";
|
|
2
|
+
import type { IPolygonMaskDrawStroke } from "./IPolygonMaskDrawStroke";
|
|
3
3
|
export interface IPolygonMaskDraw {
|
|
4
4
|
enable: boolean;
|
|
5
5
|
lineColor: string | IColor;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Container, IContainerPlugin, ICoordinates, IDelta, IDimension, Particle } from "../../Core";
|
|
2
|
+
import type { IPolygonMaskOptions } from "./Types";
|
|
2
3
|
import type { ISvgPath } from "./Interfaces/ISvgPath";
|
|
3
|
-
import type { RecursivePartial } from "../../Types";
|
|
4
|
-
import { PolygonMask } from "./Options/Classes/PolygonMask";
|
|
5
4
|
import { OutModeDirection } from "../../Enums";
|
|
6
|
-
import
|
|
5
|
+
import { PolygonMask } from "./Options/Classes/PolygonMask";
|
|
6
|
+
import type { RecursivePartial } from "../../Types";
|
|
7
7
|
export declare class PolygonMaskInstance implements IContainerPlugin {
|
|
8
8
|
private readonly container;
|
|
9
9
|
redrawTimeout?: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { calcClosestPtOnSegment, drawPolygonMask, drawPolygonMaskPath, parsePaths, segmentBounce } from "./Utils";
|
|
2
2
|
import { deepExtend, getDistance, getDistances, itemFromArray } from "../../Utils";
|
|
3
|
+
import { Constants } from "../../Core";
|
|
3
4
|
import { PolygonMask } from "./Options/Classes/PolygonMask";
|
|
4
|
-
import { calcClosestPtOnSegment, drawPolygonMask, drawPolygonMaskPath, parsePaths, segmentBounce } from "./Utils";
|
|
5
5
|
export class PolygonMaskInstance {
|
|
6
6
|
constructor(container) {
|
|
7
7
|
this.container = container;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { SVGPathSegArcAbs, SVGPathSegArcRel, SVGPathSegCurvetoCubicAbs, SVGPathSegCurvetoCubicRel, SVGPathSegCurvetoCubicSmoothAbs, SVGPathSegCurvetoCubicSmoothRel, SVGPathSegCurvetoQuadraticAbs, SVGPathSegCurvetoQuadraticRel, SVGPathSegCurvetoQuadraticSmoothAbs, SVGPathSegCurvetoQuadraticSmoothRel, SVGPathSegLinetoAbs, SVGPathSegLinetoRel, SVGPathSegMovetoAbs, SVGPathSegMovetoRel } from "./pathseg";
|
|
1
2
|
import type { IOptions } from "../../Options/Interfaces/IOptions";
|
|
2
3
|
import type { IPolygonMask } from "./Options/Interfaces/IPolygonMask";
|
|
3
|
-
import type { SVGPathSegArcAbs, SVGPathSegCurvetoCubicAbs, SVGPathSegCurvetoCubicSmoothAbs, SVGPathSegCurvetoQuadraticAbs, SVGPathSegCurvetoQuadraticSmoothAbs, SVGPathSegLinetoAbs, SVGPathSegMovetoAbs, SVGPathSegArcRel, SVGPathSegCurvetoCubicRel, SVGPathSegCurvetoCubicSmoothRel, SVGPathSegCurvetoQuadraticRel, SVGPathSegCurvetoQuadraticSmoothRel, SVGPathSegLinetoRel, SVGPathSegMovetoRel } from "./pathseg";
|
|
4
4
|
export declare type SvgAbsoluteCoordinatesTypes = SVGPathSegArcAbs | SVGPathSegCurvetoCubicAbs | SVGPathSegCurvetoCubicSmoothAbs | SVGPathSegCurvetoQuadraticAbs | SVGPathSegCurvetoQuadraticSmoothAbs | SVGPathSegLinetoAbs | SVGPathSegMovetoAbs;
|
|
5
5
|
export declare type SvgRelativeCoordinatesTypes = SVGPathSegArcRel | SVGPathSegCurvetoCubicRel | SVGPathSegCurvetoCubicSmoothRel | SVGPathSegCurvetoQuadraticRel | SVGPathSegCurvetoQuadraticSmoothRel | SVGPathSegLinetoRel | SVGPathSegMovetoRel;
|
|
6
6
|
export declare type IPolygonMaskOptions = IOptions & {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Engine } from "../../engine";
|
|
2
|
-
export declare function loadPolygonMaskPlugin(
|
|
2
|
+
export declare function loadPolygonMaskPlugin(engine: Engine): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PolygonMaskInstance } from "./PolygonMaskInstance";
|
|
2
1
|
import { PolygonMask } from "./Options/Classes/PolygonMask";
|
|
2
|
+
import { PolygonMaskInstance } from "./PolygonMaskInstance";
|
|
3
3
|
import { isSsr } from "../../Utils";
|
|
4
4
|
class PolygonMaskPlugin {
|
|
5
5
|
constructor() {
|
|
@@ -24,10 +24,10 @@ class PolygonMaskPlugin {
|
|
|
24
24
|
polygonOptions.load(source === null || source === void 0 ? void 0 : source.polygon);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
export async function loadPolygonMaskPlugin(
|
|
27
|
+
export async function loadPolygonMaskPlugin(engine) {
|
|
28
28
|
if (!isSsr() && !("SVGPathSeg" in window)) {
|
|
29
29
|
await import("./pathseg");
|
|
30
30
|
}
|
|
31
31
|
const plugin = new PolygonMaskPlugin();
|
|
32
|
-
await
|
|
32
|
+
await engine.addPlugin(plugin);
|
|
33
33
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Engine } from "../../engine";
|
|
2
|
-
export declare function loadCircleShape(
|
|
2
|
+
export declare function loadCircleShape(engine: Engine): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CircleDrawer } from "./CircleDrawer";
|
|
2
|
-
export async function loadCircleShape(
|
|
3
|
-
await
|
|
2
|
+
export async function loadCircleShape(engine) {
|
|
3
|
+
await engine.addShape("circle", new CircleDrawer());
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Engine } from "../../engine";
|
|
2
|
-
export declare function loadImageShape(
|
|
2
|
+
export declare function loadImageShape(engine: Engine): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ImageDrawer } from "./ImageDrawer";
|
|
2
|
-
export async function loadImageShape(
|
|
2
|
+
export async function loadImageShape(engine) {
|
|
3
3
|
const imageDrawer = new ImageDrawer();
|
|
4
|
-
await
|
|
5
|
-
await
|
|
4
|
+
await engine.addShape("image", imageDrawer);
|
|
5
|
+
await engine.addShape("images", imageDrawer);
|
|
6
6
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Engine } from "../../engine";
|
|
2
|
-
export declare function loadLineShape(
|
|
2
|
+
export declare function loadLineShape(engine: Engine): Promise<void>;
|
package/esm/Shapes/Line/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { ICoordinates, IParticle } from "../../Core";
|
|
1
2
|
import type { ISide } from "./PolygonDrawerBase";
|
|
2
3
|
import { PolygonDrawerBase } from "./PolygonDrawerBase";
|
|
3
|
-
import type { ICoordinates, IParticle } from "../../Core";
|
|
4
4
|
export declare class PolygonDrawer extends PolygonDrawerBase {
|
|
5
5
|
getSidesData(particle: IParticle, radius: number): ISide;
|
|
6
6
|
getCenter(particle: IParticle, radius: number): ICoordinates;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ISide } from "./PolygonDrawerBase";
|
|
2
1
|
import type { ICoordinates, IParticle } from "../../Core";
|
|
2
|
+
import type { ISide } from "./PolygonDrawerBase";
|
|
3
3
|
import { PolygonDrawerBase } from "./PolygonDrawerBase";
|
|
4
4
|
export declare class TriangleDrawer extends PolygonDrawerBase {
|
|
5
5
|
getSidesCount(): number;
|