feat: new stereokit

This commit is contained in:
Nova
2023-04-30 13:25:13 -04:00
parent 35f42559ac
commit aefa6dc62f
17 changed files with 278 additions and 483 deletions

View File

@@ -14,7 +14,7 @@ use stardust_xr::{
values::Transform,
};
use std::sync::Arc;
use stereokit::input::{ButtonState, Handed, StereoKitInput};
use stereokit::{ButtonState, Handed, StereoKitMultiThread};
use tracing::instrument;
pub struct SkController {
@@ -35,9 +35,9 @@ impl SkController {
})
}
#[instrument(level = "debug", name = "Update StereoKit Tip Input Method", skip_all)]
pub fn update(&mut self, sk: &impl StereoKitInput) {
pub fn update(&mut self, sk: &impl StereoKitMultiThread) {
let controller = sk.input_controller(self.handed);
*self.input.enabled.lock() = controller.tracked.contains(ButtonState::Active);
*self.input.enabled.lock() = controller.tracked.contains(ButtonState::ACTIVE);
if *self.input.enabled.lock() {
self.input.spatial.set_local_transform_components(
None,