xxxxxxxxxx
53
let words = ["#BOOMER ADVICE", "#BERLIN WALL", "Real Housewives", "Doggo", "Ant", "Jessica Only Child Illinois Chicago", "Whats going to happen?", "Normal", "Baby we were born to run", "Goodbye!"];
let word;
let rand;
function preload() {
img1 = loadImage("meme12.jpg");
img2 = loadImage("meme3.jpg");
img3 = loadImage("meme4.jpeg");
}
function setup() {
createCanvas(500, 500);
background(0);
image(img1, 0, 0, width, height);
fill(250);
textSize(30);
let rand = round(random(words.length - 1));
let word = words[rand];
text(word, 20, 80);
}
function draw() {
if (keyIsPressed) {
if (key == "a") {
image(img1, 0, 0, width, height);
pillMemez();
memez();
} else if (key == "s") {
image(img2, 0, 0, width, height);
memez();
} else if (key == "d") {
image(img3, 0, 0, width, height);
memez();
}
}
}
function memez() {
fill(250,22,100);
textSize(30);
let rand = round(random(words.length - 1));
let word = words[rand];
text(word, 20, 80);
}
function pillMemez() {
fill(250,22,100);
textSize(30);
let rand = round(random(words.length - 1));
let word = words[rand];
text(word, 20, 400);
}