Created
October 12, 2018 01:26
-
-
Save mrzachxu/cf42501e5db007175f0a5d121bd772e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup() { | |
createCanvas(2000,2000); | |
background(0,0,0); | |
angleMode(DEGREES); | |
// brownhead(); | |
// peachhead(); | |
normalhead(); | |
// smilingmouth(); | |
// ehmouth(); | |
// squirrelmouth(); | |
// sadmouth(); | |
bracesmouth(); | |
// let mouthFunctions = [smilingmouth, squirrelmouth, bracesmouth, sadmouth, ehmouth]; //make an array of mouthFunctions | |
// let randomMouth = mouthFunctions[int(random(0, mouthFunctions.length))]; //choose a random one from the list and store it in the randomMouth variable | |
//the randomMouth variable now refers to a function we can run | |
// randomMouth(); | |
// normaleyes(); | |
// rollingeyes(); | |
lookingrighteyes(); | |
// sleepingeyes(); | |
crying(); | |
// hat(); | |
babyhair(); | |
sunglasses(); | |
} | |
//all the mouths | |
function smilingmouth(){ | |
fill(255,255,255); | |
arc(100,105,70,70,0,180,PIE);} | |
function squirrelmouth(){ | |
stroke(0,0,0) | |
line(70,113,127,113) | |
fill(255,255,255) | |
rect(75,113,20,40) | |
rect(100,113,20,40)} | |
function ehmouth(){ | |
line(70,120,127,120)} | |
function sadmouth(){ | |
fill(255,255,255) | |
arc(100,130,50,40,180,0,PIE);} | |
function bracesmouth(){ | |
fill(0,0,0) | |
rect(68,110,60,20) | |
fill(255,255,255) | |
rect(68,110,10,10) | |
rect(78,110,10,10) | |
rect(88,110,10,10) | |
rect(98,110,10,10) | |
rect(108,110,10,10) | |
rect(118,110,10,10) | |
fill(255,0,0) | |
rect(70,112,5,5) | |
rect(80,112,5,5) | |
rect(90,112,5,5) | |
rect(100,112,5,5) | |
rect(110,112,5,5) | |
rect(120,112,5,5) | |
stroke(0,0,0) | |
line(73,110,73,120) | |
line(83,110,83,120) | |
line(93,110,93,120) | |
line(103,110,103,120) | |
line(113,110,113,120) | |
line(123,110,123,120) | |
line(68,115,128,115) | |
} | |
//all the heads | |
function normalhead(){ | |
fill(244,226,66); | |
ellipse(100,100,100,100);} | |
function brownhead(){ | |
fill(71,44,44); | |
ellipse(100,100,100,100);} | |
function peachhead(){ | |
fill(255,194,124); | |
ellipse(100,100,100,100);} | |
//all the eyes | |
function normaleyes(){ | |
fill(127,127,127); | |
ellipse(80,85,20,20); | |
ellipse(117,85,20,20);} | |
function rollingeyes(){ | |
fill(255,255,255) | |
ellipse(80,85,30,30); | |
ellipse(117,85,30,30); | |
fill(0,0,0); | |
ellipse(85,77,15,15); | |
ellipse(120,77,15,15);} | |
function lookingrighteyes(){ | |
fill(255,255,255) | |
ellipse(80,85,30,40); | |
ellipse(117,85,30,40); | |
fill(0,0,0); | |
ellipse(88,83,15,15); | |
ellipse(125,83,15,15);} | |
function sleepingeyes(){ | |
noFill(); | |
stroke(255,255,255); | |
curve(120, 75, 110, 85, 130, 85, 120, 75); | |
curve(77, 75, 67, 85, 87, 85, 77, 75);} | |
//all the addons | |
function crying(){ | |
fill(66,167,244); | |
stroke(255,255,255); | |
bezier(127, 91, 143, 165, 200, 95, 127, 91); | |
bezier(70, 92, 2, 102, 63, 171, 71, 91);} | |
function hat(){ | |
stroke(255,255,255) | |
fill(96,35,35) | |
rect(49,50,100,10) | |
rect(64,20,70,30)} | |
function babyhair(){ | |
noFill(); | |
stroke(255,255,255); | |
bezier(80, 32, 141, 52, 93, 0, 98, 52);} | |
function sunglasses(){ | |
fill(99,99,99) | |
rect(101,80,40,15) | |
rect(55,80,40,15) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment