diff --git a/README.md b/README.md index d320d4ac..6abb6917 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,7 @@ Pair this with a crate like [`egui_dock`](https://docs.rs/egui_dock/latest/egui_ | bevy | bevy-inspector-egui | | ---- | ------------------- | +| 0.15 | 0.28 | | 0.14 | 0.27 | | 0.14 | 0.26 | | 0.14 | 0.25 | diff --git a/crates/bevy-inspector-egui-derive/Cargo.toml b/crates/bevy-inspector-egui-derive/Cargo.toml index de86b251..ec3b6dd0 100644 --- a/crates/bevy-inspector-egui-derive/Cargo.toml +++ b/crates/bevy-inspector-egui-derive/Cargo.toml @@ -17,7 +17,7 @@ quote = "1.0" proc-macro2 = "1.0" [dev-dependencies] -bevy_ecs = { version = "0.14.0", default-features = false } -bevy_math = { version = "0.14.0", default-features = false } -bevy_reflect = { version = "0.14.0", default-features = false } +bevy_ecs = { version = "0.15.0-rc.3", default-features = false } +bevy_math = { version = "0.15.0-rc.3", default-features = false } +bevy_reflect = { version = "0.15.0-rc.3", default-features = false } bevy-inspector-egui = { path = "../bevy-inspector-egui" } diff --git a/crates/bevy-inspector-egui/Cargo.toml b/crates/bevy-inspector-egui/Cargo.toml index f33a4bad..ac143806 100644 --- a/crates/bevy-inspector-egui/Cargo.toml +++ b/crates/bevy-inspector-egui/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy-inspector-egui" -version = "0.27.0" +version = "0.28.0" edition = "2021" repository = "https://github.com/jakobhellermann/bevy-inspector-egui/" readme = "README.md" @@ -16,7 +16,13 @@ categories = [ ] [features] -default = ["bevy_pbr", "bevy_render", "egui_clipboard", "egui_open_url"] +default = [ + "bevy_pbr", + "bevy_image", + "bevy_render", + "egui_clipboard", + "egui_open_url", +] bevy_render = ["dep:bevy_render", "dep:bevy_core_pipeline", "bevy_egui/render"] egui_clipboard = ["bevy_egui/manage_clipboard"] egui_open_url = ["bevy_egui/open_url"] @@ -29,26 +35,27 @@ features = ["winit/x11"] winit = { version = "0.30.0", default-features = false } bevy-inspector-egui-derive = { version = "0.27.0", path = "../bevy-inspector-egui-derive" } -bevy_app = { version = "0.14.0" } -bevy_asset = { version = "0.14.0" } -bevy_color = { version = "0.14.0" } -bevy_core = { version = "0.14.0" } -bevy_ecs = { version = "0.14.0" } -bevy_hierarchy = { version = "0.14.0" } -bevy_log = { version = "0.14.0" } -bevy_math = { version = "0.14.0" } -bevy_reflect = { version = "0.14.0" } -bevy_state = { version = "0.14.0" } -bevy_time = { version = "0.14.0" } -bevy_utils = { version = "0.14.0" } -bevy_window = { version = "0.14.0" } - -bevy_render = { version = "0.14", optional = true } -bevy_core_pipeline = { version = "0.14", optional = true } -bevy_pbr = { version = "0.14", optional = true } +bevy_app = { version = "0.15.0" } +bevy_asset = { version = "0.15.0" } +bevy_color = { version = "0.15.0" } +bevy_core = { version = "0.15.0" } +bevy_ecs = { version = "0.15.0" } +bevy_hierarchy = { version = "0.15.0" } +bevy_log = { version = "0.15.0" } +bevy_math = { version = "0.15.0" } +bevy_reflect = { version = "0.15.0" } +bevy_state = { version = "0.15.0" } +bevy_time = { version = "0.15.0" } +bevy_utils = { version = "0.15.0" } +bevy_window = { version = "0.15.0" } + +bevy_render = { version = "0.15.0", optional = true } +bevy_core_pipeline = { version = "0.15.0", optional = true } +bevy_pbr = { version = "0.15.0", optional = true } +bevy_image = { version = "0.15.0", optional = true } egui = "0.29" -bevy_egui = { version = "0.30", default-features = false } +bevy_egui = { version = "0.31", default-features = false } bytemuck = "1.16.0" image = { version = "0.25", default-features = false } @@ -58,9 +65,10 @@ smallvec = "1.10" fuzzy-matcher = "0.3.7" [dev-dependencies] -bevy = { version = "0.14.0", default-features = false, features = [ +bevy = { version = "0.15.0", default-features = false, features = [ "x11", "bevy_winit", + "bevy_window", "bevy_pbr", "bevy_sprite", "bevy_core_pipeline", @@ -122,4 +130,3 @@ path = "examples/integrations/side_panel.rs" [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(egui_dock_gizmo)'] } - diff --git a/crates/bevy-inspector-egui/examples/basic/inspector_options.rs b/crates/bevy-inspector-egui/examples/basic/inspector_options.rs index 602268fa..57904d66 100644 --- a/crates/bevy-inspector-egui/examples/basic/inspector_options.rs +++ b/crates/bevy-inspector-egui/examples/basic/inspector_options.rs @@ -79,7 +79,7 @@ fn main() { } fn setup(mut commands: Commands, mut ui_data: ResMut) { - let entity = commands.spawn(PbrBundle::default()).id(); + let entity = commands.spawn(Mesh3d::default()).id(); ui_data.entity = Some(entity); } diff --git a/crates/bevy-inspector-egui/examples/basic/resource_inspector_manual.rs b/crates/bevy-inspector-egui/examples/basic/resource_inspector_manual.rs index d882aa5b..b9b2716d 100644 --- a/crates/bevy-inspector-egui/examples/basic/resource_inspector_manual.rs +++ b/crates/bevy-inspector-egui/examples/basic/resource_inspector_manual.rs @@ -62,31 +62,29 @@ fn setup( mut materials: ResMut>, ) { // plane - 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))), + Transform::from_xyz(0.0, 0.5, 0.0), + )); // 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 { intensity: 2_000_000.0, 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_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y), - ..default() - }); + commands.spawn(( + Camera3d::default(), + Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y), + )); } diff --git a/crates/bevy-inspector-egui/examples/integrations/egui_dock.rs b/crates/bevy-inspector-egui/examples/integrations/egui_dock.rs index e0c2a687..49e2670a 100644 --- a/crates/bevy-inspector-egui/examples/integrations/egui_dock.rs +++ b/crates/bevy-inspector-egui/examples/integrations/egui_dock.rs @@ -12,7 +12,7 @@ use std::any::TypeId; use bevy_egui::EguiSet; use bevy_reflect::TypeRegistry; use bevy_render::camera::{CameraProjection, Viewport}; -use bevy_window::PrimaryWindow; +use bevy_window::{PrimaryWindow, Window}; use egui_dock::{DockArea, DockState, NodeIndex, Style}; #[cfg(egui_dock_gizmo)] @@ -411,71 +411,67 @@ fn setup( // left - red let mut transform = Transform::from_xyz(-box_offset, box_offset, 0.0); transform.rotate(Quat::from_rotation_z(std::f32::consts::FRAC_PI_2)); - commands.spawn(PbrBundle { - mesh: meshes.add(Cuboid::new(box_size, box_thickness, box_size)), - transform, - material: materials.add(StandardMaterial { + + commands.spawn(( + Mesh3d(meshes.add(Cuboid::new(box_size, box_thickness, box_size))), + MeshMaterial3d(materials.add(StandardMaterial { base_color: Color::srgb(0.63, 0.065, 0.05), ..Default::default() - }), - ..Default::default() - }); + })), + transform, + )); // right - green let mut transform = Transform::from_xyz(box_offset, box_offset, 0.0); transform.rotate(Quat::from_rotation_z(std::f32::consts::FRAC_PI_2)); - commands.spawn(PbrBundle { - mesh: meshes.add(Cuboid::new(box_size, box_thickness, box_size)), + commands.spawn(( + Mesh3d(meshes.add(Cuboid::new(box_size, box_thickness, box_size))), transform, - material: materials.add(StandardMaterial { + MeshMaterial3d(materials.add(StandardMaterial { base_color: Color::srgb(0.14, 0.45, 0.091), ..Default::default() - }), - ..Default::default() - }); + })), + )); // bottom - white - commands.spawn(PbrBundle { - mesh: meshes.add(Cuboid::new( + commands.spawn(( + Mesh3d(meshes.add(Cuboid::new( box_size + 2.0 * box_thickness, box_thickness, box_size, - )), - material: materials.add(StandardMaterial { + ))), + MeshMaterial3d(materials.add(StandardMaterial { base_color: Color::srgb(0.725, 0.71, 0.68), ..Default::default() - }), - ..Default::default() - }); + })), + )); // top - white let transform = Transform::from_xyz(0.0, 2.0 * box_offset, 0.0); - commands.spawn(PbrBundle { - mesh: meshes.add(Cuboid::new( + commands.spawn(( + Mesh3d(meshes.add(Cuboid::new( box_size + 2.0 * box_thickness, box_thickness, box_size, - )), + ))), transform, - material: materials.add(StandardMaterial { + MeshMaterial3d(materials.add(StandardMaterial { base_color: Color::srgb(0.725, 0.71, 0.68), ..Default::default() - }), - ..Default::default() - }); + })), + )); // back - white let mut transform = Transform::from_xyz(0.0, box_offset, -box_offset); transform.rotate(Quat::from_rotation_x(std::f32::consts::FRAC_PI_2)); - commands.spawn(PbrBundle { - mesh: meshes.add(Cuboid::new( + commands.spawn(( + Mesh3d(meshes.add(Cuboid::new( box_size + 2.0 * box_thickness, box_thickness, box_size + 2.0 * box_thickness, - )), + ))), transform, - material: materials.add(StandardMaterial { + MeshMaterial3d(materials.add(StandardMaterial { base_color: Color::srgb(0.725, 0.71, 0.68), ..Default::default() - }), - ..Default::default() - }); + })), + )); // ambient light commands.insert_resource(AmbientLight { @@ -484,48 +480,43 @@ fn setup( }); // top light commands - .spawn(PbrBundle { - mesh: meshes.add(Plane3d::default().mesh().size(0.4, 0.4)), - transform: Transform::from_matrix(Mat4::from_scale_rotation_translation( + .spawn(( + Mesh3d(meshes.add(Plane3d::default().mesh().size(0.4, 0.4))), + Transform::from_matrix(Mat4::from_scale_rotation_translation( Vec3::ONE, Quat::from_rotation_x(std::f32::consts::PI), Vec3::new(0.0, box_size + 0.5 * box_thickness, 0.0), )), - material: materials.add(StandardMaterial { + MeshMaterial3d(materials.add(StandardMaterial { base_color: Color::WHITE, emissive: LinearRgba::WHITE * 100.0, ..Default::default() - }), - ..Default::default() - }) + })), + )) .with_children(|builder| { - builder.spawn(PointLightBundle { - point_light: PointLight { + builder.spawn(( + PointLight { color: Color::WHITE, intensity: 25000.0, ..Default::default() }, - transform: Transform::from_translation((box_thickness + 0.05) * Vec3::Y), - ..Default::default() - }); + Transform::from_translation((box_thickness + 0.05) * Vec3::Y), + )); }); // directional light - commands.spawn(DirectionalLightBundle { - directional_light: DirectionalLight { + commands.spawn(( + DirectionalLight { illuminance: 2000.0, ..default() }, - transform: Transform::from_rotation(Quat::from_rotation_x(-std::f32::consts::PI / 2.0)), - ..Default::default() - }); + Transform::from_rotation(Quat::from_rotation_x(-std::f32::consts::PI / 2.0)), + )); // camera commands.spawn(( - Camera3dBundle { - transform: Transform::from_xyz(0.0, box_offset, 4.0) - .looking_at(Vec3::new(0.0, box_offset, 0.0), Vec3::Y), - ..Default::default() - }, + Camera3d::default(), + Transform::from_xyz(0.0, box_offset, 4.0) + .looking_at(Vec3::new(0.0, box_offset, 0.0), Vec3::Y), MainCamera, // PickRaycastSource, )); diff --git a/crates/bevy-inspector-egui/examples/integrations/side_panel.rs b/crates/bevy-inspector-egui/examples/integrations/side_panel.rs index cab22c58..be48a32f 100644 --- a/crates/bevy-inspector-egui/examples/integrations/side_panel.rs +++ b/crates/bevy-inspector-egui/examples/integrations/side_panel.rs @@ -68,7 +68,7 @@ struct Rotator; fn rotator_system(time: Res