pub struct ViewportAnimationPlan {
pub from: ViewportTransform,
pub to: ViewportTransform,
pub duration_seconds: f32,
pub easing: ViewportAnimationEasing,
}Expand description
Deterministic viewport animation plan.
Fields§
§from: ViewportTransform§to: ViewportTransform§duration_seconds: f32§easing: ViewportAnimationEasingImplementations§
Source§impl ViewportAnimationPlan
impl ViewportAnimationPlan
Sourcepub fn frame_at(self, elapsed_seconds: f32) -> Option<ViewportAnimationFrame>
pub fn frame_at(self, elapsed_seconds: f32) -> Option<ViewportAnimationFrame>
Samples this plan at an elapsed time in seconds.
pub fn is_immediate(self) -> bool
Trait Implementations§
Source§impl Clone for ViewportAnimationPlan
impl Clone for ViewportAnimationPlan
Source§fn clone(&self) -> ViewportAnimationPlan
fn clone(&self) -> ViewportAnimationPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ViewportAnimationPlan
Source§impl Debug for ViewportAnimationPlan
impl Debug for ViewportAnimationPlan
Source§impl<'de> Deserialize<'de> for ViewportAnimationPlan
impl<'de> Deserialize<'de> for ViewportAnimationPlan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ViewportAnimationPlan
impl PartialEq for ViewportAnimationPlan
Source§fn eq(&self, other: &ViewportAnimationPlan) -> bool
fn eq(&self, other: &ViewportAnimationPlan) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ViewportAnimationPlan
impl Serialize for ViewportAnimationPlan
impl StructuralPartialEq for ViewportAnimationPlan
Auto Trait Implementations§
impl Freeze for ViewportAnimationPlan
impl RefUnwindSafe for ViewportAnimationPlan
impl Send for ViewportAnimationPlan
impl Sync for ViewportAnimationPlan
impl Unpin for ViewportAnimationPlan
impl UnsafeUnpin for ViewportAnimationPlan
impl UnwindSafe for ViewportAnimationPlan
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