(mut self, easing: EasingFunction)
| 30 | } |
| 31 | |
| 32 | pub fn with_easing(mut self, easing: EasingFunction) -> Self { |
| 33 | self.easing = easing; |
| 34 | self |
| 35 | } |
| 36 | |
| 37 | pub fn update(&mut self, delta_time: Duration) -> f32 { |
| 38 | self.progress += delta_time.as_secs_f32() / self.duration.as_secs_f32(); |