xxxxxxxxxx
50
//MediumGenreLocation for MD333
var medium;
var genre;
var location;
var mediumList = [];
var genreList = [];
var locationList = [];
let i = 0;
let j = 0;
let k = 0;
let emergeFont;
function preload(){
emergeFont = loadFont('data/VT323-Regular.ttf')
mediumList = loadStrings('medium.txt');
genreList = loadStrings('genre.txt');
locationList = loadStrings('location.txt')
}
function setup() {
createCanvas(windowWidth, windowHeight);
i = int(random(mediumList.length));
j = int(random(genreList.length));
k = int(random(locationList.length))
colorMode(HSB, 360, 100, 100);
textFont(emergeFont);
}
function draw() {
//background(0);
//fill(255);
//ellipse(mouseX, mouseY, 100)
fill(100, 100, 100);
textAlign(CENTER);
textSize(width*.09);
text("Medium: " + mediumList[i], width/2, height*.25);
text("Genre: " + genreList[j], width/2, height/2);
text("Location: " + locationList[k], width/2, height*.75);
}
function mousePressed(){
i = int(random(mediumList.length));
j = int(random(genreList.length));
k = int(random(locationList.length));
}
function windowResized() {
resizeCanvas(windowWidth, windowHeight);
}