課程
/前端開發
/HTML/CSS
/HTML5小游戲---愛心魚(上)
Uncaught TypeError: window.requestAnimFrame is not a function?這是什么原因造成的?
2015-10-28
源自:HTML5小游戲---愛心魚(上) 2-1
正在回答
表示并沒有什么用
保存文件,關掉編輯器,再重新在編輯器打開試一試
Truejasonxiefans 提問者
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?
舉報
學做HTML5游戲,輕輕松松帶你上手,適合剛入手游戲開發的同學
2 回答main.js:19 Uncaught TypeError: window.requestAnimFrame is not a function
2 回答this.born(i)處提示出現"Uncaught TypeError: undefined is not a function"報錯
2 回答ane=new aneObj( ); 報錯了,Uncaught ReferenceError: aneObj is not defined
1 回答這個問題有點懵。 Uncaught ReferenceError: momObj is not defined
3 回答TypeError: Not enough arguments to HTMLCanvasElement.getContext.
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2018-02-10
表示并沒有什么用
2015-10-30
保存文件,關掉編輯器,再重新在編輯器打開試一試
2015-10-28
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?