xxxxxxxxxx
30
function setup() {
createCanvas(400, 400);
}
function draw() {
background(0);
noStroke();
noLoop();
//head
fill(120, 0, 30);
ellipse(width / 2, height / 2, width / 2, height / 2);
for (let i = 0; i < 255; i++) {
triangle(width / 2 - 50, 220, width / 2, height / 2 + 60, width / 2 + 50, 220);
line(width / 2, height / 2 + 60, width / 2, height)
}
//eyes
if (random(10) > 6) {
fill(100, 100, 225)
circle(width / 2 - 100, width / 2 - 50, 50);
circle(width / 2 + 100, width / 2 - 50, 50);
} else {
fill(225, 100, 100)
circle(width / 2 - 100, width / 2 - 50, 50);
circle(width / 2 + 100, width / 2 - 50, 50);
}
}