forge
Explore
Log in

Don't you dare go Hollow

animation: Add more getters

Browse files at this commit

4a4c972ffb900951b65fb5317b62c592bbccfc44Ivan MolodetskikhParent: ba93377
src/animation/mod.rsmodified+12 -1
@@ -295,11 +295,22 @@ impl Animation {
295 self.to295 self.to
296 }296 }
297 297
298- #[cfg(test)]
299 pub fn from(&self) -> f64 {298 pub fn from(&self) -> f64 {
300 self.from299 self.from
301 }300 }
302 301
302+ pub fn start_time(&self) -> Duration {
303+ self.start_time
304+ }
305+
306+ pub fn end_time(&self) -> Duration {
307+ self.start_time + self.duration
308+ }
309+
310+ pub fn duration(&self) -> Duration {
311+ self.duration
312+ }
313+
303 pub fn offset(&mut self, offset: f64) {314 pub fn offset(&mut self, offset: f64) {
304 self.from += offset;315 self.from += offset;
305 self.to += offset;316 self.to += offset;