Skip to content

Instantly share code, notes, and snippets.

@BlackDante
Created July 3, 2016 14:44
Show Gist options
  • Save BlackDante/ef1339a6611c24bee9bc8d5bcb93095f to your computer and use it in GitHub Desktop.
Save BlackDante/ef1339a6611c24bee9bc8d5bcb93095f to your computer and use it in GitHub Desktop.
var requestAnimation, start;
start = null;
requestAnimation = function(timestamp) {
var progress;
if (!start) {
start = timestamp;
}
progress = timestamp - start;
console.log('RequestAnimationFrame: ' + progress);
return window.requestAnimationFrame(requestAnimation);
};
window.requestAnimationFrame(requestAnimation);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment