Hi.
I am working on a project and I want to keep the frame rate at maximum 60fps, now sometimes it running at 170 + frames on my computer.
What is the best approach for this using requestanimationframe?
Hi.
I am working on a project and I want to keep the frame rate at maximum 60fps, now sometimes it running at 170 + frames on my computer.
What is the best approach for this using requestanimationframe?
Most likely this is not the best approach, but is rather straightforward and simple (I’ve used it several times):
Something like this:
if( currentTime - lastTime > 1000/60 )
{
renderer.render( scene, camera );
lastTime += 1000/60;
}
Thank you for your help!
Thank you for your help.
I have finished the product Plasmic Audio Player