Type Alias pixel_game_lib::transition::LinearTransition
source · pub type LinearTransition<T, Progress = f32> = Transition<T, IdentityProgressMapper, Progress>;Expand description
A convenience structure for storing a linear progression from one value to another.
Aliased Type§
struct LinearTransition<T, Progress = f32> {
pub start: T,
pub end: T,
pub progress: Progress,
pub progress_mapper: IdentityProgressMapper,
}Fields§
§start: TThe value when progress gets close to 0.
end: TThe value when progress gets close to 1.
progress: ProgressExpected to be between 0 and 1.
progress_mapper: IdentityProgressMapperFunctor that maps the current progress value to a LERP factor.