xxxxxxxxxx
55
let r, g, b;
let on;
let x2, y2;
let size = 90;
function preload() {
birch = loadFont('OpenSans-Regular.ttf');
}
function setup() {
createCanvas(windowWidth, windowHeight);
x = width / 10;
y = height / 2;
points = birch.textToPoints(word, x, y, size);
noStroke();
fill(0);
}
function draw() {
background(0);
x2 = random(windowWidth, 0);
y2 = random(0, windowHeight);
r = random(255);
g = random(255);
b = random(255);
noStroke();
circle(x2, y2, 20);
fill(r, g, b, 70);
textFont(birch);
textSize(size);
r = random(225);
g = random(255);
b = random(255);
fill(r, g, b);
// text(word, x, y);
for (let i = 0; i < points.length; i++) {
let c = noise(i + frameCount * 0.01) * 225;
fill(r, 150, b);
let pt = points[i];
let nx = noise(i * 10.1 + frameCount * 0.01) * 10 - 5.0;
let ny = noise(i * 10.2 + frameCount * 0.01) * 10 - 5.0;
ellipse(pt.x + nx, pt.y + ny, 4);
}
}