export class Ball { constructor(colorId) { this.colorId = colorId; } getColor() { return [ "rgb(224, 104, 78)", "rgb(93, 184, 159)", "rgb(244, 188, 71)", "rgb(95, 165, 95)", "rgb(222, 94, 129)", "rgb(225, 224, 94)", "rgb(73, 172, 211)", "rgb(227, 136, 59)", "rgb(49, 141, 79)", "rgb(235, 160, 136)", "rgb(150, 208, 213)", "rgb(180, 206, 99)", "rgb(231, 237, 239)", ][this.colorId]; /* "#E0684E", "#5DB89F", "#E0BC47", "#5FA55F", "#DE5E81", "#E1E05E", "#49ACD3", "#E3883B", "#318D4F", "#EBA088", "#96D0D5", "#B4CE63", "#E7EDEF", */ } draw(ctx,scaledCanvas) { ctx.fillStyle = this.getColor(); ctx.beginPath(); ctx.arc(0, 0, Ball.radius, 0, 2 * Math.PI); ctx.fill(); } update(delta) { } } Ball.radius = 15; Ball.radiusPadding = 5;