effects-library
effects-library copied to clipboard
Add more options for EmitterPosition
The EmitterPosition option for CAEmitterLayer-based effects is pretty limited right now. It only has 3 options:
-
.top -
.center -
.bottom
From an implementation standpoint, it is rather straightforward to expand that to more options, like .topLeading, .bottomTrailing, .centerLeading, and all combinations of them.
The calculation of the position also doesn't require much effort as the values are all given due to the embedding in the GeometryReader.