diff --git a/editor/src/plugins/debug/layers.rs b/editor/src/plugins/debug/layers.rs index e99be0dfd2..a364b706b5 100644 --- a/editor/src/plugins/debug/layers.rs +++ b/editor/src/plugins/debug/layers.rs @@ -1,11 +1,8 @@ use crate::objects::ID; use crate::plugins::{AmbientPlugin, PluginCtx}; +use crate::render::{MIN_ZOOM_FOR_BUILDINGS, MIN_ZOOM_FOR_PARCELS, MIN_ZOOM_FOR_ROADS}; use ezgui::ToggleableLayer; -// TODO ideally these would be tuned kind of dynamically based on rendering speed -const MIN_ZOOM_FOR_LANES: f64 = 0.15; -const MIN_ZOOM_FOR_PARCELS: f64 = 1.0; - pub struct ToggleableLayers { pub show_lanes: ToggleableLayer, pub show_buildings: ToggleableLayer, @@ -20,11 +17,11 @@ pub struct ToggleableLayers { impl ToggleableLayers { pub fn new() -> ToggleableLayers { ToggleableLayers { - show_lanes: ToggleableLayer::new("lanes", Some(MIN_ZOOM_FOR_LANES)), - show_buildings: ToggleableLayer::new("buildings", Some(0.0)), - show_intersections: ToggleableLayer::new("intersections", Some(MIN_ZOOM_FOR_LANES)), + show_lanes: ToggleableLayer::new("lanes", Some(MIN_ZOOM_FOR_ROADS)), + show_buildings: ToggleableLayer::new("buildings", Some(MIN_ZOOM_FOR_BUILDINGS)), + show_intersections: ToggleableLayer::new("intersections", Some(MIN_ZOOM_FOR_ROADS)), show_parcels: ToggleableLayer::new("parcels", Some(MIN_ZOOM_FOR_PARCELS)), - show_extra_shapes: ToggleableLayer::new("extra shapes", Some(MIN_ZOOM_FOR_LANES)), + show_extra_shapes: ToggleableLayer::new("extra shapes", Some(MIN_ZOOM_FOR_BUILDINGS)), show_all_turn_icons: ToggleableLayer::new("all turn icons", None), show_areas: ToggleableLayer::new("areas", Some(0.0)), debug_mode: ToggleableLayer::new("geometry debug mode", None), diff --git a/editor/src/render/mod.rs b/editor/src/render/mod.rs index 933a6315ac..700fe0b36e 100644 --- a/editor/src/render/mod.rs +++ b/editor/src/render/mod.rs @@ -39,7 +39,10 @@ const TURN_ICON_ARROW_THICKNESS: Distance = Distance::const_meters(0.15); const TURN_ICON_ARROW_LENGTH: Distance = Distance::const_meters(2.0); pub const CROSSWALK_LINE_THICKNESS: Distance = Distance::const_meters(0.25); -pub const MIN_ZOOM_FOR_MARKINGS: f64 = 5.0; +pub const MIN_ZOOM_FOR_ROADS: f64 = 0.0; +pub const MIN_ZOOM_FOR_BUILDINGS: f64 = 0.5; +pub const MIN_ZOOM_FOR_MARKINGS: f64 = 1.0; +pub const MIN_ZOOM_FOR_PARCELS: f64 = 1.0; // Does something belong here or as a method on ID? If it ONLY applies to renderable things, then // here. For example, trips aren't drawn, so it's meaningless to ask what their bounding box is.