font= loadFont('FamiljenGrotesk-VariableFont_wght.ttf')
simplex= new openSimplexNoise(Date.now())
let inc= QUARTER_PI*0.3457
for(let a=0; a<TAU*4; a+=inc){
scaler= map(a, TAU, TAU*4, 30, 1)
let baseSize=scaler+noise(a, frameCount)*10
loovers.push(new loover(200, 200, a+ random(-PI/26, -PI/26), 3, baseSize+random(-5, 5), delayer))
for(let i=loovers.length-1; i>=0; i--){
constructor(x, y, initAngle, initSize, finalSize, delay){
this.pos= createVector(x, y)
this.vel= p5.Vector.fromAngle(initAngle+random(-0.1, 0.1), 3.5)
this.finalSize= finalSize
this.totalGrowth= finalSize-initSize
this.spreadTime= frameCount+this.delay+int(finalSize*0.33)
if(frameCount>this.delay){
let amount= map(this.size, this.initSize, this.finalSize, 0, 0.085)
let turn= simplex.noise3D(this.pos.x/100, this.pos.y/100, this.vel.heading())*amount
if(frameCount==this.spreadTime && this.finalSize>30){
let currentAngle= this.vel.heading()
loovers.push(new loover(this.pos.x, this.pos.y, currentAngle+ QUARTER_PI, 1, this.finalSize*0.5, 3))
loovers.push(new loover(this.pos.x, this.pos.y, currentAngle- QUARTER_PI, 1, this.finalSize*0.5, 3))
if(frameCount>this.delay){
let framesMap= map(this.size, this.initSize, this.finalSize, 0, 1)
let adjSize= lerp(this.initSize, this.finalSize, easeInSine(framesMap))
translate(this.pos.x, this.pos.y)
rotate(this.vel.heading()+HALF_PI)
ellipse(0,0, adjSize*1.05, adjSize)
strokeWeight(adjSize*0.75)
line(0, -(adjSize*0.1), 0, (adjSize*0.5))
strokeWeight(this.size*0.1)
line(0, -(adjSize*0.1), 0, (adjSize*0.5))
if(frameCount>this.delay){
if(this.size>=this.finalSize){
let index= loovers.indexOf(this)
return 1 - Math.cos((x * Math.PI) / 2);