From 49d733c84dc142ca34aa4bec3a6f66203018d822 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Fri, 29 Dec 2023 09:52:03 +0000 Subject: Put back optimisations, prevent closure compiler from breaking code --- js/game.js | 6 +++--- min | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/game.js b/js/game.js index f87b8a9..b45e905 100644 --- a/js/game.js +++ b/js/game.js @@ -80,9 +80,9 @@ class Game { resize() { const scale = Math.floor(window.innerHeight / this.canvas.height); - this.canvas.style.imageRendering = "pixelated"; - this.canvas.style.transformOrigin = "top"; - this.canvas.style.transform = `scale(${scale})`; + this.canvas.style["imageRendering"] = "pixelated"; + this.canvas.style["transformOrigin"] = "top"; + this.canvas.style["transform"] = `scale(${scale})`; } loop(now) { diff --git a/min b/min index 07e92e0..8de3c24 100755 --- a/min +++ b/min @@ -1,4 +1,4 @@ #!/bin/bash mkdir -p out -java -jar ./tools/closure-compiler-v20231112.jar --js js/**.js --language_out ECMASCRIPT_2016 --js_output_file out/game.min.js +java -jar ./tools/closure-compiler-v20231112.jar --compilation_level ADVANCED_OPTIMIZATIONS --js js/**.js --language_out ECMASCRIPT_2016 --js_output_file out/game.min.js -- cgit v1.2.3