xxxxxxxxxx
59
let cloudx=250;
let cloudy=250;
function cloud(cloudx, cloudy) {
fill(250)
noStroke();
ellipse(cloudx, cloudy, 70, 50);
ellipse(cloudx + 10, cloudy + 10, 70, 50);
ellipse(cloudx - 20, cloudy + 10, 70, 50);
}
function setup() {
createCanvas(500, 500);
}
function draw() {
if(mouseX<250)
{
background(89+mouseX*2/5,101+mouseX*3/5,102+mouseX*3/5);
}
if(mouseX>250)
{
background(168-(mouseX-width/2)*2/5,247-(mouseX-width/2)*3/5,258-(mouseX-width/2)*3/5);
}
//background(168,247,258)
//background(89,101,102);
if(mouseX<250)
{
cloud(cloudx+mouseX,cloudy);
cloud(cloudx-50-mouseX,cloudy+30);
cloud(cloudx+30-mouseX,cloudy-50);
cloud(cloudx+50+mouseX,cloudy+50);
}
if(mouseX>250)
{
cloud(cloudx-(mouseX-width),cloudy);
cloud(cloudx-50+(mouseX-width),cloudy+30);
cloud(cloudx+30+(mouseX-width),cloudy-50);
cloud(cloudx+50-(mouseX-width),cloudy+50);
}
stroke(51);
strokeWeight(10);
noFill();
smooth();
arc(250, 330, 250, 300, PI, TWO_PI);
line(125, 329, 135, 382);
line(135, 382,157,435);
line(157,435,203,472);
line(203,472,286,472);
line(375,328,366,382);
line(366,382,346,430);
line(346,430,286,472);
arc(195, 335, 80, 80, 0, PI);
arc(305, 335, 80, 80, 0, PI);
arc(260, 410, 50, 50, radians(0),radians(150));
}