pub struct InputFeel {
pub orbit_per_px: f32,
pub pan_per_px: f32,
pub dolly_per_scroll: f32,
pub damping: f32,
pub natural_scroll: bool,
}Expand description
How the camera should feel for this OS / input device — derived from facett-core’s look presets so a macOS trackpad orbits/pinches naturally while a Windows wheel zooms in discrete steps.
Fields§
§orbit_per_px: f32Orbit radians per screen pixel of drag.
pan_per_px: f32Pan world-units per screen pixel (scaled by distance at use site).
dolly_per_scroll: f32Multiplicative dolly per wheel/scroll unit (e.g. 0.0015 ⇒ gentle).
damping: f32Damping rate k in 1 - exp(-k·dt). Higher = snappier, lower = floatier.
natural_scroll: boolTrackpad two-finger scroll is “natural” (content follows fingers) — invert the pan sign so a macOS trackpad pans the right way.
Implementations§
Trait Implementations§
impl Copy for InputFeel
impl StructuralPartialEq for InputFeel
Auto Trait Implementations§
impl Freeze for InputFeel
impl RefUnwindSafe for InputFeel
impl Send for InputFeel
impl Sync for InputFeel
impl Unpin for InputFeel
impl UnsafeUnpin for InputFeel
impl UnwindSafe for InputFeel
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more