Tweening vs using Clock

Hi,

I have a general question about using tweening in 3D graphics.
Is it correct to use a tweener to, for example, rotate a camera, rather than using the Clock class to compute the delta between each frame to compute the rotation it should get for the current frame? Are both methods acceptable? is using a Clock preferable over tweening? Is it more accurate?

Thanks!

If you update TWEEN in the animation loop, then it will automatically calculate delta since the last time it was called.

function animate() {
    requestAnimationFrame(animate)
    TWEEN.update()
    render()
}
1 Like

If you are calling your tweener to perform some computation each frame based on the time passed since the last frame, what do you need the tweener for? Just for handling the computation of the delta itself? That can easily be done with Three’s Clock class. What do we earn from using a tweener here?