-
Notifications
You must be signed in to change notification settings - Fork 13
Description
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