simibac / ConfettiSwiftUI

SwiftUI Package for Configurable Confetti Animation 🎉
MIT License
1.71k stars 117 forks source link

Possibility to have a layover that just lets rain down a continuous stream of confetti across the with of a view #37

Open peterscmdt opened 1 year ago

peterscmdt commented 1 year ago

Is there a possibility to have a layover that just lets rain down a continuous stream of confetti across the with of a view? (As opposed to letting the confetti originate from an object on screen like a button or so.)

simibac commented 1 year ago

You could create a full screen overlay in a Zstack as one of your most outer views and pass down the state variable to the desired child view.

peterscmdt commented 1 year ago

Hi, thanks for your comment! Still, I would have the issue that the confetti originates from one specific point inside my view, right? What I meant was the option to basically generate confetti particles that randomly originate from the the top of a view, across its whole width, if that makes sense. Similar to what you can see on the attached picture.

Screenshot 2023-07-31 at 18 25 41