viewport-lib-types 0.2.0

Pure-data types for viewport-lib: submission payloads, handles, and frame config, free of any GPU dependency.
Documentation
//! Per-frame viewport context for the new input pipeline.

/// Per-frame viewport context passed to `OrbitCameraController::begin_frame`
/// (and `ViewportInput::begin_frame`).
///
/// Carries the hover, focus, and size state needed to interpret viewport input.
#[derive(Debug, Clone, Copy)]
pub struct ViewportContext {
    /// Whether the pointer is currently hovering over the viewport.
    pub hovered: bool,
    /// Whether the viewport currently has keyboard focus.
    pub focused: bool,
    /// Viewport size in logical pixels `[width, height]`.
    pub viewport_size: [f32; 2],
}

impl Default for ViewportContext {
    fn default() -> Self {
        Self {
            hovered: false,
            focused: false,
            viewport_size: [1.0, 1.0],
        }
    }
}