xxxxxxxxxx
23
class Orb {
constructor() {
this.x = random(50, 350);
this.y = random(50, 350);
this.diameter = 70;
this.color = color("rgb(167,226,241)");
}
display() {
fill(this.color);
stroke('#2CA9C9');
strokeWeight(3);
ellipse(this.x, this.y, this.diameter);
}
clickPos(){
let d = dist(mouseX, mouseY, this.x, this.y);
return d < this.diameter/2;
}
}