export class Sketch { constructor(width, height) { this.canvas = document.createElement("canvas"); this.canvas.width = width; this.canvas.height = height; this.ctx = this.canvas.getContext("2d"); document.body.appendChild(this.canvas); postMessage({ kind: "resize", width, height, }); } }