phaser/v3/typings/dom/RequestAnimationFrame.d.ts

34 lines
1 KiB
TypeScript
Raw Normal View History

2017-01-16 21:43:07 +00:00
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2016 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Abstracts away the use of RAF or setTimeOut for the core game update loop.
*
* @class Phaser.RequestAnimationFrame
* @constructor
* @param {Phaser.Game} game - A reference to the currently running game.
* @param {boolean} [forceSetTimeOut=false] - Tell Phaser to use setTimeOut even if raf is available.
*/
export default class RequestAnimationFrame {
game: any;
isRunning: any;
tick: any;
isSetTimeOut: any;
timeOutID: any;
constructor(game: any);
/**
* Starts the requestAnimationFrame running or setTimeout if unavailable in browser
* @method Phaser.RequestAnimationFrame#start
*/
start(): void;
step(timestamp: any): void;
/**
* Stops the requestAnimationFrame from running.
* @method Phaser.RequestAnimationFrame#stop
*/
stop(): void;
destroy(): void;
}