pub struct NodeTransition { /* private fields */ }Expand description
Paint-only opacity and 2D transform transition animated per frame without re-running layout.
Implementations§
Source§impl NodeTransition
Standard transition presets and sampling helpers for NodeTransition.
impl NodeTransition
Standard transition presets and sampling helpers for NodeTransition.
Sourcepub fn with_delay(self, delay_secs: f32) -> Self
pub fn with_delay(self, delay_secs: f32) -> Self
Sourcepub fn with_duration(self, duration_secs: f32) -> Self
pub fn with_duration(self, duration_secs: f32) -> Self
Sourcepub fn with_easing(self, easing: Easing) -> Self
pub fn with_easing(self, easing: Easing) -> Self
Sourcepub fn with_opacity(self, from: f32, to: f32) -> Self
pub fn with_opacity(self, from: f32, to: f32) -> Self
Sourcepub fn with_offset(self, from: Point, to: Point) -> Self
pub fn with_offset(self, from: Point, to: Point) -> Self
Sourcepub fn with_scale(self, from: f32, to: f32) -> Self
pub fn with_scale(self, from: f32, to: f32) -> Self
Sourcepub fn with_hide_on_complete(self, hide: bool) -> Self
pub fn with_hide_on_complete(self, hide: bool) -> Self
Sourcepub fn route_enter(node: NodeId) -> Self
pub fn route_enter(node: NodeId) -> Self
Sourcepub fn route_slide_enter(node: NodeId, start_tx: f32) -> Self
pub fn route_slide_enter(node: NodeId, start_tx: f32) -> Self
Creates a directional horizontal page-slide entrance transition (260ms EaseOutQuint, opaque crisp slide).
§Arguments
NodeId- Incoming page container node.f32- Starting horizontal translation offset in logical pixels (+pxenters from right,-pxenters from left).
§Returns
Self- Directional horizontal route entrance transition.
Sourcepub fn route_slide_exit(node: NodeId, end_tx: f32) -> Self
pub fn route_slide_exit(node: NodeId, end_tx: f32) -> Self
Creates a directional horizontal page-slide exit transition (220ms EaseOutQuint) hiding the node on completion.
§Arguments
NodeId- Outgoing page container node.f32- Ending horizontal translation offset in logical pixels (-pxexits left,+pxexits right).
§Returns
Self- Directional horizontal route exit transition.
Sourcepub fn fade(
node: NodeId,
from: f32,
to: f32,
duration: f32,
hide_on_complete: bool,
) -> Self
pub fn fade( node: NodeId, from: f32, to: f32, duration: f32, hide_on_complete: bool, ) -> Self
Sourcepub fn slide_fade(
node: NodeId,
from_offset: Point,
to_offset: Point,
from_opacity: f32,
to_opacity: f32,
duration: f32,
hide_on_complete: bool,
) -> Self
pub fn slide_fade( node: NodeId, from_offset: Point, to_offset: Point, from_opacity: f32, to_opacity: f32, duration: f32, hide_on_complete: bool, ) -> Self
Creates a slide-and-fade transition for drawers, sheets, popovers, dropdowns, and toasts.
§Arguments
NodeId- Target node handle.Point- Starting(tx, ty)offset in logical pixels.Point- Ending(tx, ty)offset in logical pixels.f32- Starting opacity.f32- Ending opacity.f32- Duration in seconds.bool- Whether to hide the node upon completion.
§Returns
Self- Slide + fade transition.
Sourcepub fn modal_enter(node: NodeId) -> Self
pub fn modal_enter(node: NodeId) -> Self
Sourcepub fn modal_exit(node: NodeId) -> Self
pub fn modal_exit(node: NodeId) -> Self
Sourcepub fn sample(&self) -> (f32, Transform2D)
pub fn sample(&self) -> (f32, Transform2D)
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Source§impl NodeTransition
impl NodeTransition
pub fn get_node(&self) -> NodeId
pub fn get_mut_node(&mut self) -> &mut NodeId
pub fn set_node(&mut self, val: NodeId) -> &mut Self
pub fn get_elapsed(&self) -> f32
pub fn get_mut_elapsed(&mut self) -> &mut f32
pub fn set_elapsed(&mut self, val: f32) -> &mut Self
pub fn get_delay(&self) -> f32
pub fn get_mut_delay(&mut self) -> &mut f32
pub fn set_delay(&mut self, val: f32) -> &mut Self
pub fn get_duration(&self) -> f32
pub fn get_mut_duration(&mut self) -> &mut f32
pub fn set_duration(&mut self, val: f32) -> &mut Self
pub fn get_easing(&self) -> Easing
pub fn get_mut_easing(&mut self) -> &mut Easing
pub fn set_easing(&mut self, val: Easing) -> &mut Self
pub fn get_from_opacity(&self) -> f32
pub fn get_mut_from_opacity(&mut self) -> &mut f32
pub fn set_from_opacity(&mut self, val: f32) -> &mut Self
pub fn get_to_opacity(&self) -> f32
pub fn get_mut_to_opacity(&mut self) -> &mut f32
pub fn set_to_opacity(&mut self, val: f32) -> &mut Self
pub fn get_from_tx(&self) -> f32
pub fn get_mut_from_tx(&mut self) -> &mut f32
pub fn set_from_tx(&mut self, val: f32) -> &mut Self
pub fn get_to_tx(&self) -> f32
pub fn get_mut_to_tx(&mut self) -> &mut f32
pub fn set_to_tx(&mut self, val: f32) -> &mut Self
pub fn get_from_ty(&self) -> f32
pub fn get_mut_from_ty(&mut self) -> &mut f32
pub fn set_from_ty(&mut self, val: f32) -> &mut Self
pub fn get_to_ty(&self) -> f32
pub fn get_mut_to_ty(&mut self) -> &mut f32
pub fn set_to_ty(&mut self, val: f32) -> &mut Self
pub fn get_from_scale(&self) -> f32
pub fn get_mut_from_scale(&mut self) -> &mut f32
pub fn set_from_scale(&mut self, val: f32) -> &mut Self
pub fn get_to_scale(&self) -> f32
pub fn get_mut_to_scale(&mut self) -> &mut f32
pub fn set_to_scale(&mut self, val: f32) -> &mut Self
pub fn get_hide_on_complete(&self) -> bool
pub fn get_mut_hide_on_complete(&mut self) -> &mut bool
pub fn set_hide_on_complete(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for NodeTransition
impl Clone for NodeTransition
impl Copy for NodeTransition
Source§impl Debug for NodeTransition
impl Debug for NodeTransition
Source§impl PartialEq for NodeTransition
impl PartialEq for NodeTransition
impl StructuralPartialEq for NodeTransition
Auto Trait Implementations§
impl Forget for NodeTransition
impl Freeze for NodeTransition
impl Move for NodeTransition
impl RefUnwindSafe for NodeTransition
impl Send for NodeTransition
impl Sync for NodeTransition
impl Unpin for NodeTransition
impl UnsafeUnpin for NodeTransition
impl UnwindSafe for NodeTransition
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