xxxxxxxxxx
28
//this code is based on everything I learned from Daniel Schiffman
var x=0;
var y =1;
function setup() {
createCanvas(400, 400);
background(220,120,220,12);
}
function draw() {
noStroke();
fill(120,110,120,90);
ellipse(mouseX,mouseY,24,24);
if (x<=399){
x =++x;
}else{
x=0;}
if (y<=399){
y =random(1,12);
}else{
y=0;}
ellipse(y,x,24,24);
}
function mousePressed(){
background(220,120,220);
}