var canvas = $("#gameCanvas"); var context = canvas.get(0).getContext("2d"); //畫布尺寸 var canvasWidth = canvas.width(); var canvasHeight = canvas.height... ...
var canvas = $("#gameCanvas"); var context = canvas.get(0).getContext("2d"); //畫布尺寸 var canvasWidth = canvas.width(); var canvasHeight = canvas.height(); function animate() { setTimeout(animate,1000); } animate();