/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://a3.sketchpad.cc/sp/pad/view/ro.mkvrn4WVQ9f/rev.2
*
* authors:
* Drew Chappel
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
void setup() {
size(200, 200);
}
void draw() {
background(230);
if (mouseX < 100) {
fill(255, 0, 0);
rect(mouseX, mouseY, 50, 50);
}
if (mouseY < 100) {
fill(255, 255, 0);
ellipse(mouseX, mouseY, 50, 50);
}
//------------------------------
/* if (mouseX < 100) {
fill(255, 0, 0);
rect(mouseX, mouseY, 50, 50);
}
else if (mouseY < 100) {
fill(255,255, 0);
ellipse(mouseX, mouseY, 50, 50);
}
*/
//-------------------------------
/* if (mouseX < 100) {
fill(255, 0, 0);
rect(mouseX, mouseY, 50, 50);
if (mouseY < 100) {
fill(255, 255, 0);
ellipse(mouseX, mouseY, 50, 50);
}
} */
}