From 0bca522c59ac06a49c328a4184ffc1dfc0513edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D1=97=D0=BB=20=D0=93=D1=80=D0=B8?= =?UTF-8?q?=D0=B3=D0=BE=D1=80=27=D1=94=D0=B2?= Date: Sun, 13 Apr 2025 04:39:01 +0300 Subject: [PATCH] Remove some outdated browser checks Also remove some type definitions that are definitely no longer needed or were never correct. --- src/js/application.js | 5 +---- src/js/core/animation_frame.js | 1 - src/js/states/preload.js | 6 ------ 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/js/application.js b/src/js/application.js index 4a0bc895..2de49a7d 100644 --- a/src/js/application.js +++ b/src/js/application.js @@ -79,9 +79,6 @@ export class Application { // Track if the window is visible this.pageVisible = true; - // Track if the app is paused (cordova) - this.applicationPaused = false; - /** @type {TypedTrackedState} */ this.trackedIsRenderable = new TrackedState(this.onAppRenderableStateChanged, this); @@ -232,7 +229,7 @@ export class Application { * Returns if the app is currently visible */ isRenderable() { - return !this.applicationPaused && this.pageVisible; + return this.pageVisible; } onAppRenderableStateChanged(renderable) { diff --git a/src/js/core/animation_frame.js b/src/js/core/animation_frame.js index 03e4c69a..1e0de209 100644 --- a/src/js/core/animation_frame.js +++ b/src/js/core/animation_frame.js @@ -42,7 +42,6 @@ export class AnimationFrame { } start() { - assertAlways(window.requestAnimationFrame, "requestAnimationFrame is not supported!"); this.handleAnimationFrame(); } diff --git a/src/js/states/preload.js b/src/js/states/preload.js index 44535af7..8ff9d98e 100644 --- a/src/js/states/preload.js +++ b/src/js/states/preload.js @@ -43,10 +43,6 @@ export class PreloadState extends GameState { this.startLoading(); } - async sendBeacon() { - // TODO: Get rid of this analytics stuff - } - onLeave() { // this.dialogs.cleanup(); } @@ -227,8 +223,6 @@ export class PreloadState extends GameState { showFailMessage(text) { logger.error("App init failed:", text); - const email = "bugs@shapez.io"; - const subElement = document.createElement("div"); subElement.classList.add("failureBox");