1 lines, no comments ยท 393 tokens, written in 8 seconds for $0.0067


1  let particles = []; let numParticles = 100; function setup() { createCanvas(800, 600); for (let i = 0; i < numParticles; i++) { particles.push({ x: random(width), y: random(height), vx: random(-1, 1), vy: random(-1, 1), size: random(2, 6), hue: random(360) }); } colorMode(HSB, 360, 100, 100, 100); background(0); } function draw() { background(0, 0, 0, 5); for (let p of particles) { let angle = noise(p.x * 0.01, p.y * 0.01, frameCount * 0.01) * TWO_PI * 2; p.vx = cos(angle) * 2; p.vy = sin(angle) * 2; p.x += p.vx; p.y += p.vy; if (p.x < 0) p.x = width; if (p.x > width) p.x = 0; if (p.y < 0) p.y = height; if (p.y > height) p.y = 0; p.hue = (p.hue + 0.5) % 360; noStroke(); fill(p.hue, 80, 100, 80); ellipse(p.x, p.y, p.size); } }