fix ci(hopefully) and fix suboptimal behavior in bevy_xr_utils
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
15
.github/workflows/ci.yaml
vendored
15
.github/workflows/ci.yaml
vendored
@@ -24,11 +24,7 @@ jobs:
|
|||||||
|
|
||||||
- run: rustup toolchain install stable --profile minimal --no-self-update
|
- run: rustup toolchain install stable --profile minimal --no-self-update
|
||||||
|
|
||||||
- uses: ./
|
- run: cargo check --all --all-targets
|
||||||
with:
|
|
||||||
workspaces: .
|
|
||||||
|
|
||||||
- run: cargo check
|
|
||||||
working-directory: .
|
working-directory: .
|
||||||
|
|
||||||
check_wasm:
|
check_wasm:
|
||||||
@@ -43,9 +39,8 @@ jobs:
|
|||||||
|
|
||||||
- run: rustup toolchain install stable --profile minimal --target wasm32-unknown-unknown --no-self-update
|
- run: rustup toolchain install stable --profile minimal --target wasm32-unknown-unknown --no-self-update
|
||||||
|
|
||||||
- uses: ./
|
- run: cargo check --target wasm32-unknown-unknown -p bevy_mod_xr
|
||||||
with:
|
- run: cargo check --target wasm32-unknown-unknown -p bevy_mod_openxr
|
||||||
workspaces: .
|
- run: cargo check --target wasm32-unknown-unknown -p bevy_mod_webxr
|
||||||
|
- run: cargo check --target wasm32-unknown-unknown -p bevy_mod_xr_utils
|
||||||
- run: cargo check --target wasm32-unknown-unknown
|
|
||||||
working-directory: .
|
working-directory: .
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// use bevy::prelude::*;
|
|
||||||
pub mod hand_gizmos;
|
pub mod hand_gizmos;
|
||||||
#[cfg(not(target_family = "wasm"))]
|
#[cfg(not(target_family = "wasm"))]
|
||||||
pub mod tracking_utils;
|
pub mod tracking_utils;
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use bevy_mod_openxr::{
|
use bevy_mod_openxr::{
|
||||||
action_binding::{OxrSendActionBindings, OxrSuggestActionBinding},
|
action_binding::{OxrSendActionBindings, OxrSuggestActionBinding}, action_set_attaching::OxrAttachActionSet, action_set_syncing::{OxrActionSetSyncSet, OxrSyncActionSet}, helper_traits::{ToQuat, ToVec3}, openxr_session_available, openxr_session_running, resources::{OxrFrameState, OxrInstance, Pipelined}, session::OxrSession, spaces::{OxrSpaceLocationFlags, OxrSpaceSyncSet}
|
||||||
action_set_attaching::OxrAttachActionSet,
|
|
||||||
action_set_syncing::{OxrActionSetSyncSet, OxrSyncActionSet},
|
|
||||||
helper_traits::{ToQuat, ToVec3},
|
|
||||||
resources::{OxrFrameState, OxrInstance, Pipelined},
|
|
||||||
session::OxrSession,
|
|
||||||
spaces::{OxrSpaceLocationFlags, OxrSpaceSyncSet},
|
|
||||||
};
|
};
|
||||||
use bevy_mod_xr::{
|
use bevy_mod_xr::{
|
||||||
session::{session_available, session_running, XrSessionCreated, XrTrackingRoot},
|
session::{session_available, session_running, XrSessionCreated, XrTrackingRoot},
|
||||||
@@ -48,7 +42,7 @@ impl Plugin for TrackingUtilitiesPlugin {
|
|||||||
PreUpdate,
|
PreUpdate,
|
||||||
update_head_transforms
|
update_head_transforms
|
||||||
.in_set(OxrSpaceSyncSet)
|
.in_set(OxrSpaceSyncSet)
|
||||||
.run_if(session_running),
|
.run_if(openxr_session_running),
|
||||||
);
|
);
|
||||||
//external
|
//external
|
||||||
app.add_systems(PreUpdate, update_view.after(update_head_transforms));
|
app.add_systems(PreUpdate, update_view.after(update_head_transforms));
|
||||||
@@ -66,12 +60,12 @@ impl Plugin for TrackingUtilitiesPlugin {
|
|||||||
PreUpdate,
|
PreUpdate,
|
||||||
sync_actions
|
sync_actions
|
||||||
.before(OxrActionSetSyncSet)
|
.before(OxrActionSetSyncSet)
|
||||||
.run_if(session_running),
|
.run_if(openxr_session_running),
|
||||||
);
|
);
|
||||||
//attach sets
|
//attach sets
|
||||||
app.add_systems(XrSessionCreated, attach_set);
|
app.add_systems(XrSessionCreated, attach_set);
|
||||||
//create actions
|
//create actions
|
||||||
app.add_systems(Startup, create_actions.run_if(session_available));
|
app.add_systems(Startup, create_actions.run_if(openxr_session_available));
|
||||||
|
|
||||||
app.add_systems(PreUpdate, update_left_grip.after(OxrSpaceSyncSet));
|
app.add_systems(PreUpdate, update_left_grip.after(OxrSpaceSyncSet));
|
||||||
app.add_systems(PreUpdate, update_right_grip.after(OxrSpaceSyncSet));
|
app.add_systems(PreUpdate, update_right_grip.after(OxrSpaceSyncSet));
|
||||||
|
|||||||
@@ -55,11 +55,13 @@
|
|||||||
//!
|
//!
|
||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use bevy_mod_openxr::{
|
use bevy_mod_openxr::{
|
||||||
action_binding::OxrSuggestActionBinding, action_set_attaching::OxrAttachActionSet,
|
action_binding::OxrSuggestActionBinding,
|
||||||
action_set_syncing::OxrActionSetSyncSet, action_set_syncing::OxrSyncActionSet,
|
action_set_attaching::OxrAttachActionSet,
|
||||||
resources::OxrInstance, session::OxrSession,
|
action_set_syncing::{OxrActionSetSyncSet, OxrSyncActionSet},
|
||||||
|
openxr_session_available, openxr_session_running,
|
||||||
|
resources::OxrInstance,
|
||||||
|
session::OxrSession,
|
||||||
};
|
};
|
||||||
use bevy_mod_xr::session::{session_available, session_running};
|
|
||||||
use openxr::{Path, Vector2f};
|
use openxr::{Path, Vector2f};
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
@@ -69,37 +71,40 @@ impl Plugin for XRUtilsActionsPlugin {
|
|||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
app.configure_sets(
|
app.configure_sets(
|
||||||
Startup,
|
Startup,
|
||||||
XRUtilsActionSystemSet::CreateEvents.run_if(session_available),
|
XRUtilsActionSystemSet::CreateEvents.run_if(openxr_session_available),
|
||||||
);
|
);
|
||||||
app.configure_sets(
|
app.configure_sets(
|
||||||
PreUpdate,
|
PreUpdate,
|
||||||
XRUtilsActionSystemSet::SyncActionStates.run_if(session_running),
|
XRUtilsActionSystemSet::SyncActionStates.run_if(openxr_session_running),
|
||||||
);
|
);
|
||||||
app.add_systems(
|
app.add_systems(
|
||||||
Startup,
|
Startup,
|
||||||
create_openxr_events
|
create_openxr_events
|
||||||
.in_set(XRUtilsActionSystemSet::CreateEvents)
|
.in_set(XRUtilsActionSystemSet::CreateEvents)
|
||||||
.run_if(session_available),
|
.run_if(openxr_session_available),
|
||||||
|
);
|
||||||
|
app.add_systems(
|
||||||
|
Update,
|
||||||
|
sync_active_action_sets.run_if(openxr_session_running),
|
||||||
);
|
);
|
||||||
app.add_systems(Update, sync_active_action_sets.run_if(session_running));
|
|
||||||
app.add_systems(
|
app.add_systems(
|
||||||
PreUpdate,
|
PreUpdate,
|
||||||
sync_and_update_action_states_f32
|
sync_and_update_action_states_f32
|
||||||
.run_if(session_running)
|
.run_if(openxr_session_running)
|
||||||
.in_set(XRUtilsActionSystemSet::SyncActionStates)
|
.in_set(XRUtilsActionSystemSet::SyncActionStates)
|
||||||
.after(OxrActionSetSyncSet),
|
.after(OxrActionSetSyncSet),
|
||||||
);
|
);
|
||||||
app.add_systems(
|
app.add_systems(
|
||||||
PreUpdate,
|
PreUpdate,
|
||||||
sync_and_update_action_states_bool
|
sync_and_update_action_states_bool
|
||||||
.run_if(session_running)
|
.run_if(openxr_session_running)
|
||||||
.in_set(XRUtilsActionSystemSet::SyncActionStates)
|
.in_set(XRUtilsActionSystemSet::SyncActionStates)
|
||||||
.after(OxrActionSetSyncSet),
|
.after(OxrActionSetSyncSet),
|
||||||
);
|
);
|
||||||
app.add_systems(
|
app.add_systems(
|
||||||
PreUpdate,
|
PreUpdate,
|
||||||
sync_and_update_action_states_vector
|
sync_and_update_action_states_vector
|
||||||
.run_if(session_running)
|
.run_if(openxr_session_running)
|
||||||
.in_set(XRUtilsActionSystemSet::SyncActionStates)
|
.in_set(XRUtilsActionSystemSet::SyncActionStates)
|
||||||
.after(OxrActionSetSyncSet),
|
.after(OxrActionSetSyncSet),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user