mdgriffith / elm-style-animation / Animation.Messenger

Import this module if you want the ability to send a Msg at any point during your animation.


type alias State msg =
Animation.Model.Animation msg

An Animation State that also tracks your Msg type.

update : Animation.Model.Tick -> Animation.Model.Animation msg -> ( Animation.Model.Animation msg, Platform.Cmd.Cmd msg )

An update that returns the updated animation as well as any messages sent in Cmd form.

send : msg -> Animation.Model.Step msg

An animation Step which will send a message. For example

Animation.interrupt
    [ Animation.to [Animation.opacity 0]
    , Animation.send OpacityIsNotZero
    ]


type alias Step msg =
Animation.Model.Step msg