@drecom/stats.js
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@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();

Readme

Keywords

Package Sidebar

Install

npm i @drecom/stats.js

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

19.2 kB

Total Files

7

Last publish

Collaborators

  • takeshi-sakurai
  • dolow
  • zprodev