xxxxxxxxxx
135
let back;
let border;
let words;
let displaytext;
let lastChar;
let temptext;
let tp;
let lft;
let rgt;
let btm;
function preload() {
back = loadImage('back-04.png');
border = loadFont('Italiana-Regular.ttf');
}
function setup() {
createCanvas(1000, 1000);
colorMode(HSB, 360, 100, 100, 100);
textAlign(CENTER, CENTER);
angleMode(DEGREES)
frameRate(3)
image(back, 0, 0, 1000, 1000);
words = str ("THANKS NO THANKS 2020 ");
displaytext = words;
tp = new thanks(500, 65, 0);
lft = new thanks(500, 935, 180);
rgt = new thanks(935, 500, 90);
btm = new thanks(65, 502, 270);
}
function draw() {
// image(back, 0, 0, 1000, 1000);
lastChar = displaytext[displaytext.length-1];
temptext = '';
for(let i=0;i<displaytext.length-1;i++) {
temptext = temptext + displaytext[i]
}
displaytext = lastChar + temptext;
tp.dis()
lft.dis()
rgt.dis()
btm.dis()
// push()
// translate(500, 65)
// noStroke()
// fill(348, 12, 14)
// textFont(border);
// textSize(70)
// text(displaytext, 0, 0)
// pop()
// push()
// translate(500, 935)
// rotate(180)
// textFont(border);
// fill(348, 12, 14)
// textSize(70)
// text(displaytext, 0, 0);
// pop()
// push()
// translate(935, 500)
// rotate(90)
// textFont(border);
// fill(348, 12, 14)
// textSize(70)
// text(displaytext, 0, 0);
// pop()
// push()
// translate(65, 502)
// rotate(270)
// textFont(border);
// fill(348, 12, 14)
// textSize(70)
// text(displaytext, 0, 0);
// pop()
}
class thanks {
constructor(tx,ty,tr){
this.x = tx;
this.y = ty;
this.r=tr
}
dis(){
push()
translate(this.x, this.y)
rotate(this.r)
noStroke()
fill(240,0,92)
rect(-405,-32,810,65)
textFont(border);
fill(348, 12, 14)
textSize(70)
text(displaytext, 0, 0);
pop()
}
}