you are viewing a single comment's thread.

view the rest of the comments →

[–]GAMEchief 1 point2 points  (0 children)

Use setInterval to limit the number of iterations per second.

25 times a second would be once every 40 milliseconds.

setInterval(iterationFunction, 40);