xxxxxxxxxx
75
function setup() {
cnv = createCanvas(500, 500);
}
function draw() {
background(244, 194, 194);
translate(20, 120);
translate(p5.Vector.fromAngle(millis() / 1000, 40));
//hair
fill(101, 67, 33);
circle(210, 190, 300);
stroke(0);
strokeWeight(1);
//shirt
fill(0);
ellipse(210, 400, 220, 250);
//neck
fill(237, 200, 180);
ellipse(210, 290, 50, 40);
//skin color
fill(237, 200, 180);
//face
ellipse(210, 180, 200, 210);
//bang
noStroke(0);
fill(101, 67, 33);
ellipse(210, 95, 200, 90);
//eyeball
fill(255);
circle(160, 165, 50);
circle(260, 165, 50);
//eyebrows
fill(0);
stroke(50);
arc(160, 132, 30, 10, PI, 0, OPEN);
arc(260, 132, 30, 10, PI, 0, OPEN);
//eyecolor
fill(0, 150, 0);
circle(148 + 0.03 * mouseX, 154 + 0.03 * mouseY, 24);
circle(248 + 0.03 * mouseX, 154 + 0.03 * mouseY, 24);
//pupils
fill(0);
circle(148 + 0.03 * mouseX, 154 + 0.03 * mouseY, 10);
circle(248 + 0.03 * mouseX, 154 + 0.03 * mouseY, 10);
//highlights on eyes
fill(255);
circle(149 + 0.03 * mouseX, 153 + 0.03 * mouseY, 4);
circle(249 + 0.03 * mouseX, 153 + 0.03 * mouseY, 4);
//mouth
noStroke();
fill(200, 80, 120);
mouth = arc(210, 215, 30, 30, 0, PI);
//nose
fill(200, 50, 100, 100);
arc(210, 190, 20, 10, 0, PI, OPEN);
}