interface LoopingEvents { onPause?(this: Looping): void; onResume?(this: Looping): void; onStats?(this: Looping, stats?: LoopingStats): void; onError?(this: Looping, error?: Error): void; } interface LoopingConfig { /** amount of ticks used to calculate the frame rate */ tickStorage?: number; /** maximum tick interpolation at one frame */ maxInterpolation?: number; /** interval for event `stats` to trigger */ statsInterval?: number; } export interface LoopingOptions extends LoopingEvents, LoopingConfig { /** minimun length of a tick */ tickRate?: number; /** number of skipped frames after rendering */ skipFrame?: number; } export interface LoopingStats { /** average number of ticks in a second */ tickRate: number; /** average number of frames in a second */ frameRate: number; /** the proportion of dropped frames */ dropRate: number; } export default class Looping implements LoopingEvents { /** @private looping properties */ private __loop__; update?(): void; render?(): void; onPause?(this: Looping): void; onResume?(this: Looping): void; onStats?(this: Looping, stats?: LoopingStats): void; onError?(this: Looping, error?: Error): void; constructor(options?: LoopingOptions); /** initialize */ initialize(options?: LoopingOptions): this; /** pause */ pause(): void; /** resume */ resume(): void; /** change status between pause and resume */ toggle(): void; /** get current status */ getStatus(): LoopingStats; private _render; } export {};