From 1ecf26e7b3337fe136df5cabb464b7108fd0dbf6 Mon Sep 17 00:00:00 2001 From: Erik Onarheim Date: Sat, 3 Aug 2024 21:29:47 -0500 Subject: [PATCH] fix blurriness --- src/main.ts | 5 ++++- src/resources.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index e6290b4..f00397b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -42,4 +42,7 @@ const game = new ex.Engine({ }) AudioManager.init(); // start game -game.start(loader); +game.start(loader).then(() => { + game.screen.pixelRatioOverride = 4; + game.screen.applyResolutionAndViewport(); +}); diff --git a/src/resources.ts b/src/resources.ts index bd86ee5..a0dc745 100644 --- a/src/resources.ts +++ b/src/resources.ts @@ -59,7 +59,7 @@ class DevLoader extends ex.Loader { dispose() {} } -export const loader = +export const loader = new DevLoader(); process.env.NODE_ENV === 'development' ? new DevLoader() : new ex.Loader() for (const group of Object.values(Resources)) {