graphical output in code blocks

This commit is contained in:
りき萌 2024-02-18 00:29:58 +01:00
parent 565b6a0520
commit 51de33c2b5
13 changed files with 351 additions and 57 deletions

16
static/js/sandbox.js Normal file
View file

@ -0,0 +1,16 @@
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,
});
}
}