bevy14: fix warnings about deprecated Color::rgb(a) usage
This commit is contained in:
parent
3165cfd754
commit
18760e43c8
|
@ -925,7 +925,7 @@ fn spawn_entities(
|
|||
if state.is_sun {
|
||||
let (r, g, b) = nature::star_color_index_to_rgb(0.656);
|
||||
actor.insert(materials.add(StandardMaterial {
|
||||
base_color: Color::rgb(r, g, b) * 13.0,
|
||||
base_color: Color::srgb(r, g, b) * 13.0,
|
||||
unlit: true,
|
||||
..default()
|
||||
}));
|
||||
|
|
|
@ -121,7 +121,7 @@ impl AsteroidSurface {
|
|||
pub fn material() -> ExtendedMaterial<StandardMaterial, AsteroidSurface> {
|
||||
ExtendedMaterial {
|
||||
base: StandardMaterial {
|
||||
base_color: Color::rgb(0.29, 0.255, 0.208),
|
||||
base_color: Color::srgb(0.29, 0.255, 0.208),
|
||||
perceptual_roughness: 1.0,
|
||||
opaque_render_method: OpaqueRendererMethod::Auto,
|
||||
..default()
|
||||
|
|
|
@ -186,7 +186,7 @@ pub fn setup(
|
|||
MenuElement,
|
||||
NodeBundle {
|
||||
style: style_fullscreen(),
|
||||
background_color: Color::rgba(0.0, 0.0, 0.0, 0.8).into(),
|
||||
background_color: Color::srgba(0.0, 0.0, 0.0, 0.8).into(),
|
||||
visibility: Visibility::Hidden,
|
||||
..default()
|
||||
},
|
||||
|
|
|
@ -115,7 +115,7 @@ pub fn setup(
|
|||
//(radius as f64 * nature::SOL_RADIUS).powf(0.02) as f32 *
|
||||
|
||||
let star_color_handle = materials.add(StandardMaterial {
|
||||
base_color: Color::rgb(scale_color(r), scale_color(g), scale_color(b)),
|
||||
base_color: Color::srgb(scale_color(r), scale_color(g), scale_color(b)),
|
||||
unlit: true,
|
||||
..default()
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue