update to bevy 0.15 rc
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
@@ -7,9 +7,9 @@ publish = false
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
bevy_mod_openxr.path = "../.."
|
||||
bevy_mod_openxr.workspace = true
|
||||
bevy = { workspace = true, default-features = true }
|
||||
bevy_xr_utils.path = "../../../bevy_xr_utils"
|
||||
bevy_xr_utils.workspace = true
|
||||
|
||||
[build-dependencies]
|
||||
reqwest = { version = "0.12", features = ["blocking"] }
|
||||
|
||||
@@ -21,8 +21,8 @@ fn main() {
|
||||
synchronous_pipeline_compilation: default(),
|
||||
}))
|
||||
.add_plugins(bevy_xr_utils::hand_gizmos::HandGizmosPlugin)
|
||||
.insert_resource(Msaa::Off)
|
||||
.add_systems(Startup, setup)
|
||||
.add_systems(Update, modify_msaa)
|
||||
.insert_resource(AmbientLight {
|
||||
color: Default::default(),
|
||||
brightness: 500.0,
|
||||
@@ -31,6 +31,15 @@ fn main() {
|
||||
.run();
|
||||
}
|
||||
|
||||
#[derive(Component)]
|
||||
struct MsaaModified;
|
||||
|
||||
fn modify_msaa(cams: Query<Entity, (With<Camera>, Without<MsaaModified>)>, mut commands: Commands) {
|
||||
for cam in &cams {
|
||||
commands.entity(cam).insert(Msaa::Off).insert(MsaaModified);
|
||||
}
|
||||
}
|
||||
|
||||
/// set up a simple 3D scene
|
||||
fn setup(
|
||||
mut commands: Commands,
|
||||
@@ -40,19 +49,17 @@ fn setup(
|
||||
let mut white: StandardMaterial = Color::WHITE.into();
|
||||
white.unlit = true;
|
||||
// circular base
|
||||
commands.spawn(PbrBundle {
|
||||
mesh: meshes.add(Circle::new(4.0)),
|
||||
material: materials.add(white),
|
||||
transform: Transform::from_rotation(Quat::from_rotation_x(-std::f32::consts::FRAC_PI_2)),
|
||||
..default()
|
||||
});
|
||||
commands.spawn((
|
||||
Mesh3d(meshes.add(Circle::new(4.0))),
|
||||
MeshMaterial3d(materials.add(white)),
|
||||
Transform::from_rotation(Quat::from_rotation_x(-std::f32::consts::FRAC_PI_2)),
|
||||
));
|
||||
let mut cube_mat: StandardMaterial = Color::srgb_u8(124, 144, 255).into();
|
||||
cube_mat.unlit = true;
|
||||
// cube
|
||||
commands.spawn(PbrBundle {
|
||||
mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)),
|
||||
material: materials.add(cube_mat),
|
||||
transform: Transform::from_xyz(0.0, 0.5, 0.0),
|
||||
..default()
|
||||
});
|
||||
commands.spawn((
|
||||
Mesh3d(meshes.add(Cuboid::new(1.0, 1.0, 1.0))),
|
||||
MeshMaterial3d(materials.add(cube_mat)),
|
||||
Transform::from_xyz(0.0, 0.5, 0.0),
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user