mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
33 lines
1 KiB
TypeScript
33 lines
1 KiB
TypeScript
/**
|
|
* @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;
|
|
}
|