Skip to content

Would adding support for discrete tweening make sense? #14

@TheButlah

Description

@TheButlah

There are many values that are not tweenable, for example, a u8. It would be cool to be able to define using keyframes the values that a function with a discrete output should take for a given floating point input between 0 and 1. This would mean that I could animate non floating point values.

Conceptually I could have converted the discrete value like a u8 into a f32, and then truncated the decimal after the tweening to get the discrete result. But that requires additional work for the user of the API - if they have structs consisting of both floats and discrete types, they would ideally like to have that float use #[derive(CanTween)] instead of manually implementing CanTween by tweening all the floats and then taking all the u8s, converting to floats, tweening, and then casting back to a discrete type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions