diff --git a/Cargo.toml b/Cargo.toml
index 776a923..d993d81 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,14 +15,13 @@ readme = "README.md"
bevy_egui = ["dep:bevy_egui"]
[dependencies]
-bevy = { version = "0.12", default-features = false }
-bevy_easings = "0.12"
-bevy_egui = { version = "0.24", optional = true, default-features = false }
+bevy = { version = "0.13", default-features = false, features = ["bevy_render"] }
+bevy_egui = { version = "0.25", optional = true, default-features = false }
[dev-dependencies]
-bevy = { version = "0.12" }
+bevy = { version = "0.13" }
float-cmp = "0.9.0"
-bevy_egui = { version = "0.24", default-features = false, features = ["default_fonts"] }
+bevy_egui = { version = "0.25", default-features = false, features = ["render", "default_fonts"] }
[[example]]
name = "egui"
diff --git a/examples/advanced.rs b/examples/advanced.rs
index c27bbbb..ba55a3a 100644
--- a/examples/advanced.rs
+++ b/examples/advanced.rs
@@ -26,21 +26,20 @@ fn setup(
) {
// Ground
commands.spawn(PbrBundle {
- mesh: meshes.add(shape::Plane::from_size(5.0).into()),
- material: materials.add(Color::rgb(0.3, 0.5, 0.3).into()),
+ mesh: meshes.add(Plane3d::default().mesh().size(5.0, 5.0)),
+ material: materials.add(Color::rgb(0.3, 0.5, 0.3)),
..default()
});
// Cube
commands.spawn(PbrBundle {
- mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })),
- material: materials.add(Color::rgb(0.8, 0.7, 0.6).into()),
+ mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)),
+ material: materials.add(Color::rgb(0.8, 0.7, 0.6)),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..default()
});
// Light
commands.spawn(PointLightBundle {
point_light: PointLight {
- intensity: 1500.0,
shadows_enabled: true,
..default()
},
@@ -88,10 +87,10 @@ fn setup(
// This is how you can change config at runtime.
// Press 'T' to toggle the camera controls.
fn toggle_camera_controls_system(
- key_input: Res>,
+ key_input: Res>,
mut pan_orbit_query: Query<&mut PanOrbitCamera>,
) {
- if key_input.just_pressed(KeyCode::T) {
+ if key_input.just_pressed(KeyCode::KeyT) {
for mut pan_orbit in pan_orbit_query.iter_mut() {
pan_orbit.enabled = !pan_orbit.enabled;
}
diff --git a/examples/alternate_up_vector.rs b/examples/alternate_up_vector.rs
index e201a57..f37f5e6 100644
--- a/examples/alternate_up_vector.rs
+++ b/examples/alternate_up_vector.rs
@@ -18,21 +18,20 @@ fn setup(
) {
// Ground
commands.spawn(PbrBundle {
- mesh: meshes.add(shape::Plane::from_size(5.0).into()),
- material: materials.add(Color::rgb(0.3, 0.5, 0.3).into()),
+ mesh: meshes.add(Plane3d::default().mesh().size(5.0, 5.0)),
+ material: materials.add(Color::rgb(0.3, 0.5, 0.3)),
..default()
});
// Cube
commands.spawn(PbrBundle {
- mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })),
- material: materials.add(Color::rgb(0.8, 0.7, 0.6).into()),
+ mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)),
+ material: materials.add(Color::rgb(0.8, 0.7, 0.6)),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..default()
});
// Light
commands.spawn(PointLightBundle {
point_light: PointLight {
- intensity: 1500.0,
shadows_enabled: true,
..default()
},
diff --git a/examples/animate.rs b/examples/animate.rs
index f4dba34..983540d 100644
--- a/examples/animate.rs
+++ b/examples/animate.rs
@@ -20,21 +20,20 @@ fn setup(
) {
// Ground
commands.spawn(PbrBundle {
- mesh: meshes.add(shape::Plane::from_size(5.0).into()),
- material: materials.add(Color::rgb(0.3, 0.5, 0.3).into()),
+ mesh: meshes.add(Plane3d::default().mesh().size(5.0, 5.0)),
+ material: materials.add(Color::rgb(0.3, 0.5, 0.3)),
..default()
});
// Cube
commands.spawn(PbrBundle {
- mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })),
- material: materials.add(Color::rgb(0.8, 0.7, 0.6).into()),
+ mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)),
+ material: materials.add(Color::rgb(0.8, 0.7, 0.6)),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..default()
});
// Light
commands.spawn(PointLightBundle {
point_light: PointLight {
- intensity: 1500.0,
shadows_enabled: true,
..default()
},
diff --git a/examples/basic.rs b/examples/basic.rs
index 94b18c1..6ec0aaf 100644
--- a/examples/basic.rs
+++ b/examples/basic.rs
@@ -18,21 +18,20 @@ fn setup(
) {
// Ground
commands.spawn(PbrBundle {
- mesh: meshes.add(shape::Plane::from_size(5.0).into()),
- material: materials.add(Color::rgb(0.3, 0.5, 0.3).into()),
+ mesh: meshes.add(Plane3d::default().mesh().size(5.0, 5.0)),
+ material: materials.add(Color::rgb(0.3, 0.5, 0.3)),
..default()
});
// Cube
commands.spawn(PbrBundle {
- mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })),
- material: materials.add(Color::rgb(0.8, 0.7, 0.6).into()),
+ mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)),
+ material: materials.add(Color::rgb(0.8, 0.7, 0.6)),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..default()
});
// Light
commands.spawn(PointLightBundle {
point_light: PointLight {
- intensity: 1500.0,
shadows_enabled: true,
..default()
},
diff --git a/examples/egui.rs b/examples/egui.rs
index 931dd8e..6ee09b3 100644
--- a/examples/egui.rs
+++ b/examples/egui.rs
@@ -29,21 +29,20 @@ fn setup(
) {
// Ground
commands.spawn(PbrBundle {
- mesh: meshes.add(shape::Plane::from_size(5.0).into()),
- material: materials.add(Color::rgb(0.3, 0.5, 0.3).into()),
+ mesh: meshes.add(Plane3d::default().mesh().size(5.0, 5.0)),
+ material: materials.add(Color::rgb(0.3, 0.5, 0.3)),
..default()
});
// Cube
commands.spawn(PbrBundle {
- mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })),
- material: materials.add(Color::rgb(0.8, 0.7, 0.6).into()),
+ mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)),
+ material: materials.add(Color::rgb(0.8, 0.7, 0.6)),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..default()
});
// Light
commands.spawn(PointLightBundle {
point_light: PointLight {
- intensity: 1500.0,
shadows_enabled: true,
..default()
},
diff --git a/examples/egui_multiple_windows.rs b/examples/egui_multiple_windows.rs
index ef5156b..bf16e2d 100644
--- a/examples/egui_multiple_windows.rs
+++ b/examples/egui_multiple_windows.rs
@@ -32,21 +32,20 @@ fn setup(
) {
// Ground
commands.spawn(PbrBundle {
- mesh: meshes.add(shape::Plane::from_size(5.0).into()),
- material: materials.add(Color::rgb(0.3, 0.5, 0.3).into()),
+ mesh: meshes.add(Plane3d::default().mesh().size(5.0, 5.0)),
+ material: materials.add(Color::rgb(0.3, 0.5, 0.3)),
..default()
});
// Cube
commands.spawn(PbrBundle {
- mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })),
- material: materials.add(Color::rgb(0.8, 0.7, 0.6).into()),
+ mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)),
+ material: materials.add(Color::rgb(0.8, 0.7, 0.6)),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..default()
});
// Light
commands.spawn(PointLightBundle {
point_light: PointLight {
- intensity: 1500.0,
shadows_enabled: true,
..default()
},
diff --git a/examples/follow_target.rs b/examples/follow_target.rs
index 856c93b..2e83d73 100644
--- a/examples/follow_target.rs
+++ b/examples/follow_target.rs
@@ -23,15 +23,15 @@ fn setup(
) {
// Ground
commands.spawn(PbrBundle {
- mesh: meshes.add(shape::Plane::from_size(5.0).into()),
- material: materials.add(Color::rgb(0.3, 0.5, 0.3).into()),
+ mesh: meshes.add(Plane3d::default().mesh().size(5.0, 5.0)),
+ material: materials.add(Color::rgb(0.3, 0.5, 0.3)),
..default()
});
// Cube
commands
.spawn(PbrBundle {
- mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })),
- material: materials.add(Color::rgb(0.8, 0.7, 0.6).into()),
+ mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)),
+ material: materials.add(Color::rgb(0.8, 0.7, 0.6)),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..default()
})
@@ -39,7 +39,6 @@ fn setup(
// Light
commands.spawn(PointLightBundle {
point_light: PointLight {
- intensity: 1500.0,
shadows_enabled: true,
..default()
},
diff --git a/examples/keyboard_controls.rs b/examples/keyboard_controls.rs
index 922862b..bbb016d 100644
--- a/examples/keyboard_controls.rs
+++ b/examples/keyboard_controls.rs
@@ -25,21 +25,20 @@ fn setup(
) {
// Ground
commands.spawn(PbrBundle {
- mesh: meshes.add(shape::Plane::from_size(5.0).into()),
- material: materials.add(Color::rgb(0.3, 0.5, 0.3).into()),
+ mesh: meshes.add(Plane3d::default().mesh().size(5.0, 5.0)),
+ material: materials.add(Color::rgb(0.3, 0.5, 0.3)),
..default()
});
// Cube
commands.spawn(PbrBundle {
- mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })),
- material: materials.add(Color::rgb(0.8, 0.7, 0.6).into()),
+ mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)),
+ material: materials.add(Color::rgb(0.8, 0.7, 0.6)),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..default()
});
// Light
commands.spawn(PointLightBundle {
point_light: PointLight {
- intensity: 1500.0,
shadows_enabled: true,
..default()
},
@@ -58,37 +57,37 @@ fn setup(
fn keyboard_controls(
time: Res