xxxxxxxxxx
33
let font, pts;
function preload() {
font = loadFont('LEMONMILK-Bold.otf')
}
function setup() {
createCanvas(400, 400);
textFont(font);
textSize(300);
//textAlign(CENTER, CENTER);
pts = font.textToPoints("J", 0, 0, 300, {
sampleFactor: 0.1, // increase for more points
simplifyThreshold: 0.0 // increase to remove collinear points
});
}
function draw() {
background(0)
push()
translate(width*.25, height*.75);
fill(255, 255, 255, 127);
//text("J", 0, 0)
for (let i = 0; i < pts.length; i++) {
const p = pts[i]
const xoff = sin((frameCount/10) + i) * 5;
const yoff = cos((frameCount/5) + i) * 5;
ellipse(p.x + xoff, p.y + yoff + xoff, 10);
}
pop()
}