I have multiple cameras in the scene between which I’m switching back and forth. I’m trying to use only one animate loop since it’s basically the same for all cameras.
Sadly, I get an error when running this: ‘THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.’
Seems like the parameter passing doesn’t work.
Hope someone can help!
cam parameter represent a time value. Check out the MDN for more information:
The callback function is passed one single argument, a
DOMHighResTimeStamp similar to the one returned by
performance.now() , indicating the point in time when
requestAnimationFrame() starts to execute callback functions.
Thank you for your reply! So it is not possible?
No, you can’t pass the camera as a parameter to your animation loop.
That’s a bummer. Thank you for your replay!