Javascript - Can't Adjust FrameRate - requestanimationframe
问题 I start the loop function gameLoop(){ update(); draw(); requestAnimFrame(gameLoop); } var requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 1); }; I can't adjust the frame rate. It is always really fast. Why can't I change it to 1 frame a second. I want to do this just for testing purposes. Do I