Created
May 14, 2023 06:52
-
-
Save flushpot1125/170f22e290da4924e30d1f678e64f510 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
engine.runRenderLoop(() => { | |
const startCPUTime = BABYLON.PrecisionDate.Now; | |
scene.render(); | |
const endCPUTime = BABYLON.PrecisionDate.Now; | |
t = (t + 1) % 10; | |
// Prevent hammering the composition. | |
if (t === 0) { | |
divFps.innerHTML = engine.getFps().toFixed() + " fps - " + ((endCPUTime - startCPUTime)).toFixed(2) + " CPU ms"; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment