xxxxxxxxxx
73
var huer;
var x1 = 30;
var y1 = 70;
var rr;
function setup() {
createCanvas(600, 500);
rr = random(0,255);
background(rr);
huer = 0;
}
function draw() {
fill(6, 84, 71);
ellipse(width/2,420,400,780)
if (huer > 360) {
huer = 0;
} else {
huer = huer + 3;
}
colorMode(HSL, 360);
stroke(0);
fill(huer, 200, 200);
stroke(0);
strokeWeight(6);
ellipse(width/3,height/3,100);
ellipse((width/3)*2,height/3,100);
fill(0);
ellipse(width/3,height/3, x1)
if (x1 < 70) {
x1 = x1 + 1
}
else if (x1 >= 70)
x1 = -x1
ellipse((width/3)*2,height/3, y1)
if (y1 < 70) {
y1 = y1 + 1
}
else if (y1 >= 70)
y1 = -y1
fill(300);
noStroke();
ellipse((width/3)-22, height/3, 15)
ellipse(((width/3)*2)-22, height/3, 15)
colorMode(RGB) ;
fill(6, 84, 71);
noStroke();
// function mousePressed(){
// on = true;
// }
if (mouseX > 150 && mouseX <240 && mouseY > 115 && mouseY <220 ) {
ellipse(width/3,((height/3)-4),110, 102);}
if (mouseX > 355 && mouseX <435 && mouseY > 115 && mouseY <220 ) {
ellipse((width/3)*2,((height/3)-4),110, 102);
}
}