pub struct RadialInteraction {
pub hovered: Option<RadialTarget>,
pub selected: Option<RadialTarget>,
pub hover_progress: f32,
}Fields§
§hovered: Option<RadialTarget>Current animation target; the host advances it with Self::animate_hover.
selected: Option<RadialTarget>Persistent selection, independent of the pointer. None clears selection.
hover_progress: f32Linear progress in 0..1. Rendering applies smoothstep via Self::amount.
Implementations§
Source§impl RadialInteraction
impl RadialInteraction
Sourcepub fn animate_hover(
&mut self,
target: Option<RadialTarget>,
dt: f32,
duration: f32,
) -> bool
pub fn animate_hover( &mut self, target: Option<RadialTarget>, dt: f32, duration: f32, ) -> bool
Host supplies elapsed seconds; no wall clock, browser, or permanent animation loop. Exit completes before a different slice enters. Returns whether state changed. A zero duration switches immediately. Negative/nonfinite time inputs are ignored. The host must keep requesting frames until the transition settles.
pub fn amount(&self, target: RadialTarget) -> f32
Trait Implementations§
Source§impl Clone for RadialInteraction
impl Clone for RadialInteraction
Source§impl Debug for RadialInteraction
impl Debug for RadialInteraction
Source§impl Default for RadialInteraction
impl Default for RadialInteraction
Source§impl<'de> Deserialize<'de> for RadialInteraction
impl<'de> Deserialize<'de> for RadialInteraction
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 RadialInteraction
impl PartialEq for RadialInteraction
Source§impl Serialize for RadialInteraction
impl Serialize for RadialInteraction
impl StructuralPartialEq for RadialInteraction
Auto Trait Implementations§
impl Freeze for RadialInteraction
impl RefUnwindSafe for RadialInteraction
impl Send for RadialInteraction
impl Sync for RadialInteraction
impl Unpin for RadialInteraction
impl UnsafeUnpin for RadialInteraction
impl UnwindSafe for RadialInteraction
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