xxxxxxxxxx
32
class Circle {
constructor(x, y, di, nextDigit, ind) {
this.x = x;
this.y = y;
this.digit = di;
this.index = ind;
this.xoff = 0;
this.yoff = 0;
this.size = 0;
this.nextDigit = nextDigit;
}
show() {
noStroke();
ellipseMode(CORNER);
fill(this.digit, 6, 9);
ellipse(this.x + this.xoff, this.y + this.yoff, this.size);
// ellipseMode(CENTER);
// fill(this.nextDigit, 6, 9);
// ellipse(this.x + this.xoff + 0.5 * this.size, this.y + this.yoff + 0.5 * this.size, 0.6 * this.size);
// textAlign(CENTER);
// text(this.digit, this.x + this.xoff + 0.5 * this.size, this.y + this.yoff);
}
update(xoff, yoff, size) {
this.xoff = xoff;
this.yoff = yoff;
this.size = size;
}
}