Skip to content

Commit

Permalink
Merge pull request #44 from ThomasAlban/main
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
urholaukkarinen authored Mar 9, 2024
2 parents ddc521d + cded833 commit d0433a9
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 22 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
Cargo.lock
/.idea
/.idea
.DS_Store
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exclude = ["/docs"]
members = ["demo"]

[dependencies]
egui = "0.26"
egui = "0.26.2"
glam = { version = "0.25.0", features = ["mint"] }
mint = "0.5"

Expand Down
3 changes: 2 additions & 1 deletion demo/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
Cargo.lock
/.idea
/.idea
.DS_Store
16 changes: 7 additions & 9 deletions demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@ 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_infinite_grid]
git = "https://github.com/XYCaptain/bevy_infinite_grid.git"
rev = "1e5259a52a7dfaca65402c2c57c1d81c2bc443e9"

[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
workspace = true
2 changes: 1 addition & 1 deletion demo/src/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub fn update_camera(
window_q: Query<&Window>,
mut ev_motion: EventReader<MouseMotion>,
mut ev_scroll: EventReader<MouseWheel>,
input_mouse: Res<Input<MouseButton>>,
input_mouse: Res<ButtonInput<MouseButton>>,
mut query: Query<(&mut PanOrbitCamera, &mut Transform, &Projection)>,
) {
let window = window_q.single();
Expand Down
16 changes: 9 additions & 7 deletions demo/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +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_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};
Expand All @@ -23,7 +24,6 @@ fn main() {
primary_window: Some(Window {
title: "egui-gizmo demo".into(),
present_mode: PresentMode::AutoNoVsync,
fit_canvas_to_parent: true,
..default()
}),
..default()
Expand Down Expand Up @@ -77,19 +77,21 @@ fn setup(
CompressedImageFormats::all(),
true,
ImageSampler::Default,
RenderAssetUsages::default(),
)
.unwrap(),
);

commands.insert_resource(AmbientLight {
color: Color::WHITE,
brightness: 0.2,
brightness: 300.,
});
let cube_handle = meshes.add(Cuboid {
half_size: Vec3::ONE,
});

let cube_handle = meshes.add(Mesh::from(shape::Cube { size: 2.0 }));
let cube_material_handle = materials.add(StandardMaterial {
base_color_texture: Some(texture_handle.clone()),
unlit: false,
// unlit: true,
..default()
});

Expand Down Expand Up @@ -117,7 +119,7 @@ fn update(
camera_q: Query<(&Camera, &Transform), Without<Target>>,
mut target_q: Query<&mut Transform, With<Target>>,
mut gizmo_options: ResMut<GizmoOptions>,
keys: Res<Input<KeyCode>>,
keys: Res<ButtonInput<KeyCode>>,
) {
let (projection_matrix, view_matrix) = {
let (camera, transform) = camera_q.single();
Expand Down
4 changes: 2 additions & 2 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.74.0"
channel = "1.76.0"
components = ["rustfmt", "clippy"]
targets = ["wasm32-unknown-unknown"]
targets = ["wasm32-unknown-unknown"]
1 change: 1 addition & 0 deletions src/subgizmo/arcball.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl SubGizmo for ArcballSubGizmo {
let mat = self.config.view_projection.inverse();
let a = screen_to_world(self.config.viewport, mat, ray.screen_pos, 0.0);
let b = screen_to_world(self.config.viewport, mat, state.last_pos, 0.0);

let origin = self.config.view_forward();
let a = (a - origin).normalize();
let b = (b - origin).normalize();
Expand Down

0 comments on commit d0433a9

Please sign in to comment.