export class uLayer { #objects; constructor(name, objects) { // TODO: check types this.#objects = Array(); objects.forEach((object) => { this.#objects.push(object); }); } add(object) { this.#objects.push(object); } objects() { return this.#objects; } } class uObject { constructor(x, y, w, h) { this.x = x; this.y = y; this.width = w; this.height = h; } } export class uRect extends uObject { constructor(x, y, w, h, fillColor = 'white') { super(x, y, w, h); this.fillColor = fillColor; } } export class uStrokeRect extends uRect { constructor(x, y, w, h, fillColor = 'white', strokeColor = 'black', strokeWidth = 1) { super(x, y, w, h, fillColor); this.strokeWidth = strokeWidth; this.strokeColor = strokeColor; } }