@tsparticles/engine 3.9.1 → 4.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/638.min.js +2 -0
- package/638.min.js.LICENSE.txt +1 -0
- package/browser/Core/Canvas.js +126 -181
- package/browser/Core/Container.js +22 -18
- package/browser/Core/Engine.js +64 -54
- package/browser/Core/Particle.js +43 -48
- package/browser/Core/Particles.js +33 -24
- package/browser/Core/Retina.js +2 -3
- package/browser/Core/Utils/Constants.js +2 -2
- package/browser/Core/Utils/EventListeners.js +74 -64
- package/browser/Core/Utils/QuadTree.js +1 -1
- package/browser/Core/Utils/Ranges.js +2 -2
- package/browser/Core/Utils/Vectors.js +15 -21
- package/browser/Options/Classes/AnimatableColor.js +3 -3
- package/browser/Options/Classes/AnimationOptions.js +1 -1
- package/browser/Options/Classes/ColorAnimation.js +1 -1
- package/browser/Options/Classes/Options.js +13 -10
- package/browser/Options/Classes/Particles/Move/Move.js +1 -4
- package/browser/Options/Classes/Particles/Move/MoveAngle.js +1 -1
- package/browser/Options/Classes/Particles/Move/MoveAttract.js +1 -1
- package/browser/Options/Classes/Particles/Move/MoveGravity.js +1 -1
- package/browser/Options/Classes/Particles/Move/Spin.js +1 -1
- package/browser/Options/Classes/Particles/ParticlesOptions.js +0 -6
- package/browser/Options/Classes/Particles/Stroke.js +1 -1
- package/browser/Options/Classes/ValueWithRandom.js +1 -1
- package/browser/Utils/CanvasUtils.js +65 -21
- package/browser/Utils/ColorUtils.js +61 -45
- package/browser/Utils/EventDispatcher.js +3 -1
- package/browser/Utils/LogUtils.js +22 -0
- package/browser/Utils/{NumberUtils.js → MathUtils.js} +14 -7
- package/browser/Utils/Utils.js +23 -125
- package/browser/bundle.js +3 -3
- package/browser/export-types.js +1 -99
- package/browser/exports.js +2 -9
- package/browser/index.js +3 -7
- package/browser/initEngine.js +4 -0
- package/cjs/Core/Canvas.js +136 -195
- package/cjs/Core/Container.js +57 -57
- package/cjs/Core/Engine.js +77 -71
- package/cjs/Core/Interfaces/Colors.js +1 -2
- package/cjs/Core/Interfaces/IBounds.js +1 -2
- package/cjs/Core/Interfaces/IBubbleParticleData.js +1 -2
- package/cjs/Core/Interfaces/ICircleBouncer.js +1 -2
- package/cjs/Core/Interfaces/IColorManager.js +1 -2
- package/cjs/Core/Interfaces/IContainerInteractivity.js +1 -2
- package/cjs/Core/Interfaces/IContainerPlugin.js +1 -2
- package/cjs/Core/Interfaces/ICoordinates.js +1 -2
- package/cjs/Core/Interfaces/IDelta.js +1 -2
- package/cjs/Core/Interfaces/IDimension.js +1 -2
- package/cjs/Core/Interfaces/IDistance.js +1 -2
- package/cjs/Core/Interfaces/IDrawParticleParams.js +1 -2
- package/cjs/Core/Interfaces/IEffectDrawer.js +1 -2
- package/cjs/Core/Interfaces/IExternalInteractor.js +1 -2
- package/cjs/Core/Interfaces/IInteractor.js +1 -2
- package/cjs/Core/Interfaces/ILoadParams.js +1 -2
- package/cjs/Core/Interfaces/IMouseData.js +1 -2
- package/cjs/Core/Interfaces/IMovePathGenerator.js +1 -2
- package/cjs/Core/Interfaces/IParticleColorStyle.js +1 -2
- package/cjs/Core/Interfaces/IParticleHslAnimation.js +1 -2
- package/cjs/Core/Interfaces/IParticleLife.js +1 -2
- package/cjs/Core/Interfaces/IParticleMover.js +1 -2
- package/cjs/Core/Interfaces/IParticleRetinaProps.js +1 -2
- package/cjs/Core/Interfaces/IParticleRoll.js +1 -2
- package/cjs/Core/Interfaces/IParticleTransformValues.js +1 -2
- package/cjs/Core/Interfaces/IParticleUpdater.js +1 -2
- package/cjs/Core/Interfaces/IParticleValueAnimation.js +1 -2
- package/cjs/Core/Interfaces/IParticlesInteractor.js +1 -2
- package/cjs/Core/Interfaces/IPlugin.js +1 -2
- package/cjs/Core/Interfaces/IPositionFromSizeParams.js +1 -2
- package/cjs/Core/Interfaces/IRangeValue.js +1 -2
- package/cjs/Core/Interfaces/IShapeDrawData.js +1 -2
- package/cjs/Core/Interfaces/IShapeDrawer.js +1 -2
- package/cjs/Core/Interfaces/IShapeValues.js +1 -2
- package/cjs/Core/Interfaces/ISlowParticleData.js +1 -2
- package/cjs/Core/Particle.js +99 -108
- package/cjs/Core/Particles.js +63 -58
- package/cjs/Core/Retina.js +13 -18
- package/cjs/Core/Utils/Constants.js +3 -7
- package/cjs/Core/Utils/EventListeners.js +94 -88
- package/cjs/Core/Utils/ExternalInteractorBase.js +3 -7
- package/cjs/Core/Utils/InteractionManager.js +4 -8
- package/cjs/Core/Utils/ParticlesInteractorBase.js +3 -7
- package/cjs/Core/Utils/Point.js +1 -5
- package/cjs/Core/Utils/QuadTree.js +10 -14
- package/cjs/Core/Utils/Ranges.js +14 -20
- package/cjs/Core/Utils/Vectors.js +24 -35
- package/cjs/Enums/AnimationStatus.js +2 -5
- package/cjs/Enums/Directions/MoveDirection.js +2 -5
- package/cjs/Enums/Directions/OutModeDirection.js +2 -5
- package/cjs/Enums/Directions/RotateDirection.js +2 -5
- package/cjs/Enums/InteractivityDetect.js +2 -5
- package/cjs/Enums/Modes/AnimationMode.js +2 -5
- package/cjs/Enums/Modes/LimitMode.js +2 -5
- package/cjs/Enums/Modes/OutMode.js +2 -5
- package/cjs/Enums/Modes/PixelMode.js +2 -5
- package/cjs/Enums/Modes/ResponsiveMode.js +2 -5
- package/cjs/Enums/Modes/ThemeMode.js +2 -5
- package/cjs/Enums/Types/AlterType.js +2 -5
- package/cjs/Enums/Types/DestroyType.js +2 -5
- package/cjs/Enums/Types/DivType.js +2 -5
- package/cjs/Enums/Types/EasingType.js +2 -5
- package/cjs/Enums/Types/EventType.js +2 -5
- package/cjs/Enums/Types/GradientType.js +2 -5
- package/cjs/Enums/Types/InteractorType.js +2 -5
- package/cjs/Enums/Types/ParticleOutType.js +2 -5
- package/cjs/Enums/Types/StartValueType.js +2 -5
- package/cjs/Options/Classes/AnimatableColor.js +10 -14
- package/cjs/Options/Classes/AnimationOptions.js +14 -19
- package/cjs/Options/Classes/Background/Background.js +6 -10
- package/cjs/Options/Classes/ColorAnimation.js +6 -10
- package/cjs/Options/Classes/FullScreen/FullScreen.js +3 -7
- package/cjs/Options/Classes/HslAnimation.js +7 -11
- package/cjs/Options/Classes/Interactivity/Events/ClickEvent.js +3 -7
- package/cjs/Options/Classes/Interactivity/Events/DivEvent.js +5 -9
- package/cjs/Options/Classes/Interactivity/Events/Events.js +14 -18
- package/cjs/Options/Classes/Interactivity/Events/HoverEvent.js +5 -9
- package/cjs/Options/Classes/Interactivity/Events/Parallax.js +3 -7
- package/cjs/Options/Classes/Interactivity/Events/ResizeEvent.js +3 -7
- package/cjs/Options/Classes/Interactivity/Interactivity.js +9 -13
- package/cjs/Options/Classes/Interactivity/Modes/Modes.js +3 -7
- package/cjs/Options/Classes/ManualParticle.js +10 -14
- package/cjs/Options/Classes/Options.js +41 -42
- package/cjs/Options/Classes/OptionsColor.js +5 -9
- package/cjs/Options/Classes/Particles/Bounce/ParticlesBounce.js +6 -10
- package/cjs/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +2 -6
- package/cjs/Options/Classes/Particles/Effect/Effect.js +5 -9
- package/cjs/Options/Classes/Particles/Move/Move.js +26 -33
- package/cjs/Options/Classes/Particles/Move/MoveAngle.js +6 -10
- package/cjs/Options/Classes/Particles/Move/MoveAttract.js +5 -9
- package/cjs/Options/Classes/Particles/Move/MoveCenter.js +5 -9
- package/cjs/Options/Classes/Particles/Move/MoveGravity.js +6 -10
- package/cjs/Options/Classes/Particles/Move/OutModes.js +5 -9
- package/cjs/Options/Classes/Particles/Move/Path/MovePath.js +7 -11
- package/cjs/Options/Classes/Particles/Move/Spin.js +7 -11
- package/cjs/Options/Classes/Particles/Number/ParticlesDensity.js +3 -7
- package/cjs/Options/Classes/Particles/Number/ParticlesNumber.js +7 -11
- package/cjs/Options/Classes/Particles/Number/ParticlesNumberLimit.js +5 -9
- package/cjs/Options/Classes/Particles/Opacity/Opacity.js +6 -10
- package/cjs/Options/Classes/Particles/Opacity/OpacityAnimation.js +6 -10
- package/cjs/Options/Classes/Particles/ParticlesOptions.js +29 -39
- package/cjs/Options/Classes/Particles/Shape/Shape.js +5 -9
- package/cjs/Options/Classes/Particles/Size/Size.js +6 -10
- package/cjs/Options/Classes/Particles/Size/SizeAnimation.js +6 -10
- package/cjs/Options/Classes/Particles/Stroke.js +8 -12
- package/cjs/Options/Classes/Particles/ZIndex/ZIndex.js +4 -8
- package/cjs/Options/Classes/Responsive.js +13 -17
- package/cjs/Options/Classes/Theme/Theme.js +7 -11
- package/cjs/Options/Classes/Theme/ThemeDefault.js +5 -9
- package/cjs/Options/Classes/ValueWithRandom.js +12 -18
- package/cjs/Options/Interfaces/Background/IBackground.js +1 -2
- package/cjs/Options/Interfaces/FullScreen/IFullScreen.js +1 -2
- package/cjs/Options/Interfaces/IAnimatable.js +1 -2
- package/cjs/Options/Interfaces/IAnimatableColor.js +1 -2
- package/cjs/Options/Interfaces/IAnimation.js +1 -2
- package/cjs/Options/Interfaces/IColorAnimation.js +1 -2
- package/cjs/Options/Interfaces/IHslAnimation.js +1 -2
- package/cjs/Options/Interfaces/IManualParticle.js +1 -2
- package/cjs/Options/Interfaces/IOptionLoader.js +1 -2
- package/cjs/Options/Interfaces/IOptions.js +1 -2
- package/cjs/Options/Interfaces/IOptionsColor.js +1 -2
- package/cjs/Options/Interfaces/IResponsive.js +1 -2
- package/cjs/Options/Interfaces/IValueWithRandom.js +1 -2
- package/cjs/Options/Interfaces/Interactivity/Events/IClickEvent.js +1 -2
- package/cjs/Options/Interfaces/Interactivity/Events/IDivEvent.js +1 -2
- package/cjs/Options/Interfaces/Interactivity/Events/IEvents.js +1 -2
- package/cjs/Options/Interfaces/Interactivity/Events/IHoverEvent.js +1 -2
- package/cjs/Options/Interfaces/Interactivity/Events/IParallax.js +1 -2
- package/cjs/Options/Interfaces/Interactivity/Events/IResizeEvent.js +1 -2
- package/cjs/Options/Interfaces/Interactivity/IInteractivity.js +1 -2
- package/cjs/Options/Interfaces/Interactivity/Modes/IModeDiv.js +1 -2
- package/cjs/Options/Interfaces/Interactivity/Modes/IModes.js +1 -2
- package/cjs/Options/Interfaces/Particles/Bounce/IParticlesBounce.js +1 -2
- package/cjs/Options/Interfaces/Particles/Effect/IEffect.js +1 -2
- package/cjs/Options/Interfaces/Particles/IParticlesOptions.js +1 -2
- package/cjs/Options/Interfaces/Particles/IStroke.js +1 -2
- package/cjs/Options/Interfaces/Particles/Move/IMove.js +1 -2
- package/cjs/Options/Interfaces/Particles/Move/IMoveAngle.js +1 -2
- package/cjs/Options/Interfaces/Particles/Move/IMoveAttract.js +1 -2
- package/cjs/Options/Interfaces/Particles/Move/IMoveCenter.js +1 -2
- package/cjs/Options/Interfaces/Particles/Move/IMoveGravity.js +1 -2
- package/cjs/Options/Interfaces/Particles/Move/IOutModes.js +1 -2
- package/cjs/Options/Interfaces/Particles/Move/ISpin.js +1 -2
- package/cjs/Options/Interfaces/Particles/Move/Path/IMovePath.js +1 -2
- package/cjs/Options/Interfaces/Particles/Number/IParticlesDensity.js +1 -2
- package/cjs/Options/Interfaces/Particles/Number/IParticlesNumber.js +1 -2
- package/cjs/Options/Interfaces/Particles/Number/IParticlesNumberLimit.js +1 -2
- package/cjs/Options/Interfaces/Particles/Opacity/IOpacity.js +1 -2
- package/cjs/Options/Interfaces/Particles/Opacity/IOpacityAnimation.js +1 -2
- package/cjs/Options/Interfaces/Particles/Shape/IShape.js +1 -2
- package/cjs/Options/Interfaces/Particles/Size/ISize.js +1 -2
- package/cjs/Options/Interfaces/Particles/Size/ISizeAnimation.js +1 -2
- package/cjs/Options/Interfaces/Particles/ZIndex/IZIndex.js +1 -2
- package/cjs/Options/Interfaces/Theme/ITheme.js +1 -2
- package/cjs/Options/Interfaces/Theme/IThemeDefault.js +1 -2
- package/cjs/Types/CustomEventArgs.js +1 -2
- package/cjs/Types/CustomEventListener.js +1 -2
- package/cjs/Types/EasingFunction.js +1 -2
- package/cjs/Types/ExportResult.js +1 -2
- package/cjs/Types/ISourceOptions.js +1 -2
- package/cjs/Types/ParticlesGroups.js +1 -2
- package/cjs/Types/PathOptions.js +1 -2
- package/cjs/Types/RangeValue.js +1 -2
- package/cjs/Types/RecursivePartial.js +1 -2
- package/cjs/Types/ShapeData.js +1 -2
- package/cjs/Types/SingleOrMultiple.js +1 -2
- package/cjs/Utils/CanvasUtils.js +86 -55
- package/cjs/Utils/ColorUtils.js +136 -141
- package/cjs/Utils/EventDispatcher.js +8 -10
- package/cjs/Utils/LogUtils.js +22 -0
- package/{esm/Utils/NumberUtils.js → cjs/Utils/MathUtils.js} +14 -7
- package/cjs/Utils/OptionsUtils.js +4 -8
- package/cjs/Utils/TypeUtils.js +7 -16
- package/cjs/Utils/Utils.js +104 -239
- package/cjs/bundle.js +5 -22
- package/cjs/export-types.js +1 -115
- package/cjs/exports.js +77 -100
- package/cjs/index.js +5 -26
- package/cjs/initEngine.js +4 -0
- package/dist_browser_Core_Container_js.js +102 -0
- package/esm/Core/Canvas.js +126 -181
- package/esm/Core/Container.js +22 -18
- package/esm/Core/Engine.js +64 -54
- package/esm/Core/Particle.js +43 -48
- package/esm/Core/Particles.js +33 -24
- package/esm/Core/Retina.js +2 -3
- package/esm/Core/Utils/Constants.js +2 -2
- package/esm/Core/Utils/EventListeners.js +74 -64
- package/esm/Core/Utils/QuadTree.js +1 -1
- package/esm/Core/Utils/Ranges.js +2 -2
- package/esm/Core/Utils/Vectors.js +15 -21
- package/esm/Enums/RangeType.js +5 -0
- package/esm/Options/Classes/AnimatableColor.js +3 -3
- package/esm/Options/Classes/AnimationOptions.js +1 -1
- package/esm/Options/Classes/ColorAnimation.js +1 -1
- package/esm/Options/Classes/Options.js +13 -10
- package/esm/Options/Classes/Particles/Move/Move.js +1 -4
- package/esm/Options/Classes/Particles/Move/MoveAngle.js +1 -1
- package/esm/Options/Classes/Particles/Move/MoveAttract.js +1 -1
- package/esm/Options/Classes/Particles/Move/MoveGravity.js +1 -1
- package/esm/Options/Classes/Particles/Move/Spin.js +1 -1
- package/esm/Options/Classes/Particles/ParticlesOptions.js +0 -6
- package/esm/Options/Classes/Particles/Stroke.js +1 -1
- package/esm/Options/Classes/ValueWithRandom.js +1 -1
- package/esm/Utils/CanvasUtils.js +65 -21
- package/esm/Utils/ColorUtils.js +61 -45
- package/esm/Utils/EventDispatcher.js +3 -1
- package/esm/Utils/LogUtils.js +22 -0
- package/esm/Utils/MathUtils.js +158 -0
- package/esm/Utils/Utils.js +23 -125
- package/esm/bundle.js +3 -3
- package/esm/export-types.js +1 -99
- package/esm/exports.js +2 -9
- package/esm/index.js +3 -7
- package/esm/initEngine.js +4 -0
- package/package.json +3 -2
- package/report.html +5 -4
- package/scripts/install.js +98 -17
- package/tsparticles.engine.js +492 -451
- package/tsparticles.engine.min.js +1 -1
- package/tsparticles.engine.min.js.LICENSE.txt +1 -1
- package/types/Core/Canvas.d.ts +6 -9
- package/types/Core/Container.d.ts +1 -0
- package/types/Core/Engine.d.ts +20 -16
- package/types/Core/Interfaces/Colors.d.ts +46 -2
- package/types/Core/Interfaces/IColorManager.d.ts +1 -1
- package/types/Core/Interfaces/IContainerPlugin.d.ts +4 -0
- package/types/Core/Interfaces/IDrawParticleParams.d.ts +0 -4
- package/types/Core/Interfaces/IEffectDrawer.d.ts +2 -1
- package/types/Core/Interfaces/IShapeDrawData.d.ts +2 -0
- package/types/Core/Interfaces/IShapeDrawer.d.ts +1 -0
- package/types/Core/Particle.d.ts +4 -5
- package/types/Core/Particles.d.ts +1 -1
- package/types/Core/Utils/Constants.d.ts +2 -2
- package/types/Core/Utils/EventListeners.d.ts +1 -0
- package/types/Core/Utils/Vectors.d.ts +3 -3
- package/types/Options/Classes/Options.d.ts +1 -2
- package/types/Options/Classes/OptionsColor.d.ts +2 -2
- package/types/Options/Classes/Particles/Move/Move.d.ts +0 -2
- package/types/Options/Classes/Particles/ParticlesOptions.d.ts +0 -4
- package/types/Options/Interfaces/IOptions.d.ts +1 -2
- package/types/Options/Interfaces/Particles/IParticlesOptions.d.ts +0 -4
- package/types/Options/Interfaces/Particles/Move/IMove.d.ts +0 -2
- package/types/Utils/CanvasUtils.d.ts +4 -1
- package/types/Utils/ColorUtils.d.ts +2 -2
- package/types/Utils/LogUtils.d.ts +11 -0
- package/types/Utils/{NumberUtils.d.ts → MathUtils.d.ts} +2 -1
- package/types/Utils/TypeUtils.d.ts +2 -2
- package/types/Utils/Utils.d.ts +4 -16
- package/types/export-types.d.ts +91 -101
- package/types/exports.d.ts +2 -9
- package/types/index.d.ts +1 -1
- package/types/initEngine.d.ts +2 -0
- package/umd/Core/Canvas.js +123 -178
- package/umd/Core/Container.js +25 -21
- package/umd/Core/Engine.js +97 -53
- package/umd/Core/Particle.js +54 -59
- package/umd/Core/Particles.js +33 -24
- package/umd/Core/Retina.js +9 -10
- package/umd/Core/Utils/Constants.js +3 -3
- package/umd/Core/Utils/EventListeners.js +72 -62
- package/umd/Core/Utils/QuadTree.js +3 -3
- package/umd/Core/Utils/Ranges.js +4 -4
- package/umd/Core/Utils/Vectors.js +15 -21
- package/umd/Options/Classes/AnimatableColor.js +3 -3
- package/umd/Options/Classes/AnimationOptions.js +6 -6
- package/umd/Options/Classes/ColorAnimation.js +3 -3
- package/umd/Options/Classes/Options.js +16 -13
- package/umd/Options/Classes/Particles/Move/Move.js +5 -8
- package/umd/Options/Classes/Particles/Move/MoveAngle.js +4 -4
- package/umd/Options/Classes/Particles/Move/MoveAttract.js +3 -3
- package/umd/Options/Classes/Particles/Move/MoveGravity.js +4 -4
- package/umd/Options/Classes/Particles/Move/Spin.js +3 -3
- package/umd/Options/Classes/Particles/ParticlesOptions.js +1 -7
- package/umd/Options/Classes/Particles/Stroke.js +4 -4
- package/umd/Options/Classes/ValueWithRandom.js +3 -3
- package/umd/Utils/CanvasUtils.js +69 -22
- package/umd/Utils/ColorUtils.js +72 -56
- package/umd/Utils/EventDispatcher.js +3 -1
- package/umd/Utils/LogUtils.js +36 -0
- package/umd/Utils/{NumberUtils.js → MathUtils.js} +16 -8
- package/umd/Utils/Utils.js +36 -141
- package/umd/bundle.js +4 -4
- package/umd/export-types.js +1 -114
- package/umd/exports.js +3 -10
- package/umd/index.js +4 -8
- package/umd/{init.js → initEngine.js} +3 -5
- package/browser/Core/Interfaces/IRectSideResult.js +0 -1
- package/browser/Core/Interfaces/ITrailFillData.js +0 -1
- package/browser/Enums/Modes/CollisionMode.js +0 -6
- package/browser/Options/Classes/BackgroundMask/BackgroundMask.js +0 -24
- package/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.js +0 -21
- package/browser/Options/Classes/Particles/Collisions/Collisions.js +0 -33
- package/browser/Options/Classes/Particles/Collisions/CollisionsAbsorb.js +0 -14
- package/browser/Options/Classes/Particles/Collisions/CollisionsOverlap.js +0 -18
- package/browser/Options/Classes/Particles/Move/MoveTrail.js +0 -23
- package/browser/Options/Classes/Particles/Move/MoveTrailFill.js +0 -15
- package/browser/Options/Classes/Particles/Shadow.js +0 -35
- package/browser/Options/Interfaces/BackgroundMask/IBackgroundMask.js +0 -1
- package/browser/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.js +0 -1
- package/browser/Options/Interfaces/Particles/Collisions/ICollisions.js +0 -1
- package/browser/Options/Interfaces/Particles/Collisions/ICollisionsAbsorb.js +0 -1
- package/browser/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.js +0 -1
- package/browser/Options/Interfaces/Particles/IShadow.js +0 -1
- package/browser/Options/Interfaces/Particles/Move/IMoveTrail.js +0 -1
- package/browser/Options/Interfaces/Particles/Move/IMoveTrailFill.js +0 -1
- package/browser/init.js +0 -6
- package/cjs/Core/Interfaces/IRectSideResult.js +0 -2
- package/cjs/Core/Interfaces/ITrailFillData.js +0 -2
- package/cjs/Enums/Modes/CollisionMode.js +0 -9
- package/cjs/Options/Classes/BackgroundMask/BackgroundMask.js +0 -28
- package/cjs/Options/Classes/BackgroundMask/BackgroundMaskCover.js +0 -25
- package/cjs/Options/Classes/Particles/Collisions/Collisions.js +0 -37
- package/cjs/Options/Classes/Particles/Collisions/CollisionsAbsorb.js +0 -18
- package/cjs/Options/Classes/Particles/Collisions/CollisionsOverlap.js +0 -22
- package/cjs/Options/Classes/Particles/Move/MoveTrail.js +0 -27
- package/cjs/Options/Classes/Particles/Move/MoveTrailFill.js +0 -19
- package/cjs/Options/Classes/Particles/Shadow.js +0 -39
- package/cjs/Options/Interfaces/BackgroundMask/IBackgroundMask.js +0 -2
- package/cjs/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.js +0 -2
- package/cjs/Options/Interfaces/Particles/Collisions/ICollisions.js +0 -2
- package/cjs/Options/Interfaces/Particles/Collisions/ICollisionsAbsorb.js +0 -2
- package/cjs/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.js +0 -2
- package/cjs/Options/Interfaces/Particles/IShadow.js +0 -2
- package/cjs/Options/Interfaces/Particles/Move/IMoveTrail.js +0 -2
- package/cjs/Options/Interfaces/Particles/Move/IMoveTrailFill.js +0 -2
- package/cjs/Types/RangeType.js +0 -8
- package/cjs/Utils/NumberUtils.js +0 -177
- package/cjs/init.js +0 -9
- package/esm/Core/Interfaces/IRectSideResult.js +0 -1
- package/esm/Core/Interfaces/ITrailFillData.js +0 -1
- package/esm/Enums/Modes/CollisionMode.js +0 -6
- package/esm/Options/Classes/BackgroundMask/BackgroundMask.js +0 -24
- package/esm/Options/Classes/BackgroundMask/BackgroundMaskCover.js +0 -21
- package/esm/Options/Classes/Particles/Collisions/Collisions.js +0 -33
- package/esm/Options/Classes/Particles/Collisions/CollisionsAbsorb.js +0 -14
- package/esm/Options/Classes/Particles/Collisions/CollisionsOverlap.js +0 -18
- package/esm/Options/Classes/Particles/Move/MoveTrail.js +0 -23
- package/esm/Options/Classes/Particles/Move/MoveTrailFill.js +0 -15
- package/esm/Options/Classes/Particles/Shadow.js +0 -35
- package/esm/Options/Interfaces/BackgroundMask/IBackgroundMask.js +0 -1
- package/esm/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.js +0 -1
- package/esm/Options/Interfaces/Particles/Collisions/ICollisions.js +0 -1
- package/esm/Options/Interfaces/Particles/Collisions/ICollisionsAbsorb.js +0 -1
- package/esm/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.js +0 -1
- package/esm/Options/Interfaces/Particles/IShadow.js +0 -1
- package/esm/Options/Interfaces/Particles/Move/IMoveTrail.js +0 -1
- package/esm/Options/Interfaces/Particles/Move/IMoveTrailFill.js +0 -1
- package/esm/init.js +0 -6
- package/types/Core/Interfaces/IRectSideResult.d.ts +0 -5
- package/types/Core/Interfaces/ITrailFillData.d.ts +0 -6
- package/types/Enums/Modes/CollisionMode.d.ts +0 -5
- package/types/Options/Classes/BackgroundMask/BackgroundMask.d.ts +0 -11
- package/types/Options/Classes/BackgroundMask/BackgroundMaskCover.d.ts +0 -11
- package/types/Options/Classes/Particles/Collisions/Collisions.d.ts +0 -18
- package/types/Options/Classes/Particles/Collisions/CollisionsAbsorb.d.ts +0 -8
- package/types/Options/Classes/Particles/Collisions/CollisionsOverlap.d.ts +0 -9
- package/types/Options/Classes/Particles/Move/MoveTrail.d.ts +0 -11
- package/types/Options/Classes/Particles/Move/MoveTrailFill.d.ts +0 -9
- package/types/Options/Classes/Particles/Shadow.d.ts +0 -13
- package/types/Options/Interfaces/BackgroundMask/IBackgroundMask.d.ts +0 -8
- package/types/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.d.ts +0 -6
- package/types/Options/Interfaces/Particles/Collisions/ICollisions.d.ts +0 -13
- package/types/Options/Interfaces/Particles/Collisions/ICollisionsAbsorb.d.ts +0 -3
- package/types/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.d.ts +0 -4
- package/types/Options/Interfaces/Particles/IShadow.d.ts +0 -8
- package/types/Options/Interfaces/Particles/Move/IMoveTrail.d.ts +0 -6
- package/types/Options/Interfaces/Particles/Move/IMoveTrailFill.d.ts +0 -5
- package/types/init.d.ts +0 -2
- package/umd/Core/Interfaces/IRectSideResult.js +0 -12
- package/umd/Core/Interfaces/ITrailFillData.js +0 -12
- package/umd/Enums/Modes/CollisionMode.js +0 -19
- package/umd/Options/Classes/BackgroundMask/BackgroundMask.js +0 -38
- package/umd/Options/Classes/BackgroundMask/BackgroundMaskCover.js +0 -35
- package/umd/Options/Classes/Particles/Collisions/Collisions.js +0 -47
- package/umd/Options/Classes/Particles/Collisions/CollisionsAbsorb.js +0 -28
- package/umd/Options/Classes/Particles/Collisions/CollisionsOverlap.js +0 -32
- package/umd/Options/Classes/Particles/Move/MoveTrail.js +0 -37
- package/umd/Options/Classes/Particles/Move/MoveTrailFill.js +0 -29
- package/umd/Options/Classes/Particles/Shadow.js +0 -49
- package/umd/Options/Interfaces/BackgroundMask/IBackgroundMask.js +0 -12
- package/umd/Options/Interfaces/BackgroundMask/IBackgroundMaskCover.js +0 -12
- package/umd/Options/Interfaces/Particles/Collisions/ICollisions.js +0 -12
- package/umd/Options/Interfaces/Particles/Collisions/ICollisionsAbsorb.js +0 -12
- package/umd/Options/Interfaces/Particles/Collisions/ICollisionsOverlap.js +0 -12
- package/umd/Options/Interfaces/Particles/IShadow.js +0 -12
- package/umd/Options/Interfaces/Particles/Move/IMoveTrail.js +0 -12
- package/umd/Options/Interfaces/Particles/Move/IMoveTrailFill.js +0 -12
- /package/browser/{Types → Enums}/RangeType.js +0 -0
- /package/{esm/Types → cjs/Enums}/RangeType.js +0 -0
- /package/types/{Types → Enums}/RangeType.d.ts +0 -0
- /package/umd/{Types → Enums}/RangeType.js +0 -0
package/esm/Utils/Utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { clamp, collisionVelocity, getDistances, getRandom, getRangeMax, getRangeMin, getRangeValue,
|
|
2
|
-
import { half, millisecondsToSeconds,
|
|
1
|
+
import { clamp, collisionVelocity, getDistances, getRandom, getRangeMax, getRangeMin, getRangeValue, randomInRangeValue, } from "./MathUtils.js";
|
|
2
|
+
import { half, millisecondsToSeconds, percentDenominator } from "../Core/Utils/Constants.js";
|
|
3
3
|
import { isArray, isNull, isObject } from "./TypeUtils.js";
|
|
4
4
|
import { AnimationMode } from "../Enums/Modes/AnimationMode.js";
|
|
5
5
|
import { AnimationStatus } from "../Enums/AnimationStatus.js";
|
|
@@ -8,25 +8,7 @@ import { OutModeDirection } from "../Enums/Directions/OutModeDirection.js";
|
|
|
8
8
|
import { PixelMode } from "../Enums/Modes/PixelMode.js";
|
|
9
9
|
import { StartValueType } from "../Enums/Types/StartValueType.js";
|
|
10
10
|
import { Vector } from "../Core/Utils/Vectors.js";
|
|
11
|
-
const
|
|
12
|
-
debug: console.debug,
|
|
13
|
-
error: console.error,
|
|
14
|
-
info: console.info,
|
|
15
|
-
log: console.log,
|
|
16
|
-
verbose: console.log,
|
|
17
|
-
warning: console.warn,
|
|
18
|
-
};
|
|
19
|
-
export function setLogger(logger) {
|
|
20
|
-
_logger.debug = logger.debug || _logger.debug;
|
|
21
|
-
_logger.error = logger.error || _logger.error;
|
|
22
|
-
_logger.info = logger.info || _logger.info;
|
|
23
|
-
_logger.log = logger.log || _logger.log;
|
|
24
|
-
_logger.verbose = logger.verbose || _logger.verbose;
|
|
25
|
-
_logger.warning = logger.warning || _logger.warning;
|
|
26
|
-
}
|
|
27
|
-
export function getLogger() {
|
|
28
|
-
return _logger;
|
|
29
|
-
}
|
|
11
|
+
const minRadius = 0;
|
|
30
12
|
function memoize(fn) {
|
|
31
13
|
const cache = new Map();
|
|
32
14
|
return (...args) => {
|
|
@@ -39,32 +21,17 @@ function memoize(fn) {
|
|
|
39
21
|
return result;
|
|
40
22
|
};
|
|
41
23
|
}
|
|
42
|
-
function rectSideBounce(data) {
|
|
43
|
-
const res = { bounced: false }, { pSide, pOtherSide, rectSide, rectOtherSide, velocity, factor } = data;
|
|
44
|
-
if (pOtherSide.min < rectOtherSide.min ||
|
|
45
|
-
pOtherSide.min > rectOtherSide.max ||
|
|
46
|
-
pOtherSide.max < rectOtherSide.min ||
|
|
47
|
-
pOtherSide.max > rectOtherSide.max) {
|
|
48
|
-
return res;
|
|
49
|
-
}
|
|
50
|
-
if ((pSide.max >= rectSide.min && pSide.max <= (rectSide.max + rectSide.min) * half && velocity > minVelocity) ||
|
|
51
|
-
(pSide.min <= rectSide.max && pSide.min > (rectSide.max + rectSide.min) * half && velocity < minVelocity)) {
|
|
52
|
-
res.velocity = velocity * -factor;
|
|
53
|
-
res.bounced = true;
|
|
54
|
-
}
|
|
55
|
-
return res;
|
|
56
|
-
}
|
|
57
24
|
function checkSelector(element, selectors) {
|
|
58
25
|
const res = executeOnSingleOrMultiple(selectors, selector => {
|
|
59
26
|
return element.matches(selector);
|
|
60
27
|
});
|
|
61
28
|
return isArray(res) ? res.some(t => t) : res;
|
|
62
29
|
}
|
|
63
|
-
export function isSsr() {
|
|
64
|
-
return typeof window === "undefined" || !window || typeof window.document === "undefined" || !window.document;
|
|
65
|
-
}
|
|
66
30
|
export function hasMatchMedia() {
|
|
67
|
-
return
|
|
31
|
+
return typeof matchMedia !== "undefined";
|
|
32
|
+
}
|
|
33
|
+
export function safeDocument() {
|
|
34
|
+
return globalThis.document;
|
|
68
35
|
}
|
|
69
36
|
export function safeMatchMedia(query) {
|
|
70
37
|
if (!hasMatchMedia()) {
|
|
@@ -73,24 +40,23 @@ export function safeMatchMedia(query) {
|
|
|
73
40
|
return matchMedia(query);
|
|
74
41
|
}
|
|
75
42
|
export function safeIntersectionObserver(callback) {
|
|
76
|
-
if (
|
|
43
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
77
44
|
return;
|
|
78
45
|
}
|
|
79
46
|
return new IntersectionObserver(callback);
|
|
80
47
|
}
|
|
81
48
|
export function safeMutationObserver(callback) {
|
|
82
|
-
if (
|
|
49
|
+
if (typeof MutationObserver === "undefined") {
|
|
83
50
|
return;
|
|
84
51
|
}
|
|
85
52
|
return new MutationObserver(callback);
|
|
86
53
|
}
|
|
87
54
|
export function isInArray(value, array) {
|
|
88
|
-
|
|
89
|
-
return value === array || (isArray(array) && array.indexOf(value) > invalidIndex);
|
|
55
|
+
return value === array || (isArray(array) && array.includes(value));
|
|
90
56
|
}
|
|
91
57
|
export async function loadFont(font, weight) {
|
|
92
58
|
try {
|
|
93
|
-
await
|
|
59
|
+
await safeDocument().fonts.load(`${weight ?? "400"} 36px '${font ?? "Verdana"}'`);
|
|
94
60
|
}
|
|
95
61
|
catch {
|
|
96
62
|
}
|
|
@@ -102,7 +68,6 @@ export function itemFromArray(array, index, useIndex = true) {
|
|
|
102
68
|
return array[index !== undefined && useIndex ? index % array.length : arrayRandomIndex(array)];
|
|
103
69
|
}
|
|
104
70
|
export function isPointInside(point, size, offset, radius, direction) {
|
|
105
|
-
const minRadius = 0;
|
|
106
71
|
return areBoundsInside(calculateBounds(point, radius ?? minRadius), size, offset, direction);
|
|
107
72
|
}
|
|
108
73
|
export function areBoundsInside(bounds, size, offset, direction) {
|
|
@@ -203,64 +168,6 @@ export function circleBounce(p1, p2) {
|
|
|
203
168
|
p2.velocity.x = vFinal2.x * p2.factor.x;
|
|
204
169
|
p2.velocity.y = vFinal2.y * p2.factor.y;
|
|
205
170
|
}
|
|
206
|
-
export function rectBounce(particle, divBounds) {
|
|
207
|
-
const pPos = particle.getPosition(), size = particle.getRadius(), bounds = calculateBounds(pPos, size), bounceOptions = particle.options.bounce, resH = rectSideBounce({
|
|
208
|
-
pSide: {
|
|
209
|
-
min: bounds.left,
|
|
210
|
-
max: bounds.right,
|
|
211
|
-
},
|
|
212
|
-
pOtherSide: {
|
|
213
|
-
min: bounds.top,
|
|
214
|
-
max: bounds.bottom,
|
|
215
|
-
},
|
|
216
|
-
rectSide: {
|
|
217
|
-
min: divBounds.left,
|
|
218
|
-
max: divBounds.right,
|
|
219
|
-
},
|
|
220
|
-
rectOtherSide: {
|
|
221
|
-
min: divBounds.top,
|
|
222
|
-
max: divBounds.bottom,
|
|
223
|
-
},
|
|
224
|
-
velocity: particle.velocity.x,
|
|
225
|
-
factor: getRangeValue(bounceOptions.horizontal.value),
|
|
226
|
-
});
|
|
227
|
-
if (resH.bounced) {
|
|
228
|
-
if (resH.velocity !== undefined) {
|
|
229
|
-
particle.velocity.x = resH.velocity;
|
|
230
|
-
}
|
|
231
|
-
if (resH.position !== undefined) {
|
|
232
|
-
particle.position.x = resH.position;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
const resV = rectSideBounce({
|
|
236
|
-
pSide: {
|
|
237
|
-
min: bounds.top,
|
|
238
|
-
max: bounds.bottom,
|
|
239
|
-
},
|
|
240
|
-
pOtherSide: {
|
|
241
|
-
min: bounds.left,
|
|
242
|
-
max: bounds.right,
|
|
243
|
-
},
|
|
244
|
-
rectSide: {
|
|
245
|
-
min: divBounds.top,
|
|
246
|
-
max: divBounds.bottom,
|
|
247
|
-
},
|
|
248
|
-
rectOtherSide: {
|
|
249
|
-
min: divBounds.left,
|
|
250
|
-
max: divBounds.right,
|
|
251
|
-
},
|
|
252
|
-
velocity: particle.velocity.y,
|
|
253
|
-
factor: getRangeValue(bounceOptions.vertical.value),
|
|
254
|
-
});
|
|
255
|
-
if (resV.bounced) {
|
|
256
|
-
if (resV.velocity !== undefined) {
|
|
257
|
-
particle.velocity.y = resV.velocity;
|
|
258
|
-
}
|
|
259
|
-
if (resV.position !== undefined) {
|
|
260
|
-
particle.position.y = resV.position;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
171
|
export function executeOnSingleOrMultiple(obj, callback) {
|
|
265
172
|
const defaultIndex = 0;
|
|
266
173
|
return isArray(obj) ? obj.map((item, index) => callback(item, index)) : callback(obj, defaultIndex);
|
|
@@ -315,7 +222,7 @@ export function initParticleNumericAnimationValue(options, pxRatio) {
|
|
|
315
222
|
break;
|
|
316
223
|
case StartValueType.random:
|
|
317
224
|
default:
|
|
318
|
-
res.value =
|
|
225
|
+
res.value = randomInRangeValue(res);
|
|
319
226
|
if (autoStatus) {
|
|
320
227
|
res.status = getRandom() >= half ? AnimationStatus.increasing : AnimationStatus.decreasing;
|
|
321
228
|
}
|
|
@@ -368,15 +275,12 @@ function checkDestroy(particle, destroyType, value, minValue, maxValue) {
|
|
|
368
275
|
export function updateAnimation(particle, data, changeDirection, destroyType, delta) {
|
|
369
276
|
const minLoops = 0, minDelay = 0, identity = 1, minVelocity = 0, minDecay = 1;
|
|
370
277
|
if (particle.destroyed ||
|
|
371
|
-
!data ||
|
|
372
278
|
!data.enable ||
|
|
373
279
|
((data.maxLoops ?? minLoops) > minLoops && (data.loops ?? minLoops) > (data.maxLoops ?? minLoops))) {
|
|
374
280
|
return;
|
|
375
281
|
}
|
|
376
282
|
const velocity = (data.velocity ?? minVelocity) * delta.factor, minValue = data.min, maxValue = data.max, decay = data.decay ?? minDecay;
|
|
377
|
-
|
|
378
|
-
data.time = 0;
|
|
379
|
-
}
|
|
283
|
+
data.time ??= 0;
|
|
380
284
|
if ((data.delayTime ?? minDelay) > minDelay && data.time < (data.delayTime ?? minDelay)) {
|
|
381
285
|
data.time += delta.value;
|
|
382
286
|
}
|
|
@@ -392,9 +296,7 @@ export function updateAnimation(particle, data, changeDirection, destroyType, de
|
|
|
392
296
|
else {
|
|
393
297
|
data.value -= maxValue;
|
|
394
298
|
}
|
|
395
|
-
|
|
396
|
-
data.loops = minLoops;
|
|
397
|
-
}
|
|
299
|
+
data.loops ??= minLoops;
|
|
398
300
|
data.loops++;
|
|
399
301
|
}
|
|
400
302
|
else {
|
|
@@ -409,9 +311,7 @@ export function updateAnimation(particle, data, changeDirection, destroyType, de
|
|
|
409
311
|
else {
|
|
410
312
|
data.value += maxValue;
|
|
411
313
|
}
|
|
412
|
-
|
|
413
|
-
data.loops = minLoops;
|
|
414
|
-
}
|
|
314
|
+
data.loops ??= minLoops;
|
|
415
315
|
data.loops++;
|
|
416
316
|
}
|
|
417
317
|
else {
|
|
@@ -422,15 +322,10 @@ export function updateAnimation(particle, data, changeDirection, destroyType, de
|
|
|
422
322
|
data.velocity *= decay;
|
|
423
323
|
}
|
|
424
324
|
checkDestroy(particle, destroyType, data.value, minValue, maxValue);
|
|
425
|
-
|
|
426
|
-
data.value = clamp(data.value, minValue, maxValue);
|
|
427
|
-
}
|
|
325
|
+
data.value = clamp(data.value, minValue, maxValue);
|
|
428
326
|
}
|
|
429
327
|
export function cloneStyle(style) {
|
|
430
|
-
const clonedStyle =
|
|
431
|
-
if (!style) {
|
|
432
|
-
return clonedStyle;
|
|
433
|
-
}
|
|
328
|
+
const clonedStyle = safeDocument().createElement("div").style;
|
|
434
329
|
for (const key in style) {
|
|
435
330
|
const styleKey = style[key];
|
|
436
331
|
if (!Object.prototype.hasOwnProperty.call(style, key) || isNull(styleKey)) {
|
|
@@ -442,16 +337,16 @@ export function cloneStyle(style) {
|
|
|
442
337
|
}
|
|
443
338
|
const stylePriority = style.getPropertyPriority?.(styleKey);
|
|
444
339
|
if (!stylePriority) {
|
|
445
|
-
clonedStyle.setProperty
|
|
340
|
+
clonedStyle.setProperty(styleKey, styleValue);
|
|
446
341
|
}
|
|
447
342
|
else {
|
|
448
|
-
clonedStyle.setProperty
|
|
343
|
+
clonedStyle.setProperty(styleKey, styleValue, stylePriority);
|
|
449
344
|
}
|
|
450
345
|
}
|
|
451
346
|
return clonedStyle;
|
|
452
347
|
}
|
|
453
348
|
function computeFullScreenStyle(zIndex) {
|
|
454
|
-
const fullScreenStyle =
|
|
349
|
+
const fullScreenStyle = safeDocument().createElement("div").style, radix = 10, style = {
|
|
455
350
|
width: "100%",
|
|
456
351
|
height: "100%",
|
|
457
352
|
margin: "0",
|
|
@@ -465,6 +360,9 @@ function computeFullScreenStyle(zIndex) {
|
|
|
465
360
|
};
|
|
466
361
|
for (const key in style) {
|
|
467
362
|
const value = style[key];
|
|
363
|
+
if (value === undefined) {
|
|
364
|
+
continue;
|
|
365
|
+
}
|
|
468
366
|
fullScreenStyle.setProperty(key, value);
|
|
469
367
|
}
|
|
470
368
|
return fullScreenStyle;
|
package/esm/bundle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const tsParticles =
|
|
3
|
-
|
|
1
|
+
import { initEngine } from "./initEngine.js";
|
|
2
|
+
const tsParticles = initEngine();
|
|
3
|
+
globalThis.tsParticles = tsParticles;
|
|
4
4
|
export * from "./exports.js";
|
|
5
5
|
export { tsParticles };
|
package/esm/export-types.js
CHANGED
|
@@ -1,99 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from "./Core/Interfaces/IBounds.js";
|
|
3
|
-
export * from "./Core/Interfaces/IBubbleParticleData.js";
|
|
4
|
-
export * from "./Core/Interfaces/ICircleBouncer.js";
|
|
5
|
-
export * from "./Core/Interfaces/IColorManager.js";
|
|
6
|
-
export * from "./Core/Interfaces/IContainerInteractivity.js";
|
|
7
|
-
export * from "./Core/Interfaces/IContainerPlugin.js";
|
|
8
|
-
export * from "./Core/Interfaces/ICoordinates.js";
|
|
9
|
-
export * from "./Core/Interfaces/IDelta.js";
|
|
10
|
-
export * from "./Core/Interfaces/IDimension.js";
|
|
11
|
-
export * from "./Core/Interfaces/IDistance.js";
|
|
12
|
-
export * from "./Core/Interfaces/IDrawParticleParams.js";
|
|
13
|
-
export * from "./Core/Interfaces/IEffectDrawer.js";
|
|
14
|
-
export * from "./Core/Interfaces/IExternalInteractor.js";
|
|
15
|
-
export * from "./Core/Interfaces/IInteractor.js";
|
|
16
|
-
export * from "./Core/Interfaces/ILoadParams.js";
|
|
17
|
-
export * from "./Core/Interfaces/IMouseData.js";
|
|
18
|
-
export * from "./Core/Interfaces/IMovePathGenerator.js";
|
|
19
|
-
export * from "./Core/Interfaces/IParticleColorStyle.js";
|
|
20
|
-
export * from "./Core/Interfaces/IParticleHslAnimation.js";
|
|
21
|
-
export * from "./Core/Interfaces/IParticleLife.js";
|
|
22
|
-
export * from "./Core/Interfaces/IParticleMover.js";
|
|
23
|
-
export * from "./Core/Interfaces/IParticleRetinaProps.js";
|
|
24
|
-
export * from "./Core/Interfaces/IParticleRoll.js";
|
|
25
|
-
export * from "./Core/Interfaces/IParticleTransformValues.js";
|
|
26
|
-
export * from "./Core/Interfaces/IParticleUpdater.js";
|
|
27
|
-
export * from "./Core/Interfaces/IParticleValueAnimation.js";
|
|
28
|
-
export * from "./Core/Interfaces/IParticlesInteractor.js";
|
|
29
|
-
export * from "./Core/Interfaces/IPlugin.js";
|
|
30
|
-
export * from "./Core/Interfaces/IPositionFromSizeParams.js";
|
|
31
|
-
export * from "./Core/Interfaces/IRangeValue.js";
|
|
32
|
-
export * from "./Core/Interfaces/IRectSideResult.js";
|
|
33
|
-
export * from "./Core/Interfaces/IShapeDrawData.js";
|
|
34
|
-
export * from "./Core/Interfaces/IShapeDrawer.js";
|
|
35
|
-
export * from "./Core/Interfaces/IShapeValues.js";
|
|
36
|
-
export * from "./Core/Interfaces/ISlowParticleData.js";
|
|
37
|
-
export * from "./Core/Interfaces/ITrailFillData.js";
|
|
38
|
-
export * from "./Options/Interfaces/Background/IBackground.js";
|
|
39
|
-
export * from "./Options/Interfaces/BackgroundMask/IBackgroundMask.js";
|
|
40
|
-
export * from "./Options/Interfaces/BackgroundMask/IBackgroundMaskCover.js";
|
|
41
|
-
export * from "./Options/Interfaces/FullScreen/IFullScreen.js";
|
|
42
|
-
export * from "./Options/Interfaces/IAnimatable.js";
|
|
43
|
-
export * from "./Options/Interfaces/IAnimatableColor.js";
|
|
44
|
-
export * from "./Options/Interfaces/IAnimation.js";
|
|
45
|
-
export * from "./Options/Interfaces/IColorAnimation.js";
|
|
46
|
-
export * from "./Options/Interfaces/IHslAnimation.js";
|
|
47
|
-
export * from "./Options/Interfaces/IManualParticle.js";
|
|
48
|
-
export * from "./Options/Interfaces/IOptionLoader.js";
|
|
49
|
-
export * from "./Options/Interfaces/IOptions.js";
|
|
50
|
-
export * from "./Options/Interfaces/IOptionsColor.js";
|
|
51
|
-
export * from "./Options/Interfaces/IResponsive.js";
|
|
52
|
-
export * from "./Options/Interfaces/IValueWithRandom.js";
|
|
53
|
-
export * from "./Options/Interfaces/Interactivity/Events/IClickEvent.js";
|
|
54
|
-
export * from "./Options/Interfaces/Interactivity/Events/IDivEvent.js";
|
|
55
|
-
export * from "./Options/Interfaces/Interactivity/Events/IEvents.js";
|
|
56
|
-
export * from "./Options/Interfaces/Interactivity/Events/IHoverEvent.js";
|
|
57
|
-
export * from "./Options/Interfaces/Interactivity/Events/IParallax.js";
|
|
58
|
-
export * from "./Options/Interfaces/Interactivity/Events/IResizeEvent.js";
|
|
59
|
-
export * from "./Options/Interfaces/Interactivity/Modes/IModeDiv.js";
|
|
60
|
-
export * from "./Options/Interfaces/Interactivity/Modes/IModes.js";
|
|
61
|
-
export * from "./Options/Interfaces/Interactivity/IInteractivity.js";
|
|
62
|
-
export * from "./Options/Interfaces/Particles/Bounce/IParticlesBounce.js";
|
|
63
|
-
export * from "./Options/Interfaces/Particles/Collisions/ICollisions.js";
|
|
64
|
-
export * from "./Options/Interfaces/Particles/Collisions/ICollisionsAbsorb.js";
|
|
65
|
-
export * from "./Options/Interfaces/Particles/Collisions/ICollisionsOverlap.js";
|
|
66
|
-
export * from "./Options/Interfaces/Particles/Effect/IEffect.js";
|
|
67
|
-
export * from "./Options/Interfaces/Particles/IParticlesOptions.js";
|
|
68
|
-
export * from "./Options/Interfaces/Particles/IShadow.js";
|
|
69
|
-
export * from "./Options/Interfaces/Particles/IStroke.js";
|
|
70
|
-
export * from "./Options/Interfaces/Particles/Move/IMoveAttract.js";
|
|
71
|
-
export * from "./Options/Interfaces/Particles/Move/IMove.js";
|
|
72
|
-
export * from "./Options/Interfaces/Particles/Move/IMoveAngle.js";
|
|
73
|
-
export * from "./Options/Interfaces/Particles/Move/IMoveCenter.js";
|
|
74
|
-
export * from "./Options/Interfaces/Particles/Move/IMoveGravity.js";
|
|
75
|
-
export * from "./Options/Interfaces/Particles/Move/Path/IMovePath.js";
|
|
76
|
-
export * from "./Options/Interfaces/Particles/Move/IOutModes.js";
|
|
77
|
-
export * from "./Options/Interfaces/Particles/Move/ISpin.js";
|
|
78
|
-
export * from "./Options/Interfaces/Particles/Move/IMoveTrail.js";
|
|
79
|
-
export * from "./Options/Interfaces/Particles/Number/IParticlesDensity.js";
|
|
80
|
-
export * from "./Options/Interfaces/Particles/Number/IParticlesNumber.js";
|
|
81
|
-
export * from "./Options/Interfaces/Particles/Number/IParticlesNumberLimit.js";
|
|
82
|
-
export * from "./Options/Interfaces/Particles/Opacity/IOpacity.js";
|
|
83
|
-
export * from "./Options/Interfaces/Particles/Opacity/IOpacityAnimation.js";
|
|
84
|
-
export * from "./Options/Interfaces/Particles/Shape/IShape.js";
|
|
85
|
-
export * from "./Options/Interfaces/Particles/Size/ISize.js";
|
|
86
|
-
export * from "./Options/Interfaces/Particles/Size/ISizeAnimation.js";
|
|
87
|
-
export * from "./Options/Interfaces/Particles/ZIndex/IZIndex.js";
|
|
88
|
-
export * from "./Options/Interfaces/Theme/ITheme.js";
|
|
89
|
-
export * from "./Options/Interfaces/Theme/IThemeDefault.js";
|
|
90
|
-
export * from "./Types/CustomEventArgs.js";
|
|
91
|
-
export * from "./Types/CustomEventListener.js";
|
|
92
|
-
export * from "./Types/ExportResult.js";
|
|
93
|
-
export * from "./Types/ISourceOptions.js";
|
|
94
|
-
export * from "./Types/ParticlesGroups.js";
|
|
95
|
-
export * from "./Types/PathOptions.js";
|
|
96
|
-
export * from "./Types/RangeValue.js";
|
|
97
|
-
export * from "./Types/RecursivePartial.js";
|
|
98
|
-
export * from "./Types/ShapeData.js";
|
|
99
|
-
export * from "./Types/SingleOrMultiple.js";
|
|
1
|
+
export {};
|
package/esm/exports.js
CHANGED
|
@@ -8,7 +8,6 @@ export * from "./Enums/Directions/MoveDirection.js";
|
|
|
8
8
|
export * from "./Enums/Directions/RotateDirection.js";
|
|
9
9
|
export * from "./Enums/Directions/OutModeDirection.js";
|
|
10
10
|
export * from "./Enums/Modes/AnimationMode.js";
|
|
11
|
-
export * from "./Enums/Modes/CollisionMode.js";
|
|
12
11
|
export * from "./Enums/Modes/LimitMode.js";
|
|
13
12
|
export * from "./Enums/Modes/OutMode.js";
|
|
14
13
|
export * from "./Enums/Modes/PixelMode.js";
|
|
@@ -28,8 +27,6 @@ export * from "./Enums/InteractivityDetect.js";
|
|
|
28
27
|
export * from "./Options/Classes/AnimatableColor.js";
|
|
29
28
|
export * from "./Options/Classes/AnimationOptions.js";
|
|
30
29
|
export * from "./Options/Classes/Background/Background.js";
|
|
31
|
-
export * from "./Options/Classes/BackgroundMask/BackgroundMask.js";
|
|
32
|
-
export * from "./Options/Classes/BackgroundMask/BackgroundMaskCover.js";
|
|
33
30
|
export * from "./Options/Classes/ColorAnimation.js";
|
|
34
31
|
export * from "./Options/Classes/FullScreen/FullScreen.js";
|
|
35
32
|
export * from "./Options/Classes/HslAnimation.js";
|
|
@@ -48,11 +45,7 @@ export * from "./Options/Classes/Options.js";
|
|
|
48
45
|
export * from "./Options/Classes/OptionsColor.js";
|
|
49
46
|
export * from "./Options/Classes/Particles/Bounce/ParticlesBounce.js";
|
|
50
47
|
export * from "./Options/Classes/Particles/Bounce/ParticlesBounceFactor.js";
|
|
51
|
-
export * from "./Options/Classes/Particles/Collisions/Collisions.js";
|
|
52
|
-
export * from "./Options/Classes/Particles/Collisions/CollisionsAbsorb.js";
|
|
53
|
-
export * from "./Options/Classes/Particles/Collisions/CollisionsOverlap.js";
|
|
54
48
|
export * from "./Options/Classes/Particles/ParticlesOptions.js";
|
|
55
|
-
export * from "./Options/Classes/Particles/Shadow.js";
|
|
56
49
|
export * from "./Options/Classes/Particles/Stroke.js";
|
|
57
50
|
export * from "./Options/Classes/Particles/Move/MoveAttract.js";
|
|
58
51
|
export * from "./Options/Classes/Particles/Move/Move.js";
|
|
@@ -62,7 +55,6 @@ export * from "./Options/Classes/Particles/Move/MoveGravity.js";
|
|
|
62
55
|
export * from "./Options/Classes/Particles/Move/OutModes.js";
|
|
63
56
|
export * from "./Options/Classes/Particles/Move/Path/MovePath.js";
|
|
64
57
|
export * from "./Options/Classes/Particles/Move/Spin.js";
|
|
65
|
-
export * from "./Options/Classes/Particles/Move/MoveTrail.js";
|
|
66
58
|
export * from "./Options/Classes/Particles/Number/ParticlesNumber.js";
|
|
67
59
|
export * from "./Options/Classes/Particles/Number/ParticlesNumberLimit.js";
|
|
68
60
|
export * from "./Options/Classes/Particles/Number/ParticlesDensity.js";
|
|
@@ -78,7 +70,8 @@ export * from "./Options/Classes/Theme/ThemeDefault.js";
|
|
|
78
70
|
export * from "./Options/Classes/ValueWithRandom.js";
|
|
79
71
|
export * from "./Utils/CanvasUtils.js";
|
|
80
72
|
export * from "./Utils/ColorUtils.js";
|
|
81
|
-
export * from "./Utils/
|
|
73
|
+
export * from "./Utils/LogUtils.js";
|
|
74
|
+
export * from "./Utils/MathUtils.js";
|
|
82
75
|
export * from "./Utils/OptionsUtils.js";
|
|
83
76
|
export * from "./Utils/Utils.js";
|
|
84
77
|
export * from "./Utils/TypeUtils.js";
|
package/esm/index.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
if (!isSsr()) {
|
|
5
|
-
window.tsParticles = tsParticles;
|
|
6
|
-
}
|
|
1
|
+
import { initEngine } from "./initEngine.js";
|
|
2
|
+
const tsParticles = initEngine();
|
|
3
|
+
globalThis.tsParticles = tsParticles;
|
|
7
4
|
export * from "./exports.js";
|
|
8
|
-
export * from "./export-types.js";
|
|
9
5
|
export { tsParticles };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/engine",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.0",
|
|
4
4
|
"description": "Easily create highly customizable particle, confetti and fireworks animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"scripts": {
|
|
@@ -103,5 +103,6 @@
|
|
|
103
103
|
},
|
|
104
104
|
"publishConfig": {
|
|
105
105
|
"access": "public"
|
|
106
|
-
}
|
|
106
|
+
},
|
|
107
|
+
"type": "module"
|
|
107
108
|
}
|