xeokit-sdk icon indicating copy to clipboard operation
xeokit-sdk copied to clipboard

Pause FPS measurement when no scenes are drawn

Open MuehlichM opened this issue 2 years ago • 0 comments

https://github.com/xeokit/xeokit-sdk/blob/f10140afbda4265c4bd3a6c97b49963a51545ae6/src/viewer/scene/core.js#L155

core.js frame() starts an endless FPS measurement-loop. Although the loop is bound to requestAnimationFrame, it may produce an unnecessary CPU load, especially if there are no xeokit-scenes to render at all. It would be better to stop this loop when no scenes are present and to re-start it when scenes are loaded.

MuehlichM avatar Aug 23 '22 13:08 MuehlichM