UNPKG

2.63 kBTypeScriptView Raw
1import { Canvas } from "./Canvas";
2import type { IRepulse } from "./Interfaces/IRepulse";
3import type { IBubble } from "./Interfaces/IBubble";
4import type { IContainerInteractivity } from "./Interfaces/IContainerInteractivity";
5import { Particles } from "./Particles";
6import { Retina } from "./Retina";
7import type { IOptions } from "../Options/Interfaces/IOptions";
8import { FrameManager } from "./FrameManager";
9import type { RecursivePartial } from "../Types";
10import { Options } from "../Options/Classes/Options";
11import type { IContainerPlugin } from "./Interfaces/IContainerPlugin";
12import type { IShapeDrawer } from "./Interfaces/IShapeDrawer";
13import { Particle } from "./Particle";
14import type { IAttract } from "./Interfaces/IAttract";
15import type { IMovePathGenerator } from "./Interfaces/IMovePathGenerator";
16import { Vector } from "./Particle/Vector";
17export declare class Container {
18 readonly id: string;
19 started: boolean;
20 destroyed: boolean;
21 density: number;
22 pageHidden: boolean;
23 lastFrameTime: number;
24 fpsLimit: number;
25 interactivity: IContainerInteractivity;
26 bubble: IBubble;
27 repulse: IRepulse;
28 attract: IAttract;
29 get options(): Options;
30 get sourceOptions(): RecursivePartial<IOptions> | undefined;
31 actualOptions: Options;
32 readonly retina: Retina;
33 readonly canvas: Canvas;
34 readonly particles: Particles;
35 readonly drawer: FrameManager;
36 readonly drawers: Map<string, IShapeDrawer>;
37 readonly plugins: Map<string, IContainerPlugin>;
38 readonly pathGenerator: IMovePathGenerator;
39 private _options;
40 private _sourceOptions;
41 private paused;
42 private firstStart;
43 private drawAnimationFrame?;
44 private readonly eventListeners;
45 private readonly intersectionObserver?;
46 constructor(id: string, sourceOptions?: RecursivePartial<IOptions>, ...presets: string[]);
47 play(force?: boolean): void;
48 pause(): void;
49 draw(): void;
50 getAnimationStatus(): boolean;
51 setNoise(noiseOrGenerator?: IMovePathGenerator | ((particle: Particle) => Vector), init?: () => void, update?: () => void): void;
52 setPath(pathOrGenerator?: IMovePathGenerator | ((particle: Particle) => Vector), init?: () => void, update?: () => void): void;
53 destroy(): void;
54 exportImg(callback: BlobCallback): void;
55 exportImage(callback: BlobCallback, type?: string, quality?: number): void;
56 exportConfiguration(): string;
57 refresh(): Promise<void>;
58 reset(): Promise<void>;
59 stop(): void;
60 loadTheme(name?: string): Promise<void>;
61 start(): Promise<void>;
62 private init;
63 private intersectionManager;
64}