mirror of
https://github.com/a-b-street/abstreet.git
synced 2025-01-01 10:57:17 +03:00
tune min zoom levels a bit
This commit is contained in:
parent
f91fbb67d6
commit
adcf5ca2a8
@ -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),
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user