Skip to content

Commit

Permalink
Fix canvas rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
cafeed28 committed Mar 5, 2023
1 parent 971873f commit 268e6dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ function getContext(width: number, height: number): CanvasRenderingContext2D {
canvas.height = height;
canvas.id = CANVAS_ID;

// document.querySelector(".sidebar-1tnWFu")?.appendChild(canvas); // used to debug canvas, but it's funny so you can uncomment it
document.querySelector("head")?.appendChild(canvas); // doesn't work without this
}
console.log(canvas);

const context = canvas.getContext("2d", { willReadFrequently: true });
if (!context) throw Error("Canvas)");
Expand Down

0 comments on commit 268e6dc

Please sign in to comment.