xxxxxxxxxx
let leftEyeSize;
let rightEyeSize;
let mouthStartAngle;
let mouthEndAngle;
function setup() {
createCanvas(600, 600);
leftEyeSize = random(40, 80);
rightEyeSize = random(40, 80);
mouthStartAngle = random(0, PI / 4);
mouthEndAngle = random(PI / 4, PI);
}
function draw() {
background(220);
fill(255, 215, 160);
ellipse(300, 300, 200, 200);
fill(255);
ellipse(230, 250, leftEyeSize, leftEyeSize);
fill(0);
ellipse(230, 250, leftEyeSize / 2, leftEyeSize / 2);
fill(255);
ellipse(370, 250, rightEyeSize, rightEyeSize);
fill(0);
ellipse(370, 250, rightEyeSize / 2, rightEyeSize / 2);
noFill();
stroke(0);
arc(300, 320, 100, 60, mouthStartAngle, mouthEndAngle);
}
function mousePressed() {
leftEyeSize = random(40, 80);
rightEyeSize = random(40, 80);
mouthStartAngle = random(0, PI / 4);
mouthEndAngle = random(PI / 4, PI);
}