diff --git a/app/components/NDS3D.vue b/app/components/NDS3D.vue index 62826eb..6f080df 100644 --- a/app/components/NDS3D.vue +++ b/app/components/NDS3D.vue @@ -199,7 +199,7 @@ watch( const { onRender, onBeforeRender } = useLoop(); -const LAG_FPS_THRESHOLD = 40; +const LAG_FPS_THRESHOLD = 30; const LAG_DURATION_SECS = 5; let lagSeconds = 0; let lagCheckDone = false; @@ -352,7 +352,7 @@ onBeforeRender(() => { const delta = (now - lastFrameTime) / 1000; lastFrameTime = now; - if (document.hidden || delta > 0.5) { + if (document.hidden || delta > 0.5 || !app.booted) { lagSeconds = 0; return; } diff --git a/app/stores/app.ts b/app/stores/app.ts index 384136a..ff5afb9 100644 --- a/app/stores/app.ts +++ b/app/stores/app.ts @@ -70,6 +70,7 @@ export const useAppStore = defineStore("app", { this.ready = mode === "2d"; this.settings.renderingMode = mode; this.lagDetected = false; + if (mode === "2d") this.camera = null; this.save(); },