当我尝试画这个时,我看不到我们的轮廓有任何实心圆圈..
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;
})();