xxxxxxxxxx
let p;
let t = 0;
function setup() {
createCanvas(800, 800);
angleMode(DEGREES);
noSmooth();
}
function draw() {
randomSeed(frameCount / 150);
p = get();
for (let i = 0; i < 200; i++) {
let x = random(-width * 0.5, width * 1.5);
let y = random(-height * 0.5, height * 1.5);
let angle = map(noise(x / 400, y / 400, t / 400), 0, 1, -180, 180)
x += cos(angle) * t * 1;
y += sin(angle) * t * 1;
drawingContext.shadowColor = color(0, 0, 0, 50);
drawingContext.shadowBlur = 20;
noStroke();
ellipse(x, y, t * 5);
}
t++;
p.mask(get());
image(p, 0, 0);
if (t % 150 == 0) clear(), t = 0;
}