As mentioned in some recent threads  , easing functions for
animations have been an example of where functions in the model are
currently used. An alternative approach is to use a union type to indicate
the easing, but a suggested shortcoming of that approach is that there
would then be no way for downstream developers to use their own custom
I was just thinking that this could be achieved as follows:
type AdvancedEasing a
= Linear | InQuad | OutQuad | ...
| CustomEasing a
type alias Easing = AdvancedEasing Never
apply : Easing -> Float -> Float
applyAdvanced : (a -> Float -> Float) -> AdvancedEasing a -> Float -> Float
In this way, the custom easing functions (a -> Float -> Float) are moved
from the model to configuration.
I was curious if anyone has experimented with this approach yet.
You received this message because you are subscribed to the Google Groups "Elm
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.