xxxxxxxxxx
46
let font
function preload() {
font = loadFont('/EBGaramond-Regular.ttf')
}
function setup() {
createCanvas(710, 2900);
frameRate(2);
textFont(font);
textSize(14);
textAlign(CENTER, CENTER);
noLoop();
}
function draw() {
background(220);
let phrases = ['hoo','hoo hooz', 'chipper brimming in a spout'];
let phrase = random(phrases);
let margin = 10;
translate(margin, margin *4);
for (let y=0; y < 60; y+= 1){
text('as', 100, y * 20);
if (y<=40){
text('a', 120, 400 + y* 20);
}
else if(y<50){
let rand = random(0, y*20);
text(phrase, 220, rand);
}
}
}