Skip to content

Commit

Permalink
Use Bevy Egui PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
n3vu0r committed Nov 9, 2024
1 parent 10b693c commit aeefc14
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
18 changes: 12 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,26 @@ features = ["serialize"]
rustdoc-args = ["--cfg", "docsrs"]

[features]
bevy_egui = ["dep:bevy_egui"]
serialize = ["bevy/serialize", "trackball/serde"]
c11-orbit = ["trackball/cc"]
serialize = ["bevy/serialize", "trackball/serde", "bevy_egui?/serde"]
bevy_egui = ["dep:bevy_egui"]

[dependencies]
bevy = { version = "0.15.0-rc.2", default-features = false, features = ["bevy_render", "custom_cursor", "wayland"] }
bevy_egui = { version = "0.30.0", default-features = false, features = ["render"], optional = true }
trackball = { version = "0.15.0", features = ["glam"] }
bevy_egui = { git = "https://github.com/mvlabat/bevy_egui", rev = "refs/pull/309/head", default-features = false, features = ["render"], optional = true }

[dev-dependencies.bevy]
version = "0.15.0-rc.2"
[dependencies.bevy]
version = "0.15.0-rc.3"
default-features = false
features = [
"bevy_render",
"bevy_winit",
]

[dev-dependencies.bevy]
version = "0.15.0-rc.3"
default-features = false
features = [
"custom_cursor",
"bevy_core_pipeline",
"bevy_pbr",
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Run interactive [examples] in your browser using [WebAssembly] and [WebGL].
[WebAssembly]: https://en.wikipedia.org/wiki/WebAssembly
[WebGL]: https://en.wikipedia.org/wiki/WebGL

**NOTE**: Not all features are enabled by default, see [Optional Features](#optional-features).
**NOTE**: Not all features are enabled by default, see [Optional Features](#optional-features). On
Linux the `bevy/wayland` or `bevy/x11` feature gate must be enabled for a successful build.

## Camera Modes

Expand Down Expand Up @@ -102,10 +103,9 @@ away from the screen’s center (e.g., the rotation accelerates towards the edge

Following features are disabled unless their corresponding feature gate is enabled:

* `bevy_egui` for automatic viewport stealing whenever `egui` wants focus. On Linux you have
to enable either the `bevy/wayland` or the `bevy/x11` feature gate as well.
* `serialize` for `serde` support of various structures of this crate and its dependencies.
* `c11-orbit` for testing the behaviorally identical C implementation of the exponential map.
* `serialize` for `serde` support of various structures of this crate and its dependencies.
* `bevy_egui` for automatic viewport stealing whenever `egui` wants focus.

See the [release history](RELEASES.md) and [roadmap](#Roadmap) to keep track of the development.

Expand Down
4 changes: 4 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Version 0.9.0 (2024-11-??)

* Update Bevy to `0.15.0`.

# Version 0.8.0 (2024-10-27)

* Update `bevy_egui`.
Expand Down
6 changes: 3 additions & 3 deletions examples/egui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ fn setup(
// The main pass camera with controller.
let controller = commands
.spawn((
Camera3dBundle::default(),
TrackballController::default(),
TrackballCamera::look_at(target, eye, up),
Camera3d::default(),
))
.id();

Expand All @@ -172,8 +172,8 @@ fn setup(

fn render_to_image_example_system(
cube_preview_image: Res<CubePreviewImage>,
preview_cube_query: Query<&Handle<StandardMaterial>, With<PreviewPassCube>>,
main_cube_query: Query<&Handle<StandardMaterial>, With<MainPassCube>>,
preview_cube_query: Query<&MeshMaterial3d<StandardMaterial>, With<PreviewPassCube>>,
main_cube_query: Query<&MeshMaterial3d<StandardMaterial>, With<MainPassCube>>,
mut materials: ResMut<Assets<StandardMaterial>>,
mut contexts: EguiContexts,
) {
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//! [WebGL]: https://en.wikipedia.org/wiki/WebGL
//!
//! **NOTE**: Not all features are enabled by default, see [Optional Features](#optional-features).
//! On Linux the `bevy/wayland` or `bevy/x11` feature gate must be enabled for a successful build.
//!
//! # Camera Modes
//!
Expand Down

0 comments on commit aeefc14

Please sign in to comment.