xxxxxxxxxx
65
let buffer1;
let buffer2;
let font;
let words ="escape";
function preload() {
font = loadFont("BNCringeSerifRegular.ttf");
}
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
background(0,10);
let numberOfLines = 1;
let lineSpacing = 30;
let txtFont=(font);
push();
fill(random(255),random(0),random(0));
translate(width/2, height/2 - (lineSpacing * numberOfLines)/2);
for (let j = 0; j < 1; j++) {
let x0 = -sin((frameCount + j) * 0.001) * 200;
let y0 = lineSpacing * j;
push();
translate(x0, y0);
let letterLocX = 10;
for (let i = 0; i < words.length; i++) {
let whichLetter = words.charAt(i);
let movementX = -tan((frameCount + i * 2 + j * 0.14) * 0.01);
let txtFont=(font);
let txtSize = map(sin((i * j + frameCount) * 0.04), -1, 1, 20, 200);
let x1 = letterLocX + movementX;
let y1 = 0;
rotate(map(frameCount*110,x1,y1,i,j));
textSize(txtSize);
text(whichLetter, x1, y1);
letterLocX += textWidth(whichLetter);
}
pop();
}
pop();
}