refactor: move hand debug gizmos into bevy_mod_xr
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
@@ -19,7 +19,7 @@ fn main() -> AppExit {
|
||||
]),
|
||||
..default()
|
||||
})
|
||||
.add_plugins(bevy_xr_utils::hand_gizmos::HandGizmosPlugin)
|
||||
.add_plugins(bevy_mod_xr::hand_debug_gizmos::HandGizmosPlugin)
|
||||
.add_systems(Startup, setup)
|
||||
.insert_resource(ClearColor(Color::NONE))
|
||||
.run()
|
||||
|
||||
@@ -9,6 +9,7 @@ publish = false
|
||||
[dependencies]
|
||||
bevy_mod_openxr.workspace = true
|
||||
bevy_xr_utils.workspace = true
|
||||
bevy_mod_xr.workspace = true
|
||||
bevy = { workspace = true, default-features = false, features = [
|
||||
# Bevy 0.15 made GameActivity the default which breaks Quest builds
|
||||
# To use NativeActivity instead of GameActivity all of the features have to be listed manually
|
||||
|
||||
@@ -15,7 +15,7 @@ fn main() {
|
||||
},
|
||||
..default()
|
||||
}))
|
||||
.add_plugins(bevy_xr_utils::hand_gizmos::HandGizmosPlugin)
|
||||
.add_plugins(bevy_mod_xr::hand_debug_gizmos::HandGizmosPlugin)
|
||||
.add_systems(Startup, setup)
|
||||
.add_systems(Update, modify_msaa)
|
||||
.insert_resource(AmbientLight {
|
||||
|
||||
@@ -16,9 +16,10 @@ use bevy_mod_xr::{
|
||||
};
|
||||
use openxr::Posef;
|
||||
|
||||
fn main() {
|
||||
fn main() -> AppExit {
|
||||
let mut app = App::new();
|
||||
app.add_plugins(add_xr_plugins(DefaultPlugins));
|
||||
app.add_plugins(bevy_mod_xr::hand_debug_gizmos::HandGizmosPlugin);
|
||||
app.add_systems(XrSessionCreated, spawn_hands);
|
||||
app.add_systems(XrSessionCreated, attach_set);
|
||||
app.add_systems(
|
||||
@@ -31,7 +32,7 @@ fn main() {
|
||||
app.add_systems(Startup, create_actions.run_if(session_available));
|
||||
app.add_systems(Startup, setup);
|
||||
|
||||
app.run();
|
||||
app.run()
|
||||
}
|
||||
|
||||
fn attach_set(actions: Res<ControllerActions>, mut attach: EventWriter<OxrAttachActionSet>) {
|
||||
|
||||
@@ -4,12 +4,14 @@ use bevy::prelude::*;
|
||||
use bevy_mod_openxr::{action_binding::OxrSendActionBindings, add_xr_plugins};
|
||||
use bevy_mod_xr::session::{XrSessionCreated, XrTracker};
|
||||
use bevy_xr_utils::tracking_utils::{
|
||||
suggest_action_bindings, TrackingUtilitiesPlugin, XrTrackedLeftGrip, XrTrackedLocalFloor, XrTrackedRightGrip, XrTrackedStage, XrTrackedView
|
||||
suggest_action_bindings, TrackingUtilitiesPlugin, XrTrackedLeftGrip, XrTrackedLocalFloor,
|
||||
XrTrackedRightGrip, XrTrackedStage, XrTrackedView,
|
||||
};
|
||||
|
||||
fn main() {
|
||||
let mut app = App::new();
|
||||
app.add_plugins(add_xr_plugins(DefaultPlugins));
|
||||
app.add_plugins(bevy_mod_xr::hand_debug_gizmos::HandGizmosPlugin);
|
||||
app.add_systems(Startup, setup);
|
||||
|
||||
//things?
|
||||
|
||||
@@ -8,10 +8,10 @@ use bevy_xr_utils::xr_utils_actions::{
|
||||
XRUtilsActionsPlugin, XRUtilsBinding,
|
||||
};
|
||||
|
||||
fn main() {
|
||||
fn main() -> AppExit {
|
||||
App::new()
|
||||
.add_plugins(add_xr_plugins(DefaultPlugins))
|
||||
.add_plugins(bevy_xr_utils::hand_gizmos::HandGizmosPlugin)
|
||||
.add_plugins(bevy_mod_xr::hand_debug_gizmos::HandGizmosPlugin)
|
||||
.add_plugins(transform_utils::TransformUtilitiesPlugin)
|
||||
.add_systems(Startup, setup)
|
||||
.add_plugins(XRUtilsActionsPlugin)
|
||||
@@ -31,7 +31,7 @@ fn main() {
|
||||
brightness: 500.0,
|
||||
..AmbientLight::default()
|
||||
})
|
||||
.run();
|
||||
.run()
|
||||
}
|
||||
|
||||
/// set up a simple 3D scene
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use crate::error::OxrError;
|
||||
use crate::graphics::{GraphicsExt, GraphicsType, GraphicsWrap};
|
||||
use crate::graphics::GraphicsExt;
|
||||
|
||||
pub use crate::openxr::exts::OxrExtensions;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::hands::{HandBone, XrHandBoneRadius};
|
||||
use crate::spaces::XrSpaceLocationFlags;
|
||||
use bevy::color::palettes::css;
|
||||
use bevy::{prelude::*, transform::TransformSystem};
|
||||
use bevy_mod_xr::hands::{HandBone, XrHandBoneRadius};
|
||||
use bevy_mod_xr::spaces::XrSpaceLocationFlags;
|
||||
pub struct HandGizmosPlugin;
|
||||
impl Plugin for HandGizmosPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
@@ -4,3 +4,4 @@ pub mod hands;
|
||||
pub mod session;
|
||||
pub mod types;
|
||||
pub mod spaces;
|
||||
pub mod hand_debug_gizmos;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
pub mod hand_gizmos;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub mod tracking_utils;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
|
||||
Reference in New Issue
Block a user