xxxxxxxxxx
69
let x = 20;
let speed = 0.03;
let y = 0
let ac = 0.01;
let me = x;
let easing = 0.05;
let bl
function setup() {
createCanvas(400, 400);
//background(220);
pixelDensity(1)
}
function draw() {
noStroke()
fill(0 + x)
circle(width / 2, height / 2, x)
if (x >= 20 && x < 200) {
speed = speed
ac++
// ac = ac
} else {
speed = -speed
ac = -(ac++)
}
x = x + speed + ac
y = y + 0.9
let targetY = x; // breathing input // also circle
let dy = targetY - me;
me += dy * easing;
//me = map(me, 20, 50, 50,350) // max and min
noFill()
stroke(255)
strokeWeight(10)
point(0 + y, me);
filter(BLUR, 3)
// x=x+0.3
// point(0+y, x)
stroke(255)
strokeWeight(3)
point(0 + y, me);
}