p5((s) => {
let font;
let points;
s.preload = function () {
font = s.loadFont(fontUrl);
};
s.setup = function () {
s.createCanvas(width, height);
s.textSize(height);
s.textFont(font);
s.textAlign(s.CENTER, s.CENTER);
points = font.textToPoints(text, 100, 250, 200, {
sampleFactor: 0.1
});
};
s.draw = function () {
s.background("#e4e4e4");
s.stroke("blue");
for (let i = 0; i < points.length; i++) {
let p = points[i];
let radius = s.map(s.mouseX, 0, width, 1, 50);
s.circle(p.x, p.y, radius);
}
};
})