effects-library icon indicating copy to clipboard operation
effects-library copied to clipboard

Add more options for EmitterPosition

Open DaemonLoki opened this issue 2 years ago • 0 comments

The EmitterPosition option for CAEmitterLayer-based effects is pretty limited right now. It only has 3 options:

  1. .top
  2. .center
  3. .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.

DaemonLoki avatar Jun 21 '22 08:06 DaemonLoki