@tsparticles/engine 3.9.1 → 4.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +204 -118
- 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/umd/Utils/Utils.js
CHANGED
|
@@ -4,16 +4,14 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "./
|
|
7
|
+
define(["require", "exports", "./MathUtils.js", "../Core/Utils/Constants.js", "./TypeUtils.js", "../Enums/Modes/AnimationMode.js", "../Enums/AnimationStatus.js", "../Enums/Types/DestroyType.js", "../Enums/Directions/OutModeDirection.js", "../Enums/Modes/PixelMode.js", "../Enums/Types/StartValueType.js", "../Core/Utils/Vectors.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.getFullScreenStyle = void 0;
|
|
13
|
-
exports.setLogger = setLogger;
|
|
14
|
-
exports.getLogger = getLogger;
|
|
15
|
-
exports.isSsr = isSsr;
|
|
16
13
|
exports.hasMatchMedia = hasMatchMedia;
|
|
14
|
+
exports.safeDocument = safeDocument;
|
|
17
15
|
exports.safeMatchMedia = safeMatchMedia;
|
|
18
16
|
exports.safeIntersectionObserver = safeIntersectionObserver;
|
|
19
17
|
exports.safeMutationObserver = safeMutationObserver;
|
|
@@ -31,7 +29,6 @@
|
|
|
31
29
|
exports.divMode = divMode;
|
|
32
30
|
exports.circleBounceDataFromParticle = circleBounceDataFromParticle;
|
|
33
31
|
exports.circleBounce = circleBounce;
|
|
34
|
-
exports.rectBounce = rectBounce;
|
|
35
32
|
exports.executeOnSingleOrMultiple = executeOnSingleOrMultiple;
|
|
36
33
|
exports.itemFromSingleOrMultiple = itemFromSingleOrMultiple;
|
|
37
34
|
exports.findItemFromSingleOrMultiple = findItemFromSingleOrMultiple;
|
|
@@ -40,7 +37,7 @@
|
|
|
40
37
|
exports.getSize = getSize;
|
|
41
38
|
exports.updateAnimation = updateAnimation;
|
|
42
39
|
exports.cloneStyle = cloneStyle;
|
|
43
|
-
const
|
|
40
|
+
const MathUtils_js_1 = require("./MathUtils.js");
|
|
44
41
|
const Constants_js_1 = require("../Core/Utils/Constants.js");
|
|
45
42
|
const TypeUtils_js_1 = require("./TypeUtils.js");
|
|
46
43
|
const AnimationMode_js_1 = require("../Enums/Modes/AnimationMode.js");
|
|
@@ -50,25 +47,7 @@
|
|
|
50
47
|
const PixelMode_js_1 = require("../Enums/Modes/PixelMode.js");
|
|
51
48
|
const StartValueType_js_1 = require("../Enums/Types/StartValueType.js");
|
|
52
49
|
const Vectors_js_1 = require("../Core/Utils/Vectors.js");
|
|
53
|
-
const
|
|
54
|
-
debug: console.debug,
|
|
55
|
-
error: console.error,
|
|
56
|
-
info: console.info,
|
|
57
|
-
log: console.log,
|
|
58
|
-
verbose: console.log,
|
|
59
|
-
warning: console.warn,
|
|
60
|
-
};
|
|
61
|
-
function setLogger(logger) {
|
|
62
|
-
_logger.debug = logger.debug || _logger.debug;
|
|
63
|
-
_logger.error = logger.error || _logger.error;
|
|
64
|
-
_logger.info = logger.info || _logger.info;
|
|
65
|
-
_logger.log = logger.log || _logger.log;
|
|
66
|
-
_logger.verbose = logger.verbose || _logger.verbose;
|
|
67
|
-
_logger.warning = logger.warning || _logger.warning;
|
|
68
|
-
}
|
|
69
|
-
function getLogger() {
|
|
70
|
-
return _logger;
|
|
71
|
-
}
|
|
50
|
+
const minRadius = 0;
|
|
72
51
|
function memoize(fn) {
|
|
73
52
|
const cache = new Map();
|
|
74
53
|
return (...args) => {
|
|
@@ -81,32 +60,17 @@
|
|
|
81
60
|
return result;
|
|
82
61
|
};
|
|
83
62
|
}
|
|
84
|
-
function rectSideBounce(data) {
|
|
85
|
-
const res = { bounced: false }, { pSide, pOtherSide, rectSide, rectOtherSide, velocity, factor } = data;
|
|
86
|
-
if (pOtherSide.min < rectOtherSide.min ||
|
|
87
|
-
pOtherSide.min > rectOtherSide.max ||
|
|
88
|
-
pOtherSide.max < rectOtherSide.min ||
|
|
89
|
-
pOtherSide.max > rectOtherSide.max) {
|
|
90
|
-
return res;
|
|
91
|
-
}
|
|
92
|
-
if ((pSide.max >= rectSide.min && pSide.max <= (rectSide.max + rectSide.min) * Constants_js_1.half && velocity > Constants_js_1.minVelocity) ||
|
|
93
|
-
(pSide.min <= rectSide.max && pSide.min > (rectSide.max + rectSide.min) * Constants_js_1.half && velocity < Constants_js_1.minVelocity)) {
|
|
94
|
-
res.velocity = velocity * -factor;
|
|
95
|
-
res.bounced = true;
|
|
96
|
-
}
|
|
97
|
-
return res;
|
|
98
|
-
}
|
|
99
63
|
function checkSelector(element, selectors) {
|
|
100
64
|
const res = executeOnSingleOrMultiple(selectors, selector => {
|
|
101
65
|
return element.matches(selector);
|
|
102
66
|
});
|
|
103
67
|
return (0, TypeUtils_js_1.isArray)(res) ? res.some(t => t) : res;
|
|
104
68
|
}
|
|
105
|
-
function isSsr() {
|
|
106
|
-
return typeof window === "undefined" || !window || typeof window.document === "undefined" || !window.document;
|
|
107
|
-
}
|
|
108
69
|
function hasMatchMedia() {
|
|
109
|
-
return
|
|
70
|
+
return typeof matchMedia !== "undefined";
|
|
71
|
+
}
|
|
72
|
+
function safeDocument() {
|
|
73
|
+
return globalThis.document;
|
|
110
74
|
}
|
|
111
75
|
function safeMatchMedia(query) {
|
|
112
76
|
if (!hasMatchMedia()) {
|
|
@@ -115,36 +79,34 @@
|
|
|
115
79
|
return matchMedia(query);
|
|
116
80
|
}
|
|
117
81
|
function safeIntersectionObserver(callback) {
|
|
118
|
-
if (
|
|
82
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
119
83
|
return;
|
|
120
84
|
}
|
|
121
85
|
return new IntersectionObserver(callback);
|
|
122
86
|
}
|
|
123
87
|
function safeMutationObserver(callback) {
|
|
124
|
-
if (
|
|
88
|
+
if (typeof MutationObserver === "undefined") {
|
|
125
89
|
return;
|
|
126
90
|
}
|
|
127
91
|
return new MutationObserver(callback);
|
|
128
92
|
}
|
|
129
93
|
function isInArray(value, array) {
|
|
130
|
-
|
|
131
|
-
return value === array || ((0, TypeUtils_js_1.isArray)(array) && array.indexOf(value) > invalidIndex);
|
|
94
|
+
return value === array || ((0, TypeUtils_js_1.isArray)(array) && array.includes(value));
|
|
132
95
|
}
|
|
133
96
|
async function loadFont(font, weight) {
|
|
134
97
|
try {
|
|
135
|
-
await
|
|
98
|
+
await safeDocument().fonts.load(`${weight ?? "400"} 36px '${font ?? "Verdana"}'`);
|
|
136
99
|
}
|
|
137
100
|
catch {
|
|
138
101
|
}
|
|
139
102
|
}
|
|
140
103
|
function arrayRandomIndex(array) {
|
|
141
|
-
return Math.floor((0,
|
|
104
|
+
return Math.floor((0, MathUtils_js_1.getRandom)() * array.length);
|
|
142
105
|
}
|
|
143
106
|
function itemFromArray(array, index, useIndex = true) {
|
|
144
107
|
return array[index !== undefined && useIndex ? index % array.length : arrayRandomIndex(array)];
|
|
145
108
|
}
|
|
146
109
|
function isPointInside(point, size, offset, radius, direction) {
|
|
147
|
-
const minRadius = 0;
|
|
148
110
|
return areBoundsInside(calculateBounds(point, radius ?? minRadius), size, offset, direction);
|
|
149
111
|
}
|
|
150
112
|
function areBoundsInside(bounds, size, offset, direction) {
|
|
@@ -231,78 +193,20 @@
|
|
|
231
193
|
radius: p.getRadius(),
|
|
232
194
|
mass: p.getMass(),
|
|
233
195
|
velocity: p.velocity,
|
|
234
|
-
factor: Vectors_js_1.Vector.create((0,
|
|
196
|
+
factor: Vectors_js_1.Vector.create((0, MathUtils_js_1.getRangeValue)(p.options.bounce.horizontal.value), (0, MathUtils_js_1.getRangeValue)(p.options.bounce.vertical.value)),
|
|
235
197
|
};
|
|
236
198
|
}
|
|
237
199
|
function circleBounce(p1, p2) {
|
|
238
|
-
const { x: xVelocityDiff, y: yVelocityDiff } = p1.velocity.sub(p2.velocity), [pos1, pos2] = [p1.position, p2.position], { dx: xDist, dy: yDist } = (0,
|
|
200
|
+
const { x: xVelocityDiff, y: yVelocityDiff } = p1.velocity.sub(p2.velocity), [pos1, pos2] = [p1.position, p2.position], { dx: xDist, dy: yDist } = (0, MathUtils_js_1.getDistances)(pos2, pos1), minimumDistance = 0;
|
|
239
201
|
if (xVelocityDiff * xDist + yVelocityDiff * yDist < minimumDistance) {
|
|
240
202
|
return;
|
|
241
203
|
}
|
|
242
|
-
const angle = -Math.atan2(yDist, xDist), m1 = p1.mass, m2 = p2.mass, u1 = p1.velocity.rotate(angle), u2 = p2.velocity.rotate(angle), v1 = (0,
|
|
204
|
+
const angle = -Math.atan2(yDist, xDist), m1 = p1.mass, m2 = p2.mass, u1 = p1.velocity.rotate(angle), u2 = p2.velocity.rotate(angle), v1 = (0, MathUtils_js_1.collisionVelocity)(u1, u2, m1, m2), v2 = (0, MathUtils_js_1.collisionVelocity)(u2, u1, m1, m2), vFinal1 = v1.rotate(-angle), vFinal2 = v2.rotate(-angle);
|
|
243
205
|
p1.velocity.x = vFinal1.x * p1.factor.x;
|
|
244
206
|
p1.velocity.y = vFinal1.y * p1.factor.y;
|
|
245
207
|
p2.velocity.x = vFinal2.x * p2.factor.x;
|
|
246
208
|
p2.velocity.y = vFinal2.y * p2.factor.y;
|
|
247
209
|
}
|
|
248
|
-
function rectBounce(particle, divBounds) {
|
|
249
|
-
const pPos = particle.getPosition(), size = particle.getRadius(), bounds = calculateBounds(pPos, size), bounceOptions = particle.options.bounce, resH = rectSideBounce({
|
|
250
|
-
pSide: {
|
|
251
|
-
min: bounds.left,
|
|
252
|
-
max: bounds.right,
|
|
253
|
-
},
|
|
254
|
-
pOtherSide: {
|
|
255
|
-
min: bounds.top,
|
|
256
|
-
max: bounds.bottom,
|
|
257
|
-
},
|
|
258
|
-
rectSide: {
|
|
259
|
-
min: divBounds.left,
|
|
260
|
-
max: divBounds.right,
|
|
261
|
-
},
|
|
262
|
-
rectOtherSide: {
|
|
263
|
-
min: divBounds.top,
|
|
264
|
-
max: divBounds.bottom,
|
|
265
|
-
},
|
|
266
|
-
velocity: particle.velocity.x,
|
|
267
|
-
factor: (0, NumberUtils_js_1.getRangeValue)(bounceOptions.horizontal.value),
|
|
268
|
-
});
|
|
269
|
-
if (resH.bounced) {
|
|
270
|
-
if (resH.velocity !== undefined) {
|
|
271
|
-
particle.velocity.x = resH.velocity;
|
|
272
|
-
}
|
|
273
|
-
if (resH.position !== undefined) {
|
|
274
|
-
particle.position.x = resH.position;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
const resV = rectSideBounce({
|
|
278
|
-
pSide: {
|
|
279
|
-
min: bounds.top,
|
|
280
|
-
max: bounds.bottom,
|
|
281
|
-
},
|
|
282
|
-
pOtherSide: {
|
|
283
|
-
min: bounds.left,
|
|
284
|
-
max: bounds.right,
|
|
285
|
-
},
|
|
286
|
-
rectSide: {
|
|
287
|
-
min: divBounds.top,
|
|
288
|
-
max: divBounds.bottom,
|
|
289
|
-
},
|
|
290
|
-
rectOtherSide: {
|
|
291
|
-
min: divBounds.left,
|
|
292
|
-
max: divBounds.right,
|
|
293
|
-
},
|
|
294
|
-
velocity: particle.velocity.y,
|
|
295
|
-
factor: (0, NumberUtils_js_1.getRangeValue)(bounceOptions.vertical.value),
|
|
296
|
-
});
|
|
297
|
-
if (resV.bounced) {
|
|
298
|
-
if (resV.velocity !== undefined) {
|
|
299
|
-
particle.velocity.y = resV.velocity;
|
|
300
|
-
}
|
|
301
|
-
if (resV.position !== undefined) {
|
|
302
|
-
particle.position.y = resV.position;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
210
|
function executeOnSingleOrMultiple(obj, callback) {
|
|
307
211
|
const defaultIndex = 0;
|
|
308
212
|
return (0, TypeUtils_js_1.isArray)(obj) ? obj.map((item, index) => callback(item, index)) : callback(obj, defaultIndex);
|
|
@@ -319,17 +223,17 @@
|
|
|
319
223
|
}
|
|
320
224
|
function initParticleNumericAnimationValue(options, pxRatio) {
|
|
321
225
|
const valueRange = options.value, animationOptions = options.animation, res = {
|
|
322
|
-
delayTime: (0,
|
|
226
|
+
delayTime: (0, MathUtils_js_1.getRangeValue)(animationOptions.delay) * Constants_js_1.millisecondsToSeconds,
|
|
323
227
|
enable: animationOptions.enable,
|
|
324
|
-
value: (0,
|
|
325
|
-
max: (0,
|
|
326
|
-
min: (0,
|
|
228
|
+
value: (0, MathUtils_js_1.getRangeValue)(options.value) * pxRatio,
|
|
229
|
+
max: (0, MathUtils_js_1.getRangeMax)(valueRange) * pxRatio,
|
|
230
|
+
min: (0, MathUtils_js_1.getRangeMin)(valueRange) * pxRatio,
|
|
327
231
|
loops: 0,
|
|
328
|
-
maxLoops: (0,
|
|
232
|
+
maxLoops: (0, MathUtils_js_1.getRangeValue)(animationOptions.count),
|
|
329
233
|
time: 0,
|
|
330
234
|
}, decayOffset = 1;
|
|
331
235
|
if (animationOptions.enable) {
|
|
332
|
-
res.decay = decayOffset - (0,
|
|
236
|
+
res.decay = decayOffset - (0, MathUtils_js_1.getRangeValue)(animationOptions.decay);
|
|
333
237
|
switch (animationOptions.mode) {
|
|
334
238
|
case AnimationMode_js_1.AnimationMode.increase:
|
|
335
239
|
res.status = AnimationStatus_js_1.AnimationStatus.increasing;
|
|
@@ -338,7 +242,7 @@
|
|
|
338
242
|
res.status = AnimationStatus_js_1.AnimationStatus.decreasing;
|
|
339
243
|
break;
|
|
340
244
|
case AnimationMode_js_1.AnimationMode.random:
|
|
341
|
-
res.status = (0,
|
|
245
|
+
res.status = (0, MathUtils_js_1.getRandom)() >= Constants_js_1.half ? AnimationStatus_js_1.AnimationStatus.increasing : AnimationStatus_js_1.AnimationStatus.decreasing;
|
|
342
246
|
break;
|
|
343
247
|
}
|
|
344
248
|
const autoStatus = animationOptions.mode === AnimationMode_js_1.AnimationMode.auto;
|
|
@@ -357,9 +261,9 @@
|
|
|
357
261
|
break;
|
|
358
262
|
case StartValueType_js_1.StartValueType.random:
|
|
359
263
|
default:
|
|
360
|
-
res.value = (0,
|
|
264
|
+
res.value = (0, MathUtils_js_1.randomInRangeValue)(res);
|
|
361
265
|
if (autoStatus) {
|
|
362
|
-
res.status = (0,
|
|
266
|
+
res.status = (0, MathUtils_js_1.getRandom)() >= Constants_js_1.half ? AnimationStatus_js_1.AnimationStatus.increasing : AnimationStatus_js_1.AnimationStatus.decreasing;
|
|
363
267
|
}
|
|
364
268
|
break;
|
|
365
269
|
}
|
|
@@ -410,15 +314,12 @@
|
|
|
410
314
|
function updateAnimation(particle, data, changeDirection, destroyType, delta) {
|
|
411
315
|
const minLoops = 0, minDelay = 0, identity = 1, minVelocity = 0, minDecay = 1;
|
|
412
316
|
if (particle.destroyed ||
|
|
413
|
-
!data ||
|
|
414
317
|
!data.enable ||
|
|
415
318
|
((data.maxLoops ?? minLoops) > minLoops && (data.loops ?? minLoops) > (data.maxLoops ?? minLoops))) {
|
|
416
319
|
return;
|
|
417
320
|
}
|
|
418
321
|
const velocity = (data.velocity ?? minVelocity) * delta.factor, minValue = data.min, maxValue = data.max, decay = data.decay ?? minDecay;
|
|
419
|
-
|
|
420
|
-
data.time = 0;
|
|
421
|
-
}
|
|
322
|
+
data.time ??= 0;
|
|
422
323
|
if ((data.delayTime ?? minDelay) > minDelay && data.time < (data.delayTime ?? minDelay)) {
|
|
423
324
|
data.time += delta.value;
|
|
424
325
|
}
|
|
@@ -434,9 +335,7 @@
|
|
|
434
335
|
else {
|
|
435
336
|
data.value -= maxValue;
|
|
436
337
|
}
|
|
437
|
-
|
|
438
|
-
data.loops = minLoops;
|
|
439
|
-
}
|
|
338
|
+
data.loops ??= minLoops;
|
|
440
339
|
data.loops++;
|
|
441
340
|
}
|
|
442
341
|
else {
|
|
@@ -451,9 +350,7 @@
|
|
|
451
350
|
else {
|
|
452
351
|
data.value += maxValue;
|
|
453
352
|
}
|
|
454
|
-
|
|
455
|
-
data.loops = minLoops;
|
|
456
|
-
}
|
|
353
|
+
data.loops ??= minLoops;
|
|
457
354
|
data.loops++;
|
|
458
355
|
}
|
|
459
356
|
else {
|
|
@@ -464,15 +361,10 @@
|
|
|
464
361
|
data.velocity *= decay;
|
|
465
362
|
}
|
|
466
363
|
checkDestroy(particle, destroyType, data.value, minValue, maxValue);
|
|
467
|
-
|
|
468
|
-
data.value = (0, NumberUtils_js_1.clamp)(data.value, minValue, maxValue);
|
|
469
|
-
}
|
|
364
|
+
data.value = (0, MathUtils_js_1.clamp)(data.value, minValue, maxValue);
|
|
470
365
|
}
|
|
471
366
|
function cloneStyle(style) {
|
|
472
|
-
const clonedStyle =
|
|
473
|
-
if (!style) {
|
|
474
|
-
return clonedStyle;
|
|
475
|
-
}
|
|
367
|
+
const clonedStyle = safeDocument().createElement("div").style;
|
|
476
368
|
for (const key in style) {
|
|
477
369
|
const styleKey = style[key];
|
|
478
370
|
if (!Object.prototype.hasOwnProperty.call(style, key) || (0, TypeUtils_js_1.isNull)(styleKey)) {
|
|
@@ -484,16 +376,16 @@
|
|
|
484
376
|
}
|
|
485
377
|
const stylePriority = style.getPropertyPriority?.(styleKey);
|
|
486
378
|
if (!stylePriority) {
|
|
487
|
-
clonedStyle.setProperty
|
|
379
|
+
clonedStyle.setProperty(styleKey, styleValue);
|
|
488
380
|
}
|
|
489
381
|
else {
|
|
490
|
-
clonedStyle.setProperty
|
|
382
|
+
clonedStyle.setProperty(styleKey, styleValue, stylePriority);
|
|
491
383
|
}
|
|
492
384
|
}
|
|
493
385
|
return clonedStyle;
|
|
494
386
|
}
|
|
495
387
|
function computeFullScreenStyle(zIndex) {
|
|
496
|
-
const fullScreenStyle =
|
|
388
|
+
const fullScreenStyle = safeDocument().createElement("div").style, radix = 10, style = {
|
|
497
389
|
width: "100%",
|
|
498
390
|
height: "100%",
|
|
499
391
|
margin: "0",
|
|
@@ -507,6 +399,9 @@
|
|
|
507
399
|
};
|
|
508
400
|
for (const key in style) {
|
|
509
401
|
const value = style[key];
|
|
402
|
+
if (value === undefined) {
|
|
403
|
+
continue;
|
|
404
|
+
}
|
|
510
405
|
fullScreenStyle.setProperty(key, value);
|
|
511
406
|
}
|
|
512
407
|
return fullScreenStyle;
|
package/umd/bundle.js
CHANGED
|
@@ -18,15 +18,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
if (v !== undefined) module.exports = v;
|
|
19
19
|
}
|
|
20
20
|
else if (typeof define === "function" && define.amd) {
|
|
21
|
-
define(["require", "exports", "./
|
|
21
|
+
define(["require", "exports", "./initEngine.js", "./exports.js"], factory);
|
|
22
22
|
}
|
|
23
23
|
})(function (require, exports) {
|
|
24
24
|
"use strict";
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.tsParticles = void 0;
|
|
27
|
-
const
|
|
28
|
-
const tsParticles = (0,
|
|
27
|
+
const initEngine_js_1 = require("./initEngine.js");
|
|
28
|
+
const tsParticles = (0, initEngine_js_1.initEngine)();
|
|
29
29
|
exports.tsParticles = tsParticles;
|
|
30
|
-
|
|
30
|
+
globalThis.tsParticles = tsParticles;
|
|
31
31
|
__exportStar(require("./exports.js"), exports);
|
|
32
32
|
});
|
package/umd/export-types.js
CHANGED
|
@@ -1,125 +1,12 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
13
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
14
|
-
};
|
|
15
1
|
(function (factory) {
|
|
16
2
|
if (typeof module === "object" && typeof module.exports === "object") {
|
|
17
3
|
var v = factory(require, exports);
|
|
18
4
|
if (v !== undefined) module.exports = v;
|
|
19
5
|
}
|
|
20
6
|
else if (typeof define === "function" && define.amd) {
|
|
21
|
-
define(["require", "exports"
|
|
7
|
+
define(["require", "exports"], factory);
|
|
22
8
|
}
|
|
23
9
|
})(function (require, exports) {
|
|
24
10
|
"use strict";
|
|
25
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
__exportStar(require("./Core/Interfaces/Colors.js"), exports);
|
|
27
|
-
__exportStar(require("./Core/Interfaces/IBounds.js"), exports);
|
|
28
|
-
__exportStar(require("./Core/Interfaces/IBubbleParticleData.js"), exports);
|
|
29
|
-
__exportStar(require("./Core/Interfaces/ICircleBouncer.js"), exports);
|
|
30
|
-
__exportStar(require("./Core/Interfaces/IColorManager.js"), exports);
|
|
31
|
-
__exportStar(require("./Core/Interfaces/IContainerInteractivity.js"), exports);
|
|
32
|
-
__exportStar(require("./Core/Interfaces/IContainerPlugin.js"), exports);
|
|
33
|
-
__exportStar(require("./Core/Interfaces/ICoordinates.js"), exports);
|
|
34
|
-
__exportStar(require("./Core/Interfaces/IDelta.js"), exports);
|
|
35
|
-
__exportStar(require("./Core/Interfaces/IDimension.js"), exports);
|
|
36
|
-
__exportStar(require("./Core/Interfaces/IDistance.js"), exports);
|
|
37
|
-
__exportStar(require("./Core/Interfaces/IDrawParticleParams.js"), exports);
|
|
38
|
-
__exportStar(require("./Core/Interfaces/IEffectDrawer.js"), exports);
|
|
39
|
-
__exportStar(require("./Core/Interfaces/IExternalInteractor.js"), exports);
|
|
40
|
-
__exportStar(require("./Core/Interfaces/IInteractor.js"), exports);
|
|
41
|
-
__exportStar(require("./Core/Interfaces/ILoadParams.js"), exports);
|
|
42
|
-
__exportStar(require("./Core/Interfaces/IMouseData.js"), exports);
|
|
43
|
-
__exportStar(require("./Core/Interfaces/IMovePathGenerator.js"), exports);
|
|
44
|
-
__exportStar(require("./Core/Interfaces/IParticleColorStyle.js"), exports);
|
|
45
|
-
__exportStar(require("./Core/Interfaces/IParticleHslAnimation.js"), exports);
|
|
46
|
-
__exportStar(require("./Core/Interfaces/IParticleLife.js"), exports);
|
|
47
|
-
__exportStar(require("./Core/Interfaces/IParticleMover.js"), exports);
|
|
48
|
-
__exportStar(require("./Core/Interfaces/IParticleRetinaProps.js"), exports);
|
|
49
|
-
__exportStar(require("./Core/Interfaces/IParticleRoll.js"), exports);
|
|
50
|
-
__exportStar(require("./Core/Interfaces/IParticleTransformValues.js"), exports);
|
|
51
|
-
__exportStar(require("./Core/Interfaces/IParticleUpdater.js"), exports);
|
|
52
|
-
__exportStar(require("./Core/Interfaces/IParticleValueAnimation.js"), exports);
|
|
53
|
-
__exportStar(require("./Core/Interfaces/IParticlesInteractor.js"), exports);
|
|
54
|
-
__exportStar(require("./Core/Interfaces/IPlugin.js"), exports);
|
|
55
|
-
__exportStar(require("./Core/Interfaces/IPositionFromSizeParams.js"), exports);
|
|
56
|
-
__exportStar(require("./Core/Interfaces/IRangeValue.js"), exports);
|
|
57
|
-
__exportStar(require("./Core/Interfaces/IRectSideResult.js"), exports);
|
|
58
|
-
__exportStar(require("./Core/Interfaces/IShapeDrawData.js"), exports);
|
|
59
|
-
__exportStar(require("./Core/Interfaces/IShapeDrawer.js"), exports);
|
|
60
|
-
__exportStar(require("./Core/Interfaces/IShapeValues.js"), exports);
|
|
61
|
-
__exportStar(require("./Core/Interfaces/ISlowParticleData.js"), exports);
|
|
62
|
-
__exportStar(require("./Core/Interfaces/ITrailFillData.js"), exports);
|
|
63
|
-
__exportStar(require("./Options/Interfaces/Background/IBackground.js"), exports);
|
|
64
|
-
__exportStar(require("./Options/Interfaces/BackgroundMask/IBackgroundMask.js"), exports);
|
|
65
|
-
__exportStar(require("./Options/Interfaces/BackgroundMask/IBackgroundMaskCover.js"), exports);
|
|
66
|
-
__exportStar(require("./Options/Interfaces/FullScreen/IFullScreen.js"), exports);
|
|
67
|
-
__exportStar(require("./Options/Interfaces/IAnimatable.js"), exports);
|
|
68
|
-
__exportStar(require("./Options/Interfaces/IAnimatableColor.js"), exports);
|
|
69
|
-
__exportStar(require("./Options/Interfaces/IAnimation.js"), exports);
|
|
70
|
-
__exportStar(require("./Options/Interfaces/IColorAnimation.js"), exports);
|
|
71
|
-
__exportStar(require("./Options/Interfaces/IHslAnimation.js"), exports);
|
|
72
|
-
__exportStar(require("./Options/Interfaces/IManualParticle.js"), exports);
|
|
73
|
-
__exportStar(require("./Options/Interfaces/IOptionLoader.js"), exports);
|
|
74
|
-
__exportStar(require("./Options/Interfaces/IOptions.js"), exports);
|
|
75
|
-
__exportStar(require("./Options/Interfaces/IOptionsColor.js"), exports);
|
|
76
|
-
__exportStar(require("./Options/Interfaces/IResponsive.js"), exports);
|
|
77
|
-
__exportStar(require("./Options/Interfaces/IValueWithRandom.js"), exports);
|
|
78
|
-
__exportStar(require("./Options/Interfaces/Interactivity/Events/IClickEvent.js"), exports);
|
|
79
|
-
__exportStar(require("./Options/Interfaces/Interactivity/Events/IDivEvent.js"), exports);
|
|
80
|
-
__exportStar(require("./Options/Interfaces/Interactivity/Events/IEvents.js"), exports);
|
|
81
|
-
__exportStar(require("./Options/Interfaces/Interactivity/Events/IHoverEvent.js"), exports);
|
|
82
|
-
__exportStar(require("./Options/Interfaces/Interactivity/Events/IParallax.js"), exports);
|
|
83
|
-
__exportStar(require("./Options/Interfaces/Interactivity/Events/IResizeEvent.js"), exports);
|
|
84
|
-
__exportStar(require("./Options/Interfaces/Interactivity/Modes/IModeDiv.js"), exports);
|
|
85
|
-
__exportStar(require("./Options/Interfaces/Interactivity/Modes/IModes.js"), exports);
|
|
86
|
-
__exportStar(require("./Options/Interfaces/Interactivity/IInteractivity.js"), exports);
|
|
87
|
-
__exportStar(require("./Options/Interfaces/Particles/Bounce/IParticlesBounce.js"), exports);
|
|
88
|
-
__exportStar(require("./Options/Interfaces/Particles/Collisions/ICollisions.js"), exports);
|
|
89
|
-
__exportStar(require("./Options/Interfaces/Particles/Collisions/ICollisionsAbsorb.js"), exports);
|
|
90
|
-
__exportStar(require("./Options/Interfaces/Particles/Collisions/ICollisionsOverlap.js"), exports);
|
|
91
|
-
__exportStar(require("./Options/Interfaces/Particles/Effect/IEffect.js"), exports);
|
|
92
|
-
__exportStar(require("./Options/Interfaces/Particles/IParticlesOptions.js"), exports);
|
|
93
|
-
__exportStar(require("./Options/Interfaces/Particles/IShadow.js"), exports);
|
|
94
|
-
__exportStar(require("./Options/Interfaces/Particles/IStroke.js"), exports);
|
|
95
|
-
__exportStar(require("./Options/Interfaces/Particles/Move/IMoveAttract.js"), exports);
|
|
96
|
-
__exportStar(require("./Options/Interfaces/Particles/Move/IMove.js"), exports);
|
|
97
|
-
__exportStar(require("./Options/Interfaces/Particles/Move/IMoveAngle.js"), exports);
|
|
98
|
-
__exportStar(require("./Options/Interfaces/Particles/Move/IMoveCenter.js"), exports);
|
|
99
|
-
__exportStar(require("./Options/Interfaces/Particles/Move/IMoveGravity.js"), exports);
|
|
100
|
-
__exportStar(require("./Options/Interfaces/Particles/Move/Path/IMovePath.js"), exports);
|
|
101
|
-
__exportStar(require("./Options/Interfaces/Particles/Move/IOutModes.js"), exports);
|
|
102
|
-
__exportStar(require("./Options/Interfaces/Particles/Move/ISpin.js"), exports);
|
|
103
|
-
__exportStar(require("./Options/Interfaces/Particles/Move/IMoveTrail.js"), exports);
|
|
104
|
-
__exportStar(require("./Options/Interfaces/Particles/Number/IParticlesDensity.js"), exports);
|
|
105
|
-
__exportStar(require("./Options/Interfaces/Particles/Number/IParticlesNumber.js"), exports);
|
|
106
|
-
__exportStar(require("./Options/Interfaces/Particles/Number/IParticlesNumberLimit.js"), exports);
|
|
107
|
-
__exportStar(require("./Options/Interfaces/Particles/Opacity/IOpacity.js"), exports);
|
|
108
|
-
__exportStar(require("./Options/Interfaces/Particles/Opacity/IOpacityAnimation.js"), exports);
|
|
109
|
-
__exportStar(require("./Options/Interfaces/Particles/Shape/IShape.js"), exports);
|
|
110
|
-
__exportStar(require("./Options/Interfaces/Particles/Size/ISize.js"), exports);
|
|
111
|
-
__exportStar(require("./Options/Interfaces/Particles/Size/ISizeAnimation.js"), exports);
|
|
112
|
-
__exportStar(require("./Options/Interfaces/Particles/ZIndex/IZIndex.js"), exports);
|
|
113
|
-
__exportStar(require("./Options/Interfaces/Theme/ITheme.js"), exports);
|
|
114
|
-
__exportStar(require("./Options/Interfaces/Theme/IThemeDefault.js"), exports);
|
|
115
|
-
__exportStar(require("./Types/CustomEventArgs.js"), exports);
|
|
116
|
-
__exportStar(require("./Types/CustomEventListener.js"), exports);
|
|
117
|
-
__exportStar(require("./Types/ExportResult.js"), exports);
|
|
118
|
-
__exportStar(require("./Types/ISourceOptions.js"), exports);
|
|
119
|
-
__exportStar(require("./Types/ParticlesGroups.js"), exports);
|
|
120
|
-
__exportStar(require("./Types/PathOptions.js"), exports);
|
|
121
|
-
__exportStar(require("./Types/RangeValue.js"), exports);
|
|
122
|
-
__exportStar(require("./Types/RecursivePartial.js"), exports);
|
|
123
|
-
__exportStar(require("./Types/ShapeData.js"), exports);
|
|
124
|
-
__exportStar(require("./Types/SingleOrMultiple.js"), exports);
|
|
125
12
|
});
|
package/umd/exports.js
CHANGED
|
@@ -18,7 +18,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
if (v !== undefined) module.exports = v;
|
|
19
19
|
}
|
|
20
20
|
else if (typeof define === "function" && define.amd) {
|
|
21
|
-
define(["require", "exports", "./Core/Utils/Constants.js", "./Core/Utils/ExternalInteractorBase.js", "./Core/Utils/ParticlesInteractorBase.js", "./Core/Utils/Point.js", "./Core/Utils/Ranges.js", "./Core/Utils/Vectors.js", "./Enums/Directions/MoveDirection.js", "./Enums/Directions/RotateDirection.js", "./Enums/Directions/OutModeDirection.js", "./Enums/Modes/AnimationMode.js", "./Enums/Modes/
|
|
21
|
+
define(["require", "exports", "./Core/Utils/Constants.js", "./Core/Utils/ExternalInteractorBase.js", "./Core/Utils/ParticlesInteractorBase.js", "./Core/Utils/Point.js", "./Core/Utils/Ranges.js", "./Core/Utils/Vectors.js", "./Enums/Directions/MoveDirection.js", "./Enums/Directions/RotateDirection.js", "./Enums/Directions/OutModeDirection.js", "./Enums/Modes/AnimationMode.js", "./Enums/Modes/LimitMode.js", "./Enums/Modes/OutMode.js", "./Enums/Modes/PixelMode.js", "./Enums/Modes/ThemeMode.js", "./Enums/Modes/ResponsiveMode.js", "./Enums/Types/AlterType.js", "./Enums/Types/DestroyType.js", "./Enums/Types/GradientType.js", "./Enums/Types/InteractorType.js", "./Enums/Types/ParticleOutType.js", "./Enums/Types/StartValueType.js", "./Enums/Types/DivType.js", "./Enums/Types/EasingType.js", "./Enums/Types/EventType.js", "./Enums/AnimationStatus.js", "./Enums/InteractivityDetect.js", "./Options/Classes/AnimatableColor.js", "./Options/Classes/AnimationOptions.js", "./Options/Classes/Background/Background.js", "./Options/Classes/ColorAnimation.js", "./Options/Classes/FullScreen/FullScreen.js", "./Options/Classes/HslAnimation.js", "./Options/Classes/Interactivity/Events/ClickEvent.js", "./Options/Classes/Interactivity/Events/DivEvent.js", "./Options/Classes/Interactivity/Events/ClickEvent.js", "./Options/Classes/Interactivity/Events/DivEvent.js", "./Options/Classes/Interactivity/Events/Events.js", "./Options/Classes/Interactivity/Events/HoverEvent.js", "./Options/Classes/Interactivity/Events/Parallax.js", "./Options/Classes/Interactivity/Events/ResizeEvent.js", "./Options/Classes/Interactivity/Interactivity.js", "./Options/Classes/Interactivity/Modes/Modes.js", "./Options/Classes/ManualParticle.js", "./Options/Classes/Options.js", "./Options/Classes/OptionsColor.js", "./Options/Classes/Particles/Bounce/ParticlesBounce.js", "./Options/Classes/Particles/Bounce/ParticlesBounceFactor.js", "./Options/Classes/Particles/ParticlesOptions.js", "./Options/Classes/Particles/Stroke.js", "./Options/Classes/Particles/Move/MoveAttract.js", "./Options/Classes/Particles/Move/Move.js", "./Options/Classes/Particles/Move/MoveAngle.js", "./Options/Classes/Particles/Move/MoveCenter.js", "./Options/Classes/Particles/Move/MoveGravity.js", "./Options/Classes/Particles/Move/OutModes.js", "./Options/Classes/Particles/Move/Path/MovePath.js", "./Options/Classes/Particles/Move/Spin.js", "./Options/Classes/Particles/Number/ParticlesNumber.js", "./Options/Classes/Particles/Number/ParticlesNumberLimit.js", "./Options/Classes/Particles/Number/ParticlesDensity.js", "./Options/Classes/Particles/Opacity/Opacity.js", "./Options/Classes/Particles/Opacity/OpacityAnimation.js", "./Options/Classes/Particles/Shape/Shape.js", "./Options/Classes/Particles/Size/Size.js", "./Options/Classes/Particles/Size/SizeAnimation.js", "./Options/Classes/Particles/ZIndex/ZIndex.js", "./Options/Classes/Responsive.js", "./Options/Classes/Theme/Theme.js", "./Options/Classes/Theme/ThemeDefault.js", "./Options/Classes/ValueWithRandom.js", "./Utils/CanvasUtils.js", "./Utils/ColorUtils.js", "./Utils/LogUtils.js", "./Utils/MathUtils.js", "./Utils/OptionsUtils.js", "./Utils/Utils.js", "./Utils/TypeUtils.js"], factory);
|
|
22
22
|
}
|
|
23
23
|
})(function (require, exports) {
|
|
24
24
|
"use strict";
|
|
@@ -33,7 +33,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
33
33
|
__exportStar(require("./Enums/Directions/RotateDirection.js"), exports);
|
|
34
34
|
__exportStar(require("./Enums/Directions/OutModeDirection.js"), exports);
|
|
35
35
|
__exportStar(require("./Enums/Modes/AnimationMode.js"), exports);
|
|
36
|
-
__exportStar(require("./Enums/Modes/CollisionMode.js"), exports);
|
|
37
36
|
__exportStar(require("./Enums/Modes/LimitMode.js"), exports);
|
|
38
37
|
__exportStar(require("./Enums/Modes/OutMode.js"), exports);
|
|
39
38
|
__exportStar(require("./Enums/Modes/PixelMode.js"), exports);
|
|
@@ -53,8 +52,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
53
52
|
__exportStar(require("./Options/Classes/AnimatableColor.js"), exports);
|
|
54
53
|
__exportStar(require("./Options/Classes/AnimationOptions.js"), exports);
|
|
55
54
|
__exportStar(require("./Options/Classes/Background/Background.js"), exports);
|
|
56
|
-
__exportStar(require("./Options/Classes/BackgroundMask/BackgroundMask.js"), exports);
|
|
57
|
-
__exportStar(require("./Options/Classes/BackgroundMask/BackgroundMaskCover.js"), exports);
|
|
58
55
|
__exportStar(require("./Options/Classes/ColorAnimation.js"), exports);
|
|
59
56
|
__exportStar(require("./Options/Classes/FullScreen/FullScreen.js"), exports);
|
|
60
57
|
__exportStar(require("./Options/Classes/HslAnimation.js"), exports);
|
|
@@ -73,11 +70,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
73
70
|
__exportStar(require("./Options/Classes/OptionsColor.js"), exports);
|
|
74
71
|
__exportStar(require("./Options/Classes/Particles/Bounce/ParticlesBounce.js"), exports);
|
|
75
72
|
__exportStar(require("./Options/Classes/Particles/Bounce/ParticlesBounceFactor.js"), exports);
|
|
76
|
-
__exportStar(require("./Options/Classes/Particles/Collisions/Collisions.js"), exports);
|
|
77
|
-
__exportStar(require("./Options/Classes/Particles/Collisions/CollisionsAbsorb.js"), exports);
|
|
78
|
-
__exportStar(require("./Options/Classes/Particles/Collisions/CollisionsOverlap.js"), exports);
|
|
79
73
|
__exportStar(require("./Options/Classes/Particles/ParticlesOptions.js"), exports);
|
|
80
|
-
__exportStar(require("./Options/Classes/Particles/Shadow.js"), exports);
|
|
81
74
|
__exportStar(require("./Options/Classes/Particles/Stroke.js"), exports);
|
|
82
75
|
__exportStar(require("./Options/Classes/Particles/Move/MoveAttract.js"), exports);
|
|
83
76
|
__exportStar(require("./Options/Classes/Particles/Move/Move.js"), exports);
|
|
@@ -87,7 +80,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
87
80
|
__exportStar(require("./Options/Classes/Particles/Move/OutModes.js"), exports);
|
|
88
81
|
__exportStar(require("./Options/Classes/Particles/Move/Path/MovePath.js"), exports);
|
|
89
82
|
__exportStar(require("./Options/Classes/Particles/Move/Spin.js"), exports);
|
|
90
|
-
__exportStar(require("./Options/Classes/Particles/Move/MoveTrail.js"), exports);
|
|
91
83
|
__exportStar(require("./Options/Classes/Particles/Number/ParticlesNumber.js"), exports);
|
|
92
84
|
__exportStar(require("./Options/Classes/Particles/Number/ParticlesNumberLimit.js"), exports);
|
|
93
85
|
__exportStar(require("./Options/Classes/Particles/Number/ParticlesDensity.js"), exports);
|
|
@@ -103,7 +95,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
103
95
|
__exportStar(require("./Options/Classes/ValueWithRandom.js"), exports);
|
|
104
96
|
__exportStar(require("./Utils/CanvasUtils.js"), exports);
|
|
105
97
|
__exportStar(require("./Utils/ColorUtils.js"), exports);
|
|
106
|
-
__exportStar(require("./Utils/
|
|
98
|
+
__exportStar(require("./Utils/LogUtils.js"), exports);
|
|
99
|
+
__exportStar(require("./Utils/MathUtils.js"), exports);
|
|
107
100
|
__exportStar(require("./Utils/OptionsUtils.js"), exports);
|
|
108
101
|
__exportStar(require("./Utils/Utils.js"), exports);
|
|
109
102
|
__exportStar(require("./Utils/TypeUtils.js"), exports);
|
package/umd/index.js
CHANGED
|
@@ -18,19 +18,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
if (v !== undefined) module.exports = v;
|
|
19
19
|
}
|
|
20
20
|
else if (typeof define === "function" && define.amd) {
|
|
21
|
-
define(["require", "exports", "./
|
|
21
|
+
define(["require", "exports", "./initEngine.js", "./exports.js"], factory);
|
|
22
22
|
}
|
|
23
23
|
})(function (require, exports) {
|
|
24
24
|
"use strict";
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.tsParticles = void 0;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const tsParticles = (0, init_js_1.init)();
|
|
27
|
+
const initEngine_js_1 = require("./initEngine.js");
|
|
28
|
+
const tsParticles = (0, initEngine_js_1.initEngine)();
|
|
30
29
|
exports.tsParticles = tsParticles;
|
|
31
|
-
|
|
32
|
-
window.tsParticles = tsParticles;
|
|
33
|
-
}
|
|
30
|
+
globalThis.tsParticles = tsParticles;
|
|
34
31
|
__exportStar(require("./exports.js"), exports);
|
|
35
|
-
__exportStar(require("./export-types.js"), exports);
|
|
36
32
|
});
|
|
@@ -9,11 +9,9 @@
|
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.initEngine = initEngine;
|
|
13
13
|
const Engine_js_1 = require("./Core/Engine.js");
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
engine.init();
|
|
17
|
-
return engine;
|
|
14
|
+
function initEngine() {
|
|
15
|
+
return new Engine_js_1.Engine();
|
|
18
16
|
}
|
|
19
17
|
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|