Skip to content

Instantly share code, notes, and snippets.

View arxpoetica's full-sized avatar
🌼
Hope for a better world

Robert Hall arxpoetica

🌼
Hope for a better world
View GitHub Profile
@arxpoetica
arxpoetica / raf.js
Created April 7, 2013 15:53 — forked from rwaldron/raf.js
var rAF = "equestAnimationFrame";
window["r"+rAF] = window["r"+rAF] ||
window["webkitR"+rAF] ||
window["mozR"+rAF] ||
window["msR"+rAF] ||
window["oR"+rAF];
// A list
(function(window) {
var _lastTime = 0;
window.requestAnimationFrame =
window.requestAnimationFrame ||
function(callback) {
var currTime = new Date().getTime();
var timeToCall = Math.max(0, 16 - (currTime - _lastTime));
var id = window.setTimeout(function() {