@adoratorio/aion
Version:
A js RAF engine
27 lines • 800 B
TypeScript
interface AionQueueObject {
readonly id: string;
readonly handler: (delta: number, frameId: number) => void;
readonly step: number;
}
interface AionOptions {
readonly autostop: boolean;
}
declare class Aion {
private readonly options;
private lastRAFId;
private frameId;
private lastNow;
private uidCounter;
private readonly queueIds;
stopped: boolean;
queue: readonly AionQueueObject[];
constructor(options: Partial<AionOptions>);
start(): void;
stop(force?: boolean): void;
frame(now: DOMHighResTimeStamp): void;
add(handler: (delta: number, frameId: number) => void, id?: string, step?: number): string | null;
remove(id: string): void;
has(id: string): boolean;
}
export default Aion;
//# sourceMappingURL=index.d.ts.map