Virtual Reality devices handle requestAnimationFrame() differently than normal web pages. This means that our current animate function will not work as a WebVR app.
To make dealing with this easier, a new method called setAnimationLoop was recently added to the WebGLRenderer. This handles setting up of the animation loop for us and makes sure that it works no matter what kind of device we are viewing our app on.
As an added bonus using this method actually makes our code a little cleaner, since calling requestAnimationFrame is handled automatically for us.
renderer.setAnimationLoop( () => {
update();
render();
} );