xxxxxxxxxx
let rFrame = 0
let keep = true
function setup() {
const canvasSize = min(windowWidth, windowHeight);
createCanvas(canvasSize, canvasSize*3);
background(50);
}
function draw() {
// fill(255,10)
const r = 50 + noise(rFrame*0.015)*130
const xOffset = map(noise(rFrame*0.01+666),0,1,-r,r)
const yOffset = map(noise(rFrame*0.01+333),0,1,-r/2,r)
push()
translate(xOffset,yOffset+50)
noFill()
if(frameCount%50==0){
stroke(random(255),random(255),random(255))
fill(0,150)
}else{
stroke(255,100)
}
strokeWeight(1)
ellipse(width/2, 150, r*2, r*0.7);
stroke(0)
strokeWeight(1.2)
const seg = 30
for(i=0;i<seg;i++){
const a = map(i,0,seg,0,PI*2) + frameCount*0.05
point(width/2 + r*cos(a), 150 + r*sin(a) * 0.35)
}
pop()
const g = get()
image(g,0,1)
if(!keep){
rFrame++
}
if(frameCount%50==0){
keep = !keep
}
}