Skip to content

Instantly share code, notes, and snippets.

View blooddy's full-sized avatar

Nick Ryzhy blooddy

View GitHub Profile
@blooddy
blooddy / requestAnimationFrame.js
Last active January 4, 2017 18:05 — forked from paulirish/rAF.js
requestAnimationFrame polyfill
/** @type {function((Function|string)):number} */
var requestAnimationFrame = window.requestAnimationFrame || ( function() {
/** @type {Array.<Function>} */
var queue = [];
/** @type {number} */
var last = Date.now() - 100 / 6;
( function frame() {