ForesightMiningSoftwareCorporation / bevy_transform_gizmo

A 3d gizmo for transforming entities in Bevy.
Apache License 2.0
160 stars 40 forks source link

Add configuration to control visibility of sub gizmos #70

Closed mrok-gmx-de closed 4 months ago

mrok-gmx-de commented 4 months ago

Sometimes it can be helpful to limit the sub-gizmos displayed to specific axes. Therefore it would be nice to add a configuration that controls each individual sub-gizmo. A corresponding structure should look like this:

pub struct AxisConfig {
    pub x: bool,
    pub y: bool,
    pub z: bool,
    pub view: bool,
}

pub struct GizmoVisibility {
    // translation helper
    pub translation_arrow: AxisConfig,
    pub translation_plane: AxisConfig,
    // scaling helper
    pub scaling_arrow: AxisConfig,
    pub scaling_plane: AxisConfig,
    // Rotation helper
    pub rotation_arc: AxisConfig,
    pub rotation_arc_ball: bool,
}