setAnimationLoop does not work on cube

Good day, I’m a beginner learning threejs using the discover threejs book. However, I’ve been unable to get the cube in this chapter [https://discoverthreejs.com/book/first-steps/animation-loop] to have a rotating animation as instructed.
Is this a bug? or shouldn’t the loop.tick() method be called somewhere?

Thanks.

hey buddy, I think its better to use requestAnimationFrame like :

1 Like