Index / 2016 / Assignment 05 Mission 07
300×400 · p5.js instance mode
assignment_05_mission_07.pde 60 lines
int xPup1 = 135;
int xPup2 = 165;
int EyeSpd = -1;

void setup() {
 size (300,400);
 background (#AAEBF7);
}

void draw() {
  
 background (#AAEBF7);
 strokeWeight(3);
  
 // Head
 fill(#FF820D);
 stroke(#C46710);
 ellipse(150,200,100,100); 
 
 // Eyes
 
 // Left Eye (Green)
 fill(#,127);
 stroke(#);
 ellipse(135,185,40,40);
  // Right Eye (Blue)
 fill(#,127);
 stroke(#);
 ellipse(165,185,40,40);
 
 // Pupil (Left)
 fill(#363434);
 stroke(#);
 ellipse(xPup1,185,10,10);
 
 // Pupil (Right)
 fill(#363434);
 stroke(#);
 ellipse(xPup2,185,10,10);
 
 // Nose
 fill(#FF0307,127);
 stroke(#D30206);
 rect(145,195,10,20);
 
 // Mouth
 fill(#363434);
 stroke(#);
 ellipse(150,230,40,15);
 
 // Movement
 xPup1 += EyeSpd;
 xPup2 += EyeSpd;
 
 // Bounce
 if (xPup1 < 120 || xPup1 > 150) {
   EyeSpd = -1*EyeSpd;
 }
 
}
read-only archive source from /2016/ASSIGNMENTS/A-05 Programming in Processing/assignment_05_mission_07/assignment_05_mission_07.pde

Description

This page is generated from the Processing project folder at /2016/ASSIGNMENTS/A-05 Programming in Processing/assignment_05_mission_07/assignment_05_mission_07.pde.

Archive

No companion assets were found in this sketch folder.