1 | import type { ShapeDrawerAfterEffectFunction, ShapeDrawerDestroyFunction, ShapeDrawerDrawFunction, ShapeDrawerInitFunction } from "./Types/ShapeDrawerFunctions";
|
2 | import type { Container } from "./Core/Container";
|
3 | import type { CustomEventArgs } from "./Types/CustomEventArgs";
|
4 | import type { CustomEventListener } from "./Types/CustomEventListener";
|
5 | import type { IInteractor } from "./Core/Interfaces/IInteractor";
|
6 | import type { IMovePathGenerator } from "./Core/Interfaces/IMovePathGenerator";
|
7 | import type { IOptions } from "./Options/Interfaces/IOptions";
|
8 | import type { IParticleMover } from "./Core/Interfaces/IParticlesMover";
|
9 | import type { IParticleUpdater } from "./Core/Interfaces/IParticleUpdater";
|
10 | import type { IPlugin } from "./Core/Interfaces/IPlugin";
|
11 | import type { IShapeDrawer } from "./Core/Interfaces/IShapeDrawer";
|
12 | import type { Particle } from "./Core/Particle";
|
13 | import { Plugins } from "./Core/Utils/Plugins";
|
14 | import type { RecursivePartial } from "./Types/RecursivePartial";
|
15 | import type { SingleOrMultiple } from "./Types/SingleOrMultiple";
|
16 | export declare class Engine {
|
17 | readonly plugins: Plugins;
|
18 | private readonly _domArray;
|
19 | private readonly _eventDispatcher;
|
20 | private _initialized;
|
21 | private readonly _loader;
|
22 | constructor();
|
23 | addEventListener(type: string, listener: CustomEventListener): void;
|
24 | addInteractor(name: string, interactorInitializer: (container: Container) => IInteractor): Promise<void>;
|
25 | addMover(name: string, moverInitializer: (container: Container) => IParticleMover): Promise<void>;
|
26 | addParticleUpdater(name: string, updaterInitializer: (container: Container) => IParticleUpdater): Promise<void>;
|
27 | addPathGenerator(name: string, generator: IMovePathGenerator): Promise<void>;
|
28 | addPlugin(plugin: IPlugin): Promise<void>;
|
29 | addPreset(preset: string, options: RecursivePartial<IOptions>, override?: boolean): Promise<void>;
|
30 | addShape(shape: SingleOrMultiple<string>, drawer: IShapeDrawer | ShapeDrawerDrawFunction, init?: ShapeDrawerInitFunction, afterEffect?: ShapeDrawerAfterEffectFunction, destroy?: ShapeDrawerDestroyFunction): Promise<void>;
|
31 | dispatchEvent(type: string, args: CustomEventArgs): void;
|
32 | dom(): Container[];
|
33 | domItem(index: number): Container | undefined;
|
34 | init(): void;
|
35 | load(tagId: string | SingleOrMultiple<RecursivePartial<IOptions>>, options?: SingleOrMultiple<RecursivePartial<IOptions>>): Promise<Container | undefined>;
|
36 | loadFromArray(tagId: string, options: RecursivePartial<IOptions>[], index?: number): Promise<Container | undefined>;
|
37 | loadJSON(tagId: string | SingleOrMultiple<string>, pathConfigJson?: SingleOrMultiple<string> | number, index?: number): Promise<Container | undefined>;
|
38 | refresh(): Promise<void>;
|
39 | removeEventListener(type: string, listener: CustomEventListener): void;
|
40 | set(id: string | HTMLElement, element: HTMLElement | RecursivePartial<IOptions>, options?: RecursivePartial<IOptions>): Promise<Container | undefined>;
|
41 | setJSON(id: string | HTMLElement, element: HTMLElement | SingleOrMultiple<string>, pathConfigJson?: SingleOrMultiple<string> | number, index?: number): Promise<Container | undefined>;
|
42 | setOnClickHandler(callback: (e: Event, particles?: Particle[]) => void): void;
|
43 | }
|