Use requestAnimationFrame to schedule renders