per suggestion of a cugos member, color all parked cars the same. distinguishing moving cars is helpful, but not parked ones

This commit is contained in:
Dustin Carlino 2020-06-17 11:15:14 -07:00
parent 82ba62df29
commit d2c674eb9a
3 changed files with 3 additions and 9 deletions

View File

@ -75,14 +75,6 @@ impl Color {
Color::rgba_f(self.r, self.g, self.b, a)
}
pub fn fade(&self, factor: f32) -> Color {
let mut c = self.clone();
c.r /= factor;
c.g /= factor;
c.b /= factor;
c
}
pub fn hex(raw: &str) -> Color {
// Skip the leading '#'
let r = usize::from_str_radix(&raw[1..3], 16).unwrap();

View File

@ -106,6 +106,7 @@ pub struct ColorScheme {
pub ped_preparing_bike_body: Color,
pub ped_crowd: Color,
pub bike_frame: Color,
pub parked_car: Color,
// Layers
pub good_to_bad_red: ColorScale,
@ -209,6 +210,7 @@ impl ColorScheme {
ped_preparing_bike_body: Color::rgb(255, 0, 144),
ped_crowd: Color::rgb_f(0.2, 0.7, 0.7),
bike_frame: Color::hex("#AAA9AD"),
parked_car: Color::hex("#938E85"),
// Layers
good_to_bad_red: ColorScale(vec![hex("#F19A93"), hex("#A32015")]),

View File

@ -196,7 +196,7 @@ fn zoomed_color_car(input: &DrawCarInput, cs: &ColorScheme) -> Color {
} else {
match input.status {
CarStatus::Moving => cs.rotating_color_agents(input.id.0),
CarStatus::Parked => cs.rotating_color_agents(input.id.0).fade(1.5),
CarStatus::Parked => cs.parked_car,
}
}
}