xxxxxxxxxx
307
let back;
let border;
let scream;
let button;
let clapclap;
let can;
let we;
let all;
let please;
let just;
let go;
let home;
let now;
let colours;
let s;
let b;
let clap;
let count = 0;
let sentence;
function preload() {
back = loadImage('back-04.png');
border = loadFont('Italiana-Regular.ttf');
scream = loadFont('Jaan.ttf');
button = loadFont('Button.ttf');
clapclap = loadImage('Asset 5.png');
}
function setup() {
createCanvas(1000, 1000);
colorMode(HSB, 360, 100, 100, 100);
textAlign(CENTER, CENTER);
angleMode(DEGREES)
image(back, 0, 0, 1000, 1000);
colours = [50, 0, 290, 260, 240]
s = 70;
b = 100;
}
function draw() {
////////////////////////////////////////////////////////////
////////////////BORDER////////////////////////////////////////
////////////////////////////////////////////////////////////
noStroke()
fill(348, 12, 14)
textFont(border);
textSize(72)
text("THANKS NO THANKS 2020", 500, 65);
push()
translate(500, 935)
rotate(180)
textFont(border);
fill(348, 12, 14)
textSize(72)
text("THANKS NO THANKS 2020", 0, 0);
pop()
push()
translate(935, 500)
rotate(90)
textFont(border);
fill(348, 12, 14)
textSize(72)
text("THANKS NO THANKS 2020", 0, 0);
pop()
push()
translate(65, 502)
rotate(270)
textFont(border);
fill(348, 12, 14)
textSize(72)
text("THANKS NO THANKS 2020", 0, 0);
pop()
////////////////////////////////////////////////////////////
////////////////BORDER////////////////////////////////////////
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
///////BUTTONS/////////BUTTONS////////////////BUTTONS///
////////////////////////////////////////////////////////////
//buttons
noStroke()
fill(348, 12, 14)
rect(125, 777, 102, 102)
rect(235, 777, 102, 102)
textSize(14)
textFont(button);
//#1
fill(colours[0], s, b)
text("fine i guess", 173.5, 863)
beginShape()
vertex(153, 852)
vertex(153, 818)
vertex(146, 818)
vertex(175.5, 788.5)
vertex(206, 818)
vertex(198, 818)
vertex(198, 852)
vertex(181, 852)
vertex(181, 837)
vertex(171, 837)
vertex(171, 852)
endShape(CLOSE)
//#2
fill(colours[1], s, b)
text("no", 287, 863)
noFill()
stroke(colours[1], s, b)
strokeWeight(6.7)
line(311, 800, 259, 852)
line(259, 800, 311, 852)
////////////////////////////////////////////////////////////
///////BUTTONS/////////BUTTONS////////////////BUTTONS///
////////////////////////////////////////////////////////////
}
class goHome {
constructor(tyx, tyy, tysc) {
this.x = tyx;
this.y = tyy;
this.script = tysc;
}
show() {
textSize(145)
textFont(scream);
noStroke()
fill(210, 0, 40, 50)
text(this.script, this.x + 20, this.y + 20);
stroke(240, 0, 100)
strokeWeight(2)
for (let i = 0; i < 26; i = i + 5) {
if (i < 5) {
fill(colours[0], s, b)
} else if (i >= 5 && i < 10) {
fill(colours[1], s, b)
} else if (i >= 10 && i < 15) {
fill(colours[2], s, b)
} else if (i >= 15 && i < 20) {
fill(colours[3], s, b)
} else if (i >= 20 && i < 25) {
fill(colours[4], s, b)
} else if (i == 25) {
fill(colours[4], 0, b)
}
text(this.script, this.x - i, this.y - i);
}
}
}
function mouseClicked() {
count++;
can = new goHome(mouseX, mouseY, "can")
we = new goHome(mouseX, mouseY, "we")
all = new goHome(mouseX, mouseY, "all")
please = new goHome(mouseX, mouseY, "please")
just = new goHome(mouseX, mouseY, "just")
go = new goHome(mouseX, mouseY, "go")
home = new goHome(mouseX, mouseY, "home")
now = new goHome(mouseX, mouseY, "now")
tired = new goHome(width / 2, height / 2, "v tired")
if (count == 1) {
can.show();
}
if (count == 2) {
image(clapclap, mouseX - 100, mouseY - 100, 200, 200);
}
if (count == 3) {
we.show();
}
if (count == 4) {
image(clapclap, mouseX - 100, mouseY - 100, 200, 200);
}
if (count == 5) {
all.show();
}
if (count == 6) {
image(clapclap, mouseX - 100, mouseY - 100, 200, 200);
}
if (count == 7) {
please.show();
}
if (count == 8) {
image(clapclap, mouseX - 100, mouseY - 100, 200, 200);
}
if (count == 9) {
just.show();
}
if (count == 10) {
image(clapclap, mouseX - 100, mouseY - 100, 200, 200);
}
if (count == 11) {
go.show();
}
if (count == 12) {
image(clapclap, mouseX - 100, mouseY - 100, 200, 200);
}
if (count == 13) {
home.show();
}
if (count == 14) {
image(clapclap, mouseX - 100, mouseY - 100, 200, 200);
}
if (count == 15) {
now.show();
}
if (count == 16) {
image(clapclap, mouseX - 100, mouseY - 100, 200, 200);
}
if (count > 16) {
textSize(30)
textFont(scream);
noStroke()
fill(210, 0, 40, 50)
text("v tired", mouseX, mouseY);
}
if (mouseY > 777 && mouseY < 777 + 102) {
if (mouseX > 125 && mouseX < 125 + 102) {
image(back, 0, 0, 1000, 1000);
draw()
count = 0;
}
if (mouseX > 235 && mouseX < 235 + 102) {
tired.show()
}
}
}