function gameloop(){
window.requestAnimFrame(gameloop); //setInterval,setTimeout,frame per second
//console.log("gameloop");
var now = Date.now();
deltaTime = now - lastTime;
lastTime = now;
//console.log(deltaTime);
drawBackground();
}
window.requestAnimFrame(gameloop)
这个方法使gameloop循环,具体看插件