Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
fallback to setTimeout if requestAnimatinoFrame isn't available
Browse files Browse the repository at this point in the history
  • Loading branch information
willbailey committed Mar 11, 2015
1 parent b9427f7 commit c70a1c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rebound.js
Expand Up @@ -1116,7 +1116,10 @@
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.msRequestAnimationFrame ||
window.oRequestAnimationFrame;
window.oRequestAnimationFrame ||
function(callback) {
window.setTimeout(callback, 1000 / 60);
};
}
if (!_onFrame && typeof process !== 'undefined' && process.title === 'node') {
_onFrame = setImmediate;
Expand Down

0 comments on commit c70a1c6

Please sign in to comment.