Closed grork closed 2 years ago
I'll rebase & fix up this change after #37 is merged (or, the other way, whichever is merged first)
@grork thank you! now everything works amazing, I will merge this now, and publish everything (#36 #37 and #38) after #37 review
With this change, a
requestAnimationFrame
is not scheduled unless there is active confetti to animate.This is because when idle, the browser will continue to do work, even though there is no work to do.
However, adding confentti will restart the loop if it is not currently running. If it is, no additional frames are scheduled.