xxxxxxxxxx
57
let randomValue = 50;
let circleX;
let circleY;
let circleR = 35;
let speedX = 5;
let speedY = 5;
function setup() {
createCanvas(640, 640);
// circleR = 30;
// circleX = random(circleR, width-circleR) ;
// circleY = random(circleR, height-circleR);
// speedX = 5;
// speedY = 5;
}
function draw() {
if (frameCount % 60 == 0) {
randomValue = random(100000);
}
randomSeed(randomValue)
fill(random(0, 255), random(0, 255), random(0, 255), 30)
rect(0, 0, width, height)
for (let i=0; i<70; i++){
makeballs();
}
circleX += speedX
circleY += speedY
function makeballs(){
circleX = random(circleR, width-circleR)
circleY = random(circleR,height-circleR)
fill(random(0, 255), random(0, 255), random(0, 255), 30)
noStroke();
ellipse(circleX, circleY, circleR*2, circleR*2);
}
}