feat: update fusion
This commit is contained in:
961
Cargo.lock
generated
961
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
12
Cargo.toml
12
Cargo.toml
@@ -4,13 +4,13 @@ version = "0.4.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
cached = "0.42.0"
|
||||
cached = "0.43.0"
|
||||
clap = { version = "4.1.3", features = ["derive"] }
|
||||
color-eyre = "0.6.2"
|
||||
directories = "4.0.1"
|
||||
dirs = "4.0.0"
|
||||
directories = "5.0.0"
|
||||
dirs = "5.0.0"
|
||||
ez-pixmap = "0.2.2"
|
||||
glam = { version = "0.22.0", features = ["mint"] }
|
||||
glam = { version = "0.24.0", features = ["mint"] }
|
||||
image = "0.24.5"
|
||||
lazy_static = "1.4.0"
|
||||
linicon = "2.3.0"
|
||||
@@ -20,8 +20,8 @@ nix = "0.26.1"
|
||||
regex = "1.7.1"
|
||||
resvg = "0.29.0"
|
||||
rustc-hash = "1.1.0"
|
||||
stardust-xr-fusion = "0.38.1"
|
||||
stardust-xr-molecules = "0.23.2"
|
||||
stardust-xr-fusion = "0.39.2"
|
||||
stardust-xr-molecules = "0.24.0"
|
||||
tokio = { version = "1.24.1", features = ["full"] }
|
||||
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
|
||||
tween = "2.0.0"
|
||||
|
||||
@@ -183,7 +183,7 @@ struct Button {
|
||||
impl Button {
|
||||
fn new(client: &Client) -> Result<Self, NodeError> {
|
||||
let field = BoxField::create(client.get_root(), Transform::default(), [APP_SIZE; 3])?;
|
||||
let grabbable = Grabbable::new(
|
||||
let grabbable = Grabbable::create(
|
||||
client.get_root(),
|
||||
Transform::default(),
|
||||
&field,
|
||||
@@ -193,11 +193,13 @@ impl Button {
|
||||
},
|
||||
)?;
|
||||
field.set_spatial_parent(grabbable.content_parent())?;
|
||||
let touch_plane = TouchPlane::new(
|
||||
let touch_plane = TouchPlane::create(
|
||||
grabbable.content_parent(),
|
||||
Transform::default(),
|
||||
[(APP_SIZE + PADDING) / 2.0; 2],
|
||||
(APP_SIZE + PADDING) / 2.0,
|
||||
0.0..1.0,
|
||||
0.0..1.0,
|
||||
)?;
|
||||
|
||||
let model = Model::create(
|
||||
@@ -218,7 +220,7 @@ impl Button {
|
||||
}
|
||||
impl RootHandler for Button {
|
||||
fn frame(&mut self, info: FrameInfo) {
|
||||
self.grabbable.update(&info);
|
||||
let _ = self.grabbable.update(&info);
|
||||
if self.grabbable.grab_action().actor_started() {
|
||||
let _ = self.touch_plane.set_enabled(false);
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ impl ProtoStar {
|
||||
) -> Result<Self> {
|
||||
let position = position.into();
|
||||
let field = BoxField::create(parent, Transform::default(), [MODEL_SCALE * 2.0; 3])?;
|
||||
let grabbable = Grabbable::new(
|
||||
let grabbable = Grabbable::create(
|
||||
parent,
|
||||
Transform::from_position(position),
|
||||
&field,
|
||||
@@ -190,7 +190,7 @@ impl ProtoStar {
|
||||
}
|
||||
impl RootHandler for ProtoStar {
|
||||
fn frame(&mut self, info: FrameInfo) {
|
||||
self.grabbable.update(&info);
|
||||
let _ = self.grabbable.update(&info);
|
||||
|
||||
if let Some(grabbable_move) = &mut self.grabbable_move {
|
||||
if !grabbable_move.is_finished() {
|
||||
@@ -274,6 +274,7 @@ impl RootHandler for ProtoStar {
|
||||
.unwrap();
|
||||
|
||||
let executable = self.execute_command.clone();
|
||||
let client = self.content_parent().client().unwrap();
|
||||
|
||||
//TODO: split the executable string for the args
|
||||
tokio::task::spawn(async move {
|
||||
@@ -284,6 +285,11 @@ impl RootHandler for ProtoStar {
|
||||
if dbg!(distance) > ACTIVATION_DISTANCE {
|
||||
let future = startup_settings.generate_startup_token().unwrap();
|
||||
|
||||
let env = client.get_connection_environment().unwrap().await.unwrap();
|
||||
for (k, v) in env.into_iter() {
|
||||
std::env::set_var(k, v);
|
||||
}
|
||||
|
||||
std::env::set_var("STARDUST_STARTUP_TOKEN", future.await.unwrap());
|
||||
let re = Regex::new(r"%[fFuUdDnNickvm]").unwrap();
|
||||
let exec = re.replace_all(&executable, "");
|
||||
|
||||
Reference in New Issue
Block a user