monitoring_fps
๐๏ธ 17032024 1253
Tags: #threejs #performance
| FPS metric | Implication |
|---|---|
| High | Application running smoothly / rendering frames efficiently ๐ Smooth and responsive experience for users |
| Variable | FPS fluctuating significantlyโ ๏ธ Indicating that there are performance issues |
| Low | Application struggling to render frames efficiently |
Usageโ
import Stats from "stats.js";
const stats = new Stats();
stats.showPanel(0); // 0: fps, 1: ms, 2: mb, 3+: custom
document.body.appendChild(stats.dom);
const tick = () => {
stats.begin();
// ...
stats.end();
};
SUMMARY
Better for FPS reading to be consistently high ๐