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 {
|
if state.is_sun {
|
||||||
let (r, g, b) = nature::star_color_index_to_rgb(0.656);
|
let (r, g, b) = nature::star_color_index_to_rgb(0.656);
|
||||||
actor.insert(materials.add(StandardMaterial {
|
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,
|
unlit: true,
|
||||||
..default()
|
..default()
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -121,7 +121,7 @@ impl AsteroidSurface {
|
||||||
pub fn material() -> ExtendedMaterial<StandardMaterial, AsteroidSurface> {
|
pub fn material() -> ExtendedMaterial<StandardMaterial, AsteroidSurface> {
|
||||||
ExtendedMaterial {
|
ExtendedMaterial {
|
||||||
base: StandardMaterial {
|
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,
|
perceptual_roughness: 1.0,
|
||||||
opaque_render_method: OpaqueRendererMethod::Auto,
|
opaque_render_method: OpaqueRendererMethod::Auto,
|
||||||
..default()
|
..default()
|
||||||
|
|
|
@ -186,7 +186,7 @@ pub fn setup(
|
||||||
MenuElement,
|
MenuElement,
|
||||||
NodeBundle {
|
NodeBundle {
|
||||||
style: style_fullscreen(),
|
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,
|
visibility: Visibility::Hidden,
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
|
|
|
@ -115,7 +115,7 @@ pub fn setup(
|
||||||
//(radius as f64 * nature::SOL_RADIUS).powf(0.02) as f32 *
|
//(radius as f64 * nature::SOL_RADIUS).powf(0.02) as f32 *
|
||||||
|
|
||||||
let star_color_handle = materials.add(StandardMaterial {
|
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,
|
unlit: true,
|
||||||
..default()
|
..default()
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue