UNPKG

@tsparticles/plugin-polygon-mask

Version:

tsParticles polygon mask plugin

22 lines (21 loc) 987 B
import "./pathseg.js"; import { type IContainerPlugin, type ICoordinates, type IDelta, type IDimension, OutModeDirection, type Particle, type PluginManager } from "@tsparticles/engine"; import type { ISvgPath } from "./Interfaces/ISvgPath.js"; import type { PolygonMaskContainer } from "./types.js"; export declare class PolygonMaskInstance implements IContainerPlugin { #private; dimension: IDimension; offset?: ICoordinates; paths?: ISvgPath[]; raw?: ICoordinates[]; redrawTimeout?: number; constructor(pluginManager: PluginManager, container: PolygonMaskContainer); clickPositionValid(position: ICoordinates): boolean; draw(context: OffscreenCanvasRenderingContext2D): void; init(): Promise<void>; particleBounce(particle: Particle, delta: IDelta, direction: OutModeDirection): boolean; particlePosition(position?: ICoordinates): ICoordinates | undefined; particlesInitialization(): boolean; resize(): void; stop(): void; }