Open SteveALee opened 1 month ago
// bouncers left
if (measurement > leftBouncer.measurement) {
leftBouncer.measurement = measurement
leftBouncer.opacity = 1
} else {
if (leftBouncer.opacity > 0.1) {
// fade out
leftBouncer.opacity = leftBouncer.opacity - 0.1
} else {
leftBouncer.opacity = 0
}
leftBouncer.measurement-- // make it fall
}
if (measurement > 0)
ctx.fillRect(
0,
METERHEIGHT - leftBouncer.measurement * (METERHEIGHT / 100) - 2,
METERWIDTH,
leftBouncer.opacity,
)
Which? Both?