void setup()
, thinking it was the individual elements and not the entire window. I also learned that the colors are all done in RGBA, so I was able to make the colors lighter and more friendly than the original.Remixed code:
/**
* Mouse 2D.
*
* Moving the mouse changes the position and size of each box.
*/
void setup() {
size(720, 720);
noStroke();
rectMode(CENTER);
}
void draw() {
background(245);
fill(255, 204, 55, 200);
ellipse(mouseX, height/2, mouseY/2+10, mouseY/2+10);
fill(50, 204, 255, 200);
int inverseX = width-mouseX;
int inverseY = height-mouseY;
ellipse(inverseX, height/2, (inverseY/2)+10, (inverseY/2)+10);
}
No comments:
Post a Comment