sethvincent / gameloop

game loop for javascript – server or browser.
http://crtrdg.com
53 stars 8 forks source link

Use raf in start method as well. #4

Closed drZymo closed 9 years ago

drZymo commented 9 years ago

I found a bug in the loop itself. Sometimes it only did one second of "update"+"draw" calls and then only "draw" calls. I think it has something to do with the timestamps. If you use raf in the start (as is done in the raf examples as well), then the timestamps are all managed by raf and the problem seems to be solved.

sethvincent commented 9 years ago

oh interesting! thanks.

drZymo commented 9 years ago

You're welcome!