xxxxxxxxxx
421
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() {
// ////////redo:
// // background
// noStroke()
// textFont(border);
// textSize(72)
// fill(210, 0, 70, 10)
// text("THANKS NO THANKS 2020", 500 + 5, 65 + 5);
// push()
// translate(500, 935)
// rotate(180)
// textFont(border);
// textSize(72)
// fill(210, 0, 70, 10)
// text("THANKS NO THANKS 2020", -5, -5);
// pop()
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()
//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)
}
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);
}
}
}
// class hand {
// constructor(ox, oy) {
// this.x = ox;
// this.y = oy;
// this.c = int(random(0,4))
// this.c2 = int(random(0,4))
// this.c3 = int(random(0,4))
// }
// display() {
// push()
// noStroke()
// fill(210, 0, 40, 50)
// translate(this.x+40, this.y+25)
// beginShape()
// curveVertex(51.8, 27);
// vertex(51.8, 20.4)
// vertex(50, 9.3)
// vertex(37.2, -21);
// vertex(15.3, -42.4);
// vertex(6.7, -41.7)
// vertex(10.9, -30)
// vertex(24.9, -14.7)
// vertex(16, -19)
// vertex(-19.4, -53.1)
// vertex(-26.5, -42.8)
// vertex(0.88, -16)
// vertex(-1.55, -13.7)
// vertex(-32.5, -44.2)
// vertex(-41, -34.8)
// vertex(-10.6, -4.1)
// vertex(-13, -1.7)
// vertex(-39.4, -28.2)
// vertex(-49, -20)
// vertex(-19.4, 9.9)
// vertex(-21.7, 12)
// vertex(-42.4, -8)
// vertex(-50.5, -7.3)
// vertex(-45.6, 5.5)
// vertex(-13.6, 38.5)
// vertex(19.8, 52.5)
// vertex(27, 51.5)
// endShape(CLOSE)
// pop()
// strokeWeight(1)
// push()
// fill(colours[this.c], s, b)
// console.log(this.c)
// translate(this.x-11, this.y+3)
// beginShape()
// curveVertex(51.8, 27);
// vertex(51.8, 20.4)
// vertex(50, 9.3)
// vertex(37.2, -21);
// vertex(15.3, -42.4);
// vertex(6.7, -41.7)
// vertex(10.9, -30)
// vertex(24.9, -14.7)
// vertex(16, -19)
// vertex(-19.4, -53.1)
// vertex(-26.5, -42.8)
// vertex(0.88, -16)
// vertex(-1.55, -13.7)
// vertex(-32.5, -44.2)
// vertex(-41, -34.8)
// vertex(-10.6, -4.1)
// vertex(-13, -1.7)
// vertex(-39.4, -28.2)
// vertex(-49, -20)
// vertex(-19.4, 9.9)
// vertex(-21.7, 12)
// vertex(-42.4, -8)
// vertex(-50.5, -7.3)
// vertex(-45.6, 5.5)
// vertex(-13.6, 38.5)
// vertex(19.8, 52.5)
// vertex(27, 51.5)
// endShape(CLOSE)
// pop()
// push()
// fill(colours[this.c2], s, b)
// translate(this.x, this.y)
// beginShape()
// curveVertex(51.8, 27);
// vertex(51.8, 20.4)
// vertex(50, 9.3)
// vertex(37.2, -21);
// vertex(15.3, -42.4);
// vertex(6.7, -41.7)
// vertex(10.9, -30)
// vertex(24.9, -14.7)
// vertex(16, -19)
// vertex(-19.4, -53.1)
// vertex(-26.5, -42.8)
// vertex(0.88, -16)
// vertex(-1.55, -13.7)
// vertex(-32.5, -44.2)
// vertex(-41, -34.8)
// vertex(-10.6, -4.1)
// vertex(-13, -1.7)
// vertex(-39.4, -28.2)
// vertex(-49, -20)
// vertex(-19.4, 9.9)
// vertex(-21.7, 12)
// vertex(-42.4, -8)
// vertex(-50.5, -7.3)
// vertex(-45.6, 5.5)
// vertex(-13.6, 38.5)
// vertex(19.8, 52.5)
// vertex(27, 51.5)
// endShape(CLOSE)
// pop()
// push()
// translate(this.x, this.y)
// fill(colours[this.c3], s, b)
// beginShape()
// curveVertex(22, -58);
// curveVertex(29, -56.5);
// curveVertex(25.8, -45.8);
// curveVertex(18.9, -47.8);
// endShape(CLOSE)
// beginShape()
// curveVertex(32, -42);
// curveVertex(45.8, -56);
// curveVertex(51, -51);
// curveVertex(37, -37);
// endShape(CLOSE)
// beginShape()
// curveVertex(41, -30.8);
// curveVertex(53, -34.6);
// curveVertex(55, -27.8);
// curveVertex(43.4, -24);
// endShape(CLOSE)
// pop()
// push()
// fill(colours[this.c3], s, b)
// translate(this.x-9, this.y+3)
// rotate(180)
// beginShape()
// curveVertex(22, -58);
// curveVertex(29, -56.5);
// curveVertex(25.8, -45.8);
// curveVertex(18.9, -47.8);
// endShape(CLOSE)
// beginShape()
// curveVertex(32, -42);
// curveVertex(45.8, -56);
// curveVertex(51, -51);
// curveVertex(37, -37);
// endShape(CLOSE)
// beginShape()
// curveVertex(41, -30.8);
// curveVertex(53, -34.6);
// curveVertex(55, -27.8);
// curveVertex(43.4, -24);
// endShape(CLOSE)
// pop()
// }
// }
function mouseClicked() {
count ++;
//sentence = [can.show(), clap, we.show(), clap, all.show(), clap, please.show(), clap, just.show(), clap, go.show(), clap, home.show(), clap, now.show(), clap,]
console.log(count)
if (mouseClicked==1){
can = new goHome(mouseX, mouseY, "can")
can.show();
}
else{
we = new goHome(mouseX, mouseY, "we")
we.show();
all = new goHome(mouseX, mouseY, "all")
all.show();
please = new goHome(mouseX, mouseY, "please")
please.show();
just = new goHome(mouseX, mouseY, "just")
just.show();
go = new goHome(mouseX, mouseY, "go")
go.show();
home = new goHome(mouseX, mouseY, "home")
home.show();
now = new goHome(mouseX, mouseY, "now")
now.show();
// clap = new hand(mouseX, mouseY);
// clap.display();
image(clapclap, mouseX-100, mouseY-100, 200, 200);
}
// sentence = [can.show(), clap, we.show(), clap, all.show(), clap, please.show(), clap, just.show(), clap, go.show(), clap, home.show(), clap, now.show(), clap,]
}