xxxxxxxxxx
80
let fortunes = [
"Holding to the affections to resist, shaking the heart to cement",
"What the soul does to the body, the artist does to the people",
"My only country is my memory and it has no hymns",
"Hope is an uncharted territory",
"Vision will not die destroying eyes",
"Embrace your land, find your river",
"Memory is ungovernable",
"The heart is the size of a fist",
"We will sprout again as native forest",
"May their revolution give them a piece of red sky",
"Radical tenderness against capital",
"Our dead are more alive every day in a song of love that reborns them",
"Where the stubborn humidity of their memory does not dry up",
];
let currentFortune = "";
let fondo;
let habaClick;
function preload() {
fondo =loadImage('/assets/datacenter.jpg');
arveja =loadImage('/assets/arveja.png');
azul =loadImage('/assets/azul.png');
caballero =loadImage('/assets/caballero.png');
cisne =loadImage('/assets/cisne.png');
estelar =loadImage('/assets/estelar.png');
haba =loadImage('/assets/haba.png');
pallares =loadImage('/assets/pallares.png');
muchos =loadImage('/assets/muchos.png');
}
function setup() {
createCanvas(1000, 500);
image(fondo, 0, 0, width, height, 0, 0, fondo.width, fondo.height, COVER);
image(haba,5,160,150,190);
image(caballero,170,150,80,100);
image(estelar,280,150,70,90);
image(pallares,860,150,110,130);
image(cisne,750,150,90,110);
image(arveja,650,150,90,90);
image(muchos,400,350,250,250);
function draw() {
image(fondo, 0, 0, width, height, 0, 0, fondo.width, fondo.height, COVER);
image(haba,5,160,150,190);
image(caballero,170,150,80,100);
image(estelar,280,150,70,90);
image(pallares,860,150,110,130);
image(cisne,750,150,90,110);
image(arveja,650,150,90,90);
image(muchos,400,350,250,250);
fill(255)
textStyle(BOLD);
textFont('Courier New');
textSize(21);
fill(255);
stroke(0);
strokeWeight(4);
textAlign(CENTER, CENTER);
text(currentFortune, 500, 250)
;
}
cnv.mousePressed(pickFortune);
//function mousePressed(){
//let habaClick = image(haba,5,160,150,190);
habaClick.mousePressed(pickFortune);
// Change the background color.
function pickFortune() {
currentFortune = random(fortunes)
}
}