File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 67
67
self
68
68
}
69
69
70
+ /// Makes the [`Animation`] repeat a given amount of times.
71
+ ///
72
+ /// Providing 1 repetition plays the animation twice in total.
73
+ pub fn repeat ( mut self , repetitions : u32 ) -> Self {
74
+ self . raw = self . raw . repeat ( repetitions) ;
75
+ self
76
+ }
77
+
78
+ /// Makes the [`Animation`] repeat forever.
79
+ pub fn repeat_forever ( mut self ) -> Self {
80
+ self . raw = self . raw . repeat_forever ( ) ;
81
+ self
82
+ }
83
+
84
+ /// Makes the [`Animation`] automatically reverse when repeating.
85
+ pub fn auto_reverse ( mut self ) -> Self {
86
+ self . raw = self . raw . auto_reverse ( ) ;
87
+ self
88
+ }
89
+
70
90
/// Transitions the [`Animation`] from its current state to the given new state.
71
91
pub fn go ( mut self , new_state : T ) -> Self {
72
92
self . go_mut ( new_state) ;
You can’t perform that action at this time.
0 commit comments