/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://itct.sketchpad.cc/sp/pad/view/ro.VYKy$Jltbsf/rev.2
*
* authors:
* JongHwan Oh
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
int strokeColor = 0;
int eyeColor = 255;
void setup() {
size(400,400);
strokeWeight(10);
}
void draw() {
background(255);
strokeColor = frameCount % 256;
println(frameCount + " " + strokeColor);
stroke(strokeColor);
fill(eyeColor,0,0);
rect(mouseX,mouseY,40,40);
fill(0,255,0);
ellipse(mouseX + 20,mouseY +10,40,20);
}
void mousePressed(){
eyeColor = eyeColor - 10;
}