fix preview feature and generally clean up view state progression

This commit is contained in:
Stewart Allen 2020-11-15 13:44:48 -05:00
commit 76d2ad5530
4 changed files with 40 additions and 23 deletions

View file

@ -154,7 +154,10 @@
UI.fps.style.display = on ? 'block' : '';
if (on) {
setInterval(() => {
UI.fps.innerText = SPACE.view.getFPS().toFixed(2);
const nv = SPACE.view.getFPS().toFixed(2);
if (nv !== UI.fps.innerText) {
UI.fps.innerText = nv;
}
}, 100);
}
}