const RESOLUTION = 0.005;
const TOTAL_PARTICLES = 100;
const ITERATIONS_PER_FRAME = 100;
font = loadFont("https://deckard.openprocessing.org/user65884/visual788617/hd690dea60a0a049a4cce36d25ce5795a/ArchivoBlack-Regular.ttf");
createCanvas(windowWidth, windowHeight);
let bounds = font.textBounds(TEXT, 0, 0, FONT_SIZE);
textPoints = font.textToPoints(TEXT, centerX - bounds.w / 2, centerY + bounds.h / 2, FONT_SIZE);
for(let i = 0; i < textPoints.length; i++){
particles.push(createVector());
let zoom = min(width, height) / 500;
translate(centerX, centerY);
translate(-centerX, -centerY);
for(let i = 0; i < textPoints.length; i++){
particles[i].x = textPoints[i].x;
particles[i].y = textPoints[i].y;
const rotations = map(mouseX, 0, width, 4, 12) * PI;
const length = map(mouseY, 0, height, 1, 3);
const time = millis()/3000;
for(let i = 0; i < ITERATIONS_PER_FRAME; i++){
green += 255/ITERATIONS_PER_FRAME;
fill(255, green, 0, alpha);
for(let i = 0; i < particles.length; i++){
let angle = noise(particles[i].x * RESOLUTION, particles[i].y * RESOLUTION, time) * rotations;
let v = p5.Vector.fromAngle(angle, length);
ellipse(particles[i].x, particles[i].y, size, size);