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

Rotation on flat confetti #223

Open
dannywrayuk opened this issue Feb 16, 2024 · 2 comments
Open

Rotation on flat confetti #223

dannywrayuk opened this issue Feb 16, 2024 · 2 comments

Comments

@dannywrayuk
Copy link

Hey Catdad,

First off, thank you for this package. It has saved so much time!

I have a small feature request. I'd like to have some 2D confetti using the custom shapes. The flat: true option looks perfect, however it turns off the confetti rotation. Like you said in the readme, it looks very sad without any 2D rotation.

Would this be something that we could add?

More than happy to raise a PR myself if you'd like, just wanted some guidance on how you'd do it - or if you even think its something worth having in this package (Maybe pure 2D confetti is better of as a separate library).

Let me know what you think!
Cheers

@FC-jan
Copy link

FC-jan commented Apr 30, 2024

Hey :) thanks for this awesome lib! just to illustrate my use case for this, adapted from the snow example to not stop, but stop on overloaded frame times, using snowflake emoji (the circles didn't stand out enough):
snow.txt

don't find 'em sad, and would find them even less sad rotating ❄️ :)

@FC-jan
Copy link

FC-jan commented May 2, 2024

flat-rotation-proposal.patch
Tested a local proposal of what'd theoretically be needed :) git patch to apply via git apply flat-rotation-proposal.patch as I didn't have rights to push a branch - which is proper permission management :)

it adds a rotate option that only effects flat fettis, and sets a random rotation direction - it could also be used to slow down or speed up the rotation potentially and make it controllable as well if exposed.

edit: for the snow example, it could also make sense to make the rotation depending on current movement, that may be a more natural feel to configure for several effects.

further improvement suggestion: I'd like to have the options available in updateFetti to not have to store them in every fetti. (but on second thought, I suppose that collides with the possible use cases of altering the options every call - maybe an options reference could then improve things marginally? nvm :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants