nightshade 0.56.0

A cross-platform data-oriented game engine.
Documentation
//! Retained-UI gizmo overlays.
//!
//! Draws transform handles (translate, rotate, scale) and the navigation gizmo
//! through the retained UI overlay system. Apps select which transform handle
//! to display by setting `world.res::<crate::ecs::ui::UserInterface>().gizmos.mode`. The
//! overlay systems run as part of the default frame schedule.

mod nav_gizmo;
mod overlay;
mod overlays_enabled;
mod state;

pub use nav_gizmo::nav_gizmo_overlay_system;
pub use overlay::gizmo_overlay_system;
pub use state::{
    GizmoMode, GizmoPlanarScaleDrag, GizmoPlanarTranslationDrag, GizmoRotationDrag, GizmoScaleDrag,
    GizmoTranslationDrag, Gizmos,
};

/// Installs the gizmo overlays: the transform-handle and navigation-gizmo
/// overlay passes run after transform propagation, so the handles track
/// this frame's motion. Select the transform handle at runtime via
/// `world.res::<crate::ecs::ui::UserInterface>().gizmos.mode`.
pub struct GizmosPlugin;

impl crate::app::Plugin for GizmosPlugin {
    fn build(&self, app: &mut crate::app::App) {
        use crate::app::Stage;
        app.add_system(Stage::FramePostUpdate, overlay::gizmo_overlay_system);
        app.add_system(Stage::FramePostUpdate, nav_gizmo::nav_gizmo_overlay_system);
    }
}