10 lines
273 B
TypeScript
10 lines
273 B
TypeScript
const c = document.querySelector<HTMLCanvasElement>("canvas#editor")!;
|
|
const g = c.getContext("2d")!;
|
|
|
|
c.width = document.body.clientWidth;
|
|
c.height = document.body.clientHeight;
|
|
c.style.position = "absolute";
|
|
|
|
g.fillStyle = "#aa2233";
|
|
g.fillRect(0, 0, c.width, c.height);
|