xxxxxxxxxx
81
function setup() {
createCanvas(300, 430);
}
function draw() {
background(25,54,101);
frameRate(1.8)
let c;
noStroke();
c = color(208,98,95)
fill(c)
ellipse(76, 206, 44, 44);
ellipse(156, 206, 44, 44);
ellipse(226, 206, 44, 44);//still circle
let b;
noStroke();
b = color(65,244,178)
fill(b)
ellipse(56, random(226,236), 44, 44);
ellipse(random(156,166), 206, 44, 44);
ellipse(240, random(180,196), 55, 55);//moving cirle
if (dist(mouseX, mouseY, 56, 226) < 60) {
noFill();
} else {
noStroke();
fill(25,54,101);
ellipse(56, random(226,236), 44, 44);
color(65,244,178)
}//distance dissapear left
if (dist(mouseX, mouseY, 156, 206) < 60) {
noFill();
} else {
noStroke();
fill(25,54,101);
ellipse(random(156,166), 206, 44, 44);
color(65,244,178)
}//distance dissapear middle
if (dist(mouseX, mouseY, 220, 196) < 30) {
noFill();
} else {
noStroke();
fill(25,54,101);
ellipse(240, random(180,196), 55, 55)
color(65,244,178)
}//distance dissapear right
let a;
noStroke();
a = color(244,241,66)
fill(a);
textSize(100); // big test
text('M ON', 2, 73);
textSize(20); // middle test
text('///////', 25, 355);
let d;
noStroke();
d = color(139, 162, 181)
fill(d);
textSize(8);//small test
text('Moon Explorer',25,370);
text('You can control the star by moving the mouse.', 25, 380);
text('and illuminate the hidden moon and change the color of them.', 25, 390);
stroke(65,244,178);
line(0,0,mouseX,mouseY);
line(mouseX,mouseY,300,0);
line(mouseX,mouseY,0,430);
line(mouseX,mouseY,300,430);
fill(random(255),random(255),random(255),80);
ellipse(mouseX,mouseY,50, 50);
}
function mousePressed() {
fill(random(255),random(255),random(255),80);
ellipse(mouseX,mouseY,50, 50);
}