import Looper = require('./Looper'); /** * Looper based on the HTML-5 RequestAnimationFrame API. * * This looper has the property that it will not be called if the browser page is hidden in some way, since it gets * executed before each redraw of the page. */ declare class RequestAnimationFrame implements Looper.Looper { private cb; private handle; /** * Create a RAF-based Looper that will invoke the given callback. * * If the callback returns false, the Looper will cancel any future invocations. * * @param {Function} cb callback that will be invoked by this looper. */ constructor(cb: () => boolean); start(): void; stop(): void; isRunning(): boolean; /** * Determines whether the current environment supports update loops based on frame refreshes. * * If this method returns false, the RequestAnimationFrame-based Looper will fail to work. */ static isAvailable(): boolean; } export = RequestAnimationFrame;