UNPKG

@tsparticles/plugin-polygon-mask

Version:

tsParticles polygon mask plugin

11 lines (10 loc) 921 B
import { type Engine, type ICoordinates, Vector } from "@tsparticles/engine"; import type { IPolygonMaskDrawStroke } from "./Options/Interfaces/IPolygonMaskDrawStroke.js"; import type { ISvgPath } from "./Interfaces/ISvgPath.js"; export declare function drawPolygonMask(engine: Engine, context: CanvasRenderingContext2D, rawData: ICoordinates[], stroke: IPolygonMaskDrawStroke): void; export declare function drawPolygonMaskPath(engine: Engine, context: CanvasRenderingContext2D, path: Path2D, stroke: IPolygonMaskDrawStroke, position: ICoordinates): void; export declare function parsePaths(paths: ISvgPath[], scale: number, offset: ICoordinates): ICoordinates[]; export declare function calcClosestPointOnSegment(s1: ICoordinates, s2: ICoordinates, pos: ICoordinates): ICoordinates & { isOnSegment: boolean; }; export declare function segmentBounce(start: ICoordinates, stop: ICoordinates, velocity: Vector): void;