Skip to content

Yoyo animation #3

@andrewMacmurray

Description

@andrewMacmurray

Could be nice to have an option to make an animation yoyo back to it's first frame

For something like this animation:

2021-01-03 13 22 52

Instead of writing:

pulseOpacity : Animation
pulseOpacity =
    Animation.steps
        { startAt = [ P.opacity 1 ]
        , options = [ Animation.loop ]
        }
        [ Animation.step 800 [ P.opacity 0 ]
        , Animation.step 800 [ P.opacity 1 ]
        ]

You could have a shorthand like:

pulseOpacity : Animation
pulseOpacity =
    Animation.fromTo
        { duration = 800
        , options = [ Animation.loop, Animation.yoyo ]
        }
        [ P.opacity 1 ]
        [ P.opacity 0 ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions