Samba dance, I want to play the entire animation frame with just one click, rather than keep pressing ‘B’.
Is there a good implementation method replace setTimeout
Original code:
animating = true;
Simple implementation method:
const delay = sambaAnim.to / 60
if(inputMap["b"]) {
setTimeout(() => {
animating = true
}, delay * 1000)
} else {
animating = true
}