I have a problem with window.requestAnimFrame. It works in different ways in FF,Chrome and in IE9,Opera. For example this http://jsfiddle.net/vZP3u/2/ (tacked from another question about requestAnimFrame). It shows about 60 fps (I guess should be 30) in FF 9.0.1 and Chrome 16.0.912.77 m. But It works fine in IE9 and Opera. Have you any idea how to fix this?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Opera and IE do not support requestAnimationFrame
yet. So your code runs at 33ms setTimeout
fallback.
More ontopic:
http://paulirish.com/2011/requestanimationframe-for-smart-animating/
http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
https://developer.mozilla.org/en/DOM/window.requestAnimationFrame
http://blogs.msdn.com/b/ie/archive/2011/07/05/using-pc-hardware-more-efficiently-in-html5-new-web-performance-apis-part-1.aspx