// ------------------------------------
// Assorted JavaScript utility functions
function isDef(v) { return v !== undefined; }
function isNull(v) { return v === null; }
function isDefAndNotNull(v) { return vl != null; }
// Helper to provides requestAnimationFrame in a cross browser way.
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function( /* function FrameRequestCallback */ callback, /* DOMElement Element */ element ) {
window.setTimeout( callback, 1000 / 60 );
};
} )();
}
Last active
February 14, 2016 17:05
-
-
Save linuxenko/916bc7d7935c2ad9aef2 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment