loonywizard / js-confetti

JS Confetti library that supports emojis 🦄 🎉 ⚡️
https://loonywizard.github.io/js-confetti/
MIT License
1.08k stars 45 forks source link

Return a promise when an confetti batch completes animating #37

Closed grork closed 2 years ago

grork commented 2 years ago

To enable customized behaviour when a confetti burst has completed it's animation, we need some sort of notification.

With this change, when confetti is added a Promise is returned that will complete when all member shapes in that batch have been removed.

Also updates exposed types, and the sample page.

loonywizard commented 2 years ago

@grork hi! can you please rebase this branch to main? it has a couple of confitcts