Using requestAnimationFrame instead of setTimeout
Merge pull request #2 from TheSavior/fix/requestAnimationFrame

Using requestAnimationFrame instead of setTimeout