xxxxxxxxxx
59
function setup() {
rectMode(CENTER);
createCanvas(400, 400);
background(193, 250, 160);
fill(59, 38, 38);
rectMode(CENTER);
rect(width/2, 200,200,310,90); //hair
fill(242, 160, 220);
rect(width/2,390,170,270,40); //shirt
fill(242, 221, 211);//neck color
rect(width/2,239,80,90,30);//neck
fill(242, 221, 211);//face color
ellipse(200,150,150,175);//head
fill(255);//eye color
ellipse(170,143,40,40);//left eye
ellipse(230,143,40,40);//right eye
fill(0);//black
ellipse(170,143,22,22);//left eye
ellipse(230,143,22,22);//right eye
fill(0);
triangle(140,125,152,132,165,123);//left eyeliner
triangle(238,124,248,132,263,123);//right eyeliner
fill(232, 142, 185);
arc(200,190,50,50,0,radians(180));//mouth
fill(242, 221, 211);
arc(197,170,25,15,270,radians(90));//nose
noStroke();
fill(59, 38, 38);//hair color
ellipse(230,80,90,50);//left bang
ellipse(175,80,90,50);//right bang
strokeWeight(4);
stroke(102, 74, 74);//brown color
line(150,115,183,115);//left brow
line(215,115,247,115);//right brow
}
//interactivity
function draw(){
noStroke();
fill(48, 79, 252);
circle(mouseX,mouseY,18);
}
function mousePressed(){
background(193, 250, 160);
}