Struct goshawk::PanSettings[][src]

pub struct PanSettings {
    pub mouse_accel: f32,
    pub mouse_accel_margin: f32,
    pub keyboard_accel: f32,
    pub max_speed: f32,
    pub idle_deceleration: f32,
    pub pan_speed_zoom_factor_range: RangeInclusive<f32>,
    pub left_keys: Cow<'static, [KeyCode]>,
    pub right_keys: Cow<'static, [KeyCode]>,
    pub up_keys: Cow<'static, [KeyCode]>,
    pub down_keys: Cow<'static, [KeyCode]>,
}

Fields

mouse_accel: f32

The acceleration which the mouse applies to the camera's panning motion.

mouse_accel_margin: f32

The minimum distance from the edge of the window the mouse must be in order for the camera to begin panning.

keyboard_accel: f32

The acceleration that they keyboard applies to the camera's panning motion

max_speed: f32

The maximum velocity at which the camera may pan

idle_deceleration: f32

The deceleration of the panning while nothing is accelerating it in a certain direction

pan_speed_zoom_factor_range: RangeInclusive<f32>

The effect of zoom distance on pan speed. This can be set to make panning faster when more zoomed out. The start value of this range is the factor at the minimum zoom level, and the end is the factor at the maximum zoom level. The factor will be linearly interpolated according to the zoom distance.

left_keys: Cow<'static, [KeyCode]>

The keys which will cause the camera to pan left

right_keys: Cow<'static, [KeyCode]>

The keys which will cause the camera to pan right

up_keys: Cow<'static, [KeyCode]>

The keys which will cause the camera to pan up

down_keys: Cow<'static, [KeyCode]>

The keys which will cause the camera to pan down

Implementations

impl PanSettings[src]

pub const fn new() -> Self[src]

Trait Implementations

impl Clone for PanSettings[src]

impl Debug for PanSettings[src]

impl Default for PanSettings[src]

impl PartialEq<PanSettings> for PanSettings[src]

impl StructuralPartialEq for PanSettings[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> Component for T where
    T: 'static + Send + Sync

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T> FromResources for T where
    T: Default

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: 'static + Send + Sync

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> TypeData for T where
    T: 'static + Send + Sync + Clone

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,