mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-28 03:35:51 +03:00
stop coloring synthetic/original stuff in map editor. not useful now that it's normal to modify existing stuff
This commit is contained in:
parent
7800ac046e
commit
179009de32
@ -48,7 +48,6 @@ pub fn split_up_roads(
|
||||
IntersectionType::StopSign
|
||||
},
|
||||
label: None,
|
||||
synthetic: false,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -227,12 +227,7 @@ impl Model {
|
||||
|
||||
self.world.add(
|
||||
prerender,
|
||||
Object::new(
|
||||
ID::Intersection(id),
|
||||
if i.synthetic { color.alpha(0.5) } else { color },
|
||||
poly,
|
||||
)
|
||||
.maybe_label(i.label.clone()),
|
||||
Object::new(ID::Intersection(id), color, poly).maybe_label(i.label.clone()),
|
||||
);
|
||||
}
|
||||
|
||||
@ -246,7 +241,6 @@ impl Model {
|
||||
point,
|
||||
intersection_type: IntersectionType::StopSign,
|
||||
label: None,
|
||||
synthetic: true,
|
||||
},
|
||||
);
|
||||
self.intersection_added(id, prerender);
|
||||
@ -567,9 +561,8 @@ impl Model {
|
||||
|
||||
fn road_objects(&self, id: OriginalRoad) -> Vec<Object<ID>> {
|
||||
let r = &self.map.roads[&id];
|
||||
let synthetic = r.synthetic();
|
||||
let unset =
|
||||
synthetic && r.osm_tags.get(osm::NAME) == Some(&"Streety McStreetFace".to_string());
|
||||
r.synthetic() && r.osm_tags.get(osm::NAME) == Some(&"Streety McStreetFace".to_string());
|
||||
let lanes_unknown = r.osm_tags.contains_key(osm::INFERRED_PARKING)
|
||||
|| r.osm_tags.contains_key(osm::INFERRED_SIDEWALKS);
|
||||
let spec = r.get_spec();
|
||||
@ -582,7 +575,7 @@ impl Model {
|
||||
|
||||
for (idx, lt) in spec.fwd.iter().enumerate() {
|
||||
obj.push(
|
||||
Model::lt_to_color(*lt, synthetic, unset, lanes_unknown),
|
||||
Model::lt_to_color(*lt, unset, lanes_unknown),
|
||||
center_pts
|
||||
.shift_right(LANE_THICKNESS * (0.5 + (idx as f64)))
|
||||
.unwrap()
|
||||
@ -597,7 +590,7 @@ impl Model {
|
||||
}
|
||||
for (idx, lt) in spec.back.iter().enumerate() {
|
||||
obj.push(
|
||||
Model::lt_to_color(*lt, synthetic, unset, lanes_unknown),
|
||||
Model::lt_to_color(*lt, unset, lanes_unknown),
|
||||
center_pts
|
||||
.reversed()
|
||||
.shift_right(LANE_THICKNESS * (0.5 + (idx as f64)))
|
||||
@ -637,7 +630,7 @@ impl Model {
|
||||
}
|
||||
|
||||
// Copied from render/lane.rs. :(
|
||||
fn lt_to_color(lt: LaneType, synthetic: bool, unset: bool, lanes_unknown: bool) -> Color {
|
||||
fn lt_to_color(lt: LaneType, unset: bool, lanes_unknown: bool) -> Color {
|
||||
let color = match lt {
|
||||
LaneType::Driving => Color::BLACK,
|
||||
LaneType::Bus => Color::rgb(190, 74, 76),
|
||||
@ -647,14 +640,10 @@ impl Model {
|
||||
LaneType::SharedLeftTurn => Color::YELLOW,
|
||||
LaneType::Construction => Color::rgb(255, 109, 0),
|
||||
};
|
||||
if synthetic {
|
||||
if unset {
|
||||
match color {
|
||||
Color::RGBA(_, g, b, _) => Color::rgba_f(0.9, g, b, 0.5),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
} else {
|
||||
color.alpha(0.5)
|
||||
if unset {
|
||||
match color {
|
||||
Color::RGBA(_, g, b, _) => Color::rgba_f(0.9, g, b, 0.5),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
} else if lanes_unknown {
|
||||
match color {
|
||||
|
@ -534,7 +534,6 @@ pub struct RawIntersection {
|
||||
pub point: Pt2D,
|
||||
pub intersection_type: IntersectionType,
|
||||
pub label: Option<String>,
|
||||
pub synthetic: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
|
Loading…
Reference in New Issue
Block a user