//Friendly Giant
//By: Alexander Massart
/////////////////////////////
void setup() {
//set size of screen
size(400, 400);
}
void draw() {
//set the frame rate
frameRate(60);
//Set the background color
background(14, 29, 113);
//remove stroke
noStroke();
/////////////////////////
/////Body////////////////
fill(178, 11, 22, 230);
ellipse(200, 350, 200, 300);
/////////////////////////
//////Ground/////////////
fill(108, 88, 4);
rect(0, 300, 400, 100);
//////////////////////////
//////Head////////////////
fill(178, 11, 22, 230);
ellipse(200, 150, 150, 100);
/////////////////////////
/////Eye 1///////////////
fill(198, 10, 23);
ellipse(115, 150, 100, 100);
fill(253, 255, 206);
ellipse(115, 150, 90, 90);
fill(0);
triangle(115, 195, 120, 150, 110, 150);
triangle(115, 105, 120, 150, 110, 150);
fill(198, 10, 23);
arc(100, 150, 60, 100, radians(90), radians(270));
arc(130, 150, 60, 100, radians(270), radians(450));
///////////////////////////////////////////
//////Eye 2////////////////////////
fill(198, 10, 23);
ellipse(285, 150, 100, 100);
fill(253, 255, 206);
ellipse(285, 150, 90, 90);
fill(0);
triangle(285, 195, 290, 150, 280, 150);
triangle(285, 105, 290, 150, 280, 150);
fill(198, 10, 23);
arc(270, 150, 60, 100, radians(90), radians(270));
arc(300, 150, 60, 100, radians(270), radians(450));
/////////////////////////////////////////////////
//////Inside Mouth//////////////////////////////
noStroke();
rectMode(CENTER);
fill(0);
rect(200, 195, 110, 100);
fill(242, 105, 158, 100);
rect(200, 195, 110, 100);
fill(242, 44, 120, 100);
rect(200, 195, 100, 100);
///////////////////////////////////////////////
//////Upper Mouth and Nose////////////////////
stroke(0);
strokeWeight(2);
fill(220, 0, 0);
quad(143, 140 - mouseX/35, 257, 140 - mouseX/35, 257, 210 - mouseX/25, 143, 210 - mouseX/25);
fill(0);
ellipse(220, 165 - mouseX/25, 10, 30);
ellipse(180, 165 - mouseX/25, 10, 30);
////////////////////////////////
////////Lower Mouth////////////
stroke(0);
fill(220, 0, 0);
quad(143, 250 + mouseX/35, 257, 250 + mouseX/35, 257, 210 + mouseX/25, 143, 210 + mouseX/25);
//////Tree 1//////////////
noStroke();
rectMode(CORNER);
fill(175, 145, 21);
quad(50, 350, 100, 350, 100- mouseX/25, 300, 50- mouseX/25, 300);
stroke(0, 255, 0);
strokeWeight(2);
fill(21, 175, 22);
triangle(25, 315 + mouseX/15, 125, 315 - mouseX/15, 75 - mouseX/15, 150);
//////////////////////////
//////Tree 2//////////////
noStroke();
fill(175, 145, 21);
quad(350, 350, 300, 350, 300 + mouseX/25, 300, 350 + mouseX/25, 300);
stroke(0, 255, 0);
strokeWeight(2);
fill(21, 175, 22);
triangle(375, 315 + mouseX/15, 275, 315 - mouseX/15, 325 + mouseX/15, 150);
//////////////////////////
////Bubbles///////////////
stroke(0, 0, 0, 0 + mouseX/2);
strokeWeight(3);
fill(255, 255, 255, 0 + mouseX/2);
ellipse(250, 75, 20, 20);
ellipse(285, 70, 20, 20);
ellipse(335, 35, 100, 50);
///////////////////////////
/////Speech///////////////
fill(0, 0, 0, 0 + mouseX/2);
rect(310, 25, 3, 20);
rect(325, 25, 3, 20);
rect(340, 28, 3, 17);
rect(340, 20, 3, 3);
rect(310, 33, 13, 3);
}
void mousePressed() {
//slow frame rate to keep blink for longer
frameRate(6);
//draw blinking
noStroke();
fill(198, 10, 23);
ellipse(285, 150, 100, 100);
fill(198, 10, 23);
ellipse(115, 150, 100, 100);
//////Tree 1//////////////
noStroke();
rectMode(CORNER);
fill(175, 145, 21);
quad(50, 350, 100, 350, 100- mouseX/25, 300, 50- mouseX/25, 300);
stroke(0, 255, 0);
strokeWeight(2);
fill(21, 175, 22);
triangle(25, 315 + mouseX/15, 125, 315 - mouseX/15, 75 - mouseX/15, 150);
//////////////////////////
//////Tree 2//////////////
noStroke();
fill(175, 145, 21);
quad(350, 350, 300, 350, 300 + mouseX/25, 300, 350 + mouseX/25, 300);
stroke(0, 255, 0);
strokeWeight(2);
fill(21, 175, 22);
triangle(375, 315 + mouseX/15, 275, 315 - mouseX/15, 325 + mouseX/15, 150);
/////////////////////////////////////////////////
//////Inside Mouth//////////////////////////////
noStroke();
rectMode(CENTER);
fill(0);
rect(200, 195, 110, 100);
fill(242, 105, 158, 100);
rect(200, 195, 110, 100);
fill(242, 44, 120, 100);
rect(200, 195, 100, 100);
///////////////////////////////////////////////
//////Upper Mouth and Nose////////////////////
stroke(0);
strokeWeight(2);
fill(220, 0, 0);
quad(143, 140 - mouseX/35, 257, 140 - mouseX/35, 257, 210 - mouseX/25, 143, 210 - mouseX/25);
fill(0);
ellipse(220, 165 - mouseX/25, 10, 30);
ellipse(180, 165 - mouseX/25, 10, 30);
////////////////////////////////
////////Lower Mouth////////////
stroke(0);
fill(220, 0, 0);
quad(143, 250 + mouseX/35, 257, 250 + mouseX/35, 257, 210 + mouseX/25, 143, 210 + mouseX/25);
//////Tree 1//////////////
noStroke();
rectMode(CORNER);
fill(175, 145, 21);
quad(50, 350, 100, 350, 100- mouseX/25, 300, 50- mouseX/25, 300);
stroke(0, 255, 0);
strokeWeight(2);
fill(21, 175, 22);
triangle(25, 315 + mouseX/15, 125, 315 - mouseX/15, 75 - mouseX/15, 150);
}