animation-frame-loop
Version:
A small wrapper to take care of tracking delta time between frames. Useful for animations or other frame reliant things.
13 lines (12 loc) • 346 B
TypeScript
import type { FrameTime } from "./types";
export declare class AnimationFrameLoop {
private callback;
private request;
private lastTime;
private totalElapsedTime;
private totalFrameCountInSecond;
private currentFps;
private lastFpsUpdate;
constructor(callback: (params: FrameTime) => void);
destroy(): void;
}