「HTML5開発」ゲームループをコントロールする

処理コード:
var FPS = 30;
setInterval(function() {
update();
draw();
}, 1000/FPS);

var textX = 50;

var textY = 50;

function update() {

textX += 1;

textY += 1;

}

function draw() {

canvas.clearRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT);

canvas.fillStyle = “#000";

canvas.fillText(“東京!", textX, textY);

}

jQuery

Posted by arkgame