Skip to content

Design what happens to completion events when playback jumps backward #60

Description

@djeedai

The set_progress() (and discussed set_elapsed()) method allow you to move the animation to an earlier point than the one it's in currently. Traditionally for tick-based animation the tween will emit a completion event each time it's completed. However, when playback jumps backward, it's unclear what should be done for completion events, especially when the tween is repeating, and jumping backward can decrease the completed count (times_completed) by more than one.

Conceptually it feels like jumping backward this way is not a natural way of animating, and is more geared toward editors or manual seeking, so it feels like ignoring completion events (and callbacks) in that case is the best approach.

Note however that there is also the playback direction which allows smooth playback but in reverse order. Although this is a distinct and probably orthogonal feature (it only swaps the endpoints of the lens), conceptually it can be confusing to make a distinction between "moving by 1 second in backward direction" and "seeking 1 second before the current point", which both result in the same state for the underlying animated component, but not for the tween which has a different direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    designA design remark or improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions