feat(#8): improve performance
This commit is contained in:
parent
32dd2ad599
commit
07c64eadeb
4 changed files with 43 additions and 31 deletions
|
@ -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 };
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue