xxxxxxxxxx
23
let x = 1;
let y = 1;
let easing = 0.05;
function setup() {
createCanvas(720, 400);
noStroke();
background(0);
}
function draw() {
let targetY = mouseY; // breathing input // also circle
let dy = targetY - y;
y += dy * easing;
y = constrain(y, 50,350) // max and min
ellipse(x, y, 6, 6);
x=x+0.3
}