Render only on object move

I’ve read you can save some CPU power by only rendering when the camera moves etc. could someone help explain how this would work in this forked example by Piotr Stylinski so I only render on WASD Move? I know I need to move “renderer.render( scene0, camera0 );” out of animate() but put it where?

I don’t think this can be easily done since the Player.update() method expects a small and variable delta values that you only get with an animation loop. If you remove it, the resulting delta will become way to big which leads to an undefined behavior.

You can only achieve on-demand rendering in your app if you refactor it so it works with a fixed update steps. Something like: https://jsfiddle.net/wfxqjzvh/

However, the result is not satisfying since fixed update steps do not work well if you only render on certain events. The result feels not smooth.