@tsparticles/engine 3.0.0-alpha.1 → 3.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +244 -188
- package/browser/Core/Canvas.js +271 -241
- package/browser/Core/Container.js +90 -106
- package/browser/Core/Engine.js +271 -0
- package/browser/Core/Particle.js +158 -165
- package/browser/Core/Particles.js +148 -143
- package/browser/Core/Retina.js +15 -13
- package/browser/Core/Utils/Circle.js +10 -6
- package/browser/Core/Utils/Constants.js +4 -3
- package/browser/Core/Utils/EventListeners.js +258 -234
- package/browser/Core/Utils/InteractionManager.js +6 -16
- package/browser/Core/Utils/QuadTree.js +14 -20
- package/browser/Core/Utils/Vector3d.js +17 -9
- package/browser/Options/Classes/AnimatableColor.js +2 -1
- package/browser/Options/Classes/AnimationOptions.js +4 -3
- package/browser/Options/Classes/BackgroundMask/BackgroundMask.js +2 -1
- package/browser/Options/Classes/ColorAnimation.js +4 -0
- package/browser/Options/Classes/Interactivity/Events/DivEvent.js +0 -24
- package/browser/Options/Classes/Interactivity/Events/Events.js +5 -24
- package/browser/Options/Classes/Interactivity/Interactivity.js +1 -8
- package/browser/Options/Classes/Interactivity/Modes/Modes.js +11 -8
- package/browser/Options/Classes/ManualParticle.js +5 -6
- package/browser/Options/Classes/Options.js +19 -39
- package/browser/Options/Classes/OptionsColor.js +3 -2
- package/browser/Options/Classes/Particles/Collisions/Collisions.js +5 -0
- package/browser/Options/Classes/Particles/Move/Move.js +11 -41
- package/browser/Options/Classes/Particles/Move/MoveAttract.js +9 -20
- package/browser/Options/Classes/Particles/Move/MoveTrail.js +2 -8
- package/browser/Options/Classes/Particles/Move/OutModes.js +4 -5
- package/browser/Options/Classes/Particles/Move/Spin.js +3 -1
- package/browser/Options/Classes/Particles/Number/ParticlesDensity.js +2 -21
- package/browser/Options/Classes/Particles/Number/ParticlesNumber.js +2 -9
- package/browser/Options/Classes/Particles/Opacity/Opacity.js +11 -7
- package/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +0 -9
- package/browser/Options/Classes/Particles/ParticlesOptions.js +6 -11
- package/browser/Options/Classes/Particles/Shape/Shape.js +9 -10
- package/browser/Options/Classes/Particles/Size/Size.js +11 -7
- package/browser/Options/Classes/Particles/Size/SizeAnimation.js +0 -9
- package/browser/Options/Classes/ValueWithRandom.js +4 -17
- package/browser/Utils/CanvasUtils.js +18 -54
- package/browser/Utils/ColorUtils.js +17 -19
- package/browser/Utils/EventDispatcher.js +7 -6
- package/browser/Utils/HslColorManager.js +2 -4
- package/browser/Utils/NumberUtils.js +41 -45
- package/browser/Utils/RgbColorManager.js +2 -4
- package/browser/Utils/Utils.js +133 -62
- package/browser/bundle.js +4 -97
- package/browser/export-types.js +97 -0
- package/browser/exports.js +89 -0
- package/browser/index.js +8 -199
- package/browser/init.js +12 -0
- package/cjs/Core/Canvas.js +269 -239
- package/cjs/Core/Container.js +90 -106
- package/cjs/Core/Engine.js +275 -0
- package/cjs/Core/Particle.js +157 -164
- package/cjs/Core/Particles.js +148 -143
- package/cjs/Core/Retina.js +15 -13
- package/cjs/Core/Utils/Circle.js +10 -6
- package/cjs/Core/Utils/Constants.js +5 -4
- package/cjs/Core/Utils/EventListeners.js +257 -233
- package/cjs/Core/Utils/InteractionManager.js +6 -16
- package/cjs/Core/Utils/QuadTree.js +14 -20
- package/cjs/Core/Utils/Vector3d.js +17 -9
- package/cjs/Options/Classes/AnimatableColor.js +2 -1
- package/cjs/Options/Classes/AnimationOptions.js +4 -3
- package/cjs/Options/Classes/BackgroundMask/BackgroundMask.js +2 -1
- package/cjs/Options/Classes/ColorAnimation.js +4 -0
- package/cjs/Options/Classes/Interactivity/Events/DivEvent.js +0 -24
- package/cjs/Options/Classes/Interactivity/Events/Events.js +5 -24
- package/cjs/Options/Classes/Interactivity/Interactivity.js +1 -8
- package/cjs/Options/Classes/Interactivity/Modes/Modes.js +11 -8
- package/cjs/Options/Classes/ManualParticle.js +5 -6
- package/cjs/Options/Classes/Options.js +18 -38
- package/cjs/Options/Classes/OptionsColor.js +3 -2
- package/cjs/Options/Classes/Particles/Collisions/Collisions.js +5 -0
- package/cjs/Options/Classes/Particles/Move/Move.js +11 -41
- package/cjs/Options/Classes/Particles/Move/MoveAttract.js +9 -20
- package/cjs/Options/Classes/Particles/Move/MoveTrail.js +2 -8
- package/cjs/Options/Classes/Particles/Move/OutModes.js +4 -5
- package/cjs/Options/Classes/Particles/Move/Spin.js +3 -1
- package/cjs/Options/Classes/Particles/Number/ParticlesDensity.js +2 -21
- package/cjs/Options/Classes/Particles/Number/ParticlesNumber.js +2 -9
- package/cjs/Options/Classes/Particles/Opacity/Opacity.js +10 -6
- package/cjs/Options/Classes/Particles/Opacity/OpacityAnimation.js +0 -9
- package/cjs/Options/Classes/Particles/ParticlesOptions.js +6 -11
- package/cjs/Options/Classes/Particles/Shape/Shape.js +9 -10
- package/cjs/Options/Classes/Particles/Size/Size.js +11 -7
- package/cjs/Options/Classes/Particles/Size/SizeAnimation.js +0 -9
- package/cjs/Options/Classes/ValueWithRandom.js +4 -17
- package/cjs/Utils/CanvasUtils.js +21 -58
- package/cjs/Utils/ColorUtils.js +16 -18
- package/cjs/Utils/EventDispatcher.js +7 -6
- package/cjs/Utils/HslColorManager.js +2 -4
- package/cjs/Utils/NumberUtils.js +41 -45
- package/cjs/Utils/RgbColorManager.js +2 -4
- package/cjs/Utils/Utils.js +146 -66
- package/cjs/bundle.js +4 -97
- package/cjs/export-types.js +113 -0
- package/cjs/exports.js +105 -0
- package/cjs/index.js +8 -199
- package/cjs/init.js +16 -0
- package/esm/Core/Canvas.js +271 -241
- package/esm/Core/Container.js +90 -106
- package/esm/Core/Engine.js +271 -0
- package/esm/Core/Particle.js +158 -165
- package/esm/Core/Particles.js +148 -143
- package/esm/Core/Retina.js +15 -13
- package/esm/Core/Utils/Circle.js +10 -6
- package/esm/Core/Utils/Constants.js +4 -3
- package/esm/Core/Utils/EventListeners.js +258 -234
- package/esm/Core/Utils/InteractionManager.js +6 -16
- package/esm/Core/Utils/QuadTree.js +14 -20
- package/esm/Core/Utils/Vector3d.js +17 -9
- package/esm/Options/Classes/AnimatableColor.js +2 -1
- package/esm/Options/Classes/AnimationOptions.js +4 -3
- package/esm/Options/Classes/BackgroundMask/BackgroundMask.js +2 -1
- package/esm/Options/Classes/ColorAnimation.js +4 -0
- package/esm/Options/Classes/Interactivity/Events/DivEvent.js +0 -24
- package/esm/Options/Classes/Interactivity/Events/Events.js +5 -24
- package/esm/Options/Classes/Interactivity/Interactivity.js +1 -8
- package/esm/Options/Classes/Interactivity/Modes/Modes.js +11 -8
- package/esm/Options/Classes/ManualParticle.js +5 -6
- package/esm/Options/Classes/Options.js +19 -39
- package/esm/Options/Classes/OptionsColor.js +3 -2
- package/esm/Options/Classes/Particles/Collisions/Collisions.js +5 -0
- package/esm/Options/Classes/Particles/Move/Move.js +11 -41
- package/esm/Options/Classes/Particles/Move/MoveAttract.js +9 -20
- package/esm/Options/Classes/Particles/Move/MoveTrail.js +2 -8
- package/esm/Options/Classes/Particles/Move/OutModes.js +4 -5
- package/esm/Options/Classes/Particles/Move/Spin.js +3 -1
- package/esm/Options/Classes/Particles/Number/ParticlesDensity.js +2 -21
- package/esm/Options/Classes/Particles/Number/ParticlesNumber.js +2 -9
- package/esm/Options/Classes/Particles/Opacity/Opacity.js +11 -7
- package/esm/Options/Classes/Particles/Opacity/OpacityAnimation.js +0 -9
- package/esm/Options/Classes/Particles/ParticlesOptions.js +6 -11
- package/esm/Options/Classes/Particles/Shape/Shape.js +9 -10
- package/esm/Options/Classes/Particles/Size/Size.js +11 -7
- package/esm/Options/Classes/Particles/Size/SizeAnimation.js +0 -9
- package/esm/Options/Classes/ValueWithRandom.js +4 -17
- package/esm/Utils/CanvasUtils.js +18 -54
- package/esm/Utils/ColorUtils.js +17 -19
- package/esm/Utils/EventDispatcher.js +7 -6
- package/esm/Utils/HslColorManager.js +2 -4
- package/esm/Utils/NumberUtils.js +41 -45
- package/esm/Utils/RgbColorManager.js +2 -4
- package/esm/Utils/Utils.js +133 -62
- package/esm/bundle.js +4 -97
- package/esm/export-types.js +97 -0
- package/esm/exports.js +89 -0
- package/esm/index.js +8 -199
- package/esm/init.js +12 -0
- package/package.json +17 -2
- package/report.html +4 -4
- package/scripts/install.js +90 -33
- package/tsparticles.engine.js +1832 -2007
- package/tsparticles.engine.min.js +1 -1
- package/tsparticles.engine.min.js.LICENSE.txt +1 -10
- package/types/Core/Canvas.d.ts +20 -16
- package/types/Core/Container.d.ts +10 -14
- package/types/Core/Engine.d.ts +71 -0
- package/types/Core/Interfaces/IContainerPlugin.d.ts +2 -0
- package/types/Core/Interfaces/ICoordinates.d.ts +2 -2
- package/types/Core/Interfaces/IDimension.d.ts +2 -2
- package/types/Core/Interfaces/IMovePathGenerator.d.ts +2 -1
- package/types/Core/Interfaces/IParticleUpdater.d.ts +0 -2
- package/types/Core/Interfaces/IParticleValueAnimation.d.ts +2 -0
- package/types/Core/Interfaces/IPlugin.d.ts +4 -3
- package/types/Core/Particle.d.ts +7 -7
- package/types/Core/Particles.d.ts +14 -11
- package/types/Core/Utils/Constants.d.ts +4 -3
- package/types/Core/Utils/EventListeners.d.ts +20 -18
- package/types/Core/Utils/InteractionManager.d.ts +1 -1
- package/types/Core/Utils/QuadTree.d.ts +2 -5
- package/types/Core/Utils/Vector3d.d.ts +2 -1
- package/types/Enums/Modes/{SizeMode.d.ts → PixelMode.d.ts} +1 -1
- package/types/Options/Classes/AnimationOptions.d.ts +1 -1
- package/types/Options/Classes/ColorAnimation.d.ts +1 -0
- package/types/Options/Classes/Interactivity/Events/DivEvent.d.ts +0 -6
- package/types/Options/Classes/Interactivity/Events/Events.d.ts +0 -6
- package/types/Options/Classes/Interactivity/Interactivity.d.ts +1 -3
- package/types/Options/Classes/Interactivity/Modes/Modes.d.ts +1 -1
- package/types/Options/Classes/Options.d.ts +5 -12
- package/types/Options/Classes/Particles/Collisions/Collisions.d.ts +2 -0
- package/types/Options/Classes/Particles/Move/Move.d.ts +0 -11
- package/types/Options/Classes/Particles/Move/MoveAttract.d.ts +0 -4
- package/types/Options/Classes/Particles/Move/MoveCenter.d.ts +2 -2
- package/types/Options/Classes/Particles/Move/MoveTrail.d.ts +0 -3
- package/types/Options/Classes/Particles/Number/ParticlesDensity.d.ts +0 -6
- package/types/Options/Classes/Particles/Number/ParticlesNumber.d.ts +0 -2
- package/types/Options/Classes/Particles/Opacity/Opacity.d.ts +4 -4
- package/types/Options/Classes/Particles/Opacity/OpacityAnimation.d.ts +0 -2
- package/types/Options/Classes/Particles/ParticlesOptions.d.ts +1 -1
- package/types/Options/Classes/Particles/Size/Size.d.ts +4 -4
- package/types/Options/Classes/Particles/Size/SizeAnimation.d.ts +0 -2
- package/types/Options/Classes/Responsive.d.ts +3 -3
- package/types/Options/Classes/Theme/Theme.d.ts +2 -2
- package/types/Options/Classes/ValueWithRandom.d.ts +2 -6
- package/types/Options/Interfaces/IAnimation.d.ts +1 -1
- package/types/Options/Interfaces/IOptions.d.ts +1 -4
- package/types/Options/Interfaces/IResponsive.d.ts +4 -3
- package/types/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +0 -3
- package/types/Options/Interfaces/Interactivity/Events/IEvents.d.ts +0 -3
- package/types/Options/Interfaces/Interactivity/IInteractivity.d.ts +0 -1
- package/types/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +0 -1
- package/types/Options/Interfaces/Particles/Collisions/ICollisions.d.ts +2 -0
- package/types/Options/Interfaces/Particles/IStroke.d.ts +2 -1
- package/types/Options/Interfaces/Particles/Move/IMove.d.ts +0 -5
- package/types/Options/Interfaces/Particles/Move/IMoveAttract.d.ts +0 -2
- package/types/Options/Interfaces/Particles/Move/IMoveTrail.d.ts +0 -2
- package/types/Options/Interfaces/Particles/Number/IParticlesDensity.d.ts +0 -3
- package/types/Options/Interfaces/Particles/Number/IParticlesNumber.d.ts +0 -1
- package/types/Options/Interfaces/Particles/Opacity/IOpacity.d.ts +0 -1
- package/types/Options/Interfaces/Particles/Opacity/IOpacityAnimation.d.ts +0 -1
- package/types/Options/Interfaces/Particles/Size/ISize.d.ts +0 -1
- package/types/Options/Interfaces/Particles/Size/ISizeAnimation.d.ts +0 -1
- package/types/Options/Interfaces/Theme/ITheme.d.ts +3 -2
- package/types/Types/ExportResult.d.ts +5 -0
- package/types/Utils/CanvasUtils.d.ts +2 -5
- package/types/Utils/OptionsUtils.d.ts +1 -1
- package/types/Utils/Utils.d.ts +22 -4
- package/types/bundle.d.ts +2 -91
- package/types/export-types.d.ts +107 -0
- package/types/exports.d.ts +89 -0
- package/types/index.d.ts +3 -204
- package/types/init.d.ts +2 -0
- package/umd/Core/Canvas.js +269 -239
- package/umd/Core/Container.js +91 -107
- package/umd/Core/Engine.js +285 -0
- package/umd/Core/Particle.js +158 -165
- package/umd/Core/Particles.js +149 -144
- package/umd/Core/Retina.js +15 -13
- package/umd/Core/Utils/Circle.js +11 -7
- package/umd/Core/Utils/Constants.js +5 -4
- package/umd/Core/Utils/EventListeners.js +257 -233
- package/umd/Core/Utils/InteractionManager.js +6 -16
- package/umd/Core/Utils/QuadTree.js +14 -20
- package/umd/Core/Utils/Vector3d.js +18 -10
- package/umd/Options/Classes/AnimatableColor.js +3 -2
- package/umd/Options/Classes/AnimationOptions.js +4 -3
- package/umd/Options/Classes/BackgroundMask/BackgroundMask.js +3 -2
- package/umd/Options/Classes/ColorAnimation.js +4 -0
- package/umd/Options/Classes/Interactivity/Events/DivEvent.js +1 -25
- package/umd/Options/Classes/Interactivity/Events/Events.js +6 -25
- package/umd/Options/Classes/Interactivity/Interactivity.js +1 -8
- package/umd/Options/Classes/Interactivity/Modes/Modes.js +11 -8
- package/umd/Options/Classes/ManualParticle.js +5 -6
- package/umd/Options/Classes/Options.js +18 -38
- package/umd/Options/Classes/OptionsColor.js +4 -3
- package/umd/Options/Classes/Particles/Collisions/Collisions.js +6 -1
- package/umd/Options/Classes/Particles/Move/Move.js +12 -42
- package/umd/Options/Classes/Particles/Move/MoveAttract.js +9 -20
- package/umd/Options/Classes/Particles/Move/MoveTrail.js +2 -8
- package/umd/Options/Classes/Particles/Move/OutModes.js +4 -5
- package/umd/Options/Classes/Particles/Move/Spin.js +3 -1
- package/umd/Options/Classes/Particles/Number/ParticlesDensity.js +2 -21
- package/umd/Options/Classes/Particles/Number/ParticlesNumber.js +2 -9
- package/umd/Options/Classes/Particles/Opacity/Opacity.js +10 -6
- package/umd/Options/Classes/Particles/Opacity/OpacityAnimation.js +0 -9
- package/umd/Options/Classes/Particles/ParticlesOptions.js +6 -11
- package/umd/Options/Classes/Particles/Shape/Shape.js +9 -10
- package/umd/Options/Classes/Particles/Size/Size.js +12 -8
- package/umd/Options/Classes/Particles/Size/SizeAnimation.js +0 -9
- package/umd/Options/Classes/ValueWithRandom.js +5 -18
- package/umd/Utils/CanvasUtils.js +21 -58
- package/umd/Utils/ColorUtils.js +16 -18
- package/umd/Utils/EventDispatcher.js +7 -6
- package/umd/Utils/HslColorManager.js +2 -4
- package/umd/Utils/NumberUtils.js +42 -46
- package/umd/Utils/RgbColorManager.js +2 -4
- package/umd/Utils/Utils.js +146 -66
- package/umd/bundle.js +5 -98
- package/umd/export-types.js +123 -0
- package/umd/exports.js +115 -0
- package/umd/index.js +9 -200
- package/umd/init.js +26 -0
- package/browser/Core/Utils/FrameManager.js +0 -42
- package/browser/Core/Utils/Plugins.js +0 -112
- package/browser/Options/Interfaces/Particles/Shape/IImageShape.js +0 -1
- package/browser/Options/Interfaces/Particles/Shape/IPolygonShape.js +0 -1
- package/browser/Options/Interfaces/Particles/Shape/IShapeValues.js +0 -1
- package/browser/Options/Interfaces/Particles/Shape/IStarShape.js +0 -1
- package/browser/engine.js +0 -175
- package/cjs/Core/Utils/FrameManager.js +0 -46
- package/cjs/Core/Utils/Plugins.js +0 -116
- package/cjs/Enums/Modes/SizeMode.js +0 -2
- package/cjs/Options/Interfaces/Particles/Shape/ICharacterShape.js +0 -2
- package/cjs/Options/Interfaces/Particles/Shape/IImageShape.js +0 -2
- package/cjs/Options/Interfaces/Particles/Shape/IPolygonShape.js +0 -2
- package/cjs/Options/Interfaces/Particles/Shape/IShapeValues.js +0 -17
- package/cjs/Options/Interfaces/Particles/Shape/IStarShape.js +0 -2
- package/cjs/engine.js +0 -179
- package/esm/Core/Interfaces/IParticleOverride.js +0 -1
- package/esm/Core/Interfaces/IParticlesMover.js +0 -1
- package/esm/Core/Utils/FrameManager.js +0 -42
- package/esm/Core/Utils/Plugins.js +0 -112
- package/esm/Enums/Modes/SizeMode.js +0 -1
- package/esm/Options/Interfaces/Particles/Shape/ICharacterShape.js +0 -1
- package/esm/Options/Interfaces/Particles/Shape/IImageShape.js +0 -1
- package/esm/Options/Interfaces/Particles/Shape/IPolygonShape.js +0 -1
- package/esm/Options/Interfaces/Particles/Shape/IShapeValues.js +0 -1
- package/esm/Options/Interfaces/Particles/Shape/IStarShape.js +0 -1
- package/esm/engine.js +0 -175
- package/types/Core/Interfaces/IParticleOverride.d.ts +0 -6
- package/types/Core/Interfaces/IParticlesMover.d.ts +0 -7
- package/types/Core/Utils/FrameManager.d.ts +0 -6
- package/types/Core/Utils/Plugins.d.ts +0 -51
- package/types/Options/Interfaces/Particles/Shape/ICharacterShape.d.ts +0 -8
- package/types/Options/Interfaces/Particles/Shape/IImageShape.d.ts +0 -8
- package/types/Options/Interfaces/Particles/Shape/IPolygonShape.d.ts +0 -5
- package/types/Options/Interfaces/Particles/Shape/IShapeValues.d.ts +0 -1
- package/types/Options/Interfaces/Particles/Shape/IStarShape.d.ts +0 -6
- package/types/engine.d.ts +0 -39
- package/umd/Core/Utils/FrameManager.js +0 -56
- package/umd/Core/Utils/Plugins.js +0 -126
- package/umd/Enums/Modes/SizeMode.js +0 -12
- package/umd/Options/Interfaces/Particles/Shape/ICharacterShape.js +0 -12
- package/umd/Options/Interfaces/Particles/Shape/IImageShape.js +0 -12
- package/umd/Options/Interfaces/Particles/Shape/IPolygonShape.js +0 -12
- package/umd/Options/Interfaces/Particles/Shape/IShapeValues.js +0 -27
- package/umd/Options/Interfaces/Particles/Shape/IStarShape.js +0 -12
- package/umd/engine.js +0 -189
- /package/browser/{Core/Interfaces/IParticleOverride.js → Enums/Modes/PixelMode.js} +0 -0
- /package/browser/{Core/Interfaces/IParticlesMover.js → Types/ExportResult.js} +0 -0
- /package/cjs/{Core/Interfaces/IParticleOverride.js → Enums/Modes/PixelMode.js} +0 -0
- /package/cjs/{Core/Interfaces/IParticlesMover.js → Types/ExportResult.js} +0 -0
- /package/{browser/Enums/Modes/SizeMode.js → esm/Enums/Modes/PixelMode.js} +0 -0
- /package/{browser/Options/Interfaces/Particles/Shape/ICharacterShape.js → esm/Types/ExportResult.js} +0 -0
- /package/umd/{Core/Interfaces/IParticleOverride.js → Enums/Modes/PixelMode.js} +0 -0
- /package/umd/{Core/Interfaces/IParticlesMover.js → Types/ExportResult.js} +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { isBoolean, isNumber } from "./Utils";
|
|
1
2
|
import { Vector } from "../Core/Utils/Vector";
|
|
2
3
|
let _random = Math.random;
|
|
3
4
|
const easings = new Map();
|
|
4
5
|
export function addEasing(name, easing) {
|
|
5
|
-
if (
|
|
6
|
-
|
|
6
|
+
if (easings.get(name)) {
|
|
7
|
+
return;
|
|
7
8
|
}
|
|
9
|
+
easings.set(name, easing);
|
|
8
10
|
}
|
|
9
11
|
export function getEasing(name) {
|
|
10
12
|
return easings.get(name) || ((value) => value);
|
|
@@ -30,16 +32,16 @@ export function randomInRange(r) {
|
|
|
30
32
|
return getRandom() * (max - min) + min;
|
|
31
33
|
}
|
|
32
34
|
export function getRangeValue(value) {
|
|
33
|
-
return
|
|
35
|
+
return isNumber(value) ? value : randomInRange(value);
|
|
34
36
|
}
|
|
35
37
|
export function getRangeMin(value) {
|
|
36
|
-
return
|
|
38
|
+
return isNumber(value) ? value : value.min;
|
|
37
39
|
}
|
|
38
40
|
export function getRangeMax(value) {
|
|
39
|
-
return
|
|
41
|
+
return isNumber(value) ? value : value.max;
|
|
40
42
|
}
|
|
41
43
|
export function setRangeValue(source, value) {
|
|
42
|
-
if (source === value || (value === undefined &&
|
|
44
|
+
if (source === value || (value === undefined && isNumber(source))) {
|
|
43
45
|
return source;
|
|
44
46
|
}
|
|
45
47
|
const min = getRangeMin(source), max = getRangeMax(source);
|
|
@@ -51,7 +53,7 @@ export function setRangeValue(source, value) {
|
|
|
51
53
|
: setRangeValue(min, max);
|
|
52
54
|
}
|
|
53
55
|
export function getValue(options) {
|
|
54
|
-
const random = options.random, { enable, minimumValue } =
|
|
56
|
+
const random = options.random, { enable, minimumValue } = isBoolean(random)
|
|
55
57
|
? {
|
|
56
58
|
enable: random,
|
|
57
59
|
minimumValue: 0,
|
|
@@ -67,34 +69,32 @@ export function getDistance(pointA, pointB) {
|
|
|
67
69
|
return getDistances(pointA, pointB).distance;
|
|
68
70
|
}
|
|
69
71
|
export function getParticleDirectionAngle(direction, position, center) {
|
|
70
|
-
if (
|
|
72
|
+
if (isNumber(direction)) {
|
|
71
73
|
return (direction * Math.PI) / 180;
|
|
72
74
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
return getRandom() * Math.PI * 2;
|
|
97
|
-
}
|
|
75
|
+
switch (direction) {
|
|
76
|
+
case "top":
|
|
77
|
+
return -Math.PI / 2;
|
|
78
|
+
case "top-right":
|
|
79
|
+
return -Math.PI / 4;
|
|
80
|
+
case "right":
|
|
81
|
+
return 0;
|
|
82
|
+
case "bottom-right":
|
|
83
|
+
return Math.PI / 4;
|
|
84
|
+
case "bottom":
|
|
85
|
+
return Math.PI / 2;
|
|
86
|
+
case "bottom-left":
|
|
87
|
+
return (3 * Math.PI) / 4;
|
|
88
|
+
case "left":
|
|
89
|
+
return Math.PI;
|
|
90
|
+
case "top-left":
|
|
91
|
+
return (-3 * Math.PI) / 4;
|
|
92
|
+
case "inside":
|
|
93
|
+
return Math.atan2(center.y - position.y, center.x - position.x);
|
|
94
|
+
case "outside":
|
|
95
|
+
return Math.atan2(position.y - center.y, position.x - center.x);
|
|
96
|
+
default:
|
|
97
|
+
return getRandom() * Math.PI * 2;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
export function getParticleBaseVelocity(direction) {
|
|
@@ -115,32 +115,28 @@ export function calcPositionFromSize(data) {
|
|
|
115
115
|
: undefined;
|
|
116
116
|
}
|
|
117
117
|
export function calcPositionOrRandomFromSize(data) {
|
|
118
|
-
var _a, _b, _c, _d;
|
|
119
118
|
return {
|
|
120
|
-
x: ((
|
|
121
|
-
y: ((
|
|
119
|
+
x: ((data.position?.x ?? getRandom() * 100) * data.size.width) / 100,
|
|
120
|
+
y: ((data.position?.y ?? getRandom() * 100) * data.size.height) / 100,
|
|
122
121
|
};
|
|
123
122
|
}
|
|
124
123
|
export function calcPositionOrRandomFromSizeRanged(data) {
|
|
125
|
-
var _a, _b;
|
|
126
124
|
const position = {
|
|
127
|
-
x:
|
|
128
|
-
y:
|
|
125
|
+
x: data.position?.x !== undefined ? getRangeValue(data.position.x) : undefined,
|
|
126
|
+
y: data.position?.y !== undefined ? getRangeValue(data.position.y) : undefined,
|
|
129
127
|
};
|
|
130
128
|
return calcPositionOrRandomFromSize({ size: data.size, position });
|
|
131
129
|
}
|
|
132
130
|
export function calcExactPositionOrRandomFromSize(data) {
|
|
133
|
-
var _a, _b, _c, _d;
|
|
134
131
|
return {
|
|
135
|
-
x:
|
|
136
|
-
y:
|
|
132
|
+
x: data.position?.x ?? getRandom() * data.size.width,
|
|
133
|
+
y: data.position?.y ?? getRandom() * data.size.height,
|
|
137
134
|
};
|
|
138
135
|
}
|
|
139
136
|
export function calcExactPositionOrRandomFromSizeRanged(data) {
|
|
140
|
-
var _a, _b;
|
|
141
137
|
const position = {
|
|
142
|
-
x:
|
|
143
|
-
y:
|
|
138
|
+
x: data.position?.x !== undefined ? getRangeValue(data.position.x) : undefined,
|
|
139
|
+
y: data.position?.y !== undefined ? getRangeValue(data.position.y) : undefined,
|
|
144
140
|
};
|
|
145
141
|
return calcExactPositionOrRandomFromSize({ size: data.size, position });
|
|
146
142
|
}
|
|
@@ -5,15 +5,13 @@ export class RgbColorManager {
|
|
|
5
5
|
this.stringPrefix = "rgb";
|
|
6
6
|
}
|
|
7
7
|
handleColor(color) {
|
|
8
|
-
|
|
9
|
-
const colorValue = color.value, rgbColor = (_a = colorValue.rgb) !== null && _a !== void 0 ? _a : color.value;
|
|
8
|
+
const colorValue = color.value, rgbColor = colorValue.rgb ?? color.value;
|
|
10
9
|
if (rgbColor.r !== undefined) {
|
|
11
10
|
return rgbColor;
|
|
12
11
|
}
|
|
13
12
|
}
|
|
14
13
|
handleRangeColor(color) {
|
|
15
|
-
|
|
16
|
-
const colorValue = color.value, rgbColor = (_a = colorValue.rgb) !== null && _a !== void 0 ? _a : color.value;
|
|
14
|
+
const colorValue = color.value, rgbColor = colorValue.rgb ?? color.value;
|
|
17
15
|
if (rgbColor.r !== undefined) {
|
|
18
16
|
return {
|
|
19
17
|
r: getRangeValue(rgbColor.r),
|
package/browser/Utils/Utils.js
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
import { collisionVelocity, getDistances, getRandom, getRangeMax, getRangeMin, getRangeValue, getValue, randomInRange, } from "./NumberUtils";
|
|
2
2
|
import { Vector } from "../Core/Utils/Vector";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const _logger = {
|
|
4
|
+
debug: console.debug,
|
|
5
|
+
error: console.error,
|
|
6
|
+
info: console.info,
|
|
7
|
+
log: console.log,
|
|
8
|
+
verbose: console.log,
|
|
9
|
+
warning: console.warn,
|
|
10
|
+
};
|
|
11
|
+
export function setLogger(logger) {
|
|
12
|
+
_logger.debug = logger.debug || _logger.debug;
|
|
13
|
+
_logger.error = logger.error || _logger.error;
|
|
14
|
+
_logger.info = logger.info || _logger.info;
|
|
15
|
+
_logger.log = logger.log || _logger.log;
|
|
16
|
+
_logger.verbose = logger.verbose || _logger.verbose;
|
|
17
|
+
_logger.warning = logger.warning || _logger.warning;
|
|
18
|
+
}
|
|
19
|
+
export function getLogger() {
|
|
20
|
+
return _logger;
|
|
21
|
+
}
|
|
22
|
+
function rectSideBounce(data) {
|
|
23
|
+
const res = { bounced: false }, { pSide, pOtherSide, rectSide, rectOtherSide, velocity, factor } = data;
|
|
5
24
|
if (pOtherSide.min < rectOtherSide.min ||
|
|
6
25
|
pOtherSide.min > rectOtherSide.max ||
|
|
7
26
|
pOtherSide.max < rectOtherSide.min ||
|
|
@@ -19,7 +38,7 @@ function checkSelector(element, selectors) {
|
|
|
19
38
|
const res = executeOnSingleOrMultiple(selectors, (selector) => {
|
|
20
39
|
return element.matches(selector);
|
|
21
40
|
});
|
|
22
|
-
return res
|
|
41
|
+
return isArray(res) ? res.some((t) => t) : res;
|
|
23
42
|
}
|
|
24
43
|
export function isSsr() {
|
|
25
44
|
return typeof window === "undefined" || !window || typeof window.document === "undefined" || !window.document;
|
|
@@ -33,24 +52,20 @@ export function safeMatchMedia(query) {
|
|
|
33
52
|
}
|
|
34
53
|
return matchMedia(query);
|
|
35
54
|
}
|
|
36
|
-
export function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
export function cancelAnimation() {
|
|
42
|
-
return isSsr()
|
|
43
|
-
? (handle) => clearTimeout(handle)
|
|
44
|
-
: (handle) => (cancelAnimationFrame || clearTimeout)(handle);
|
|
55
|
+
export function safeMutationObserver(callback) {
|
|
56
|
+
if (isSsr() || typeof MutationObserver === "undefined") {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
return new MutationObserver(callback);
|
|
45
60
|
}
|
|
46
61
|
export function isInArray(value, array) {
|
|
47
|
-
return value === array || (array
|
|
62
|
+
return value === array || (isArray(array) && array.indexOf(value) > -1);
|
|
48
63
|
}
|
|
49
64
|
export async function loadFont(font, weight) {
|
|
50
65
|
try {
|
|
51
|
-
await document.fonts.load(`${weight
|
|
66
|
+
await document.fonts.load(`${weight ?? "400"} 36px '${font ?? "Verdana"}'`);
|
|
52
67
|
}
|
|
53
|
-
catch
|
|
68
|
+
catch {
|
|
54
69
|
}
|
|
55
70
|
}
|
|
56
71
|
export function arrayRandomIndex(array) {
|
|
@@ -60,7 +75,7 @@ export function itemFromArray(array, index, useIndex = true) {
|
|
|
60
75
|
return array[index !== undefined && useIndex ? index % array.length : arrayRandomIndex(array)];
|
|
61
76
|
}
|
|
62
77
|
export function isPointInside(point, size, offset, radius, direction) {
|
|
63
|
-
return areBoundsInside(calculateBounds(point, radius
|
|
78
|
+
return areBoundsInside(calculateBounds(point, radius ?? 0), size, offset, direction);
|
|
64
79
|
}
|
|
65
80
|
export function areBoundsInside(bounds, size, offset, direction) {
|
|
66
81
|
let inside = true;
|
|
@@ -91,24 +106,24 @@ export function deepExtend(destination, ...sources) {
|
|
|
91
106
|
if (source === undefined || source === null) {
|
|
92
107
|
continue;
|
|
93
108
|
}
|
|
94
|
-
if (
|
|
109
|
+
if (!isObject(source)) {
|
|
95
110
|
destination = source;
|
|
96
111
|
continue;
|
|
97
112
|
}
|
|
98
113
|
const sourceIsArray = Array.isArray(source);
|
|
99
|
-
if (sourceIsArray && (
|
|
114
|
+
if (sourceIsArray && (isObject(destination) || !destination || !Array.isArray(destination))) {
|
|
100
115
|
destination = [];
|
|
101
116
|
}
|
|
102
|
-
else if (!sourceIsArray && (
|
|
117
|
+
else if (!sourceIsArray && (isObject(destination) || !destination || Array.isArray(destination))) {
|
|
103
118
|
destination = {};
|
|
104
119
|
}
|
|
105
120
|
for (const key in source) {
|
|
106
121
|
if (key === "__proto__") {
|
|
107
122
|
continue;
|
|
108
123
|
}
|
|
109
|
-
const sourceDict = source, value = sourceDict[key],
|
|
124
|
+
const sourceDict = source, value = sourceDict[key], destDict = destination;
|
|
110
125
|
destDict[key] =
|
|
111
|
-
isObject && Array.isArray(value)
|
|
126
|
+
isObject(value) && Array.isArray(value)
|
|
112
127
|
? value.map((v) => deepExtend(destDict[key], v))
|
|
113
128
|
: deepExtend(destDict[key], value);
|
|
114
129
|
}
|
|
@@ -162,18 +177,25 @@ export function circleBounce(p1, p2) {
|
|
|
162
177
|
}
|
|
163
178
|
export function rectBounce(particle, divBounds) {
|
|
164
179
|
const pPos = particle.getPosition(), size = particle.getRadius(), bounds = calculateBounds(pPos, size), resH = rectSideBounce({
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
180
|
+
pSide: {
|
|
181
|
+
min: bounds.left,
|
|
182
|
+
max: bounds.right,
|
|
183
|
+
},
|
|
184
|
+
pOtherSide: {
|
|
185
|
+
min: bounds.top,
|
|
186
|
+
max: bounds.bottom,
|
|
187
|
+
},
|
|
188
|
+
rectSide: {
|
|
189
|
+
min: divBounds.left,
|
|
190
|
+
max: divBounds.right,
|
|
191
|
+
},
|
|
192
|
+
rectOtherSide: {
|
|
193
|
+
min: divBounds.top,
|
|
194
|
+
max: divBounds.bottom,
|
|
195
|
+
},
|
|
196
|
+
velocity: particle.velocity.x,
|
|
197
|
+
factor: getValue(particle.options.bounce.horizontal),
|
|
198
|
+
});
|
|
177
199
|
if (resH.bounced) {
|
|
178
200
|
if (resH.velocity !== undefined) {
|
|
179
201
|
particle.velocity.x = resH.velocity;
|
|
@@ -183,18 +205,25 @@ export function rectBounce(particle, divBounds) {
|
|
|
183
205
|
}
|
|
184
206
|
}
|
|
185
207
|
const resV = rectSideBounce({
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
208
|
+
pSide: {
|
|
209
|
+
min: bounds.top,
|
|
210
|
+
max: bounds.bottom,
|
|
211
|
+
},
|
|
212
|
+
pOtherSide: {
|
|
213
|
+
min: bounds.left,
|
|
214
|
+
max: bounds.right,
|
|
215
|
+
},
|
|
216
|
+
rectSide: {
|
|
217
|
+
min: divBounds.top,
|
|
218
|
+
max: divBounds.bottom,
|
|
219
|
+
},
|
|
220
|
+
rectOtherSide: {
|
|
221
|
+
min: divBounds.left,
|
|
222
|
+
max: divBounds.right,
|
|
223
|
+
},
|
|
224
|
+
velocity: particle.velocity.y,
|
|
225
|
+
factor: getValue(particle.options.bounce.vertical),
|
|
226
|
+
});
|
|
198
227
|
if (resV.bounced) {
|
|
199
228
|
if (resV.velocity !== undefined) {
|
|
200
229
|
particle.velocity.y = resV.velocity;
|
|
@@ -205,27 +234,27 @@ export function rectBounce(particle, divBounds) {
|
|
|
205
234
|
}
|
|
206
235
|
}
|
|
207
236
|
export function executeOnSingleOrMultiple(obj, callback) {
|
|
208
|
-
return obj
|
|
237
|
+
return isArray(obj) ? obj.map((item, index) => callback(item, index)) : callback(obj, 0);
|
|
209
238
|
}
|
|
210
239
|
export function itemFromSingleOrMultiple(obj, index, useIndex) {
|
|
211
|
-
return obj
|
|
240
|
+
return isArray(obj) ? itemFromArray(obj, index, useIndex) : obj;
|
|
212
241
|
}
|
|
213
242
|
export function findItemFromSingleOrMultiple(obj, callback) {
|
|
214
|
-
return obj
|
|
243
|
+
return isArray(obj) ? obj.find((t, index) => callback(t, index)) : callback(obj, 0) ? obj : undefined;
|
|
215
244
|
}
|
|
216
245
|
export function initParticleNumericAnimationValue(options, pxRatio) {
|
|
217
|
-
const valueRange = options.value, animationOptions = options.animation
|
|
218
|
-
|
|
219
|
-
enable:
|
|
246
|
+
const valueRange = options.value, animationOptions = options.animation, res = {
|
|
247
|
+
delayTime: getRangeValue(animationOptions.delay) * 1000,
|
|
248
|
+
enable: animationOptions.enable,
|
|
220
249
|
value: getRangeValue(options.value) * pxRatio,
|
|
221
250
|
max: getRangeMax(valueRange) * pxRatio,
|
|
222
251
|
min: getRangeMin(valueRange) * pxRatio,
|
|
223
252
|
loops: 0,
|
|
224
|
-
maxLoops: getRangeValue(
|
|
253
|
+
maxLoops: getRangeValue(animationOptions.count),
|
|
254
|
+
time: 0,
|
|
225
255
|
};
|
|
226
256
|
if (animationOptions.enable) {
|
|
227
257
|
res.decay = 1 - getRangeValue(animationOptions.decay);
|
|
228
|
-
let autoStatus = false;
|
|
229
258
|
switch (animationOptions.mode) {
|
|
230
259
|
case "increase":
|
|
231
260
|
res.status = "increasing";
|
|
@@ -236,10 +265,8 @@ export function initParticleNumericAnimationValue(options, pxRatio) {
|
|
|
236
265
|
case "random":
|
|
237
266
|
res.status = getRandom() >= 0.5 ? "increasing" : "decreasing";
|
|
238
267
|
break;
|
|
239
|
-
case "auto":
|
|
240
|
-
autoStatus = true;
|
|
241
|
-
break;
|
|
242
268
|
}
|
|
269
|
+
const autoStatus = animationOptions.mode === "auto";
|
|
243
270
|
switch (animationOptions.startValue) {
|
|
244
271
|
case "min":
|
|
245
272
|
res.value = res.min;
|
|
@@ -247,17 +274,17 @@ export function initParticleNumericAnimationValue(options, pxRatio) {
|
|
|
247
274
|
res.status = "increasing";
|
|
248
275
|
}
|
|
249
276
|
break;
|
|
250
|
-
case "
|
|
251
|
-
res.value =
|
|
277
|
+
case "max":
|
|
278
|
+
res.value = res.max;
|
|
252
279
|
if (autoStatus) {
|
|
253
|
-
res.status =
|
|
280
|
+
res.status = "decreasing";
|
|
254
281
|
}
|
|
255
282
|
break;
|
|
256
|
-
case "
|
|
283
|
+
case "random":
|
|
257
284
|
default:
|
|
258
|
-
res.value = res
|
|
285
|
+
res.value = randomInRange(res);
|
|
259
286
|
if (autoStatus) {
|
|
260
|
-
res.status = "decreasing";
|
|
287
|
+
res.status = getRandom() >= 0.5 ? "increasing" : "decreasing";
|
|
261
288
|
}
|
|
262
289
|
break;
|
|
263
290
|
}
|
|
@@ -265,3 +292,47 @@ export function initParticleNumericAnimationValue(options, pxRatio) {
|
|
|
265
292
|
res.initialValue = res.value;
|
|
266
293
|
return res;
|
|
267
294
|
}
|
|
295
|
+
function getPositionOrSize(positionOrSize, canvasSize) {
|
|
296
|
+
const isPercent = positionOrSize.mode === "percent";
|
|
297
|
+
if (!isPercent) {
|
|
298
|
+
const { mode: _, ...rest } = positionOrSize;
|
|
299
|
+
return rest;
|
|
300
|
+
}
|
|
301
|
+
const isPosition = "x" in positionOrSize;
|
|
302
|
+
if (isPosition) {
|
|
303
|
+
return {
|
|
304
|
+
x: (positionOrSize.x / 100) * canvasSize.width,
|
|
305
|
+
y: (positionOrSize.y / 100) * canvasSize.height,
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
return {
|
|
310
|
+
width: (positionOrSize.width / 100) * canvasSize.width,
|
|
311
|
+
height: (positionOrSize.height / 100) * canvasSize.height,
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
export function getPosition(position, canvasSize) {
|
|
316
|
+
return getPositionOrSize(position, canvasSize);
|
|
317
|
+
}
|
|
318
|
+
export function getSize(size, canvasSize) {
|
|
319
|
+
return getPositionOrSize(size, canvasSize);
|
|
320
|
+
}
|
|
321
|
+
export function isBoolean(arg) {
|
|
322
|
+
return typeof arg === "boolean";
|
|
323
|
+
}
|
|
324
|
+
export function isString(arg) {
|
|
325
|
+
return typeof arg === "string";
|
|
326
|
+
}
|
|
327
|
+
export function isNumber(arg) {
|
|
328
|
+
return typeof arg === "number";
|
|
329
|
+
}
|
|
330
|
+
export function isFunction(arg) {
|
|
331
|
+
return typeof arg === "function";
|
|
332
|
+
}
|
|
333
|
+
export function isObject(arg) {
|
|
334
|
+
return typeof arg === "object" && arg !== null;
|
|
335
|
+
}
|
|
336
|
+
export function isArray(arg) {
|
|
337
|
+
return Array.isArray(arg);
|
|
338
|
+
}
|
package/browser/bundle.js
CHANGED
|
@@ -1,98 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const rgbColorManager = new RgbColorManager(), hslColorManager = new HslColorManager();
|
|
6
|
-
addColorManager(rgbColorManager);
|
|
7
|
-
addColorManager(hslColorManager);
|
|
8
|
-
const tsParticles = new Engine();
|
|
9
|
-
export * from "./Core/Utils/Circle";
|
|
10
|
-
export * from "./Core/Utils/Constants";
|
|
11
|
-
export * from "./Core/Utils/ExternalInteractorBase";
|
|
12
|
-
export * from "./Core/Utils/ParticlesInteractorBase";
|
|
13
|
-
export * from "./Core/Utils/Point";
|
|
14
|
-
export * from "./Core/Utils/Range";
|
|
15
|
-
export * from "./Core/Utils/Rectangle";
|
|
16
|
-
export * from "./Core/Utils/Vector";
|
|
17
|
-
export * from "./Core/Utils/Vector3d";
|
|
18
|
-
export * from "./Enums/Directions/MoveDirection";
|
|
19
|
-
export * from "./Enums/Directions/RotateDirection";
|
|
20
|
-
export * from "./Enums/Directions/OutModeDirection";
|
|
21
|
-
export * from "./Enums/Modes/AnimationMode";
|
|
22
|
-
export * from "./Enums/Modes/ClickMode";
|
|
23
|
-
export * from "./Enums/Modes/DivMode";
|
|
24
|
-
export * from "./Enums/Modes/HoverMode";
|
|
25
|
-
export * from "./Enums/Modes/CollisionMode";
|
|
26
|
-
export * from "./Enums/Modes/OutMode";
|
|
27
|
-
export * from "./Enums/Modes/SizeMode";
|
|
28
|
-
export * from "./Enums/Modes/ThemeMode";
|
|
29
|
-
export * from "./Enums/Modes/ResponsiveMode";
|
|
30
|
-
export * from "./Enums/Types/AlterType";
|
|
31
|
-
export * from "./Enums/Types/DestroyType";
|
|
32
|
-
export * from "./Enums/Types/GradientType";
|
|
33
|
-
export * from "./Enums/Types/InteractorType";
|
|
34
|
-
export * from "./Enums/Types/ParticleOutType";
|
|
35
|
-
export * from "./Enums/Types/StartValueType";
|
|
36
|
-
export * from "./Enums/Types/DivType";
|
|
37
|
-
export * from "./Enums/Types/EasingType";
|
|
38
|
-
export * from "./Enums/AnimationStatus";
|
|
39
|
-
export * from "./Enums/InteractivityDetect";
|
|
40
|
-
export * from "./Options/Classes/AnimatableColor";
|
|
41
|
-
export * from "./Options/Classes/AnimationOptions";
|
|
42
|
-
export * from "./Options/Classes/Background/Background";
|
|
43
|
-
export * from "./Options/Classes/BackgroundMask/BackgroundMask";
|
|
44
|
-
export * from "./Options/Classes/BackgroundMask/BackgroundMaskCover";
|
|
45
|
-
export * from "./Options/Classes/ColorAnimation";
|
|
46
|
-
export * from "./Options/Classes/FullScreen/FullScreen";
|
|
47
|
-
export * from "./Options/Classes/HslAnimation";
|
|
48
|
-
export * from "./Options/Classes/Interactivity/Events/ClickEvent";
|
|
49
|
-
export * from "./Options/Classes/Interactivity/Events/DivEvent";
|
|
50
|
-
export * from "./Options/Classes/Interactivity/Events/ClickEvent";
|
|
51
|
-
export * from "./Options/Classes/Interactivity/Events/DivEvent";
|
|
52
|
-
export * from "./Options/Classes/Interactivity/Events/Events";
|
|
53
|
-
export * from "./Options/Classes/Interactivity/Events/HoverEvent";
|
|
54
|
-
export * from "./Options/Classes/Interactivity/Events/Parallax";
|
|
55
|
-
export * from "./Options/Classes/Interactivity/Events/ResizeEvent";
|
|
56
|
-
export * from "./Options/Classes/Interactivity/Interactivity";
|
|
57
|
-
export * from "./Options/Classes/Interactivity/Modes/Modes";
|
|
58
|
-
export * from "./Options/Classes/ManualParticle";
|
|
59
|
-
export * from "./Options/Classes/Options";
|
|
60
|
-
export * from "./Options/Classes/OptionsColor";
|
|
61
|
-
export * from "./Options/Classes/Particles/Bounce/ParticlesBounce";
|
|
62
|
-
export * from "./Options/Classes/Particles/Bounce/ParticlesBounceFactor";
|
|
63
|
-
export * from "./Options/Classes/Particles/Collisions/Collisions";
|
|
64
|
-
export * from "./Options/Classes/Particles/Collisions/CollisionsAbsorb";
|
|
65
|
-
export * from "./Options/Classes/Particles/Collisions/CollisionsOverlap";
|
|
66
|
-
export * from "./Options/Classes/Particles/ParticlesOptions";
|
|
67
|
-
export * from "./Options/Classes/Particles/Shadow";
|
|
68
|
-
export * from "./Options/Classes/Particles/Stroke";
|
|
69
|
-
export * from "./Options/Classes/Particles/Move/MoveAttract";
|
|
70
|
-
export * from "./Options/Classes/Particles/Move/Move";
|
|
71
|
-
export * from "./Options/Classes/Particles/Move/MoveAngle";
|
|
72
|
-
export * from "./Options/Classes/Particles/Move/MoveCenter";
|
|
73
|
-
export * from "./Options/Classes/Particles/Move/MoveGravity";
|
|
74
|
-
export * from "./Options/Classes/Particles/Move/MoveTrail";
|
|
75
|
-
export * from "./Options/Classes/Particles/Move/MoveTrailFill";
|
|
76
|
-
export * from "./Options/Classes/Particles/Move/OutModes";
|
|
77
|
-
export * from "./Options/Classes/Particles/Move/Path/MovePath";
|
|
78
|
-
export * from "./Options/Classes/Particles/Move/Spin";
|
|
79
|
-
export * from "./Options/Classes/Particles/Number/ParticlesNumber";
|
|
80
|
-
export * from "./Options/Classes/Particles/Number/ParticlesDensity";
|
|
81
|
-
export * from "./Options/Classes/Particles/Opacity/Opacity";
|
|
82
|
-
export * from "./Options/Classes/Particles/Opacity/OpacityAnimation";
|
|
83
|
-
export * from "./Options/Classes/Particles/Shape/Shape";
|
|
84
|
-
export * from "./Options/Classes/Particles/Size/Size";
|
|
85
|
-
export * from "./Options/Classes/Particles/Size/SizeAnimation";
|
|
86
|
-
export * from "./Options/Classes/Particles/ZIndex/ZIndex";
|
|
87
|
-
export * from "./Options/Classes/Responsive";
|
|
88
|
-
export * from "./Options/Classes/Theme/Theme";
|
|
89
|
-
export * from "./Options/Classes/Theme/ThemeDefault";
|
|
90
|
-
export * from "./Options/Classes/ValueWithRandom";
|
|
91
|
-
export * from "./Utils/CanvasUtils";
|
|
92
|
-
export * from "./Utils/ColorUtils";
|
|
93
|
-
export * from "./Utils/HslColorManager";
|
|
94
|
-
export * from "./Utils/NumberUtils";
|
|
95
|
-
export * from "./Utils/OptionsUtils";
|
|
96
|
-
export * from "./Utils/RgbColorManager";
|
|
97
|
-
export * from "./Utils/Utils";
|
|
1
|
+
import { init } from "./init";
|
|
2
|
+
const tsParticles = init();
|
|
3
|
+
window.tsParticles = tsParticles;
|
|
4
|
+
export * from "./exports";
|
|
98
5
|
export { tsParticles };
|