xxxxxxxxxx
50
function setup() {
createCanvas(400, 400);
}
let x= 0
let y=399
let x1= 0
let y1=399
function draw() {
background(220);
strokeWeight(5)
circle(x, height/2, 50)
if (x >= 399) {
circle(y, height/2, 50)
y = y-5
}
x=x+5
if (y <=0) {
x= 0
y=399
}
fill(x,150,y)
strokeWeight(5)
circle(width/2, x1, 50)
if (x1 >= 399) {
circle(width/2, y1, 50)
y1 = y1-5
}
x1=x1+5
if (y1 <=0) {
x1= 0
y1=399
}
fill(y1,x1,150)
}