Add basic color to spheres

This commit is contained in:
bijan2005 2020-11-27 12:36:38 -05:00
parent 9d188ed692
commit cb87c1e70c
107 changed files with 77 additions and 28 deletions

View file

@ -47,4 +47,23 @@ impl Color {
let blue = (255.0 * self.blue) as u8;
[red, green, blue]
}
pub fn black() -> Self {
Color {
red: 0.0,
green: 0.0,
blue: 0.0,
_private: ()
}
}
pub fn white() -> Self {
Color {
red: 1.0,
green: 1.0,
blue: 1.0,
_private: ()
}
}
}