Skip to content

Instantly share code, notes, and snippets.

@mrdoob
Created February 22, 2011 14:50
Show Gist options
  • Save mrdoob/838785 to your computer and use it in GitHub Desktop.
Save mrdoob/838785 to your computer and use it in GitHub Desktop.

Revisions

  1. mrdoob revised this gist Feb 23, 2011. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions RequestAnimationFrame.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    /**
    * Provides requestAnimationFrame in a cross browser way.
    * @author paulirish / http://paulirish.com/
    */

    if ( !window.requestAnimationFrame ) {
  2. mrdoob revised this gist Feb 23, 2011. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion RequestAnimationFrame.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,5 @@
    /**
    * Provides requestAnimationFrame in a cross browser way.
    * @author paulirish / http://paulirish.com/
    */

    if ( !window.requestAnimationFrame ) {
  3. mrdoob revised this gist Feb 22, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion RequestAnimationFrame.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    /**
    * Provides requestAnimationFrame in a cross browser way.
    * @author greggman / http://greggman.com/
    * @author paulirish / http://paulirish.com/
    */

    if ( !window.requestAnimationFrame ) {
  4. mrdoob revised this gist Feb 22, 2011. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions RequestAnimationFrame.js
    Original file line number Diff line number Diff line change
    @@ -7,8 +7,7 @@ if ( !window.requestAnimationFrame ) {

    window.requestAnimationFrame = ( function() {

    return window.requestAnimationFrame ||
    window.webkitRequestAnimationFrame ||
    return window.webkitRequestAnimationFrame ||
    window.mozRequestAnimationFrame ||
    window.oRequestAnimationFrame ||
    window.msRequestAnimationFrame ||
  5. mrdoob created this gist Feb 22, 2011.
    23 changes: 23 additions & 0 deletions RequestAnimationFrame.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    /**
    * Provides requestAnimationFrame in a cross browser way.
    * @author greggman / http://greggman.com/
    */

    if ( !window.requestAnimationFrame ) {

    window.requestAnimationFrame = ( function() {

    return window.requestAnimationFrame ||
    window.webkitRequestAnimationFrame ||
    window.mozRequestAnimationFrame ||
    window.oRequestAnimationFrame ||
    window.msRequestAnimationFrame ||
    function( /* function FrameRequestCallback */ callback, /* DOMElement Element */ element ) {

    window.setTimeout( callback, 1000 / 60 );

    };

    } )();

    }