UNPKG

1.64 kBTypeScriptView Raw
1import type { IOptions } from "./Options/Interfaces/IOptions";
2import type { Container } from "./Core/Container";
3import type { IShapeDrawer } from "./Core/Interfaces/IShapeDrawer";
4import type { ShapeDrawerAfterEffectFunction, ShapeDrawerDestroyFunction, ShapeDrawerDrawFunction, ShapeDrawerInitFunction, RecursivePartial, SingleOrMultiple } from "./Types";
5import type { IPlugin } from "./Core/Interfaces/IPlugin";
6import type { Particle } from "./Core/Particle";
7import type { IMovePathGenerator } from "./Core/Interfaces/IMovePathGenerator";
8export declare class MainSlim {
9 #private;
10 constructor();
11 init(): void;
12 loadFromArray(tagId: string, options: RecursivePartial<IOptions>[], index?: number): Promise<Container | undefined>;
13 load(tagId: string, options: SingleOrMultiple<RecursivePartial<IOptions>>): Promise<Container | undefined>;
14 set(id: string, element: HTMLElement, options: RecursivePartial<IOptions>): Promise<Container | undefined>;
15 loadJSON(tagId: string, pathConfigJson: SingleOrMultiple<string>, index?: number): Promise<Container | undefined>;
16 setOnClickHandler(callback: (e: Event, particles?: Particle[]) => void): void;
17 dom(): Container[];
18 domItem(index: number): Container | undefined;
19 addShape(shape: string, drawer: IShapeDrawer | ShapeDrawerDrawFunction, init?: ShapeDrawerInitFunction, afterEffect?: ShapeDrawerAfterEffectFunction, destroy?: ShapeDrawerDestroyFunction): void;
20 addPreset(preset: string, options: RecursivePartial<IOptions>): void;
21 addPlugin(plugin: IPlugin): void;
22 addPathGenerator(name: string, generator: IMovePathGenerator): void;
23}