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