xxxxxxxxxx
30
function setup() {
class Circle {
constructor() {
this.pos = createVector(random(width),random(height));
this.vel = createVector(random(4), random(4));
this.r = 20 + random(50)
}
show() {
circle(this.pos.x, this.pos.y, this.r);
}
} // circle
createCanvas(400, 400);
circ = new Circle();
circ2 = new Circle();
}
function draw() {
background(40);
circ.show()
circ2.show()
}