Permalink
Browse files

Your standard spinning cube.

  • Loading branch information...
1 parent 98285a4 commit 7090c5e9a2a8769b4b68e6f5d8aee46788821092 @chriskillpack committed Oct 6, 2011
Showing with 772 additions and 2 deletions.
  1. +22 −0 RequestAnimationFrame.js
  2. +707 −0 Three.js
  3. +39 −0 clock.js
  4. +4 −2 index.html
@@ -0,0 +1,22 @@
+/**
+ * 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 );
+
+ };
+
+ } )();
+
+}
Oops, something went wrong. Retry.

0 comments on commit 7090c5e

Please sign in to comment.