1 | import type { Container } from "./Container";
|
2 | import type { IContainerPlugin } from "./Interfaces/IContainerPlugin";
|
3 | import type { IDelta } from "./Interfaces/IDelta";
|
4 | import type { IDimension } from "./Interfaces/IDimension";
|
5 | import type { Particle } from "./Particle";
|
6 | export declare class Canvas {
|
7 | private readonly container;
|
8 | element?: HTMLCanvasElement;
|
9 | resizeFactor?: IDimension;
|
10 | readonly size: IDimension;
|
11 | private _colorPlugins;
|
12 | private _context;
|
13 | private _coverColorStyle?;
|
14 | private _generated;
|
15 | private readonly _mutationObserver?;
|
16 | private _originalStyle?;
|
17 | private _postDrawUpdaters;
|
18 | private _preDrawUpdaters;
|
19 | private _resizePlugins;
|
20 | private _trailFill?;
|
21 | constructor(container: Container);
|
22 | private get _fullScreen();
|
23 | clear(): void;
|
24 | destroy(): void;
|
25 | draw<T>(cb: (context: CanvasRenderingContext2D) => T): T | undefined;
|
26 | drawParticle(particle: Particle, delta: IDelta): void;
|
27 | drawParticlePlugin(plugin: IContainerPlugin, particle: Particle, delta: IDelta): void;
|
28 | drawPlugin(plugin: IContainerPlugin, delta: IDelta): void;
|
29 | init(): Promise<void>;
|
30 | initBackground(): void;
|
31 | initPlugins(): void;
|
32 | initUpdaters(): void;
|
33 | loadCanvas(canvas: HTMLCanvasElement): void;
|
34 | paint(): void;
|
35 | resize(): void;
|
36 | windowResize(): Promise<void>;
|
37 | private _applyPostDrawUpdaters;
|
38 | private _applyPreDrawUpdaters;
|
39 | private _applyResizePlugins;
|
40 | private _getPluginParticleColors;
|
41 | private _initCover;
|
42 | private _initStyle;
|
43 | private _initTrail;
|
44 | private _paintBase;
|
45 | private _paintImage;
|
46 | private _repairStyle;
|
47 | private _resetOriginalStyle;
|
48 | private _setFullScreenStyle;
|
49 | }
|