let colors=["#8e5017","#d29c34","#a40e02","#28727f","#3b515d","#0f120c"]
font= loadFont('FamiljenGrotesk-VariableFont_wght.ttf')
gravity= createVector(0, 0.01)
simplex= new openSimplexNoise(Date.now())
for(let y=0; y<height; y+=50){
streamers.push(new streamer(sp, y, random(120, 160), y))
balls.push(new ball(random(125, 275), y+ random(-30, 30), random(50)))
streamers.push(new streamer(sp, 430, random(120, 160), frameCount+400))
balls.push(new ball(random(125, 275), 430+ random(-10, 10), random(40)))
for(let i=streamers.length-1; i>=0; i--){
for(let i=balls.length-1; i>=0; i--){
constructor(side, y, length, seed){
this.c1= colorMixer(seed, colors)
this.c2= colorMixer(seed+1, colors)
for(let x=60; x<(60+this.length); x+=1){
let size=map(x, 60, 60+this.length, 30, 1)
let colorMix= map(x, 60, 60+this.length, 0, 1)
fill(color(spectral.mix(this.c1, this.c2, colorMix)))
let yoff= simplex.noise2D(this.seed, x/100)*50
ellipse(x, this.y+yoff, size)
for(let x=340; x>(340-this.length); x-=1){
let size=map(x, 340, 340-this.length, 30, 1)
let colorMix= map(x, 340, 340-this.length, 0, 1)
fill(color(spectral.mix(this.c1, this.c2, colorMix)))
let yoff= simplex.noise2D(this.seed, x/100)*50
ellipse(x, this.y+yoff, size)
let index= streamers.indexOf(this)
streamers.splice(index, 1)
for(let size=this.s; size>this.s/20; size-=this.s/20){
let colorMix= map(size, this.s, this.s/20, 0, 1)
fill(spectral.mix(colors[0], colors[1], colorMix))
ellipse(this.x, this.y, size)
let index= balls.indexOf(this)
function colorMixer(i, colorArray, alpha) {
let c = noise(i) * colorArray.length
let c2 = floor(c + 1) % colorArray.length
let color1 = colorArray[c1]
let color2 = colorArray[c2]
let coloring = spectral.mix(color1, color2, mix)