lighthouse_protocol/input/
gamepad_axis_event.rs

1use serde::{Deserialize, Serialize};
2
3/// A 1D axis event on a gamepad.
4#[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
5#[serde(tag = "control", rename_all = "camelCase")]
6pub struct GamepadAxisEvent {
7    /// The 1D axis index.
8    pub index: usize,
9    /// The value of the axis (between -1.0 and 1.0, modeled after the Web Gamepad API).
10    pub value: f64,
11}