问答详情
源自:2-1 绘制背景

main.js:19 Uncaught TypeError: window.requestAnimFrame is not a function

 function gameloop(){


           window.requestAnimFrame(gameloop);

           console.log("loop");

       }


提问者:慕婉 2017-03-17 18:13

个回答

  • 慕虎750207
    2018-04-26 15:39:01

    requestAnimationFrame(gameloop);


  • woshi2157
    2017-03-24 11:39:05

    <script src="commonFunctions.js" type="text/javascript"></script>这个文件导入了吗?