0
画圆,当我尝试画这个我没有看到任何实心圆我们的轮廓..用帆布
var ball = (function() {
function ball(x, y) {
this.color = "white";
this.x = x;
this.y = y;
this.radius = Math.round(Math.random() * ball.MAX_RADIUS);
}
ball.MAX_RADIUS = 5;
ball.prototype.draw = function (context) {
context.fillStyle = "#ffffff";
context.arc(this.x, this.y, this.radius, 0, 2 * Math.PI, false);
};
ball.prototype.update = function() {
};
return ball;
})();
啊这么简单谢谢! – FutuToad 2013-03-23 15:08:41