This commit is contained in:
yuni 2024-04-01 05:04:11 +02:00
parent fafb73a463
commit 7a3d38fc78

View file

@ -189,8 +189,7 @@ pub fn setup(
commands.spawn(MaterialMeshBundle { commands.spawn(MaterialMeshBundle {
mesh: meshes.add(Mesh::from(Cylinder::new(ring_radius, 1.0))), mesh: meshes.add(Mesh::from(Cylinder::new(ring_radius, 1.0))),
transform: Transform::from_xyz(300000.0, -1000.0, 500000.0) transform: Transform::from_xyz(300000.0, -1000.0, 500000.0)
.with_rotation(Quat::from_rotation_z(1f32.to_radians())) .with_rotation(Quat::from_rotation_z(1f32.to_radians())),
,
//transform: Transform::from_xyz(300000.0, 0.0, 500000.0)), //transform: Transform::from_xyz(300000.0, 0.0, 500000.0)),
material: materials_custom.add(RingMaterial { material: materials_custom.add(RingMaterial {
alpha_mode: AlphaMode::Blend, alpha_mode: AlphaMode::Blend,
@ -199,28 +198,6 @@ pub fn setup(
}), }),
..default() ..default()
}); });
//let max = 20;
//for i in 0..max {
// let f = i as f32;
// let maxf = max as f32;
// let ringmesh = Mesh::from(Cylinder::new(400000.0 + f * 10000.0, 5000.0 - 150.0 * f));
// let clr = 0.4 + (f/maxf).clamp(0.0,0.6);
// commands.spawn(MaterialMeshBundle {
// mesh: meshes.add(ringmesh),
// transform: Transform::from_xyz(300000.0, 0.0, 500000.0),
// material: materials_custom.add(RingMaterial {
// alpha_mode: AlphaMode::Blend,
// }),
// material: materials.add(StandardMaterial {
// base_color: Color::rgba(clr, clr, clr, 0.0001),
// unlit: true,
// cull_mode: None,
// alpha_mode: AlphaMode::Blend,
// ..default()
// }),
// ..default()
// });
//}
// Add Light from the Sun // Add Light from the Sun
commands.spawn(DirectionalLightBundle { commands.spawn(DirectionalLightBundle {