xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
}
void setup() {
size(1200,800);
}
void draw() {
if (mouseX > 1100) {
background(150,129,73);
fill (255,255,255);
stroke(255);
strokeWeight(mouseY / 50);
if (mousePressed) {
ellipse(mouseX,mouseY,50,50);
}
else {
rect(mouseX,mouseY,50,50);
}
} else if (mouseX > 1000) {
background(244,222,42);
fill (190,187,190);
stroke(255);
strokeWeight(mouseY / 50);
if (mousePressed) {
ellipse(mouseX,mouseY,50,50);
}
else {
rect(mouseX,mouseY,50,50);
}
} else if (mouseX > 900) {
background(246,241,179);
fill (237,209,221);
stroke(255);
strokeWeight(mouseY / 50);
if (mousePressed) {
ellipse(mouseX,mouseY,50,50);
}
else {
rect(mouseX,mouseY,50,50);
}
} else if (mouseX > 800) {
background(225,239,244);
fill (139,27,34);
stroke(255);
strokeWeight(mouseY / 50);
if (mousePressed) {
ellipse(mouseX,mouseY,50,50);
}
else {
rect(mouseX,mouseY,50,50);
}
} else if (mouseX > 700) {
background(60,166,156);
fill (32,45,92);
stroke(255);
strokeWeight(mouseY / 50);
if (mousePressed) {
ellipse(mouseX,mouseY,50,50);
}
else {
rect(mouseX,mouseY,50,50);
}
} else if (mouseX > 600) {
background(41,72,73);
fill (0,0,0);
stroke(255);
strokeWeight(mouseY / 50);
if (mousePressed) {
ellipse(mouseX,mouseY,50,50);
}
else {
rect(mouseX,mouseY,50,50);
}
} else if (mouseX > 500) {
background(32,45,92);
fill (41,72,73);
stroke(255);
strokeWeight(mouseY / 50);
if (mousePressed) {
ellipse(mouseX,mouseY,50,50);
}
else {
rect(mouseX,mouseY,50,50);
}
} else if (mouseX > 400) {
background(139,27,34);
fill (60,166,156);
stroke(255);
strokeWeight(mouseY / 50);
if (mousePressed) {
ellipse(mouseX,mouseY,50,50);
}
else {
rect(mouseX,mouseY,50,50);
}
} else if (mouseX > 300) {
background(237,209,221);
fill (225,239,244);
stroke(255);
strokeWeight(mouseY / 50);
if (mousePressed) {
ellipse(mouseX,mouseY,50,50);
}
else {
rect(mouseX,mouseY,50,50);
}
} else if (mouseX > 200) {
background(190,187,190);
fill (246,241,179);
stroke(255);
strokeWeight(mouseY / 50);
if (mousePressed) {
ellipse(mouseX,mouseY,50,50);
}
else {
rect(mouseX,mouseY,50,50);
}
} else if (mouseX > 100) {
background(255,255,255);
fill (244,222,42);
stroke(255);
strokeWeight(mouseY / 50);
if (mousePressed) {
ellipse(mouseX,mouseY,50,50);
}
else {
rect(mouseX,mouseY,50,50);
}
} else {
background(150,129,73);
fill (244,222,42);
stroke(255);
strokeWeight(mouseY / 50);
if (mousePressed) {
ellipse(mouseX,mouseY,50,50);
}
else {
rect(mouseX,mouseY,50,50);
}
}
}