I have been working with three.js and have successfully animated some objects using the animate() function. Here's a snippet of my code:
function animate(){
object.position.z++;
}
The issue I'm facing is that this function is called every rendered frame, leading to varying speeds for my object on devices with different framerates. Is there a way to synchronize the animation based on seconds or milliseconds?
Thank you!