xxxxxxxxxx
48
let phrase = "Tangle";
let size = 180;
let points;
let font;
let x = 200;
let y = 400;
function preload(){
font = loadFont("BigCaslon.otf");
}
function setup() {
createCanvas(800, 800);
noStroke();
fill(0);
options = {
sampleFactor: 0.25,
simplifyThreshold: 0
};
points = font.textToPoints(phrase, x, y, size, options);
background(220);
textSize(size);
textFont(font);
}
function draw() {
fill(220, 3);
text(phrase, x, y);
fill(255,3);
for(let i = 0; i< points.length-1; i++){
var pt = points[i];
pt.x += noise(i/5, frameCount * 0.005) * 2.0 - 1.0;
pt.y += noise(i/4, frameCount * 0.005) * 2.0 - 1.0;
fill(0,noise(i*0.1, frameCount *0.01)*255, 80);
ellipse(pt.x, pt.y, 1);
}
}