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 [] to have a rotating animation as instructed.
Is this a bug? or shouldn’t the loop.tick() method be called somewhere?


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

1 Like