From 30f753afd3e63c4e1abada33b184667d4abb7ba4 Mon Sep 17 00:00:00 2001 From: loglot <88983354+loglot@users.noreply.github.com> Date: Fri, 1 Sep 2023 14:26:40 -0500 Subject: [PATCH] berf --- main.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.js b/main.js index b3592e3..2b6e0d3 100644 --- a/main.js +++ b/main.js @@ -39,18 +39,18 @@ var scaleY = 0; function resizeCanvasForWindowSize() { - const currentWidth = canvas.width; - const currentHeight = canvas.height; + var currentWidth = canvas.width; + var currentHeight = canvas.height; // Get the current window dimensions - const windowWidth = window.innerWidth; - const windowHeight = window.innerHeight; + var windowWidth = window.innerWidth; + var windowHeight = window.innerHeight; // Calculate the desired width and height based on the window's dimensions - const desiredWidth = windowWidth; - const aspectRatio = originalWidth / originalHeight; - const desiredHeight = desiredWidth / aspectRatio; + var desiredWidth = windowWidth; + var aspectRatio = originalWidth / originalHeight; + var desiredHeight = desiredWidth / aspectRatio; canvas.width = desiredWidth; canvas.height = desiredHeight; scaleX = (desiredWidth / originalWidth);