upate()为什么要写的那么复杂,向下面那种写法不行吗
其它的地方都一样
window.onload = function(){
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");
canvas.width = WINDOW_WIDTH;
canvas.height = WINDOW_HEIGHT;
curShowTimeSeconds = getCurrentShowTimeSeconds();
render(context);
setInterval(function(){
curShowTimeSeconds = getCurrentShowTimeSeconds();
render(context);
},1000);
}