xxxxxxxxxx
var thetext;
var fonts=[];
var fadespeed=110;
var theline;
var tw=8;
var th=3;
function preload() {
thetext=loadStrings('The Heirloom .txt');
fonts[0]=loadFont('ChristmasThemedDemo.otf');
fonts[1]=loadFont('Apple Chancery.ttf');
}
function setup() {
createCanvas(windowWidth, windowHeight);
rectMode(CENTER);
theline=random(thetext);
for(let i=thetext.lenth-1;i>=0;i--)
{
if(thetext[i]=='') thetext.splice(i,1);
}
}
function draw() {
background(255);
textSize(30);
textAlign(CENTER,CENTER);
if(frameCount%fadespeed==0)
{
textFont(random(fonts));
theline=random(thetext);
}
let alpha = frameCount%fadespeed
noFill();
stroke(70, 70, 32, alpha);
rect(2, 2, tw, th);
noStroke();
fill(0, 0, 0, alpha);
text(theline, width/2, height/2);
fill(0,128,random(0,255));
stroke(random(0,255),0,0);
}