@tsparticles/plugin-polygon-mask
Version:
tsParticles polygon mask plugin
31 lines (30 loc) • 832 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PolygonMaskLocalSvg = void 0;
const engine_1 = require("@tsparticles/engine");
class PolygonMaskLocalSvg {
constructor() {
this.path = [];
this.size = {
height: 0,
width: 0,
};
}
load(data) {
if ((0, engine_1.isNull)(data)) {
return;
}
if (data.path !== undefined) {
this.path = data.path;
}
if (data.size !== undefined) {
if (data.size.width !== undefined) {
this.size.width = data.size.width;
}
if (data.size.height !== undefined) {
this.size.height = data.size.height;
}
}
}
}
exports.PolygonMaskLocalSvg = PolygonMaskLocalSvg;