xeokit-sdk
xeokit-sdk copied to clipboard
Pause FPS measurement when no scenes are drawn
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.