@tsparticles/engine 4.0.0-alpha.8 → 4.0.0-beta.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/155.min.js +1 -0
- package/README.md +41 -28
- package/browser/Core/CanvasManager.js +303 -0
- package/browser/Core/Container.js +134 -101
- package/browser/Core/Engine.js +29 -162
- package/browser/Core/Particle.js +197 -183
- package/browser/Core/ParticlesManager.js +363 -0
- package/browser/Core/RenderManager.js +303 -0
- package/browser/Core/Retina.js +6 -6
- package/browser/Core/Utils/Constants.js +2 -2
- package/browser/Core/Utils/EventListeners.js +67 -63
- package/browser/Core/Utils/PluginManager.js +145 -0
- package/browser/Core/Utils/Ranges.js +29 -10
- package/browser/Core/Utils/SpatialHashGrid.js +102 -0
- package/browser/Core/Utils/Vectors.js +17 -18
- 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 +12 -1
- package/browser/Options/Classes/FullScreen/FullScreen.js +2 -0
- package/browser/Options/Classes/HslAnimation.js +4 -5
- package/browser/Options/Classes/Options.js +67 -8
- 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 +3 -4
- package/browser/Options/Classes/Particles/Fill.js +28 -0
- package/browser/Options/Classes/Particles/Move/Move.js +17 -3
- package/browser/Options/Classes/Particles/Move/MoveAngle.js +2 -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 +29 -9
- package/browser/Options/Classes/Particles/Shape/Shape.js +3 -4
- 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/browser/Options/Classes/ResizeEvent.js +2 -0
- package/browser/Options/Classes/ValueWithRandom.js +3 -4
- package/browser/Utils/CanvasUtils.js +44 -51
- package/browser/Utils/ColorUtils.js +51 -40
- package/browser/Utils/EventDispatcher.js +1 -0
- package/browser/Utils/LogUtils.js +1 -0
- package/browser/Utils/MathUtils.js +12 -7
- package/browser/Utils/OptionsUtils.js +2 -2
- package/browser/Utils/Utils.js +109 -31
- package/browser/exports.js +1 -2
- package/cjs/Core/CanvasManager.js +303 -0
- package/cjs/Core/Container.js +134 -101
- package/cjs/Core/Engine.js +29 -162
- package/cjs/Core/Particle.js +197 -183
- package/cjs/Core/ParticlesManager.js +363 -0
- package/cjs/Core/RenderManager.js +303 -0
- package/cjs/Core/Retina.js +6 -6
- package/cjs/Core/Utils/Constants.js +2 -2
- package/cjs/Core/Utils/EventListeners.js +67 -63
- package/cjs/Core/Utils/PluginManager.js +145 -0
- package/cjs/Core/Utils/Ranges.js +29 -10
- package/cjs/Core/Utils/SpatialHashGrid.js +102 -0
- package/cjs/Core/Utils/Vectors.js +17 -18
- 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 +12 -1
- package/cjs/Options/Classes/FullScreen/FullScreen.js +2 -0
- package/cjs/Options/Classes/HslAnimation.js +4 -5
- package/cjs/Options/Classes/Options.js +67 -8
- 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 +3 -4
- package/cjs/Options/Classes/Particles/Fill.js +28 -0
- package/cjs/Options/Classes/Particles/Move/Move.js +17 -3
- package/cjs/Options/Classes/Particles/Move/MoveAngle.js +2 -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 +29 -9
- package/cjs/Options/Classes/Particles/Shape/Shape.js +3 -4
- 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/ResizeEvent.js +2 -0
- package/cjs/Options/Classes/ValueWithRandom.js +3 -4
- package/cjs/Utils/CanvasUtils.js +44 -51
- package/cjs/Utils/ColorUtils.js +51 -40
- package/cjs/Utils/EventDispatcher.js +1 -0
- package/cjs/Utils/LogUtils.js +1 -0
- package/cjs/Utils/MathUtils.js +12 -7
- package/cjs/Utils/OptionsUtils.js +2 -2
- package/cjs/Utils/Utils.js +109 -31
- package/cjs/exports.js +1 -2
- package/dist_browser_Core_Container_js.js +30 -20
- package/esm/Core/CanvasManager.js +303 -0
- package/esm/Core/Container.js +134 -101
- package/esm/Core/Engine.js +29 -162
- package/esm/Core/Particle.js +197 -183
- package/esm/Core/ParticlesManager.js +363 -0
- package/esm/Core/RenderManager.js +303 -0
- package/esm/Core/Retina.js +6 -6
- package/esm/Core/Utils/Constants.js +2 -2
- package/esm/Core/Utils/EventListeners.js +67 -63
- package/esm/Core/Utils/PluginManager.js +145 -0
- package/esm/Core/Utils/Ranges.js +29 -10
- package/esm/Core/Utils/SpatialHashGrid.js +102 -0
- package/esm/Core/Utils/Vectors.js +17 -18
- 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 +12 -1
- package/esm/Options/Classes/FullScreen/FullScreen.js +2 -0
- package/esm/Options/Classes/HslAnimation.js +4 -5
- package/esm/Options/Classes/Options.js +67 -8
- 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 +3 -4
- package/esm/Options/Classes/Particles/Fill.js +28 -0
- package/esm/Options/Classes/Particles/Move/Move.js +17 -3
- package/esm/Options/Classes/Particles/Move/MoveAngle.js +2 -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 +29 -9
- package/esm/Options/Classes/Particles/Shape/Shape.js +3 -4
- 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/esm/Options/Classes/ResizeEvent.js +2 -0
- package/esm/Options/Classes/ValueWithRandom.js +3 -4
- package/esm/Utils/CanvasUtils.js +44 -51
- package/esm/Utils/ColorUtils.js +51 -40
- package/esm/Utils/EventDispatcher.js +1 -0
- package/esm/Utils/LogUtils.js +1 -0
- package/esm/Utils/MathUtils.js +12 -7
- package/esm/Utils/OptionsUtils.js +2 -2
- package/esm/Utils/Utils.js +109 -31
- package/esm/exports.js +1 -2
- package/package.json +1 -1
- package/report.html +84 -29
- package/scripts/install.js +4 -20
- package/tsparticles.engine.js +98 -86
- package/tsparticles.engine.min.js +2 -2
- package/types/Core/CanvasManager.d.ts +39 -0
- package/types/Core/Container.d.ts +29 -14
- package/types/Core/Engine.d.ts +2 -61
- package/types/Core/Interfaces/IColorManager.d.ts +0 -1
- package/types/Core/Interfaces/IContainerPlugin.d.ts +10 -8
- package/types/Core/Interfaces/IDrawParticleParams.d.ts +2 -1
- package/types/Core/Interfaces/IPalette.d.ts +7 -0
- package/types/Core/Interfaces/IParticleOpacityData.d.ts +1 -0
- package/types/Core/Interfaces/IParticleRetinaProps.d.ts +4 -4
- package/types/Core/Interfaces/IParticleUpdater.d.ts +2 -1
- package/types/Core/Interfaces/IParticleValueAnimation.d.ts +3 -3
- package/types/Core/Interfaces/IShapeDrawData.d.ts +10 -1
- package/types/Core/Interfaces/IShapeDrawer.d.ts +0 -1
- package/types/Core/Interfaces/IShapeValues.d.ts +0 -1
- package/types/Core/Particle.d.ts +7 -11
- package/types/Core/{Particles.d.ts → ParticlesManager.d.ts} +15 -14
- package/types/Core/RenderManager.d.ts +49 -0
- package/types/Core/Retina.d.ts +0 -2
- package/types/Core/Utils/Constants.d.ts +2 -2
- package/types/Core/Utils/PluginManager.d.ts +62 -0
- package/types/Core/Utils/Ranges.d.ts +4 -1
- package/types/Core/Utils/SpatialHashGrid.d.ts +25 -0
- package/types/Core/Utils/Vectors.d.ts +8 -10
- package/types/Options/Classes/ColorAnimation.d.ts +3 -1
- package/types/Options/Classes/HslAnimation.d.ts +3 -4
- package/types/Options/Classes/Options.d.ts +5 -3
- package/types/Options/Classes/Particles/Effect/Effect.d.ts +0 -1
- package/types/Options/Classes/Particles/Fill.d.ts +12 -0
- package/types/Options/Classes/Particles/Move/Move.d.ts +0 -2
- package/types/Options/Classes/Particles/ParticlesOptions.d.ts +5 -5
- package/types/Options/Classes/Particles/Shape/Shape.d.ts +0 -1
- package/types/Options/Classes/ValueWithRandom.d.ts +0 -1
- package/types/Options/Interfaces/IColorAnimation.d.ts +2 -0
- package/types/Options/Interfaces/IOptions.d.ts +1 -0
- package/types/Options/Interfaces/Particles/Effect/IEffect.d.ts +0 -1
- package/types/Options/Interfaces/Particles/IFill.d.ts +9 -0
- package/types/Options/Interfaces/Particles/IParticlesOptions.d.ts +2 -2
- package/types/Options/Interfaces/Particles/IStroke.d.ts +2 -2
- package/types/Options/Interfaces/Particles/Move/IMove.d.ts +0 -2
- package/types/Options/Interfaces/Particles/Shape/IShape.d.ts +0 -1
- package/types/Types/CanvasContextType.d.ts +1 -0
- package/types/Types/EngineInitializers.d.ts +6 -3
- package/types/Utils/CanvasUtils.d.ts +13 -16
- package/types/Utils/ColorUtils.d.ts +11 -10
- package/types/Utils/LogUtils.d.ts +1 -0
- package/types/Utils/MathUtils.d.ts +2 -0
- package/types/Utils/OptionsUtils.d.ts +2 -2
- package/types/Utils/Utils.d.ts +8 -1
- package/types/export-types.d.ts +7 -7
- package/types/exports.d.ts +1 -2
- package/umd/Core/CanvasManager.js +317 -0
- package/umd/Core/Container.js +134 -101
- package/umd/Core/Engine.js +28 -161
- package/umd/Core/Particle.js +198 -184
- package/umd/Core/{Particles.js → ParticlesManager.js} +186 -167
- package/umd/Core/RenderManager.js +317 -0
- package/umd/Core/Retina.js +6 -6
- package/umd/Core/Utils/Constants.js +3 -3
- package/umd/Core/Utils/EventListeners.js +67 -63
- package/umd/Core/Utils/PluginManager.js +159 -0
- package/umd/Core/Utils/Ranges.js +28 -9
- package/umd/Core/Utils/SpatialHashGrid.js +116 -0
- package/umd/Core/Utils/Vectors.js +17 -18
- 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 +12 -1
- package/umd/Options/Classes/FullScreen/FullScreen.js +2 -0
- package/umd/Options/Classes/HslAnimation.js +5 -6
- package/umd/Options/Classes/Options.js +67 -8
- 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 +3 -4
- package/umd/Options/Classes/Particles/Fill.js +42 -0
- package/umd/Options/Classes/Particles/Move/Move.js +18 -4
- package/umd/Options/Classes/Particles/Move/MoveAngle.js +2 -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 +30 -10
- package/umd/Options/Classes/Particles/Shape/Shape.js +3 -4
- 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/ResizeEvent.js +2 -0
- package/umd/Options/Classes/ValueWithRandom.js +3 -4
- package/umd/Utils/CanvasUtils.js +44 -53
- package/umd/Utils/ColorUtils.js +51 -39
- package/umd/Utils/EventDispatcher.js +1 -0
- package/umd/Utils/LogUtils.js +1 -0
- package/umd/Utils/MathUtils.js +14 -7
- package/umd/Utils/OptionsUtils.js +2 -2
- package/umd/Utils/Utils.js +111 -32
- package/umd/exports.js +2 -3
- package/794.min.js +0 -2
- package/794.min.js.LICENSE.txt +0 -1
- package/browser/Core/Canvas.js +0 -469
- package/browser/Core/Particles.js +0 -344
- package/browser/Core/Utils/Point.js +0 -6
- package/browser/Core/Utils/QuadTree.js +0 -59
- package/browser/Options/Classes/Particles/Move/MoveAttract.js +0 -33
- package/cjs/Core/Canvas.js +0 -469
- package/cjs/Core/Particles.js +0 -344
- package/cjs/Core/Utils/Point.js +0 -6
- package/cjs/Core/Utils/QuadTree.js +0 -59
- package/cjs/Options/Classes/Particles/Move/MoveAttract.js +0 -33
- package/esm/Core/Canvas.js +0 -469
- package/esm/Core/Particles.js +0 -344
- package/esm/Core/Utils/Point.js +0 -6
- package/esm/Core/Utils/QuadTree.js +0 -59
- package/esm/Options/Classes/Particles/Move/MoveAttract.js +0 -33
- package/tsparticles.engine.min.js.LICENSE.txt +0 -1
- package/types/Core/Canvas.d.ts +0 -55
- package/types/Core/Interfaces/IMovePathGenerator.d.ts +0 -10
- package/types/Core/Interfaces/IParticleMover.d.ts +0 -7
- package/types/Core/Utils/Point.d.ts +0 -7
- package/types/Core/Utils/QuadTree.d.ts +0 -18
- package/types/Options/Classes/Particles/Move/MoveAttract.d.ts +0 -12
- package/types/Options/Interfaces/Particles/Move/IMoveAttract.d.ts +0 -7
- package/umd/Core/Canvas.js +0 -483
- package/umd/Core/Utils/Point.js +0 -20
- package/umd/Core/Utils/QuadTree.js +0 -73
- package/umd/Options/Classes/Particles/Move/MoveAttract.js +0 -47
- /package/browser/Core/Interfaces/{IMovePathGenerator.js → IPalette.js} +0 -0
- /package/browser/{Core/Interfaces/IParticleMover.js → Options/Interfaces/Particles/IFill.js} +0 -0
- /package/browser/{Options/Interfaces/Particles/Move/IMoveAttract.js → Types/CanvasContextType.js} +0 -0
- /package/cjs/Core/Interfaces/{IMovePathGenerator.js → IPalette.js} +0 -0
- /package/cjs/{Core/Interfaces/IParticleMover.js → Options/Interfaces/Particles/IFill.js} +0 -0
- /package/cjs/{Options/Interfaces/Particles/Move/IMoveAttract.js → Types/CanvasContextType.js} +0 -0
- /package/esm/Core/Interfaces/{IMovePathGenerator.js → IPalette.js} +0 -0
- /package/esm/{Core/Interfaces/IParticleMover.js → Options/Interfaces/Particles/IFill.js} +0 -0
- /package/esm/{Options/Interfaces/Particles/Move/IMoveAttract.js → Types/CanvasContextType.js} +0 -0
- /package/umd/Core/Interfaces/{IMovePathGenerator.js → IPalette.js} +0 -0
- /package/umd/{Core/Interfaces/IParticleMover.js → Options/Interfaces/Particles/IFill.js} +0 -0
- /package/umd/{Options/Interfaces/Particles/Move/IMoveAttract.js → Types/CanvasContextType.js} +0 -0
package/browser/Utils/Utils.js
CHANGED
|
@@ -8,16 +8,70 @@ import { OutModeDirection } from "../Enums/Directions/OutModeDirection.js";
|
|
|
8
8
|
import { PixelMode } from "../Enums/Modes/PixelMode.js";
|
|
9
9
|
import { StartValueType } from "../Enums/Types/StartValueType.js";
|
|
10
10
|
import { Vector } from "../Core/Utils/Vectors.js";
|
|
11
|
-
const minRadius = 0;
|
|
12
|
-
function memoize(fn) {
|
|
13
|
-
const cache = new Map()
|
|
11
|
+
const minRadius = 0, minMemoizeSize = 0;
|
|
12
|
+
export function memoize(fn, options) {
|
|
13
|
+
const cache = new Map(), maxSize = options?.maxSize, ttlMs = options?.ttlMs, keyFn = options?.keyFn, stableStringify = (obj, seen = new WeakSet()) => {
|
|
14
|
+
if (obj === null) {
|
|
15
|
+
return "null";
|
|
16
|
+
}
|
|
17
|
+
const t = typeof obj;
|
|
18
|
+
if (t === "undefined") {
|
|
19
|
+
return "undefined";
|
|
20
|
+
}
|
|
21
|
+
if (t === "number" || t === "boolean" || t === "string") {
|
|
22
|
+
return JSON.stringify(obj);
|
|
23
|
+
}
|
|
24
|
+
if (t === "function") {
|
|
25
|
+
try {
|
|
26
|
+
const fn = obj;
|
|
27
|
+
return fn.toString();
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return '"[Function]"';
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (t === "symbol") {
|
|
34
|
+
try {
|
|
35
|
+
return obj.toString();
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return '"[Symbol]"';
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (Array.isArray(obj)) {
|
|
42
|
+
return `[${obj.map(i => stableStringify(i, seen)).join(",")}]`;
|
|
43
|
+
}
|
|
44
|
+
if (seen.has(obj)) {
|
|
45
|
+
return '"[Circular]"';
|
|
46
|
+
}
|
|
47
|
+
seen.add(obj);
|
|
48
|
+
const keys = Object.keys(obj).sort();
|
|
49
|
+
return `{${keys.map(k => `${JSON.stringify(k)}:${stableStringify(obj[k], seen)}`).join(",")}}`;
|
|
50
|
+
}, defaultKeyer = (args) => stableStringify(args), makeKey = (args) => (keyFn ? keyFn(args) : defaultKeyer(args)), ensureBounds = () => {
|
|
51
|
+
if (typeof maxSize === "number" && maxSize >= minMemoizeSize) {
|
|
52
|
+
while (cache.size > maxSize) {
|
|
53
|
+
const firstKey = cache.keys().next().value;
|
|
54
|
+
if (firstKey === undefined)
|
|
55
|
+
break;
|
|
56
|
+
cache.delete(firstKey);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
14
60
|
return (...args) => {
|
|
15
|
-
const key =
|
|
16
|
-
if (
|
|
17
|
-
|
|
61
|
+
const key = makeKey(args), now = Date.now(), entry = cache.get(key);
|
|
62
|
+
if (entry !== undefined) {
|
|
63
|
+
if (ttlMs && now - entry.ts > ttlMs) {
|
|
64
|
+
cache.delete(key);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
cache.delete(key);
|
|
68
|
+
cache.set(key, { value: entry.value, ts: entry.ts });
|
|
69
|
+
return entry.value;
|
|
70
|
+
}
|
|
18
71
|
}
|
|
19
72
|
const result = fn(...args);
|
|
20
|
-
cache.set(key, result);
|
|
73
|
+
cache.set(key, { value: result, ts: now });
|
|
74
|
+
ensureBounds();
|
|
21
75
|
return result;
|
|
22
76
|
};
|
|
23
77
|
}
|
|
@@ -48,13 +102,6 @@ export function safeMutationObserver(callback) {
|
|
|
48
102
|
export function isInArray(value, array) {
|
|
49
103
|
return value === array || (isArray(array) && array.includes(value));
|
|
50
104
|
}
|
|
51
|
-
export async function loadFont(font, weight) {
|
|
52
|
-
try {
|
|
53
|
-
await safeDocument().fonts.load(`${weight ?? "400"} 36px '${font ?? "Verdana"}'`);
|
|
54
|
-
}
|
|
55
|
-
catch {
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
105
|
export function arrayRandomIndex(array) {
|
|
59
106
|
return Math.floor(getRandom() * array.length);
|
|
60
107
|
}
|
|
@@ -90,33 +137,48 @@ export function calculateBounds(point, radius) {
|
|
|
90
137
|
}
|
|
91
138
|
export function deepExtend(destination, ...sources) {
|
|
92
139
|
for (const source of sources) {
|
|
93
|
-
if (source
|
|
140
|
+
if (isNull(source)) {
|
|
94
141
|
continue;
|
|
95
142
|
}
|
|
96
143
|
if (!isObject(source)) {
|
|
97
144
|
destination = source;
|
|
98
145
|
continue;
|
|
99
146
|
}
|
|
100
|
-
|
|
101
|
-
if (sourceIsArray) {
|
|
147
|
+
if (Array.isArray(source)) {
|
|
102
148
|
if (!Array.isArray(destination)) {
|
|
103
149
|
destination = [];
|
|
104
150
|
}
|
|
105
151
|
}
|
|
106
|
-
else {
|
|
107
|
-
|
|
108
|
-
|
|
152
|
+
else if (!isObject(destination) || Array.isArray(destination)) {
|
|
153
|
+
destination = {};
|
|
154
|
+
}
|
|
155
|
+
const sourceKeys = Object.keys(source), dangerousKeys = new Set(["__proto__", "constructor", "prototype"]), hasNested = sourceKeys.some(k => {
|
|
156
|
+
const v = source[k];
|
|
157
|
+
return isObject(v) || Array.isArray(v);
|
|
158
|
+
});
|
|
159
|
+
if (!hasNested) {
|
|
160
|
+
const sourceDict = source, destDict = destination;
|
|
161
|
+
for (const key of sourceKeys) {
|
|
162
|
+
if (dangerousKeys.has(key)) {
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
if (key in sourceDict) {
|
|
166
|
+
const v = sourceDict[key];
|
|
167
|
+
if (v !== undefined) {
|
|
168
|
+
destDict[key] = v;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
109
171
|
}
|
|
172
|
+
continue;
|
|
110
173
|
}
|
|
111
|
-
for (const key
|
|
112
|
-
if (key
|
|
174
|
+
for (const key of sourceKeys) {
|
|
175
|
+
if (dangerousKeys.has(key)) {
|
|
113
176
|
continue;
|
|
114
177
|
}
|
|
115
|
-
const sourceDict = source, value = sourceDict[key]
|
|
116
|
-
destDict[key] =
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
: deepExtend(destDict[key], value);
|
|
178
|
+
const sourceDict = source, destDict = destination, value = sourceDict[key];
|
|
179
|
+
destDict[key] = Array.isArray(value)
|
|
180
|
+
? value.map(v => deepExtend(undefined, v))
|
|
181
|
+
: deepExtend(destDict[key], value);
|
|
120
182
|
}
|
|
121
183
|
}
|
|
122
184
|
return destination;
|
|
@@ -178,6 +240,8 @@ export function initParticleNumericAnimationValue(options, pxRatio) {
|
|
|
178
240
|
case AnimationMode.random:
|
|
179
241
|
res.status = getRandom() >= half ? AnimationStatus.increasing : AnimationStatus.decreasing;
|
|
180
242
|
break;
|
|
243
|
+
default:
|
|
244
|
+
break;
|
|
181
245
|
}
|
|
182
246
|
const autoStatus = animationOptions.mode === AnimationMode.auto;
|
|
183
247
|
switch (animationOptions.startValue) {
|
|
@@ -243,6 +307,8 @@ function checkDestroy(particle, destroyType, value, minValue, maxValue) {
|
|
|
243
307
|
particle.destroy();
|
|
244
308
|
}
|
|
245
309
|
break;
|
|
310
|
+
default:
|
|
311
|
+
break;
|
|
246
312
|
}
|
|
247
313
|
}
|
|
248
314
|
export function updateAnimation(particle, data, changeDirection, destroyType, delta) {
|
|
@@ -290,6 +356,9 @@ export function updateAnimation(particle, data, changeDirection, destroyType, de
|
|
|
290
356
|
else {
|
|
291
357
|
data.value -= velocity;
|
|
292
358
|
}
|
|
359
|
+
break;
|
|
360
|
+
default:
|
|
361
|
+
break;
|
|
293
362
|
}
|
|
294
363
|
if (data.velocity && decay !== identity) {
|
|
295
364
|
data.velocity *= decay;
|
|
@@ -301,7 +370,7 @@ export function cloneStyle(style) {
|
|
|
301
370
|
const clonedStyle = safeDocument().createElement("div").style;
|
|
302
371
|
for (const key in style) {
|
|
303
372
|
const styleKey = style[key];
|
|
304
|
-
if (!
|
|
373
|
+
if (!(key in style) || isNull(styleKey)) {
|
|
305
374
|
continue;
|
|
306
375
|
}
|
|
307
376
|
const styleValue = style.getPropertyValue?.(styleKey);
|
|
@@ -309,11 +378,11 @@ export function cloneStyle(style) {
|
|
|
309
378
|
continue;
|
|
310
379
|
}
|
|
311
380
|
const stylePriority = style.getPropertyPriority?.(styleKey);
|
|
312
|
-
if (
|
|
313
|
-
clonedStyle.setProperty(styleKey, styleValue);
|
|
381
|
+
if (stylePriority) {
|
|
382
|
+
clonedStyle.setProperty(styleKey, styleValue, stylePriority);
|
|
314
383
|
}
|
|
315
384
|
else {
|
|
316
|
-
clonedStyle.setProperty(styleKey, styleValue
|
|
385
|
+
clonedStyle.setProperty(styleKey, styleValue);
|
|
317
386
|
}
|
|
318
387
|
}
|
|
319
388
|
return clonedStyle;
|
|
@@ -365,3 +434,12 @@ export async function getItemsFromInitializer(container, map, initializers, forc
|
|
|
365
434
|
}
|
|
366
435
|
return res;
|
|
367
436
|
}
|
|
437
|
+
export async function getItemMapFromInitializer(container, map, initializers, force = false) {
|
|
438
|
+
let res = map.get(container);
|
|
439
|
+
if (!res || force) {
|
|
440
|
+
const entries = await Promise.all([...initializers.entries()].map(([key, initializer]) => initializer(container).then(item => [key, item])));
|
|
441
|
+
res = new Map(entries);
|
|
442
|
+
map.set(container, res);
|
|
443
|
+
}
|
|
444
|
+
return res;
|
|
445
|
+
}
|
package/browser/exports.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from "./Core/Utils/Constants.js";
|
|
2
|
-
export * from "./Core/Utils/Point.js";
|
|
3
2
|
export * from "./Core/Utils/Ranges.js";
|
|
4
3
|
export * from "./Core/Utils/Vectors.js";
|
|
5
4
|
export * from "./Enums/Directions/MoveDirection.js";
|
|
@@ -28,8 +27,8 @@ export * from "./Options/Classes/OptionsColor.js";
|
|
|
28
27
|
export * from "./Options/Classes/Particles/Bounce/ParticlesBounce.js";
|
|
29
28
|
export * from "./Options/Classes/Particles/Bounce/ParticlesBounceFactor.js";
|
|
30
29
|
export * from "./Options/Classes/Particles/ParticlesOptions.js";
|
|
30
|
+
export * from "./Options/Classes/Particles/Fill.js";
|
|
31
31
|
export * from "./Options/Classes/Particles/Stroke.js";
|
|
32
|
-
export * from "./Options/Classes/Particles/Move/MoveAttract.js";
|
|
33
32
|
export * from "./Options/Classes/Particles/Move/Move.js";
|
|
34
33
|
export * from "./Options/Classes/Particles/Move/MoveAngle.js";
|
|
35
34
|
export * from "./Options/Classes/Particles/Move/MoveCenter.js";
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import { cloneStyle, getFullScreenStyle, safeMatchMedia, safeMutationObserver } from "../Utils/Utils.js";
|
|
2
|
+
import { defaultZoom, generatedAttribute, half } from "./Utils/Constants.js";
|
|
3
|
+
import { getStyleFromRgb, rangeColorToRgb } from "../Utils/ColorUtils.js";
|
|
4
|
+
import { RenderManager } from "./RenderManager.js";
|
|
5
|
+
function setStyle(canvas, style, important = false) {
|
|
6
|
+
if (!style) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const element = canvas, elementStyle = element.style, keys = new Set();
|
|
10
|
+
for (let i = 0; i < elementStyle.length; i++) {
|
|
11
|
+
const key = elementStyle.item(i);
|
|
12
|
+
if (!key) {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
keys.add(key);
|
|
16
|
+
}
|
|
17
|
+
for (let i = 0; i < style.length; i++) {
|
|
18
|
+
const key = style.item(i);
|
|
19
|
+
if (!key) {
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
keys.add(key);
|
|
23
|
+
}
|
|
24
|
+
for (const key of keys) {
|
|
25
|
+
const value = style.getPropertyValue(key);
|
|
26
|
+
if (value) {
|
|
27
|
+
elementStyle.setProperty(key, value, important ? "important" : "");
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
elementStyle.removeProperty(key);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export class CanvasManager {
|
|
35
|
+
element;
|
|
36
|
+
render;
|
|
37
|
+
size;
|
|
38
|
+
zoom = defaultZoom;
|
|
39
|
+
_container;
|
|
40
|
+
_generated;
|
|
41
|
+
_mutationObserver;
|
|
42
|
+
_originalStyle;
|
|
43
|
+
_pluginManager;
|
|
44
|
+
_pointerEvents;
|
|
45
|
+
_resizePlugins;
|
|
46
|
+
_standardSize;
|
|
47
|
+
_zoomCenter;
|
|
48
|
+
constructor(pluginManager, container) {
|
|
49
|
+
this._pluginManager = pluginManager;
|
|
50
|
+
this._container = container;
|
|
51
|
+
this.render = new RenderManager(pluginManager, container, this);
|
|
52
|
+
this._standardSize = {
|
|
53
|
+
height: 0,
|
|
54
|
+
width: 0,
|
|
55
|
+
};
|
|
56
|
+
const pxRatio = container.retina.pixelRatio, stdSize = this._standardSize;
|
|
57
|
+
this.size = {
|
|
58
|
+
height: stdSize.height * pxRatio,
|
|
59
|
+
width: stdSize.width * pxRatio,
|
|
60
|
+
};
|
|
61
|
+
this._generated = false;
|
|
62
|
+
this._resizePlugins = [];
|
|
63
|
+
this._pointerEvents = "none";
|
|
64
|
+
}
|
|
65
|
+
get _fullScreen() {
|
|
66
|
+
return this._container.actualOptions.fullScreen.enable;
|
|
67
|
+
}
|
|
68
|
+
destroy() {
|
|
69
|
+
this.stop();
|
|
70
|
+
if (this._generated) {
|
|
71
|
+
const element = this.element;
|
|
72
|
+
element?.remove();
|
|
73
|
+
this.element = undefined;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
this._resetOriginalStyle();
|
|
77
|
+
}
|
|
78
|
+
this.render.destroy();
|
|
79
|
+
this._resizePlugins = [];
|
|
80
|
+
}
|
|
81
|
+
getZoomCenter() {
|
|
82
|
+
const pxRatio = this._container.retina.pixelRatio, { width, height } = this.size;
|
|
83
|
+
if (this._zoomCenter) {
|
|
84
|
+
return this._zoomCenter;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
x: (width * half) / pxRatio,
|
|
88
|
+
y: (height * half) / pxRatio,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
init() {
|
|
92
|
+
this._safeMutationObserver(obs => {
|
|
93
|
+
obs.disconnect();
|
|
94
|
+
});
|
|
95
|
+
this._mutationObserver = safeMutationObserver(records => {
|
|
96
|
+
for (const record of records) {
|
|
97
|
+
if (record.type === "attributes" && record.attributeName === "style") {
|
|
98
|
+
this._repairStyle();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
this.resize();
|
|
103
|
+
this._initStyle();
|
|
104
|
+
this.initBackground();
|
|
105
|
+
this._safeMutationObserver(obs => {
|
|
106
|
+
if (!this.element || !(this.element instanceof Node)) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
obs.observe(this.element, { attributes: true });
|
|
110
|
+
});
|
|
111
|
+
this.initPlugins();
|
|
112
|
+
this.render.init();
|
|
113
|
+
}
|
|
114
|
+
initBackground() {
|
|
115
|
+
const { _container } = this, options = _container.actualOptions, background = options.background, element = this.element;
|
|
116
|
+
if (!element) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const elementStyle = element.style, color = rangeColorToRgb(this._pluginManager, background.color);
|
|
120
|
+
if (color) {
|
|
121
|
+
elementStyle.backgroundColor = getStyleFromRgb(color, _container.hdr, background.opacity);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
elementStyle.backgroundColor = "";
|
|
125
|
+
}
|
|
126
|
+
elementStyle.backgroundImage = background.image || "";
|
|
127
|
+
elementStyle.backgroundPosition = background.position || "";
|
|
128
|
+
elementStyle.backgroundRepeat = background.repeat || "";
|
|
129
|
+
elementStyle.backgroundSize = background.size || "";
|
|
130
|
+
}
|
|
131
|
+
initPlugins() {
|
|
132
|
+
this._resizePlugins = [];
|
|
133
|
+
for (const plugin of this._container.plugins) {
|
|
134
|
+
if (plugin.resize) {
|
|
135
|
+
this._resizePlugins.push(plugin);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
loadCanvas(canvas) {
|
|
140
|
+
if (this._generated && this.element) {
|
|
141
|
+
this.element.remove();
|
|
142
|
+
}
|
|
143
|
+
const container = this._container;
|
|
144
|
+
this._generated =
|
|
145
|
+
generatedAttribute in canvas.dataset ? canvas.dataset[generatedAttribute] === "true" : this._generated;
|
|
146
|
+
this.element = canvas;
|
|
147
|
+
this.element.ariaHidden = "true";
|
|
148
|
+
this._originalStyle = cloneStyle(this.element.style);
|
|
149
|
+
const standardSize = this._standardSize;
|
|
150
|
+
standardSize.height = canvas.offsetHeight;
|
|
151
|
+
standardSize.width = canvas.offsetWidth;
|
|
152
|
+
const pxRatio = this._container.retina.pixelRatio, retinaSize = this.size;
|
|
153
|
+
canvas.height = retinaSize.height = standardSize.height * pxRatio;
|
|
154
|
+
canvas.width = retinaSize.width = standardSize.width * pxRatio;
|
|
155
|
+
const canSupportHdrQuery = safeMatchMedia("(color-gamut: p3)");
|
|
156
|
+
this.render.setContextSettings({
|
|
157
|
+
alpha: true,
|
|
158
|
+
colorSpace: canSupportHdrQuery?.matches && container.hdr ? "display-p3" : "srgb",
|
|
159
|
+
desynchronized: true,
|
|
160
|
+
willReadFrequently: false,
|
|
161
|
+
});
|
|
162
|
+
this.render.setContext(this.element.getContext("2d", this.render.settings));
|
|
163
|
+
this._safeMutationObserver(obs => {
|
|
164
|
+
obs.disconnect();
|
|
165
|
+
});
|
|
166
|
+
container.retina.init();
|
|
167
|
+
this.initBackground();
|
|
168
|
+
this._safeMutationObserver(obs => {
|
|
169
|
+
if (!this.element || !(this.element instanceof Node)) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
obs.observe(this.element, { attributes: true });
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
resize() {
|
|
176
|
+
if (!this.element) {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
const container = this._container, currentSize = container.canvas._standardSize, newSize = {
|
|
180
|
+
width: this.element.offsetWidth,
|
|
181
|
+
height: this.element.offsetHeight,
|
|
182
|
+
}, pxRatio = container.retina.pixelRatio, retinaSize = {
|
|
183
|
+
width: newSize.width * pxRatio,
|
|
184
|
+
height: newSize.height * pxRatio,
|
|
185
|
+
};
|
|
186
|
+
if (newSize.height === currentSize.height &&
|
|
187
|
+
newSize.width === currentSize.width &&
|
|
188
|
+
retinaSize.height === this.element.height &&
|
|
189
|
+
retinaSize.width === this.element.width) {
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
const oldSize = { ...currentSize };
|
|
193
|
+
currentSize.height = newSize.height;
|
|
194
|
+
currentSize.width = newSize.width;
|
|
195
|
+
const canvasSize = this.size;
|
|
196
|
+
this.element.width = canvasSize.width = retinaSize.width;
|
|
197
|
+
this.element.height = canvasSize.height = retinaSize.height;
|
|
198
|
+
if (this._container.started) {
|
|
199
|
+
container.particles.setResizeFactor({
|
|
200
|
+
width: currentSize.width / oldSize.width,
|
|
201
|
+
height: currentSize.height / oldSize.height,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
206
|
+
setPointerEvents(type) {
|
|
207
|
+
const element = this.element;
|
|
208
|
+
if (!element) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
this._pointerEvents = type;
|
|
212
|
+
this._repairStyle();
|
|
213
|
+
}
|
|
214
|
+
setZoom(zoomLevel, center) {
|
|
215
|
+
this.zoom = zoomLevel;
|
|
216
|
+
this._zoomCenter = center;
|
|
217
|
+
}
|
|
218
|
+
stop() {
|
|
219
|
+
this._safeMutationObserver(obs => {
|
|
220
|
+
obs.disconnect();
|
|
221
|
+
});
|
|
222
|
+
this._mutationObserver = undefined;
|
|
223
|
+
this.render.stop();
|
|
224
|
+
}
|
|
225
|
+
async windowResize() {
|
|
226
|
+
if (!this.element || !this.resize()) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
const container = this._container, needsRefresh = container.updateActualOptions();
|
|
230
|
+
container.particles.setDensity();
|
|
231
|
+
this._applyResizePlugins();
|
|
232
|
+
if (needsRefresh) {
|
|
233
|
+
await container.refresh();
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
_applyResizePlugins = () => {
|
|
237
|
+
for (const plugin of this._resizePlugins) {
|
|
238
|
+
plugin.resize?.();
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
_initStyle = () => {
|
|
242
|
+
const element = this.element, options = this._container.actualOptions;
|
|
243
|
+
if (!element) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
if (this._fullScreen) {
|
|
247
|
+
this._setFullScreenStyle();
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
this._resetOriginalStyle();
|
|
251
|
+
}
|
|
252
|
+
for (const key in options.style) {
|
|
253
|
+
if (!key || !(key in options.style)) {
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
const value = options.style[key];
|
|
257
|
+
if (!value) {
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
element.style.setProperty(key, value, "important");
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
_repairStyle = () => {
|
|
264
|
+
const element = this.element;
|
|
265
|
+
if (!element) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
this._safeMutationObserver(observer => {
|
|
269
|
+
observer.disconnect();
|
|
270
|
+
});
|
|
271
|
+
this._initStyle();
|
|
272
|
+
this.initBackground();
|
|
273
|
+
const pointerEvents = this._pointerEvents;
|
|
274
|
+
element.style.pointerEvents = pointerEvents;
|
|
275
|
+
element.setAttribute("pointer-events", pointerEvents);
|
|
276
|
+
this._safeMutationObserver(observer => {
|
|
277
|
+
if (!(element instanceof Node)) {
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
observer.observe(element, { attributes: true });
|
|
281
|
+
});
|
|
282
|
+
};
|
|
283
|
+
_resetOriginalStyle = () => {
|
|
284
|
+
const element = this.element, originalStyle = this._originalStyle;
|
|
285
|
+
if (!element || !originalStyle) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
setStyle(element, originalStyle, true);
|
|
289
|
+
};
|
|
290
|
+
_safeMutationObserver = callback => {
|
|
291
|
+
if (!this._mutationObserver) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
callback(this._mutationObserver);
|
|
295
|
+
};
|
|
296
|
+
_setFullScreenStyle = () => {
|
|
297
|
+
const element = this.element;
|
|
298
|
+
if (!element) {
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
setStyle(element, getFullScreenStyle(this._container.actualOptions.fullScreen.zIndex), true);
|
|
302
|
+
};
|
|
303
|
+
}
|