phoboslab / Impact

HTML5 Game Engine
MIT License
2k stars 201 forks source link

requestAnimationFrame should only take 1 argument #48

Closed Joncom closed 5 years ago

Joncom commented 5 years ago

We are passing the canvas to it for some reason:

https://github.com/phoboslab/Impact/blob/1425a041e3a85fa00bc8e7a86d6f84aab67a6104/lib/impact/impact.js#L433-L438

But it's not a valid argument and doesn't do anything: https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame#Syntax