You are at the Haynes' house! The hallway(1), the breeze enters and blows a windmill. The kitchen(2), someone is cooking yams, not my favorite. You can help pull out a pot for the yams by clicking your mouse or mousepad. Zaniya’s room(3), Zaniya is listening to teenage music. Drake, who’s father is a Memphian.
xxxxxxxxxx
var Godlymusic
//var imageNum = 1
//var imageNum = 2
//var imageNum = 3
//var imageNum = 4
//var imageNum = 5
var scene
let angle = 0
var zh
let ZHFinal_obj
var zscolor
var zseyes
var zhsbedroom
//let ZaniyaHaynesbedroomfinal_jpg
//let theShader;
var teenmusic
//let Y2met_app - Masego, Devin Morrison - Yamz_mp3
var slide1kitchen
var music
var amp
var level
var pot
var yams
var hallway
var text1
function preload(){
Godlymusic = loadSound('Koryn Hawthorne - Speak To Me (Official Music Video).mp3')
zhsbedroom = loadImage("ZaniyaHaynesbedroomfinal2.jpg");
zh = loadModel('ZaniyaHaynes.obj');
zseyes = loadImage('ZaniyaHayneseyes.png')
zscolor = loadImage('ZaniyaHaynes1_diffuse.png.001.png');
//theShader = loadShader('shader.vert', 'shader.frag');
teenmusic =loadSound('Y2meta.app - drake - teenage fever [sped up] (128 kbps).mp3')
slide1kitchen = loadImage("kitchenslide1.jpg")
music = loadSound('Masego, Devin Morrison - Yamz (Audio) (128kbps).mp3')
pot = loadImage('pot no top.png')
yams = loadImage('yams.jpg')
hallway = loadImage('hallway.jpg')
text1 = loadImage('Saying 1.png')
//imageNum = 1
//imageNum = 2
//imageNum = 3
}
function setup() {
createCanvas(400, 400, WEBGL);
amp = new p5.Amplitude();
}
function draw() {
background(255)
//if(imageNum > 3){
//imageNum = 1
//}
if (scene == 1){
image(hallway, -200, -200, 400, 400)
stroke(153, 112, 95)
fill(153, 112, 95)
rect(0, 20, 15, 150)
stroke(215,215,238)
fill(255)
rotate(frameCount * 0.01);
polarEllipses(20, 20, 40, 40)
}
if (scene == 2){
background(220)
image(slide1kitchen,-200,-200,400,400)
level = amp.getLevel()
print(level);
stroke(255)
fill(250-level*250,level*250,450-level*450);
texture(yams)
circle(125,-15,250*level)
//canvas2D.background(220)
if(mouseIsPressed == true){
image(pot, 1, 10, 50, 50)
}
}
if (scene == 3){
//background(zhsbedroom)
//image(zhsbedroom, -200, -200, 200, 200)
push();
translate(1, -1, -600)
noStroke()
texture(zhsbedroom)
plane(1500)
pop();
push();
ambientLight(215)
directionalLight(255, 255, 19, 0, 1,20)
translate(-63, -169, -600)
fill(209,154,142,255)
noStroke()
texture(zseyes)
plane(81, 44)
angle += -6
pop();
push();
translate(30, 525, 90)
scale(500)
ambientLight(215)
//shader(theShader);
directionalLight(255, 255, 19, 0, 1,20)
//rotateX(angle)
//rotate(angle*1.3)
//rotateZ(angle*0.7)
//box(100)
rotate(3)
noStroke()
texture(zscolor)
model(zh)
angle += 6
pop();
//teenmusic.play();
}
}
function keyPressed(){
if (key == '1'){
Godlymusic.play();
music.stop();
teenmusic.stop();
scene = 1
}
if (key == '2'){
Godlymusic.stop();
music.play();
teenmusic.stop();
scene = 2
}
if (key == '3'){
Godlymusic.stop();
teenmusic.play();
music.stop();
scene = 3
}
}