diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-01-24 18:04:57 -0500 |
---|---|---|
committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-01-24 18:04:57 -0500 |
commit | 1daad6d4f2f178600e07232ff71ca525fa02cb85 (patch) | |
tree | 93f00c40dd6274351ebb67f32704390927f3ed08 /src/library_gl.js | |
parent | 7d545e024e9ec73fc6c5e69812d53741082bffd0 (diff) |
Make the requestAnimationFrame checks compatible with Closure
Diffstat (limited to 'src/library_gl.js')
-rw-r--r-- | src/library_gl.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index cfaf6549..8ce614f8 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -473,15 +473,15 @@ var LibraryGLUT = { }, glutDisplayFunc: function(func) { - var RAF = window.setTimeout; - if (window.requestAnimationFrame) { - RAF = window.requestAnimationFrame; - } else if (window.mozRequestAnimationFrame) { - RAF = window.mozRequestAnimationFrame; - } else if (window.webkitRequestAnimationFrame) { - RAF = window.webkitRequestAnimationFrame; - } else if (window.msRequestAnimationFrame) { - RAF = window.msRequestAnimationFrame; + var RAF = window['setTimeout']; + if (window['requestAnimationFrame']) { + RAF = window['requestAnimationFrame']; + } else if (window['mozRequestAnimationFrame']) { + RAF = window['mozRequestAnimationFrame']; + } else if (window['webkitRequestAnimationFrame']) { + RAF = window['webkitRequestAnimationFrame']; + } else if (window['msRequestAnimationFrame']) { + RAF = window['msRequestAnimationFrame']; } RAF.apply(window, [function() { if (GLUT.reshapeFunc) { |