UNPKG

tsparticles

Version:

Porting of the abandoned Vincent Garreau's particles.js, converted in TypeScript. Added many new cool features and various bug fixes.

35 lines (34 loc) 953 B
export class ImageShape { constructor() { this.height = 100; this.replaceColor = true; this.src = ""; this.width = 100; this.fill = true; this.close = true; } get replace_color() { return this.replaceColor; } set replace_color(value) { this.replaceColor = value; } load(data) { var _a; if (data !== undefined) { if (data.height !== undefined) { this.height = data.height; } const replaceColor = (_a = data.replaceColor) !== null && _a !== void 0 ? _a : data.replace_color; if (replaceColor !== undefined) { this.replaceColor = replaceColor; } if (data.src !== undefined) { this.src = data.src; } if (data.width !== undefined) { this.width = data.width; } } } }