Question: 6. Setting the frame rate 1 point possible (graded) We have a mainloop that targets 60 frames/second and we use the requestAnimationFrame API for implementing
6. Setting the frame rate 1 point possible (graded) We have a mainloop that targets 60 frames/second and we use the requestAnimationFrame API for implementing it. How can we set the frame rate to nearly 37 frames/s, for example? O We can measure the deltas of time between frames, and sum them up. If the sum is superior to the delay that corresponds to 1/37s, then we draw the frame, otherwise we do nothing. O We should stop using requestAnimationFrame and use setInterval instead - it's better. O We can't
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
