// stats.js - http://github.com/mrdoob/stats.js var Stats=function(){function c(a){b.appendChild(a.dom);return a}function d(a){for(var c=0;cf+1E3&&(h.update(1E3*g/(b-f),100),f=b,g=0,void 0!==l)){var c=performance.memory;l.update(c.usedJSHeapSize/1048576,c.jsHeapSizeLimit/1048576)}return b},update:function(){a=this.end()}}}; Stats.Panel=function(c,d,e){var b=document.createElement("canvas");b.width=80;b.height=48;var a=b.getContext("2d");a.fillStyle=e;a.fillRect(0,0,80,48);a.font="bold 9px Helvetica,Arial,sans-serif";a.fillStyle=d;a.fillText(c,3,10);a.fillRect(3,15,74,30);a.fillStyle=e;a.globalAlpha=.9;a.fillRect(3,15,74,30);var f=Infinity,g=0,h=Math.round;return{dom:b,update:function(k,l){f=Math.min(f,k);g=Math.max(g,k);a.globalAlpha=1;a.fillStyle=e;a.fillRect(0,0,80,15);a.fillStyle=d;a.fillText(h(k)+" "+c+" ("+h(f)+ "-"+h(g)+")",3,10);a.drawImage(b,4,15,74,30,3,15,74,30);a.fillRect(76,15,1,30);a.fillStyle=e;a.globalAlpha=.9;a.fillRect(76,15,1,30-h(k/l*30))}}};"object"===typeof module&&(module.exports=Stats);