From 6f71aae3c651a08c7a3f7ef82b5614b97e3186b8 Mon Sep 17 00:00:00 2001 From: ThomasAlban Date: Tue, 20 Feb 2024 14:44:32 +0000 Subject: [PATCH 1/7] Update bevy and bevy egui --- .DS_Store | Bin 0 -> 8196 bytes Cargo.toml | 4 ++-- demo/.DS_Store | Bin 0 -> 6148 bytes demo/Cargo.toml | 14 ++++---------- demo/src/camera.rs | 2 +- demo/src/main.rs | 24 ++++++++---------------- rust-toolchain | 4 ++-- src/.DS_Store | Bin 0 -> 6148 bytes src/subgizmo/arcball.rs | 1 + 9 files changed, 18 insertions(+), 31 deletions(-) create mode 100644 .DS_Store create mode 100644 demo/.DS_Store create mode 100644 src/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c3ba235d79052d1c1cc08ca7559729ee360019f3 GIT binary patch literal 8196 zcmeHM!D)_6M$2o1d_1XnYKJPI3aA3AfGVI0{3{Az&*su;+4sFwTU9_6_%9XU z^}(VtW&sP2Zs|bdjsU30O2n&kwp+FyM!V$yxaP-^Ymjx_5`fxJg z@L>Y82`3ce*fG9!?qo8L+NuJoKwSZgu9P0qh_-1e&+o~X_n)L~ocDVDoxG2}j_tfY zzk71}EVd7SYoBaY?*@{uKM_h-X1ugT`_z~0M9Fd8L*~$ZckM^WVQ!ppUS-nmCG!bu zR!T$Kq%q}jCdDf^&tQ`|9ISsnd^*#iv{&p+_L%n@hKBw_%4tA*lGm)fye@5$_w2^a z+1$%mIqN37}-(x&Ix^!Ya9s9+cdXM>Xqa56MqS1_IpwJ9l}o!gGdW=YYBM-i{!ua;$(L3OKZhj zw?=%Xz@T&)v)%yX2zNn#_soZdH|O(q$vu60JH6+hyJ!sg47B-(Jj}=J5$DlXc&oLj zj9I|KBX@DX?*A-=7FFN^DvRxAHxZp#k}t{pWk1+thlqG`yBHIVh^RsnWEu2`EcdFm%vhA1W8Bbsc{!fW+h)}h z=r=CO-nZ$T)_5+cfB%KPY3q8nY-jMRj_zI_4xgTnzs6|V#kV%As}4^C?BSZ`C4=!1 z(M|I?_rd+{>%QjRXg{)cwPn6j1a)x+oB?OR8Th9R;LaAQb`-sL2AlzBV8ei%4*^Xu z8YabjbfC*60C0%qEEr2IAwIz{8YV?(Agr!Hb!96tSlzK6%q|)xMRg~(;)5;od-1|K zJK~3IP8=1zcLtn+l7WFvM{@t4;FIYs@=F(=IRnnXA7g-r^|YSgrR;9)yq?^(0qqP; rMC_6bAQ%@v0hq`+vX_;r4>E>bG)#&TMb@)B(0>FnA>KIyKfu5n<2Fat literal 0 HcmV?d00001 diff --git a/demo/Cargo.toml b/demo/Cargo.toml index 5f96a92..1462778 100644 --- a/demo/Cargo.toml +++ b/demo/Cargo.toml @@ -7,20 +7,14 @@ edition = "2021" license = "MIT" [dependencies] -bevy_egui_next = "0.26" -egui = "0.26" +bevy = "0.13" +bevy_egui = "0.25.0" +egui = "0.26.2" egui-gizmo = { path = ".." } -[dependencies.bevy] -version = "0.12.1" - [dependencies.bevy_math] version = "0.12.1" features = ["mint"] -[dependencies.bevy_infinite_grid] -git = "https://github.com/pcwalton/bevy_infinite_grid.git" -rev = "c752a23063b2b05163e307889eb276d6574115ab" - [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/demo/src/camera.rs b/demo/src/camera.rs index 2bac8f0..36b8604 100644 --- a/demo/src/camera.rs +++ b/demo/src/camera.rs @@ -39,7 +39,7 @@ pub fn update_camera( window_q: Query<&Window>, mut ev_motion: EventReader, mut ev_scroll: EventReader, - input_mouse: Res>, + input_mouse: Res>, mut query: Query<(&mut PanOrbitCamera, &mut Transform, &Projection)>, ) { let window = window_q.single(); diff --git a/demo/src/main.rs b/demo/src/main.rs index 1cc7e11..0f3abb7 100644 --- a/demo/src/main.rs +++ b/demo/src/main.rs @@ -1,8 +1,8 @@ use bevy::prelude::*; +use bevy::render::render_asset::RenderAssetUsages; use bevy::render::texture::{CompressedImageFormats, ImageFormat, ImageSampler, ImageType}; use bevy::window::PresentMode; -use bevy_egui_next::{egui, EguiContexts, EguiPlugin}; -use bevy_infinite_grid::{InfiniteGridBundle, InfiniteGridPlugin, InfiniteGridSettings}; +use bevy_egui::{egui, EguiContexts, EguiPlugin}; use egui::color_picker::Alpha; use egui::{pos2, Align2, Color32, FontId, LayerId, Ui, Widget}; @@ -23,14 +23,12 @@ fn main() { primary_window: Some(Window { title: "egui-gizmo demo".into(), present_mode: PresentMode::AutoNoVsync, - fit_canvas_to_parent: true, ..default() }), ..default() })) .insert_resource(ClearColor(Color::BLACK)) .add_plugins(EguiPlugin) - .add_plugins(InfiniteGridPlugin) .add_systems(Startup, setup) .add_systems(Startup, setup_camera) .add_systems(Update, update) @@ -77,6 +75,7 @@ fn setup( CompressedImageFormats::all(), true, ImageSampler::Default, + RenderAssetUsages::default(), ) .unwrap(), ); @@ -85,11 +84,12 @@ fn setup( color: Color::WHITE, brightness: 0.2, }); - - let cube_handle = meshes.add(Mesh::from(shape::Cube { size: 2.0 })); + let cube_handle = meshes.add(Cuboid { + half_size: Vec3::ONE, + }); let cube_material_handle = materials.add(StandardMaterial { base_color_texture: Some(texture_handle.clone()), - unlit: false, + unlit: true, ..default() }); @@ -102,14 +102,6 @@ fn setup( ..default() }, )); - - commands.spawn(InfiniteGridBundle { - settings: InfiniteGridSettings { - shadow_color: None, - ..default() - }, - ..default() - }); } fn update( @@ -117,7 +109,7 @@ fn update( camera_q: Query<(&Camera, &Transform), Without>, mut target_q: Query<&mut Transform, With>, mut gizmo_options: ResMut, - keys: Res>, + keys: Res>, ) { let (projection_matrix, view_matrix) = { let (camera, transform) = camera_q.single(); diff --git a/rust-toolchain b/rust-toolchain index 13a87da..4df24c9 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,4 +1,4 @@ [toolchain] -channel = "1.74.0" +channel = "1.76.0" components = ["rustfmt", "clippy"] -targets = ["wasm32-unknown-unknown"] \ No newline at end of file +targets = ["wasm32-unknown-unknown"] diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ab919d5c084512aec112024c73e9e6d1c438754a GIT binary patch literal 6148 zcmeHKy-EZz5T4O17HqB(8zGGkux}8LwX@q7koDjcZrKC5#ww5G8(8@=7CwXD{P?q& z!a_u31~T6yGm~UL*d#+lyxOl@q9qYEXo4(8MP#_@I`H5Hkadn*x~Gw*?WXN36aB>@ z*?U8Gw5NeK^lAUs)3~z@m(yCzICb5yod)qeUmm}lJwBb+_I5vihXsPTa23tDDlgDMpVrc2aUVN~x{8qfMu8#SWh7)JQ(7`}3FlXS~ih_$a?yzkHtDwF&JCO+?~~7!cUAM*uo Date: Tue, 20 Feb 2024 14:47:57 +0000 Subject: [PATCH 2/7] ds store --- .gitignore | 3 ++- demo/.gitignore | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6a59f55..aea98f6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /target Cargo.lock -/.idea \ No newline at end of file +/.idea +.DS_Store diff --git a/demo/.gitignore b/demo/.gitignore index 6a59f55..aea98f6 100644 --- a/demo/.gitignore +++ b/demo/.gitignore @@ -1,3 +1,4 @@ /target Cargo.lock -/.idea \ No newline at end of file +/.idea +.DS_Store From 279e14e4aab1ace2344d69732f0f42cf587a26bf Mon Sep 17 00:00:00 2001 From: Thomas Alban <98399119+ThomasAlban@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:48:20 +0000 Subject: [PATCH 3/7] Delete .DS_Store --- .DS_Store | Bin 8196 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index c3ba235d79052d1c1cc08ca7559729ee360019f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHM!D)_6M$2o1d_1XnYKJPI3aA3AfGVI0{3{Az&*su;+4sFwTU9_6_%9XU z^}(VtW&sP2Zs|bdjsU30O2n&kwp+FyM!V$yxaP-^Ymjx_5`fxJg z@L>Y82`3ce*fG9!?qo8L+NuJoKwSZgu9P0qh_-1e&+o~X_n)L~ocDVDoxG2}j_tfY zzk71}EVd7SYoBaY?*@{uKM_h-X1ugT`_z~0M9Fd8L*~$ZckM^WVQ!ppUS-nmCG!bu zR!T$Kq%q}jCdDf^&tQ`|9ISsnd^*#iv{&p+_L%n@hKBw_%4tA*lGm)fye@5$_w2^a z+1$%mIqN37}-(x&Ix^!Ya9s9+cdXM>Xqa56MqS1_IpwJ9l}o!gGdW=YYBM-i{!ua;$(L3OKZhj zw?=%Xz@T&)v)%yX2zNn#_soZdH|O(q$vu60JH6+hyJ!sg47B-(Jj}=J5$DlXc&oLj zj9I|KBX@DX?*A-=7FFN^Dv Date: Tue, 20 Feb 2024 14:48:31 +0000 Subject: [PATCH 4/7] Delete src/.DS_Store --- src/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/.DS_Store diff --git a/src/.DS_Store b/src/.DS_Store deleted file mode 100644 index ab919d5c084512aec112024c73e9e6d1c438754a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKy-EZz5T4O17HqB(8zGGkux}8LwX@q7koDjcZrKC5#ww5G8(8@=7CwXD{P?q& z!a_u31~T6yGm~UL*d#+lyxOl@q9qYEXo4(8MP#_@I`H5Hkadn*x~Gw*?WXN36aB>@ z*?U8Gw5NeK^lAUs)3~z@m(yCzICb5yod)qeUmm}lJwBb+_I5vihXsPTa23tDDlgDMpVrc2aUVN~x{8qfMu8#SWh7)JQ(7`}3FlXS~ih_$a?yzkHtDwF&JCO+?~~7!cUAM*uo Date: Tue, 20 Feb 2024 14:48:48 +0000 Subject: [PATCH 5/7] Delete demo/.DS_Store --- demo/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 demo/.DS_Store diff --git a/demo/.DS_Store b/demo/.DS_Store deleted file mode 100644 index 3f28a4cfc97dd2862be6e7e0e7e93e2ecbb830ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}N6?5T3C`76j?hV=g{G!Gm~;WxWf10c|UK=(5G?J#XSc@a!9S@-2J@pTTc3 zV>RxAHxZp#k}t{pWk1+thlqG`yBHIVh^RsnWEu2`EcdFm%vhA1W8Bbsc{!fW+h)}h z=r=CO-nZ$T)_5+cfB%KPY3q8nY-jMRj_zI_4xgTnzs6|V#kV%As}4^C?BSZ`C4=!1 z(M|I?_rd+{>%QjRXg{)cwPn6j1a)x+oB?OR8Th9R;LaAQb`-sL2AlzBV8ei%4*^Xu z8YabjbfC*60C0%qEEr2IAwIz{8YV?(Agr!Hb!96tSlzK6%q|)xMRg~(;)5;od-1|K zJK~3IP8=1zcLtn+l7WFvM{@t4;FIYs@=F(=IRnnXA7g-r^|YSgrR;9)yq?^(0qqP; rMC_6bAQ%@v0hq`+vX_;r4>E>bG)#&TMb@)B(0>FnA>KIyKfu5n<2Fat From 4e5f716a33f63aafa5cd9b669621c297532092df Mon Sep 17 00:00:00 2001 From: ThomasAlban Date: Mon, 4 Mar 2024 09:24:54 +0000 Subject: [PATCH 6/7] add back infinite grid plugin --- demo/.DS_Store | Bin 6148 -> 6148 bytes demo/Cargo.toml | 4 ++++ demo/src/main.rs | 14 ++++++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/demo/.DS_Store b/demo/.DS_Store index 3f28a4cfc97dd2862be6e7e0e7e93e2ecbb830ec..bcf4d3f33c13c44affdc62d3ec30a6888627ec98 100644 GIT binary patch delta 15 WcmZoMXffEZhLOouV)Hu2Ffjls_XO(z delta 15 WcmZoMXffEZhLOo(!{&92VPXI-oCSse diff --git a/demo/Cargo.toml b/demo/Cargo.toml index 1462778..c611347 100644 --- a/demo/Cargo.toml +++ b/demo/Cargo.toml @@ -12,6 +12,10 @@ bevy_egui = "0.25.0" egui = "0.26.2" egui-gizmo = { path = ".." } +[dependencies.bevy_infinite_grid] +git = "https://github.com/XYCaptain/bevy_infinite_grid.git" +rev = "1e5259a52a7dfaca65402c2c57c1d81c2bc443e9" + [dependencies.bevy_math] version = "0.12.1" features = ["mint"] diff --git a/demo/src/main.rs b/demo/src/main.rs index 0f3abb7..ffb4058 100644 --- a/demo/src/main.rs +++ b/demo/src/main.rs @@ -3,6 +3,7 @@ use bevy::render::render_asset::RenderAssetUsages; use bevy::render::texture::{CompressedImageFormats, ImageFormat, ImageSampler, ImageType}; use bevy::window::PresentMode; use bevy_egui::{egui, EguiContexts, EguiPlugin}; +use bevy_infinite_grid::{InfiniteGridBundle, InfiniteGridPlugin, InfiniteGridSettings}; use egui::color_picker::Alpha; use egui::{pos2, Align2, Color32, FontId, LayerId, Ui, Widget}; @@ -29,6 +30,7 @@ fn main() { })) .insert_resource(ClearColor(Color::BLACK)) .add_plugins(EguiPlugin) + .add_plugins(InfiniteGridPlugin) .add_systems(Startup, setup) .add_systems(Startup, setup_camera) .add_systems(Update, update) @@ -82,14 +84,14 @@ fn setup( commands.insert_resource(AmbientLight { color: Color::WHITE, - brightness: 0.2, + brightness: 300., }); let cube_handle = meshes.add(Cuboid { half_size: Vec3::ONE, }); let cube_material_handle = materials.add(StandardMaterial { base_color_texture: Some(texture_handle.clone()), - unlit: true, + // unlit: true, ..default() }); @@ -102,6 +104,14 @@ fn setup( ..default() }, )); + + commands.spawn(InfiniteGridBundle { + settings: InfiniteGridSettings { + shadow_color: None, + ..default() + }, + ..default() + }); } fn update( From 3025f137b266eaf3ea18bb81f7e610d778f54e98 Mon Sep 17 00:00:00 2001 From: ThomasAlban Date: Mon, 4 Mar 2024 09:31:21 +0000 Subject: [PATCH 7/7] add back infinite grid plugin --- demo/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 demo/.DS_Store diff --git a/demo/.DS_Store b/demo/.DS_Store deleted file mode 100644 index bcf4d3f33c13c44affdc62d3ec30a6888627ec98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHL!Ab)$5S_6_76j?hV=jI`!Gj1wEbCq94`^G_LzgX9@A(rCg1_O(zwjIU2H#}H zYTN~HB05u&m&{~lvJW=dDG~AHZZRer5mALE$TH{=QTLj*Y_S+Q$GD~S@@hPtx6P_2 z&~H@9-nZ$3*7#jg|NaYm)7JHD+0Nis9o@e?9zH#ve2vkxi*MJgt~)#pu!kF(mkb{7 zA-Y*U=RSDYecjjG8|z2buC>f}hM+FafHU9>I0OHb0o>Ul)sCX~&VV!E3~U&X^C6%K zM#H3-j}COX1ON`9&VsSj65^&M*t>rj>x}OSzr$`07k>42o1zP1TqcYIRih+z#Ch`M>+ri