added headers and tests

This commit is contained in:
Gregory Dalton
2013-11-19 01:40:09 -08:00
parent b183d98888
commit 02be662e93
2 changed files with 28 additions and 5 deletions
+21
View File
@@ -0,0 +1,21 @@
/// <reference path="stats.d.ts" />
var stats = new Stats();
stats.setMode(1); // 0: fps, 1: ms
// Align top-left
stats.domElement.style.position = 'absolute';
stats.domElement.style.left = '0px';
stats.domElement.style.top = '0px';
document.body.appendChild( stats.domElement );
setInterval( function () {
stats.begin();
// your code goes here
stats.end();
}, 1000 / 60 );
+7 -5
View File
@@ -1,13 +1,15 @@
/**
* @author mrdoob / http://mrdoob.com/
* stats.js - http://github.com/mrdoob/stats.js
*/
// Type definitions for Stats.js r11
// Project: http://github.com/mrdoob/stats.js
// Definitions by: Gregory Dalton <https://github.com/gregolai>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare class Stats {
REVISION: number;
domElement: HTMLDivElement;
// 0: fps, 1: ms
setMode(value: number): void;
begin(): void;
@@ -15,4 +17,4 @@ declare class Stats {
end(): number;
update(): void;
}
}