fix(3d-nds): set camera to null when switching to 2d, don't check for lags before app is booted and lower fps threshold to 30

This commit is contained in:
2026-03-15 17:44:43 +01:00
parent 623401ca36
commit fa73841098
2 changed files with 3 additions and 2 deletions

View File

@@ -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;
}