@tsparticles/engine 4.0.0-alpha.0 → 4.0.0-alpha.14
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/219.min.js +1 -0
- package/README.md +2 -5
- package/browser/Core/Canvas.js +238 -154
- package/browser/Core/Container.js +111 -227
- package/browser/Core/Engine.js +84 -124
- package/browser/Core/Particle.js +236 -140
- package/browser/Core/Particles.js +212 -123
- package/browser/Core/Retina.js +5 -0
- package/browser/Core/Utils/Constants.js +2 -2
- package/browser/Core/Utils/EventListeners.js +69 -310
- package/browser/Core/Utils/Point.js +2 -0
- package/browser/Core/Utils/QuadTree.js +13 -8
- package/browser/Core/Utils/Ranges.js +4 -0
- package/browser/Core/Utils/Vectors.js +7 -4
- package/browser/Enums/Types/EasingType.js +18 -3
- package/browser/Options/Classes/AnimatableColor.js +1 -0
- package/browser/Options/Classes/AnimationOptions.js +8 -0
- package/browser/Options/Classes/Background/Background.js +6 -0
- package/browser/Options/Classes/ColorAnimation.js +1 -0
- package/browser/Options/Classes/FullScreen/FullScreen.js +2 -0
- package/browser/Options/Classes/HslAnimation.js +3 -5
- package/browser/Options/Classes/Options.js +32 -78
- package/browser/Options/Classes/OptionsColor.js +1 -0
- package/browser/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
- package/browser/Options/Classes/Particles/Effect/Effect.js +4 -0
- package/browser/Options/Classes/Particles/Move/Move.js +18 -0
- package/browser/Options/Classes/Particles/Move/MoveAngle.js +2 -0
- package/browser/Options/Classes/Particles/Move/MoveAttract.js +3 -0
- package/browser/Options/Classes/Particles/Move/MoveCenter.js +4 -0
- package/browser/Options/Classes/Particles/Move/MoveGravity.js +4 -0
- package/browser/Options/Classes/Particles/Move/OutModes.js +5 -0
- package/browser/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
- package/browser/Options/Classes/Particles/Move/Spin.js +3 -0
- package/browser/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
- package/browser/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
- package/browser/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
- package/browser/Options/Classes/Particles/Opacity/Opacity.js +1 -0
- package/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
- package/browser/Options/Classes/Particles/ParticlesOptions.js +19 -11
- package/browser/Options/Classes/Particles/Shape/Shape.js +4 -0
- package/browser/Options/Classes/Particles/Size/Size.js +1 -0
- package/browser/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
- package/browser/Options/Classes/Particles/Stroke.js +3 -0
- package/browser/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
- package/{esm/Options/Classes/Interactivity/Events → browser/Options/Classes}/ResizeEvent.js +3 -1
- package/browser/Options/Classes/ValueWithRandom.js +3 -4
- package/browser/Utils/CanvasUtils.js +31 -106
- package/browser/Utils/ColorUtils.js +17 -2
- package/browser/Utils/EventDispatcher.js +1 -0
- package/browser/Utils/MathUtils.js +3 -2
- package/browser/Utils/Utils.js +53 -44
- package/browser/exports.js +1 -21
- package/cjs/Core/Canvas.js +238 -154
- package/cjs/Core/Container.js +111 -227
- package/cjs/Core/Engine.js +84 -124
- package/cjs/Core/Particle.js +236 -140
- package/cjs/Core/Particles.js +212 -123
- package/cjs/Core/Retina.js +5 -0
- package/cjs/Core/Utils/Constants.js +2 -2
- package/cjs/Core/Utils/EventListeners.js +69 -310
- package/cjs/Core/Utils/Point.js +2 -0
- package/cjs/Core/Utils/QuadTree.js +13 -8
- package/cjs/Core/Utils/Ranges.js +4 -0
- package/cjs/Core/Utils/Vectors.js +7 -4
- package/cjs/Enums/Types/EasingType.js +18 -3
- package/cjs/Options/Classes/AnimatableColor.js +1 -0
- package/cjs/Options/Classes/AnimationOptions.js +8 -0
- package/cjs/Options/Classes/Background/Background.js +6 -0
- package/cjs/Options/Classes/ColorAnimation.js +1 -0
- package/cjs/Options/Classes/FullScreen/FullScreen.js +2 -0
- package/cjs/Options/Classes/HslAnimation.js +3 -5
- package/cjs/Options/Classes/Options.js +32 -78
- package/cjs/Options/Classes/OptionsColor.js +1 -0
- package/cjs/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
- package/cjs/Options/Classes/Particles/Effect/Effect.js +4 -0
- package/cjs/Options/Classes/Particles/Move/Move.js +18 -0
- package/cjs/Options/Classes/Particles/Move/MoveAngle.js +2 -0
- package/cjs/Options/Classes/Particles/Move/MoveAttract.js +3 -0
- package/cjs/Options/Classes/Particles/Move/MoveCenter.js +4 -0
- package/cjs/Options/Classes/Particles/Move/MoveGravity.js +4 -0
- package/cjs/Options/Classes/Particles/Move/OutModes.js +5 -0
- package/cjs/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
- package/cjs/Options/Classes/Particles/Move/Spin.js +3 -0
- package/cjs/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
- package/cjs/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
- package/cjs/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
- package/cjs/Options/Classes/Particles/Opacity/Opacity.js +1 -0
- package/cjs/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
- package/cjs/Options/Classes/Particles/ParticlesOptions.js +19 -11
- package/cjs/Options/Classes/Particles/Shape/Shape.js +4 -0
- package/cjs/Options/Classes/Particles/Size/Size.js +1 -0
- package/cjs/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
- package/cjs/Options/Classes/Particles/Stroke.js +3 -0
- package/cjs/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
- package/cjs/Options/Classes/{Interactivity/Events/ResizeEvent.js → ResizeEvent.js} +3 -1
- package/cjs/Options/Classes/ValueWithRandom.js +3 -4
- package/cjs/Utils/CanvasUtils.js +31 -106
- package/cjs/Utils/ColorUtils.js +17 -2
- package/cjs/Utils/EventDispatcher.js +1 -0
- package/cjs/Utils/MathUtils.js +3 -2
- package/cjs/Utils/Utils.js +53 -44
- package/cjs/exports.js +1 -21
- package/dist_browser_Core_Container_js.js +8 -18
- package/esm/Core/Canvas.js +238 -154
- package/esm/Core/Container.js +111 -227
- package/esm/Core/Engine.js +84 -124
- package/esm/Core/Particle.js +236 -140
- package/esm/Core/Particles.js +212 -123
- package/esm/Core/Retina.js +5 -0
- package/esm/Core/Utils/Constants.js +2 -2
- package/esm/Core/Utils/EventListeners.js +69 -310
- package/esm/Core/Utils/Point.js +2 -0
- package/esm/Core/Utils/QuadTree.js +13 -8
- package/esm/Core/Utils/Ranges.js +4 -0
- package/esm/Core/Utils/Vectors.js +7 -4
- package/esm/Enums/Types/EasingType.js +18 -3
- package/esm/Options/Classes/AnimatableColor.js +1 -0
- package/esm/Options/Classes/AnimationOptions.js +8 -0
- package/esm/Options/Classes/Background/Background.js +6 -0
- package/esm/Options/Classes/ColorAnimation.js +1 -0
- package/esm/Options/Classes/FullScreen/FullScreen.js +2 -0
- package/esm/Options/Classes/HslAnimation.js +3 -5
- package/esm/Options/Classes/Options.js +32 -78
- package/esm/Options/Classes/OptionsColor.js +1 -0
- package/esm/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
- package/esm/Options/Classes/Particles/Effect/Effect.js +4 -0
- package/esm/Options/Classes/Particles/Move/Move.js +18 -0
- package/esm/Options/Classes/Particles/Move/MoveAngle.js +2 -0
- package/esm/Options/Classes/Particles/Move/MoveAttract.js +3 -0
- package/esm/Options/Classes/Particles/Move/MoveCenter.js +4 -0
- package/esm/Options/Classes/Particles/Move/MoveGravity.js +4 -0
- package/esm/Options/Classes/Particles/Move/OutModes.js +5 -0
- package/esm/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
- package/esm/Options/Classes/Particles/Move/Spin.js +3 -0
- package/esm/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
- package/esm/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
- package/esm/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
- package/esm/Options/Classes/Particles/Opacity/Opacity.js +1 -0
- package/esm/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
- package/esm/Options/Classes/Particles/ParticlesOptions.js +19 -11
- package/esm/Options/Classes/Particles/Shape/Shape.js +4 -0
- package/esm/Options/Classes/Particles/Size/Size.js +1 -0
- package/esm/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
- package/esm/Options/Classes/Particles/Stroke.js +3 -0
- package/esm/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
- package/{browser/Options/Classes/Interactivity/Events → esm/Options/Classes}/ResizeEvent.js +3 -1
- package/esm/Options/Classes/ValueWithRandom.js +3 -4
- package/esm/Utils/CanvasUtils.js +31 -106
- package/esm/Utils/ColorUtils.js +17 -2
- package/esm/Utils/EventDispatcher.js +1 -0
- package/esm/Utils/MathUtils.js +3 -2
- package/esm/Utils/Utils.js +53 -44
- package/esm/exports.js +1 -21
- package/package.json +1 -1
- package/report.html +3 -3
- package/scripts/install.js +219 -195
- package/tsparticles.engine.js +67 -247
- package/tsparticles.engine.min.js +2 -2
- package/types/Core/Canvas.d.ts +15 -4
- package/types/Core/Container.d.ts +5 -20
- package/types/Core/Engine.d.ts +18 -32
- package/types/Core/Interfaces/IColorManager.d.ts +0 -1
- package/types/Core/Interfaces/IContainerPlugin.d.ts +12 -2
- package/types/Core/Interfaces/IDrawParticleParams.d.ts +1 -1
- package/types/Core/Interfaces/IMovePathGenerator.d.ts +1 -2
- package/types/Core/Interfaces/IParticleOpacityData.d.ts +4 -0
- package/types/Core/Interfaces/IParticleRotateData.d.ts +4 -0
- package/types/Core/Interfaces/IParticleTransformValues.d.ts +4 -4
- package/types/Core/Interfaces/IParticleUpdater.d.ts +1 -1
- package/types/Core/Interfaces/IPlugin.d.ts +5 -1
- package/types/Core/Interfaces/IShapeDrawer.d.ts +0 -1
- package/types/Core/Particle.d.ts +13 -2
- package/types/Core/Particles.d.ts +17 -8
- package/types/Core/Utils/Constants.d.ts +2 -2
- package/types/Core/Utils/EventListeners.d.ts +0 -14
- package/types/Enums/Types/EasingType.d.ts +20 -5
- package/types/Options/Classes/HslAnimation.d.ts +3 -4
- package/types/Options/Classes/Options.d.ts +2 -11
- package/types/Options/Classes/Particles/ParticlesOptions.d.ts +0 -2
- package/types/Options/Classes/ResizeEvent.d.ts +9 -0
- package/types/Options/Classes/ValueWithRandom.d.ts +0 -1
- package/types/Options/Interfaces/IOptions.d.ts +2 -8
- package/types/Options/Interfaces/Particles/IParticlesOptions.d.ts +0 -3
- package/types/Types/CustomEventListener.d.ts +1 -1
- package/types/Types/EngineInitializers.d.ts +19 -0
- package/types/Utils/CanvasUtils.d.ts +6 -25
- package/types/Utils/EventDispatcher.d.ts +1 -1
- package/types/Utils/Utils.d.ts +5 -7
- package/types/export-types.d.ts +3 -19
- package/types/exports.d.ts +1 -21
- package/umd/Core/Canvas.js +236 -152
- package/umd/Core/Container.js +111 -227
- package/umd/Core/Engine.js +83 -123
- package/umd/Core/Particle.js +236 -140
- package/umd/Core/Particles.js +213 -124
- package/umd/Core/Retina.js +5 -0
- package/umd/Core/Utils/Constants.js +3 -3
- package/umd/Core/Utils/EventListeners.js +69 -310
- package/umd/Core/Utils/Point.js +2 -0
- package/umd/Core/Utils/QuadTree.js +13 -8
- package/umd/Core/Utils/Ranges.js +4 -0
- package/umd/Core/Utils/Vectors.js +7 -4
- package/umd/Enums/Types/EasingType.js +18 -3
- package/umd/Options/Classes/AnimatableColor.js +1 -0
- package/umd/Options/Classes/AnimationOptions.js +8 -0
- package/umd/Options/Classes/Background/Background.js +6 -0
- package/umd/Options/Classes/ColorAnimation.js +1 -0
- package/umd/Options/Classes/FullScreen/FullScreen.js +2 -0
- package/umd/Options/Classes/HslAnimation.js +3 -5
- package/umd/Options/Classes/Options.js +32 -78
- package/umd/Options/Classes/OptionsColor.js +1 -0
- package/umd/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
- package/umd/Options/Classes/Particles/Effect/Effect.js +4 -0
- package/umd/Options/Classes/Particles/Move/Move.js +18 -0
- package/umd/Options/Classes/Particles/Move/MoveAngle.js +2 -0
- package/umd/Options/Classes/Particles/Move/MoveAttract.js +3 -0
- package/umd/Options/Classes/Particles/Move/MoveCenter.js +4 -0
- package/umd/Options/Classes/Particles/Move/MoveGravity.js +4 -0
- package/umd/Options/Classes/Particles/Move/OutModes.js +5 -0
- package/umd/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
- package/umd/Options/Classes/Particles/Move/Spin.js +3 -0
- package/umd/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
- package/umd/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
- package/umd/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
- package/umd/Options/Classes/Particles/Opacity/Opacity.js +1 -0
- package/umd/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
- package/umd/Options/Classes/Particles/ParticlesOptions.js +19 -11
- package/umd/Options/Classes/Particles/Shape/Shape.js +4 -0
- package/umd/Options/Classes/Particles/Size/Size.js +1 -0
- package/umd/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
- package/umd/Options/Classes/Particles/Stroke.js +3 -0
- package/umd/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
- package/umd/Options/Classes/{Interactivity/Events/ResizeEvent.js → ResizeEvent.js} +4 -2
- package/umd/Options/Classes/ValueWithRandom.js +3 -4
- package/umd/Utils/CanvasUtils.js +30 -108
- package/umd/Utils/ColorUtils.js +17 -2
- package/umd/Utils/EventDispatcher.js +1 -0
- package/umd/Utils/MathUtils.js +3 -2
- package/umd/Utils/Utils.js +55 -48
- package/umd/exports.js +2 -22
- package/638.min.js +0 -2
- package/638.min.js.LICENSE.txt +0 -1
- package/browser/Core/Utils/ExternalInteractorBase.js +0 -7
- package/browser/Core/Utils/InteractionManager.js +0 -60
- package/browser/Core/Utils/ParticlesInteractorBase.js +0 -7
- package/browser/Enums/InteractivityDetect.js +0 -6
- package/browser/Enums/Modes/ResponsiveMode.js +0 -5
- package/browser/Enums/Modes/ThemeMode.js +0 -6
- package/browser/Enums/Types/DivType.js +0 -5
- package/browser/Enums/Types/InteractorType.js +0 -5
- package/browser/Options/Classes/Interactivity/Events/ClickEvent.js +0 -18
- package/browser/Options/Classes/Interactivity/Events/DivEvent.js +0 -27
- package/browser/Options/Classes/Interactivity/Events/Events.js +0 -30
- package/browser/Options/Classes/Interactivity/Events/HoverEvent.js +0 -21
- package/browser/Options/Classes/Interactivity/Events/Parallax.js +0 -22
- package/browser/Options/Classes/Interactivity/Interactivity.js +0 -22
- package/browser/Options/Classes/Interactivity/Modes/Modes.js +0 -25
- package/browser/Options/Classes/ManualParticle.js +0 -21
- package/browser/Options/Classes/Responsive.js +0 -29
- package/browser/Options/Classes/Theme/Theme.js +0 -21
- package/browser/Options/Classes/Theme/ThemeDefault.js +0 -23
- package/browser/Options/Interfaces/Interactivity/Events/IEvents.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Events/IParallax.js +0 -1
- package/browser/Options/Interfaces/Interactivity/IInteractivity.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -1
- package/browser/Options/Interfaces/Interactivity/Modes/IModes.js +0 -1
- package/browser/Options/Interfaces/Theme/ITheme.js +0 -1
- package/browser/Options/Interfaces/Theme/IThemeDefault.js +0 -1
- package/cjs/Core/Interfaces/IContainerInteractivity.js +0 -1
- package/cjs/Core/Interfaces/IExternalInteractor.js +0 -1
- package/cjs/Core/Interfaces/IInteractor.js +0 -1
- package/cjs/Core/Interfaces/IMouseData.js +0 -1
- package/cjs/Core/Interfaces/IParticlesInteractor.js +0 -1
- package/cjs/Core/Utils/ExternalInteractorBase.js +0 -7
- package/cjs/Core/Utils/InteractionManager.js +0 -60
- package/cjs/Core/Utils/ParticlesInteractorBase.js +0 -7
- package/cjs/Enums/InteractivityDetect.js +0 -6
- package/cjs/Enums/Modes/ResponsiveMode.js +0 -5
- package/cjs/Enums/Modes/ThemeMode.js +0 -6
- package/cjs/Enums/Types/DivType.js +0 -5
- package/cjs/Enums/Types/InteractorType.js +0 -5
- package/cjs/Options/Classes/Interactivity/Events/ClickEvent.js +0 -18
- package/cjs/Options/Classes/Interactivity/Events/DivEvent.js +0 -27
- package/cjs/Options/Classes/Interactivity/Events/Events.js +0 -30
- package/cjs/Options/Classes/Interactivity/Events/HoverEvent.js +0 -21
- package/cjs/Options/Classes/Interactivity/Events/Parallax.js +0 -22
- package/cjs/Options/Classes/Interactivity/Interactivity.js +0 -22
- package/cjs/Options/Classes/Interactivity/Modes/Modes.js +0 -25
- package/cjs/Options/Classes/ManualParticle.js +0 -21
- package/cjs/Options/Classes/Responsive.js +0 -29
- package/cjs/Options/Classes/Theme/Theme.js +0 -21
- package/cjs/Options/Classes/Theme/ThemeDefault.js +0 -23
- package/cjs/Options/Interfaces/IManualParticle.js +0 -1
- package/cjs/Options/Interfaces/IResponsive.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IClickEvent.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IDivEvent.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IEvents.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Events/IParallax.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/IInteractivity.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -1
- package/cjs/Options/Interfaces/Interactivity/Modes/IModes.js +0 -1
- package/cjs/Options/Interfaces/Theme/ITheme.js +0 -1
- package/cjs/Options/Interfaces/Theme/IThemeDefault.js +0 -1
- package/esm/Core/Interfaces/IContainerInteractivity.js +0 -1
- package/esm/Core/Interfaces/IExternalInteractor.js +0 -1
- package/esm/Core/Interfaces/IInteractor.js +0 -1
- package/esm/Core/Interfaces/IMouseData.js +0 -1
- package/esm/Core/Interfaces/IParticlesInteractor.js +0 -1
- package/esm/Core/Utils/ExternalInteractorBase.js +0 -7
- package/esm/Core/Utils/InteractionManager.js +0 -60
- package/esm/Core/Utils/ParticlesInteractorBase.js +0 -7
- package/esm/Enums/InteractivityDetect.js +0 -6
- package/esm/Enums/Modes/ResponsiveMode.js +0 -5
- package/esm/Enums/Modes/ThemeMode.js +0 -6
- package/esm/Enums/Types/DivType.js +0 -5
- package/esm/Enums/Types/InteractorType.js +0 -5
- package/esm/Options/Classes/Interactivity/Events/ClickEvent.js +0 -18
- package/esm/Options/Classes/Interactivity/Events/DivEvent.js +0 -27
- package/esm/Options/Classes/Interactivity/Events/Events.js +0 -30
- package/esm/Options/Classes/Interactivity/Events/HoverEvent.js +0 -21
- package/esm/Options/Classes/Interactivity/Events/Parallax.js +0 -22
- package/esm/Options/Classes/Interactivity/Interactivity.js +0 -22
- package/esm/Options/Classes/Interactivity/Modes/Modes.js +0 -25
- package/esm/Options/Classes/ManualParticle.js +0 -21
- package/esm/Options/Classes/Responsive.js +0 -29
- package/esm/Options/Classes/Theme/Theme.js +0 -21
- package/esm/Options/Classes/Theme/ThemeDefault.js +0 -23
- package/esm/Options/Interfaces/IManualParticle.js +0 -1
- package/esm/Options/Interfaces/IResponsive.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IClickEvent.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IDivEvent.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IEvents.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Events/IParallax.js +0 -1
- package/esm/Options/Interfaces/Interactivity/IInteractivity.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -1
- package/esm/Options/Interfaces/Interactivity/Modes/IModes.js +0 -1
- package/esm/Options/Interfaces/Theme/ITheme.js +0 -1
- package/esm/Options/Interfaces/Theme/IThemeDefault.js +0 -1
- package/tsparticles.engine.min.js.LICENSE.txt +0 -1
- package/types/Core/Interfaces/IContainerInteractivity.d.ts +0 -6
- package/types/Core/Interfaces/IExternalInteractor.d.ts +0 -12
- package/types/Core/Interfaces/IInteractor.d.ts +0 -16
- package/types/Core/Interfaces/IMouseData.d.ts +0 -9
- package/types/Core/Interfaces/IParticlesInteractor.d.ts +0 -7
- package/types/Core/Utils/ExternalInteractorBase.d.ts +0 -15
- package/types/Core/Utils/InteractionManager.d.ts +0 -17
- package/types/Core/Utils/ParticlesInteractorBase.d.ts +0 -15
- package/types/Enums/InteractivityDetect.d.ts +0 -5
- package/types/Enums/Modes/ResponsiveMode.d.ts +0 -4
- package/types/Enums/Modes/ThemeMode.d.ts +0 -5
- package/types/Enums/Types/DivType.d.ts +0 -4
- package/types/Enums/Types/InteractorType.d.ts +0 -4
- package/types/Options/Classes/Interactivity/Events/ClickEvent.d.ts +0 -10
- package/types/Options/Classes/Interactivity/Events/DivEvent.d.ts +0 -13
- package/types/Options/Classes/Interactivity/Events/Events.d.ts +0 -16
- package/types/Options/Classes/Interactivity/Events/HoverEvent.d.ts +0 -12
- package/types/Options/Classes/Interactivity/Events/Parallax.d.ts +0 -10
- package/types/Options/Classes/Interactivity/Events/ResizeEvent.d.ts +0 -9
- package/types/Options/Classes/Interactivity/Interactivity.d.ts +0 -16
- package/types/Options/Classes/Interactivity/Modes/Modes.d.ts +0 -12
- package/types/Options/Classes/ManualParticle.d.ts +0 -10
- package/types/Options/Classes/Responsive.d.ts +0 -12
- package/types/Options/Classes/Theme/Theme.d.ts +0 -12
- package/types/Options/Classes/Theme/ThemeDefault.d.ts +0 -11
- package/types/Options/Interfaces/IManualParticle.d.ts +0 -7
- package/types/Options/Interfaces/IResponsive.d.ts +0 -7
- package/types/Options/Interfaces/Interactivity/Events/IClickEvent.d.ts +0 -5
- package/types/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +0 -8
- package/types/Options/Interfaces/Interactivity/Events/IEvents.d.ts +0 -11
- package/types/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +0 -7
- package/types/Options/Interfaces/Interactivity/Events/IParallax.d.ts +0 -5
- package/types/Options/Interfaces/Interactivity/IInteractivity.d.ts +0 -9
- package/types/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +0 -4
- package/types/Options/Interfaces/Interactivity/Modes/IModes.d.ts +0 -1
- package/types/Options/Interfaces/Theme/ITheme.d.ts +0 -7
- package/types/Options/Interfaces/Theme/IThemeDefault.d.ts +0 -6
- package/umd/Core/Interfaces/IMouseData.js +0 -12
- package/umd/Core/Interfaces/IParticlesInteractor.js +0 -12
- package/umd/Core/Utils/ExternalInteractorBase.js +0 -21
- package/umd/Core/Utils/InteractionManager.js +0 -74
- package/umd/Core/Utils/ParticlesInteractorBase.js +0 -21
- package/umd/Enums/InteractivityDetect.js +0 -19
- package/umd/Enums/Modes/ResponsiveMode.js +0 -18
- package/umd/Enums/Modes/ThemeMode.js +0 -19
- package/umd/Enums/Types/DivType.js +0 -18
- package/umd/Enums/Types/InteractorType.js +0 -18
- package/umd/Options/Classes/Interactivity/Events/ClickEvent.js +0 -32
- package/umd/Options/Classes/Interactivity/Events/DivEvent.js +0 -41
- package/umd/Options/Classes/Interactivity/Events/Events.js +0 -44
- package/umd/Options/Classes/Interactivity/Events/HoverEvent.js +0 -35
- package/umd/Options/Classes/Interactivity/Events/Parallax.js +0 -36
- package/umd/Options/Classes/Interactivity/Interactivity.js +0 -36
- package/umd/Options/Classes/Interactivity/Modes/Modes.js +0 -39
- package/umd/Options/Classes/ManualParticle.js +0 -35
- package/umd/Options/Classes/Responsive.js +0 -43
- package/umd/Options/Classes/Theme/Theme.js +0 -35
- package/umd/Options/Classes/Theme/ThemeDefault.js +0 -37
- package/umd/Options/Interfaces/IManualParticle.js +0 -12
- package/umd/Options/Interfaces/IResponsive.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IClickEvent.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IDivEvent.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IEvents.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Events/IParallax.js +0 -12
- package/umd/Options/Interfaces/Interactivity/IInteractivity.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -12
- package/umd/Options/Interfaces/Interactivity/Modes/IModes.js +0 -12
- package/umd/Options/Interfaces/Theme/ITheme.js +0 -12
- package/umd/Options/Interfaces/Theme/IThemeDefault.js +0 -12
- /package/browser/Core/Interfaces/{IContainerInteractivity.js → IParticleOpacityData.js} +0 -0
- /package/browser/Core/Interfaces/{IExternalInteractor.js → IParticleRotateData.js} +0 -0
- /package/browser/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/browser/{Core/Interfaces/IInteractor.js → Types/EngineInitializers.js} +0 -0
- /package/{browser/Core/Interfaces/IMouseData.js → cjs/Core/Interfaces/IParticleOpacityData.js} +0 -0
- /package/{browser/Core/Interfaces/IParticlesInteractor.js → cjs/Core/Interfaces/IParticleRotateData.js} +0 -0
- /package/cjs/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/{browser/Options/Interfaces/IManualParticle.js → cjs/Types/EngineInitializers.js} +0 -0
- /package/{browser/Options/Interfaces/IResponsive.js → esm/Core/Interfaces/IParticleOpacityData.js} +0 -0
- /package/{browser/Options/Interfaces/Interactivity/Events/IClickEvent.js → esm/Core/Interfaces/IParticleRotateData.js} +0 -0
- /package/esm/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/{browser/Options/Interfaces/Interactivity/Events/IDivEvent.js → esm/Types/EngineInitializers.js} +0 -0
- /package/types/Options/Interfaces/{Interactivity/Events/IResizeEvent.d.ts → IResizeEvent.d.ts} +0 -0
- /package/umd/Core/Interfaces/{IContainerInteractivity.js → IParticleOpacityData.js} +0 -0
- /package/umd/Core/Interfaces/{IExternalInteractor.js → IParticleRotateData.js} +0 -0
- /package/umd/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
- /package/umd/{Core/Interfaces/IInteractor.js → Types/EngineInitializers.js} +0 -0
package/scripts/install.js
CHANGED
|
@@ -1,243 +1,267 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
reactParticlesFoundError = "react-particles-found",
|
|
5
|
-
reactTsParticlesFoundError = "react-tsparticles-found",
|
|
6
|
-
angularParticlesFoundError = "ng-particles-found",
|
|
7
|
-
vue2ParticlesFoundError = "vue2-particles-found",
|
|
8
|
-
vue3ParticlesFoundError = "vue3-particles-found";
|
|
9
|
-
|
|
10
|
-
try {
|
|
11
|
-
console.log("Thank you for installing tsParticles.");
|
|
12
|
-
console.log("Remember to checkout the official website https://particles.js.org to explore some samples.");
|
|
13
|
-
console.log("You can find more samples on CodePen too: https://codepen.io/collection/DPOage");
|
|
14
|
-
console.log("If you need documentation you can find it here: https://particles.js.org/docs");
|
|
15
|
-
console.log(
|
|
16
|
-
"Don't forget to star the tsParticles repository, if you like the project and want to support it: https://github.com/tsparticles/tsparticles"
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
const pkgSettings = require(path.join(process.env.INIT_CWD, "package.json"));
|
|
20
|
-
|
|
21
|
-
if (!pkgSettings) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const dependencies = pkgSettings.dependencies;
|
|
1
|
+
import path from "path";
|
|
2
|
+
import { fileURLToPath } from "url";
|
|
3
|
+
import fs from "fs-extra";
|
|
26
4
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
5
|
+
async function checkErrors() {
|
|
6
|
+
const angularParticlesFoundError = "ng-particles-found",
|
|
7
|
+
particlesJsFoundError = "particles.js-found",
|
|
8
|
+
reactParticlesJsFoundError = "react-particles-js-found",
|
|
9
|
+
reactParticlesFoundError = "react-particles-found",
|
|
10
|
+
reactTsParticlesFoundError = "react-tsparticles-found",
|
|
11
|
+
svelteParticlesFoundError = "svelte-particles-found",
|
|
12
|
+
vue2ParticlesFoundError = "vue2-particles-found",
|
|
13
|
+
vue3ParticlesFoundError = "vue3-particles-found";
|
|
30
14
|
|
|
31
|
-
|
|
32
|
-
console.
|
|
33
|
-
|
|
34
|
-
|
|
15
|
+
try {
|
|
16
|
+
console.log("Thank you for installing tsParticles.");
|
|
17
|
+
console.log("Remember to checkout the official website https://particles.js.org to explore some samples.");
|
|
18
|
+
console.log("You can find more samples on CodePen too: https://codepen.io/collection/DPOage");
|
|
19
|
+
console.log("If you need documentation you can find it here: https://particles.js.org/docs");
|
|
20
|
+
console.log(
|
|
21
|
+
"Don't forget to star the tsParticles repository, if you like the project and want to support it: https://github.com/tsparticles/tsparticles"
|
|
35
22
|
);
|
|
36
23
|
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
const rootPkgPath = path.join(process.env.INIT_CWD, "package.json"),
|
|
25
|
+
pkgSettings = await fs.readJson(rootPkgPath);
|
|
39
26
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"The package particlesjs can't be installed with tsparticles, since it can lead to unexpected behaviors, please uninstall particlesjs and remove it from the package.json file."
|
|
44
|
-
);
|
|
27
|
+
if (!pkgSettings) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
45
30
|
|
|
46
|
-
|
|
47
|
-
}
|
|
31
|
+
const dependencies = pkgSettings.dependencies;
|
|
48
32
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"The package react-particles-js has been deprecated and is not supported anymore."
|
|
53
|
-
);
|
|
54
|
-
console.error("\x1b[31m%s\x1b[0m", "Please consider switching to react-particles package.");
|
|
55
|
-
console.error(
|
|
56
|
-
"\x1b[31m%s\x1b[0m",
|
|
57
|
-
"This error will be fixed once react-particles-js is removed from the package.json file."
|
|
58
|
-
);
|
|
33
|
+
if (!dependencies) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
59
36
|
|
|
60
|
-
|
|
61
|
-
|
|
37
|
+
if (dependencies["particles.js"]) {
|
|
38
|
+
console.error(
|
|
39
|
+
"\x1b[31m%s\x1b[0m",
|
|
40
|
+
"The package particles.js can't be installed with tsparticles, since it can lead to unexpected behaviors, please uninstall particles.js and remove it from the package.json file."
|
|
41
|
+
);
|
|
62
42
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"\x1b[31m%s\x1b[0m",
|
|
66
|
-
"The package react-tsparticles has been deprecated and is not supported anymore."
|
|
67
|
-
);
|
|
68
|
-
console.error("\x1b[31m%s\x1b[0m", "Please consider switching to @tsparticles/react package.");
|
|
69
|
-
console.error(
|
|
70
|
-
"\x1b[31m%s\x1b[0m",
|
|
71
|
-
"This error will be fixed once react-tsparticles is removed from the package.json file."
|
|
72
|
-
);
|
|
43
|
+
throw new Error(reactParticlesJsFoundError);
|
|
44
|
+
}
|
|
73
45
|
|
|
74
|
-
|
|
75
|
-
|
|
46
|
+
if (dependencies["particlesjs"]) {
|
|
47
|
+
console.error(
|
|
48
|
+
"\x1b[31m%s\x1b[0m",
|
|
49
|
+
"The package particlesjs can't be installed with tsparticles, since it can lead to unexpected behaviors, please uninstall particlesjs and remove it from the package.json file."
|
|
50
|
+
);
|
|
76
51
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"\x1b[31m%s\x1b[0m",
|
|
80
|
-
"The package react-particles has been deprecated and is not supported anymore."
|
|
81
|
-
);
|
|
82
|
-
console.error("\x1b[31m%s\x1b[0m", "Please consider switching to @tsparticles/react package.");
|
|
83
|
-
console.error(
|
|
84
|
-
"\x1b[31m%s\x1b[0m",
|
|
85
|
-
"This error will be fixed once react-particles is removed from the package.json file."
|
|
86
|
-
);
|
|
52
|
+
throw new Error(reactParticlesJsFoundError);
|
|
53
|
+
}
|
|
87
54
|
|
|
88
|
-
|
|
89
|
-
|
|
55
|
+
if (dependencies["react-particles-js"]) {
|
|
56
|
+
console.error(
|
|
57
|
+
"\x1b[31m%s\x1b[0m",
|
|
58
|
+
"The package react-particles-js has been deprecated and is not supported anymore."
|
|
59
|
+
);
|
|
60
|
+
console.error("\x1b[31m%s\x1b[0m", "Please consider switching to react-particles package.");
|
|
61
|
+
console.error(
|
|
62
|
+
"\x1b[31m%s\x1b[0m",
|
|
63
|
+
"This error will be fixed once react-particles-js is removed from the package.json file."
|
|
64
|
+
);
|
|
90
65
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
66
|
+
throw new Error(reactParticlesJsFoundError);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (dependencies["react-tsparticles"]) {
|
|
70
|
+
console.error(
|
|
71
|
+
"\x1b[31m%s\x1b[0m",
|
|
72
|
+
"The package react-tsparticles has been deprecated and is not supported anymore."
|
|
96
73
|
);
|
|
97
|
-
console.
|
|
98
|
-
|
|
74
|
+
console.error("\x1b[31m%s\x1b[0m", "Please consider switching to @tsparticles/react package.");
|
|
75
|
+
console.error(
|
|
76
|
+
"\x1b[31m%s\x1b[0m",
|
|
77
|
+
"This error will be fixed once react-tsparticles is removed from the package.json file."
|
|
99
78
|
);
|
|
79
|
+
|
|
80
|
+
throw new Error(reactTsParticlesFoundError);
|
|
100
81
|
}
|
|
101
|
-
}
|
|
102
82
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
83
|
+
if (dependencies["react-particles"]) {
|
|
84
|
+
console.error(
|
|
85
|
+
"\x1b[31m%s\x1b[0m",
|
|
86
|
+
"The package react-particles has been deprecated and is not supported anymore."
|
|
87
|
+
);
|
|
88
|
+
console.error("\x1b[31m%s\x1b[0m", "Please consider switching to @tsparticles/react package.");
|
|
89
|
+
console.error(
|
|
90
|
+
"\x1b[31m%s\x1b[0m",
|
|
91
|
+
"This error will be fixed once react-particles is removed from the package.json file."
|
|
92
|
+
);
|
|
113
93
|
|
|
114
|
-
|
|
115
|
-
|
|
94
|
+
throw new Error(reactParticlesFoundError);
|
|
95
|
+
}
|
|
116
96
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
97
|
+
if (dependencies["react"] || dependencies["next"]) {
|
|
98
|
+
if (!dependencies["@tsparticles/react"]) {
|
|
99
|
+
console.warn(
|
|
100
|
+
"\x1b[43m\x1b[30m%s\x1b[0m",
|
|
101
|
+
"Found React installed. Please download react-particles to use tsParticles with a component ready to use and easier to configure."
|
|
102
|
+
);
|
|
103
|
+
console.log(
|
|
104
|
+
"You can read more about the component here: https://github.com/tsparticles/react/#readme"
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (dependencies["ng-particles"]) {
|
|
110
|
+
console.error(
|
|
111
|
+
"\x1b[31m%s\x1b[0m",
|
|
112
|
+
"The package ng-particles has been deprecated and is not supported anymore."
|
|
113
|
+
);
|
|
114
|
+
console.error("\x1b[31m%s\x1b[0m", "Please consider switching to @tsparticles/angular package.");
|
|
115
|
+
console.error(
|
|
116
|
+
"\x1b[31m%s\x1b[0m",
|
|
117
|
+
"This error will be fixed once ng-particles is removed from the package.json file."
|
|
122
118
|
);
|
|
123
|
-
|
|
119
|
+
|
|
120
|
+
throw new Error(angularParticlesFoundError);
|
|
124
121
|
}
|
|
125
|
-
}
|
|
126
122
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
);
|
|
123
|
+
if (dependencies["@angular/core"]) {
|
|
124
|
+
if (!dependencies["@tsparticles/angular"]) {
|
|
125
|
+
console.warn(
|
|
126
|
+
"\x1b[43m\x1b[30m%s\x1b[0m",
|
|
127
|
+
"Found Angular installed. Please download ng-particles to use tsParticles with a component ready to use and easier to configure."
|
|
128
|
+
);
|
|
129
|
+
console.log("You can read more about the component here: https://github.com/tsparticles/angular/#readme");
|
|
130
|
+
}
|
|
131
|
+
}
|
|
137
132
|
|
|
138
|
-
|
|
139
|
-
|
|
133
|
+
if (dependencies["vue3-particles"]) {
|
|
134
|
+
console.error(
|
|
135
|
+
"\x1b[31m%s\x1b[0m",
|
|
136
|
+
"The package vue3-particles has been deprecated and is not supported anymore."
|
|
137
|
+
);
|
|
138
|
+
console.error("\x1b[31m%s\x1b[0m", "Please consider switching to @tsparticles/vue3 package.");
|
|
139
|
+
console.error(
|
|
140
|
+
"\x1b[31m%s\x1b[0m",
|
|
141
|
+
"This error will be fixed once vue3-particles is removed from the package.json file."
|
|
142
|
+
);
|
|
140
143
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
"\x1b[31m%s\x1b[0m",
|
|
144
|
-
"The package vue2-particles has been deprecated and is not supported anymore."
|
|
145
|
-
);
|
|
146
|
-
console.error("\x1b[31m%s\x1b[0m", "Please consider switching to @tsparticles/vue2 package.");
|
|
147
|
-
console.error(
|
|
148
|
-
"\x1b[31m%s\x1b[0m",
|
|
149
|
-
"This error will be fixed once vue2-particles is removed from the package.json file."
|
|
150
|
-
);
|
|
144
|
+
throw new Error(vue3ParticlesFoundError);
|
|
145
|
+
}
|
|
151
146
|
|
|
152
|
-
|
|
153
|
-
|
|
147
|
+
if (dependencies["vue2-particles"]) {
|
|
148
|
+
console.error(
|
|
149
|
+
"\x1b[31m%s\x1b[0m",
|
|
150
|
+
"The package vue2-particles has been deprecated and is not supported anymore."
|
|
151
|
+
);
|
|
152
|
+
console.error("\x1b[31m%s\x1b[0m", "Please consider switching to @tsparticles/vue2 package.");
|
|
153
|
+
console.error(
|
|
154
|
+
"\x1b[31m%s\x1b[0m",
|
|
155
|
+
"This error will be fixed once vue2-particles is removed from the package.json file."
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
throw new Error(vue2ParticlesFoundError);
|
|
159
|
+
}
|
|
154
160
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
161
|
+
if (dependencies["vue"] || dependencies["nuxt"]) {
|
|
162
|
+
const vueVersion = dependencies["vue"],
|
|
163
|
+
nuxtVersion = dependencies["nuxt"],
|
|
164
|
+
vueMajor = (vueVersion || nuxtVersion).split(".")[0];
|
|
159
165
|
|
|
160
|
-
|
|
161
|
-
|
|
166
|
+
if (vueMajor > 2) {
|
|
167
|
+
if (!dependencies["@tsparticles/vue3"]) {
|
|
168
|
+
console.warn(
|
|
169
|
+
"\x1b[43m\x1b[30m%s\x1b[0m",
|
|
170
|
+
"Found Vue 3.x installed. Please Download @tsparticles/vue3 to use tsParticles with a component ready to use and easier to configure."
|
|
171
|
+
);
|
|
172
|
+
console.log(
|
|
173
|
+
"You can read more about the component here: https://github.com/tsparticles/vue3/#readme"
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
} else {
|
|
177
|
+
if (!dependencies["@tsparticles/vue2"]) {
|
|
178
|
+
console.warn(
|
|
179
|
+
"\x1b[43m\x1b[30m%s\x1b[0m",
|
|
180
|
+
"Found Vue 2.x installed. Please Download @tsparticles/vue2 to use tsParticles with a component ready to use and easier to configure."
|
|
181
|
+
);
|
|
182
|
+
console.log(
|
|
183
|
+
"You can read more about the component here: https://github.com/tsparticles/vue2/#readme"
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if (dependencies["svelte"]) {
|
|
190
|
+
if (dependencies["svelte-particles"]) {
|
|
191
|
+
console.error(
|
|
192
|
+
"\x1b[31m%s\x1b[0m",
|
|
193
|
+
"The package svelte-particles has been deprecated and is not supported anymore."
|
|
194
|
+
);
|
|
195
|
+
console.error("\x1b[31m%s\x1b[0m", "Please consider switching to @tsparticles/svelte package.");
|
|
196
|
+
console.error(
|
|
197
|
+
"\x1b[31m%s\x1b[0m",
|
|
198
|
+
"This error will be fixed once svelte-particles is removed from the package.json file."
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
throw new Error(svelteParticlesFoundError);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (!dependencies["@tsparticles/svelte"]) {
|
|
162
205
|
console.warn(
|
|
163
206
|
"\x1b[43m\x1b[30m%s\x1b[0m",
|
|
164
|
-
"Found
|
|
207
|
+
"Found Svelte installed. Please Download @tsparticles/svelte to use tsParticles with a component ready to use and easier to configure."
|
|
165
208
|
);
|
|
166
209
|
console.log(
|
|
167
|
-
"You can read more about the component here: https://github.com/tsparticles/
|
|
210
|
+
"You can read more about the component here: https://github.com/tsparticles/svelte/#readme"
|
|
168
211
|
);
|
|
169
212
|
}
|
|
170
|
-
}
|
|
171
|
-
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (dependencies["inferno"]) {
|
|
216
|
+
if (!dependencies["inferno-particles"]) {
|
|
172
217
|
console.warn(
|
|
173
218
|
"\x1b[43m\x1b[30m%s\x1b[0m",
|
|
174
|
-
"Found
|
|
219
|
+
"Found Inferno installed. Please Download inferno-particles to use tsParticles with a component ready to use and easier to configure."
|
|
175
220
|
);
|
|
176
221
|
console.log(
|
|
177
|
-
"You can read more about the component here: https://github.com/tsparticles/
|
|
222
|
+
"You can read more about the component here: https://github.com/tsparticles/tsparticles/blob/main/components/inferno/README.md"
|
|
178
223
|
);
|
|
179
224
|
}
|
|
180
225
|
}
|
|
181
|
-
}
|
|
182
226
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
227
|
+
if (dependencies["preact"]) {
|
|
228
|
+
if (!dependencies["preact-particles"]) {
|
|
229
|
+
console.warn(
|
|
230
|
+
"\x1b[43m\x1b[30m%s\x1b[0m",
|
|
231
|
+
"Found Preact installed. Please Download preact-particles to use tsParticles with a component ready to use and easier to configure."
|
|
232
|
+
);
|
|
233
|
+
console.log(
|
|
234
|
+
"You can read more about the component here: https://github.com/tsparticles/tsparticles/blob/main/components/preact/README.md"
|
|
235
|
+
);
|
|
236
|
+
}
|
|
192
237
|
}
|
|
193
|
-
}
|
|
194
238
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
239
|
+
if (dependencies["jquery"]) {
|
|
240
|
+
if (!dependencies["jquery-particles"]) {
|
|
241
|
+
console.warn(
|
|
242
|
+
"\x1b[43m\x1b[30m%s\x1b[0m",
|
|
243
|
+
"Found jQuery installed. Please Download jquery-particles to use tsParticles with a plugin ready to use and easier to configure."
|
|
244
|
+
);
|
|
245
|
+
console.log(
|
|
246
|
+
"You can read more about the plugin here: https://github.com/tsparticles/tsparticles/blob/main/components/jquery/README.md"
|
|
247
|
+
);
|
|
248
|
+
}
|
|
204
249
|
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
250
|
+
} catch (error) {
|
|
251
|
+
if (error.message === reactParticlesJsFoundError ||
|
|
252
|
+
error.message === particlesJsFoundError ||
|
|
253
|
+
error.message === reactParticlesFoundError ||
|
|
254
|
+
error.message === reactTsParticlesFoundError ||
|
|
255
|
+
error.message === angularParticlesFoundError ||
|
|
256
|
+
error.message === vue2ParticlesFoundError ||
|
|
257
|
+
error.message === vue3ParticlesFoundError ||
|
|
258
|
+
error.message === svelteParticlesFoundError
|
|
259
|
+
) {
|
|
260
|
+
throw error;
|
|
216
261
|
}
|
|
217
|
-
}
|
|
218
262
|
|
|
219
|
-
|
|
220
|
-
if (!dependencies["jquery-particles"]) {
|
|
221
|
-
console.warn(
|
|
222
|
-
"\x1b[43m\x1b[30m%s\x1b[0m",
|
|
223
|
-
"Found jQuery installed. Please Download jquery-particles to use tsParticles with a plugin ready to use and easier to configure."
|
|
224
|
-
);
|
|
225
|
-
console.log(
|
|
226
|
-
"You can read more about the plugin here: https://github.com/tsparticles/tsparticles/blob/main/components/jquery/README.md"
|
|
227
|
-
);
|
|
228
|
-
}
|
|
263
|
+
console.log(error);
|
|
229
264
|
}
|
|
230
|
-
} catch (error) {
|
|
231
|
-
if (error.message === reactParticlesJsFoundError ||
|
|
232
|
-
error.message === particlesJsFoundError ||
|
|
233
|
-
error.message === reactParticlesFoundError ||
|
|
234
|
-
error.message === reactTsParticlesFoundError ||
|
|
235
|
-
error.message === angularParticlesFoundError ||
|
|
236
|
-
error.message === vue2ParticlesFoundError ||
|
|
237
|
-
error.message === vue3ParticlesFoundError
|
|
238
|
-
) {
|
|
239
|
-
throw error;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
console.log(error);
|
|
243
265
|
}
|
|
266
|
+
|
|
267
|
+
checkErrors();
|