Removed unused imports
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
use clap::{self, Parser};
|
use clap::{self, Parser};
|
||||||
use color_eyre::eyre::Result;
|
use color_eyre::eyre::Result;
|
||||||
use glam::{Quat, Vec3};
|
use glam::Quat;
|
||||||
use manifest_dir_macros::directory_relative_path;
|
use manifest_dir_macros::directory_relative_path;
|
||||||
use mint::Vector3;
|
use mint::Vector3;
|
||||||
use protostar::{
|
use protostar::{
|
||||||
@@ -12,7 +12,6 @@ use stardust_xr_fusion::{
|
|||||||
core::values::Transform,
|
core::values::Transform,
|
||||||
drawable::{Alignment, Bounds, MaterialParameter, Model, ResourceID, Text, TextFit, TextStyle},
|
drawable::{Alignment, Bounds, MaterialParameter, Model, ResourceID, Text, TextFit, TextStyle},
|
||||||
fields::BoxField,
|
fields::BoxField,
|
||||||
input::{InputData, InputDataType},
|
|
||||||
node::NodeError,
|
node::NodeError,
|
||||||
node::NodeType,
|
node::NodeType,
|
||||||
spatial::Spatial,
|
spatial::Spatial,
|
||||||
@@ -60,15 +59,12 @@ async fn main() -> Result<()> {
|
|||||||
struct Sirius {
|
struct Sirius {
|
||||||
touch_plane: TouchPlane,
|
touch_plane: TouchPlane,
|
||||||
model: Model,
|
model: Model,
|
||||||
root: Spatial,
|
|
||||||
clients: Vec<App>,
|
clients: Vec<App>,
|
||||||
visibility: bool,
|
visibility: bool,
|
||||||
grabbable: Grabbable,
|
grabbable: Grabbable,
|
||||||
}
|
}
|
||||||
impl Sirius {
|
impl Sirius {
|
||||||
fn new(client: &Client, args: Args) -> Result<Self, NodeError> {
|
fn new(client: &Client, args: Args) -> Result<Self, NodeError> {
|
||||||
let mut client_list: Vec<(Option<&str>, String)> = Vec::new();
|
|
||||||
|
|
||||||
let root = Spatial::create(client.get_root(), Transform::default(), false).unwrap();
|
let root = Spatial::create(client.get_root(), Transform::default(), false).unwrap();
|
||||||
|
|
||||||
let field = BoxField::create(&root, Transform::default(), [0.1; 3]).unwrap();
|
let field = BoxField::create(&root, Transform::default(), [0.1; 3]).unwrap();
|
||||||
@@ -85,7 +81,7 @@ impl Sirius {
|
|||||||
|
|
||||||
let walkdir = WalkDir::new(args.apps_directory.canonicalize().unwrap());
|
let walkdir = WalkDir::new(args.apps_directory.canonicalize().unwrap());
|
||||||
|
|
||||||
let mut clients: Vec<App> = walkdir
|
let clients: Vec<App> = walkdir
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|path| path.ok())
|
.filter_map(|path| path.ok())
|
||||||
.map(|entry| entry.into_path())
|
.map(|entry| entry.into_path())
|
||||||
@@ -115,7 +111,6 @@ impl Sirius {
|
|||||||
Ok(Sirius {
|
Ok(Sirius {
|
||||||
touch_plane,
|
touch_plane,
|
||||||
model,
|
model,
|
||||||
root,
|
|
||||||
clients,
|
clients,
|
||||||
visibility,
|
visibility,
|
||||||
grabbable,
|
grabbable,
|
||||||
@@ -201,14 +196,6 @@ impl RootHandler for Sirius {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn position(data: &InputData) -> Vec3 {
|
|
||||||
match &data.input {
|
|
||||||
InputDataType::Hand(h) => h.palm.position.into(),
|
|
||||||
InputDataType::Pointer(w) => w.deepest_point.into(),
|
|
||||||
InputDataType::Tip(t) => t.origin.into(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn model_from_icon(parent: &Spatial, icon: &Icon) -> Result<Model> {
|
fn model_from_icon(parent: &Spatial, icon: &Icon) -> Result<Model> {
|
||||||
return match &icon.icon_type {
|
return match &icon.icon_type {
|
||||||
IconType::Png => {
|
IconType::Png => {
|
||||||
|
|||||||
Reference in New Issue
Block a user