Skip to content

Commit

Permalink
call reset method
Browse files Browse the repository at this point in the history
  • Loading branch information
arjanfrans committed Apr 12, 2024
1 parent 2fe3b36 commit 00f924a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ async function renderCanvas(
canvas.width = 900;
canvas.height = 1600;

ctx.reset();
if (typeof ctx.reset === "function") {
ctx.reset();
}

ctx.fillStyle = "#000000";
ctx.fillRect(0, 0, canvas.width, canvas.height);

Expand Down

0 comments on commit 00f924a

Please sign in to comment.