refactor: begin conversion to bevy, do proper frame wait

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2024-12-15 00:01:32 +01:00
parent 8708f240b4
commit 9f4420f6c9
11 changed files with 680 additions and 4303 deletions

View File

@@ -8,19 +8,15 @@ use crate::{
Node, OwnedNode,
},
objects::{ObjectHandle, SpatialRef},
DefaultMaterial,
};
use bevy::{asset::Handle, prelude::Mesh};
use bevy_mod_xr::hands::HandSide;
use color_eyre::eyre::Result;
use glam::{Mat4, Vec2, Vec3};
use serde::{Deserialize, Serialize};
use stardust_xr::values::Datamap;
use std::sync::Arc;
use stereokit_rust::{
material::Material,
model::Model,
sk::MainThreadToken,
system::{Handed, Input},
util::Color128,
};
use zbus::Connection;
#[derive(Default, Debug, Deserialize, Serialize)]
@@ -35,10 +31,9 @@ struct ControllerDatamap {
pub struct SkController {
object_handle: ObjectHandle<SpatialRef>,
input: Arc<InputMethod>,
handed: Handed,
model: Model,
material: Material,
capture_manager: CaptureManager,
handed: HandSide,
color: bevy::color::Color,
capture: Option<Arc<InputHandler>>,
datamap: ControllerDatamap,
}
impl SkController {