@tsparticles/plugin-polygon-mask
Version:
tsParticles polygon mask plugin
18 lines (17 loc) • 499 B
JavaScript
import { isNull, loadProperty, } from "@tsparticles/engine";
import { PolygonMaskDrawStroke } from "./PolygonMaskDrawStroke.js";
export class PolygonMaskDraw {
enable = false;
stroke;
constructor(pluginManager) {
this.stroke = new PolygonMaskDrawStroke(pluginManager);
}
load(data) {
if (isNull(data)) {
return;
}
loadProperty(this, "enable", data.enable);
const stroke = data.stroke;
this.stroke.load(stroke);
}
}