xxxxxxxxxx
function setup() {
createCanvas(400, 400);
background(255);
}
function draw() {
noStroke()
if(frameCount<1000){
for(let i=0; i<500; i++){
let x= random(-5, 405)
let y= random(-5, 405)
let n= noise(x/50, y/15)
let edgeBreak= map(abs(x-200), 0, 205, 0.1, 1)
let alpha
let mixer
if(n>edgeBreak){
alpha= map(n, 0, 1, 1, 4)
} else{
alpha= map(n, 0, 1, 10, 20)
}
fill(0, alpha)
ellipse(x, y, random(5))
}
let cdy= map(frameCount, 0, 1000, 0, height)
let w= noise(frameCount/50)*30
push()
stroke(0, 40)
line(0, cdy, w, cdy)
line(400-w, cdy, 400, cdy)
pop()
}
if(frameCount==1000){
let img= get()
tint(255, 10)
blendMode(MULTIPLY)
for(let yoff=0; yoff<50; yoff+=1){
image(img, 0, yoff)
}
}
}