Hi @alex
I would like to compute FPS on my custom speckle viewer.
In pure three.js, I could use stats.js:
PERFORMANCE.md
# Three.js Performance Guide
### Performance Monitoring
To monitor CPU usage while running your Three.js application, you can utilize Chrome DevTools :

#### Monitoring Draw Calls
You can easily check the number of draw calls made by the renderer using the following code:
This file has been truncated. show original
I was able to make the panel appear with:
import Stats from 'three/addons/libs/stats.module.js';
const stats = new Stats();
document.body.appendChild(stats.dom);
But the panel remains empty, as I have to add this code, but I don’t know where, as the function animate() is handled by the speckle-viewer library:
function animate() {
stats.begin();
renderer.render(scene, camera);
stats.end();
requestAnimationFrame(animate);
}
Thanks
alex
(Alex)
10 June 2026 15:43
2
Hi @RaphaelVouilloz
You should be able to use the provided extension callbacks and call stats.begin from either onEarlyUpdate or onLateUpdate and a stats.end from onRender. Depends on what exactly you want to capture
Cheers
1 Like
Thank @alex ,
I have been able to achieve what I wanted
1 Like