UNPKG

@tsparticles/plugin-polygon-mask

Version:

tsParticles polygon mask plugin

19 lines (18 loc) 506 B
import { isNull } from "@tsparticles/engine"; import { PolygonMaskDrawStroke } from "./PolygonMaskDrawStroke.js"; export class PolygonMaskDraw { constructor(engine) { this.enable = false; this.stroke = new PolygonMaskDrawStroke(engine); } load(data) { if (isNull(data)) { return; } if (data.enable !== undefined) { this.enable = data.enable; } const stroke = data.stroke; this.stroke.load(stroke); } }