pub struct TweenBuilder<T>where
T: Tweenable,{ /* private fields */ }Expand description
Builder for creating tweens with fluent API.
Implementations§
Source§impl<T> TweenBuilder<T>where
T: Tweenable,
impl<T> TweenBuilder<T>where
T: Tweenable,
Sourcepub fn new(from: T, to: T) -> TweenBuilder<T>
pub fn new(from: T, to: T) -> TweenBuilder<T>
Create a new builder.
Sourcepub fn duration(self, secs: f32) -> TweenBuilder<T>
pub fn duration(self, secs: f32) -> TweenBuilder<T>
Set the duration in seconds.
Sourcepub fn easing(self, easing: Easing) -> TweenBuilder<T>
pub fn easing(self, easing: Easing) -> TweenBuilder<T>
Set the easing function.
Sourcepub fn repeat(self, repeat: impl Into<Repeat>) -> TweenBuilder<T>
pub fn repeat(self, repeat: impl Into<Repeat>) -> TweenBuilder<T>
Set repeat count.
Sourcepub fn yoyo(self, enabled: bool) -> TweenBuilder<T>
pub fn yoyo(self, enabled: bool) -> TweenBuilder<T>
Enable yoyo mode (alternate direction on each repeat).
Sourcepub fn repeat_delay(self, delay: f32) -> TweenBuilder<T>
pub fn repeat_delay(self, delay: f32) -> TweenBuilder<T>
Set delay between repeats.
Sourcepub fn delay(self, delay: f32) -> TweenBuilder<T>
pub fn delay(self, delay: f32) -> TweenBuilder<T>
Set initial delay before the animation starts.
Sourcepub fn time_scale(self, scale: f32) -> TweenBuilder<T>
pub fn time_scale(self, scale: f32) -> TweenBuilder<T>
Set the time scale multiplier.
Sourcepub fn on_start<F>(self, f: F) -> TweenBuilder<T>
pub fn on_start<F>(self, f: F) -> TweenBuilder<T>
Set a sync callback for on_start.
Sourcepub fn on_update<F>(self, f: F) -> TweenBuilder<T>
pub fn on_update<F>(self, f: F) -> TweenBuilder<T>
Set a sync callback for on_update.
Sourcepub fn on_complete<F>(self, f: F) -> TweenBuilder<T>
pub fn on_complete<F>(self, f: F) -> TweenBuilder<T>
Set a sync callback for on_complete.
Sourcepub fn on_repeat<F>(self, f: F) -> TweenBuilder<T>
pub fn on_repeat<F>(self, f: F) -> TweenBuilder<T>
Set a sync callback for on_repeat.
Trait Implementations§
Source§impl<T> Clone for TweenBuilder<T>
impl<T> Clone for TweenBuilder<T>
Source§fn clone(&self) -> TweenBuilder<T>
fn clone(&self) -> TweenBuilder<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for TweenBuilder<T>where
T: Freeze,
impl<T> !RefUnwindSafe for TweenBuilder<T>
impl<T> Send for TweenBuilder<T>
impl<T> Sync for TweenBuilder<T>
impl<T> Unpin for TweenBuilder<T>where
T: Unpin,
impl<T> !UnwindSafe for TweenBuilder<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more