This commit is contained in:
An Orbit 2025-02-05 20:34:15 -05:00 committed by GitHub
parent 939556ad1a
commit 34b20213d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -3286,7 +3286,10 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
gameCanvas = document.getElementById("game");
canvas = document.getElementById("game");
ctx = gameCanvas.getContext("2d");
ctx = gameCanvas?.getContext?.("2d");
if(!ctx) { window.addEventListener("load",function() {
ctx = gameCanvas.getContext("2d")
})}
function setCanvasWidthAndHeight(ctx) {
if (window.innerWidth < 700) {