window.requestAnimFrame(gameloop); 报错
main.js 文件中报错:
window.requestAnimFrame(gameloop);
错误内容:main.js:41 Uncaught TypeError: window.requestAnimFrame is not a function
main.js 文件中报错:
window.requestAnimFrame(gameloop);
错误内容:main.js:41 Uncaught TypeError: window.requestAnimFrame is not a function
2016-03-15
window.requestAnimFrame = (function() {
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame ||
function( /* function FrameRequestCallback */ callback, /* DOMElement Element */ element) {
return window.setTimeout(callback, 1000 / 60);
};
})();
难道不是在声明window.requestAnimFrame?
举报