requestAnimationFrame loop not correct FPS

后端 未结 2 1737
情深已故
情深已故 2021-02-04 19:26

I have a javascript function that my game loops through (hopefully) 60 times a second that controls input, drawing, etc.

The way it is currently coded it seems to be alw

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-04 19:50

    The functions purpose isnt to have 60 FPS, but to draw while a frame is beeing drawn and make the performance better. No computer will stay perfectly at 60 FPS. Also, why is your requestAnimationFrame IN the timeout?

提交回复
热议问题