@tsparticles/plugin-canvas-mask
Version:
tsParticles canvas mask plugin
32 lines (31 loc) • 843 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FontTextMask = void 0;
const engine_1 = require("@tsparticles/engine");
class FontTextMask {
constructor() {
this.family = "sans-serif";
this.size = 100;
}
load(data) {
if ((0, engine_1.isNull)(data)) {
return;
}
if (data.family !== undefined) {
this.family = data.family;
}
if (data.size !== undefined) {
this.size = data.size;
}
if (data.style !== undefined) {
this.style = data.style;
}
if (data.variant !== undefined) {
this.variant = data.variant;
}
if (data.weight !== undefined) {
this.weight = data.weight;
}
}
}
exports.FontTextMask = FontTextMask;