A fps counter for browsers
npm install fpscounter
import 'fpscounter';
console.log(window.fpsCounter.fps);
fps.counter.stop();
fps.counter.start();
window.requestAnimationFrame
and window.cancelAnimationFrame
may not supported by some browsers.
You can use import 'fpscounter/polyfill';
to polyfill it manually.