xxxxxxxxxx
83
roadnames = [
"Interstate-94",
"Interstate-35W",
"Interstate-35E",
"Highway-169",
"Highway-7",
"Highway-55",
"Interstate-694",
"Central-Avenue-Northeast",
"Highway-62",
"Highway-212",
"County-Road-81",
"Excelsior-Boulevard",
"University-Avenue-Northeast",
"Minnetonka-Boulevard",
"West-Broadway",
"Pilot-Knob-Road",
"Lyndale-Avenue-South",
"Highway-61",
"Cedar-Avenue",
"France-Avenue-South",
"Interstate-394",
"Valley-View-Road",
"Highway-100",
"Highway-52",
"Highway-65-Northeast",
"Dodd-Road",
"East-River-Road-Northeast",
"Snelling-Avenue-North",
"Bunker-Lake-Boulevard-Northwest",
"County-Road-101",
"Hanson-Boulevard-Northwest",
"Pioneer-Trail",
"Brooklyn-Boulevard",
"85th-Avenue-North",
"150th-Street-West",
"Interstate-35",
"Lexington-Avenue-North",
"Winnetka-Avenue-North",
"Rice-Street",
"Hamline-Avenue-North",
"Mcknight-Road-North",
"Penn-Avenue-South",
"Foley-Boulevard-Northwest",
"Lexington-Avenue-Northeast",
"US-Highway-10-Northwest",
"Dale-Street-North"
]
let imgs = {}
let shown = 0
let textShown = false;
function mouseClicked() {
if (!textShown) {
textShown = true
} else {
shown = floor(random()*roadnames.length)
textShown = false
}
}
function preload() {
for (let r of roadnames) {
fn = "RoadMaps/"+r+".png"
imgs[r] = loadImage(fn)
}
shown = floor(random()*roadnames.length)
}
function setup() {
createCanvas(600, 600);
}
function draw() {
background(240);
image(imgs[roadnames[shown]], 0,0,width,height)
if (textShown) {
textAlign(CENTER)
textSize(20)
text(roadnames[shown].replace("-", " "), width/2, 20)
}
}