Skip to content

Commit b40845d

Browse files
authored
Fix a few subcrate import paths in examples (#19002)
# Objective Tripped over the `directional_navigation` one recently while playing around with that example. Examples should import items from `bevy` rather than the sub-crates directly. ## Solution Use paths re-exported by `bevy`. ## Testing ``` cargo run --example log_diagnostics cargo run --example directional_navigation cargo run --example custom_projection ```
1 parent 0fa115f commit b40845d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/camera/custom_projection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl CameraProjection for ObliquePerspectiveProjection {
2727
mat
2828
}
2929

30-
fn get_clip_from_view_for_sub(&self, sub_view: &bevy_render::camera::SubCameraView) -> Mat4 {
30+
fn get_clip_from_view_for_sub(&self, sub_view: &bevy::render::camera::SubCameraView) -> Mat4 {
3131
let mut mat = self.perspective.get_clip_from_view_for_sub(sub_view);
3232
mat.col_mut(2)[0] = self.horizontal_obliqueness;
3333
mat.col_mut(2)[1] = self.vertical_obliqueness;

examples/diagnostics/log_diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn main() {
2121
bevy::diagnostic::SystemInformationDiagnosticsPlugin,
2222
// Forwards various diagnostics from the render app to the main app.
2323
// These are pretty verbose but can be useful to pinpoint performance issues.
24-
bevy_render::diagnostic::RenderDiagnosticsPlugin,
24+
bevy::render::diagnostic::RenderDiagnosticsPlugin,
2525
))
2626
// No rendering diagnostics are emitted unless something is drawn to the screen,
2727
// so we spawn a small scene.

examples/ui/directional_navigation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ fn interact_with_focused_button(
388388
// This field isn't used, so we're just setting it to a placeholder value
389389
pointer_location: Location {
390390
target: NormalizedRenderTarget::Image(
391-
bevy_render::camera::ImageRenderTarget {
391+
bevy::render::camera::ImageRenderTarget {
392392
handle: Handle::default(),
393393
scale_factor: FloatOrd(1.0),
394394
},

0 commit comments

Comments
 (0)