Skip to content

Instantly share code, notes, and snippets.

@simplyluke
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simplyluke/ac5c51a05b6b096ab849 to your computer and use it in GitHub Desktop.
Save simplyluke/ac5c51a05b6b096ab849 to your computer and use it in GitHub Desktop.
void setup (){
size (500, 500);
background (255);
}
void draw () {
stroke (#45173A);
fill (#45173A);
background (255);
ellipse (250, 250, 100, 100); //head
triangle (190, 200, 250, 225, 200, 240);//ear1
triangle (310, 200, 300, 240, 250, 225);//ear2
ellipse (250, 350, 100, 150);//body p1
rect (200, 350, 100, 75);//body p2
strokeWeight (12);
line (298,375, 350,300);//tail
strokeWeight (1);
if (mousePressed == true) {fill (#45173A); //blink
} else {
fill (255);
}
ellipse (230,245, 15,15);//Leye
ellipse (270,245, 15,15);//Reye
if (mousePressed == true) {fill (#45173A); //blink
} else {
fill (0);}
ellipse (230,245, 10,10);//Lpupil
ellipse (270,245, 10,10);//Rpupil
//blinking
if (mousePressed == true){
fill (#45173A);
} else {
fill (255);}
noStroke ();
ellipse (234,243, 4,4);//Lshine
ellipse (274,243, 4,4);//Rshine
//for the nose
fill (#F1D5E5);
if ((keyPressed) && (key == CODED)){
if (key == UP)
fill (#F1D5E5);
ellipse (250,265, 9,8); //makes the nose bigger
} else {
ellipse (250,265, 5,4);
}
fill (#307691);// set the color to teal so the up arrow being pressed doesn't interfere
//for the ball of yarn
if (keyPressed){
{if (key == 'g') //changes color to green
fill (#3CB2B4);
if (key == 'p') //changes color to purple
fill (#4436A1);}
} else {
fill (#307691);} //teal color
ellipse (150, mouseY, 25,25);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment