Replacing requestAnimationFrame with setAnimationLoop

apart from webxr is there any disadvantage/advantage by changing from requestAnimationFrame to renderer.setAnimationLoop() ?

my old project was done with requestAnimationFrame and after adding webxr AR support i have switched to setAnimationLoop

so i as wondering if there were any disadvantage of setAnimationLoop when used in non webxr situation.

another way to phrase it would be
if all the examples from three js/examples are updated to use setAnimationLoop will they work as expected on all platforms?

@Mugen87 any suggestions ?

Apart from WebXR using setAnimationLoop() is just syntax sugar right now.

2 Likes

setAnimationLoop will cancel the middle and right clicks on bluetooth mice connected to mobile/tablet, so if you had OrbitControls working with requestAnimationFrame, with setAnimationLoop it will stop working and you will not have zoom and pan from your mouse.