feat(#8): improve performance

This commit is contained in:
Juan Sebastián Montoya 2024-09-13 21:45:59 -05:00
parent 32dd2ad599
commit 07c64eadeb
4 changed files with 43 additions and 31 deletions

View file

@ -0,0 +1,7 @@
export function createCanvas(width, height) {
const canvas = document.createElement("canvas");
canvas.width = width;
canvas.height = height;
const ctx = canvas.getContext("2d");
return { ctx, canvas };
}