--- id: anim-frame name: Anim.frame category: anim kind: namespace-method tokens: Anim.frame sig: Anim.frame(timer, fps, count) -> int tip: The looping frame index for an elapsed timer at a given fps. order: 1 ns: Anim member: frame --- Returns the current frame of a looping clip: floor(timer * fps) reduced modulo count. timer is elapsed seconds as a fixed, fps the clip's frames per second, and count the number of frames. The clip wraps forever — frame count-1 is followed by frame 0. Parameters: - `timer` — elapsed seconds (a `fixed`) - `fps` — frames per second - `count` — number of frames in the clip ```ludic program Demo { property Sprite { timer: fixed = 0.0 } model Hero { Sprite } handler Run phase Update { Sprite.timer = Sprite.timer + Time.delta() let cell = Anim.frame(Sprite.timer, 12, 4) # 4-frame run at 12 fps print(cell) } } ```