GetStream / effects-library

The Effects Library allows developers to create sophisticated and realistic particle systems such as snow, fire, rain, confetti, fireworks, and smoke with no or minimal effort.
https://getstream.github.io/effects-library/documentation/effectslibrary/
Apache License 2.0
327 stars 16 forks source link

Add a custom config option for configuration Enums #9

Open DaemonLoki opened 2 years ago

DaemonLoki commented 2 years ago

Right now, we are only allowing pre-set values for configurations. An example is the Lifetime enum which only has options for the values .low, medium, and .high.

The advantage that brings is that developers do not need to know about the internals happening and the values that are being set for each of the cases.

The disadvantage is that it limits creativity and customization options.

We want to strike a sweet balance here and therefore suggest adding a .custom(CGFloat) option, making use of associated values for enums. Therefore developers not caring about the internals can still use the existing cases while more avid users can dive deep into customization with the .config option.