Three.js: Is throttling / intelligent calling of rendering necessary?

Viewed 132

Currently I am using a simple loop in Three.js based on requestAnimationFrame:

...
requestAnimationFrame(animate); // initial call
...

function animate() {
    requestAnimationFrame(animate);

    // do something       

    renderer.render(scene, camera); // always render the scene
}

So the render function is called each time animate is executed via requestAnimationFrame. Is that considered good practise? Is the renderfunction optimized so that it does not rerender the scene if nothing (visible) has changed? Or do I have to throttle the call / call the function only if something has changed?

0 Answers
Related