Skip to content

Commit

Permalink
Update all crates to latest versions (#194)
Browse files Browse the repository at this point in the history
Co-authored-by: rewin <[email protected]>
  • Loading branch information
naomijub and rewin123 authored Feb 14, 2024
1 parent 200b412 commit bf1effc
Show file tree
Hide file tree
Showing 32 changed files with 181 additions and 146 deletions.
30 changes: 30 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,41 @@ space_undo = { version = "0.3.1", path = "crates/undo" }
space_persistence = { version = "0.3.1", path = "crates/persistence"}
space_editor_core = { version = "0.3.1", path = "crates/editor_core", features = ["persistence_editor"] }
space_editor_ui = { version = "0.3.1", path = "crates/editor_ui", features = ["persistence_editor"] }

# Crates inner libraries
anyhow = "1.0"
bevy_asset_loader = "0.19"
bevy_common_assets = { version = "0.8", features = ["ron"] }
bevy_debug_grid = "0.4"
bevy_egui_next = "0.26"
bevy-inspector-egui = { version = "0.22", features = [
"bevy_pbr",
"highlight_changes",
] }
bevy_mod_billboard = "0.5.1"
bevy_mod_picking = { git = "https://github.com/dgriffith0/bevy_mod_picking.git", branch = "pick_hidden", default-features = false, features = [
"backend_raycast",
"selection",
] }
bevy_panorbit_camera = "0.9"
bevy-scene-hook = "9"
convert_case = "0.6"
egui_dock = "0.11"
egui_extras = { version = "0.26", features = ["all_loaders"] }
egui_file = "0.15"
egui-gizmo = "0.16"
pretty-type-name = "1"
ron = "0.8"
resvg = "0.37"
serde = "1"

# Community Modules
space_bevy_xpbd_plugin = { version = "0.3.1", path = "modules/bevy_xpbd_plugin"}

[patch.crates-io]
egui-gizmo = { git = "https://github.com/naomijub/egui-gizmo.git" }
bevy-inspector-egui ={ git = "https://github.com/naomijub/bevy-inspector-egui.git" }

[dependencies]
bevy.workspace = true
space_editor_ui.workspace = true
Expand Down
121 changes: 62 additions & 59 deletions assets/scenes/cubes_camera_test.scn.ron
Original file line number Diff line number Diff line change
@@ -1,12 +1,63 @@
(
resources: {},
entities: {
7: (
8589934601: (
components: {
"bevy_transform::components::transform::Transform": (
translation: (
x: -0.23666778,
y: 0.0,
z: 0.9822956,
),
rotation: (
x: 0.0,
y: 0.012409747,
y: 0.0,
z: 0.0,
w: 1.0,
),
scale: (
x: 1.0,
y: 1.0,
z: 1.0,
),
),
"bevy_core::name::Name": (
hash: 14571447366056269603,
name: "Camera3d",
),
"bevy_render::view::visibility::Visibility": Inherited,
"bevy_render::camera::camera::Camera": (
viewport: None,
order: 0,
is_active: false,
hdr: false,
msaa_writeback: true,
),
"bevy_core_pipeline::core_3d::camera_3d::Camera3d": (
clear_color: Default,
depth_load_op: Clear(0.0),
depth_texture_usages: (16),
screen_space_specular_transmission_steps: 1,
screen_space_specular_transmission_quality: Medium,
),
"bevy_render::camera::projection::Projection": Perspective((
fov: 0.7853982,
aspect_ratio: 1.9028741,
near: 0.1,
far: 1000.0,
)),
"space_prefab::component::camera::CameraPlay": (),
"space_prefab::save::ChildrenPrefab": ([
17179869198,
]),
},
),
8589934604: (
components: {
"bevy_transform::components::transform::Transform": (
translation: (
x: -3.9199495,
y: 1.6674547,
z: -5.0,
),
rotation: (
Expand Down Expand Up @@ -61,61 +112,13 @@
)),
},
),
8: (
components: {
"bevy_transform::components::transform::Transform": (
translation: (
x: 0.0,
y: 0.0,
z: 0.0,
),
rotation: (
x: 0.0,
y: 0.0,
z: 0.0,
w: 1.0,
),
scale: (
x: 1.0,
y: 1.0,
z: 1.0,
),
),
"bevy_core::name::Name": (
hash: 14571447366056269603,
name: "Camera3d",
),
"bevy_render::view::visibility::Visibility": Inherited,
"bevy_render::camera::camera::Camera": (
viewport: None,
order: 0,
is_active: false,
hdr: false,
msaa_writeback: true,
),
"bevy_core_pipeline::core_3d::camera_3d::Camera3d": (
clear_color: Default,
depth_load_op: Clear(0.0),
depth_texture_usages: (16),
screen_space_specular_transmission_steps: 1,
screen_space_specular_transmission_quality: Medium,
),
"bevy_render::camera::projection::Projection": Perspective((
fov: 0.7853982,
aspect_ratio: 1.9944445,
near: 0.1,
far: 1000.0,
)),
"space_prefab::component::camera::CameraPlay": (),
},
),
9: (
12884901893: (
components: {
"bevy_transform::components::transform::Transform": (
translation: (
x: -3.9199495,
y: 1.8673916,
z: -5.0,
x: 4.105635,
y: -1.9975517,
z: -5.7572546,
),
rotation: (
x: 0.0,
Expand Down Expand Up @@ -169,13 +172,13 @@
)),
},
),
10: (
12884901899: (
components: {
"bevy_transform::components::transform::Transform": (
translation: (
x: 4.0474353,
y: -2.240034,
z: -5.7572546,
x: 0.0,
y: 0.012409747,
z: -5.0,
),
rotation: (
x: 0.0,
Expand Down Expand Up @@ -229,7 +232,7 @@
)),
},
),
12: (
17179869194: (
components: {
"bevy_transform::components::transform::Transform": (
translation: (
Expand Down
4 changes: 2 additions & 2 deletions crates/editor_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ homepage.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bevy.workspace = true

space_prefab.workspace = true
space_undo.workspace = true
space_persistence.workspace = true
space_shared.workspace = true

bevy.workspace = true

[features]
persistence_editor = []

Expand Down
40 changes: 19 additions & 21 deletions crates/editor_ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,31 @@ persistence_editor = []

[dependencies]
bevy.workspace = true

space_editor_core.workspace = true
space_prefab.workspace = true
space_undo.workspace = true
space_persistence.workspace = true
space_shared.workspace = true
serde.workspace = true

bevy_egui = "0.24"
egui_extras = { version = "0.24", features = ["all_loaders"] }
resvg = "0.37"
egui-gizmo = "0.13"
egui_dock = "0.9"

bevy_debug_grid = "0.4"

bevy_mod_picking = { git = "https://github.com/dgriffith0/bevy_mod_picking.git", branch = "pick_hidden", default-features = false, features = [
"backend_raycast",
"selection",
] }
bevy_asset_loader = "0.19"
bevy_panorbit_camera = "0.9"
bevy_mod_billboard = "0.5.1"
pretty-type-name = "1.0.1"
convert_case = "0.6"

anyhow = "1.0"
bevy_common_assets = { version = "0.8", features = ["ron"] }
serde.workspace = true
pretty-type-name.workspace = true
bevy_egui_next.workspace = true
egui-gizmo.workspace = true
egui_dock.workspace = true
bevy_debug_grid.workspace = true
bevy_mod_picking.workspace = true
bevy_asset_loader.workspace = true
bevy_panorbit_camera.workspace = true
bevy_mod_billboard.workspace = true
convert_case.workspace = true
anyhow.workspace = true
bevy_common_assets.workspace = true
egui_extras.workspace = true
resvg.workspace = true

[patch.crates-io]
egui-gizmo = { git = "https://github.com/naomijub/egui-gizmo.git" }

[lints]
workspace = true
13 changes: 9 additions & 4 deletions crates/editor_ui/src/camera_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use bevy::{
},
window::PrimaryWindow,
};
use bevy_egui::{egui, EguiContexts};
use bevy_egui_next::{egui, EguiContexts};

use space_prefab::component::CameraPlay;
use space_shared::*;
Expand Down Expand Up @@ -77,7 +77,12 @@ fn create_camera_image(width: u32, height: u32) -> Image {
}

impl EditorTab for CameraViewTab {
fn ui(&mut self, ui: &mut bevy_egui::egui::Ui, commands: &mut Commands, world: &mut World) {
fn ui(
&mut self,
ui: &mut bevy_egui_next::egui::Ui,
commands: &mut Commands,
world: &mut World,
) {
if self.real_camera.is_none() {
if world.resource::<GameModeSettings>().is_3d() {
self.real_camera = Some(
Expand Down Expand Up @@ -219,7 +224,7 @@ impl EditorTab for CameraViewTab {
}
}

fn title(&self) -> bevy_egui::egui::WidgetText {
fn title(&self) -> bevy_egui_next::egui::WidgetText {
"Camera view".into()
}
}
Expand Down Expand Up @@ -253,7 +258,7 @@ fn set_camera_viewport(
mut local: Local<LastCamTabRect>,
mut ui_state: ResMut<CameraViewTab>,
primary_window: Query<&mut Window, With<PrimaryWindow>>,
egui_settings: Res<bevy_egui::EguiSettings>,
egui_settings: Res<bevy_egui_next::EguiSettings>,
mut cameras: Query<(&mut Camera, &mut Transform), Without<EditorCameraMarker>>,
mut ctxs: EguiContexts,
) {
Expand Down
4 changes: 2 additions & 2 deletions crates/editor_ui/src/change_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct ChangeChainView;
impl EditorTab for ChangeChainView {
fn ui(
&mut self,
ui: &mut bevy_egui::egui::Ui,
ui: &mut bevy_egui_next::egui::Ui,
_commands: &mut bevy::prelude::Commands,
world: &mut bevy::prelude::World,
) {
Expand All @@ -31,7 +31,7 @@ impl EditorTab for ChangeChainView {
}
}

fn title(&self) -> bevy_egui::egui::WidgetText {
fn title(&self) -> bevy_egui_next::egui::WidgetText {
"Change Chain".into()
}
}
2 changes: 1 addition & 1 deletion crates/editor_ui/src/debug_panels.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::editor_tab::*;
use bevy::prelude::*;
use bevy_egui::egui;
use bevy_egui_next::egui;
use space_shared::ext::bevy_inspector_egui;

#[derive(Resource)]
Expand Down
2 changes: 1 addition & 1 deletion crates/editor_ui/src/editor_tab.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This module contains the implementation of the editor tabs

use bevy::{prelude::*, utils::HashMap};
use bevy_egui::egui::{self, WidgetText};
use bevy_egui_next::egui::{self, WidgetText};
use convert_case::{Case, Casing};

use crate::colors::ERROR_COLOR;
Expand Down
13 changes: 9 additions & 4 deletions crates/editor_ui/src/game_view.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use bevy::{prelude::*, window::PrimaryWindow};
use bevy_egui::egui::{self};
use bevy_egui_next::egui::{self};
use egui_gizmo::GizmoMode;
use space_undo::UndoRedo;

Expand Down Expand Up @@ -39,7 +39,12 @@ impl Default for GameViewTab {
}

impl EditorTab for GameViewTab {
fn ui(&mut self, ui: &mut bevy_egui::egui::Ui, commands: &mut Commands, world: &mut World) {
fn ui(
&mut self,
ui: &mut bevy_egui_next::egui::Ui,
commands: &mut Commands,
world: &mut World,
) {
if ui.input_mut(|i| i.key_released(egui::Key::Z) && i.modifiers.ctrl && !i.modifiers.shift)
{
world.send_event(UndoRedo::Undo);
Expand Down Expand Up @@ -93,7 +98,7 @@ impl EditorTab for GameViewTab {
});
}

fn title(&self) -> bevy_egui::egui::WidgetText {
fn title(&self) -> bevy_egui_next::egui::WidgetText {
"Game view".into()
}
}
Expand Down Expand Up @@ -129,7 +134,7 @@ pub fn set_camera_viewport(
mut local: Local<LastGameTabRect>,
ui_state: Res<GameViewTab>,
primary_window: Query<&mut Window, With<PrimaryWindow>>,
egui_settings: Res<bevy_egui::EguiSettings>,
egui_settings: Res<bevy_egui_next::EguiSettings>,
mut cameras: Query<&mut Camera, With<EditorCameraMarker>>,
) {
let Ok(mut cam) = cameras.get_single_mut() else {
Expand Down
Loading

0 comments on commit bf1effc

Please sign in to comment.