We know we have two options for creating a render loop:
a):
animate();
function animate() {
requestAnimationFrame( animate );
render();
}
function render(){
. . . .
}
b):
renderer.setAnimationLoop( render );
function render(){
. . . .
}
The first one is only compatible to standard, non-VR projects.
The second one, is compatible to both VR and non-VR projects.
Since I first used renderer.setAnimationLoop() in WebXR, I’m always using it in all projects, as it seems to me more straightforward, and because it’s a single approach for everything, but I wonder, is there a slight performance difference known between the two (I haven’t noticed any)?
In some cases, maybe?
If not, why not ditch the other version …and adopt the single, all-compatible approach?