lotus_script/input.rs
1use lotus_script_sys::FfiObject;
2use lotus_shared::math::Vec2;
3
4pub use lotus_shared::input::*;
5
6/// Get the delta of the mouse since the last frame.
7/// TODO: Specify the units.
8pub fn mouse_delta() -> Vec2 {
9 let delta = unsafe { lotus_script_sys::input::mouse_delta() };
10 FfiObject::from_packed(delta).deserialize()
11}