xxxxxxxxxx
//Global Variable Space
let wallpaper;
let imageList= [];
let bus;
let city;
let man;
let water;
let mads;
let imageNumber= 0;
// add later: let song;
//Preload Functions
function preload(){
wallpaper = loadImage('wallpaper.jpg');
bus=loadImage('bus.jpg');
city=loadImage('city.jpg');
man=loadImage('man.jpg');
water=loadImage('water.jpg');
mads=loadImage('mads.jpg');
song=loadSound('song.mp3');
}
function setup() {
createCanvas(400, 400);
rectMode(CENTER)
imageMode(CENTER)
song.play();
imageList=[bus,city,man,water,mads];
}
function draw() {
background(0);
image(wallpaper, 200,200,500,500);
// frameRate(1);
image(imageList[imageNumber],200,200,400,300);
// image (bus, 200,200,400,300);
// image (city, 200,200,400,300);
// image (man, 200,200,400,300);
// image (water, 200,200,400,300);
// image (mads, 200,200,400,300);
}
function mousePressed(){
imageNumber++;
if (imageNumber>4){
imageNumber=0;
}
}
// The story I decided to tell here was of one of my days in Chile on study abroad using disposable camera photos I took while I was there. The day began with the entire Spelman group together as we explored the city and interacted with locals. Eventually, we got to go explore on our own and a group of friends and I saw the beach in a nearby city. I ended the day getting dinner with one of my friends and it was super beautiful!