xxxxxxxxxx
29
function setup() {
createCanvas(400, 400);
background(0);
noLoop();
}
function draw() {
for (let i = 0; i < 50; i++) {
let c = new Cestica();
c.show();
}
}
class Cestica {
constructor() {
this.x = random(0, 400);
this.y = random(0, 400);
this.r = random(2, 25);
this.providnost = random(0, 100);
}
show() {
noStroke();
fill(255, this.providnost);
ellipse(this.x, this.y, this.r);
}
}