@tsparticles/plugin-polygon-mask
Version:
tsParticles polygon mask plugin
23 lines (22 loc) • 703 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PolygonMaskDraw = void 0;
const engine_1 = require("@tsparticles/engine");
const PolygonMaskDrawStroke_js_1 = require("./PolygonMaskDrawStroke.js");
class PolygonMaskDraw {
constructor(engine) {
this.enable = false;
this.stroke = new PolygonMaskDrawStroke_js_1.PolygonMaskDrawStroke(engine);
}
load(data) {
if ((0, engine_1.isNull)(data)) {
return;
}
if (data.enable !== undefined) {
this.enable = data.enable;
}
const stroke = data.stroke;
this.stroke.load(stroke);
}
}
exports.PolygonMaskDraw = PolygonMaskDraw;