diff --git a/Cargo.toml b/Cargo.toml index 11b2d51..9d01143 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,15 +15,15 @@ readme = "README.md" bevy_egui = ["dep:bevy_egui"] [dependencies] -bevy = { version = "0.14", default-features = false, features = [ +bevy = { version = "0.15.0", default-features = false, features = [ "bevy_render", ] } -bevy_egui = { version = "0.30", optional = true, default-features = false } +bevy_egui = { version = "0.31.0", optional = true, default-features = false } [dev-dependencies] -bevy = { version = "0.14" } +bevy = { version = "0.15.0" } float-cmp = "0.9.0" -bevy_egui = { version = "0.30", default-features = false, features = [ +bevy_egui = { version = "0.31.0", default-features = false, features = [ "render", "default_fonts", ] } diff --git a/README.md b/README.md index b8a6b0e..c9896a1 100644 --- a/README.md +++ b/README.md @@ -49,10 +49,8 @@ Add `PanOrbitCamera` to a camera: ```rust ignore commands.spawn(( - Camera3dBundle { - transform: Transform::from_translation(Vec3::new(0.0, 1.5, 5.0)), - ..default() - }, + Camera3d::default(), + Transform::from_translation(Vec3::new(0.0, 1.5, 5.0)), PanOrbitCamera::default(), )); ``` @@ -71,6 +69,7 @@ all the possible configuration options. | bevy | bevy_panorbit_camera | |------|----------------------| +| 0.15 | 0.21 | | 0.14 | 0.19-0.20 | | 0.13 | 0.14-0.18 | | 0.12 | 0.9-0.13 | diff --git a/examples/advanced.rs b/examples/advanced.rs index 65c9a17..1dbf8a6 100644 --- a/examples/advanced.rs +++ b/examples/advanced.rs @@ -25,32 +25,29 @@ fn setup( mut materials: ResMut>, ) { // Ground - commands.spawn(PbrBundle { - mesh: meshes.add(Plane3d::default().mesh().size(5.0, 5.0)), - material: materials.add(Color::srgb(0.3, 0.5, 0.3)), - ..default() - }); + commands.spawn(( + Mesh3d(meshes.add(Plane3d::default().mesh().size(5.0, 5.0))), + MeshMaterial3d(materials.add(Color::srgb(0.3, 0.5, 0.3))), + )); // Cube - commands.spawn(PbrBundle { - mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)), - material: materials.add(Color::srgb(0.8, 0.7, 0.6)), - 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(Color::srgb(0.8, 0.7, 0.6))), + Transform::from_xyz(0.0, 0.5, 0.0), + )); // Light - commands.spawn(PointLightBundle { - point_light: PointLight { + commands.spawn(( + PointLight { shadows_enabled: true, ..default() }, - transform: Transform::from_xyz(4.0, 8.0, 4.0), - ..default() - }); + Transform::from_xyz(4.0, 8.0, 4.0), + )); // Camera commands.spawn(( // Note we're setting the initial position below with yaw, pitch, and radius, hence // we don't set transform on the camera. - Camera3dBundle::default(), + Camera3d::default(), PanOrbitCamera { // Set focal point (what the camera should look at) focus: Vec3::new(0.0, 1.0, 0.0), diff --git a/examples/animate.rs b/examples/animate.rs index 192d9e1..e14b56c 100644 --- a/examples/animate.rs +++ b/examples/animate.rs @@ -19,33 +19,28 @@ fn setup( mut materials: ResMut>, ) { // Ground - commands.spawn(PbrBundle { - mesh: meshes.add(Plane3d::default().mesh().size(5.0, 5.0)), - material: materials.add(Color::srgb(0.3, 0.5, 0.3)), - ..default() - }); + commands.spawn(( + Mesh3d(meshes.add(Plane3d::default().mesh().size(5.0, 5.0))), + MeshMaterial3d(materials.add(Color::srgb(0.3, 0.5, 0.3))), + )); // Cube - commands.spawn(PbrBundle { - mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)), - material: materials.add(Color::srgb(0.8, 0.7, 0.6)), - 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(Color::srgb(0.8, 0.7, 0.6))), + Transform::from_xyz(0.0, 0.5, 0.0), + )); // Light - commands.spawn(PointLightBundle { - point_light: PointLight { + commands.spawn(( + PointLight { shadows_enabled: true, ..default() }, - transform: Transform::from_xyz(4.0, 8.0, 4.0), - ..default() - }); + Transform::from_xyz(4.0, 8.0, 4.0), + )); // Camera commands.spawn(( - Camera3dBundle { - transform: Transform::from_translation(Vec3::new(0.0, 1.5, 5.0)), - ..default() - }, + Camera3d::default(), + Transform::from_translation(Vec3::new(0.0, 1.5, 5.0)), PanOrbitCamera { // Disable smoothing, since the animation takes care of that orbit_smoothness: 0.0, @@ -60,10 +55,10 @@ fn setup( fn animate(time: Res