UNPKG

@tsparticles/plugin-canvas-mask

Version:

tsParticles canvas mask plugin

28 lines (27 loc) 688 B
import { isNull } from "@tsparticles/engine"; export class FontTextMask { constructor() { this.family = "sans-serif"; this.size = 100; } load(data) { if (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; } } }