Split `onAnimationFrame` in to per-state methods