Use requestAnimationFrame for rendering loops, not for your game logic
chandlerprall.com