@tsparticles/plugin-canvas-mask
Version:
tsParticles canvas mask plugin
19 lines (18 loc) • 426 B
JavaScript
import { isNull } from "@tsparticles/engine";
export class CanvasMaskOverride {
constructor() {
this.color = true;
this.opacity = false;
}
load(data) {
if (isNull(data)) {
return;
}
if (data.color !== undefined) {
this.color = data.color;
}
if (data.opacity !== undefined) {
this.opacity = data.opacity;
}
}
}