@tsparticles/plugin-polygon-mask
Version:
tsParticles polygon mask plugin
26 lines (25 loc) • 635 B
JavaScript
import { isNull, loadProperty, } from "@tsparticles/engine";
export class PolygonMaskLocalSvg {
path = [];
size;
constructor() {
this.size = {
height: 0,
width: 0,
};
}
load(data) {
if (isNull(data)) {
return;
}
loadProperty(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;
}
}
}
}