call render in requestAnimationFrame