xxxxxxxxxx
let colors=["#1f262b","#1f262b","#147083","#71767f","#778a8d","#d7a993","#d4c0b1","#dad092"]
let font, stamp, bgc
function preload(){
font= loadFont('FamiljenGrotesk-VariableFont_wght.ttf')
}
function setup() {
createCanvas(400, 400);
background('#f4f1de')
bgc= color('#f4f1de')
bgc.setAlpha(100)
stamp= createGraphics(60, 60)
imageMode(CENTER)
for(let i=0; i<200; i++){
stamp.fill(255)
stamp.noStroke();
stamp.ellipse(random(0, 60), random(0, 60), random(5))
}
}
function draw(){
push()
let xer=random(70, 330)
let yer=random(70, 330)
let tinter= color(colorMixer(xer, yer, colors))
tint(tinter)
translate(xer, yer )
let flips= random(4)
rotate(HALF_PI*flips)
image(stamp, 0, 0, 30, 30)
pop()
if(frameCount%2==0){
push()
blendMode(BLEND)
tint(bgc)
let x=noise(frameCount/3)*width
let y=noise(frameCount/3+5)*height
translate(x, y)
let flips= random(4)
rotate(HALF_PI*flips)
image(stamp, 0, 0, 30, 30)
pop()
}
fill('#f4f1de')
noStroke()
rect(0, 0, width, 60)
rect(0, 0, 60, height)
rect(340, 0, 60, height)
rect(0, 340, width, 60)
textFont(font)
fill(100)
strokeWeight(1)
stroke(100)
text('1.2', 20, 380)
if(frameCount>800){
stroke(100)
line(370, 100, 100, 100)
line(30, 300, 300, 300)
line(30, 150, 200, 150)
line(370, 250, 200, 250)
noLoop()
}
}
function colorMixer(x, y, colorArray) {
let c = noise(x/50, y/50, frameCount/300) * 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 = spectral.mix(color1, color2, mix)
return coloring
}