UNPKG

472 BTypeScriptView Raw
1declare type UpdateCallback = (time: number) => void;
2declare type EndCallback = () => void;
3declare class Timeline {
4 playing: boolean;
5 paused: boolean;
6 pausedTime: number;
7 duration: number;
8 animationFrameNumber: any;
9 onUpdate: UpdateCallback;
10 onEnd: EndCallback;
11 play(duration: number, onUpdate: UpdateCallback, onEnd: EndCallback): void;
12 pause(): void;
13 stop(): void;
14 end(): void;
15 abort(): void;
16}
17export default Timeline;