Skip to content

drecom/stats.js

 
 

Repository files navigation

@drecom/stats.js

npm license

@drecom/stats.js is a customized mrdoob/stats.js

What changed?

  • Combined all the stats.js monitors into one.
  • Added getters of various parameters.
  • Added text display area.
  • Reduced drawing load. (but, reduced drawing frequency. Optional changeable.)

customized.png

  • FPS Frames rendered in the last second. The higher the number the better.
  • MS Maximum number of milliseconds between graph drawing. The lower the number the better.
  • MB MBytes of allocated js memory. (Enabled by default in Chrome for desktop 69 and later)

Usage

var stats = new Stats({maxFPS:60, maxMem:100}); // Set upper limit of graph
document.body.appendChild( stats.dom );

function animate() {

    stats.begin();

    // monitored code goes here

    stats.end();

    requestAnimationFrame( animate );
}

animate();

About

JavaScript Performance Monitor

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%