backgrounds[0] = loadImage("bgA.png");
backgrounds[1] = loadImage("bgB.png");
backgrounds[2] = loadImage("bgC.png");
backgrounds[3] = loadImage("bgD.png");
backgrounds[4] = loadImage("bgE.png");
bodies.push(loadImage("black.png"));
bodies.push(loadImage("brown.png"));
bodies.push(loadImage("white.png"));
for (let i = 1; i <= 16; i++) {
hair[i-1] = loadImage("h" + i + ".png");
for (let i = 0; i <= 15; i++) {
hair.push(loadImage("hw" + i + ".png"));
for (let i = 1; i <= 5; i++) {
clothes.push(loadImage("c" + i + "A.png"));
clothes.push(loadImage("c" + i + "B.png"));
clothes.push(loadImage("c" + i + "C.png"));
clothes.push(loadImage("c" + i + "D.png"));
for (let i = 1; i <=3; i++) {
mouth.push(loadImage("mouth" + i + ".png"));
createCanvas(windowWidth, windowHeight);
function mousePressed() {
background(255, 255, 255);
let bg = random(backgrounds);
image(bg, width / 2, height / 2);
let bodyIndex = floor(random(0, bodies.length));
let body = bodies[bodyIndex];
image(body, width / 2, height / 2);
let clothing = random(clothes);
image(clothing, width / 2, height / 2);
let randomHair = random(hair);
image(randomHair, width / 2, height / 2);
let randomMouth = random(mouth);
image(randomMouth, width / 2, height / 2);