xxxxxxxxxx
var overAllTexture
function setup() {
createCanvas(600, 800);
background(100);
overAllTexture = createGraphics(width, height)
overAllTexture.loadPixels()
for(var i=0; i<width; i++){
for(var j=0; j<height; j++){
overAllTexture.set(i, j,
color(100, noise(i/30, j/30, i*j/50)*random([0, 50, 100, 150])))
}
}
overAllTexture.updatePixels()
for (var k=0; k<100; k++) {
posX[k] = random(width)
posY[k] = random(height)
width1[k] = random(4)
}
}
var posX = [], posY = [], width1 = []
function draw() {
blendMode(BLEND)
background(0)
blendMode(SCREEN)
for (var k=0; k<100; k++) {
fill(255)
ellipse(posX[k], posY[k], width1[k]*map(sin(frameCount/70), -1, 1, 0.15, 1))
}
push()
translate(0, height/2)
for (var i=0; i<width*1.5; i+=50) {
fill(184, 250, 254, 25)
noStroke()
ellipse(0, 0, i*(0.5+map(sin(frameCount/70), -1, 1, 0.3, 0.5)))
}
pop()
push()
translate(width, height/2)
for (var j=0; j<width*1.5; j+=50) {
fill(254, 221, 219, 25)
noStroke()
ellipse(0, 0, j*(0.5+map(sin(frameCount/70), -1, 1, 0.3, 0.5)))
}
pop()
push()
blendMode(MULTIPLY)
image(overAllTexture, 0, 0)
pop()
}