Use requestAnimationFrame for improved perfs