-
-
Notifications
You must be signed in to change notification settings - Fork 429
Open
Description
Hi there!
I am currently adding confetti on a button click that shoots up behind the button. I have 2 separate instances of confetti that I am showing on click of the button.
- A single text message "Thanks!" that goes straight up and down.
- A confetti of smiley face emojis.
Here is what I have currently:
Screen.Recording.2024-09-27.at.10.55.05.AM.mov
And here is a version without the smiley faces:
Screen.Recording.2024-09-27.at.10.43.08.AM.mov
I would like to make it so the "Thanks!" text pops up to the exact same height every time, but with the existing code structure it does not look like I can do that currently (I'm guessing by looking at the randomPhysics()
function: https://github.com/catdad/canvas-confetti/blob/320381b361231b4eb51c4068ad73d125efad3121/src/confetti.js#L338C12-L338C25)
Would be it possible to add some sort of config item (or items?) that allow for disabling the randomness of the initial shot height?
Thanks!
hyeongukryu
Metadata
Metadata
Assignees
Labels
No labels