xxxxxxxxxx
177
//Click the screen to ring the bell and snap us back into attention!
// "Church" is inspired by my siblings' and my inability to pay attention at Sunday mass. Much to our parents disappointment, we were often like balloons: childish and hard to keep down. Though we got better at sitting still, we still find our minds wandering, our heads drooping, and our nostrils flaring in an attempt to communicate through morse code.
// (each face is less than 15 shapes)
//preloading audio
function preload() {
soundFormats("mp3", "ogg");
mySound = loadSound("BELL.mp3");
}
function setup() {
createCanvas(600, 600);
}
function draw() {
background(219, 204, 175);
//door + cross
fill(50, 30, 5);
rect(width / 2 - 75, 100, 150, 200);
fill(201, 190, 105);
rect(width / 2 - 6, 20, 12, 50);
rect(width / 2 - 17, 35, 35, 10);
fill(201, 190, 105);
noStroke();
rect(width / 2 - 5, 21, 10, 45);
//pews
stroke(1);
fill(121, 71, 10);
rect(-5, 250, 610, 410);
rect(-5, 260, 610, 410);
fill(187, 136, 75);
rect(-5, 310, 610, 300);
rect(-5, 320, 610, 300);
//Kaira
if (mouseIsPressed === true) {
//KAIRA - awoken
stroke(1);
//fill(244, 149, 210);
fill(240, 200, 8);
line(300, 310, 300, 600);
quad(290, 310, 310, 325, 320, 345, 280, 345);
//face
rect(225, 175, 150, 150, 50, 50, 60, 60);
fill(255, 241, 208);
//eyes
ellipse(250, 230, 70);
ellipse(350, 230, 70);
fill(30);
ellipse(240, 230, 50);
ellipse(360, 230, 50);
//nostrils
ellipse(280, 270, 18);
ellipse(320, 270, 18);
line(290, 310, 310, 310);
fill(244, 149, 210);
circle(250, 290, 25);
circle(350, 290, 25);
} else {
//ASLEEP - kaira balloon tail
stroke(1);
fill(240, 200, 8);
stroke(1);
line(282, 360, 270, 500);
quad(275, 360, 290, 375, 290, 395, 265, 395);
//kaira head
rect(225, 225, 150, 150, 50, 50, 60, 60);
stroke(2);
line(260, 310, 290, 310);
line(330, 310, 360, 310);
//kaira mouth
fill(0);
strokeJoin(ROUND);
beginShape();
vertex(275, 360);
vertex(290, 340);
vertex(305, 360);
vertex(275, 360);
endShape();
}
//xavio balloon tail
strokeWeight(1);
line(135, 360, 135, 500);
fill(126, 190, 224);
quad(130, 340, 140, 340, 150, 360, 120, 360);
//xavio head
rect(70, 210, 130, 130, 40, 40, 40, 40);
fill(255, 241, 208);
ellipse(105, 275, 30, 15);
ellipse(165, 275, 30, 15);
fill(30);
// xavio eyes
if (mouseIsPressed === true) {
ellipse(105, 275, 15);
ellipse(165, 275, 15);
} else {
ellipse(100, 275, 15);
ellipse(160, 275, 15);
}
// xavio nostrils
if (mouseIsPressed === true) {
ellipse(120, 300, 10);
ellipse(150, 300, 10);
} else {
let nostrilSizes = ["10", "5", "0"];
let morse = random(nostrilSizes);
ellipse(120, 300, morse);
ellipse(150, 300, morse);
}
//nikia balloon tail
fill(221, 28, 26);
line(480, 370, 480, 500);
quad(470, 350, 490, 350, 500, 370, 460, 370);
//nikia head
rect(410, 215, 130, 145, 50, 50, 60, 70);
fill(255, 241, 208);
ellipse(450, 290, 40, 30);
ellipse(510, 290, 40, 40);
fill(30);
// nikia eyes
if (mouseIsPressed === true) {
ellipse(450, 290, 25);
ellipse(510, 290, 25);
} else {
ellipse(445, 290, 25);
ellipse(510, 290, 25);
}
ellipse(470, 325, 8);
ellipse(490, 325, 8);
//stream of thoughts
if (mouseIsPressed === true) {
noStroke();
for (let c = 200; c > 0; c--) {
fill(random(0, 255), random(0, 255), random(0, 255), 0);
circle(460 - 65 + random(130), c, random(20));
}
} else {
frameRate(5);
noStroke();
for (let c = 200; c > 0; c--) {
fill(random(0, 255), random(0, 255), random(0, 255), -300 + mouseX);
circle(460 - 65 + random(130), c, random(20));
}
}
//front pew + person
stroke(1);
fill(210, 170, 120);
rect(-5, 440, 610, 300);
rect(-5, 450, 610, 300);
fill(70, 71, 10);
beginShape();
vertex(0, 350);
vertex(20, 350);
vertex(150, 425);
vertex(150, 600);
vertex(0, 600);
endShape(CLOSE);
// bell audio
if (mouseIsPressed === true) {
mySound.play();
} else {
loop();
mySound.pause();
}
}