We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd5bdb6 commit f596fb1Copy full SHA for f596fb1
raylib.js
@@ -74,12 +74,12 @@ class RaylibJs {
74
75
const canvas = document.getElementById(canvasId);
76
if (!canvas) {
77
- throw new Error('Canvas element not found')
+ throw new Error("Canvas element not found");
78
}
79
80
- this.ctx = setupCanvas(canvas);
+ this.ctx = canvas.getContext("2d");
81
if (!this.ctx) {
82
- throw new Error("Could not create 2d canvas context")
+ throw new Error("Could not create 2d canvas context");
83
84
85
const { height, width } = ctx.canvas.getBoundingClientRect();
0 commit comments