lighthouse-protocol 6.2.1

Protocol types for Project Lighthouse
Documentation
1
2
3
4
5
6
7
8
9
10
11
use serde::{Deserialize, Serialize};

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