Skip to content

Instantly share code, notes, and snippets.

@felipap
Created October 6, 2013 20:46
Show Gist options
  • Save felipap/6858879 to your computer and use it in GitHub Desktop.
Save felipap/6858879 to your computer and use it in GitHub Desktop.
Coffee script version. ;)
window.AnimateOnFrameRate = do ->
# thanks, Paul Irish
window.requestAnimationFrame or
window.webkitRequestAnimationFrame or
window.mozRequestAnimationFrame or
window.oRequestAnimationFrame or
window.msRequestAnimationFrame or
(callback) ->
window.setTimeout callback, 1000/60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment