diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-05-01 13:28:40 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-05-01 13:28:40 -0700 |
commit | 50d59708df29324c9c913310b49db93241ca1e48 (patch) | |
tree | 28a26b68120f0bd783b8d3d3e68835d807cb5113 /src/library_glut.js | |
parent | 34a0667d67e4f4679b438277212a446c3d3f3996 (diff) |
use requestAnimationFrame
Diffstat (limited to 'src/library_glut.js')
-rw-r--r-- | src/library_glut.js | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/library_glut.js b/src/library_glut.js index 9ad83684..b0308acf 100644 --- a/src/library_glut.js +++ b/src/library_glut.js @@ -263,16 +263,7 @@ var LibraryGLUT = { document['webkitCancelFullScreen'] || (function() {}); CFS.apply(document, []); - }, - - requestAnimationFrame: function(func) { - var RAF = window['requestAnimationFrame'] || - window['mozRequestAnimationFrame'] || - window['webkitRequestAnimationFrame'] || - window['msRequestAnimationFrame'] || - window['setTimeout']; - RAF.apply(window, [func]); - }, + } }, glutGetModifiers: function() { return GLUT.modifiers; }, @@ -413,7 +404,7 @@ var LibraryGLUT = { glutPostRedisplay: function() { if (GLUT.displayFunc) { - GLUT.requestAnimationFrame(FUNCTION_TABLE[GLUT.displayFunc]); + Browser.requestAnimationFrame(FUNCTION_TABLE[GLUT.displayFunc]); } }, |