Skip to content

Instantly share code, notes, and snippets.

View Orlandohub's full-sized avatar
:shipit:

Orlando Goncalves Orlandohub

:shipit:
  • Hyphen
  • Helsingborg, Sweden
View GitHub Profile
@Orlandohub
Orlandohub / timeBasedAnimationPattern.js
Created April 10, 2017 10:43 — forked from greypants/timeBasedAnimationPattern.js
JS: Time-based animation pattern
// Full Blog Post: http://viget.com/extend/time-based-animation
// requestAnimationFrame() polyfill: https://gist.github.com/1579671
window.APP = window.APP || {};
APP.pause = function() {
window.cancelAnimationFrame(APP.core.animationFrame);
};
APP.play = function() {