mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
added headers and tests
This commit is contained in:
@@ -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 );
|
||||
Vendored
+7
-5
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user