xxxxxxxxxx
23
let temp = 72
const freeze = 32
const boil = 212
function setup() {
createCanvas(200, 200);
textAlign(CENTER)
}
function draw(){
background(255)
// map(currentValue, origMin, origMax, newMin, newMax)
let size = map(temp, freeze, boil, 20, width)
circle(100, 100, size)
text(temp, 100, 104)
temp += 1
if (temp > boil){
temp = freeze
}
}