@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
33 lines • 879 B
TypeScript
/**
* Fires a given function every frame. Typical usage is to create an instance, invoke {@link #startup} and once no longer required - invoke {@link #shutdown}
* Wraps {@link requestAnimationFrame}
*/
export class FrameRunner {
/**
*
* @param {function(time_delta_sectonds?:number, current_time_seconds?:number):*} action
*/
constructor(action: any);
/**
*
* @type {Function}
*/
action: Function;
/**
* Begins animation loop. Does nothing and returns false if already running.
* @returns {boolean}
*/
startup(): boolean;
/**
* Stops animation loop. Does nothing and returns false if not currently running.
* @returns {boolean}
*/
shutdown(): boolean;
/**
*
* @returns {boolean}
*/
isRunning(): boolean;
#private;
}
//# sourceMappingURL=FrameRunner.d.ts.map