xxxxxxxxxx
36
class obj{
constructor(x,y){
this.x = x;
this.y =y;
this.size = random(20);
}
show(){
circle(this.x,this.y,this.size);
}
}
let state = 1;
function setup() {
createCanvas(400, 400);
colorMode(HSB)
fill(0,0,255);
}
function draw() {
background(220);
let objarray = [];
for(let i = -15;i<width+10; i+= 5){
for(let k = -1000; k< 1000 ;k += 30){
objarray.push(new obj(random(5)+k+i, i));
}
}
for(let j = 0;j<objarray.length; j++){
objarray[j].show();
}
}