StatsJS plugin for Superpowers, the extensible HTML5 2D+3D game engine.
This class provides a simple info box that will help you monitor your code performance.
- FPS Frames rendered in the last second. The higher the number the better.
- MS Milliseconds needed to render a frame. The lower the number the better.
var statsFPS = new Stats();
statsFPS.setMode(0); // 0: fps, 1: ms
statsFPS.domElement.style.position = 'absolute';
statsFPS.domElement.style.left = '0px';
statsFPS.domElement.style.top = '0px';
document.body.appendChild( statsFPS.domElement );
setInterval( function () {
statsFPS.begin();
statsFPS.end();
}, 1000 / 60 );
var statsMS = new Stats();
statsMS.setMode(1); // 0: fps, 1: ms
statsMS.domElement.style.position = 'absolute';
statsMS.domElement.style.left = '100px';
statsMS.domElement.style.top = '0px';
document.body.appendChild( statsMS.domElement );
setInterval( function () {
statsMS.begin();
statsMS.end();
}, 1000 / 60 );
https://github.com/mrdoob/stats.js/
Download the latest release, unzip it, rename the folder to Jquery, move it inside app/plugins/fraxken/ then restart your server.