float rearIrisX = 215; float rearIrisY = 115; float frontIrisX = 90; float frontIrisY = 135; float mouthControllerY = 200; boolean hairball = false; float hairballX = 60; float hairballY = 240; void setup() { size(400,400); frameRate(60); } void draw() { background(120,210,240); noStroke(); //println (mouseY); if(hairball == true){ //println("hairball true"); } //if the jaw is not locked if(hairball != true){ //and the mouse is in the bounding box if(mouseY > 185 && mouseY < 275) { //jaw follows mouth mouthControllerY = mouseY; } } //Rear Whiskers fill(255); triangle(250,200,255,207,398,248); triangle(230,180,235,187,372,228); triangle(225,215,230,222,367,253); //Back Ear fill(215,115,25); triangle(140,10,155,90,80,90); fill(245,145,55); quad(140,10,100,90,80,90,122,20); //Front Ear fill(215,115,25); triangle(70,10,85,90,10,90); fill(245,145,55); quad(70,10,30,90,10,90,52,20); //Rear lip fill(215,115,25); quad(160,mouthControllerY+60,260,mouthControllerY+80,250,mouthControllerY+110,160,mouthControllerY+110); triangle(160,mouthControllerY+30,240,mouthControllerY+110,150,mouthControllerY+110); quad(70,180,180,180,180,mouthControllerY+110,90,mouthControllerY+100); //Rear EyeSocket fill(245,145,55); quad(100,77,175,72,175,110,100,110); ellipseMode(CENTER); ellipse(180,127,110,110); fill(215,115,25); ellipse(185,121,70,70); //Rear Eyeball fill(255); ellipseMode(CENTER); ellipse(190,130,80,75); //Rear Iris rearIrisX = random(213,217); rearIrisY = random(113,117); fill(55,210,110); ellipseMode(CENTER); ellipse(rearIrisX-1,rearIrisY+1,18,18); fill(0); ellipseMode(CENTER); ellipse(rearIrisX,rearIrisY,12,12); //Upper Teeth fill(230,245,145); quad(160,220,192,220,186,245,170,246); quad(188,220,205,220,200,242,192,244); quad(210,220,223,220,218,243,206,244); quad(226,220,246,220,237,246,230,242); quad(244,210,265,200,256,237,249,240); //Rear Cheek fill (250,195,95); ellipseMode(CENTER); ellipse(230,190,120,80); //Nose Ridge fill(250,150,60); quad(160,110,180,140,150,170,130,150); quad(160,130,210,150,170,190,140,170); //Nose fill(255,160,210); quad(215,145,192,192,160,165,190,145); quad(215,145,225,155,220,180,188,188); ////MOUTH//// //Throat fill(155,55,0); ellipseMode(CORNERS); quad(90,170,150,170,150,mouthControllerY+110,90,mouthControllerY+110); triangle(130,mouthControllerY+30,210,mouthControllerY+110,110,mouthControllerY+110); quad(50,180,150,180,150,mouthControllerY+110,80,mouthControllerY+100); //Bottom Teeth fill(230,245,145); quad(128,mouthControllerY+60,145,mouthControllerY+67,148,mouthControllerY+90,125,mouthControllerY+90); quad(155,mouthControllerY+59,167,mouthControllerY+56,172,mouthControllerY+90,150,mouthControllerY+90); quad(182,mouthControllerY+60,195,mouthControllerY+56,196,mouthControllerY+90,180,mouthControllerY+90); quad(205,mouthControllerY+57,219,mouthControllerY+64,222,mouthControllerY+90,200,mouthControllerY+90); quad(232,mouthControllerY+59,240,mouthControllerY+66,242,mouthControllerY+90,225,mouthControllerY+90); //Gums fill(255,160,210); quad(120,mouthControllerY+80,175,mouthControllerY+75,235,mouthControllerY+110,100,mouthControllerY+110); quad(160,mouthControllerY+85,210,mouthControllerY+74,280,mouthControllerY+90,100,mouthControllerY+110); //Chin fill(250,150,60); //left lip corner ellipseMode(CENTER); ellipse(90,mouthControllerY+100,60,40); //right lip corner ellipseMode(CENTER); ellipse(270,mouthControllerY+95,60,50); //left lip quad(60,180,90,180,90,mouthControllerY+100,60,mouthControllerY+100); //bottom lip quad(90,mouthControllerY+90,270,mouthControllerY+90,270,mouthControllerY+120,90,mouthControllerY+120); //left corner adjuster quad(80,mouthControllerY+63,130,mouthControllerY+100,80,mouthControllerY+100,70,mouthControllerY+70); //right corner adjuster quad(255,mouthControllerY+75,270,mouthControllerY+100,230,mouthControllerY+110,175,mouthControllerY+106); //HAIRBALL SHOOTER if (hairball == true){ //Lock Jaw to most open position mouthControllerY = 275; //Create Hairball fill(135,105,35); ellipseMode(CENTER); ellipse(hairballX,hairballY,80,80); //Hairball Detail fill(225,190,120); quad(hairballX-21,hairballY-40,hairballX-10,hairballY-25,hairballX-18,hairballY-15,hairballX-25,hairballY-15); quad(hairballX-5,hairballY,hairballX+15,hairballY-20,hairballX+20,hairballY-5,hairballX+5,hairballY+25); triangle(hairballX+15,hairballY-40,hairballX+40,hairballY-25,hairballX+20,hairballY-22); quad(hairballX-47,hairballY-15,hairballX-32,hairballY-8,hairballX-36,hairballY+5,hairballX-50,hairballY); quad(hairballX-15,hairballY+5,hairballX-2,hairballY+20,hairballX-35,hairballY+42,hairballX-20,hairballY+22); quad(hairballX+38,hairballY+5,hairballX+45,hairballY+12,hairballX+25,hairballY+40,hairballX+20,hairballY+22); //Move Hairball hairballX=hairballX+10f; hairballY=hairballY+5; } //Reset Hairball if(hairballY > 450 && hairballX > 450){ hairball=false; hairballX = 60; hairballY = 220; } //Neck //fill(230,130,40); fill(245,145,55); quad(-10,85,85,71,85,mouthControllerY+100,-10,290); //Lip hair //1 fill(250,150,60); triangle(18,212,60,172,60,mouthControllerY+20); fill(240,140,50); triangle(18,212,60,(mouthControllerY-22)/2+100,60,mouthControllerY+20); //2 fill(250,150,60); triangle(12,240,60,(mouthControllerY-22)/2+100,60,mouthControllerY+40); fill(240,140,50); triangle(12,240,60,(mouthControllerY+20)/2+100,60,mouthControllerY+60); //3 fill(250,150,60); triangle(22,266,60,(mouthControllerY+20)/2+100,60,mouthControllerY+90); fill(240,140,50); triangle(22,266,60,mouthControllerY+50,60,mouthControllerY+90); //left lip fill(250,150,60); quad(60,180,90,180,90,mouthControllerY+100,60,mouthControllerY+100); //Front EyeSocket fill(250,150,60); ellipseMode(CENTER); ellipse(95,130,140,120); fill(225,125,35); ellipse(105,130,110,90); // Front Eyeball fill(255); ellipseMode(CENTER); ellipse(110,130,90,75); //Front Iris frontIrisX = random(85,95); frontIrisY = random(130,140); ellipseMode(CENTER); fill(55,210,110); ellipse(frontIrisX+1,frontIrisY-1,30,30); fill(0); ellipse(frontIrisX,frontIrisY,20,20); //Front Cheek fill(255,200,100); ellipseMode(CENTER); ellipse(150,200,130,100); //Front Whiskers fill(255); triangle(150,200,155,205,18,248); triangle(130,190,135,195,-28,238); triangle(125,220,130,225,-33,273); } void mousePressed(){ hairball = true; }