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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user