update to bevy 0.14

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2024-07-05 03:19:02 +02:00
parent 5e0c09eaee
commit 81779bd76e
21 changed files with 850 additions and 400 deletions

View File

@@ -16,7 +16,7 @@ impl<A: Action> Plugin for ActionPlugin<A> {
fn build(&self, app: &mut App) {
app.init_resource::<ActionList>()
.init_resource::<ActionState<A>>();
app.world.resource_mut::<ActionList>().0.push(A::info());
app.world_mut().resource_mut::<ActionList>().0.push(A::info());
}
}

View File

@@ -28,7 +28,7 @@ impl Plugin for XrCameraPlugin {
PostUpdate,
update_frusta::<XrProjection>
.after(TransformSystem::TransformPropagate)
.before(VisibilitySystems::UpdatePerspectiveFrusta),
.before(VisibilitySystems::UpdateFrusta),
);
app.add_plugins((
ExtractComponentPlugin::<XrProjection>::default(),
@@ -58,10 +58,6 @@ impl Default for XrProjection {
pub struct XrCamera(pub u32);
impl CameraProjection for XrProjection {
fn get_projection_matrix(&self) -> Mat4 {
self.projection_matrix
}
fn update(&mut self, _width: f32, _height: f32) {}
fn far(&self) -> f32 {
@@ -92,6 +88,10 @@ impl CameraProjection for XrProjection {
view_space_corners
}
fn get_clip_from_view(&self) -> Mat4 {
self.projection_matrix
}
}
#[derive(Bundle)]

View File

@@ -128,7 +128,7 @@ impl Plugin for XrSessionPlugin {
.in_set(XrHandleEvents),
);
app.world
app.world_mut()
.resource_mut::<MainScheduleOrder>()
.labels
.insert(0, XrFirst.intern());
@@ -139,7 +139,7 @@ impl Plugin for XrSessionPlugin {
}
fn finish(&self, app: &mut App) {
if app.get_sub_app(RenderApp).is_err() {
if app.get_sub_app(RenderApp).is_none() {
return;
}