xxxxxxxxxx
30
var xPos = [];
var yPos = [];
//100,200,300, 20,80,10
function setup() {
createCanvas(400, 400);
count = 0;
while(count < 1000){
append(xPos,random(400));
append(yPos,random(400));
count++;
}
noStroke();
background(0);
}
function draw() {
background(0,0,0,10);
var i = 0
while(i < xPos.length){
ellipse(xPos[i],yPos[i],5,5);
fill(0,0,255);
//30
yPos[i]++;
if(yPos[i] > 400){
yPos[i] = 0;
}
i++; //same as i = i + 1;
}
}