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.

65 lines (64 loc) 2.63 kB
import { Canvas } from "./Canvas"; import type { IRepulse } from "./Interfaces/IRepulse"; import type { IBubble } from "./Interfaces/IBubble"; import type { IContainerInteractivity } from "./Interfaces/IContainerInteractivity"; import { Particles } from "./Particles"; import { Retina } from "./Retina"; import type { IOptions } from "../Options/Interfaces/IOptions"; import { FrameManager } from "./FrameManager"; import type { RecursivePartial } from "../Types"; import { Options } from "../Options/Classes/Options"; import type { IContainerPlugin } from "./Interfaces/IContainerPlugin"; import type { IShapeDrawer } from "./Interfaces/IShapeDrawer"; import { Particle } from "./Particle"; import type { IAttract } from "./Interfaces/IAttract"; import type { IMovePathGenerator } from "./Interfaces/IMovePathGenerator"; import { Vector } from "./Particle/Vector"; export declare class Container { readonly id: string; started: boolean; destroyed: boolean; density: number; pageHidden: boolean; lastFrameTime: number; fpsLimit: number; interactivity: IContainerInteractivity; bubble: IBubble; repulse: IRepulse; attract: IAttract; get options(): Options; get sourceOptions(): RecursivePartial<IOptions> | undefined; actualOptions: Options; readonly retina: Retina; readonly canvas: Canvas; readonly particles: Particles; readonly drawer: FrameManager; readonly drawers: Map<string, IShapeDrawer>; readonly plugins: Map<string, IContainerPlugin>; readonly pathGenerator: IMovePathGenerator; private _options; private _sourceOptions; private paused; private firstStart; private drawAnimationFrame?; private readonly eventListeners; private readonly intersectionObserver?; constructor(id: string, sourceOptions?: RecursivePartial<IOptions>, ...presets: string[]); play(force?: boolean): void; pause(): void; draw(): void; getAnimationStatus(): boolean; setNoise(noiseOrGenerator?: IMovePathGenerator | ((particle: Particle) => Vector), init?: () => void, update?: () => void): void; setPath(pathOrGenerator?: IMovePathGenerator | ((particle: Particle) => Vector), init?: () => void, update?: () => void): void; destroy(): void; exportImg(callback: BlobCallback): void; exportImage(callback: BlobCallback, type?: string, quality?: number): void; exportConfiguration(): string; refresh(): Promise<void>; reset(): Promise<void>; stop(): void; loadTheme(name?: string): Promise<void>; start(): Promise<void>; private init; private intersectionManager; }