Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permanent collecting confetti #119

Open
MatthewTrout opened this issue Aug 25, 2020 · 2 comments
Open

Permanent collecting confetti #119

MatthewTrout opened this issue Aug 25, 2020 · 2 comments
Labels
feature request A neat new idea for this project help wanted Issue could use a contributor

Comments

@MatthewTrout
Copy link

Discovering this library has made my day! 🎊
Could it be possible to have the confetti optionally collect at the edge of the screen / canvas where the gravity is pulling towards (i.e. the bottom)?

@catdad
Copy link
Owner

catdad commented Aug 27, 2020

Thanks for reaching out. This is a pretty neat idea!

I'm not sure if I'll have the time for this any time soon. But since Hacktoberfest is coming up, here are my initial thoughts:

  • Drawing accumulated confetti on the same canvas would be a performance issue. We probably want to add a second canvas to the page to hold the accumulated confetti while the first canvas draws the animation.
  • There are some questions to consider about destroying the confetti. Should destroying clear everything (probably)? Should there be a different method to stop the current animation (maybe)? Should there be a different method to clear out the accumulated confetti (probably)?
  • There are some things to figure out for the API to use a custom canvas. Does that API need to take multiple canvases now?
  • There is a non-trivial amount of work to make confetti stack and for the accumulated pile to grow larger realistically.

@catdad catdad added feature request A neat new idea for this project help wanted Issue could use a contributor labels Aug 27, 2020
@MatthewTrout
Copy link
Author

Thanks for responding, this all makes sense.
Just building on this and equally dumping my thoughts:

  • Either as an option or as part of the feature, the confetti could have a timeout to aid with performance. After which it could fade out and be removed, meaning that the accumulated confetti pile would conceivably have a maximum volume at any one time. It would still give the impression of a permanence, without being overbearing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A neat new idea for this project help wanted Issue could use a contributor
Projects
None yet
Development

No branches or pull requests

2 participants