xxxxxxxxxx
//5,000 frames/sets of 200
let simplex
let colors=["#fffafe","#dfe2e8","#838590","#252b3d","#f9ba23","#b63c17","#e00902"]
colors=["#0f120c","#8e5017","#d29c34","#a40e02","#28727f","#3b515d", "#0f120c"]
let count=0
function preload(){
font= loadFont('FamiljenGrotesk-VariableFont_wght.ttf')
}
function setup() {
createCanvas(400, 400);
background('#f4f1de')
simplex= new openSimplexNoise(Date.now())
}
function draw() {
noStroke()
for(let x=50; x<350; x+=6){
for(let y=50; y<350; y+=6){
fill(colorMixer(x, y, colors))
let xoff= simplex.noise3D(x/15, y/10, frameCount/100)*6
let yoff= simplex.noise3D(x/10, y/15, frameCount/100)*6
ellipse(x+xoff, y+yoff, 10)
count++
}
}
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.8', 20, 380)
text(count, 335, 380)
if(frameCount==400){
noLoop()
}
}
function colorMixer(x, y, colorArray) {
let c = noise(x/50, y/5, frameCount/60) * 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
}