xxxxxxxxxx
let colors= ["#623028","#aa5b54","#7b541e","#d9c49e","#383c3b","#809b95"]
let finished=[]
let VerticesNO= 50
let drops=[]
let i=0
let spacing=10
function preload(){
font= loadFont('FamiljenGrotesk-VariableFont_wght.ttf')
}
function setup() {
createCanvas(400, 400);
background('#f4f1de')
poissonDiscSample(60)
shuffle(finished, true)
}
function draw(){
background('#f4f1de')
if(i<finished.length && frameCount%2==0){
let filler= colorMixer(finished[i].x+60, finished[i].y+60, colors)
drops.push(new drop(finished[i].x+60, finished[i].y+60, 100, filler))
i++
}
let goTime=true
for(let i=0; i<drops.length; i++){
if(drops[i].done==false){
goTime=false
}
drops[i].grow();
drops[i].show();
}
fill('#f4f1de')
noStroke()
rect(0, 0, width, 60)
rect(0, 0, 60, height)
rect(340, 0, 60, height)
rect(0, 340, width, 60)
noFill()
stroke(100)
textFont(font)
fill(100)
strokeWeight(1)
stroke(100)
text('1.21', 20, 380)
}
function colorMixer(x, y, colorArray) {
let c = noise(x/100, y/100) * colorArray.length
let c1 = floor(c)
let c2 = floor(c + 1) % colorArray.length
let color1 = colorArray[c1]
let color2 = colorArray[c2]
let mix = fract(c)
let coloring = color(spectral.mix(color1, color2, mix))
//coloring.setAlpha(10)
return coloring
}