a lightweight wrapper on requestAnimationFrame