UNPKG

tsparticles

Version:

Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.

25 lines (24 loc) 1.92 kB
import { IOptions } from "./Options/Interfaces/IOptions"; import { Container } from "./Core/Container"; import { ShapeDrawerAfterEffectFunction, ShapeDrawerDestroyFunction, ShapeDrawerDrawFunction, ShapeDrawerInitFunction, RecursivePartial, SingleOrMultiple } from "./Types"; import { Particle } from "./Core/Particle"; import { IInteractor, IMovePathGenerator, IParticleUpdater, IPlugin, IShapeDrawer } from "./Core/Interfaces"; export declare class Main { private "Main.#private"; constructor(); init(): void; loadFromArray(tagId: string, options: RecursivePartial<IOptions>[], index?: number): Promise<Container | undefined>; load(tagId: string, options: SingleOrMultiple<RecursivePartial<IOptions>>): Promise<Container | undefined>; set(id: string, element: HTMLElement, options: RecursivePartial<IOptions>): Promise<Container | undefined>; loadJSON(tagId: string, pathConfigJson: SingleOrMultiple<string>, index?: number): Promise<Container | undefined>; setJSON(id: string, element: HTMLElement, pathConfigJson: SingleOrMultiple<string>, index?: number): Promise<Container | undefined>; setOnClickHandler(callback: (e: Event, particles?: Particle[]) => void): void; dom(): Container[]; domItem(index: number): Container | undefined; addShape(shape: string, drawer: IShapeDrawer | ShapeDrawerDrawFunction, init?: ShapeDrawerInitFunction, afterEffect?: ShapeDrawerAfterEffectFunction, destroy?: ShapeDrawerDestroyFunction): void; addPreset(preset: string, options: RecursivePartial<IOptions>, override?: boolean): void; addPlugin(plugin: IPlugin): void; addPathGenerator(name: string, generator: IMovePathGenerator): void; addInteractor(name: string, interactorInitializer: (container: Container) => IInteractor): void; addParticleUpdater(name: string, updaterInitializer: (container: Container) => IParticleUpdater): void; }