mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-04 09:58:27 +00:00
Move input tuning constants into fj-viewer
This commit is contained in:
parent
d275399de0
commit
d729087b7a
@ -13,3 +13,21 @@ pub enum MouseButton {
|
||||
/// # The right mouse button
|
||||
Right,
|
||||
}
|
||||
|
||||
/// # Sensitivity of camera zoom, given scroll wheel input in lines
|
||||
///
|
||||
/// Given a specific input, smaller values mean that the camera moves less,
|
||||
/// larger values mean it moves more.
|
||||
pub const CAMERA_ZOOM_SENSITIVITY_LINE: f64 = 0.075;
|
||||
|
||||
/// # Sensitivity of camera zoom, given scroll wheel input in pixels
|
||||
///
|
||||
/// Given a specific input, smaller values mean that the camera moves less,
|
||||
/// larger values mean it moves more.
|
||||
pub const CAMERA_ZOOM_SENSITIVITY_PIXEL: f64 = 0.005;
|
||||
|
||||
/// # Sensitivity of camera rotation
|
||||
///
|
||||
/// Given a specific input, smaller values mean that the camera rotates less,
|
||||
/// larger values mean it rotates more.
|
||||
pub const CAMERA_ROTATION_SENSITIVITY: f64 = 5.;
|
||||
|
@ -18,7 +18,10 @@ mod viewer;
|
||||
pub use self::{
|
||||
graphics::{DeviceError, RendererInitError},
|
||||
input::InputEvent,
|
||||
input::MouseButton,
|
||||
input::{
|
||||
MouseButton, CAMERA_ROTATION_SENSITIVITY, CAMERA_ZOOM_SENSITIVITY_LINE,
|
||||
CAMERA_ZOOM_SENSITIVITY_PIXEL,
|
||||
},
|
||||
screen::{NormalizedScreenPosition, Screen, ScreenSize},
|
||||
viewer::Viewer,
|
||||
};
|
||||
|
@ -1,7 +1,8 @@
|
||||
use fj_interop::Model;
|
||||
use fj_viewer::{
|
||||
InputEvent, NormalizedScreenPosition, RendererInitError, Screen,
|
||||
ScreenSize, Viewer,
|
||||
ScreenSize, Viewer, CAMERA_ROTATION_SENSITIVITY,
|
||||
CAMERA_ZOOM_SENSITIVITY_LINE, CAMERA_ZOOM_SENSITIVITY_PIXEL,
|
||||
};
|
||||
use futures::executor::block_on;
|
||||
use winit::{
|
||||
@ -225,21 +226,3 @@ fn input_event(
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// # Sensitivity of camera zoom, given scroll wheel input in lines
|
||||
///
|
||||
/// Given a specific input, smaller values mean that the camera moves less,
|
||||
/// larger values mean it moves more.
|
||||
const CAMERA_ZOOM_SENSITIVITY_LINE: f64 = 0.075;
|
||||
|
||||
/// # Sensitivity of camera zoom, given scroll wheel input in pixels
|
||||
///
|
||||
/// Given a specific input, smaller values mean that the camera moves less,
|
||||
/// larger values mean it moves more.
|
||||
const CAMERA_ZOOM_SENSITIVITY_PIXEL: f64 = 0.005;
|
||||
|
||||
/// # Sensitivity of camera rotation
|
||||
///
|
||||
/// Given a specific input, smaller values mean that the camera rotates less,
|
||||
/// larger values mean it rotates more.
|
||||
const CAMERA_ROTATION_SENSITIVITY: f64 = 5.;
|
||||
|
Loading…
Reference in New Issue
Block a user