xxxxxxxxxx
29
function setup() {
createCanvas(400, 300);
background(0);
}
let spot = {
x: 0,
y: 100,
diameter: 20
}
let Color ={
r:0,
g:0,
b:0
}
function draw() {
Color.r = random(0,200);
Color.b= random(0,255);
spot.x = random(0,400);
spot.y =random(0,300)
fill(Color.r,Color.g,Color.b,100);
noStroke();
ellipse(spot.x,spot.y,spot.diameter);
}
function mousePressed() {
background(0);
}