Quantcast
Channel: Code Theory
Viewing all articles
Browse latest Browse all 229

Controlling the Frame Rate with requestAnimationFrame

$
0
0

Limiting the frame rate while using requestAnimationFrame can be a common want especially when coding Games where you want your animations and mechanics to not exceed a particular mark of frames per second. Let’s go through 2 ways of doing it. Quick and Easy Way Using setTimeout inside the rAF is an easy way. Nothing [...]

The post Controlling the Frame Rate with requestAnimationFrame appeared first on Code Theory.


Viewing all articles
Browse latest Browse all 229

Trending Articles