xxxxxxxxxx
19
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
let animationTime = sin(frameCount / 100);
// map(x, min1, max1, min2, max2)
// this maps the x variable from its range : min1,max2
// to the range min2 max2
let mappedAnimationTime = map(n, -1, 1, 0, 200);
circle(width/2, height/2, mappedAnimationTime)
console.log(mappedAnimationTime);
}