xiazeyu / fpscounter

A fps counter package to let js know what's the maximum framerate that the client can run.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fpscounter

A fps counter for browsers

Useage

npm install fpscounter
import 'fpscounter';
console.log(window.fpsCounter.fps);
fps.counter.stop();
fps.counter.start();

Polyfill

window.requestAnimationFrame and window.cancelAnimationFrame may not supported by some browsers.

You can use import 'fpscounter/polyfill'; to polyfill it manually.

About

A fps counter package to let js know what's the maximum framerate that the client can run.

License:GNU General Public License v3.0


Languages

Language:JavaScript 94.7%Language:HTML 5.3%