xxxxxxxxxx
83
let timer = 0;
let wow = [];
let wowFont;
let wowCount = 0;
function preload () {
wowFont = loadFont('fonts/Modak-Regular.ttf');
}
function setup() {
createCanvas(700, 700);
colorMode(HSB,30,100,20);
}
function draw() {
background('dodgerblue');
timer++;
if (timer > 2) {
timer = 0;
wowCount++;
let wordObj = new Wordmaker(wowCount);
wow.push(wordObj);
}
if (wowCount > 30) {
wowCount = 0;
wow.splice(0,31);
}
for (let i = 0; i <wow.length; i++) {
wow[i].show();
}
}
class Wordmaker {
constructor (wowCount) {
this.wowCount = wowCount;
}
show() {
textSize(250);
strokeWeight(5);
stroke('white');
fill(30,100,5+this.wowCount);
textFont(wowFont);
text('WOW',0+(this.wowCount*3),100+(this.wowCount*15));
}
}