xxxxxxxxxx
50
let font
let curIndex = 0;
let index = 0;
function preload() {
font = loadFont('/Hershey-Noailles-Futura-Simplex-Light.ttf');
echoesLines = loadStrings('asa.txt');
}
function setup() {
createCanvas(600, 600);
textFont(font);
textSize(18);
//background(220);
frameRate(15);
}
var startMillis;
function draw() {
// duration in milliseconds
//var duration = 30000;
background(220);
for (let i = 0; i < echoesLines.length; i++){
//text(echoesLines[i], 110, 150+i*20);
//translate(p5.Vector.fromAngle(millis() / 3000, 5));
text(echoesLines[i].substring(0, index), 110, 100+i*20);
if (index < echoesLines[i].length) {
index++;
}
}
}
function mousePressed(){
//text(echoesLines[i])
shuffle (echoesLines, true);
}
//textLeading((mouseX / width) *64);
//text(echoesLines, 100, 100, 200, 200);