tsparticles 1.40.2 → 1.41.3
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/Container.d.ts +1 -1
- package/Core/Container.js +9 -23
- package/Core/Interfaces/IExternalInteractor.d.ts +1 -1
- package/Core/Interfaces/IParticlesInteractor.d.ts +1 -1
- package/Core/Particle.js +2 -2
- package/Core/Particles.d.ts +3 -3
- package/Core/Particles.js +7 -7
- package/Core/Utils/ExternalInteractorBase.d.ts +1 -1
- package/Core/Utils/FrameManager.d.ts +1 -1
- package/Core/Utils/FrameManager.js +2 -2
- package/Core/Utils/InteractionManager.d.ts +2 -2
- package/Core/Utils/InteractionManager.js +4 -4
- package/Core/Utils/ParticlesInteractorBase.d.ts +1 -1
- package/Interactions/External/Attract/Attractor.d.ts +1 -1
- package/Interactions/External/Attract/Attractor.js +1 -1
- package/Interactions/External/Bounce/Bouncer.d.ts +1 -1
- package/Interactions/External/Bounce/Bouncer.js +1 -1
- package/Interactions/External/Bubble/Bubbler.d.ts +1 -1
- package/Interactions/External/Bubble/Bubbler.js +1 -1
- package/Interactions/External/Connect/Connector.d.ts +1 -1
- package/Interactions/External/Connect/Connector.js +1 -1
- package/Interactions/External/Grab/Grabber.d.ts +1 -1
- package/Interactions/External/Grab/Grabber.js +1 -1
- package/Interactions/External/Repulse/Repulser.d.ts +1 -1
- package/Interactions/External/Repulse/Repulser.js +1 -1
- package/Interactions/External/Trail/TrailMaker.d.ts +1 -1
- package/Interactions/External/Trail/TrailMaker.js +1 -1
- package/Interactions/Particles/Attract/Attractor.d.ts +1 -1
- package/Interactions/Particles/Attract/Attractor.js +1 -1
- package/Interactions/Particles/Collisions/Collider.d.ts +1 -1
- package/Interactions/Particles/Collisions/Collider.js +1 -1
- package/Interactions/Particles/Links/Linker.d.ts +1 -1
- package/Interactions/Particles/Links/Linker.js +1 -1
- package/Plugins/PolygonMask/PolygonMaskInstance.js +1 -1
- package/Updaters/Opacity/OpacityUpdater.js +7 -5
- package/Updaters/Size/SizeUpdater.js +7 -5
- package/browser/Core/Container.d.ts +1 -1
- package/browser/Core/Container.js +9 -23
- package/browser/Core/Interfaces/IExternalInteractor.d.ts +1 -1
- package/browser/Core/Interfaces/IParticlesInteractor.d.ts +1 -1
- package/browser/Core/Particle.js +2 -2
- package/browser/Core/Particles.d.ts +3 -3
- package/browser/Core/Particles.js +7 -7
- package/browser/Core/Utils/ExternalInteractorBase.d.ts +1 -1
- package/browser/Core/Utils/FrameManager.d.ts +1 -1
- package/browser/Core/Utils/FrameManager.js +2 -2
- package/browser/Core/Utils/InteractionManager.d.ts +2 -2
- package/browser/Core/Utils/InteractionManager.js +4 -4
- package/browser/Core/Utils/ParticlesInteractorBase.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/Bounce/Bouncer.d.ts +1 -1
- package/browser/Interactions/External/Bounce/Bouncer.js +1 -1
- package/browser/Interactions/External/Bubble/Bubbler.d.ts +1 -1
- package/browser/Interactions/External/Bubble/Bubbler.js +1 -1
- package/browser/Interactions/External/Connect/Connector.d.ts +1 -1
- package/browser/Interactions/External/Connect/Connector.js +1 -1
- package/browser/Interactions/External/Grab/Grabber.d.ts +1 -1
- package/browser/Interactions/External/Grab/Grabber.js +1 -1
- package/browser/Interactions/External/Repulse/Repulser.d.ts +1 -1
- package/browser/Interactions/External/Repulse/Repulser.js +1 -1
- package/browser/Interactions/External/Trail/TrailMaker.d.ts +1 -1
- package/browser/Interactions/External/Trail/TrailMaker.js +1 -1
- package/browser/Interactions/Particles/Attract/Attractor.d.ts +1 -1
- package/browser/Interactions/Particles/Attract/Attractor.js +1 -1
- package/browser/Interactions/Particles/Collisions/Collider.d.ts +1 -1
- package/browser/Interactions/Particles/Collisions/Collider.js +1 -1
- package/browser/Interactions/Particles/Links/Linker.d.ts +1 -1
- package/browser/Interactions/Particles/Links/Linker.js +1 -1
- package/browser/Plugins/PolygonMask/PolygonMaskInstance.js +1 -1
- package/browser/Updaters/Opacity/OpacityUpdater.js +7 -5
- package/browser/Updaters/Size/SizeUpdater.js +7 -5
- package/esm/Core/Container.d.ts +1 -1
- package/esm/Core/Container.js +9 -23
- package/esm/Core/Interfaces/IExternalInteractor.d.ts +1 -1
- package/esm/Core/Interfaces/IParticlesInteractor.d.ts +1 -1
- package/esm/Core/Particle.js +2 -2
- package/esm/Core/Particles.d.ts +3 -3
- package/esm/Core/Particles.js +7 -7
- package/esm/Core/Utils/ExternalInteractorBase.d.ts +1 -1
- package/esm/Core/Utils/FrameManager.d.ts +1 -1
- package/esm/Core/Utils/FrameManager.js +2 -2
- package/esm/Core/Utils/InteractionManager.d.ts +2 -2
- package/esm/Core/Utils/InteractionManager.js +4 -4
- package/esm/Core/Utils/ParticlesInteractorBase.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/Bounce/Bouncer.d.ts +1 -1
- package/esm/Interactions/External/Bounce/Bouncer.js +1 -1
- package/esm/Interactions/External/Bubble/Bubbler.d.ts +1 -1
- package/esm/Interactions/External/Bubble/Bubbler.js +1 -1
- package/esm/Interactions/External/Connect/Connector.d.ts +1 -1
- package/esm/Interactions/External/Connect/Connector.js +1 -1
- package/esm/Interactions/External/Grab/Grabber.d.ts +1 -1
- package/esm/Interactions/External/Grab/Grabber.js +1 -1
- package/esm/Interactions/External/Repulse/Repulser.d.ts +1 -1
- package/esm/Interactions/External/Repulse/Repulser.js +1 -1
- package/esm/Interactions/External/Trail/TrailMaker.d.ts +1 -1
- package/esm/Interactions/External/Trail/TrailMaker.js +1 -1
- package/esm/Interactions/Particles/Attract/Attractor.d.ts +1 -1
- package/esm/Interactions/Particles/Attract/Attractor.js +1 -1
- package/esm/Interactions/Particles/Collisions/Collider.d.ts +1 -1
- package/esm/Interactions/Particles/Collisions/Collider.js +1 -1
- package/esm/Interactions/Particles/Links/Linker.d.ts +1 -1
- package/esm/Interactions/Particles/Links/Linker.js +1 -1
- package/esm/Plugins/PolygonMask/PolygonMaskInstance.js +1 -1
- package/esm/Updaters/Opacity/OpacityUpdater.js +7 -5
- package/esm/Updaters/Size/SizeUpdater.js +7 -5
- package/package.json +1 -1
- package/report.html +6 -5
- package/report.slim.html +6 -5
- package/tsparticles.engine.js +24 -38
- package/tsparticles.engine.min.js +2 -2
- package/tsparticles.interaction.external.attract.js +23 -37
- package/tsparticles.interaction.external.attract.min.js +2 -2
- package/tsparticles.interaction.external.bounce.js +23 -37
- package/tsparticles.interaction.external.bounce.min.js +2 -2
- package/tsparticles.interaction.external.bubble.js +23 -37
- package/tsparticles.interaction.external.bubble.min.js +2 -2
- package/tsparticles.interaction.external.connect.js +23 -37
- package/tsparticles.interaction.external.connect.min.js +2 -2
- package/tsparticles.interaction.external.grab.js +23 -37
- package/tsparticles.interaction.external.grab.min.js +2 -2
- package/tsparticles.interaction.external.repulse.js +23 -37
- package/tsparticles.interaction.external.repulse.min.js +2 -2
- package/tsparticles.interaction.external.trail.js +23 -37
- package/tsparticles.interaction.external.trail.min.js +2 -2
- package/tsparticles.interaction.particles.attract.js +23 -37
- package/tsparticles.interaction.particles.attract.min.js +2 -2
- package/tsparticles.interaction.particles.collisions.js +23 -37
- package/tsparticles.interaction.particles.collisions.min.js +2 -2
- package/tsparticles.interaction.particles.links.js +23 -37
- package/tsparticles.interaction.particles.links.min.js +2 -2
- package/tsparticles.js +43 -56
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.min.js +1 -1
- package/tsparticles.plugins.absorbers.js +22 -36
- package/tsparticles.plugins.absorbers.min.js +1 -1
- package/tsparticles.plugins.emitters.js +22 -36
- package/tsparticles.plugins.emitters.min.js +1 -1
- package/tsparticles.plugins.polygonMask.js +24 -38
- package/tsparticles.plugins.polygonMask.min.js +2 -2
- package/tsparticles.shape.circle.min.js +1 -1
- package/tsparticles.shape.image.js +22 -36
- package/tsparticles.shape.image.min.js +1 -1
- package/tsparticles.shape.line.min.js +1 -1
- package/tsparticles.shape.polygon.min.js +1 -1
- package/tsparticles.shape.square.min.js +1 -1
- package/tsparticles.shape.star.min.js +1 -1
- package/tsparticles.shape.text.js +22 -36
- package/tsparticles.shape.text.min.js +1 -1
- package/tsparticles.slim.js +40 -53
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.updater.angle.js +22 -36
- package/tsparticles.updater.angle.min.js +1 -1
- package/tsparticles.updater.color.js +22 -36
- package/tsparticles.updater.color.min.js +1 -1
- package/tsparticles.updater.life.js +22 -36
- package/tsparticles.updater.life.min.js +1 -1
- package/tsparticles.updater.opacity.js +25 -39
- package/tsparticles.updater.opacity.min.js +2 -2
- package/tsparticles.updater.outModes.js +22 -36
- package/tsparticles.updater.outModes.min.js +1 -1
- package/tsparticles.updater.roll.js +22 -36
- package/tsparticles.updater.roll.min.js +1 -1
- package/tsparticles.updater.size.js +26 -39
- package/tsparticles.updater.size.min.js +2 -2
- package/tsparticles.updater.strokeColor.js +22 -36
- package/tsparticles.updater.strokeColor.min.js +1 -1
- package/tsparticles.updater.tilt.js +22 -36
- package/tsparticles.updater.tilt.min.js +1 -1
- package/tsparticles.updater.wobble.js +22 -36
- package/tsparticles.updater.wobble.min.js +1 -1
- package/umd/Core/Canvas.d.ts +35 -0
- package/umd/Core/Canvas.js +328 -0
- package/umd/Core/Container.d.ts +68 -0
- package/umd/Core/Container.js +405 -0
- package/umd/Core/Interfaces/Colors.d.ts +33 -0
- package/umd/Core/Interfaces/Colors.js +12 -0
- package/umd/Core/Interfaces/Gradients.d.ts +21 -0
- package/umd/Core/Interfaces/Gradients.js +12 -0
- package/umd/Core/Interfaces/IAttract.d.ts +7 -0
- package/umd/Core/Interfaces/IAttract.js +12 -0
- package/umd/Core/Interfaces/IBounds.d.ts +6 -0
- package/umd/Core/Interfaces/IBounds.js +12 -0
- package/umd/Core/Interfaces/IBubble.d.ts +4 -0
- package/umd/Core/Interfaces/IBubble.js +12 -0
- package/umd/Core/Interfaces/IBubbleParticleData.d.ts +9 -0
- package/umd/Core/Interfaces/IBubbleParticleData.js +12 -0
- package/umd/Core/Interfaces/ICircleBouncer.d.ts +9 -0
- package/umd/Core/Interfaces/ICircleBouncer.js +12 -0
- package/umd/Core/Interfaces/IContainerInteractivity.d.ts +6 -0
- package/umd/Core/Interfaces/IContainerInteractivity.js +12 -0
- package/umd/Core/Interfaces/IContainerPlugin.d.ts +32 -0
- package/umd/Core/Interfaces/IContainerPlugin.js +12 -0
- package/umd/Core/Interfaces/ICoordinates.d.ts +7 -0
- package/umd/Core/Interfaces/ICoordinates.js +12 -0
- package/umd/Core/Interfaces/IDelta.d.ts +4 -0
- package/umd/Core/Interfaces/IDelta.js +12 -0
- package/umd/Core/Interfaces/IDimension.d.ts +4 -0
- package/umd/Core/Interfaces/IDimension.js +12 -0
- package/umd/Core/Interfaces/IDistance.d.ts +4 -0
- package/umd/Core/Interfaces/IDistance.js +12 -0
- package/umd/Core/Interfaces/IExternalInteractor.d.ts +6 -0
- package/umd/Core/Interfaces/IExternalInteractor.js +12 -0
- package/umd/Core/Interfaces/IInteractor.d.ts +6 -0
- package/umd/Core/Interfaces/IInteractor.js +12 -0
- package/umd/Core/Interfaces/IMouseData.d.ts +9 -0
- package/umd/Core/Interfaces/IMouseData.js +12 -0
- package/umd/Core/Interfaces/IMovePathGenerator.d.ts +8 -0
- package/umd/Core/Interfaces/IMovePathGenerator.js +12 -0
- package/umd/Core/Interfaces/IParticle.d.ts +55 -0
- package/umd/Core/Interfaces/IParticle.js +12 -0
- package/umd/Core/Interfaces/IParticleGradientAnimation.d.ts +8 -0
- package/umd/Core/Interfaces/IParticleGradientAnimation.js +12 -0
- package/umd/Core/Interfaces/IParticleGradientColorAnimation.d.ts +7 -0
- package/umd/Core/Interfaces/IParticleGradientColorAnimation.js +12 -0
- package/umd/Core/Interfaces/IParticleHslAnimation.d.ts +6 -0
- package/umd/Core/Interfaces/IParticleHslAnimation.js +12 -0
- package/umd/Core/Interfaces/IParticleLife.d.ts +7 -0
- package/umd/Core/Interfaces/IParticleLife.js +12 -0
- package/umd/Core/Interfaces/IParticleLoops.d.ts +4 -0
- package/umd/Core/Interfaces/IParticleLoops.js +12 -0
- package/umd/Core/Interfaces/IParticleRetinaProps.d.ts +12 -0
- package/umd/Core/Interfaces/IParticleRetinaProps.js +12 -0
- package/umd/Core/Interfaces/IParticleRoll.d.ts +9 -0
- package/umd/Core/Interfaces/IParticleRoll.js +12 -0
- package/umd/Core/Interfaces/IParticleSpin.d.ts +9 -0
- package/umd/Core/Interfaces/IParticleSpin.js +12 -0
- package/umd/Core/Interfaces/IParticleUpdater.d.ts +9 -0
- package/umd/Core/Interfaces/IParticleUpdater.js +12 -0
- package/umd/Core/Interfaces/IParticleValueAnimation.d.ts +17 -0
- package/umd/Core/Interfaces/IParticleValueAnimation.js +12 -0
- package/umd/Core/Interfaces/IParticleWobble.d.ts +4 -0
- package/umd/Core/Interfaces/IParticleWobble.js +12 -0
- package/umd/Core/Interfaces/IParticlesFrequencies.d.ts +4 -0
- package/umd/Core/Interfaces/IParticlesFrequencies.js +12 -0
- package/umd/Core/Interfaces/IParticlesInteractor.d.ts +7 -0
- package/umd/Core/Interfaces/IParticlesInteractor.js +12 -0
- package/umd/Core/Interfaces/IPlugin.d.ts +11 -0
- package/umd/Core/Interfaces/IPlugin.js +12 -0
- package/umd/Core/Interfaces/IRangeValue.d.ts +4 -0
- package/umd/Core/Interfaces/IRangeValue.js +12 -0
- package/umd/Core/Interfaces/IRectSideResult.d.ts +5 -0
- package/umd/Core/Interfaces/IRectSideResult.js +12 -0
- package/umd/Core/Interfaces/IRepulse.d.ts +7 -0
- package/umd/Core/Interfaces/IRepulse.js +12 -0
- package/umd/Core/Interfaces/IShapeDrawer.d.ts +10 -0
- package/umd/Core/Interfaces/IShapeDrawer.js +12 -0
- package/umd/Core/Interfaces/IShapeValues.d.ts +8 -0
- package/umd/Core/Interfaces/IShapeValues.js +12 -0
- package/umd/Core/Interfaces/index.d.ts +36 -0
- package/umd/Core/Interfaces/index.js +58 -0
- package/umd/Core/Loader.d.ts +32 -0
- package/umd/Core/Loader.js +193 -0
- package/umd/Core/Particle.d.ts +71 -0
- package/umd/Core/Particle.js +394 -0
- package/umd/Core/Particles.d.ts +46 -0
- package/umd/Core/Particles.js +331 -0
- package/umd/Core/Retina.d.ts +26 -0
- package/umd/Core/Retina.js +107 -0
- package/umd/Core/Utils/Circle.d.ts +8 -0
- package/umd/Core/Utils/Circle.js +52 -0
- package/umd/Core/Utils/CircleWarp.d.ts +9 -0
- package/umd/Core/Utils/CircleWarp.js +70 -0
- package/umd/Core/Utils/Constants.d.ts +18 -0
- package/umd/Core/Utils/Constants.js +32 -0
- package/umd/Core/Utils/EventListeners.d.ts +33 -0
- package/umd/Core/Utils/EventListeners.js +383 -0
- package/umd/Core/Utils/ExternalInteractorBase.d.ts +12 -0
- package/umd/Core/Utils/ExternalInteractorBase.js +20 -0
- package/umd/Core/Utils/FrameManager.d.ts +6 -0
- package/umd/Core/Utils/FrameManager.js +53 -0
- package/umd/Core/Utils/InteractionManager.d.ts +14 -0
- package/umd/Core/Utils/InteractionManager.js +69 -0
- package/umd/Core/Utils/ParticlesInteractorBase.d.ts +12 -0
- package/umd/Core/Utils/ParticlesInteractorBase.js +20 -0
- package/umd/Core/Utils/ParticlesMover.d.ts +13 -0
- package/umd/Core/Utils/ParticlesMover.js +196 -0
- package/umd/Core/Utils/Plugins.d.ts +36 -0
- package/umd/Core/Utils/Plugins.js +108 -0
- package/umd/Core/Utils/Point.d.ts +7 -0
- package/umd/Core/Utils/Point.js +20 -0
- package/umd/Core/Utils/QuadTree.d.ts +23 -0
- package/umd/Core/Utils/QuadTree.js +88 -0
- package/umd/Core/Utils/Range.d.ts +7 -0
- package/umd/Core/Utils/Range.js +22 -0
- package/umd/Core/Utils/Rectangle.d.ts +8 -0
- package/umd/Core/Utils/Rectangle.js +48 -0
- package/umd/Core/Utils/Vector.d.ts +29 -0
- package/umd/Core/Utils/Vector.js +106 -0
- package/umd/Core/Utils/Vector3d.d.ts +18 -0
- package/umd/Core/Utils/Vector3d.js +68 -0
- package/umd/Core/Utils/index.d.ts +16 -0
- package/umd/Core/Utils/index.js +38 -0
- package/umd/Core/index.d.ts +8 -0
- package/umd/Core/index.js +30 -0
- package/umd/Enums/AnimationStatus.d.ts +4 -0
- package/umd/Enums/AnimationStatus.js +12 -0
- package/umd/Enums/Directions/MoveDirection.d.ts +12 -0
- package/umd/Enums/Directions/MoveDirection.js +12 -0
- package/umd/Enums/Directions/OutModeDirection.d.ts +6 -0
- package/umd/Enums/Directions/OutModeDirection.js +12 -0
- package/umd/Enums/Directions/RotateDirection.d.ts +6 -0
- package/umd/Enums/Directions/RotateDirection.js +12 -0
- package/umd/Enums/Directions/TiltDirection.d.ts +6 -0
- package/umd/Enums/Directions/TiltDirection.js +12 -0
- package/umd/Enums/Directions/index.d.ts +4 -0
- package/umd/Enums/Directions/index.js +26 -0
- package/umd/Enums/InteractivityDetect.d.ts +5 -0
- package/umd/Enums/InteractivityDetect.js +12 -0
- package/umd/Enums/Modes/ClickMode.d.ts +9 -0
- package/umd/Enums/Modes/ClickMode.js +12 -0
- package/umd/Enums/Modes/CollisionMode.d.ts +5 -0
- package/umd/Enums/Modes/CollisionMode.js +12 -0
- package/umd/Enums/Modes/DestroyMode.d.ts +4 -0
- package/umd/Enums/Modes/DestroyMode.js +12 -0
- package/umd/Enums/Modes/DivMode.d.ts +5 -0
- package/umd/Enums/Modes/DivMode.js +12 -0
- package/umd/Enums/Modes/HoverMode.d.ts +11 -0
- package/umd/Enums/Modes/HoverMode.js +12 -0
- package/umd/Enums/Modes/OutMode.d.ts +10 -0
- package/umd/Enums/Modes/OutMode.js +12 -0
- package/umd/Enums/Modes/ResponsiveMode.d.ts +4 -0
- package/umd/Enums/Modes/ResponsiveMode.js +12 -0
- package/umd/Enums/Modes/RollMode.d.ts +5 -0
- package/umd/Enums/Modes/RollMode.js +12 -0
- package/umd/Enums/Modes/SizeMode.d.ts +4 -0
- package/umd/Enums/Modes/SizeMode.js +12 -0
- package/umd/Enums/Modes/ThemeMode.d.ts +5 -0
- package/umd/Enums/Modes/ThemeMode.js +12 -0
- package/umd/Enums/Modes/index.d.ts +10 -0
- package/umd/Enums/Modes/index.js +32 -0
- package/umd/Enums/Types/AlterType.d.ts +4 -0
- package/umd/Enums/Types/AlterType.js +12 -0
- package/umd/Enums/Types/DestroyType.d.ts +5 -0
- package/umd/Enums/Types/DestroyType.js +12 -0
- package/umd/Enums/Types/DivType.d.ts +4 -0
- package/umd/Enums/Types/DivType.js +12 -0
- package/umd/Enums/Types/EasingType.d.ts +10 -0
- package/umd/Enums/Types/EasingType.js +12 -0
- package/umd/Enums/Types/GradientType.d.ts +5 -0
- package/umd/Enums/Types/GradientType.js +12 -0
- package/umd/Enums/Types/InteractorType.d.ts +4 -0
- package/umd/Enums/Types/InteractorType.js +12 -0
- package/umd/Enums/Types/OrbitType.d.ts +4 -0
- package/umd/Enums/Types/OrbitType.js +12 -0
- package/umd/Enums/Types/ShapeType.d.ts +13 -0
- package/umd/Enums/Types/ShapeType.js +12 -0
- package/umd/Enums/Types/StartValueType.d.ts +5 -0
- package/umd/Enums/Types/StartValueType.js +12 -0
- package/umd/Enums/Types/index.d.ts +9 -0
- package/umd/Enums/Types/index.js +31 -0
- package/umd/Enums/index.d.ts +5 -0
- package/umd/Enums/index.js +27 -0
- package/umd/Interactions/External/Attract/Attractor.d.ts +11 -0
- package/umd/Interactions/External/Attract/Attractor.js +85 -0
- package/umd/Interactions/External/Attract/index.d.ts +2 -0
- package/umd/Interactions/External/Attract/index.js +18 -0
- package/umd/Interactions/External/Bounce/Bouncer.d.ts +11 -0
- package/umd/Interactions/External/Bounce/Bouncer.js +77 -0
- package/umd/Interactions/External/Bounce/index.d.ts +2 -0
- package/umd/Interactions/External/Bounce/index.js +18 -0
- package/umd/Interactions/External/Bubble/Bubbler.d.ts +16 -0
- package/umd/Interactions/External/Bubble/Bubbler.js +261 -0
- package/umd/Interactions/External/Bubble/IBubblerProcessParam.d.ts +10 -0
- package/umd/Interactions/External/Bubble/IBubblerProcessParam.js +12 -0
- package/umd/Interactions/External/Bubble/ProcessBubbleType.d.ts +5 -0
- package/umd/Interactions/External/Bubble/ProcessBubbleType.js +12 -0
- package/umd/Interactions/External/Bubble/index.d.ts +2 -0
- package/umd/Interactions/External/Bubble/index.js +18 -0
- package/umd/Interactions/External/Connect/Connector.d.ts +8 -0
- package/umd/Interactions/External/Connect/Connector.js +51 -0
- package/umd/Interactions/External/Connect/index.d.ts +2 -0
- package/umd/Interactions/External/Connect/index.js +18 -0
- package/umd/Interactions/External/Grab/Grabber.d.ts +8 -0
- package/umd/Interactions/External/Grab/Grabber.js +57 -0
- package/umd/Interactions/External/Grab/index.d.ts +2 -0
- package/umd/Interactions/External/Grab/index.js +18 -0
- package/umd/Interactions/External/Repulse/Repulser.d.ts +12 -0
- package/umd/Interactions/External/Repulse/Repulser.js +108 -0
- package/umd/Interactions/External/Repulse/index.d.ts +2 -0
- package/umd/Interactions/External/Repulse/index.js +18 -0
- package/umd/Interactions/External/Trail/TrailMaker.d.ts +10 -0
- package/umd/Interactions/External/Trail/TrailMaker.js +63 -0
- package/umd/Interactions/External/Trail/index.d.ts +2 -0
- package/umd/Interactions/External/Trail/index.js +18 -0
- package/umd/Interactions/Particles/Attract/Attractor.d.ts +8 -0
- package/umd/Interactions/Particles/Attract/Attractor.js +40 -0
- package/umd/Interactions/Particles/Attract/index.d.ts +2 -0
- package/umd/Interactions/Particles/Attract/index.js +18 -0
- package/umd/Interactions/Particles/Collisions/Collider.d.ts +10 -0
- package/umd/Interactions/Particles/Collisions/Collider.js +119 -0
- package/umd/Interactions/Particles/Collisions/index.d.ts +2 -0
- package/umd/Interactions/Particles/Collisions/index.js +18 -0
- package/umd/Interactions/Particles/Links/ILink.d.ts +9 -0
- package/umd/Interactions/Particles/Links/ILink.js +12 -0
- package/umd/Interactions/Particles/Links/LinkInstance.d.ts +10 -0
- package/umd/Interactions/Particles/Links/LinkInstance.js +134 -0
- package/umd/Interactions/Particles/Links/LinkParticle.d.ts +5 -0
- package/umd/Interactions/Particles/Links/LinkParticle.js +12 -0
- package/umd/Interactions/Particles/Links/Linker.d.ts +10 -0
- package/umd/Interactions/Particles/Links/Linker.js +115 -0
- package/umd/Interactions/Particles/Links/index.d.ts +2 -0
- package/umd/Interactions/Particles/Links/index.js +20 -0
- package/umd/Interactions/Particles/Links/interaction.d.ts +2 -0
- package/umd/Interactions/Particles/Links/interaction.js +18 -0
- package/umd/Interactions/Particles/Links/plugin.d.ts +2 -0
- package/umd/Interactions/Particles/Links/plugin.js +32 -0
- package/umd/Options/Classes/AnimatableColor.d.ts +11 -0
- package/umd/Options/Classes/AnimatableColor.js +50 -0
- package/umd/Options/Classes/AnimatableGradient.d.ts +53 -0
- package/umd/Options/Classes/AnimatableGradient.js +156 -0
- package/umd/Options/Classes/AnimationOptions.d.ts +11 -0
- package/umd/Options/Classes/AnimationOptions.js +39 -0
- package/umd/Options/Classes/Background/Background.d.ts +14 -0
- package/umd/Options/Classes/Background/Background.js +49 -0
- package/umd/Options/Classes/BackgroundMask/BackgroundMask.d.ts +11 -0
- package/umd/Options/Classes/BackgroundMask/BackgroundMask.js +38 -0
- package/umd/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +10 -0
- package/umd/Options/Classes/BackgroundMask/BackgroundMaskCover.js +32 -0
- package/umd/Options/Classes/ColorAnimation.d.ts +12 -0
- package/umd/Options/Classes/ColorAnimation.js +44 -0
- package/umd/Options/Classes/FullScreen/FullScreen.d.ts +9 -0
- package/umd/Options/Classes/FullScreen/FullScreen.js +31 -0
- package/umd/Options/Classes/HslAnimation.d.ts +11 -0
- package/umd/Options/Classes/HslAnimation.js +30 -0
- package/umd/Options/Classes/Interactivity/Events/ClickEvent.d.ts +10 -0
- package/umd/Options/Classes/Interactivity/Events/ClickEvent.js +31 -0
- package/umd/Options/Classes/Interactivity/Events/DivEvent.d.ts +18 -0
- package/umd/Options/Classes/Interactivity/Events/DivEvent.js +64 -0
- package/umd/Options/Classes/Interactivity/Events/Events.d.ts +20 -0
- package/umd/Options/Classes/Interactivity/Events/Events.js +68 -0
- package/umd/Options/Classes/Interactivity/Events/HoverEvent.d.ts +12 -0
- package/umd/Options/Classes/Interactivity/Events/HoverEvent.js +34 -0
- package/umd/Options/Classes/Interactivity/Events/Parallax.d.ts +10 -0
- package/umd/Options/Classes/Interactivity/Events/Parallax.js +35 -0
- package/umd/Options/Classes/Interactivity/Interactivity.d.ts +15 -0
- package/umd/Options/Classes/Interactivity/Interactivity.js +51 -0
- package/umd/Options/Classes/Interactivity/Modes/Attract.d.ts +14 -0
- package/umd/Options/Classes/Interactivity/Modes/Attract.js +47 -0
- package/umd/Options/Classes/Interactivity/Modes/Bounce.d.ts +8 -0
- package/umd/Options/Classes/Interactivity/Modes/Bounce.js +27 -0
- package/umd/Options/Classes/Interactivity/Modes/Bubble.d.ts +9 -0
- package/umd/Options/Classes/Interactivity/Modes/Bubble.js +37 -0
- package/umd/Options/Classes/Interactivity/Modes/BubbleBase.d.ts +13 -0
- package/umd/Options/Classes/Interactivity/Modes/BubbleBase.js +53 -0
- package/umd/Options/Classes/Interactivity/Modes/BubbleDiv.d.ts +11 -0
- package/umd/Options/Classes/Interactivity/Modes/BubbleDiv.js +41 -0
- package/umd/Options/Classes/Interactivity/Modes/Connect.d.ts +15 -0
- package/umd/Options/Classes/Interactivity/Modes/Connect.js +47 -0
- package/umd/Options/Classes/Interactivity/Modes/ConnectLinks.d.ts +8 -0
- package/umd/Options/Classes/Interactivity/Modes/ConnectLinks.js +25 -0
- package/umd/Options/Classes/Interactivity/Modes/Grab.d.ts +14 -0
- package/umd/Options/Classes/Interactivity/Modes/Grab.js +43 -0
- package/umd/Options/Classes/Interactivity/Modes/GrabLinks.d.ts +12 -0
- package/umd/Options/Classes/Interactivity/Modes/GrabLinks.js +39 -0
- package/umd/Options/Classes/Interactivity/Modes/Light.d.ts +11 -0
- package/umd/Options/Classes/Interactivity/Modes/Light.js +29 -0
- package/umd/Options/Classes/Interactivity/Modes/LightArea.d.ts +10 -0
- package/umd/Options/Classes/Interactivity/Modes/LightArea.js +30 -0
- package/umd/Options/Classes/Interactivity/Modes/LightGradient.d.ts +10 -0
- package/umd/Options/Classes/Interactivity/Modes/LightGradient.js +30 -0
- package/umd/Options/Classes/Interactivity/Modes/LightShadow.d.ts +10 -0
- package/umd/Options/Classes/Interactivity/Modes/LightShadow.js +31 -0
- package/umd/Options/Classes/Interactivity/Modes/Modes.d.ts +29 -0
- package/umd/Options/Classes/Interactivity/Modes/Modes.js +55 -0
- package/umd/Options/Classes/Interactivity/Modes/Push.d.ts +12 -0
- package/umd/Options/Classes/Interactivity/Modes/Push.js +46 -0
- package/umd/Options/Classes/Interactivity/Modes/Remove.d.ts +10 -0
- package/umd/Options/Classes/Interactivity/Modes/Remove.js +35 -0
- package/umd/Options/Classes/Interactivity/Modes/Repulse.d.ts +9 -0
- package/umd/Options/Classes/Interactivity/Modes/Repulse.js +37 -0
- package/umd/Options/Classes/Interactivity/Modes/RepulseBase.d.ts +14 -0
- package/umd/Options/Classes/Interactivity/Modes/RepulseBase.js +47 -0
- package/umd/Options/Classes/Interactivity/Modes/RepulseDiv.d.ts +11 -0
- package/umd/Options/Classes/Interactivity/Modes/RepulseDiv.js +49 -0
- package/umd/Options/Classes/Interactivity/Modes/Slow.d.ts +11 -0
- package/umd/Options/Classes/Interactivity/Modes/Slow.js +36 -0
- package/umd/Options/Classes/Interactivity/Modes/Trail.d.ts +12 -0
- package/umd/Options/Classes/Interactivity/Modes/Trail.js +39 -0
- package/umd/Options/Classes/ManualParticle.d.ts +10 -0
- package/umd/Options/Classes/ManualParticle.js +32 -0
- package/umd/Options/Classes/Motion/Motion.d.ts +10 -0
- package/umd/Options/Classes/Motion/Motion.js +30 -0
- package/umd/Options/Classes/Motion/MotionReduce.d.ts +9 -0
- package/umd/Options/Classes/Motion/MotionReduce.js +31 -0
- package/umd/Options/Classes/Options.d.ts +48 -0
- package/umd/Options/Classes/Options.js +184 -0
- package/umd/Options/Classes/OptionsColor.d.ts +10 -0
- package/umd/Options/Classes/OptionsColor.js +38 -0
- package/umd/Options/Classes/Particles/Bounce/Bounce.d.ts +10 -0
- package/umd/Options/Classes/Particles/Bounce/Bounce.js +28 -0
- package/umd/Options/Classes/Particles/Bounce/BounceFactor.d.ts +4 -0
- package/umd/Options/Classes/Particles/Bounce/BounceFactor.js +22 -0
- package/umd/Options/Classes/Particles/Collisions/Collisions.d.ts +14 -0
- package/umd/Options/Classes/Particles/Collisions/Collisions.js +37 -0
- package/umd/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +9 -0
- package/umd/Options/Classes/Particles/Collisions/CollisionsOverlap.js +31 -0
- package/umd/Options/Classes/Particles/Destroy/Destroy.d.ts +11 -0
- package/umd/Options/Classes/Particles/Destroy/Destroy.js +30 -0
- package/umd/Options/Classes/Particles/Destroy/Split.d.ts +15 -0
- package/umd/Options/Classes/Particles/Destroy/Split.js +41 -0
- package/umd/Options/Classes/Particles/Destroy/SplitFactor.d.ts +4 -0
- package/umd/Options/Classes/Particles/Destroy/SplitFactor.js +21 -0
- package/umd/Options/Classes/Particles/Destroy/SplitRate.d.ts +4 -0
- package/umd/Options/Classes/Particles/Destroy/SplitRate.js +21 -0
- package/umd/Options/Classes/Particles/Life/Life.d.ts +12 -0
- package/umd/Options/Classes/Particles/Life/Life.js +33 -0
- package/umd/Options/Classes/Particles/Life/LifeDelay.d.ts +9 -0
- package/umd/Options/Classes/Particles/Life/LifeDelay.js +30 -0
- package/umd/Options/Classes/Particles/Life/LifeDuration.d.ts +9 -0
- package/umd/Options/Classes/Particles/Life/LifeDuration.js +31 -0
- package/umd/Options/Classes/Particles/Links/Links.d.ts +22 -0
- package/umd/Options/Classes/Particles/Links/Links.js +67 -0
- package/umd/Options/Classes/Particles/Links/LinksShadow.d.ts +11 -0
- package/umd/Options/Classes/Particles/Links/LinksShadow.js +35 -0
- package/umd/Options/Classes/Particles/Links/LinksTriangle.d.ts +12 -0
- package/umd/Options/Classes/Particles/Links/LinksTriangle.js +38 -0
- package/umd/Options/Classes/Particles/Move/Attract.d.ts +15 -0
- package/umd/Options/Classes/Particles/Move/Attract.js +56 -0
- package/umd/Options/Classes/Particles/Move/Move.d.ts +44 -0
- package/umd/Options/Classes/Particles/Move/Move.js +142 -0
- package/umd/Options/Classes/Particles/Move/MoveAngle.d.ts +9 -0
- package/umd/Options/Classes/Particles/Move/MoveAngle.js +31 -0
- package/umd/Options/Classes/Particles/Move/MoveGravity.d.ts +11 -0
- package/umd/Options/Classes/Particles/Move/MoveGravity.js +39 -0
- package/umd/Options/Classes/Particles/Move/OutModes.d.ts +13 -0
- package/umd/Options/Classes/Particles/Move/OutModes.js +32 -0
- package/umd/Options/Classes/Particles/Move/Path/Path.d.ts +13 -0
- package/umd/Options/Classes/Particles/Move/Path/Path.js +40 -0
- package/umd/Options/Classes/Particles/Move/Path/PathDelay.d.ts +4 -0
- package/umd/Options/Classes/Particles/Move/Path/PathDelay.js +20 -0
- package/umd/Options/Classes/Particles/Move/Spin.d.ts +11 -0
- package/umd/Options/Classes/Particles/Move/Spin.js +33 -0
- package/umd/Options/Classes/Particles/Move/Trail.d.ts +11 -0
- package/umd/Options/Classes/Particles/Move/Trail.js +35 -0
- package/umd/Options/Classes/Particles/Number/Density.d.ts +12 -0
- package/umd/Options/Classes/Particles/Number/Density.js +43 -0
- package/umd/Options/Classes/Particles/Number/ParticlesNumber.d.ts +13 -0
- package/umd/Options/Classes/Particles/Number/ParticlesNumber.js +42 -0
- package/umd/Options/Classes/Particles/Opacity/Opacity.d.ts +12 -0
- package/umd/Options/Classes/Particles/Opacity/Opacity.js +43 -0
- package/umd/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +14 -0
- package/umd/Options/Classes/Particles/Opacity/OpacityAnimation.js +54 -0
- package/umd/Options/Classes/Particles/Orbit/Orbit.d.ts +18 -0
- package/umd/Options/Classes/Particles/Orbit/Orbit.js +48 -0
- package/umd/Options/Classes/Particles/Orbit/OrbitRotation.d.ts +7 -0
- package/umd/Options/Classes/Particles/Orbit/OrbitRotation.js +29 -0
- package/umd/Options/Classes/Particles/ParticlesOptions.d.ts +58 -0
- package/umd/Options/Classes/Particles/ParticlesOptions.js +153 -0
- package/umd/Options/Classes/Particles/Repulse/Repulse.d.ts +13 -0
- package/umd/Options/Classes/Particles/Repulse/Repulse.js +46 -0
- package/umd/Options/Classes/Particles/Roll/Roll.d.ts +16 -0
- package/umd/Options/Classes/Particles/Roll/Roll.js +45 -0
- package/umd/Options/Classes/Particles/Roll/RollLight.d.ts +9 -0
- package/umd/Options/Classes/Particles/Roll/RollLight.js +31 -0
- package/umd/Options/Classes/Particles/Rotate/Rotate.d.ts +13 -0
- package/umd/Options/Classes/Particles/Rotate/Rotate.js +38 -0
- package/umd/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +10 -0
- package/umd/Options/Classes/Particles/Rotate/RotateAnimation.js +35 -0
- package/umd/Options/Classes/Particles/Shadow.d.ts +13 -0
- package/umd/Options/Classes/Particles/Shadow.js +48 -0
- package/umd/Options/Classes/Particles/Shape/Shape.d.ts +27 -0
- package/umd/Options/Classes/Particles/Shape/Shape.js +113 -0
- package/umd/Options/Classes/Particles/Size/Size.d.ts +12 -0
- package/umd/Options/Classes/Particles/Size/Size.js +43 -0
- package/umd/Options/Classes/Particles/Size/SizeAnimation.d.ts +14 -0
- package/umd/Options/Classes/Particles/Size/SizeAnimation.js +54 -0
- package/umd/Options/Classes/Particles/Stroke.d.ts +11 -0
- package/umd/Options/Classes/Particles/Stroke.js +34 -0
- package/umd/Options/Classes/Particles/Tilt/Tilt.d.ts +13 -0
- package/umd/Options/Classes/Particles/Tilt/Tilt.js +38 -0
- package/umd/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +10 -0
- package/umd/Options/Classes/Particles/Tilt/TiltAnimation.js +35 -0
- package/umd/Options/Classes/Particles/Twinkle/Twinkle.d.ts +10 -0
- package/umd/Options/Classes/Particles/Twinkle/Twinkle.js +28 -0
- package/umd/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +12 -0
- package/umd/Options/Classes/Particles/Twinkle/TwinkleValues.js +39 -0
- package/umd/Options/Classes/Particles/Wobble/Wobble.d.ts +10 -0
- package/umd/Options/Classes/Particles/Wobble/Wobble.js +36 -0
- package/umd/Options/Classes/Particles/ZIndex/ZIndex.d.ts +11 -0
- package/umd/Options/Classes/Particles/ZIndex/ZIndex.js +38 -0
- package/umd/Options/Classes/Random.d.ts +9 -0
- package/umd/Options/Classes/Random.js +31 -0
- package/umd/Options/Classes/Responsive.d.ts +12 -0
- package/umd/Options/Classes/Responsive.js +41 -0
- package/umd/Options/Classes/Theme/Theme.d.ts +12 -0
- package/umd/Options/Classes/Theme/Theme.js +34 -0
- package/umd/Options/Classes/Theme/ThemeDefault.d.ts +11 -0
- package/umd/Options/Classes/Theme/ThemeDefault.js +35 -0
- package/umd/Options/Classes/ValueWithRandom.d.ts +10 -0
- package/umd/Options/Classes/ValueWithRandom.js +36 -0
- package/umd/Options/Interfaces/Background/IBackground.d.ts +9 -0
- package/umd/Options/Interfaces/Background/IBackground.js +12 -0
- package/umd/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +7 -0
- package/umd/Options/Interfaces/BackgroundMask/IBackgroundMask.js +12 -0
- package/umd/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.d.ts +5 -0
- package/umd/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.js +12 -0
- package/umd/Options/Interfaces/FullScreen/IFullScreen.d.ts +4 -0
- package/umd/Options/Interfaces/FullScreen/IFullScreen.js +12 -0
- package/umd/Options/Interfaces/IAnimatable.d.ts +4 -0
- package/umd/Options/Interfaces/IAnimatable.js +12 -0
- package/umd/Options/Interfaces/IAnimatableColor.d.ts +6 -0
- package/umd/Options/Interfaces/IAnimatableColor.js +12 -0
- package/umd/Options/Interfaces/IAnimatableGradient.d.ts +8 -0
- package/umd/Options/Interfaces/IAnimatableGradient.js +12 -0
- package/umd/Options/Interfaces/IAnimation.d.ts +6 -0
- package/umd/Options/Interfaces/IAnimation.js +12 -0
- package/umd/Options/Interfaces/IColorAnimation.d.ts +5 -0
- package/umd/Options/Interfaces/IColorAnimation.js +12 -0
- package/umd/Options/Interfaces/IHslAnimation.d.ts +6 -0
- package/umd/Options/Interfaces/IHslAnimation.js +12 -0
- package/umd/Options/Interfaces/IManualParticle.d.ts +7 -0
- package/umd/Options/Interfaces/IManualParticle.js +12 -0
- package/umd/Options/Interfaces/IOptionLoader.d.ts +4 -0
- package/umd/Options/Interfaces/IOptionLoader.js +12 -0
- package/umd/Options/Interfaces/IOptions.d.ts +34 -0
- package/umd/Options/Interfaces/IOptions.js +12 -0
- package/umd/Options/Interfaces/IOptionsColor.d.ts +2 -0
- package/umd/Options/Interfaces/IOptionsColor.js +12 -0
- package/umd/Options/Interfaces/IOptionsGradient.d.ts +13 -0
- package/umd/Options/Interfaces/IOptionsGradient.js +12 -0
- package/umd/Options/Interfaces/IRandom.d.ts +4 -0
- package/umd/Options/Interfaces/IRandom.js +12 -0
- package/umd/Options/Interfaces/IResponsive.d.ts +8 -0
- package/umd/Options/Interfaces/IResponsive.js +12 -0
- package/umd/Options/Interfaces/IValueWithRandom.d.ts +6 -0
- package/umd/Options/Interfaces/IValueWithRandom.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IClickEvent.d.ts +6 -0
- package/umd/Options/Interfaces/Interactivity/Events/IClickEvent.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +11 -0
- package/umd/Options/Interfaces/Interactivity/Events/IDivEvent.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IEvents.d.ts +13 -0
- package/umd/Options/Interfaces/Interactivity/Events/IEvents.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +8 -0
- package/umd/Options/Interfaces/Interactivity/Events/IHoverEvent.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Events/IParallax.d.ts +5 -0
- package/umd/Options/Interfaces/Interactivity/Events/IParallax.js +12 -0
- package/umd/Options/Interfaces/Interactivity/IInteractivity.d.ts +9 -0
- package/umd/Options/Interfaces/Interactivity/IInteractivity.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IAttract.d.ts +9 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IAttract.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBounce.d.ts +3 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBounce.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBubble.d.ts +6 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBubble.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBubbleBase.d.ts +10 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBubbleBase.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBubbleDiv.d.ts +4 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IBubbleDiv.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IConnect.d.ts +8 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IConnect.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IConnectLinks.d.ts +3 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IConnectLinks.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IGrab.d.ts +7 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IGrab.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IGrabLinks.d.ts +7 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IGrabLinks.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ILight.d.ts +6 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ILight.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ILightArea.d.ts +9 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ILightArea.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ILightShadow.d.ts +5 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ILightShadow.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +5 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IModeDiv.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IModes.d.ts +22 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IModes.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IPush.d.ts +6 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IPush.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRemove.d.ts +4 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRemove.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulse.d.ts +6 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulse.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulseBase.d.ts +9 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulseBase.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulseDiv.d.ts +4 -0
- package/umd/Options/Interfaces/Interactivity/Modes/IRepulseDiv.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ISlow.d.ts +5 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ISlow.js +12 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ITrail.d.ts +8 -0
- package/umd/Options/Interfaces/Interactivity/Modes/ITrail.js +12 -0
- package/umd/Options/Interfaces/Motion/IMotion.d.ts +5 -0
- package/umd/Options/Interfaces/Motion/IMotion.js +12 -0
- package/umd/Options/Interfaces/Motion/IMotionReduce.d.ts +4 -0
- package/umd/Options/Interfaces/Motion/IMotionReduce.js +12 -0
- package/umd/Options/Interfaces/Particles/Bounce/IBounce.d.ts +5 -0
- package/umd/Options/Interfaces/Particles/Bounce/IBounce.js +12 -0
- package/umd/Options/Interfaces/Particles/Collisions/ICollisions.d.ts +9 -0
- package/umd/Options/Interfaces/Particles/Collisions/ICollisions.js +12 -0
- package/umd/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.d.ts +4 -0
- package/umd/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.js +12 -0
- package/umd/Options/Interfaces/Particles/Destroy/IDestroy.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Destroy/IDestroy.js +12 -0
- package/umd/Options/Interfaces/Particles/Destroy/ISplit.d.ts +10 -0
- package/umd/Options/Interfaces/Particles/Destroy/ISplit.js +12 -0
- package/umd/Options/Interfaces/Particles/IParticles.d.ts +52 -0
- package/umd/Options/Interfaces/Particles/IParticles.js +12 -0
- package/umd/Options/Interfaces/Particles/IShadow.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/IShadow.js +12 -0
- package/umd/Options/Interfaces/Particles/IStroke.d.ts +7 -0
- package/umd/Options/Interfaces/Particles/IStroke.js +12 -0
- package/umd/Options/Interfaces/Particles/Life/ILife.d.ts +7 -0
- package/umd/Options/Interfaces/Particles/Life/ILife.js +12 -0
- package/umd/Options/Interfaces/Particles/Life/ILifeDelay.d.ts +4 -0
- package/umd/Options/Interfaces/Particles/Life/ILifeDelay.js +12 -0
- package/umd/Options/Interfaces/Particles/Life/ILifeDuration.d.ts +4 -0
- package/umd/Options/Interfaces/Particles/Life/ILifeDuration.js +12 -0
- package/umd/Options/Interfaces/Particles/Links/ILinks.d.ts +17 -0
- package/umd/Options/Interfaces/Particles/Links/ILinks.js +12 -0
- package/umd/Options/Interfaces/Particles/Links/ILinksShadow.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Links/ILinksShadow.js +12 -0
- package/umd/Options/Interfaces/Particles/Links/ILinksTriangle.d.ts +7 -0
- package/umd/Options/Interfaces/Particles/Links/ILinksTriangle.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IAttract.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Move/IAttract.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IMove.d.ts +35 -0
- package/umd/Options/Interfaces/Particles/Move/IMove.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +4 -0
- package/umd/Options/Interfaces/Particles/Move/IMoveAngle.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Move/IMoveGravity.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/IOutModes.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Move/IOutModes.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/ISpin.d.ts +7 -0
- package/umd/Options/Interfaces/Particles/Move/ISpin.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/ITrail.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Move/ITrail.js +12 -0
- package/umd/Options/Interfaces/Particles/Move/Path/IPath.d.ts +9 -0
- package/umd/Options/Interfaces/Particles/Move/Path/IPath.js +12 -0
- package/umd/Options/Interfaces/Particles/Number/IDensity.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Number/IDensity.js +12 -0
- package/umd/Options/Interfaces/Particles/Number/IParticlesNumber.d.ts +7 -0
- package/umd/Options/Interfaces/Particles/Number/IParticlesNumber.js +12 -0
- package/umd/Options/Interfaces/Particles/Opacity/IOpacity.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Opacity/IOpacity.js +12 -0
- package/umd/Options/Interfaces/Particles/Opacity/IOpacityAnimation.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Opacity/IOpacityAnimation.js +12 -0
- package/umd/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +12 -0
- package/umd/Options/Interfaces/Particles/Orbit/IOrbit.js +12 -0
- package/umd/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Repulse/IRepulse.js +12 -0
- package/umd/Options/Interfaces/Particles/Roll/IRoll.d.ts +12 -0
- package/umd/Options/Interfaces/Particles/Roll/IRoll.js +12 -0
- package/umd/Options/Interfaces/Particles/Roll/IRollLight.d.ts +4 -0
- package/umd/Options/Interfaces/Particles/Roll/IRollLight.js +12 -0
- package/umd/Options/Interfaces/Particles/Rotate/IRotate.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Rotate/IRotate.js +12 -0
- package/umd/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +5 -0
- package/umd/Options/Interfaces/Particles/Rotate/IRotateAnimation.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/ICharacterShape.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Shape/ICharacterShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/IImageShape.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Shape/IImageShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/IPolygonShape.d.ts +5 -0
- package/umd/Options/Interfaces/Particles/Shape/IPolygonShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/IShape.d.ts +16 -0
- package/umd/Options/Interfaces/Particles/Shape/IShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Shape/IShapeValues.d.ts +1 -0
- package/umd/Options/Interfaces/Particles/Shape/IShapeValues.js +23 -0
- package/umd/Options/Interfaces/Particles/Shape/IStarShape.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Shape/IStarShape.js +12 -0
- package/umd/Options/Interfaces/Particles/Size/ISize.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Size/ISize.js +12 -0
- package/umd/Options/Interfaces/Particles/Size/ISizeAnimation.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Size/ISizeAnimation.js +12 -0
- package/umd/Options/Interfaces/Particles/Tilt/ITilt.d.ts +8 -0
- package/umd/Options/Interfaces/Particles/Tilt/ITilt.js +12 -0
- package/umd/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +5 -0
- package/umd/Options/Interfaces/Particles/Tilt/ITiltAnimation.js +12 -0
- package/umd/Options/Interfaces/Particles/Twinkle/ITwinkle.d.ts +5 -0
- package/umd/Options/Interfaces/Particles/Twinkle/ITwinkle.js +12 -0
- package/umd/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +7 -0
- package/umd/Options/Interfaces/Particles/Twinkle/ITwinkleValues.js +12 -0
- package/umd/Options/Interfaces/Particles/Wobble/IWobble.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/Wobble/IWobble.js +12 -0
- package/umd/Options/Interfaces/Particles/ZIndex/IZIndex.d.ts +6 -0
- package/umd/Options/Interfaces/Particles/ZIndex/IZIndex.js +12 -0
- package/umd/Options/Interfaces/Theme/ITheme.d.ts +8 -0
- package/umd/Options/Interfaces/Theme/ITheme.js +12 -0
- package/umd/Options/Interfaces/Theme/IThemeDefault.d.ts +6 -0
- package/umd/Options/Interfaces/Theme/IThemeDefault.js +12 -0
- package/umd/Plugins/Absorbers/AbsorberContainer.d.ts +7 -0
- package/umd/Plugins/Absorbers/AbsorberContainer.js +12 -0
- package/umd/Plugins/Absorbers/AbsorberInstance.d.ts +33 -0
- package/umd/Plugins/Absorbers/AbsorberInstance.js +172 -0
- package/umd/Plugins/Absorbers/Absorbers.d.ts +22 -0
- package/umd/Plugins/Absorbers/Absorbers.js +128 -0
- package/umd/Plugins/Absorbers/Enums/AbsorberClickMode.d.ts +3 -0
- package/umd/Plugins/Absorbers/Enums/AbsorberClickMode.js +12 -0
- package/umd/Plugins/Absorbers/Enums/index.d.ts +1 -0
- package/umd/Plugins/Absorbers/Enums/index.js +23 -0
- package/umd/Plugins/Absorbers/Options/Classes/Absorber.d.ts +18 -0
- package/umd/Plugins/Absorbers/Options/Classes/Absorber.js +57 -0
- package/umd/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +11 -0
- package/umd/Plugins/Absorbers/Options/Classes/AbsorberSize.js +40 -0
- package/umd/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +9 -0
- package/umd/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.js +31 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +13 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorber.js +12 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.d.ts +12 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberOptions.js +12 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +6 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.js +12 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +4 -0
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.js +12 -0
- package/umd/Plugins/Absorbers/index.d.ts +2 -0
- package/umd/Plugins/Absorbers/index.js +90 -0
- package/umd/Plugins/Emitters/EmitterContainer.d.ts +10 -0
- package/umd/Plugins/Emitters/EmitterContainer.js +12 -0
- package/umd/Plugins/Emitters/EmitterInstance.d.ts +45 -0
- package/umd/Plugins/Emitters/EmitterInstance.js +278 -0
- package/umd/Plugins/Emitters/Emitters.d.ts +25 -0
- package/umd/Plugins/Emitters/Emitters.js +163 -0
- package/umd/Plugins/Emitters/EmittersEngine.d.ts +7 -0
- package/umd/Plugins/Emitters/EmittersEngine.js +12 -0
- package/umd/Plugins/Emitters/Enums/EmitterClickMode.d.ts +3 -0
- package/umd/Plugins/Emitters/Enums/EmitterClickMode.js +12 -0
- package/umd/Plugins/Emitters/Enums/EmitterShapeType.d.ts +4 -0
- package/umd/Plugins/Emitters/Enums/EmitterShapeType.js +12 -0
- package/umd/Plugins/Emitters/Enums/index.d.ts +2 -0
- package/umd/Plugins/Emitters/Enums/index.js +24 -0
- package/umd/Plugins/Emitters/IEmitterShape.d.ts +4 -0
- package/umd/Plugins/Emitters/IEmitterShape.js +12 -0
- package/umd/Plugins/Emitters/Options/Classes/Emitter.d.ts +28 -0
- package/umd/Plugins/Emitters/Options/Classes/Emitter.js +74 -0
- package/umd/Plugins/Emitters/Options/Classes/EmitterLife.d.ts +11 -0
- package/umd/Plugins/Emitters/Options/Classes/EmitterLife.js +36 -0
- package/umd/Plugins/Emitters/Options/Classes/EmitterRate.d.ts +9 -0
- package/umd/Plugins/Emitters/Options/Classes/EmitterRate.js +32 -0
- package/umd/Plugins/Emitters/Options/Classes/EmitterSize.d.ts +11 -0
- package/umd/Plugins/Emitters/Options/Classes/EmitterSize.js +35 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +24 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitter.js +12 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterLife.d.ts +6 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterLife.js +12 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterOptions.d.ts +12 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterOptions.js +12 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterRate.d.ts +5 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterRate.js +12 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterSize.d.ts +5 -0
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitterSize.js +12 -0
- package/umd/Plugins/Emitters/ShapeManager.d.ts +9 -0
- package/umd/Plugins/Emitters/ShapeManager.js +40 -0
- package/umd/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +5 -0
- package/umd/Plugins/Emitters/Shapes/Circle/CircleShape.js +42 -0
- package/umd/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +5 -0
- package/umd/Plugins/Emitters/Shapes/Square/SquareShape.js +53 -0
- package/umd/Plugins/Emitters/index.d.ts +3 -0
- package/umd/Plugins/Emitters/index.js +120 -0
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskInlineArrangement.d.ts +8 -0
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskInlineArrangement.js +12 -0
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskMoveType.d.ts +4 -0
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskMoveType.js +12 -0
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskType.d.ts +6 -0
- package/umd/Plugins/PolygonMask/Enums/PolygonMaskType.js +12 -0
- package/umd/Plugins/PolygonMask/Enums/index.d.ts +3 -0
- package/umd/Plugins/PolygonMask/Enums/index.js +25 -0
- package/umd/Plugins/PolygonMask/Interfaces/ISvgPath.d.ts +6 -0
- package/umd/Plugins/PolygonMask/Interfaces/ISvgPath.js +12 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMask.d.ts +24 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMask.js +76 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.d.ts +15 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskDraw.js +48 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.d.ts +11 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskDrawStroke.js +39 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.d.ts +9 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskInline.js +27 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.d.ts +11 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskLocalSvg.js +39 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.d.ts +10 -0
- package/umd/Plugins/PolygonMask/Options/Classes/PolygonMaskMove.js +31 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.d.ts +18 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMask.js +12 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.d.ts +8 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDraw.js +12 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDrawStroke.d.ts +6 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskDrawStroke.js +12 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskInline.d.ts +4 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskInline.js +12 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.d.ts +6 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskLocalSvg.js +12 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.d.ts +5 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskMove.js +12 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskOptions.d.ts +4 -0
- package/umd/Plugins/PolygonMask/Options/Interfaces/IPolygonMaskOptions.js +12 -0
- package/umd/Plugins/PolygonMask/PolygonMaskInstance.d.ts +38 -0
- package/umd/Plugins/PolygonMask/PolygonMaskInstance.js +396 -0
- package/umd/Plugins/PolygonMask/Types.d.ts +8 -0
- package/umd/Plugins/PolygonMask/Types.js +12 -0
- package/umd/Plugins/PolygonMask/Utils.d.ts +11 -0
- package/umd/Plugins/PolygonMask/Utils.js +134 -0
- package/umd/Plugins/PolygonMask/index.d.ts +2 -0
- package/umd/Plugins/PolygonMask/index.js +67 -0
- package/umd/Plugins/PolygonMask/pathseg.d.ts +0 -0
- package/umd/Plugins/PolygonMask/pathseg.js +1548 -0
- package/umd/Shapes/Circle/CircleDrawer.d.ts +5 -0
- package/umd/Shapes/Circle/CircleDrawer.js +22 -0
- package/umd/Shapes/Circle/index.d.ts +2 -0
- package/umd/Shapes/Circle/index.js +18 -0
- package/umd/Shapes/Image/ImageDrawer.d.ts +18 -0
- package/umd/Shapes/Image/ImageDrawer.js +142 -0
- package/umd/Shapes/Image/Utils.d.ts +28 -0
- package/umd/Shapes/Image/Utils.js +99 -0
- package/umd/Shapes/Image/index.d.ts +2 -0
- package/umd/Shapes/Image/index.js +20 -0
- package/umd/Shapes/Line/LineDrawer.d.ts +5 -0
- package/umd/Shapes/Line/LineDrawer.js +23 -0
- package/umd/Shapes/Line/index.d.ts +2 -0
- package/umd/Shapes/Line/index.js +18 -0
- package/umd/Shapes/Polygon/PolygonDrawer.d.ts +7 -0
- package/umd/Shapes/Polygon/PolygonDrawer.js +36 -0
- package/umd/Shapes/Polygon/PolygonDrawerBase.d.ts +15 -0
- package/umd/Shapes/Polygon/PolygonDrawerBase.js +40 -0
- package/umd/Shapes/Polygon/TriangleDrawer.d.ts +8 -0
- package/umd/Shapes/Polygon/TriangleDrawer.js +35 -0
- package/umd/Shapes/Polygon/index.d.ts +4 -0
- package/umd/Shapes/Polygon/index.js +28 -0
- package/umd/Shapes/Square/SquareDrawer.d.ts +5 -0
- package/umd/Shapes/Square/SquareDrawer.js +23 -0
- package/umd/Shapes/Square/index.d.ts +2 -0
- package/umd/Shapes/Square/index.js +20 -0
- package/umd/Shapes/Star/StarDrawer.d.ts +5 -0
- package/umd/Shapes/Star/StarDrawer.js +34 -0
- package/umd/Shapes/Star/index.d.ts +2 -0
- package/umd/Shapes/Star/index.js +18 -0
- package/umd/Shapes/Text/TextDrawer.d.ts +7 -0
- package/umd/Shapes/Text/TextDrawer.js +75 -0
- package/umd/Shapes/Text/index.d.ts +2 -0
- package/umd/Shapes/Text/index.js +21 -0
- package/umd/Types/ParticlesGroups.d.ts +4 -0
- package/umd/Types/ParticlesGroups.js +12 -0
- package/umd/Types/PathOptions.d.ts +3 -0
- package/umd/Types/PathOptions.js +12 -0
- package/umd/Types/RangeValue.d.ts +2 -0
- package/umd/Types/RangeValue.js +12 -0
- package/umd/Types/RecursivePartial.d.ts +3 -0
- package/umd/Types/RecursivePartial.js +12 -0
- package/umd/Types/ShapeData.d.ts +5 -0
- package/umd/Types/ShapeData.js +12 -0
- package/umd/Types/ShapeDrawerFunctions.d.ts +11 -0
- package/umd/Types/ShapeDrawerFunctions.js +12 -0
- package/umd/Types/SingleOrMultiple.d.ts +1 -0
- package/umd/Types/SingleOrMultiple.js +12 -0
- package/umd/Types/index.d.ts +6 -0
- package/umd/Types/index.js +28 -0
- package/umd/Updaters/Angle/AngleUpdater.d.ts +8 -0
- package/umd/Updaters/Angle/AngleUpdater.js +88 -0
- package/umd/Updaters/Angle/index.d.ts +2 -0
- package/umd/Updaters/Angle/index.js +18 -0
- package/umd/Updaters/Color/ColorUpdater.d.ts +8 -0
- package/umd/Updaters/Color/ColorUpdater.js +77 -0
- package/umd/Updaters/Color/index.d.ts +2 -0
- package/umd/Updaters/Color/index.js +18 -0
- package/umd/Updaters/Life/LifeUpdater.d.ts +8 -0
- package/umd/Updaters/Life/LifeUpdater.js +77 -0
- package/umd/Updaters/Life/index.d.ts +2 -0
- package/umd/Updaters/Life/index.js +18 -0
- package/umd/Updaters/Opacity/OpacityUpdater.d.ts +8 -0
- package/umd/Updaters/Opacity/OpacityUpdater.js +131 -0
- package/umd/Updaters/Opacity/index.d.ts +2 -0
- package/umd/Updaters/Opacity/index.js +18 -0
- package/umd/Updaters/OutModes/IBounceData.d.ts +11 -0
- package/umd/Updaters/OutModes/IBounceData.js +12 -0
- package/umd/Updaters/OutModes/OutOfCanvasUpdater.d.ts +13 -0
- package/umd/Updaters/OutModes/OutOfCanvasUpdater.js +156 -0
- package/umd/Updaters/OutModes/Utils.d.ts +3 -0
- package/umd/Updaters/OutModes/Utils.js +75 -0
- package/umd/Updaters/OutModes/index.d.ts +2 -0
- package/umd/Updaters/OutModes/index.js +18 -0
- package/umd/Updaters/Roll/RollUpdater.d.ts +6 -0
- package/umd/Updaters/Roll/RollUpdater.js +73 -0
- package/umd/Updaters/Roll/index.d.ts +2 -0
- package/umd/Updaters/Roll/index.js +18 -0
- package/umd/Updaters/Size/SizeUpdater.d.ts +6 -0
- package/umd/Updaters/Size/SizeUpdater.js +88 -0
- package/umd/Updaters/Size/index.d.ts +2 -0
- package/umd/Updaters/Size/index.js +18 -0
- package/umd/Updaters/StrokeColor/StrokeColorUpdater.d.ts +8 -0
- package/umd/Updaters/StrokeColor/StrokeColorUpdater.js +94 -0
- package/umd/Updaters/StrokeColor/index.d.ts +2 -0
- package/umd/Updaters/StrokeColor/index.js +18 -0
- package/umd/Updaters/Tilt/TiltUpdater.d.ts +8 -0
- package/umd/Updaters/Tilt/TiltUpdater.js +89 -0
- package/umd/Updaters/Tilt/index.d.ts +2 -0
- package/umd/Updaters/Tilt/index.js +18 -0
- package/umd/Updaters/Wobble/WobbleUpdater.d.ts +14 -0
- package/umd/Updaters/Wobble/WobbleUpdater.js +61 -0
- package/umd/Updaters/Wobble/index.d.ts +2 -0
- package/umd/Updaters/Wobble/index.js +18 -0
- package/umd/Utils/CanvasUtils.d.ts +19 -0
- package/umd/Utils/CanvasUtils.js +297 -0
- package/umd/Utils/ColorUtils.d.ts +26 -0
- package/umd/Utils/ColorUtils.js +486 -0
- package/umd/Utils/NumberUtils.d.ts +23 -0
- package/umd/Utils/NumberUtils.js +138 -0
- package/umd/Utils/Utils.d.ts +38 -0
- package/umd/Utils/Utils.js +279 -0
- package/umd/Utils/index.d.ts +4 -0
- package/umd/Utils/index.js +26 -0
- package/umd/engine.d.ts +26 -0
- package/umd/engine.js +108 -0
- package/umd/full.d.ts +2 -0
- package/umd/full.js +32 -0
- package/umd/index.d.ts +20 -0
- package/umd/index.engine.d.ts +13 -0
- package/umd/index.engine.js +37 -0
- package/umd/index.js +43 -0
- package/umd/index.slim.d.ts +14 -0
- package/umd/index.slim.js +40 -0
- package/umd/pjs.d.ts +14 -0
- package/umd/pjs.js +36 -0
- package/umd/slim.d.ts +2 -0
- package/umd/slim.js +62 -0
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports", "./Utils", "../../Utils", "../../Core", "./Options/Classes/PolygonMask"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PolygonMaskInstance = void 0;
|
|
13
|
+
const Utils_1 = require("./Utils");
|
|
14
|
+
const Utils_2 = require("../../Utils");
|
|
15
|
+
const Core_1 = require("../../Core");
|
|
16
|
+
const PolygonMask_1 = require("./Options/Classes/PolygonMask");
|
|
17
|
+
class PolygonMaskInstance {
|
|
18
|
+
constructor(container) {
|
|
19
|
+
this.container = container;
|
|
20
|
+
this.dimension = {
|
|
21
|
+
height: 0,
|
|
22
|
+
width: 0,
|
|
23
|
+
};
|
|
24
|
+
this.path2DSupported = !!window.Path2D;
|
|
25
|
+
this.options = new PolygonMask_1.PolygonMask();
|
|
26
|
+
this.polygonMaskMoveRadius = this.options.move.radius * container.retina.pixelRatio;
|
|
27
|
+
}
|
|
28
|
+
async initAsync(options) {
|
|
29
|
+
this.options.load(options === null || options === void 0 ? void 0 : options.polygon);
|
|
30
|
+
const polygonMaskOptions = this.options;
|
|
31
|
+
this.polygonMaskMoveRadius = polygonMaskOptions.move.radius * this.container.retina.pixelRatio;
|
|
32
|
+
if (polygonMaskOptions.enable) {
|
|
33
|
+
await this.initRawData();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
resize() {
|
|
37
|
+
const container = this.container;
|
|
38
|
+
const options = this.options;
|
|
39
|
+
if (!(options.enable && options.type !== "none")) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (this.redrawTimeout) {
|
|
43
|
+
clearTimeout(this.redrawTimeout);
|
|
44
|
+
}
|
|
45
|
+
this.redrawTimeout = window.setTimeout(async () => {
|
|
46
|
+
await this.initRawData(true);
|
|
47
|
+
await container.particles.redraw();
|
|
48
|
+
}, 250);
|
|
49
|
+
}
|
|
50
|
+
stop() {
|
|
51
|
+
delete this.raw;
|
|
52
|
+
delete this.paths;
|
|
53
|
+
}
|
|
54
|
+
particlesInitialization() {
|
|
55
|
+
const options = this.options;
|
|
56
|
+
if (options.enable &&
|
|
57
|
+
options.type === "inline" &&
|
|
58
|
+
(options.inline.arrangement === "one-per-point" ||
|
|
59
|
+
options.inline.arrangement === "per-point")) {
|
|
60
|
+
this.drawPoints();
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
particlePosition(position) {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
const options = this.options;
|
|
68
|
+
if (!(options.enable && ((_b = (_a = this.raw) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0)) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
return (0, Utils_2.deepExtend)({}, position ? position : this.randomPoint());
|
|
72
|
+
}
|
|
73
|
+
particleBounce(particle, delta, direction) {
|
|
74
|
+
return this.polygonBounce(particle, delta, direction);
|
|
75
|
+
}
|
|
76
|
+
clickPositionValid(position) {
|
|
77
|
+
const options = this.options;
|
|
78
|
+
return (options.enable &&
|
|
79
|
+
options.type !== "none" &&
|
|
80
|
+
options.type !== "inline" &&
|
|
81
|
+
this.checkInsidePolygon(position));
|
|
82
|
+
}
|
|
83
|
+
draw(context) {
|
|
84
|
+
var _a;
|
|
85
|
+
if (!((_a = this.paths) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const options = this.options;
|
|
89
|
+
const polygonDraw = options.draw;
|
|
90
|
+
if (!(options.enable && polygonDraw.enable)) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const rawData = this.raw;
|
|
94
|
+
for (const path of this.paths) {
|
|
95
|
+
const path2d = path.path2d;
|
|
96
|
+
const path2dSupported = this.path2DSupported;
|
|
97
|
+
if (!context) {
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if (path2dSupported && path2d && this.offset) {
|
|
101
|
+
(0, Utils_1.drawPolygonMaskPath)(context, path2d, polygonDraw.stroke, this.offset);
|
|
102
|
+
}
|
|
103
|
+
else if (rawData) {
|
|
104
|
+
(0, Utils_1.drawPolygonMask)(context, rawData, polygonDraw.stroke);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
polygonBounce(particle, _delta, direction) {
|
|
109
|
+
const options = this.options;
|
|
110
|
+
if (!this.raw || !options.enable || direction !== "top") {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
if (options.type === "inside" || options.type === "outside") {
|
|
114
|
+
let closest, dx, dy;
|
|
115
|
+
const pos = particle.getPosition(), radius = particle.getRadius();
|
|
116
|
+
for (let i = 0, j = this.raw.length - 1; i < this.raw.length; j = i++) {
|
|
117
|
+
const pi = this.raw[i], pj = this.raw[j];
|
|
118
|
+
closest = (0, Utils_1.calcClosestPtOnSegment)(pi, pj, pos);
|
|
119
|
+
const dist = (0, Utils_2.getDistances)(pos, closest);
|
|
120
|
+
[dx, dy] = [dist.dx, dist.dy];
|
|
121
|
+
if (dist.distance < radius) {
|
|
122
|
+
(0, Utils_1.segmentBounce)(pi, pj, particle.velocity);
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (closest && dx !== undefined && dy !== undefined && !this.checkInsidePolygon(pos)) {
|
|
127
|
+
const factor = { x: 1, y: 1 };
|
|
128
|
+
if (particle.position.x >= closest.x) {
|
|
129
|
+
factor.x = -1;
|
|
130
|
+
}
|
|
131
|
+
if (particle.position.y >= closest.y) {
|
|
132
|
+
factor.y = -1;
|
|
133
|
+
}
|
|
134
|
+
particle.position.x = closest.x + radius * 2 * factor.x;
|
|
135
|
+
particle.position.y = closest.y + radius * 2 * factor.y;
|
|
136
|
+
particle.velocity.mult(-1);
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
else if (options.type === "inline" && particle.initialPosition) {
|
|
141
|
+
const dist = (0, Utils_2.getDistance)(particle.initialPosition, particle.getPosition());
|
|
142
|
+
if (dist > this.polygonMaskMoveRadius) {
|
|
143
|
+
particle.velocity.x = particle.velocity.y / 2 - particle.velocity.x;
|
|
144
|
+
particle.velocity.y = particle.velocity.x / 2 - particle.velocity.y;
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
checkInsidePolygon(position) {
|
|
151
|
+
var _a, _b;
|
|
152
|
+
const container = this.container;
|
|
153
|
+
const options = this.options;
|
|
154
|
+
if (!options.enable || options.type === "none" || options.type === "inline") {
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
if (!this.raw) {
|
|
158
|
+
throw new Error(Core_1.Constants.noPolygonFound);
|
|
159
|
+
}
|
|
160
|
+
const canvasSize = container.canvas.size;
|
|
161
|
+
const x = (_a = position === null || position === void 0 ? void 0 : position.x) !== null && _a !== void 0 ? _a : Math.random() * canvasSize.width;
|
|
162
|
+
const y = (_b = position === null || position === void 0 ? void 0 : position.y) !== null && _b !== void 0 ? _b : Math.random() * canvasSize.height;
|
|
163
|
+
let inside = false;
|
|
164
|
+
for (let i = 0, j = this.raw.length - 1; i < this.raw.length; j = i++) {
|
|
165
|
+
const pi = this.raw[i];
|
|
166
|
+
const pj = this.raw[j];
|
|
167
|
+
const intersect = pi.y > y !== pj.y > y && x < ((pj.x - pi.x) * (y - pi.y)) / (pj.y - pi.y) + pi.x;
|
|
168
|
+
if (intersect) {
|
|
169
|
+
inside = !inside;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return options.type === "inside"
|
|
173
|
+
? inside
|
|
174
|
+
: options.type === "outside"
|
|
175
|
+
? !inside
|
|
176
|
+
: false;
|
|
177
|
+
}
|
|
178
|
+
parseSvgPath(xml, force) {
|
|
179
|
+
var _a, _b, _c;
|
|
180
|
+
const forceDownload = force !== null && force !== void 0 ? force : false;
|
|
181
|
+
if (this.paths !== undefined && !forceDownload) {
|
|
182
|
+
return this.raw;
|
|
183
|
+
}
|
|
184
|
+
const container = this.container;
|
|
185
|
+
const options = this.options;
|
|
186
|
+
const parser = new DOMParser();
|
|
187
|
+
const doc = parser.parseFromString(xml, "image/svg+xml");
|
|
188
|
+
const svg = doc.getElementsByTagName("svg")[0];
|
|
189
|
+
let svgPaths = svg.getElementsByTagName("path");
|
|
190
|
+
if (!svgPaths.length) {
|
|
191
|
+
svgPaths = doc.getElementsByTagName("path");
|
|
192
|
+
}
|
|
193
|
+
this.paths = [];
|
|
194
|
+
for (let i = 0; i < svgPaths.length; i++) {
|
|
195
|
+
const path = svgPaths.item(i);
|
|
196
|
+
if (path) {
|
|
197
|
+
this.paths.push({
|
|
198
|
+
element: path,
|
|
199
|
+
length: path.getTotalLength(),
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
const pxRatio = container.retina.pixelRatio;
|
|
204
|
+
const scale = options.scale / pxRatio;
|
|
205
|
+
this.dimension.width = parseFloat((_a = svg.getAttribute("width")) !== null && _a !== void 0 ? _a : "0") * scale;
|
|
206
|
+
this.dimension.height = parseFloat((_b = svg.getAttribute("height")) !== null && _b !== void 0 ? _b : "0") * scale;
|
|
207
|
+
const position = (_c = options.position) !== null && _c !== void 0 ? _c : {
|
|
208
|
+
x: 50,
|
|
209
|
+
y: 50,
|
|
210
|
+
};
|
|
211
|
+
this.offset = {
|
|
212
|
+
x: (container.canvas.size.width * position.x) / (100 * pxRatio) - this.dimension.width / 2,
|
|
213
|
+
y: (container.canvas.size.height * position.y) / (100 * pxRatio) - this.dimension.height / 2,
|
|
214
|
+
};
|
|
215
|
+
return (0, Utils_1.parsePaths)(this.paths, scale, this.offset);
|
|
216
|
+
}
|
|
217
|
+
async downloadSvgPath(svgUrl, force) {
|
|
218
|
+
const options = this.options;
|
|
219
|
+
const url = svgUrl || options.url;
|
|
220
|
+
const forceDownload = force !== null && force !== void 0 ? force : false;
|
|
221
|
+
if (!url || (this.paths !== undefined && !forceDownload)) {
|
|
222
|
+
return this.raw;
|
|
223
|
+
}
|
|
224
|
+
const req = await fetch(url);
|
|
225
|
+
if (!req.ok) {
|
|
226
|
+
throw new Error("tsParticles Error - Error occurred during polygon mask download");
|
|
227
|
+
}
|
|
228
|
+
return this.parseSvgPath(await req.text(), force);
|
|
229
|
+
}
|
|
230
|
+
drawPoints() {
|
|
231
|
+
if (!this.raw) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
for (const item of this.raw) {
|
|
235
|
+
this.container.particles.addParticle({
|
|
236
|
+
x: item.x,
|
|
237
|
+
y: item.y,
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
randomPoint() {
|
|
242
|
+
const container = this.container;
|
|
243
|
+
const options = this.options;
|
|
244
|
+
let position;
|
|
245
|
+
if (options.type === "inline") {
|
|
246
|
+
switch (options.inline.arrangement) {
|
|
247
|
+
case "random-point":
|
|
248
|
+
position = this.getRandomPoint();
|
|
249
|
+
break;
|
|
250
|
+
case "random-length":
|
|
251
|
+
position = this.getRandomPointByLength();
|
|
252
|
+
break;
|
|
253
|
+
case "equidistant":
|
|
254
|
+
position = this.getEquidistantPointByIndex(container.particles.count);
|
|
255
|
+
break;
|
|
256
|
+
case "one-per-point":
|
|
257
|
+
case "per-point":
|
|
258
|
+
default:
|
|
259
|
+
position = this.getPointByIndex(container.particles.count);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
position = {
|
|
264
|
+
x: Math.random() * container.canvas.size.width,
|
|
265
|
+
y: Math.random() * container.canvas.size.height,
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
if (this.checkInsidePolygon(position)) {
|
|
269
|
+
return position;
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
return this.randomPoint();
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
getRandomPoint() {
|
|
276
|
+
if (!this.raw || !this.raw.length) {
|
|
277
|
+
throw new Error(Core_1.Constants.noPolygonDataLoaded);
|
|
278
|
+
}
|
|
279
|
+
const coords = (0, Utils_2.itemFromArray)(this.raw);
|
|
280
|
+
return {
|
|
281
|
+
x: coords.x,
|
|
282
|
+
y: coords.y,
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
getRandomPointByLength() {
|
|
286
|
+
var _a, _b, _c;
|
|
287
|
+
const options = this.options;
|
|
288
|
+
if (!this.raw || !this.raw.length || !((_a = this.paths) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
289
|
+
throw new Error(Core_1.Constants.noPolygonDataLoaded);
|
|
290
|
+
}
|
|
291
|
+
const path = (0, Utils_2.itemFromArray)(this.paths);
|
|
292
|
+
const distance = Math.floor(Math.random() * path.length) + 1;
|
|
293
|
+
const point = path.element.getPointAtLength(distance);
|
|
294
|
+
return {
|
|
295
|
+
x: point.x * options.scale + (((_b = this.offset) === null || _b === void 0 ? void 0 : _b.x) || 0),
|
|
296
|
+
y: point.y * options.scale + (((_c = this.offset) === null || _c === void 0 ? void 0 : _c.y) || 0),
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
getEquidistantPointByIndex(index) {
|
|
300
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
301
|
+
const options = this.container.actualOptions;
|
|
302
|
+
const polygonMaskOptions = this.options;
|
|
303
|
+
if (!this.raw || !this.raw.length || !((_a = this.paths) === null || _a === void 0 ? void 0 : _a.length))
|
|
304
|
+
throw new Error(Core_1.Constants.noPolygonDataLoaded);
|
|
305
|
+
let offset = 0;
|
|
306
|
+
let point;
|
|
307
|
+
const totalLength = this.paths.reduce((tot, path) => tot + path.length, 0);
|
|
308
|
+
const distance = totalLength / options.particles.number.value;
|
|
309
|
+
for (const path of this.paths) {
|
|
310
|
+
const pathDistance = distance * index - offset;
|
|
311
|
+
if (pathDistance <= path.length) {
|
|
312
|
+
point = path.element.getPointAtLength(pathDistance);
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
offset += path.length;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
return {
|
|
320
|
+
x: ((_b = point === null || point === void 0 ? void 0 : point.x) !== null && _b !== void 0 ? _b : 0) * polygonMaskOptions.scale + ((_d = (_c = this.offset) === null || _c === void 0 ? void 0 : _c.x) !== null && _d !== void 0 ? _d : 0),
|
|
321
|
+
y: ((_e = point === null || point === void 0 ? void 0 : point.y) !== null && _e !== void 0 ? _e : 0) * polygonMaskOptions.scale + ((_g = (_f = this.offset) === null || _f === void 0 ? void 0 : _f.y) !== null && _g !== void 0 ? _g : 0),
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
getPointByIndex(index) {
|
|
325
|
+
if (!this.raw || !this.raw.length) {
|
|
326
|
+
throw new Error(Core_1.Constants.noPolygonDataLoaded);
|
|
327
|
+
}
|
|
328
|
+
const coords = this.raw[index % this.raw.length];
|
|
329
|
+
return {
|
|
330
|
+
x: coords.x,
|
|
331
|
+
y: coords.y,
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
createPath2D() {
|
|
335
|
+
var _a, _b;
|
|
336
|
+
const options = this.options;
|
|
337
|
+
if (!this.path2DSupported || !((_a = this.paths) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
for (const path of this.paths) {
|
|
341
|
+
const pathData = (_b = path.element) === null || _b === void 0 ? void 0 : _b.getAttribute("d");
|
|
342
|
+
if (pathData) {
|
|
343
|
+
const path2d = new Path2D(pathData);
|
|
344
|
+
const matrix = document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGMatrix();
|
|
345
|
+
const finalPath = new Path2D();
|
|
346
|
+
const transform = matrix.scale(options.scale);
|
|
347
|
+
if (finalPath.addPath) {
|
|
348
|
+
finalPath.addPath(path2d, transform);
|
|
349
|
+
path.path2d = finalPath;
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
delete path.path2d;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
delete path.path2d;
|
|
357
|
+
}
|
|
358
|
+
if (path.path2d || !this.raw) {
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
361
|
+
path.path2d = new Path2D();
|
|
362
|
+
path.path2d.moveTo(this.raw[0].x, this.raw[0].y);
|
|
363
|
+
this.raw.forEach((pos, i) => {
|
|
364
|
+
var _a;
|
|
365
|
+
if (i > 0) {
|
|
366
|
+
(_a = path.path2d) === null || _a === void 0 ? void 0 : _a.lineTo(pos.x, pos.y);
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
path.path2d.closePath();
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
async initRawData(force) {
|
|
373
|
+
const options = this.options;
|
|
374
|
+
if (options.url) {
|
|
375
|
+
this.raw = await this.downloadSvgPath(options.url, force);
|
|
376
|
+
}
|
|
377
|
+
else if (options.data) {
|
|
378
|
+
const data = options.data;
|
|
379
|
+
let svg;
|
|
380
|
+
if (typeof data !== "string") {
|
|
381
|
+
const path = data.path instanceof Array
|
|
382
|
+
? data.path.map((t) => `<path d="${t}" />`).join("")
|
|
383
|
+
: `<path d="${data.path}" />`;
|
|
384
|
+
const namespaces = 'xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
385
|
+
svg = `<svg ${namespaces} width="${data.size.width}" height="${data.size.height}">${path}</svg>`;
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
svg = data;
|
|
389
|
+
}
|
|
390
|
+
this.raw = this.parseSvgPath(svg, force);
|
|
391
|
+
}
|
|
392
|
+
this.createPath2D();
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
exports.PolygonMaskInstance = PolygonMaskInstance;
|
|
396
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SVGPathSegArcAbs, SVGPathSegArcRel, SVGPathSegCurvetoCubicAbs, SVGPathSegCurvetoCubicRel, SVGPathSegCurvetoCubicSmoothAbs, SVGPathSegCurvetoCubicSmoothRel, SVGPathSegCurvetoQuadraticAbs, SVGPathSegCurvetoQuadraticRel, SVGPathSegCurvetoQuadraticSmoothAbs, SVGPathSegCurvetoQuadraticSmoothRel, SVGPathSegLinetoAbs, SVGPathSegLinetoRel, SVGPathSegMovetoAbs, SVGPathSegMovetoRel } from "./pathseg";
|
|
2
|
+
import type { IOptions } from "../../Options/Interfaces/IOptions";
|
|
3
|
+
import type { IPolygonMask } from "./Options/Interfaces/IPolygonMask";
|
|
4
|
+
export declare type SvgAbsoluteCoordinatesTypes = SVGPathSegArcAbs | SVGPathSegCurvetoCubicAbs | SVGPathSegCurvetoCubicSmoothAbs | SVGPathSegCurvetoQuadraticAbs | SVGPathSegCurvetoQuadraticSmoothAbs | SVGPathSegLinetoAbs | SVGPathSegMovetoAbs;
|
|
5
|
+
export declare type SvgRelativeCoordinatesTypes = SVGPathSegArcRel | SVGPathSegCurvetoCubicRel | SVGPathSegCurvetoCubicSmoothRel | SVGPathSegCurvetoQuadraticRel | SVGPathSegCurvetoQuadraticSmoothRel | SVGPathSegLinetoRel | SVGPathSegMovetoRel;
|
|
6
|
+
export declare type IPolygonMaskOptions = IOptions & {
|
|
7
|
+
polygon: IPolygonMask;
|
|
8
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ICoordinates } from "../../Core";
|
|
2
|
+
import type { IPolygonMaskDrawStroke } from "./Options/Interfaces/IPolygonMaskDrawStroke";
|
|
3
|
+
import type { ISvgPath } from "./Interfaces/ISvgPath";
|
|
4
|
+
import { Vector } from "../../Core";
|
|
5
|
+
export declare function drawPolygonMask(context: CanvasRenderingContext2D, rawData: ICoordinates[], stroke: IPolygonMaskDrawStroke): void;
|
|
6
|
+
export declare function drawPolygonMaskPath(context: CanvasRenderingContext2D, path: Path2D, stroke: IPolygonMaskDrawStroke, position: ICoordinates): void;
|
|
7
|
+
export declare function parsePaths(paths: ISvgPath[], scale: number, offset: ICoordinates): ICoordinates[];
|
|
8
|
+
export declare function calcClosestPtOnSegment(s1: ICoordinates, s2: ICoordinates, pos: ICoordinates): ICoordinates & {
|
|
9
|
+
isOnSegment: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function segmentBounce(start: ICoordinates, stop: ICoordinates, velocity: Vector): void;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports", "../../Utils", "../../Core"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.segmentBounce = exports.calcClosestPtOnSegment = exports.parsePaths = exports.drawPolygonMaskPath = exports.drawPolygonMask = void 0;
|
|
13
|
+
const Utils_1 = require("../../Utils");
|
|
14
|
+
const Core_1 = require("../../Core");
|
|
15
|
+
function drawPolygonMask(context, rawData, stroke) {
|
|
16
|
+
const color = (0, Utils_1.colorToRgb)(stroke.color);
|
|
17
|
+
if (!color) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
context.beginPath();
|
|
21
|
+
context.moveTo(rawData[0].x, rawData[0].y);
|
|
22
|
+
for (const item of rawData) {
|
|
23
|
+
context.lineTo(item.x, item.y);
|
|
24
|
+
}
|
|
25
|
+
context.closePath();
|
|
26
|
+
context.strokeStyle = (0, Utils_1.getStyleFromRgb)(color);
|
|
27
|
+
context.lineWidth = stroke.width;
|
|
28
|
+
context.stroke();
|
|
29
|
+
}
|
|
30
|
+
exports.drawPolygonMask = drawPolygonMask;
|
|
31
|
+
function drawPolygonMaskPath(context, path, stroke, position) {
|
|
32
|
+
context.translate(position.x, position.y);
|
|
33
|
+
const color = (0, Utils_1.colorToRgb)(stroke.color);
|
|
34
|
+
if (!color) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
context.strokeStyle = (0, Utils_1.getStyleFromRgb)(color, stroke.opacity);
|
|
38
|
+
context.lineWidth = stroke.width;
|
|
39
|
+
context.stroke(path);
|
|
40
|
+
}
|
|
41
|
+
exports.drawPolygonMaskPath = drawPolygonMaskPath;
|
|
42
|
+
function parsePaths(paths, scale, offset) {
|
|
43
|
+
var _a;
|
|
44
|
+
const res = [];
|
|
45
|
+
for (const path of paths) {
|
|
46
|
+
const segments = path.element.pathSegList;
|
|
47
|
+
const len = (_a = segments === null || segments === void 0 ? void 0 : segments.numberOfItems) !== null && _a !== void 0 ? _a : 0;
|
|
48
|
+
const p = {
|
|
49
|
+
x: 0,
|
|
50
|
+
y: 0,
|
|
51
|
+
};
|
|
52
|
+
for (let i = 0; i < len; i++) {
|
|
53
|
+
const segment = segments === null || segments === void 0 ? void 0 : segments.getItem(i);
|
|
54
|
+
const svgPathSeg = window.SVGPathSeg;
|
|
55
|
+
switch (segment === null || segment === void 0 ? void 0 : segment.pathSegType) {
|
|
56
|
+
case svgPathSeg.PATHSEG_MOVETO_ABS:
|
|
57
|
+
case svgPathSeg.PATHSEG_LINETO_ABS:
|
|
58
|
+
case svgPathSeg.PATHSEG_CURVETO_CUBIC_ABS:
|
|
59
|
+
case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:
|
|
60
|
+
case svgPathSeg.PATHSEG_ARC_ABS:
|
|
61
|
+
case svgPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
|
|
62
|
+
case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: {
|
|
63
|
+
const absSeg = segment;
|
|
64
|
+
p.x = absSeg.x;
|
|
65
|
+
p.y = absSeg.y;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
case svgPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:
|
|
69
|
+
p.x = segment.x;
|
|
70
|
+
break;
|
|
71
|
+
case svgPathSeg.PATHSEG_LINETO_VERTICAL_ABS:
|
|
72
|
+
p.y = segment.y;
|
|
73
|
+
break;
|
|
74
|
+
case svgPathSeg.PATHSEG_LINETO_REL:
|
|
75
|
+
case svgPathSeg.PATHSEG_MOVETO_REL:
|
|
76
|
+
case svgPathSeg.PATHSEG_CURVETO_CUBIC_REL:
|
|
77
|
+
case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:
|
|
78
|
+
case svgPathSeg.PATHSEG_ARC_REL:
|
|
79
|
+
case svgPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:
|
|
80
|
+
case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: {
|
|
81
|
+
const relSeg = segment;
|
|
82
|
+
p.x += relSeg.x;
|
|
83
|
+
p.y += relSeg.y;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
case svgPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:
|
|
87
|
+
p.x += segment.x;
|
|
88
|
+
break;
|
|
89
|
+
case svgPathSeg.PATHSEG_LINETO_VERTICAL_REL:
|
|
90
|
+
p.y += segment.y;
|
|
91
|
+
break;
|
|
92
|
+
case svgPathSeg.PATHSEG_UNKNOWN:
|
|
93
|
+
case svgPathSeg.PATHSEG_CLOSEPATH:
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
res.push({
|
|
97
|
+
x: p.x * scale + offset.x,
|
|
98
|
+
y: p.y * scale + offset.y,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return res;
|
|
103
|
+
}
|
|
104
|
+
exports.parsePaths = parsePaths;
|
|
105
|
+
function calcClosestPtOnSegment(s1, s2, pos) {
|
|
106
|
+
const { dx, dy } = (0, Utils_1.getDistances)(pos, s1);
|
|
107
|
+
const { dx: dxx, dy: dyy } = (0, Utils_1.getDistances)(s2, s1);
|
|
108
|
+
const t = (dx * dxx + dy * dyy) / (dxx ** 2 + dyy ** 2);
|
|
109
|
+
const res = {
|
|
110
|
+
x: s1.x + dxx * t,
|
|
111
|
+
y: s1.x + dyy * t,
|
|
112
|
+
isOnSegment: t >= 0 && t <= 1,
|
|
113
|
+
};
|
|
114
|
+
if (t < 0) {
|
|
115
|
+
res.x = s1.x;
|
|
116
|
+
res.y = s1.y;
|
|
117
|
+
}
|
|
118
|
+
else if (t > 1) {
|
|
119
|
+
res.x = s2.x;
|
|
120
|
+
res.y = s2.y;
|
|
121
|
+
}
|
|
122
|
+
return res;
|
|
123
|
+
}
|
|
124
|
+
exports.calcClosestPtOnSegment = calcClosestPtOnSegment;
|
|
125
|
+
function segmentBounce(start, stop, velocity) {
|
|
126
|
+
const { dx, dy } = (0, Utils_1.getDistances)(start, stop);
|
|
127
|
+
const wallAngle = Math.atan2(dy, dx);
|
|
128
|
+
const wallNormal = Core_1.Vector.create(Math.sin(wallAngle), -Math.cos(wallAngle));
|
|
129
|
+
const d = 2 * (velocity.x * wallNormal.x + velocity.y * wallNormal.y);
|
|
130
|
+
wallNormal.multTo(d);
|
|
131
|
+
velocity.subFrom(wallNormal);
|
|
132
|
+
}
|
|
133
|
+
exports.segmentBounce = segmentBounce;
|
|
134
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
+
if (k2 === undefined) k2 = k;
|
|
3
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
4
|
+
}) : (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
o[k2] = m[k];
|
|
7
|
+
}));
|
|
8
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
9
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
10
|
+
}) : function(o, v) {
|
|
11
|
+
o["default"] = v;
|
|
12
|
+
});
|
|
13
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
14
|
+
if (mod && mod.__esModule) return mod;
|
|
15
|
+
var result = {};
|
|
16
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
17
|
+
__setModuleDefault(result, mod);
|
|
18
|
+
return result;
|
|
19
|
+
};
|
|
20
|
+
(function (factory) {
|
|
21
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
22
|
+
var v = factory(require, exports);
|
|
23
|
+
if (v !== undefined) module.exports = v;
|
|
24
|
+
}
|
|
25
|
+
else if (typeof define === "function" && define.amd) {
|
|
26
|
+
define(["require", "exports", "./Options/Classes/PolygonMask", "./PolygonMaskInstance", "../../Utils"], factory);
|
|
27
|
+
}
|
|
28
|
+
})(function (require, exports) {
|
|
29
|
+
"use strict";
|
|
30
|
+
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.loadPolygonMaskPlugin = void 0;
|
|
33
|
+
const PolygonMask_1 = require("./Options/Classes/PolygonMask");
|
|
34
|
+
const PolygonMaskInstance_1 = require("./PolygonMaskInstance");
|
|
35
|
+
const Utils_1 = require("../../Utils");
|
|
36
|
+
class PolygonMaskPlugin {
|
|
37
|
+
constructor() {
|
|
38
|
+
this.id = "polygonMask";
|
|
39
|
+
}
|
|
40
|
+
getPlugin(container) {
|
|
41
|
+
return new PolygonMaskInstance_1.PolygonMaskInstance(container);
|
|
42
|
+
}
|
|
43
|
+
needsPlugin(options) {
|
|
44
|
+
var _a, _b, _c;
|
|
45
|
+
return ((_b = (_a = options === null || options === void 0 ? void 0 : options.polygon) === null || _a === void 0 ? void 0 : _a.enable) !== null && _b !== void 0 ? _b : (((_c = options === null || options === void 0 ? void 0 : options.polygon) === null || _c === void 0 ? void 0 : _c.type) !== undefined && options.polygon.type !== "none"));
|
|
46
|
+
}
|
|
47
|
+
loadOptions(options, source) {
|
|
48
|
+
if (!this.needsPlugin(source)) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const optionsCast = options;
|
|
52
|
+
let polygonOptions = optionsCast.polygon;
|
|
53
|
+
if ((polygonOptions === null || polygonOptions === void 0 ? void 0 : polygonOptions.load) === undefined) {
|
|
54
|
+
optionsCast.polygon = polygonOptions = new PolygonMask_1.PolygonMask();
|
|
55
|
+
}
|
|
56
|
+
polygonOptions.load(source === null || source === void 0 ? void 0 : source.polygon);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function loadPolygonMaskPlugin(engine) {
|
|
60
|
+
if (!(0, Utils_1.isSsr)() && !("SVGPathSeg" in window)) {
|
|
61
|
+
await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./pathseg"))) : new Promise((resolve_1, reject_1) => { require(["./pathseg"], resolve_1, reject_1); }).then(__importStar));
|
|
62
|
+
}
|
|
63
|
+
const plugin = new PolygonMaskPlugin();
|
|
64
|
+
await engine.addPlugin(plugin);
|
|
65
|
+
}
|
|
66
|
+
exports.loadPolygonMaskPlugin = loadPolygonMaskPlugin;
|
|
67
|
+
});
|
|
File without changes
|