1 | import type { Container } from "../../Core/Container";
|
2 | import type { ICoordinates } from "../../Core/Interfaces/ICoordinates";
|
3 | import { Particle } from "../../Core/Particle";
|
4 | import type { IDimension } from "../../Core/Interfaces/IDimension";
|
5 | import type { ISvgPath } from "./Interfaces/ISvgPath";
|
6 | import type { IContainerPlugin } from "../../Core/Interfaces/IContainerPlugin";
|
7 | import type { IOptions } from "../../Options/Interfaces/IOptions";
|
8 | import type { RecursivePartial } from "../../Types";
|
9 | import type { IPolygonMask } from "./Options/Interfaces/IPolygonMask";
|
10 | import { PolygonMask } from "./Options/Classes/PolygonMask";
|
11 | declare type IPolygonMaskOptions = IOptions & {
|
12 | polygon: IPolygonMask;
|
13 | };
|
14 | export declare class PolygonMaskInstance implements IContainerPlugin {
|
15 | private readonly container;
|
16 | redrawTimeout?: number;
|
17 | raw?: ICoordinates[];
|
18 | paths?: ISvgPath[];
|
19 | dimension: IDimension;
|
20 | offset?: ICoordinates;
|
21 | readonly path2DSupported: boolean;
|
22 | readonly options: PolygonMask;
|
23 | private polygonMaskMoveRadius;
|
24 | constructor(container: Container);
|
25 | initAsync(options?: RecursivePartial<IPolygonMaskOptions>): Promise<void>;
|
26 | resize(): void;
|
27 | stop(): void;
|
28 | particlesInitialization(): boolean;
|
29 | particlePosition(position?: ICoordinates): ICoordinates | undefined;
|
30 | particleBounce(particle: Particle): boolean;
|
31 | clickPositionValid(position: ICoordinates): boolean;
|
32 | draw(context: CanvasRenderingContext2D): void;
|
33 | private checkInsidePolygon;
|
34 | private parseSvgPath;
|
35 | private downloadSvgPath;
|
36 | private drawPoints;
|
37 | private randomPoint;
|
38 | private getRandomPoint;
|
39 | private getRandomPointByLength;
|
40 | private getEquidistantPointByIndex;
|
41 | private getPointByIndex;
|
42 | private createPath2D;
|
43 | private initRawData;
|
44 | }
|
45 | export {};
|