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
|
@@ -43,6 +43,40 @@
|
|
|
43
43
|
return loadAbsorbersPlugin;
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
+
class AbsorberSizeLimit {
|
|
47
|
+
constructor() {
|
|
48
|
+
this.radius = 0;
|
|
49
|
+
this.mass = 0;
|
|
50
|
+
}
|
|
51
|
+
load(data) {
|
|
52
|
+
if (!data) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (data.mass !== undefined) {
|
|
56
|
+
this.mass = data.mass;
|
|
57
|
+
}
|
|
58
|
+
if (data.radius !== undefined) {
|
|
59
|
+
this.radius = data.radius;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
class Random {
|
|
64
|
+
constructor() {
|
|
65
|
+
this.enable = false;
|
|
66
|
+
this.minimumValue = 0;
|
|
67
|
+
}
|
|
68
|
+
load(data) {
|
|
69
|
+
if (!data) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (data.enable !== undefined) {
|
|
73
|
+
this.enable = data.enable;
|
|
74
|
+
}
|
|
75
|
+
if (data.minimumValue !== undefined) {
|
|
76
|
+
this.minimumValue = data.minimumValue;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
46
80
|
class Circle_Circle extends(null && Range){
|
|
47
81
|
constructor(x, y, radius) {
|
|
48
82
|
super(x, y);
|
|
@@ -1261,383 +1295,278 @@
|
|
|
1261
1295
|
}));
|
|
1262
1296
|
}
|
|
1263
1297
|
}
|
|
1264
|
-
class
|
|
1298
|
+
class Trail_Trail {
|
|
1265
1299
|
constructor() {
|
|
1266
|
-
this.
|
|
1267
|
-
this.
|
|
1300
|
+
this.delay = 1;
|
|
1301
|
+
this.pauseOnStop = false;
|
|
1302
|
+
this.quantity = 1;
|
|
1268
1303
|
}
|
|
1269
1304
|
load(data) {
|
|
1270
|
-
if (
|
|
1305
|
+
if (data === undefined) {
|
|
1271
1306
|
return;
|
|
1272
1307
|
}
|
|
1273
|
-
if (data.
|
|
1274
|
-
this.
|
|
1308
|
+
if (data.delay !== undefined) {
|
|
1309
|
+
this.delay = data.delay;
|
|
1275
1310
|
}
|
|
1276
|
-
if (data.
|
|
1277
|
-
this.
|
|
1311
|
+
if (data.quantity !== undefined) {
|
|
1312
|
+
this.quantity = data.quantity;
|
|
1313
|
+
}
|
|
1314
|
+
if (data.particles !== undefined) {
|
|
1315
|
+
this.particles = deepExtend({}, data.particles);
|
|
1316
|
+
}
|
|
1317
|
+
if (data.pauseOnStop !== undefined) {
|
|
1318
|
+
this.pauseOnStop = data.pauseOnStop;
|
|
1278
1319
|
}
|
|
1279
1320
|
}
|
|
1280
1321
|
}
|
|
1281
|
-
class
|
|
1322
|
+
class Modes_Modes {
|
|
1282
1323
|
constructor() {
|
|
1283
|
-
this.
|
|
1284
|
-
this.
|
|
1324
|
+
this.attract = new Attract;
|
|
1325
|
+
this.bounce = new Bounce;
|
|
1326
|
+
this.bubble = new Bubble;
|
|
1327
|
+
this.connect = new Connect;
|
|
1328
|
+
this.grab = new Grab;
|
|
1329
|
+
this.light = new Light;
|
|
1330
|
+
this.push = new Push;
|
|
1331
|
+
this.remove = new Remove;
|
|
1332
|
+
this.repulse = new Repulse;
|
|
1333
|
+
this.slow = new Slow;
|
|
1334
|
+
this.trail = new Trail;
|
|
1285
1335
|
}
|
|
1286
1336
|
load(data) {
|
|
1287
|
-
if (
|
|
1337
|
+
if (data === undefined) {
|
|
1288
1338
|
return;
|
|
1289
1339
|
}
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1340
|
+
this.attract.load(data.attract);
|
|
1341
|
+
this.bubble.load(data.bubble);
|
|
1342
|
+
this.connect.load(data.connect);
|
|
1343
|
+
this.grab.load(data.grab);
|
|
1344
|
+
this.light.load(data.light);
|
|
1345
|
+
this.push.load(data.push);
|
|
1346
|
+
this.remove.load(data.remove);
|
|
1347
|
+
this.repulse.load(data.repulse);
|
|
1348
|
+
this.slow.load(data.slow);
|
|
1349
|
+
this.trail.load(data.trail);
|
|
1298
1350
|
}
|
|
1299
1351
|
}
|
|
1300
|
-
class
|
|
1352
|
+
class Interactivity_Interactivity {
|
|
1301
1353
|
constructor() {
|
|
1302
|
-
|
|
1354
|
+
this.detectsOn = "window";
|
|
1355
|
+
this.events = new Events;
|
|
1356
|
+
this.modes = new Modes;
|
|
1303
1357
|
}
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
this.
|
|
1309
|
-
this.enable = false;
|
|
1310
|
-
this.options = {};
|
|
1358
|
+
get detect_on() {
|
|
1359
|
+
return this.detectsOn;
|
|
1360
|
+
}
|
|
1361
|
+
set detect_on(value) {
|
|
1362
|
+
this.detectsOn = value;
|
|
1311
1363
|
}
|
|
1312
1364
|
load(data) {
|
|
1365
|
+
var _a, _b, _c;
|
|
1313
1366
|
if (data === undefined) {
|
|
1314
1367
|
return;
|
|
1315
1368
|
}
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
this.delay.load(data.delay);
|
|
1320
|
-
if (data.enable !== undefined) {
|
|
1321
|
-
this.enable = data.enable;
|
|
1369
|
+
const detectsOn = (_a = data.detectsOn) !== null && _a !== void 0 ? _a : data.detect_on;
|
|
1370
|
+
if (detectsOn !== undefined) {
|
|
1371
|
+
this.detectsOn = detectsOn;
|
|
1322
1372
|
}
|
|
1323
|
-
this.
|
|
1324
|
-
|
|
1325
|
-
|
|
1373
|
+
this.events.load(data.events);
|
|
1374
|
+
this.modes.load(data.modes);
|
|
1375
|
+
if (((_c = (_b = data.modes) === null || _b === void 0 ? void 0 : _b.slow) === null || _c === void 0 ? void 0 : _c.active) === true) {
|
|
1376
|
+
if (this.events.onHover.mode instanceof Array) {
|
|
1377
|
+
if (this.events.onHover.mode.indexOf("slow") < 0) {
|
|
1378
|
+
this.events.onHover.mode.push("slow");
|
|
1379
|
+
}
|
|
1380
|
+
} else if (this.events.onHover.mode !== "slow") {
|
|
1381
|
+
this.events.onHover.mode = [ this.events.onHover.mode, "slow" ];
|
|
1382
|
+
}
|
|
1326
1383
|
}
|
|
1327
1384
|
}
|
|
1328
1385
|
}
|
|
1329
|
-
class
|
|
1330
|
-
constructor() {
|
|
1331
|
-
this.acceleration = 0;
|
|
1332
|
-
this.enable = false;
|
|
1333
|
-
}
|
|
1386
|
+
class ManualParticle_ManualParticle {
|
|
1334
1387
|
load(data) {
|
|
1388
|
+
var _a, _b;
|
|
1335
1389
|
if (!data) {
|
|
1336
1390
|
return;
|
|
1337
1391
|
}
|
|
1338
|
-
if (data.
|
|
1339
|
-
this.
|
|
1392
|
+
if (data.position !== undefined) {
|
|
1393
|
+
this.position = {
|
|
1394
|
+
x: (_a = data.position.x) !== null && _a !== void 0 ? _a : 50,
|
|
1395
|
+
y: (_b = data.position.y) !== null && _b !== void 0 ? _b : 50
|
|
1396
|
+
};
|
|
1340
1397
|
}
|
|
1341
|
-
if (data.
|
|
1342
|
-
this.
|
|
1398
|
+
if (data.options !== undefined) {
|
|
1399
|
+
this.options = deepExtend({}, data.options);
|
|
1343
1400
|
}
|
|
1344
|
-
this.position = data.position ? deepExtend({}, data.position) : undefined;
|
|
1345
1401
|
}
|
|
1346
1402
|
}
|
|
1347
|
-
class
|
|
1403
|
+
class ColorAnimation_ColorAnimation {
|
|
1348
1404
|
constructor() {
|
|
1349
|
-
this.
|
|
1350
|
-
this.attract = new Attract;
|
|
1351
|
-
this.decay = 0;
|
|
1352
|
-
this.distance = {};
|
|
1353
|
-
this.direction = "none";
|
|
1354
|
-
this.drift = 0;
|
|
1405
|
+
this.count = 0;
|
|
1355
1406
|
this.enable = false;
|
|
1356
|
-
this.
|
|
1357
|
-
this.
|
|
1358
|
-
this.
|
|
1359
|
-
this.random = false;
|
|
1360
|
-
this.size = false;
|
|
1361
|
-
this.speed = 2;
|
|
1362
|
-
this.spin = new Spin;
|
|
1363
|
-
this.straight = false;
|
|
1364
|
-
this.trail = new Trail;
|
|
1365
|
-
this.vibrate = false;
|
|
1366
|
-
this.warp = false;
|
|
1367
|
-
}
|
|
1368
|
-
get collisions() {
|
|
1369
|
-
return false;
|
|
1370
|
-
}
|
|
1371
|
-
set collisions(value) {}
|
|
1372
|
-
get bounce() {
|
|
1373
|
-
return this.collisions;
|
|
1374
|
-
}
|
|
1375
|
-
set bounce(value) {
|
|
1376
|
-
this.collisions = value;
|
|
1377
|
-
}
|
|
1378
|
-
get out_mode() {
|
|
1379
|
-
return this.outMode;
|
|
1380
|
-
}
|
|
1381
|
-
set out_mode(value) {
|
|
1382
|
-
this.outMode = value;
|
|
1383
|
-
}
|
|
1384
|
-
get outMode() {
|
|
1385
|
-
return this.outModes.default;
|
|
1386
|
-
}
|
|
1387
|
-
set outMode(value) {
|
|
1388
|
-
this.outModes.default = value;
|
|
1389
|
-
}
|
|
1390
|
-
get noise() {
|
|
1391
|
-
return this.path;
|
|
1392
|
-
}
|
|
1393
|
-
set noise(value) {
|
|
1394
|
-
this.path = value;
|
|
1407
|
+
this.offset = 0;
|
|
1408
|
+
this.speed = 1;
|
|
1409
|
+
this.sync = true;
|
|
1395
1410
|
}
|
|
1396
1411
|
load(data) {
|
|
1397
|
-
var _a, _b, _c;
|
|
1398
1412
|
if (data === undefined) {
|
|
1399
1413
|
return;
|
|
1400
1414
|
}
|
|
1401
|
-
if (data.
|
|
1402
|
-
|
|
1403
|
-
this.angle.value = data.angle;
|
|
1404
|
-
} else {
|
|
1405
|
-
this.angle.load(data.angle);
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1408
|
-
this.attract.load(data.attract);
|
|
1409
|
-
if (data.decay !== undefined) {
|
|
1410
|
-
this.decay = data.decay;
|
|
1411
|
-
}
|
|
1412
|
-
if (data.direction !== undefined) {
|
|
1413
|
-
this.direction = data.direction;
|
|
1414
|
-
}
|
|
1415
|
-
if (data.distance !== undefined) {
|
|
1416
|
-
this.distance = typeof data.distance === "number" ? {
|
|
1417
|
-
horizontal: data.distance,
|
|
1418
|
-
vertical: data.distance
|
|
1419
|
-
} : deepExtend({}, data.distance);
|
|
1420
|
-
}
|
|
1421
|
-
if (data.drift !== undefined) {
|
|
1422
|
-
this.drift = setRangeValue(data.drift);
|
|
1415
|
+
if (data.count !== undefined) {
|
|
1416
|
+
this.count = data.count;
|
|
1423
1417
|
}
|
|
1424
1418
|
if (data.enable !== undefined) {
|
|
1425
1419
|
this.enable = data.enable;
|
|
1426
1420
|
}
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
if (data.outModes !== undefined || outMode !== undefined) {
|
|
1430
|
-
if (typeof data.outModes === "string" || data.outModes === undefined && outMode !== undefined) {
|
|
1431
|
-
this.outModes.load({
|
|
1432
|
-
default: (_b = data.outModes) !== null && _b !== void 0 ? _b : outMode
|
|
1433
|
-
});
|
|
1434
|
-
} else {
|
|
1435
|
-
this.outModes.load(data.outModes);
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
this.path.load((_c = data.path) !== null && _c !== void 0 ? _c : data.noise);
|
|
1439
|
-
if (data.random !== undefined) {
|
|
1440
|
-
this.random = data.random;
|
|
1441
|
-
}
|
|
1442
|
-
if (data.size !== undefined) {
|
|
1443
|
-
this.size = data.size;
|
|
1421
|
+
if (data.offset !== undefined) {
|
|
1422
|
+
this.offset = setRangeValue(data.offset);
|
|
1444
1423
|
}
|
|
1445
1424
|
if (data.speed !== undefined) {
|
|
1446
|
-
this.speed =
|
|
1425
|
+
this.speed = data.speed;
|
|
1447
1426
|
}
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
this.straight = data.straight;
|
|
1427
|
+
if (data.sync !== undefined) {
|
|
1428
|
+
this.sync = data.sync;
|
|
1451
1429
|
}
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
class HslAnimation_HslAnimation {
|
|
1433
|
+
constructor() {
|
|
1434
|
+
this.h = new ColorAnimation;
|
|
1435
|
+
this.s = new ColorAnimation;
|
|
1436
|
+
this.l = new ColorAnimation;
|
|
1437
|
+
}
|
|
1438
|
+
load(data) {
|
|
1439
|
+
if (!data) {
|
|
1440
|
+
return;
|
|
1458
1441
|
}
|
|
1442
|
+
this.h.load(data.h);
|
|
1443
|
+
this.s.load(data.s);
|
|
1444
|
+
this.l.load(data.l);
|
|
1459
1445
|
}
|
|
1460
1446
|
}
|
|
1461
|
-
class
|
|
1447
|
+
class AnimatableColor_AnimatableColor extends(null && OptionsColor){
|
|
1462
1448
|
constructor() {
|
|
1463
1449
|
super();
|
|
1464
|
-
this.animation = new
|
|
1465
|
-
this.random.minimumValue = .1;
|
|
1466
|
-
this.value = 1;
|
|
1467
|
-
}
|
|
1468
|
-
get anim() {
|
|
1469
|
-
return this.animation;
|
|
1450
|
+
this.animation = new HslAnimation;
|
|
1470
1451
|
}
|
|
1471
|
-
|
|
1472
|
-
|
|
1452
|
+
static create(source, data) {
|
|
1453
|
+
const color = new AnimatableColor_AnimatableColor;
|
|
1454
|
+
color.load(source);
|
|
1455
|
+
if (data !== undefined) {
|
|
1456
|
+
if (typeof data === "string" || data instanceof Array) {
|
|
1457
|
+
color.load({
|
|
1458
|
+
value: data
|
|
1459
|
+
});
|
|
1460
|
+
} else {
|
|
1461
|
+
color.load(data);
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
return color;
|
|
1473
1465
|
}
|
|
1474
1466
|
load(data) {
|
|
1475
|
-
|
|
1467
|
+
super.load(data);
|
|
1476
1468
|
if (!data) {
|
|
1477
1469
|
return;
|
|
1478
1470
|
}
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1471
|
+
const colorAnimation = data.animation;
|
|
1472
|
+
if (colorAnimation !== undefined) {
|
|
1473
|
+
if (colorAnimation.enable !== undefined) {
|
|
1474
|
+
this.animation.h.load(colorAnimation);
|
|
1475
|
+
} else {
|
|
1476
|
+
this.animation.load(data.animation);
|
|
1477
|
+
}
|
|
1484
1478
|
}
|
|
1485
1479
|
}
|
|
1486
1480
|
}
|
|
1487
|
-
class
|
|
1481
|
+
class AnimatableGradient_AnimatableGradient {
|
|
1488
1482
|
constructor() {
|
|
1489
|
-
this.
|
|
1490
|
-
this.
|
|
1491
|
-
|
|
1492
|
-
get image() {
|
|
1493
|
-
var _a;
|
|
1494
|
-
return (_a = this.options["image"]) !== null && _a !== void 0 ? _a : this.options["images"];
|
|
1495
|
-
}
|
|
1496
|
-
set image(value) {
|
|
1497
|
-
this.options["image"] = value;
|
|
1498
|
-
this.options["images"] = value;
|
|
1499
|
-
}
|
|
1500
|
-
get custom() {
|
|
1501
|
-
return this.options;
|
|
1502
|
-
}
|
|
1503
|
-
set custom(value) {
|
|
1504
|
-
this.options = value;
|
|
1505
|
-
}
|
|
1506
|
-
get images() {
|
|
1507
|
-
return this.image;
|
|
1508
|
-
}
|
|
1509
|
-
set images(value) {
|
|
1510
|
-
this.image = value;
|
|
1511
|
-
}
|
|
1512
|
-
get stroke() {
|
|
1513
|
-
return [];
|
|
1514
|
-
}
|
|
1515
|
-
set stroke(_value) {}
|
|
1516
|
-
get character() {
|
|
1517
|
-
var _a;
|
|
1518
|
-
return (_a = this.options["character"]) !== null && _a !== void 0 ? _a : this.options["char"];
|
|
1519
|
-
}
|
|
1520
|
-
set character(value) {
|
|
1521
|
-
this.options["character"] = value;
|
|
1522
|
-
this.options["char"] = value;
|
|
1523
|
-
}
|
|
1524
|
-
get polygon() {
|
|
1525
|
-
var _a;
|
|
1526
|
-
return (_a = this.options["polygon"]) !== null && _a !== void 0 ? _a : this.options["star"];
|
|
1527
|
-
}
|
|
1528
|
-
set polygon(value) {
|
|
1529
|
-
this.options["polygon"] = value;
|
|
1530
|
-
this.options["star"] = value;
|
|
1483
|
+
this.angle = new GradientAngle;
|
|
1484
|
+
this.colors = [];
|
|
1485
|
+
this.type = "random";
|
|
1531
1486
|
}
|
|
1532
1487
|
load(data) {
|
|
1533
|
-
|
|
1534
|
-
if (data === undefined) {
|
|
1488
|
+
if (!data) {
|
|
1535
1489
|
return;
|
|
1536
1490
|
}
|
|
1537
|
-
|
|
1538
|
-
if (
|
|
1539
|
-
|
|
1540
|
-
const
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
}
|
|
1491
|
+
this.angle.load(data.angle);
|
|
1492
|
+
if (data.colors !== undefined) {
|
|
1493
|
+
this.colors = data.colors.map((s => {
|
|
1494
|
+
const tmp = new AnimatableGradientColor;
|
|
1495
|
+
tmp.load(s);
|
|
1496
|
+
return tmp;
|
|
1497
|
+
}));
|
|
1545
1498
|
}
|
|
1546
|
-
this.loadShape(data.character, "character", "char", true);
|
|
1547
|
-
this.loadShape(data.polygon, "polygon", "star", false);
|
|
1548
|
-
this.loadShape((_c = data.image) !== null && _c !== void 0 ? _c : data.images, "image", "images", true);
|
|
1549
1499
|
if (data.type !== undefined) {
|
|
1550
1500
|
this.type = data.type;
|
|
1551
1501
|
}
|
|
1552
1502
|
}
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1503
|
+
}
|
|
1504
|
+
class GradientAngle {
|
|
1505
|
+
constructor() {
|
|
1506
|
+
this.value = 0;
|
|
1507
|
+
this.animation = new GradientAngleAnimation;
|
|
1508
|
+
this.direction = "clockwise";
|
|
1509
|
+
}
|
|
1510
|
+
load(data) {
|
|
1511
|
+
if (!data) {
|
|
1556
1512
|
return;
|
|
1557
1513
|
}
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
}
|
|
1565
|
-
this.options[mainKey] = deepExtend((_a = this.options[mainKey]) !== null && _a !== void 0 ? _a : [], item);
|
|
1566
|
-
if (!this.options[altKey] || altOverride) {
|
|
1567
|
-
this.options[altKey] = deepExtend((_b = this.options[altKey]) !== null && _b !== void 0 ? _b : [], item);
|
|
1568
|
-
}
|
|
1569
|
-
} else {
|
|
1570
|
-
if (this.options[mainKey] instanceof Array) {
|
|
1571
|
-
this.options[mainKey] = {};
|
|
1572
|
-
if (!this.options[altKey] || altOverride) {
|
|
1573
|
-
this.options[altKey] = {};
|
|
1574
|
-
}
|
|
1575
|
-
}
|
|
1576
|
-
this.options[mainKey] = deepExtend((_c = this.options[mainKey]) !== null && _c !== void 0 ? _c : {}, item);
|
|
1577
|
-
if (!this.options[altKey] || altOverride) {
|
|
1578
|
-
this.options[altKey] = deepExtend((_d = this.options[altKey]) !== null && _d !== void 0 ? _d : {}, item);
|
|
1579
|
-
}
|
|
1514
|
+
this.animation.load(data.animation);
|
|
1515
|
+
if (data.value !== undefined) {
|
|
1516
|
+
this.value = data.value;
|
|
1517
|
+
}
|
|
1518
|
+
if (data.direction !== undefined) {
|
|
1519
|
+
this.direction = data.direction;
|
|
1580
1520
|
}
|
|
1581
1521
|
}
|
|
1582
1522
|
}
|
|
1583
|
-
class
|
|
1523
|
+
class GradientColorOpacity {
|
|
1584
1524
|
constructor() {
|
|
1585
|
-
|
|
1586
|
-
this.animation = new
|
|
1587
|
-
this.random.minimumValue = 1;
|
|
1588
|
-
this.value = 3;
|
|
1589
|
-
}
|
|
1590
|
-
get anim() {
|
|
1591
|
-
return this.animation;
|
|
1592
|
-
}
|
|
1593
|
-
set anim(value) {
|
|
1594
|
-
this.animation = value;
|
|
1525
|
+
this.value = 0;
|
|
1526
|
+
this.animation = new GradientColorOpacityAnimation;
|
|
1595
1527
|
}
|
|
1596
1528
|
load(data) {
|
|
1597
|
-
var _a;
|
|
1598
1529
|
if (!data) {
|
|
1599
1530
|
return;
|
|
1600
1531
|
}
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
this.animation.load(animation);
|
|
1605
|
-
this.value = setRangeValue(this.value, this.animation.enable ? this.animation.minimumValue : undefined);
|
|
1532
|
+
this.animation.load(data.animation);
|
|
1533
|
+
if (data.value !== undefined) {
|
|
1534
|
+
this.value = setRangeValue(data.value);
|
|
1606
1535
|
}
|
|
1607
1536
|
}
|
|
1608
1537
|
}
|
|
1609
|
-
class
|
|
1538
|
+
class AnimatableGradientColor {
|
|
1610
1539
|
constructor() {
|
|
1611
|
-
|
|
1612
|
-
this.
|
|
1613
|
-
this.direction = "clockwise";
|
|
1614
|
-
this.path = false;
|
|
1615
|
-
this.value = 0;
|
|
1540
|
+
this.stop = 0;
|
|
1541
|
+
this.value = new AnimatableColor;
|
|
1616
1542
|
}
|
|
1617
1543
|
load(data) {
|
|
1618
1544
|
if (!data) {
|
|
1619
1545
|
return;
|
|
1620
1546
|
}
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
this.direction = data.direction;
|
|
1547
|
+
if (data.stop !== undefined) {
|
|
1548
|
+
this.stop = data.stop;
|
|
1624
1549
|
}
|
|
1625
|
-
this.
|
|
1626
|
-
if (data.
|
|
1627
|
-
this.
|
|
1550
|
+
this.value = AnimatableColor.create(this.value, data.value);
|
|
1551
|
+
if (data.opacity !== undefined) {
|
|
1552
|
+
this.opacity = new GradientColorOpacity;
|
|
1553
|
+
if (typeof data.opacity === "number") {
|
|
1554
|
+
this.opacity.value = data.opacity;
|
|
1555
|
+
} else {
|
|
1556
|
+
this.opacity.load(data.opacity);
|
|
1557
|
+
}
|
|
1628
1558
|
}
|
|
1629
1559
|
}
|
|
1630
1560
|
}
|
|
1631
|
-
class
|
|
1561
|
+
class GradientAngleAnimation {
|
|
1632
1562
|
constructor() {
|
|
1633
1563
|
this.count = 0;
|
|
1634
1564
|
this.enable = false;
|
|
1635
|
-
this.
|
|
1636
|
-
this.
|
|
1637
|
-
this.sync = true;
|
|
1565
|
+
this.speed = 0;
|
|
1566
|
+
this.sync = false;
|
|
1638
1567
|
}
|
|
1639
1568
|
load(data) {
|
|
1640
|
-
if (data
|
|
1569
|
+
if (!data) {
|
|
1641
1570
|
return;
|
|
1642
1571
|
}
|
|
1643
1572
|
if (data.count !== undefined) {
|
|
@@ -1646,9 +1575,6 @@
|
|
|
1646
1575
|
if (data.enable !== undefined) {
|
|
1647
1576
|
this.enable = data.enable;
|
|
1648
1577
|
}
|
|
1649
|
-
if (data.offset !== undefined) {
|
|
1650
|
-
this.offset = setRangeValue(data.offset);
|
|
1651
|
-
}
|
|
1652
1578
|
if (data.speed !== undefined) {
|
|
1653
1579
|
this.speed = data.speed;
|
|
1654
1580
|
}
|
|
@@ -1657,75 +1583,36 @@
|
|
|
1657
1583
|
}
|
|
1658
1584
|
}
|
|
1659
1585
|
}
|
|
1660
|
-
class
|
|
1586
|
+
class GradientColorOpacityAnimation {
|
|
1661
1587
|
constructor() {
|
|
1662
|
-
this.
|
|
1663
|
-
this.
|
|
1664
|
-
this.
|
|
1588
|
+
this.count = 0;
|
|
1589
|
+
this.enable = false;
|
|
1590
|
+
this.speed = 0;
|
|
1591
|
+
this.sync = false;
|
|
1592
|
+
this.startValue = "random";
|
|
1665
1593
|
}
|
|
1666
1594
|
load(data) {
|
|
1667
1595
|
if (!data) {
|
|
1668
1596
|
return;
|
|
1669
1597
|
}
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1598
|
+
if (data.count !== undefined) {
|
|
1599
|
+
this.count = data.count;
|
|
1600
|
+
}
|
|
1601
|
+
if (data.enable !== undefined) {
|
|
1602
|
+
this.enable = data.enable;
|
|
1603
|
+
}
|
|
1604
|
+
if (data.speed !== undefined) {
|
|
1605
|
+
this.speed = data.speed;
|
|
1606
|
+
}
|
|
1607
|
+
if (data.sync !== undefined) {
|
|
1608
|
+
this.sync = data.sync;
|
|
1609
|
+
}
|
|
1610
|
+
if (data.startValue !== undefined) {
|
|
1611
|
+
this.startValue = data.startValue;
|
|
1612
|
+
}
|
|
1673
1613
|
}
|
|
1674
1614
|
}
|
|
1675
|
-
class
|
|
1676
|
-
constructor() {
|
|
1677
|
-
super();
|
|
1678
|
-
this.animation = new HslAnimation;
|
|
1679
|
-
}
|
|
1680
|
-
static create(source, data) {
|
|
1681
|
-
const color = new AnimatableColor_AnimatableColor;
|
|
1682
|
-
color.load(source);
|
|
1683
|
-
if (data !== undefined) {
|
|
1684
|
-
if (typeof data === "string" || data instanceof Array) {
|
|
1685
|
-
color.load({
|
|
1686
|
-
value: data
|
|
1687
|
-
});
|
|
1688
|
-
} else {
|
|
1689
|
-
color.load(data);
|
|
1690
|
-
}
|
|
1691
|
-
}
|
|
1692
|
-
return color;
|
|
1693
|
-
}
|
|
1694
|
-
load(data) {
|
|
1695
|
-
super.load(data);
|
|
1696
|
-
if (!data) {
|
|
1697
|
-
return;
|
|
1698
|
-
}
|
|
1699
|
-
const colorAnimation = data.animation;
|
|
1700
|
-
if (colorAnimation !== undefined) {
|
|
1701
|
-
if (colorAnimation.enable !== undefined) {
|
|
1702
|
-
this.animation.h.load(colorAnimation);
|
|
1703
|
-
} else {
|
|
1704
|
-
this.animation.load(data.animation);
|
|
1705
|
-
}
|
|
1706
|
-
}
|
|
1707
|
-
}
|
|
1708
|
-
}
|
|
1709
|
-
class Stroke_Stroke {
|
|
1710
|
-
constructor() {
|
|
1711
|
-
this.width = 0;
|
|
1712
|
-
}
|
|
1713
|
-
load(data) {
|
|
1714
|
-
if (data === undefined) {
|
|
1715
|
-
return;
|
|
1716
|
-
}
|
|
1717
|
-
if (data.color !== undefined) {
|
|
1718
|
-
this.color = AnimatableColor.create(this.color, data.color);
|
|
1719
|
-
}
|
|
1720
|
-
if (data.width !== undefined) {
|
|
1721
|
-
this.width = data.width;
|
|
1722
|
-
}
|
|
1723
|
-
if (data.opacity !== undefined) {
|
|
1724
|
-
this.opacity = data.opacity;
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
|
-
}
|
|
1728
|
-
class BounceFactor_BounceFactor extends(null && ValueWithRandom){
|
|
1615
|
+
class BounceFactor_BounceFactor extends(null && ValueWithRandom){
|
|
1729
1616
|
constructor() {
|
|
1730
1617
|
super();
|
|
1731
1618
|
this.random.minimumValue = .1;
|
|
@@ -1766,54 +1653,6 @@
|
|
|
1766
1653
|
this.overlap.load(data.overlap);
|
|
1767
1654
|
}
|
|
1768
1655
|
}
|
|
1769
|
-
class LifeDelay_LifeDelay extends(null && ValueWithRandom){
|
|
1770
|
-
constructor() {
|
|
1771
|
-
super();
|
|
1772
|
-
this.sync = false;
|
|
1773
|
-
}
|
|
1774
|
-
load(data) {
|
|
1775
|
-
if (!data) {
|
|
1776
|
-
return;
|
|
1777
|
-
}
|
|
1778
|
-
super.load(data);
|
|
1779
|
-
if (data.sync !== undefined) {
|
|
1780
|
-
this.sync = data.sync;
|
|
1781
|
-
}
|
|
1782
|
-
}
|
|
1783
|
-
}
|
|
1784
|
-
class LifeDuration_LifeDuration extends(null && ValueWithRandom){
|
|
1785
|
-
constructor() {
|
|
1786
|
-
super();
|
|
1787
|
-
this.random.minimumValue = 1e-4;
|
|
1788
|
-
this.sync = false;
|
|
1789
|
-
}
|
|
1790
|
-
load(data) {
|
|
1791
|
-
if (data === undefined) {
|
|
1792
|
-
return;
|
|
1793
|
-
}
|
|
1794
|
-
super.load(data);
|
|
1795
|
-
if (data.sync !== undefined) {
|
|
1796
|
-
this.sync = data.sync;
|
|
1797
|
-
}
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
class Life_Life {
|
|
1801
|
-
constructor() {
|
|
1802
|
-
this.count = 0;
|
|
1803
|
-
this.delay = new LifeDelay;
|
|
1804
|
-
this.duration = new LifeDuration;
|
|
1805
|
-
}
|
|
1806
|
-
load(data) {
|
|
1807
|
-
if (data === undefined) {
|
|
1808
|
-
return;
|
|
1809
|
-
}
|
|
1810
|
-
if (data.count !== undefined) {
|
|
1811
|
-
this.count = data.count;
|
|
1812
|
-
}
|
|
1813
|
-
this.delay.load(data.delay);
|
|
1814
|
-
this.duration.load(data.duration);
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
1656
|
class SplitFactor_SplitFactor extends(null && ValueWithRandom){
|
|
1818
1657
|
constructor() {
|
|
1819
1658
|
super();
|
|
@@ -1868,314 +1707,578 @@
|
|
|
1868
1707
|
this.split.load(data.split);
|
|
1869
1708
|
}
|
|
1870
1709
|
}
|
|
1871
|
-
class
|
|
1872
|
-
constructor() {
|
|
1873
|
-
this.distance = 5;
|
|
1874
|
-
this.enable = false;
|
|
1875
|
-
this.speed = 50;
|
|
1876
|
-
}
|
|
1877
|
-
load(data) {
|
|
1878
|
-
if (!data) {
|
|
1879
|
-
return;
|
|
1880
|
-
}
|
|
1881
|
-
if (data.distance !== undefined) {
|
|
1882
|
-
this.distance = setRangeValue(data.distance);
|
|
1883
|
-
}
|
|
1884
|
-
if (data.enable !== undefined) {
|
|
1885
|
-
this.enable = data.enable;
|
|
1886
|
-
}
|
|
1887
|
-
if (data.speed !== undefined) {
|
|
1888
|
-
this.speed = setRangeValue(data.speed);
|
|
1889
|
-
}
|
|
1890
|
-
}
|
|
1891
|
-
}
|
|
1892
|
-
class Tilt_Tilt extends(null && ValueWithRandom){
|
|
1710
|
+
class LifeDelay_LifeDelay extends(null && ValueWithRandom){
|
|
1893
1711
|
constructor() {
|
|
1894
1712
|
super();
|
|
1895
|
-
this.
|
|
1896
|
-
this.direction = "clockwise";
|
|
1897
|
-
this.enable = false;
|
|
1898
|
-
this.value = 0;
|
|
1713
|
+
this.sync = false;
|
|
1899
1714
|
}
|
|
1900
1715
|
load(data) {
|
|
1901
1716
|
if (!data) {
|
|
1902
1717
|
return;
|
|
1903
1718
|
}
|
|
1904
1719
|
super.load(data);
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
this.direction = data.direction;
|
|
1908
|
-
}
|
|
1909
|
-
if (data.enable !== undefined) {
|
|
1910
|
-
this.enable = data.enable;
|
|
1720
|
+
if (data.sync !== undefined) {
|
|
1721
|
+
this.sync = data.sync;
|
|
1911
1722
|
}
|
|
1912
1723
|
}
|
|
1913
1724
|
}
|
|
1914
|
-
class
|
|
1725
|
+
class LifeDuration_LifeDuration extends(null && ValueWithRandom){
|
|
1915
1726
|
constructor() {
|
|
1916
|
-
|
|
1917
|
-
this.
|
|
1918
|
-
this.
|
|
1919
|
-
this.mode = "vertical";
|
|
1920
|
-
this.speed = 25;
|
|
1727
|
+
super();
|
|
1728
|
+
this.random.minimumValue = 1e-4;
|
|
1729
|
+
this.sync = false;
|
|
1921
1730
|
}
|
|
1922
1731
|
load(data) {
|
|
1923
|
-
if (
|
|
1732
|
+
if (data === undefined) {
|
|
1924
1733
|
return;
|
|
1925
1734
|
}
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
this.darken.load(data.darken);
|
|
1930
|
-
if (data.enable !== undefined) {
|
|
1931
|
-
this.enable = data.enable;
|
|
1932
|
-
}
|
|
1933
|
-
this.enlighten.load(data.enlighten);
|
|
1934
|
-
if (data.mode !== undefined) {
|
|
1935
|
-
this.mode = data.mode;
|
|
1936
|
-
}
|
|
1937
|
-
if (data.speed !== undefined) {
|
|
1938
|
-
this.speed = setRangeValue(data.speed);
|
|
1735
|
+
super.load(data);
|
|
1736
|
+
if (data.sync !== undefined) {
|
|
1737
|
+
this.sync = data.sync;
|
|
1939
1738
|
}
|
|
1940
1739
|
}
|
|
1941
1740
|
}
|
|
1942
|
-
class
|
|
1741
|
+
class Life_Life {
|
|
1943
1742
|
constructor() {
|
|
1944
|
-
|
|
1945
|
-
this.
|
|
1946
|
-
this.
|
|
1947
|
-
this.velocityRate = 1;
|
|
1743
|
+
this.count = 0;
|
|
1744
|
+
this.delay = new LifeDelay;
|
|
1745
|
+
this.duration = new LifeDuration;
|
|
1948
1746
|
}
|
|
1949
1747
|
load(data) {
|
|
1950
|
-
|
|
1951
|
-
if (!data) {
|
|
1748
|
+
if (data === undefined) {
|
|
1952
1749
|
return;
|
|
1953
1750
|
}
|
|
1954
|
-
if (data.
|
|
1955
|
-
this.
|
|
1956
|
-
}
|
|
1957
|
-
if (data.sizeRate !== undefined) {
|
|
1958
|
-
this.sizeRate = data.sizeRate;
|
|
1959
|
-
}
|
|
1960
|
-
if (data.velocityRate !== undefined) {
|
|
1961
|
-
this.velocityRate = data.velocityRate;
|
|
1751
|
+
if (data.count !== undefined) {
|
|
1752
|
+
this.count = data.count;
|
|
1962
1753
|
}
|
|
1754
|
+
this.delay.load(data.delay);
|
|
1755
|
+
this.duration.load(data.duration);
|
|
1963
1756
|
}
|
|
1964
1757
|
}
|
|
1965
|
-
class
|
|
1758
|
+
class PathDelay_PathDelay extends(null && ValueWithRandom){
|
|
1966
1759
|
constructor() {
|
|
1967
1760
|
super();
|
|
1968
|
-
this.value = 45;
|
|
1969
|
-
this.random.enable = false;
|
|
1970
|
-
this.random.minimumValue = 0;
|
|
1971
|
-
}
|
|
1972
|
-
load(data) {
|
|
1973
|
-
if (data === undefined) {
|
|
1974
|
-
return;
|
|
1975
|
-
}
|
|
1976
|
-
super.load(data);
|
|
1977
1761
|
}
|
|
1978
1762
|
}
|
|
1979
|
-
class
|
|
1763
|
+
class Path_Path {
|
|
1980
1764
|
constructor() {
|
|
1981
|
-
this.
|
|
1765
|
+
this.clamp = true;
|
|
1766
|
+
this.delay = new PathDelay;
|
|
1982
1767
|
this.enable = false;
|
|
1983
|
-
this.
|
|
1984
|
-
this.rotation = new OrbitRotation;
|
|
1985
|
-
this.width = 1;
|
|
1768
|
+
this.options = {};
|
|
1986
1769
|
}
|
|
1987
1770
|
load(data) {
|
|
1988
1771
|
if (data === undefined) {
|
|
1989
1772
|
return;
|
|
1990
1773
|
}
|
|
1991
|
-
|
|
1992
|
-
|
|
1774
|
+
if (data.clamp !== undefined) {
|
|
1775
|
+
this.clamp = data.clamp;
|
|
1776
|
+
}
|
|
1777
|
+
this.delay.load(data.delay);
|
|
1993
1778
|
if (data.enable !== undefined) {
|
|
1994
1779
|
this.enable = data.enable;
|
|
1995
1780
|
}
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
if (data.width !== undefined) {
|
|
2000
|
-
this.width = data.width;
|
|
2001
|
-
}
|
|
2002
|
-
if (data.radius !== undefined) {
|
|
2003
|
-
this.radius = data.radius;
|
|
2004
|
-
}
|
|
2005
|
-
if (data.color !== undefined) {
|
|
2006
|
-
this.color = OptionsColor.create(this.color, data.color);
|
|
1781
|
+
this.generator = data.generator;
|
|
1782
|
+
if (data.options) {
|
|
1783
|
+
this.options = deepExtend(this.options, data.options);
|
|
2007
1784
|
}
|
|
2008
1785
|
}
|
|
2009
1786
|
}
|
|
2010
|
-
class
|
|
1787
|
+
class Spin_Spin {
|
|
2011
1788
|
constructor() {
|
|
2012
|
-
|
|
2013
|
-
this.
|
|
2014
|
-
this.distance = 1;
|
|
2015
|
-
this.duration = 1;
|
|
2016
|
-
this.factor = 1;
|
|
2017
|
-
this.speed = 1;
|
|
1789
|
+
this.acceleration = 0;
|
|
1790
|
+
this.enable = false;
|
|
2018
1791
|
}
|
|
2019
1792
|
load(data) {
|
|
2020
|
-
super.load(data);
|
|
2021
1793
|
if (!data) {
|
|
2022
1794
|
return;
|
|
2023
1795
|
}
|
|
2024
|
-
if (data.
|
|
2025
|
-
this.
|
|
2026
|
-
}
|
|
2027
|
-
if (data.distance !== undefined) {
|
|
2028
|
-
this.distance = data.distance;
|
|
2029
|
-
}
|
|
2030
|
-
if (data.duration !== undefined) {
|
|
2031
|
-
this.duration = data.duration;
|
|
2032
|
-
}
|
|
2033
|
-
if (data.factor !== undefined) {
|
|
2034
|
-
this.factor = data.factor;
|
|
1796
|
+
if (data.acceleration !== undefined) {
|
|
1797
|
+
this.acceleration = setRangeValue(data.acceleration);
|
|
2035
1798
|
}
|
|
2036
|
-
if (data.
|
|
2037
|
-
this.
|
|
1799
|
+
if (data.enable !== undefined) {
|
|
1800
|
+
this.enable = data.enable;
|
|
2038
1801
|
}
|
|
1802
|
+
this.position = data.position ? deepExtend({}, data.position) : undefined;
|
|
2039
1803
|
}
|
|
2040
1804
|
}
|
|
2041
|
-
class
|
|
1805
|
+
class Move_Move {
|
|
2042
1806
|
constructor() {
|
|
2043
|
-
this.angle = new
|
|
2044
|
-
this.
|
|
2045
|
-
this.
|
|
1807
|
+
this.angle = new MoveAngle;
|
|
1808
|
+
this.attract = new Attract;
|
|
1809
|
+
this.decay = 0;
|
|
1810
|
+
this.distance = {};
|
|
1811
|
+
this.direction = "none";
|
|
1812
|
+
this.drift = 0;
|
|
1813
|
+
this.enable = false;
|
|
1814
|
+
this.gravity = new MoveGravity;
|
|
1815
|
+
this.path = new Path;
|
|
1816
|
+
this.outModes = new OutModes;
|
|
1817
|
+
this.random = false;
|
|
1818
|
+
this.size = false;
|
|
1819
|
+
this.speed = 2;
|
|
1820
|
+
this.spin = new Spin;
|
|
1821
|
+
this.straight = false;
|
|
1822
|
+
this.trail = new Trail;
|
|
1823
|
+
this.vibrate = false;
|
|
1824
|
+
this.warp = false;
|
|
1825
|
+
}
|
|
1826
|
+
get collisions() {
|
|
1827
|
+
return false;
|
|
1828
|
+
}
|
|
1829
|
+
set collisions(value) {}
|
|
1830
|
+
get bounce() {
|
|
1831
|
+
return this.collisions;
|
|
1832
|
+
}
|
|
1833
|
+
set bounce(value) {
|
|
1834
|
+
this.collisions = value;
|
|
1835
|
+
}
|
|
1836
|
+
get out_mode() {
|
|
1837
|
+
return this.outMode;
|
|
1838
|
+
}
|
|
1839
|
+
set out_mode(value) {
|
|
1840
|
+
this.outMode = value;
|
|
1841
|
+
}
|
|
1842
|
+
get outMode() {
|
|
1843
|
+
return this.outModes.default;
|
|
1844
|
+
}
|
|
1845
|
+
set outMode(value) {
|
|
1846
|
+
this.outModes.default = value;
|
|
1847
|
+
}
|
|
1848
|
+
get noise() {
|
|
1849
|
+
return this.path;
|
|
1850
|
+
}
|
|
1851
|
+
set noise(value) {
|
|
1852
|
+
this.path = value;
|
|
2046
1853
|
}
|
|
2047
1854
|
load(data) {
|
|
2048
|
-
|
|
1855
|
+
var _a, _b, _c;
|
|
1856
|
+
if (data === undefined) {
|
|
2049
1857
|
return;
|
|
2050
1858
|
}
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
}));
|
|
1859
|
+
if (data.angle !== undefined) {
|
|
1860
|
+
if (typeof data.angle === "number") {
|
|
1861
|
+
this.angle.value = data.angle;
|
|
1862
|
+
} else {
|
|
1863
|
+
this.angle.load(data.angle);
|
|
1864
|
+
}
|
|
2058
1865
|
}
|
|
2059
|
-
|
|
2060
|
-
|
|
1866
|
+
this.attract.load(data.attract);
|
|
1867
|
+
if (data.decay !== undefined) {
|
|
1868
|
+
this.decay = data.decay;
|
|
1869
|
+
}
|
|
1870
|
+
if (data.direction !== undefined) {
|
|
1871
|
+
this.direction = data.direction;
|
|
1872
|
+
}
|
|
1873
|
+
if (data.distance !== undefined) {
|
|
1874
|
+
this.distance = typeof data.distance === "number" ? {
|
|
1875
|
+
horizontal: data.distance,
|
|
1876
|
+
vertical: data.distance
|
|
1877
|
+
} : deepExtend({}, data.distance);
|
|
1878
|
+
}
|
|
1879
|
+
if (data.drift !== undefined) {
|
|
1880
|
+
this.drift = setRangeValue(data.drift);
|
|
1881
|
+
}
|
|
1882
|
+
if (data.enable !== undefined) {
|
|
1883
|
+
this.enable = data.enable;
|
|
1884
|
+
}
|
|
1885
|
+
this.gravity.load(data.gravity);
|
|
1886
|
+
const outMode = (_a = data.outMode) !== null && _a !== void 0 ? _a : data.out_mode;
|
|
1887
|
+
if (data.outModes !== undefined || outMode !== undefined) {
|
|
1888
|
+
if (typeof data.outModes === "string" || data.outModes === undefined && outMode !== undefined) {
|
|
1889
|
+
this.outModes.load({
|
|
1890
|
+
default: (_b = data.outModes) !== null && _b !== void 0 ? _b : outMode
|
|
1891
|
+
});
|
|
1892
|
+
} else {
|
|
1893
|
+
this.outModes.load(data.outModes);
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
this.path.load((_c = data.path) !== null && _c !== void 0 ? _c : data.noise);
|
|
1897
|
+
if (data.random !== undefined) {
|
|
1898
|
+
this.random = data.random;
|
|
1899
|
+
}
|
|
1900
|
+
if (data.size !== undefined) {
|
|
1901
|
+
this.size = data.size;
|
|
1902
|
+
}
|
|
1903
|
+
if (data.speed !== undefined) {
|
|
1904
|
+
this.speed = setRangeValue(data.speed);
|
|
1905
|
+
}
|
|
1906
|
+
this.spin.load(data.spin);
|
|
1907
|
+
if (data.straight !== undefined) {
|
|
1908
|
+
this.straight = data.straight;
|
|
1909
|
+
}
|
|
1910
|
+
this.trail.load(data.trail);
|
|
1911
|
+
if (data.vibrate !== undefined) {
|
|
1912
|
+
this.vibrate = data.vibrate;
|
|
1913
|
+
}
|
|
1914
|
+
if (data.warp !== undefined) {
|
|
1915
|
+
this.warp = data.warp;
|
|
2061
1916
|
}
|
|
2062
1917
|
}
|
|
2063
1918
|
}
|
|
2064
|
-
class
|
|
1919
|
+
class Opacity_Opacity extends(null && ValueWithRandom){
|
|
2065
1920
|
constructor() {
|
|
2066
|
-
|
|
2067
|
-
this.animation = new
|
|
2068
|
-
this.
|
|
1921
|
+
super();
|
|
1922
|
+
this.animation = new OpacityAnimation;
|
|
1923
|
+
this.random.minimumValue = .1;
|
|
1924
|
+
this.value = 1;
|
|
1925
|
+
}
|
|
1926
|
+
get anim() {
|
|
1927
|
+
return this.animation;
|
|
1928
|
+
}
|
|
1929
|
+
set anim(value) {
|
|
1930
|
+
this.animation = value;
|
|
2069
1931
|
}
|
|
2070
1932
|
load(data) {
|
|
1933
|
+
var _a;
|
|
2071
1934
|
if (!data) {
|
|
2072
1935
|
return;
|
|
2073
1936
|
}
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
this.direction = data.direction;
|
|
1937
|
+
super.load(data);
|
|
1938
|
+
const animation = (_a = data.animation) !== null && _a !== void 0 ? _a : data.anim;
|
|
1939
|
+
if (animation !== undefined) {
|
|
1940
|
+
this.animation.load(animation);
|
|
1941
|
+
this.value = setRangeValue(this.value, this.animation.enable ? this.animation.minimumValue : undefined);
|
|
2080
1942
|
}
|
|
2081
1943
|
}
|
|
2082
1944
|
}
|
|
2083
|
-
class
|
|
1945
|
+
class OrbitRotation_OrbitRotation extends(null && ValueWithRandom){
|
|
2084
1946
|
constructor() {
|
|
2085
|
-
|
|
2086
|
-
this.
|
|
1947
|
+
super();
|
|
1948
|
+
this.value = 45;
|
|
1949
|
+
this.random.enable = false;
|
|
1950
|
+
this.random.minimumValue = 0;
|
|
2087
1951
|
}
|
|
2088
1952
|
load(data) {
|
|
2089
|
-
if (
|
|
1953
|
+
if (data === undefined) {
|
|
2090
1954
|
return;
|
|
2091
1955
|
}
|
|
2092
|
-
|
|
2093
|
-
if (data.value !== undefined) {
|
|
2094
|
-
this.value = setRangeValue(data.value);
|
|
2095
|
-
}
|
|
1956
|
+
super.load(data);
|
|
2096
1957
|
}
|
|
2097
1958
|
}
|
|
2098
|
-
class
|
|
1959
|
+
class Orbit_Orbit {
|
|
2099
1960
|
constructor() {
|
|
2100
|
-
this.
|
|
2101
|
-
this.
|
|
1961
|
+
this.animation = new AnimationOptions;
|
|
1962
|
+
this.enable = false;
|
|
1963
|
+
this.opacity = 1;
|
|
1964
|
+
this.rotation = new OrbitRotation;
|
|
1965
|
+
this.width = 1;
|
|
2102
1966
|
}
|
|
2103
1967
|
load(data) {
|
|
2104
|
-
if (
|
|
1968
|
+
if (data === undefined) {
|
|
2105
1969
|
return;
|
|
2106
1970
|
}
|
|
2107
|
-
|
|
2108
|
-
|
|
1971
|
+
this.animation.load(data.animation);
|
|
1972
|
+
this.rotation.load(data.rotation);
|
|
1973
|
+
if (data.enable !== undefined) {
|
|
1974
|
+
this.enable = data.enable;
|
|
2109
1975
|
}
|
|
2110
|
-
this.value = AnimatableColor.create(this.value, data.value);
|
|
2111
1976
|
if (data.opacity !== undefined) {
|
|
2112
|
-
this.opacity =
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
1977
|
+
this.opacity = data.opacity;
|
|
1978
|
+
}
|
|
1979
|
+
if (data.width !== undefined) {
|
|
1980
|
+
this.width = data.width;
|
|
1981
|
+
}
|
|
1982
|
+
if (data.radius !== undefined) {
|
|
1983
|
+
this.radius = data.radius;
|
|
1984
|
+
}
|
|
1985
|
+
if (data.color !== undefined) {
|
|
1986
|
+
this.color = OptionsColor.create(this.color, data.color);
|
|
2118
1987
|
}
|
|
2119
1988
|
}
|
|
2120
1989
|
}
|
|
2121
|
-
class
|
|
1990
|
+
class Repulse_Repulse extends(null && ValueWithRandom){
|
|
2122
1991
|
constructor() {
|
|
2123
|
-
|
|
2124
|
-
this.
|
|
2125
|
-
this.
|
|
2126
|
-
this.
|
|
1992
|
+
super();
|
|
1993
|
+
this.enabled = false;
|
|
1994
|
+
this.distance = 1;
|
|
1995
|
+
this.duration = 1;
|
|
1996
|
+
this.factor = 1;
|
|
1997
|
+
this.speed = 1;
|
|
2127
1998
|
}
|
|
2128
1999
|
load(data) {
|
|
2000
|
+
super.load(data);
|
|
2129
2001
|
if (!data) {
|
|
2130
2002
|
return;
|
|
2131
2003
|
}
|
|
2132
|
-
if (data.
|
|
2133
|
-
this.
|
|
2004
|
+
if (data.enabled !== undefined) {
|
|
2005
|
+
this.enabled = data.enabled;
|
|
2134
2006
|
}
|
|
2135
|
-
if (data.
|
|
2136
|
-
this.
|
|
2007
|
+
if (data.distance !== undefined) {
|
|
2008
|
+
this.distance = data.distance;
|
|
2009
|
+
}
|
|
2010
|
+
if (data.duration !== undefined) {
|
|
2011
|
+
this.duration = data.duration;
|
|
2012
|
+
}
|
|
2013
|
+
if (data.factor !== undefined) {
|
|
2014
|
+
this.factor = data.factor;
|
|
2137
2015
|
}
|
|
2138
2016
|
if (data.speed !== undefined) {
|
|
2139
2017
|
this.speed = data.speed;
|
|
2140
2018
|
}
|
|
2141
|
-
if (data.sync !== undefined) {
|
|
2142
|
-
this.sync = data.sync;
|
|
2143
|
-
}
|
|
2144
2019
|
}
|
|
2145
2020
|
}
|
|
2146
|
-
class
|
|
2021
|
+
class Roll_Roll {
|
|
2147
2022
|
constructor() {
|
|
2148
|
-
this.
|
|
2023
|
+
this.darken = new RollLight;
|
|
2149
2024
|
this.enable = false;
|
|
2150
|
-
this.
|
|
2151
|
-
this.
|
|
2152
|
-
this.
|
|
2025
|
+
this.enlighten = new RollLight;
|
|
2026
|
+
this.mode = "vertical";
|
|
2027
|
+
this.speed = 25;
|
|
2153
2028
|
}
|
|
2154
2029
|
load(data) {
|
|
2155
2030
|
if (!data) {
|
|
2156
2031
|
return;
|
|
2157
2032
|
}
|
|
2158
|
-
if (data.
|
|
2159
|
-
this.
|
|
2033
|
+
if (data.backColor !== undefined) {
|
|
2034
|
+
this.backColor = OptionsColor.create(this.backColor, data.backColor);
|
|
2160
2035
|
}
|
|
2036
|
+
this.darken.load(data.darken);
|
|
2161
2037
|
if (data.enable !== undefined) {
|
|
2162
2038
|
this.enable = data.enable;
|
|
2163
2039
|
}
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
if (data.sync !== undefined) {
|
|
2168
|
-
this.sync = data.sync;
|
|
2040
|
+
this.enlighten.load(data.enlighten);
|
|
2041
|
+
if (data.mode !== undefined) {
|
|
2042
|
+
this.mode = data.mode;
|
|
2169
2043
|
}
|
|
2170
|
-
if (data.
|
|
2171
|
-
this.
|
|
2044
|
+
if (data.speed !== undefined) {
|
|
2045
|
+
this.speed = setRangeValue(data.speed);
|
|
2172
2046
|
}
|
|
2173
2047
|
}
|
|
2174
2048
|
}
|
|
2175
|
-
class
|
|
2049
|
+
class Rotate_Rotate extends(null && ValueWithRandom){
|
|
2176
2050
|
constructor() {
|
|
2177
|
-
|
|
2178
|
-
this.
|
|
2051
|
+
super();
|
|
2052
|
+
this.animation = new RotateAnimation;
|
|
2053
|
+
this.direction = "clockwise";
|
|
2054
|
+
this.path = false;
|
|
2055
|
+
this.value = 0;
|
|
2056
|
+
}
|
|
2057
|
+
load(data) {
|
|
2058
|
+
if (!data) {
|
|
2059
|
+
return;
|
|
2060
|
+
}
|
|
2061
|
+
super.load(data);
|
|
2062
|
+
if (data.direction !== undefined) {
|
|
2063
|
+
this.direction = data.direction;
|
|
2064
|
+
}
|
|
2065
|
+
this.animation.load(data.animation);
|
|
2066
|
+
if (data.path !== undefined) {
|
|
2067
|
+
this.path = data.path;
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
class Shape_Shape {
|
|
2072
|
+
constructor() {
|
|
2073
|
+
this.options = {};
|
|
2074
|
+
this.type = "circle";
|
|
2075
|
+
}
|
|
2076
|
+
get image() {
|
|
2077
|
+
var _a;
|
|
2078
|
+
return (_a = this.options["image"]) !== null && _a !== void 0 ? _a : this.options["images"];
|
|
2079
|
+
}
|
|
2080
|
+
set image(value) {
|
|
2081
|
+
this.options["image"] = value;
|
|
2082
|
+
this.options["images"] = value;
|
|
2083
|
+
}
|
|
2084
|
+
get custom() {
|
|
2085
|
+
return this.options;
|
|
2086
|
+
}
|
|
2087
|
+
set custom(value) {
|
|
2088
|
+
this.options = value;
|
|
2089
|
+
}
|
|
2090
|
+
get images() {
|
|
2091
|
+
return this.image;
|
|
2092
|
+
}
|
|
2093
|
+
set images(value) {
|
|
2094
|
+
this.image = value;
|
|
2095
|
+
}
|
|
2096
|
+
get stroke() {
|
|
2097
|
+
return [];
|
|
2098
|
+
}
|
|
2099
|
+
set stroke(_value) {}
|
|
2100
|
+
get character() {
|
|
2101
|
+
var _a;
|
|
2102
|
+
return (_a = this.options["character"]) !== null && _a !== void 0 ? _a : this.options["char"];
|
|
2103
|
+
}
|
|
2104
|
+
set character(value) {
|
|
2105
|
+
this.options["character"] = value;
|
|
2106
|
+
this.options["char"] = value;
|
|
2107
|
+
}
|
|
2108
|
+
get polygon() {
|
|
2109
|
+
var _a;
|
|
2110
|
+
return (_a = this.options["polygon"]) !== null && _a !== void 0 ? _a : this.options["star"];
|
|
2111
|
+
}
|
|
2112
|
+
set polygon(value) {
|
|
2113
|
+
this.options["polygon"] = value;
|
|
2114
|
+
this.options["star"] = value;
|
|
2115
|
+
}
|
|
2116
|
+
load(data) {
|
|
2117
|
+
var _a, _b, _c;
|
|
2118
|
+
if (data === undefined) {
|
|
2119
|
+
return;
|
|
2120
|
+
}
|
|
2121
|
+
const options = (_a = data.options) !== null && _a !== void 0 ? _a : data.custom;
|
|
2122
|
+
if (options !== undefined) {
|
|
2123
|
+
for (const shape in options) {
|
|
2124
|
+
const item = options[shape];
|
|
2125
|
+
if (item !== undefined) {
|
|
2126
|
+
this.options[shape] = deepExtend((_b = this.options[shape]) !== null && _b !== void 0 ? _b : {}, item);
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
}
|
|
2130
|
+
this.loadShape(data.character, "character", "char", true);
|
|
2131
|
+
this.loadShape(data.polygon, "polygon", "star", false);
|
|
2132
|
+
this.loadShape((_c = data.image) !== null && _c !== void 0 ? _c : data.images, "image", "images", true);
|
|
2133
|
+
if (data.type !== undefined) {
|
|
2134
|
+
this.type = data.type;
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2137
|
+
loadShape(item, mainKey, altKey, altOverride) {
|
|
2138
|
+
var _a, _b, _c, _d;
|
|
2139
|
+
if (item === undefined) {
|
|
2140
|
+
return;
|
|
2141
|
+
}
|
|
2142
|
+
if (item instanceof Array) {
|
|
2143
|
+
if (!(this.options[mainKey] instanceof Array)) {
|
|
2144
|
+
this.options[mainKey] = [];
|
|
2145
|
+
if (!this.options[altKey] || altOverride) {
|
|
2146
|
+
this.options[altKey] = [];
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
this.options[mainKey] = deepExtend((_a = this.options[mainKey]) !== null && _a !== void 0 ? _a : [], item);
|
|
2150
|
+
if (!this.options[altKey] || altOverride) {
|
|
2151
|
+
this.options[altKey] = deepExtend((_b = this.options[altKey]) !== null && _b !== void 0 ? _b : [], item);
|
|
2152
|
+
}
|
|
2153
|
+
} else {
|
|
2154
|
+
if (this.options[mainKey] instanceof Array) {
|
|
2155
|
+
this.options[mainKey] = {};
|
|
2156
|
+
if (!this.options[altKey] || altOverride) {
|
|
2157
|
+
this.options[altKey] = {};
|
|
2158
|
+
}
|
|
2159
|
+
}
|
|
2160
|
+
this.options[mainKey] = deepExtend((_c = this.options[mainKey]) !== null && _c !== void 0 ? _c : {}, item);
|
|
2161
|
+
if (!this.options[altKey] || altOverride) {
|
|
2162
|
+
this.options[altKey] = deepExtend((_d = this.options[altKey]) !== null && _d !== void 0 ? _d : {}, item);
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
class Size_Size extends(null && ValueWithRandom){
|
|
2168
|
+
constructor() {
|
|
2169
|
+
super();
|
|
2170
|
+
this.animation = new SizeAnimation;
|
|
2171
|
+
this.random.minimumValue = 1;
|
|
2172
|
+
this.value = 3;
|
|
2173
|
+
}
|
|
2174
|
+
get anim() {
|
|
2175
|
+
return this.animation;
|
|
2176
|
+
}
|
|
2177
|
+
set anim(value) {
|
|
2178
|
+
this.animation = value;
|
|
2179
|
+
}
|
|
2180
|
+
load(data) {
|
|
2181
|
+
var _a;
|
|
2182
|
+
if (!data) {
|
|
2183
|
+
return;
|
|
2184
|
+
}
|
|
2185
|
+
super.load(data);
|
|
2186
|
+
const animation = (_a = data.animation) !== null && _a !== void 0 ? _a : data.anim;
|
|
2187
|
+
if (animation !== undefined) {
|
|
2188
|
+
this.animation.load(animation);
|
|
2189
|
+
this.value = setRangeValue(this.value, this.animation.enable ? this.animation.minimumValue : undefined);
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
class Stroke_Stroke {
|
|
2194
|
+
constructor() {
|
|
2195
|
+
this.width = 0;
|
|
2196
|
+
}
|
|
2197
|
+
load(data) {
|
|
2198
|
+
if (data === undefined) {
|
|
2199
|
+
return;
|
|
2200
|
+
}
|
|
2201
|
+
if (data.color !== undefined) {
|
|
2202
|
+
this.color = AnimatableColor.create(this.color, data.color);
|
|
2203
|
+
}
|
|
2204
|
+
if (data.width !== undefined) {
|
|
2205
|
+
this.width = data.width;
|
|
2206
|
+
}
|
|
2207
|
+
if (data.opacity !== undefined) {
|
|
2208
|
+
this.opacity = data.opacity;
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
class Tilt_Tilt extends(null && ValueWithRandom){
|
|
2213
|
+
constructor() {
|
|
2214
|
+
super();
|
|
2215
|
+
this.animation = new TiltAnimation;
|
|
2216
|
+
this.direction = "clockwise";
|
|
2217
|
+
this.enable = false;
|
|
2218
|
+
this.value = 0;
|
|
2219
|
+
}
|
|
2220
|
+
load(data) {
|
|
2221
|
+
if (!data) {
|
|
2222
|
+
return;
|
|
2223
|
+
}
|
|
2224
|
+
super.load(data);
|
|
2225
|
+
this.animation.load(data.animation);
|
|
2226
|
+
if (data.direction !== undefined) {
|
|
2227
|
+
this.direction = data.direction;
|
|
2228
|
+
}
|
|
2229
|
+
if (data.enable !== undefined) {
|
|
2230
|
+
this.enable = data.enable;
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
class Wobble_Wobble {
|
|
2235
|
+
constructor() {
|
|
2236
|
+
this.distance = 5;
|
|
2237
|
+
this.enable = false;
|
|
2238
|
+
this.speed = 50;
|
|
2239
|
+
}
|
|
2240
|
+
load(data) {
|
|
2241
|
+
if (!data) {
|
|
2242
|
+
return;
|
|
2243
|
+
}
|
|
2244
|
+
if (data.distance !== undefined) {
|
|
2245
|
+
this.distance = setRangeValue(data.distance);
|
|
2246
|
+
}
|
|
2247
|
+
if (data.enable !== undefined) {
|
|
2248
|
+
this.enable = data.enable;
|
|
2249
|
+
}
|
|
2250
|
+
if (data.speed !== undefined) {
|
|
2251
|
+
this.speed = setRangeValue(data.speed);
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
class ZIndex_ZIndex extends(null && ValueWithRandom){
|
|
2256
|
+
constructor() {
|
|
2257
|
+
super();
|
|
2258
|
+
this.opacityRate = 1;
|
|
2259
|
+
this.sizeRate = 1;
|
|
2260
|
+
this.velocityRate = 1;
|
|
2261
|
+
}
|
|
2262
|
+
load(data) {
|
|
2263
|
+
super.load(data);
|
|
2264
|
+
if (!data) {
|
|
2265
|
+
return;
|
|
2266
|
+
}
|
|
2267
|
+
if (data.opacityRate !== undefined) {
|
|
2268
|
+
this.opacityRate = data.opacityRate;
|
|
2269
|
+
}
|
|
2270
|
+
if (data.sizeRate !== undefined) {
|
|
2271
|
+
this.sizeRate = data.sizeRate;
|
|
2272
|
+
}
|
|
2273
|
+
if (data.velocityRate !== undefined) {
|
|
2274
|
+
this.velocityRate = data.velocityRate;
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
class ParticlesOptions_ParticlesOptions {
|
|
2279
|
+
constructor() {
|
|
2280
|
+
this.bounce = new Bounce;
|
|
2281
|
+
this.collisions = new Collisions;
|
|
2179
2282
|
this.color = new AnimatableColor;
|
|
2180
2283
|
this.destroy = new Destroy;
|
|
2181
2284
|
this.gradient = [];
|
|
@@ -2286,27 +2389,217 @@
|
|
|
2286
2389
|
}
|
|
2287
2390
|
}
|
|
2288
2391
|
}
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
data.setCb(data.radius);
|
|
2295
|
-
}
|
|
2392
|
+
class Responsive_Responsive {
|
|
2393
|
+
constructor() {
|
|
2394
|
+
this.maxWidth = Infinity;
|
|
2395
|
+
this.options = {};
|
|
2396
|
+
this.mode = "canvas";
|
|
2296
2397
|
}
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2398
|
+
load(data) {
|
|
2399
|
+
if (!data) {
|
|
2400
|
+
return;
|
|
2401
|
+
}
|
|
2402
|
+
if (data.maxWidth !== undefined) {
|
|
2403
|
+
this.maxWidth = data.maxWidth;
|
|
2404
|
+
}
|
|
2405
|
+
if (data.mode !== undefined) {
|
|
2406
|
+
if (data.mode === "screen") {
|
|
2407
|
+
this.mode = "screen";
|
|
2408
|
+
} else {
|
|
2409
|
+
this.mode = "canvas";
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2412
|
+
if (data.options !== undefined) {
|
|
2413
|
+
this.options = deepExtend({}, data.options);
|
|
2414
|
+
}
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
class Theme_Theme {
|
|
2418
|
+
constructor() {
|
|
2419
|
+
this.name = "";
|
|
2420
|
+
this.default = new ThemeDefault;
|
|
2421
|
+
}
|
|
2422
|
+
load(data) {
|
|
2423
|
+
if (data === undefined) {
|
|
2424
|
+
return;
|
|
2425
|
+
}
|
|
2426
|
+
if (data.name !== undefined) {
|
|
2427
|
+
this.name = data.name;
|
|
2428
|
+
}
|
|
2429
|
+
this.default.load(data.default);
|
|
2430
|
+
if (data.options !== undefined) {
|
|
2431
|
+
this.options = deepExtend({}, data.options);
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
2436
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
2437
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
2438
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
2439
|
+
};
|
|
2440
|
+
var _Options_instances, _Options_findDefaultTheme;
|
|
2441
|
+
class Options_Options {
|
|
2442
|
+
constructor() {
|
|
2443
|
+
_Options_instances.add(this);
|
|
2444
|
+
this.autoPlay = true;
|
|
2445
|
+
this.background = new Background;
|
|
2446
|
+
this.backgroundMask = new BackgroundMask;
|
|
2447
|
+
this.fullScreen = new FullScreen;
|
|
2448
|
+
this.detectRetina = true;
|
|
2449
|
+
this.duration = 0;
|
|
2450
|
+
this.fpsLimit = 60;
|
|
2451
|
+
this.interactivity = new Interactivity;
|
|
2452
|
+
this.manualParticles = [];
|
|
2453
|
+
this.motion = new Motion;
|
|
2454
|
+
this.particles = new ParticlesOptions;
|
|
2455
|
+
this.pauseOnBlur = true;
|
|
2456
|
+
this.pauseOnOutsideViewport = true;
|
|
2457
|
+
this.responsive = [];
|
|
2458
|
+
this.style = {};
|
|
2459
|
+
this.themes = [];
|
|
2460
|
+
this.zLayers = 100;
|
|
2461
|
+
}
|
|
2462
|
+
get fps_limit() {
|
|
2463
|
+
return this.fpsLimit;
|
|
2464
|
+
}
|
|
2465
|
+
set fps_limit(value) {
|
|
2466
|
+
this.fpsLimit = value;
|
|
2467
|
+
}
|
|
2468
|
+
get retina_detect() {
|
|
2469
|
+
return this.detectRetina;
|
|
2470
|
+
}
|
|
2471
|
+
set retina_detect(value) {
|
|
2472
|
+
this.detectRetina = value;
|
|
2473
|
+
}
|
|
2474
|
+
get backgroundMode() {
|
|
2475
|
+
return this.fullScreen;
|
|
2476
|
+
}
|
|
2477
|
+
set backgroundMode(value) {
|
|
2478
|
+
this.fullScreen.load(value);
|
|
2479
|
+
}
|
|
2480
|
+
load(data) {
|
|
2481
|
+
var _a, _b, _c, _d, _e;
|
|
2482
|
+
if (data === undefined) {
|
|
2483
|
+
return;
|
|
2484
|
+
}
|
|
2485
|
+
if (data.preset !== undefined) {
|
|
2486
|
+
if (data.preset instanceof Array) {
|
|
2487
|
+
for (const preset of data.preset) {
|
|
2488
|
+
this.importPreset(preset);
|
|
2489
|
+
}
|
|
2490
|
+
} else {
|
|
2491
|
+
this.importPreset(data.preset);
|
|
2492
|
+
}
|
|
2493
|
+
}
|
|
2494
|
+
if (data.autoPlay !== undefined) {
|
|
2495
|
+
this.autoPlay = data.autoPlay;
|
|
2496
|
+
}
|
|
2497
|
+
const detectRetina = (_a = data.detectRetina) !== null && _a !== void 0 ? _a : data.retina_detect;
|
|
2498
|
+
if (detectRetina !== undefined) {
|
|
2499
|
+
this.detectRetina = detectRetina;
|
|
2500
|
+
}
|
|
2501
|
+
if (data.duration !== undefined) {
|
|
2502
|
+
this.duration = data.duration;
|
|
2503
|
+
}
|
|
2504
|
+
const fpsLimit = (_b = data.fpsLimit) !== null && _b !== void 0 ? _b : data.fps_limit;
|
|
2505
|
+
if (fpsLimit !== undefined) {
|
|
2506
|
+
this.fpsLimit = fpsLimit;
|
|
2507
|
+
}
|
|
2508
|
+
if (data.pauseOnBlur !== undefined) {
|
|
2509
|
+
this.pauseOnBlur = data.pauseOnBlur;
|
|
2510
|
+
}
|
|
2511
|
+
if (data.pauseOnOutsideViewport !== undefined) {
|
|
2512
|
+
this.pauseOnOutsideViewport = data.pauseOnOutsideViewport;
|
|
2513
|
+
}
|
|
2514
|
+
if (data.zLayers !== undefined) {
|
|
2515
|
+
this.zLayers = data.zLayers;
|
|
2516
|
+
}
|
|
2517
|
+
this.background.load(data.background);
|
|
2518
|
+
const fullScreen = (_c = data.fullScreen) !== null && _c !== void 0 ? _c : data.backgroundMode;
|
|
2519
|
+
if (typeof fullScreen === "boolean") {
|
|
2520
|
+
this.fullScreen.enable = fullScreen;
|
|
2521
|
+
} else {
|
|
2522
|
+
this.fullScreen.load(fullScreen);
|
|
2523
|
+
}
|
|
2524
|
+
this.backgroundMask.load(data.backgroundMask);
|
|
2525
|
+
this.interactivity.load(data.interactivity);
|
|
2526
|
+
if (data.manualParticles !== undefined) {
|
|
2527
|
+
this.manualParticles = data.manualParticles.map((t => {
|
|
2528
|
+
const tmp = new ManualParticle;
|
|
2529
|
+
tmp.load(t);
|
|
2530
|
+
return tmp;
|
|
2531
|
+
}));
|
|
2532
|
+
}
|
|
2533
|
+
this.motion.load(data.motion);
|
|
2534
|
+
this.particles.load(data.particles);
|
|
2535
|
+
this.style = deepExtend(this.style, data.style);
|
|
2536
|
+
Plugins.loadOptions(this, data);
|
|
2537
|
+
if (data.responsive !== undefined) {
|
|
2538
|
+
for (const responsive of data.responsive) {
|
|
2539
|
+
const optResponsive = new Responsive;
|
|
2540
|
+
optResponsive.load(responsive);
|
|
2541
|
+
this.responsive.push(optResponsive);
|
|
2542
|
+
}
|
|
2543
|
+
}
|
|
2544
|
+
this.responsive.sort(((a, b) => a.maxWidth - b.maxWidth));
|
|
2545
|
+
if (data.themes !== undefined) {
|
|
2546
|
+
for (const theme of data.themes) {
|
|
2547
|
+
const optTheme = new Theme;
|
|
2548
|
+
optTheme.load(theme);
|
|
2549
|
+
this.themes.push(optTheme);
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
this.defaultDarkTheme = (_d = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "dark")) === null || _d === void 0 ? void 0 : _d.name;
|
|
2553
|
+
this.defaultLightTheme = (_e = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "light")) === null || _e === void 0 ? void 0 : _e.name;
|
|
2554
|
+
}
|
|
2555
|
+
setTheme(name) {
|
|
2556
|
+
if (name) {
|
|
2557
|
+
const chosenTheme = this.themes.find((theme => theme.name === name));
|
|
2558
|
+
if (chosenTheme) {
|
|
2559
|
+
this.load(chosenTheme.options);
|
|
2560
|
+
}
|
|
2561
|
+
} else {
|
|
2562
|
+
const mediaMatch = typeof matchMedia !== "undefined" && matchMedia("(prefers-color-scheme: dark)"), clientDarkMode = mediaMatch && mediaMatch.matches, defaultTheme = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, clientDarkMode ? "dark" : "light");
|
|
2563
|
+
if (defaultTheme) {
|
|
2564
|
+
this.load(defaultTheme.options);
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
setResponsive(width, pxRatio, defaultOptions) {
|
|
2569
|
+
this.load(defaultOptions);
|
|
2570
|
+
const responsiveOptions = this.responsive.find((t => t.mode === "screen" && screen ? t.maxWidth * pxRatio > screen.availWidth : t.maxWidth * pxRatio > width));
|
|
2571
|
+
this.load(responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.options);
|
|
2572
|
+
return responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.maxWidth;
|
|
2573
|
+
}
|
|
2574
|
+
importPreset(preset) {
|
|
2575
|
+
this.load(Plugins.getPreset(preset));
|
|
2576
|
+
}
|
|
2577
|
+
}
|
|
2578
|
+
_Options_instances = new WeakSet, _Options_findDefaultTheme = function _Options_findDefaultTheme(mode) {
|
|
2579
|
+
var _a;
|
|
2580
|
+
return (_a = this.themes.find((theme => theme.default.value && theme.default.mode === mode))) !== null && _a !== void 0 ? _a : this.themes.find((theme => theme.default.value && theme.default.mode === "any"));
|
|
2581
|
+
};
|
|
2582
|
+
const fixOutMode = data => {
|
|
2583
|
+
if (isInArray(data.outMode, data.checkModes) || isInArray(data.outMode, data.checkModes)) {
|
|
2584
|
+
if (data.coord > data.maxCoord - data.radius * 2) {
|
|
2585
|
+
data.setCb(-data.radius);
|
|
2586
|
+
} else if (data.coord < data.radius * 2) {
|
|
2587
|
+
data.setCb(data.radius);
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
};
|
|
2591
|
+
class Particle_Particle {
|
|
2592
|
+
constructor(id, container, position, overrideOptions, group) {
|
|
2593
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2594
|
+
this.id = id;
|
|
2595
|
+
this.container = container;
|
|
2596
|
+
this.group = group;
|
|
2597
|
+
this.fill = true;
|
|
2598
|
+
this.close = true;
|
|
2599
|
+
this.lastPathTime = 0;
|
|
2600
|
+
this.destroyed = false;
|
|
2601
|
+
this.unbreakable = false;
|
|
2602
|
+
this.splitCount = 0;
|
|
2310
2603
|
this.misplaced = false;
|
|
2311
2604
|
this.retina = {
|
|
2312
2605
|
maxDistance: {}
|
|
@@ -2999,320 +3292,25 @@
|
|
|
2999
3292
|
props.linksWidth = options.links.width * ratio;
|
|
3000
3293
|
props.moveDrift = getRangeValue(options.move.drift) * ratio;
|
|
3001
3294
|
props.moveSpeed = getRangeValue(options.move.speed) * ratio;
|
|
3002
|
-
props.sizeAnimationSpeed = options.size.animation.speed * ratio;
|
|
3003
|
-
if (particle.spin) {
|
|
3004
|
-
props.spinAcceleration = getRangeValue(options.move.spin.acceleration) * ratio;
|
|
3005
|
-
}
|
|
3006
|
-
const maxDistance = props.maxDistance;
|
|
3007
|
-
maxDistance.horizontal = moveDistance.horizontal !== undefined ? moveDistance.horizontal * ratio : undefined;
|
|
3008
|
-
maxDistance.vertical = moveDistance.vertical !== undefined ? moveDistance.vertical * ratio : undefined;
|
|
3009
|
-
props.maxSpeed = options.move.gravity.maxSpeed * ratio;
|
|
3010
|
-
}
|
|
3011
|
-
handleMotionChange(mediaQuery) {
|
|
3012
|
-
const options = this.container.actualOptions;
|
|
3013
|
-
if (mediaQuery.matches) {
|
|
3014
|
-
const motion = options.motion;
|
|
3015
|
-
this.reduceFactor = motion.disable ? 0 : motion.reduce.value ? 1 / motion.reduce.factor : 1;
|
|
3016
|
-
} else {
|
|
3017
|
-
this.reduceFactor = 1;
|
|
3018
|
-
}
|
|
3019
|
-
}
|
|
3020
|
-
}
|
|
3021
|
-
class Trail_Trail {
|
|
3022
|
-
constructor() {
|
|
3023
|
-
this.delay = 1;
|
|
3024
|
-
this.pauseOnStop = false;
|
|
3025
|
-
this.quantity = 1;
|
|
3026
|
-
}
|
|
3027
|
-
load(data) {
|
|
3028
|
-
if (data === undefined) {
|
|
3029
|
-
return;
|
|
3030
|
-
}
|
|
3031
|
-
if (data.delay !== undefined) {
|
|
3032
|
-
this.delay = data.delay;
|
|
3033
|
-
}
|
|
3034
|
-
if (data.quantity !== undefined) {
|
|
3035
|
-
this.quantity = data.quantity;
|
|
3036
|
-
}
|
|
3037
|
-
if (data.particles !== undefined) {
|
|
3038
|
-
this.particles = deepExtend({}, data.particles);
|
|
3039
|
-
}
|
|
3040
|
-
if (data.pauseOnStop !== undefined) {
|
|
3041
|
-
this.pauseOnStop = data.pauseOnStop;
|
|
3042
|
-
}
|
|
3043
|
-
}
|
|
3044
|
-
}
|
|
3045
|
-
class Modes_Modes {
|
|
3046
|
-
constructor() {
|
|
3047
|
-
this.attract = new Attract;
|
|
3048
|
-
this.bounce = new Bounce;
|
|
3049
|
-
this.bubble = new Bubble;
|
|
3050
|
-
this.connect = new Connect;
|
|
3051
|
-
this.grab = new Grab;
|
|
3052
|
-
this.light = new Light;
|
|
3053
|
-
this.push = new Push;
|
|
3054
|
-
this.remove = new Remove;
|
|
3055
|
-
this.repulse = new Repulse;
|
|
3056
|
-
this.slow = new Slow;
|
|
3057
|
-
this.trail = new Trail;
|
|
3058
|
-
}
|
|
3059
|
-
load(data) {
|
|
3060
|
-
if (data === undefined) {
|
|
3061
|
-
return;
|
|
3062
|
-
}
|
|
3063
|
-
this.attract.load(data.attract);
|
|
3064
|
-
this.bubble.load(data.bubble);
|
|
3065
|
-
this.connect.load(data.connect);
|
|
3066
|
-
this.grab.load(data.grab);
|
|
3067
|
-
this.light.load(data.light);
|
|
3068
|
-
this.push.load(data.push);
|
|
3069
|
-
this.remove.load(data.remove);
|
|
3070
|
-
this.repulse.load(data.repulse);
|
|
3071
|
-
this.slow.load(data.slow);
|
|
3072
|
-
this.trail.load(data.trail);
|
|
3073
|
-
}
|
|
3074
|
-
}
|
|
3075
|
-
class Interactivity_Interactivity {
|
|
3076
|
-
constructor() {
|
|
3077
|
-
this.detectsOn = "window";
|
|
3078
|
-
this.events = new Events;
|
|
3079
|
-
this.modes = new Modes;
|
|
3080
|
-
}
|
|
3081
|
-
get detect_on() {
|
|
3082
|
-
return this.detectsOn;
|
|
3083
|
-
}
|
|
3084
|
-
set detect_on(value) {
|
|
3085
|
-
this.detectsOn = value;
|
|
3086
|
-
}
|
|
3087
|
-
load(data) {
|
|
3088
|
-
var _a, _b, _c;
|
|
3089
|
-
if (data === undefined) {
|
|
3090
|
-
return;
|
|
3091
|
-
}
|
|
3092
|
-
const detectsOn = (_a = data.detectsOn) !== null && _a !== void 0 ? _a : data.detect_on;
|
|
3093
|
-
if (detectsOn !== undefined) {
|
|
3094
|
-
this.detectsOn = detectsOn;
|
|
3095
|
-
}
|
|
3096
|
-
this.events.load(data.events);
|
|
3097
|
-
this.modes.load(data.modes);
|
|
3098
|
-
if (((_c = (_b = data.modes) === null || _b === void 0 ? void 0 : _b.slow) === null || _c === void 0 ? void 0 : _c.active) === true) {
|
|
3099
|
-
if (this.events.onHover.mode instanceof Array) {
|
|
3100
|
-
if (this.events.onHover.mode.indexOf("slow") < 0) {
|
|
3101
|
-
this.events.onHover.mode.push("slow");
|
|
3102
|
-
}
|
|
3103
|
-
} else if (this.events.onHover.mode !== "slow") {
|
|
3104
|
-
this.events.onHover.mode = [ this.events.onHover.mode, "slow" ];
|
|
3105
|
-
}
|
|
3106
|
-
}
|
|
3107
|
-
}
|
|
3108
|
-
}
|
|
3109
|
-
class Theme_Theme {
|
|
3110
|
-
constructor() {
|
|
3111
|
-
this.name = "";
|
|
3112
|
-
this.default = new ThemeDefault;
|
|
3113
|
-
}
|
|
3114
|
-
load(data) {
|
|
3115
|
-
if (data === undefined) {
|
|
3116
|
-
return;
|
|
3117
|
-
}
|
|
3118
|
-
if (data.name !== undefined) {
|
|
3119
|
-
this.name = data.name;
|
|
3120
|
-
}
|
|
3121
|
-
this.default.load(data.default);
|
|
3122
|
-
if (data.options !== undefined) {
|
|
3123
|
-
this.options = deepExtend({}, data.options);
|
|
3124
|
-
}
|
|
3125
|
-
}
|
|
3126
|
-
}
|
|
3127
|
-
class ManualParticle_ManualParticle {
|
|
3128
|
-
load(data) {
|
|
3129
|
-
var _a, _b;
|
|
3130
|
-
if (!data) {
|
|
3131
|
-
return;
|
|
3132
|
-
}
|
|
3133
|
-
if (data.position !== undefined) {
|
|
3134
|
-
this.position = {
|
|
3135
|
-
x: (_a = data.position.x) !== null && _a !== void 0 ? _a : 50,
|
|
3136
|
-
y: (_b = data.position.y) !== null && _b !== void 0 ? _b : 50
|
|
3137
|
-
};
|
|
3138
|
-
}
|
|
3139
|
-
if (data.options !== undefined) {
|
|
3140
|
-
this.options = deepExtend({}, data.options);
|
|
3141
|
-
}
|
|
3142
|
-
}
|
|
3143
|
-
}
|
|
3144
|
-
class Responsive_Responsive {
|
|
3145
|
-
constructor() {
|
|
3146
|
-
this.maxWidth = Infinity;
|
|
3147
|
-
this.options = {};
|
|
3148
|
-
this.mode = "canvas";
|
|
3149
|
-
}
|
|
3150
|
-
load(data) {
|
|
3151
|
-
if (!data) {
|
|
3152
|
-
return;
|
|
3153
|
-
}
|
|
3154
|
-
if (data.maxWidth !== undefined) {
|
|
3155
|
-
this.maxWidth = data.maxWidth;
|
|
3156
|
-
}
|
|
3157
|
-
if (data.mode !== undefined) {
|
|
3158
|
-
if (data.mode === "screen") {
|
|
3159
|
-
this.mode = "screen";
|
|
3160
|
-
} else {
|
|
3161
|
-
this.mode = "canvas";
|
|
3162
|
-
}
|
|
3163
|
-
}
|
|
3164
|
-
if (data.options !== undefined) {
|
|
3165
|
-
this.options = deepExtend({}, data.options);
|
|
3166
|
-
}
|
|
3167
|
-
}
|
|
3168
|
-
}
|
|
3169
|
-
var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
3170
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3171
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
3172
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
3173
|
-
};
|
|
3174
|
-
var _Options_instances, _Options_findDefaultTheme;
|
|
3175
|
-
class Options_Options {
|
|
3176
|
-
constructor() {
|
|
3177
|
-
_Options_instances.add(this);
|
|
3178
|
-
this.autoPlay = true;
|
|
3179
|
-
this.background = new Background;
|
|
3180
|
-
this.backgroundMask = new BackgroundMask;
|
|
3181
|
-
this.fullScreen = new FullScreen;
|
|
3182
|
-
this.detectRetina = true;
|
|
3183
|
-
this.duration = 0;
|
|
3184
|
-
this.fpsLimit = 60;
|
|
3185
|
-
this.interactivity = new Interactivity;
|
|
3186
|
-
this.manualParticles = [];
|
|
3187
|
-
this.motion = new Motion;
|
|
3188
|
-
this.particles = new ParticlesOptions;
|
|
3189
|
-
this.pauseOnBlur = true;
|
|
3190
|
-
this.pauseOnOutsideViewport = true;
|
|
3191
|
-
this.responsive = [];
|
|
3192
|
-
this.style = {};
|
|
3193
|
-
this.themes = [];
|
|
3194
|
-
this.zLayers = 100;
|
|
3195
|
-
}
|
|
3196
|
-
get fps_limit() {
|
|
3197
|
-
return this.fpsLimit;
|
|
3198
|
-
}
|
|
3199
|
-
set fps_limit(value) {
|
|
3200
|
-
this.fpsLimit = value;
|
|
3201
|
-
}
|
|
3202
|
-
get retina_detect() {
|
|
3203
|
-
return this.detectRetina;
|
|
3204
|
-
}
|
|
3205
|
-
set retina_detect(value) {
|
|
3206
|
-
this.detectRetina = value;
|
|
3207
|
-
}
|
|
3208
|
-
get backgroundMode() {
|
|
3209
|
-
return this.fullScreen;
|
|
3210
|
-
}
|
|
3211
|
-
set backgroundMode(value) {
|
|
3212
|
-
this.fullScreen.load(value);
|
|
3213
|
-
}
|
|
3214
|
-
load(data) {
|
|
3215
|
-
var _a, _b, _c, _d, _e;
|
|
3216
|
-
if (data === undefined) {
|
|
3217
|
-
return;
|
|
3218
|
-
}
|
|
3219
|
-
if (data.preset !== undefined) {
|
|
3220
|
-
if (data.preset instanceof Array) {
|
|
3221
|
-
for (const preset of data.preset) {
|
|
3222
|
-
this.importPreset(preset);
|
|
3223
|
-
}
|
|
3224
|
-
} else {
|
|
3225
|
-
this.importPreset(data.preset);
|
|
3226
|
-
}
|
|
3227
|
-
}
|
|
3228
|
-
if (data.autoPlay !== undefined) {
|
|
3229
|
-
this.autoPlay = data.autoPlay;
|
|
3230
|
-
}
|
|
3231
|
-
const detectRetina = (_a = data.detectRetina) !== null && _a !== void 0 ? _a : data.retina_detect;
|
|
3232
|
-
if (detectRetina !== undefined) {
|
|
3233
|
-
this.detectRetina = detectRetina;
|
|
3234
|
-
}
|
|
3235
|
-
if (data.duration !== undefined) {
|
|
3236
|
-
this.duration = data.duration;
|
|
3237
|
-
}
|
|
3238
|
-
const fpsLimit = (_b = data.fpsLimit) !== null && _b !== void 0 ? _b : data.fps_limit;
|
|
3239
|
-
if (fpsLimit !== undefined) {
|
|
3240
|
-
this.fpsLimit = fpsLimit;
|
|
3241
|
-
}
|
|
3242
|
-
if (data.pauseOnBlur !== undefined) {
|
|
3243
|
-
this.pauseOnBlur = data.pauseOnBlur;
|
|
3244
|
-
}
|
|
3245
|
-
if (data.pauseOnOutsideViewport !== undefined) {
|
|
3246
|
-
this.pauseOnOutsideViewport = data.pauseOnOutsideViewport;
|
|
3247
|
-
}
|
|
3248
|
-
if (data.zLayers !== undefined) {
|
|
3249
|
-
this.zLayers = data.zLayers;
|
|
3250
|
-
}
|
|
3251
|
-
this.background.load(data.background);
|
|
3252
|
-
const fullScreen = (_c = data.fullScreen) !== null && _c !== void 0 ? _c : data.backgroundMode;
|
|
3253
|
-
if (typeof fullScreen === "boolean") {
|
|
3254
|
-
this.fullScreen.enable = fullScreen;
|
|
3255
|
-
} else {
|
|
3256
|
-
this.fullScreen.load(fullScreen);
|
|
3257
|
-
}
|
|
3258
|
-
this.backgroundMask.load(data.backgroundMask);
|
|
3259
|
-
this.interactivity.load(data.interactivity);
|
|
3260
|
-
if (data.manualParticles !== undefined) {
|
|
3261
|
-
this.manualParticles = data.manualParticles.map((t => {
|
|
3262
|
-
const tmp = new ManualParticle;
|
|
3263
|
-
tmp.load(t);
|
|
3264
|
-
return tmp;
|
|
3265
|
-
}));
|
|
3266
|
-
}
|
|
3267
|
-
this.motion.load(data.motion);
|
|
3268
|
-
this.particles.load(data.particles);
|
|
3269
|
-
this.style = deepExtend(this.style, data.style);
|
|
3270
|
-
Plugins.loadOptions(this, data);
|
|
3271
|
-
if (data.responsive !== undefined) {
|
|
3272
|
-
for (const responsive of data.responsive) {
|
|
3273
|
-
const optResponsive = new Responsive;
|
|
3274
|
-
optResponsive.load(responsive);
|
|
3275
|
-
this.responsive.push(optResponsive);
|
|
3276
|
-
}
|
|
3277
|
-
}
|
|
3278
|
-
this.responsive.sort(((a, b) => a.maxWidth - b.maxWidth));
|
|
3279
|
-
if (data.themes !== undefined) {
|
|
3280
|
-
for (const theme of data.themes) {
|
|
3281
|
-
const optTheme = new Theme;
|
|
3282
|
-
optTheme.load(theme);
|
|
3283
|
-
this.themes.push(optTheme);
|
|
3284
|
-
}
|
|
3295
|
+
props.sizeAnimationSpeed = options.size.animation.speed * ratio;
|
|
3296
|
+
if (particle.spin) {
|
|
3297
|
+
props.spinAcceleration = getRangeValue(options.move.spin.acceleration) * ratio;
|
|
3285
3298
|
}
|
|
3286
|
-
|
|
3287
|
-
|
|
3299
|
+
const maxDistance = props.maxDistance;
|
|
3300
|
+
maxDistance.horizontal = moveDistance.horizontal !== undefined ? moveDistance.horizontal * ratio : undefined;
|
|
3301
|
+
maxDistance.vertical = moveDistance.vertical !== undefined ? moveDistance.vertical * ratio : undefined;
|
|
3302
|
+
props.maxSpeed = options.move.gravity.maxSpeed * ratio;
|
|
3288
3303
|
}
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
}
|
|
3304
|
+
handleMotionChange(mediaQuery) {
|
|
3305
|
+
const options = this.container.actualOptions;
|
|
3306
|
+
if (mediaQuery.matches) {
|
|
3307
|
+
const motion = options.motion;
|
|
3308
|
+
this.reduceFactor = motion.disable ? 0 : motion.reduce.value ? 1 / motion.reduce.factor : 1;
|
|
3295
3309
|
} else {
|
|
3296
|
-
|
|
3297
|
-
if (defaultTheme) {
|
|
3298
|
-
this.load(defaultTheme.options);
|
|
3299
|
-
}
|
|
3310
|
+
this.reduceFactor = 1;
|
|
3300
3311
|
}
|
|
3301
3312
|
}
|
|
3302
|
-
setResponsive(width, pxRatio, defaultOptions) {
|
|
3303
|
-
this.load(defaultOptions);
|
|
3304
|
-
const responsiveOptions = this.responsive.find((t => t.mode === "screen" && screen ? t.maxWidth * pxRatio > screen.availWidth : t.maxWidth * pxRatio > width));
|
|
3305
|
-
this.load(responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.options);
|
|
3306
|
-
return responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.maxWidth;
|
|
3307
|
-
}
|
|
3308
|
-
importPreset(preset) {
|
|
3309
|
-
this.load(Plugins.getPreset(preset));
|
|
3310
|
-
}
|
|
3311
3313
|
}
|
|
3312
|
-
_Options_instances = new WeakSet, _Options_findDefaultTheme = function _Options_findDefaultTheme(mode) {
|
|
3313
|
-
var _a;
|
|
3314
|
-
return (_a = this.themes.find((theme => theme.default.value && theme.default.mode === mode))) !== null && _a !== void 0 ? _a : this.themes.find((theme => theme.default.value && theme.default.mode === "any"));
|
|
3315
|
-
};
|
|
3316
3314
|
class Container_Container {
|
|
3317
3315
|
constructor(id, sourceOptions, ...presets) {
|
|
3318
3316
|
this.id = id;
|
|
@@ -4905,35 +4903,142 @@
|
|
|
4905
4903
|
l: color.l + (type === "darken" ? -1 : 1) * value
|
|
4906
4904
|
};
|
|
4907
4905
|
}
|
|
4906
|
+
class ValueWithRandom_ValueWithRandom {
|
|
4907
|
+
constructor() {
|
|
4908
|
+
this.random = new Random;
|
|
4909
|
+
this.value = 0;
|
|
4910
|
+
}
|
|
4911
|
+
load(data) {
|
|
4912
|
+
if (!data) {
|
|
4913
|
+
return;
|
|
4914
|
+
}
|
|
4915
|
+
if (typeof data.random === "boolean") {
|
|
4916
|
+
this.random.enable = data.random;
|
|
4917
|
+
} else {
|
|
4918
|
+
this.random.load(data.random);
|
|
4919
|
+
}
|
|
4920
|
+
if (data.value !== undefined) {
|
|
4921
|
+
this.value = NumberUtils_setRangeValue(data.value, this.random.enable ? this.random.minimumValue : undefined);
|
|
4922
|
+
}
|
|
4923
|
+
}
|
|
4924
|
+
}
|
|
4925
|
+
class AbsorberSize extends ValueWithRandom_ValueWithRandom {
|
|
4926
|
+
constructor() {
|
|
4927
|
+
super();
|
|
4928
|
+
this.density = 5;
|
|
4929
|
+
this.random.minimumValue = 1;
|
|
4930
|
+
this.value = 50;
|
|
4931
|
+
this.limit = new AbsorberSizeLimit;
|
|
4932
|
+
}
|
|
4933
|
+
load(data) {
|
|
4934
|
+
if (!data) {
|
|
4935
|
+
return;
|
|
4936
|
+
}
|
|
4937
|
+
super.load(data);
|
|
4938
|
+
if (data.density !== undefined) {
|
|
4939
|
+
this.density = data.density;
|
|
4940
|
+
}
|
|
4941
|
+
if (typeof data.limit === "number") {
|
|
4942
|
+
this.limit.radius = data.limit;
|
|
4943
|
+
} else {
|
|
4944
|
+
this.limit.load(data.limit);
|
|
4945
|
+
}
|
|
4946
|
+
}
|
|
4947
|
+
}
|
|
4948
|
+
class OptionsColor_OptionsColor {
|
|
4949
|
+
constructor() {
|
|
4950
|
+
this.value = "#fff";
|
|
4951
|
+
}
|
|
4952
|
+
static create(source, data) {
|
|
4953
|
+
const color = new OptionsColor_OptionsColor;
|
|
4954
|
+
color.load(source);
|
|
4955
|
+
if (data !== undefined) {
|
|
4956
|
+
if (typeof data === "string" || data instanceof Array) {
|
|
4957
|
+
color.load({
|
|
4958
|
+
value: data
|
|
4959
|
+
});
|
|
4960
|
+
} else {
|
|
4961
|
+
color.load(data);
|
|
4962
|
+
}
|
|
4963
|
+
}
|
|
4964
|
+
return color;
|
|
4965
|
+
}
|
|
4966
|
+
load(data) {
|
|
4967
|
+
if ((data === null || data === void 0 ? void 0 : data.value) === undefined) {
|
|
4968
|
+
return;
|
|
4969
|
+
}
|
|
4970
|
+
this.value = data.value;
|
|
4971
|
+
}
|
|
4972
|
+
}
|
|
4973
|
+
class Absorber {
|
|
4974
|
+
constructor() {
|
|
4975
|
+
this.color = new OptionsColor_OptionsColor;
|
|
4976
|
+
this.color.value = "#000000";
|
|
4977
|
+
this.draggable = false;
|
|
4978
|
+
this.opacity = 1;
|
|
4979
|
+
this.destroy = true;
|
|
4980
|
+
this.orbits = false;
|
|
4981
|
+
this.size = new AbsorberSize;
|
|
4982
|
+
}
|
|
4983
|
+
load(data) {
|
|
4984
|
+
if (data === undefined) {
|
|
4985
|
+
return;
|
|
4986
|
+
}
|
|
4987
|
+
if (data.color !== undefined) {
|
|
4988
|
+
this.color = OptionsColor_OptionsColor.create(this.color, data.color);
|
|
4989
|
+
}
|
|
4990
|
+
if (data.draggable !== undefined) {
|
|
4991
|
+
this.draggable = data.draggable;
|
|
4992
|
+
}
|
|
4993
|
+
this.name = data.name;
|
|
4994
|
+
if (data.opacity !== undefined) {
|
|
4995
|
+
this.opacity = data.opacity;
|
|
4996
|
+
}
|
|
4997
|
+
if (data.position !== undefined) {
|
|
4998
|
+
this.position = {
|
|
4999
|
+
x: data.position.x,
|
|
5000
|
+
y: data.position.y
|
|
5001
|
+
};
|
|
5002
|
+
}
|
|
5003
|
+
if (data.size !== undefined) {
|
|
5004
|
+
this.size.load(data.size);
|
|
5005
|
+
}
|
|
5006
|
+
if (data.destroy !== undefined) {
|
|
5007
|
+
this.destroy = data.destroy;
|
|
5008
|
+
}
|
|
5009
|
+
if (data.orbits !== undefined) {
|
|
5010
|
+
this.orbits = data.orbits;
|
|
5011
|
+
}
|
|
5012
|
+
}
|
|
5013
|
+
}
|
|
4908
5014
|
class AbsorberInstance {
|
|
4909
5015
|
constructor(absorbers, container, options, position) {
|
|
4910
|
-
var _a, _b, _c
|
|
5016
|
+
var _a, _b, _c;
|
|
4911
5017
|
this.absorbers = absorbers;
|
|
4912
5018
|
this.container = container;
|
|
4913
5019
|
this.initialPosition = position ? Vector_Vector.create(position.x, position.y) : undefined;
|
|
4914
|
-
|
|
5020
|
+
if (options instanceof Absorber) {
|
|
5021
|
+
this.options = options;
|
|
5022
|
+
} else {
|
|
5023
|
+
this.options = new Absorber;
|
|
5024
|
+
this.options.load(options);
|
|
5025
|
+
}
|
|
4915
5026
|
this.dragging = false;
|
|
4916
5027
|
this.name = this.options.name;
|
|
4917
5028
|
this.opacity = this.options.opacity;
|
|
4918
|
-
this.size = NumberUtils_getRangeValue(options.size.value) * container.retina.pixelRatio;
|
|
4919
|
-
this.mass = this.size * options.size.density * container.retina.reduceFactor;
|
|
4920
|
-
const limit = options.size.limit;
|
|
4921
|
-
this.limit =
|
|
4922
|
-
radius: limit * container.retina.pixelRatio * container.retina.reduceFactor,
|
|
4923
|
-
mass:
|
|
4924
|
-
} : {
|
|
4925
|
-
radius: ((_a = limit === null || limit === void 0 ? void 0 : limit.radius) !== null && _a !== void 0 ? _a : 0) * container.retina.pixelRatio * container.retina.reduceFactor,
|
|
4926
|
-
mass: (_b = limit === null || limit === void 0 ? void 0 : limit.mass) !== null && _b !== void 0 ? _b : 0
|
|
5029
|
+
this.size = NumberUtils_getRangeValue(this.options.size.value) * container.retina.pixelRatio;
|
|
5030
|
+
this.mass = this.size * this.options.size.density * container.retina.reduceFactor;
|
|
5031
|
+
const limit = this.options.size.limit;
|
|
5032
|
+
this.limit = {
|
|
5033
|
+
radius: limit.radius * container.retina.pixelRatio * container.retina.reduceFactor,
|
|
5034
|
+
mass: limit.mass
|
|
4927
5035
|
};
|
|
4928
|
-
|
|
4929
|
-
value: options.color
|
|
4930
|
-
} : options.color;
|
|
4931
|
-
this.color = (_c = ColorUtils_colorToRgb(color)) !== null && _c !== void 0 ? _c : {
|
|
5036
|
+
this.color = (_a = ColorUtils_colorToRgb(this.options.color)) !== null && _a !== void 0 ? _a : {
|
|
4932
5037
|
b: 0,
|
|
4933
5038
|
g: 0,
|
|
4934
5039
|
r: 0
|
|
4935
5040
|
};
|
|
4936
|
-
this.position = (
|
|
5041
|
+
this.position = (_c = (_b = this.initialPosition) === null || _b === void 0 ? void 0 : _b.copy()) !== null && _c !== void 0 ? _c : this.calcPosition();
|
|
4937
5042
|
}
|
|
4938
5043
|
attract(particle) {
|
|
4939
5044
|
const container = this.container;
|
|
@@ -5048,112 +5153,6 @@
|
|
|
5048
5153
|
}
|
|
5049
5154
|
}
|
|
5050
5155
|
}
|
|
5051
|
-
class AbsorberSizeLimit {
|
|
5052
|
-
constructor() {
|
|
5053
|
-
this.radius = 0;
|
|
5054
|
-
this.mass = 0;
|
|
5055
|
-
}
|
|
5056
|
-
load(data) {
|
|
5057
|
-
if (!data) {
|
|
5058
|
-
return;
|
|
5059
|
-
}
|
|
5060
|
-
if (data.mass !== undefined) {
|
|
5061
|
-
this.mass = data.mass;
|
|
5062
|
-
}
|
|
5063
|
-
if (data.radius !== undefined) {
|
|
5064
|
-
this.radius = data.radius;
|
|
5065
|
-
}
|
|
5066
|
-
}
|
|
5067
|
-
}
|
|
5068
|
-
class AbsorberSize extends ValueWithRandom_ValueWithRandom {
|
|
5069
|
-
constructor() {
|
|
5070
|
-
super();
|
|
5071
|
-
this.density = 5;
|
|
5072
|
-
this.random.minimumValue = 1;
|
|
5073
|
-
this.value = 50;
|
|
5074
|
-
this.limit = new AbsorberSizeLimit;
|
|
5075
|
-
}
|
|
5076
|
-
load(data) {
|
|
5077
|
-
if (!data) {
|
|
5078
|
-
return;
|
|
5079
|
-
}
|
|
5080
|
-
super.load(data);
|
|
5081
|
-
if (data.density !== undefined) {
|
|
5082
|
-
this.density = data.density;
|
|
5083
|
-
}
|
|
5084
|
-
if (typeof data.limit === "number") {
|
|
5085
|
-
this.limit.radius = data.limit;
|
|
5086
|
-
} else {
|
|
5087
|
-
this.limit.load(data.limit);
|
|
5088
|
-
}
|
|
5089
|
-
}
|
|
5090
|
-
}
|
|
5091
|
-
class OptionsColor_OptionsColor {
|
|
5092
|
-
constructor() {
|
|
5093
|
-
this.value = "#fff";
|
|
5094
|
-
}
|
|
5095
|
-
static create(source, data) {
|
|
5096
|
-
const color = new OptionsColor_OptionsColor;
|
|
5097
|
-
color.load(source);
|
|
5098
|
-
if (data !== undefined) {
|
|
5099
|
-
if (typeof data === "string" || data instanceof Array) {
|
|
5100
|
-
color.load({
|
|
5101
|
-
value: data
|
|
5102
|
-
});
|
|
5103
|
-
} else {
|
|
5104
|
-
color.load(data);
|
|
5105
|
-
}
|
|
5106
|
-
}
|
|
5107
|
-
return color;
|
|
5108
|
-
}
|
|
5109
|
-
load(data) {
|
|
5110
|
-
if ((data === null || data === void 0 ? void 0 : data.value) === undefined) {
|
|
5111
|
-
return;
|
|
5112
|
-
}
|
|
5113
|
-
this.value = data.value;
|
|
5114
|
-
}
|
|
5115
|
-
}
|
|
5116
|
-
class Absorber {
|
|
5117
|
-
constructor() {
|
|
5118
|
-
this.color = new OptionsColor_OptionsColor;
|
|
5119
|
-
this.color.value = "#000000";
|
|
5120
|
-
this.draggable = false;
|
|
5121
|
-
this.opacity = 1;
|
|
5122
|
-
this.destroy = true;
|
|
5123
|
-
this.orbits = false;
|
|
5124
|
-
this.size = new AbsorberSize;
|
|
5125
|
-
}
|
|
5126
|
-
load(data) {
|
|
5127
|
-
if (data === undefined) {
|
|
5128
|
-
return;
|
|
5129
|
-
}
|
|
5130
|
-
if (data.color !== undefined) {
|
|
5131
|
-
this.color = OptionsColor_OptionsColor.create(this.color, data.color);
|
|
5132
|
-
}
|
|
5133
|
-
if (data.draggable !== undefined) {
|
|
5134
|
-
this.draggable = data.draggable;
|
|
5135
|
-
}
|
|
5136
|
-
this.name = data.name;
|
|
5137
|
-
if (data.opacity !== undefined) {
|
|
5138
|
-
this.opacity = data.opacity;
|
|
5139
|
-
}
|
|
5140
|
-
if (data.position !== undefined) {
|
|
5141
|
-
this.position = {
|
|
5142
|
-
x: data.position.x,
|
|
5143
|
-
y: data.position.y
|
|
5144
|
-
};
|
|
5145
|
-
}
|
|
5146
|
-
if (data.size !== undefined) {
|
|
5147
|
-
this.size.load(data.size);
|
|
5148
|
-
}
|
|
5149
|
-
if (data.destroy !== undefined) {
|
|
5150
|
-
this.destroy = data.destroy;
|
|
5151
|
-
}
|
|
5152
|
-
if (data.orbits !== undefined) {
|
|
5153
|
-
this.orbits = data.orbits;
|
|
5154
|
-
}
|
|
5155
|
-
}
|
|
5156
|
-
}
|
|
5157
5156
|
class Absorbers {
|
|
5158
5157
|
constructor(container) {
|
|
5159
5158
|
this.container = container;
|
|
@@ -5323,9 +5322,9 @@
|
|
|
5323
5322
|
}
|
|
5324
5323
|
}
|
|
5325
5324
|
}
|
|
5326
|
-
async function loadAbsorbersPlugin(
|
|
5325
|
+
async function loadAbsorbersPlugin(engine) {
|
|
5327
5326
|
const plugin = new AbsorbersPlugin;
|
|
5328
|
-
await
|
|
5327
|
+
await engine.addPlugin(plugin);
|
|
5329
5328
|
}
|
|
5330
5329
|
return __webpack_exports__;
|
|
5331
5330
|
}();
|