tsparticles 1.36.0 → 1.37.3
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/Core/Container.d.ts +3 -1
- package/Core/Container.js +16 -11
- package/Core/InteractionManager.d.ts +1 -0
- package/Core/InteractionManager.js +4 -1
- package/Core/Particles.d.ts +1 -1
- package/Core/Particles.js +3 -1
- package/Enums/Modes/ResponsiveMode.d.ts +4 -0
- package/Enums/Modes/ResponsiveMode.js +8 -0
- package/Enums/Modes/index.d.ts +1 -0
- package/Enums/Modes/index.js +1 -0
- package/Interactions/External/Attract/index.d.ts +1 -1
- package/Interactions/External/Attract/index.js +2 -2
- package/Interactions/External/Bounce/index.d.ts +1 -1
- package/Interactions/External/Bounce/index.js +2 -2
- package/Interactions/External/Bubble/index.d.ts +1 -1
- package/Interactions/External/Bubble/index.js +2 -2
- package/Interactions/External/Connect/index.d.ts +1 -1
- package/Interactions/External/Connect/index.js +2 -2
- package/Interactions/External/Grab/index.d.ts +1 -1
- package/Interactions/External/Grab/index.js +2 -2
- package/Interactions/External/Repulse/index.d.ts +1 -1
- package/Interactions/External/Repulse/index.js +2 -2
- package/Interactions/External/Trail/index.d.ts +1 -1
- package/Interactions/External/Trail/index.js +2 -2
- package/Interactions/Particles/Attract/index.d.ts +1 -1
- package/Interactions/Particles/Attract/index.js +2 -2
- package/Interactions/Particles/Collisions/index.d.ts +1 -1
- package/Interactions/Particles/Collisions/index.js +2 -2
- package/Interactions/Particles/Links/index.d.ts +2 -2
- package/Interactions/Particles/Links/index.js +5 -5
- package/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/Interactions/Particles/Links/plugin.js +2 -2
- package/Options/Classes/FullScreen/FullScreen.js +2 -2
- package/Options/Classes/Interactivity/Interactivity.js +1 -1
- package/Options/Classes/Options.js +3 -1
- package/Options/Classes/Responsive.d.ts +2 -0
- package/Options/Classes/Responsive.js +10 -0
- package/Options/Interfaces/IResponsive.d.ts +2 -0
- package/Plugins/Absorbers/AbsorberInstance.d.ts +2 -1
- package/Plugins/Absorbers/AbsorberInstance.js +21 -9
- package/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -1
- package/Plugins/Absorbers/Options/Classes/AbsorberSize.js +6 -4
- package/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +9 -0
- package/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.js +21 -0
- package/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +3 -2
- package/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +4 -0
- package/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.js +2 -0
- package/Plugins/Absorbers/plugin.d.ts +1 -1
- package/Plugins/Absorbers/plugin.js +2 -2
- package/Plugins/Emitters/plugin.d.ts +1 -1
- package/Plugins/Emitters/plugin.js +2 -2
- package/Plugins/PolygonMask/plugin.js +1 -1
- package/Shapes/Circle/index.d.ts +1 -1
- package/Shapes/Circle/index.js +2 -2
- package/Shapes/Image/index.d.ts +1 -1
- package/Shapes/Image/index.js +3 -3
- package/Shapes/Line/index.d.ts +1 -1
- package/Shapes/Line/index.js +2 -2
- package/Shapes/Polygon/index.d.ts +3 -3
- package/Shapes/Polygon/index.js +7 -7
- package/Shapes/Square/index.d.ts +1 -1
- package/Shapes/Square/index.js +3 -3
- package/Shapes/Star/index.d.ts +1 -1
- package/Shapes/Star/index.js +2 -2
- package/Shapes/Text/index.d.ts +1 -1
- package/Shapes/Text/index.js +2 -2
- package/Updaters/Angle/index.d.ts +1 -1
- package/Updaters/Angle/index.js +2 -2
- package/Updaters/Color/index.d.ts +1 -1
- package/Updaters/Color/index.js +2 -2
- package/Updaters/Life/index.d.ts +1 -1
- package/Updaters/Life/index.js +2 -2
- package/Updaters/Opacity/index.d.ts +1 -1
- package/Updaters/Opacity/index.js +2 -2
- package/Updaters/OutModes/index.d.ts +1 -1
- package/Updaters/OutModes/index.js +2 -2
- package/Updaters/Roll/index.d.ts +1 -1
- package/Updaters/Roll/index.js +2 -2
- package/Updaters/Size/index.d.ts +1 -1
- package/Updaters/Size/index.js +2 -2
- package/Updaters/StrokeColor/index.d.ts +1 -1
- package/Updaters/StrokeColor/index.js +2 -2
- package/Updaters/Tilt/index.d.ts +1 -1
- package/Updaters/Tilt/index.js +2 -2
- package/Updaters/Wobble/index.d.ts +1 -1
- package/Updaters/Wobble/index.js +2 -2
- package/Utils/Plugins.d.ts +2 -2
- package/Utils/Plugins.js +4 -4
- package/Utils/Utils.d.ts +1 -2
- package/browser/Core/Container.d.ts +3 -1
- package/browser/Core/Container.js +17 -12
- package/browser/Core/InteractionManager.d.ts +1 -0
- package/browser/Core/InteractionManager.js +4 -1
- package/browser/Core/Particles.d.ts +1 -1
- package/browser/Core/Particles.js +3 -1
- package/browser/Enums/Modes/ResponsiveMode.d.ts +4 -0
- package/browser/Enums/Modes/ResponsiveMode.js +5 -0
- package/browser/Enums/Modes/index.d.ts +1 -0
- package/browser/Enums/Modes/index.js +1 -0
- package/browser/Interactions/External/Attract/index.d.ts +1 -1
- package/browser/Interactions/External/Attract/index.js +2 -2
- package/browser/Interactions/External/Bounce/index.d.ts +1 -1
- package/browser/Interactions/External/Bounce/index.js +2 -2
- package/browser/Interactions/External/Bubble/index.d.ts +1 -1
- package/browser/Interactions/External/Bubble/index.js +2 -2
- package/browser/Interactions/External/Connect/index.d.ts +1 -1
- package/browser/Interactions/External/Connect/index.js +2 -2
- package/browser/Interactions/External/Grab/index.d.ts +1 -1
- package/browser/Interactions/External/Grab/index.js +2 -2
- package/browser/Interactions/External/Repulse/index.d.ts +1 -1
- package/browser/Interactions/External/Repulse/index.js +2 -2
- package/browser/Interactions/External/Trail/index.d.ts +1 -1
- package/browser/Interactions/External/Trail/index.js +2 -2
- package/browser/Interactions/Particles/Attract/index.d.ts +1 -1
- package/browser/Interactions/Particles/Attract/index.js +2 -2
- package/browser/Interactions/Particles/Collisions/index.d.ts +1 -1
- package/browser/Interactions/Particles/Collisions/index.js +2 -2
- package/browser/Interactions/Particles/Links/index.d.ts +2 -2
- package/browser/Interactions/Particles/Links/index.js +5 -5
- package/browser/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/browser/Interactions/Particles/Links/plugin.js +2 -2
- package/browser/Options/Classes/FullScreen/FullScreen.js +2 -2
- package/browser/Options/Classes/Interactivity/Interactivity.js +1 -1
- package/browser/Options/Classes/Options.js +4 -2
- package/browser/Options/Classes/Responsive.d.ts +2 -0
- package/browser/Options/Classes/Responsive.js +11 -0
- package/browser/Options/Interfaces/IResponsive.d.ts +2 -0
- package/browser/Plugins/Absorbers/AbsorberInstance.d.ts +2 -1
- package/browser/Plugins/Absorbers/AbsorberInstance.js +21 -9
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -1
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSize.js +6 -4
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +9 -0
- package/browser/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.js +17 -0
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +3 -2
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +4 -0
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.js +1 -0
- package/browser/Plugins/Absorbers/plugin.d.ts +1 -1
- package/browser/Plugins/Absorbers/plugin.js +2 -2
- package/browser/Plugins/Emitters/plugin.d.ts +1 -1
- package/browser/Plugins/Emitters/plugin.js +2 -2
- package/browser/Plugins/PolygonMask/plugin.js +4 -2
- package/browser/Shapes/Circle/index.d.ts +1 -1
- package/browser/Shapes/Circle/index.js +2 -2
- package/browser/Shapes/Image/index.d.ts +1 -1
- package/browser/Shapes/Image/index.js +3 -3
- package/browser/Shapes/Line/index.d.ts +1 -1
- package/browser/Shapes/Line/index.js +2 -2
- package/browser/Shapes/Polygon/index.d.ts +3 -3
- package/browser/Shapes/Polygon/index.js +7 -7
- package/browser/Shapes/Square/index.d.ts +1 -1
- package/browser/Shapes/Square/index.js +3 -3
- package/browser/Shapes/Star/index.d.ts +1 -1
- package/browser/Shapes/Star/index.js +2 -2
- package/browser/Shapes/Text/index.d.ts +1 -1
- package/browser/Shapes/Text/index.js +2 -2
- package/browser/Updaters/Angle/index.d.ts +1 -1
- package/browser/Updaters/Angle/index.js +2 -2
- package/browser/Updaters/Color/index.d.ts +1 -1
- package/browser/Updaters/Color/index.js +2 -2
- package/browser/Updaters/Life/index.d.ts +1 -1
- package/browser/Updaters/Life/index.js +2 -2
- package/browser/Updaters/Opacity/index.d.ts +1 -1
- package/browser/Updaters/Opacity/index.js +2 -2
- package/browser/Updaters/OutModes/index.d.ts +1 -1
- package/browser/Updaters/OutModes/index.js +2 -2
- package/browser/Updaters/Roll/index.d.ts +1 -1
- package/browser/Updaters/Roll/index.js +2 -2
- package/browser/Updaters/Size/index.d.ts +1 -1
- package/browser/Updaters/Size/index.js +2 -2
- package/browser/Updaters/StrokeColor/index.d.ts +1 -1
- package/browser/Updaters/StrokeColor/index.js +2 -2
- package/browser/Updaters/Tilt/index.d.ts +1 -1
- package/browser/Updaters/Tilt/index.js +2 -2
- package/browser/Updaters/Wobble/index.d.ts +1 -1
- package/browser/Updaters/Wobble/index.js +2 -2
- package/browser/Utils/Plugins.d.ts +2 -2
- package/browser/Utils/Plugins.js +4 -4
- package/browser/Utils/Utils.d.ts +1 -2
- package/browser/full.d.ts +1 -1
- package/browser/full.js +9 -9
- package/browser/index.js +1 -1
- package/browser/index.slim.js +1 -1
- package/browser/main.d.ts +10 -6
- package/browser/main.js +20 -6
- package/browser/slim.d.ts +1 -1
- package/browser/slim.js +24 -24
- package/esm/Core/Container.d.ts +3 -1
- package/esm/Core/Container.js +16 -11
- package/esm/Core/InteractionManager.d.ts +1 -0
- package/esm/Core/InteractionManager.js +4 -1
- package/esm/Core/Particles.d.ts +1 -1
- package/esm/Core/Particles.js +3 -1
- package/esm/Enums/Modes/ResponsiveMode.d.ts +4 -0
- package/esm/Enums/Modes/ResponsiveMode.js +5 -0
- package/esm/Enums/Modes/index.d.ts +1 -0
- package/esm/Enums/Modes/index.js +1 -0
- package/esm/Interactions/External/Attract/index.d.ts +1 -1
- package/esm/Interactions/External/Attract/index.js +2 -2
- package/esm/Interactions/External/Bounce/index.d.ts +1 -1
- package/esm/Interactions/External/Bounce/index.js +2 -2
- package/esm/Interactions/External/Bubble/index.d.ts +1 -1
- package/esm/Interactions/External/Bubble/index.js +2 -2
- package/esm/Interactions/External/Connect/index.d.ts +1 -1
- package/esm/Interactions/External/Connect/index.js +2 -2
- package/esm/Interactions/External/Grab/index.d.ts +1 -1
- package/esm/Interactions/External/Grab/index.js +2 -2
- package/esm/Interactions/External/Repulse/index.d.ts +1 -1
- package/esm/Interactions/External/Repulse/index.js +2 -2
- package/esm/Interactions/External/Trail/index.d.ts +1 -1
- package/esm/Interactions/External/Trail/index.js +2 -2
- package/esm/Interactions/Particles/Attract/index.d.ts +1 -1
- package/esm/Interactions/Particles/Attract/index.js +2 -2
- package/esm/Interactions/Particles/Collisions/index.d.ts +1 -1
- package/esm/Interactions/Particles/Collisions/index.js +2 -2
- package/esm/Interactions/Particles/Links/index.d.ts +2 -2
- package/esm/Interactions/Particles/Links/index.js +5 -5
- package/esm/Interactions/Particles/Links/plugin.d.ts +1 -1
- package/esm/Interactions/Particles/Links/plugin.js +2 -2
- package/esm/Options/Classes/FullScreen/FullScreen.js +2 -2
- package/esm/Options/Classes/Interactivity/Interactivity.js +1 -1
- package/esm/Options/Classes/Options.js +4 -2
- package/esm/Options/Classes/Responsive.d.ts +2 -0
- package/esm/Options/Classes/Responsive.js +10 -0
- package/esm/Options/Interfaces/IResponsive.d.ts +2 -0
- package/esm/Plugins/Absorbers/AbsorberInstance.d.ts +2 -1
- package/esm/Plugins/Absorbers/AbsorberInstance.js +21 -9
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -1
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSize.js +6 -4
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +9 -0
- package/esm/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.js +17 -0
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +3 -2
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +4 -0
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.js +1 -0
- package/esm/Plugins/Absorbers/plugin.d.ts +1 -1
- package/esm/Plugins/Absorbers/plugin.js +2 -2
- package/esm/Plugins/Emitters/plugin.d.ts +1 -1
- package/esm/Plugins/Emitters/plugin.js +2 -2
- package/esm/Plugins/PolygonMask/plugin.js +1 -1
- package/esm/Shapes/Circle/index.d.ts +1 -1
- package/esm/Shapes/Circle/index.js +2 -2
- package/esm/Shapes/Image/index.d.ts +1 -1
- package/esm/Shapes/Image/index.js +3 -3
- package/esm/Shapes/Line/index.d.ts +1 -1
- package/esm/Shapes/Line/index.js +2 -2
- package/esm/Shapes/Polygon/index.d.ts +3 -3
- package/esm/Shapes/Polygon/index.js +7 -7
- package/esm/Shapes/Square/index.d.ts +1 -1
- package/esm/Shapes/Square/index.js +3 -3
- package/esm/Shapes/Star/index.d.ts +1 -1
- package/esm/Shapes/Star/index.js +2 -2
- package/esm/Shapes/Text/index.d.ts +1 -1
- package/esm/Shapes/Text/index.js +2 -2
- package/esm/Updaters/Angle/index.d.ts +1 -1
- package/esm/Updaters/Angle/index.js +2 -2
- package/esm/Updaters/Color/index.d.ts +1 -1
- package/esm/Updaters/Color/index.js +2 -2
- package/esm/Updaters/Life/index.d.ts +1 -1
- package/esm/Updaters/Life/index.js +2 -2
- package/esm/Updaters/Opacity/index.d.ts +1 -1
- package/esm/Updaters/Opacity/index.js +2 -2
- package/esm/Updaters/OutModes/index.d.ts +1 -1
- package/esm/Updaters/OutModes/index.js +2 -2
- package/esm/Updaters/Roll/index.d.ts +1 -1
- package/esm/Updaters/Roll/index.js +2 -2
- package/esm/Updaters/Size/index.d.ts +1 -1
- package/esm/Updaters/Size/index.js +2 -2
- package/esm/Updaters/StrokeColor/index.d.ts +1 -1
- package/esm/Updaters/StrokeColor/index.js +2 -2
- package/esm/Updaters/Tilt/index.d.ts +1 -1
- package/esm/Updaters/Tilt/index.js +2 -2
- package/esm/Updaters/Wobble/index.d.ts +1 -1
- package/esm/Updaters/Wobble/index.js +2 -2
- package/esm/Utils/Plugins.d.ts +2 -2
- package/esm/Utils/Plugins.js +4 -4
- package/esm/Utils/Utils.d.ts +1 -2
- package/esm/full.d.ts +1 -1
- package/esm/full.js +9 -9
- package/esm/index.js +1 -1
- package/esm/index.slim.js +1 -1
- package/esm/main.d.ts +7 -6
- package/esm/main.js +17 -6
- package/esm/slim.d.ts +1 -1
- package/esm/slim.js +24 -24
- package/full.d.ts +1 -1
- package/full.js +9 -9
- package/index.js +1 -1
- package/index.slim.js +1 -1
- package/main.d.ts +7 -6
- package/main.js +17 -6
- package/package.json +1 -1
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/slim.d.ts +1 -1
- package/slim.js +24 -24
- package/tsparticles.js +743 -363
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.js +2 -2
- package/tsparticles.slim.js +539 -284
- package/tsparticles.slim.min.js +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RollUpdater } from "./RollUpdater";
|
|
2
|
-
export function loadRollUpdater(tsParticles) {
|
|
3
|
-
tsParticles.addParticleUpdater("roll", () => new RollUpdater());
|
|
2
|
+
export async function loadRollUpdater(tsParticles) {
|
|
3
|
+
await tsParticles.addParticleUpdater("roll", () => new RollUpdater());
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../main";
|
|
2
|
-
export declare function loadSizeUpdater(tsParticles: Main): void
|
|
2
|
+
export declare function loadSizeUpdater(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SizeUpdater } from "./SizeUpdater";
|
|
2
|
-
export function loadSizeUpdater(tsParticles) {
|
|
3
|
-
tsParticles.addParticleUpdater("size", () => new SizeUpdater());
|
|
2
|
+
export async function loadSizeUpdater(tsParticles) {
|
|
3
|
+
await tsParticles.addParticleUpdater("size", () => new SizeUpdater());
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../main";
|
|
2
|
-
export declare function loadStrokeColorUpdater(tsParticles: Main): void
|
|
2
|
+
export declare function loadStrokeColorUpdater(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { StrokeColorUpdater } from "./StrokeColorUpdater";
|
|
2
|
-
export function loadStrokeColorUpdater(tsParticles) {
|
|
3
|
-
tsParticles.addParticleUpdater("strokeColor", (container) => new StrokeColorUpdater(container));
|
|
2
|
+
export async function loadStrokeColorUpdater(tsParticles) {
|
|
3
|
+
await tsParticles.addParticleUpdater("strokeColor", (container) => new StrokeColorUpdater(container));
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../main";
|
|
2
|
-
export declare function loadTiltUpdater(tsParticles: Main): void
|
|
2
|
+
export declare function loadTiltUpdater(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TiltUpdater } from "./TiltUpdater";
|
|
2
|
-
export function loadTiltUpdater(tsParticles) {
|
|
3
|
-
tsParticles.addParticleUpdater("tilt", (container) => new TiltUpdater(container));
|
|
2
|
+
export async function loadTiltUpdater(tsParticles) {
|
|
3
|
+
await tsParticles.addParticleUpdater("tilt", (container) => new TiltUpdater(container));
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../main";
|
|
2
|
-
export declare function loadWobbleUpdater(tsParticles: Main): void
|
|
2
|
+
export declare function loadWobbleUpdater(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { WobbleUpdater } from "./WobbleUpdater";
|
|
2
|
-
export function loadWobbleUpdater(tsParticles) {
|
|
3
|
-
tsParticles.addParticleUpdater("wobble", (container) => new WobbleUpdater(container));
|
|
2
|
+
export async function loadWobbleUpdater(tsParticles) {
|
|
3
|
+
await tsParticles.addParticleUpdater("wobble", (container) => new WobbleUpdater(container));
|
|
4
4
|
}
|
|
@@ -18,8 +18,8 @@ export declare class Plugins {
|
|
|
18
18
|
static getSupportedShapes(): IterableIterator<string>;
|
|
19
19
|
static getPathGenerator(type: string): IMovePathGenerator | undefined;
|
|
20
20
|
static addPathGenerator(type: string, pathGenerator: IMovePathGenerator): void;
|
|
21
|
-
static getInteractors(container: Container): IInteractor[];
|
|
21
|
+
static getInteractors(container: Container, force?: boolean): IInteractor[];
|
|
22
22
|
static addInteractor(name: string, initInteractor: (container: Container) => IInteractor): void;
|
|
23
|
-
static getUpdaters(container: Container): IParticleUpdater[];
|
|
23
|
+
static getUpdaters(container: Container, force?: boolean): IParticleUpdater[];
|
|
24
24
|
static addParticleUpdater(name: string, initUpdater: (container: Container) => IParticleUpdater): void;
|
|
25
25
|
}
|
package/browser/Utils/Plugins.js
CHANGED
|
@@ -60,9 +60,9 @@ export class Plugins {
|
|
|
60
60
|
pathGenerators.set(type, pathGenerator);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
static getInteractors(container) {
|
|
63
|
+
static getInteractors(container, force = false) {
|
|
64
64
|
let res = interactors.get(container);
|
|
65
|
-
if (!res) {
|
|
65
|
+
if (!res || force) {
|
|
66
66
|
res = [...interactorsInitializers.values()].map((t) => t(container));
|
|
67
67
|
interactors.set(container, res);
|
|
68
68
|
}
|
|
@@ -71,9 +71,9 @@ export class Plugins {
|
|
|
71
71
|
static addInteractor(name, initInteractor) {
|
|
72
72
|
interactorsInitializers.set(name, initInteractor);
|
|
73
73
|
}
|
|
74
|
-
static getUpdaters(container) {
|
|
74
|
+
static getUpdaters(container, force = false) {
|
|
75
75
|
let res = updaters.get(container);
|
|
76
|
-
if (!res) {
|
|
76
|
+
if (!res || force) {
|
|
77
77
|
res = [...updatersInitializers.values()].map((t) => t(container));
|
|
78
78
|
updaters.set(container, res);
|
|
79
79
|
}
|
package/browser/Utils/Utils.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { IBounds, ICircleBouncer, ICoordinates, IDimension, IParticle } from "../Core/Interfaces";
|
|
2
|
-
import { DivMode } from "../Enums";
|
|
2
|
+
import { DivMode, OutModeDirection } from "../Enums";
|
|
3
3
|
import type { ICharacterShape } from "../Options/Interfaces/Particles/Shape/ICharacterShape";
|
|
4
4
|
import type { SingleOrMultiple } from "../Types";
|
|
5
5
|
import { DivEvent } from "../Options/Classes/Interactivity/Events/DivEvent";
|
|
6
6
|
import type { IModeDiv } from "../Options/Interfaces/Interactivity/Modes/IModeDiv";
|
|
7
|
-
import { OutModeDirection } from "../Enums";
|
|
8
7
|
declare global {
|
|
9
8
|
interface Window {
|
|
10
9
|
customRequestAnimationFrame: (callback: FrameRequestCallback) => number;
|
package/browser/full.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "./main";
|
|
2
|
-
export declare function loadFull(tsParticles: Main): void
|
|
2
|
+
export declare function loadFull(tsParticles: Main): Promise<void>;
|
package/browser/full.js
CHANGED
|
@@ -6,13 +6,13 @@ import { loadAbsorbersPlugin } from "./Plugins/Absorbers/plugin";
|
|
|
6
6
|
import { loadEmittersPlugin } from "./Plugins/Emitters/plugin";
|
|
7
7
|
import { loadPolygonMaskPlugin } from "./Plugins/PolygonMask/plugin";
|
|
8
8
|
import { loadRollUpdater } from "./Updaters/Roll";
|
|
9
|
-
export function loadFull(tsParticles) {
|
|
10
|
-
loadSlim(tsParticles);
|
|
11
|
-
loadExternalTrailInteraction(tsParticles);
|
|
12
|
-
loadRollUpdater(tsParticles);
|
|
13
|
-
loadTiltUpdater(tsParticles);
|
|
14
|
-
loadWobbleUpdater(tsParticles);
|
|
15
|
-
loadAbsorbersPlugin(tsParticles);
|
|
16
|
-
loadEmittersPlugin(tsParticles);
|
|
17
|
-
loadPolygonMaskPlugin(tsParticles);
|
|
9
|
+
export async function loadFull(tsParticles) {
|
|
10
|
+
await loadSlim(tsParticles);
|
|
11
|
+
await loadExternalTrailInteraction(tsParticles);
|
|
12
|
+
await loadRollUpdater(tsParticles);
|
|
13
|
+
await loadTiltUpdater(tsParticles);
|
|
14
|
+
await loadWobbleUpdater(tsParticles);
|
|
15
|
+
await loadAbsorbersPlugin(tsParticles);
|
|
16
|
+
await loadEmittersPlugin(tsParticles);
|
|
17
|
+
await loadPolygonMaskPlugin(tsParticles);
|
|
18
18
|
}
|
package/browser/index.js
CHANGED
|
@@ -4,8 +4,8 @@ import { Circle, CircleWarp, Constants, Point, Rectangle } from "./Utils";
|
|
|
4
4
|
import { loadFull } from "./full";
|
|
5
5
|
const tsParticles = new Main();
|
|
6
6
|
tsParticles.init();
|
|
7
|
-
loadFull(tsParticles);
|
|
8
7
|
const { particlesJS, pJSDom } = initPjs(tsParticles);
|
|
8
|
+
loadFull(tsParticles);
|
|
9
9
|
export * from "./Core/Particle/Vector";
|
|
10
10
|
export * from "./Core/Container";
|
|
11
11
|
export * from "./Enums";
|
package/browser/index.slim.js
CHANGED
|
@@ -5,8 +5,8 @@ import { loadSlim } from "./slim";
|
|
|
5
5
|
/* ---------- tsParticles functions - start ------------ */
|
|
6
6
|
const tsParticles = new Main();
|
|
7
7
|
tsParticles.init();
|
|
8
|
-
loadSlim(tsParticles);
|
|
9
8
|
const { particlesJS, pJSDom } = initPjs(tsParticles);
|
|
9
|
+
loadSlim(tsParticles);
|
|
10
10
|
export * from "./Core/Particle/Vector";
|
|
11
11
|
export * from "./Core/Container";
|
|
12
12
|
export * from "./Enums";
|
package/browser/main.d.ts
CHANGED
|
@@ -71,6 +71,10 @@ export declare class Main {
|
|
|
71
71
|
* @returns The [[Container]] object at specified index, if present or not destroyed, otherwise undefined
|
|
72
72
|
*/
|
|
73
73
|
domItem(index: number): Container | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Reloads all existing tsParticles loaded instances
|
|
76
|
+
*/
|
|
77
|
+
refresh(): Promise<void>;
|
|
74
78
|
/**
|
|
75
79
|
* addShape adds shape to tsParticles, it will be available to all future instances created
|
|
76
80
|
* @param shape the shape name
|
|
@@ -79,35 +83,35 @@ export declare class Main {
|
|
|
79
83
|
* @param afterEffect Optional: the shape drawer after effect function, used only if the drawer parameter is a function
|
|
80
84
|
* @param destroy Optional: the shape drawer destroy function, used only if the drawer parameter is a function
|
|
81
85
|
*/
|
|
82
|
-
addShape(shape: string, drawer: IShapeDrawer | ShapeDrawerDrawFunction, init?: ShapeDrawerInitFunction, afterEffect?: ShapeDrawerAfterEffectFunction, destroy?: ShapeDrawerDestroyFunction): void
|
|
86
|
+
addShape(shape: string, drawer: IShapeDrawer | ShapeDrawerDrawFunction, init?: ShapeDrawerInitFunction, afterEffect?: ShapeDrawerAfterEffectFunction, destroy?: ShapeDrawerDestroyFunction): Promise<void>;
|
|
83
87
|
/**
|
|
84
88
|
* addPreset adds preset to tsParticles, it will be available to all future instances created
|
|
85
89
|
* @param preset the preset name
|
|
86
90
|
* @param options the options to add to the preset
|
|
87
91
|
* @param override if true, the preset will override any existing with the same name
|
|
88
92
|
*/
|
|
89
|
-
addPreset(preset: string, options: RecursivePartial<IOptions>, override?: boolean): void
|
|
93
|
+
addPreset(preset: string, options: RecursivePartial<IOptions>, override?: boolean): Promise<void>;
|
|
90
94
|
/**
|
|
91
95
|
* addPlugin adds plugin to tsParticles, if an instance needs it it will be loaded
|
|
92
96
|
* @param plugin the plugin implementation of [[IPlugin]]
|
|
93
97
|
*/
|
|
94
|
-
addPlugin(plugin: IPlugin): void
|
|
98
|
+
addPlugin(plugin: IPlugin): Promise<void>;
|
|
95
99
|
/**
|
|
96
100
|
* addPathGenerator adds a named path generator to tsParticles, this can be called by options
|
|
97
101
|
* @param name the path generator name
|
|
98
102
|
* @param generator the path generator object
|
|
99
103
|
*/
|
|
100
|
-
addPathGenerator(name: string, generator: IMovePathGenerator): void
|
|
104
|
+
addPathGenerator(name: string, generator: IMovePathGenerator): Promise<void>;
|
|
101
105
|
/**
|
|
102
106
|
*
|
|
103
107
|
* @param name
|
|
104
108
|
* @param interactorInitializer
|
|
105
109
|
*/
|
|
106
|
-
addInteractor(name: string, interactorInitializer: (container: Container) => IInteractor): void
|
|
110
|
+
addInteractor(name: string, interactorInitializer: (container: Container) => IInteractor): Promise<void>;
|
|
107
111
|
/**
|
|
108
112
|
*
|
|
109
113
|
* @param name
|
|
110
114
|
* @param updaterInitializer
|
|
111
115
|
*/
|
|
112
|
-
addParticleUpdater(name: string, updaterInitializer: (container: Container) => IParticleUpdater): void
|
|
116
|
+
addParticleUpdater(name: string, updaterInitializer: (container: Container) => IParticleUpdater): Promise<void>;
|
|
113
117
|
}
|
package/browser/main.js
CHANGED
|
@@ -102,6 +102,14 @@ export class Main {
|
|
|
102
102
|
domItem(index) {
|
|
103
103
|
return Loader.domItem(index);
|
|
104
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Reloads all existing tsParticles loaded instances
|
|
107
|
+
*/
|
|
108
|
+
async refresh() {
|
|
109
|
+
for (const instance of this.dom()) {
|
|
110
|
+
await instance.refresh();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
105
113
|
/**
|
|
106
114
|
* addShape adds shape to tsParticles, it will be available to all future instances created
|
|
107
115
|
* @param shape the shape name
|
|
@@ -110,7 +118,7 @@ export class Main {
|
|
|
110
118
|
* @param afterEffect Optional: the shape drawer after effect function, used only if the drawer parameter is a function
|
|
111
119
|
* @param destroy Optional: the shape drawer destroy function, used only if the drawer parameter is a function
|
|
112
120
|
*/
|
|
113
|
-
addShape(shape, drawer, init, afterEffect, destroy) {
|
|
121
|
+
async addShape(shape, drawer, init, afterEffect, destroy) {
|
|
114
122
|
let customDrawer;
|
|
115
123
|
if (typeof drawer === "function") {
|
|
116
124
|
customDrawer = {
|
|
@@ -124,6 +132,7 @@ export class Main {
|
|
|
124
132
|
customDrawer = drawer;
|
|
125
133
|
}
|
|
126
134
|
Plugins.addShapeDrawer(shape, customDrawer);
|
|
135
|
+
await this.refresh();
|
|
127
136
|
}
|
|
128
137
|
/**
|
|
129
138
|
* addPreset adds preset to tsParticles, it will be available to all future instances created
|
|
@@ -131,39 +140,44 @@ export class Main {
|
|
|
131
140
|
* @param options the options to add to the preset
|
|
132
141
|
* @param override if true, the preset will override any existing with the same name
|
|
133
142
|
*/
|
|
134
|
-
addPreset(preset, options, override = false) {
|
|
143
|
+
async addPreset(preset, options, override = false) {
|
|
135
144
|
Plugins.addPreset(preset, options, override);
|
|
145
|
+
await this.refresh();
|
|
136
146
|
}
|
|
137
147
|
/**
|
|
138
148
|
* addPlugin adds plugin to tsParticles, if an instance needs it it will be loaded
|
|
139
149
|
* @param plugin the plugin implementation of [[IPlugin]]
|
|
140
150
|
*/
|
|
141
|
-
addPlugin(plugin) {
|
|
151
|
+
async addPlugin(plugin) {
|
|
142
152
|
Plugins.addPlugin(plugin);
|
|
153
|
+
await this.refresh();
|
|
143
154
|
}
|
|
144
155
|
/**
|
|
145
156
|
* addPathGenerator adds a named path generator to tsParticles, this can be called by options
|
|
146
157
|
* @param name the path generator name
|
|
147
158
|
* @param generator the path generator object
|
|
148
159
|
*/
|
|
149
|
-
addPathGenerator(name, generator) {
|
|
160
|
+
async addPathGenerator(name, generator) {
|
|
150
161
|
Plugins.addPathGenerator(name, generator);
|
|
162
|
+
await this.refresh();
|
|
151
163
|
}
|
|
152
164
|
/**
|
|
153
165
|
*
|
|
154
166
|
* @param name
|
|
155
167
|
* @param interactorInitializer
|
|
156
168
|
*/
|
|
157
|
-
addInteractor(name, interactorInitializer) {
|
|
169
|
+
async addInteractor(name, interactorInitializer) {
|
|
158
170
|
Plugins.addInteractor(name, interactorInitializer);
|
|
171
|
+
await this.refresh();
|
|
159
172
|
}
|
|
160
173
|
/**
|
|
161
174
|
*
|
|
162
175
|
* @param name
|
|
163
176
|
* @param updaterInitializer
|
|
164
177
|
*/
|
|
165
|
-
addParticleUpdater(name, updaterInitializer) {
|
|
178
|
+
async addParticleUpdater(name, updaterInitializer) {
|
|
166
179
|
Plugins.addParticleUpdater(name, updaterInitializer);
|
|
180
|
+
await this.refresh();
|
|
167
181
|
}
|
|
168
182
|
}
|
|
169
183
|
_Main_initialized = new WeakMap();
|
package/browser/slim.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "./main";
|
|
2
|
-
export declare function loadSlim(tsParticles: Main): void
|
|
2
|
+
export declare function loadSlim(tsParticles: Main): Promise<void>;
|
package/browser/slim.js
CHANGED
|
@@ -21,28 +21,28 @@ import { loadExternalBounceInteraction } from "./Interactions/External/Bounce";
|
|
|
21
21
|
import { loadTextShape } from "./Shapes/Text";
|
|
22
22
|
import { loadParticlesLinksInteraction } from "./Interactions/Particles/Links";
|
|
23
23
|
import { loadSizeUpdater } from "./Updaters/Size";
|
|
24
|
-
export function loadSlim(tsParticles) {
|
|
25
|
-
loadExternalAttractInteraction(tsParticles);
|
|
26
|
-
loadExternalBounceInteraction(tsParticles);
|
|
27
|
-
loadExternalBubbleInteraction(tsParticles);
|
|
28
|
-
loadExternalConnectInteraction(tsParticles);
|
|
29
|
-
loadExternalGrabInteraction(tsParticles);
|
|
30
|
-
loadExternalRepulseInteraction(tsParticles);
|
|
31
|
-
loadParticlesAttractInteraction(tsParticles);
|
|
32
|
-
loadParticlesCollisionsInteraction(tsParticles);
|
|
33
|
-
loadParticlesLinksInteraction(tsParticles);
|
|
34
|
-
loadCircleShape(tsParticles);
|
|
35
|
-
loadImageShape(tsParticles);
|
|
36
|
-
loadLineShape(tsParticles);
|
|
37
|
-
loadPolygonShape(tsParticles);
|
|
38
|
-
loadSquareShape(tsParticles);
|
|
39
|
-
loadStarShape(tsParticles);
|
|
40
|
-
loadTextShape(tsParticles);
|
|
41
|
-
loadLifeUpdater(tsParticles);
|
|
42
|
-
loadOpacityUpdater(tsParticles);
|
|
43
|
-
loadSizeUpdater(tsParticles);
|
|
44
|
-
loadAngleUpdater(tsParticles);
|
|
45
|
-
loadColorUpdater(tsParticles);
|
|
46
|
-
loadStrokeColorUpdater(tsParticles);
|
|
47
|
-
loadOutModesUpdater(tsParticles);
|
|
24
|
+
export async function loadSlim(tsParticles) {
|
|
25
|
+
await loadExternalAttractInteraction(tsParticles);
|
|
26
|
+
await loadExternalBounceInteraction(tsParticles);
|
|
27
|
+
await loadExternalBubbleInteraction(tsParticles);
|
|
28
|
+
await loadExternalConnectInteraction(tsParticles);
|
|
29
|
+
await loadExternalGrabInteraction(tsParticles);
|
|
30
|
+
await loadExternalRepulseInteraction(tsParticles);
|
|
31
|
+
await loadParticlesAttractInteraction(tsParticles);
|
|
32
|
+
await loadParticlesCollisionsInteraction(tsParticles);
|
|
33
|
+
await loadParticlesLinksInteraction(tsParticles);
|
|
34
|
+
await loadCircleShape(tsParticles);
|
|
35
|
+
await loadImageShape(tsParticles);
|
|
36
|
+
await loadLineShape(tsParticles);
|
|
37
|
+
await loadPolygonShape(tsParticles);
|
|
38
|
+
await loadSquareShape(tsParticles);
|
|
39
|
+
await loadStarShape(tsParticles);
|
|
40
|
+
await loadTextShape(tsParticles);
|
|
41
|
+
await loadLifeUpdater(tsParticles);
|
|
42
|
+
await loadOpacityUpdater(tsParticles);
|
|
43
|
+
await loadSizeUpdater(tsParticles);
|
|
44
|
+
await loadAngleUpdater(tsParticles);
|
|
45
|
+
await loadColorUpdater(tsParticles);
|
|
46
|
+
await loadStrokeColorUpdater(tsParticles);
|
|
47
|
+
await loadOutModesUpdater(tsParticles);
|
|
48
48
|
}
|
package/esm/Core/Container.d.ts
CHANGED
|
@@ -36,10 +36,12 @@ export declare class Container {
|
|
|
36
36
|
readonly pathGenerator: IMovePathGenerator;
|
|
37
37
|
private _options;
|
|
38
38
|
private _sourceOptions;
|
|
39
|
+
private readonly _initialSourceOptions;
|
|
39
40
|
private paused;
|
|
40
41
|
private firstStart;
|
|
41
42
|
private currentTheme?;
|
|
42
43
|
private drawAnimationFrame?;
|
|
44
|
+
private readonly presets;
|
|
43
45
|
private readonly eventListeners;
|
|
44
46
|
private readonly intersectionObserver?;
|
|
45
47
|
constructor(id: string, sourceOptions?: RecursivePartial<IOptions>, ...presets: string[]);
|
|
@@ -60,6 +62,6 @@ export declare class Container {
|
|
|
60
62
|
start(): Promise<void>;
|
|
61
63
|
addClickHandler(callback: (evt: Event, particles?: Particle[]) => void): void;
|
|
62
64
|
updateActualOptions(): boolean;
|
|
63
|
-
|
|
65
|
+
init(): Promise<void>;
|
|
64
66
|
private intersectionManager;
|
|
65
67
|
}
|
package/esm/Core/Container.js
CHANGED
|
@@ -19,10 +19,12 @@ export class Container {
|
|
|
19
19
|
this.zLayers = 100;
|
|
20
20
|
this.pageHidden = false;
|
|
21
21
|
this._sourceOptions = sourceOptions;
|
|
22
|
+
this._initialSourceOptions = sourceOptions;
|
|
22
23
|
this.retina = new Retina(this);
|
|
23
24
|
this.canvas = new Canvas(this);
|
|
24
25
|
this.particles = new Particles(this);
|
|
25
26
|
this.drawer = new FrameManager(this);
|
|
27
|
+
this.presets = presets;
|
|
26
28
|
this.pathGenerator = {
|
|
27
29
|
generate: () => {
|
|
28
30
|
const v = Vector.create(0, 0);
|
|
@@ -49,17 +51,6 @@ export class Container {
|
|
|
49
51
|
this.density = 1;
|
|
50
52
|
this._options = new Options();
|
|
51
53
|
this.actualOptions = new Options();
|
|
52
|
-
for (const preset of presets) {
|
|
53
|
-
this._options.load(Plugins.getPreset(preset));
|
|
54
|
-
}
|
|
55
|
-
const shapes = Plugins.getSupportedShapes();
|
|
56
|
-
for (const type of shapes) {
|
|
57
|
-
const drawer = Plugins.getShapeDrawer(type);
|
|
58
|
-
if (drawer) {
|
|
59
|
-
this.drawers.set(type, drawer);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
this._options.load(this._sourceOptions);
|
|
63
54
|
this.eventListeners = new EventListeners(this);
|
|
64
55
|
if (typeof IntersectionObserver !== "undefined" && IntersectionObserver) {
|
|
65
56
|
this.intersectionObserver = new IntersectionObserver((entries) => this.intersectionManager(entries));
|
|
@@ -202,6 +193,7 @@ export class Container {
|
|
|
202
193
|
this.particles.linksColors = new Map();
|
|
203
194
|
delete this.particles.grabLineColor;
|
|
204
195
|
delete this.particles.linksColor;
|
|
196
|
+
this._sourceOptions = this._options;
|
|
205
197
|
}
|
|
206
198
|
async loadTheme(name) {
|
|
207
199
|
this.currentTheme = name;
|
|
@@ -316,6 +308,19 @@ export class Container {
|
|
|
316
308
|
return false;
|
|
317
309
|
}
|
|
318
310
|
async init() {
|
|
311
|
+
this._options = new Options();
|
|
312
|
+
for (const preset of this.presets) {
|
|
313
|
+
this._options.load(Plugins.getPreset(preset));
|
|
314
|
+
}
|
|
315
|
+
const shapes = Plugins.getSupportedShapes();
|
|
316
|
+
for (const type of shapes) {
|
|
317
|
+
const drawer = Plugins.getShapeDrawer(type);
|
|
318
|
+
if (drawer) {
|
|
319
|
+
this.drawers.set(type, drawer);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
this._options.load(this._initialSourceOptions);
|
|
323
|
+
this._options.load(this._sourceOptions);
|
|
319
324
|
this.actualOptions = new Options();
|
|
320
325
|
this.actualOptions.load(this._options);
|
|
321
326
|
this.retina.init();
|
|
@@ -6,6 +6,7 @@ export declare class InteractionManager {
|
|
|
6
6
|
private readonly externalInteractors;
|
|
7
7
|
private readonly particleInteractors;
|
|
8
8
|
constructor(container: Container);
|
|
9
|
+
init(): void;
|
|
9
10
|
externalInteract(delta: IDelta): void;
|
|
10
11
|
particlesInteract(particle: Particle, delta: IDelta): void;
|
|
11
12
|
}
|
|
@@ -3,9 +3,12 @@ import { InteractorType } from "../Enums";
|
|
|
3
3
|
export class InteractionManager {
|
|
4
4
|
constructor(container) {
|
|
5
5
|
this.container = container;
|
|
6
|
-
const interactors = Plugins.getInteractors(container);
|
|
7
6
|
this.externalInteractors = [];
|
|
8
7
|
this.particleInteractors = [];
|
|
8
|
+
this.init();
|
|
9
|
+
}
|
|
10
|
+
init() {
|
|
11
|
+
const interactors = Plugins.getInteractors(this.container, true);
|
|
9
12
|
for (const interactor of interactors) {
|
|
10
13
|
switch (interactor.type) {
|
|
11
14
|
case InteractorType.External:
|
package/esm/Core/Particles.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare class Particles {
|
|
|
17
17
|
pushing?: boolean;
|
|
18
18
|
linksColor?: IRgb | string;
|
|
19
19
|
grabLineColor?: IRgb | string;
|
|
20
|
-
|
|
20
|
+
updaters: import("./Interfaces").IParticleUpdater[];
|
|
21
21
|
private interactionManager;
|
|
22
22
|
private nextId;
|
|
23
23
|
private readonly freqs;
|
package/esm/Core/Particles.js
CHANGED
|
@@ -21,7 +21,7 @@ export class Particles {
|
|
|
21
21
|
const canvasSize = this.container.canvas.size;
|
|
22
22
|
this.linksColors = new Map();
|
|
23
23
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, (canvasSize.width * 3) / 2, (canvasSize.height * 3) / 2), 4);
|
|
24
|
-
this.updaters = Plugins.getUpdaters(container);
|
|
24
|
+
this.updaters = Plugins.getUpdaters(container, true);
|
|
25
25
|
}
|
|
26
26
|
get count() {
|
|
27
27
|
return this.array.length;
|
|
@@ -35,6 +35,8 @@ export class Particles {
|
|
|
35
35
|
this.freqs.links = new Map();
|
|
36
36
|
this.freqs.triangles = new Map();
|
|
37
37
|
let handled = false;
|
|
38
|
+
this.updaters = Plugins.getUpdaters(container, true);
|
|
39
|
+
this.interactionManager.init();
|
|
38
40
|
for (const [, plugin] of container.plugins) {
|
|
39
41
|
if (plugin.particlesInitialization !== undefined) {
|
|
40
42
|
handled = plugin.particlesInitialization();
|
package/esm/Enums/Modes/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadExternalAttractInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadExternalAttractInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Attractor } from "./Attractor";
|
|
2
|
-
export function loadExternalAttractInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("externalAttract", (container) => new Attractor(container));
|
|
2
|
+
export async function loadExternalAttractInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("externalAttract", (container) => new Attractor(container));
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadExternalBounceInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadExternalBounceInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Bouncer } from "./Bouncer";
|
|
2
|
-
export function loadExternalBounceInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("externalBounce", (container) => new Bouncer(container));
|
|
2
|
+
export async function loadExternalBounceInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("externalBounce", (container) => new Bouncer(container));
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadExternalBubbleInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadExternalBubbleInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Bubbler } from "./Bubbler";
|
|
2
|
-
export function loadExternalBubbleInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("externalBubble", (container) => new Bubbler(container));
|
|
2
|
+
export async function loadExternalBubbleInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("externalBubble", (container) => new Bubbler(container));
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadExternalConnectInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadExternalConnectInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Connector } from "./Connector";
|
|
2
|
-
export function loadExternalConnectInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("externalConnect", (container) => new Connector(container));
|
|
2
|
+
export async function loadExternalConnectInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("externalConnect", (container) => new Connector(container));
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadExternalGrabInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadExternalGrabInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Grabber } from "./Grabber";
|
|
2
|
-
export function loadExternalGrabInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("externalGrab", (container) => new Grabber(container));
|
|
2
|
+
export async function loadExternalGrabInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("externalGrab", (container) => new Grabber(container));
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadExternalRepulseInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadExternalRepulseInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Repulser } from "./Repulser";
|
|
2
|
-
export function loadExternalRepulseInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("externalRepulse", (container) => new Repulser(container));
|
|
2
|
+
export async function loadExternalRepulseInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("externalRepulse", (container) => new Repulser(container));
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadExternalTrailInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadExternalTrailInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TrailMaker } from "./TrailMaker";
|
|
2
|
-
export function loadExternalTrailInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("externalTrail", (container) => new TrailMaker(container));
|
|
2
|
+
export async function loadExternalTrailInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("externalTrail", (container) => new TrailMaker(container));
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadParticlesAttractInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadParticlesAttractInteraction(tsParticles: Main): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Attractor } from "./Attractor";
|
|
2
|
-
export function loadParticlesAttractInteraction(tsParticles) {
|
|
3
|
-
tsParticles.addInteractor("particlesAttract", (container) => new Attractor(container));
|
|
2
|
+
export async function loadParticlesAttractInteraction(tsParticles) {
|
|
3
|
+
await tsParticles.addInteractor("particlesAttract", (container) => new Attractor(container));
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Main } from "../../../main";
|
|
2
|
-
export declare function loadParticlesCollisionsInteraction(tsParticles: Main): void
|
|
2
|
+
export declare function loadParticlesCollisionsInteraction(tsParticles: Main): Promise<void>;
|