misc fixes
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -2005,9 +2005,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "stardust-xr-molecules"
|
name = "stardust-xr-molecules"
|
||||||
version = "0.22.0"
|
version = "0.23.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5fe2979f1816d21c3d1a88351f92e1a011992b166072a5fbc73221d6d4557a8e"
|
checksum = "44e840a893484f7c9445dde235090ad9cf829191f2bf2b913b5992cbf52ccbd8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"color-rs",
|
"color-rs",
|
||||||
"glam 0.23.0",
|
"glam 0.23.0",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ regex = "1.7.1"
|
|||||||
resvg = "0.29.0"
|
resvg = "0.29.0"
|
||||||
rustc-hash = "1.1.0"
|
rustc-hash = "1.1.0"
|
||||||
stardust-xr-fusion = "0.38.1"
|
stardust-xr-fusion = "0.38.1"
|
||||||
stardust-xr-molecules = "0.22.0"
|
stardust-xr-molecules = "0.23.2"
|
||||||
tokio = { version = "1.24.1", features = ["full"] }
|
tokio = { version = "1.24.1", features = ["full"] }
|
||||||
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
|
||||||
tween = "2.0.0"
|
tween = "2.0.0"
|
||||||
|
|||||||
@@ -218,7 +218,13 @@ impl Button {
|
|||||||
}
|
}
|
||||||
impl RootHandler for Button {
|
impl RootHandler for Button {
|
||||||
fn frame(&mut self, info: FrameInfo) {
|
fn frame(&mut self, info: FrameInfo) {
|
||||||
self.touch_plane.update();
|
|
||||||
self.grabbable.update(&info);
|
self.grabbable.update(&info);
|
||||||
|
if self.grabbable.grab_action().actor_started() {
|
||||||
|
let _ = self.touch_plane.set_enabled(false);
|
||||||
|
}
|
||||||
|
if self.grabbable.grab_action().actor_stopped() {
|
||||||
|
let _ = self.touch_plane.set_enabled(true);
|
||||||
|
}
|
||||||
|
self.touch_plane.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ use std::process::{Command, Stdio};
|
|||||||
use tween::{QuartInOut, Tweener};
|
use tween::{QuartInOut, Tweener};
|
||||||
|
|
||||||
const MODEL_SCALE: f32 = 0.03;
|
const MODEL_SCALE: f32 = 0.03;
|
||||||
const ACTIVATION_DISTANCE: f32 = 1.0;
|
const ACTIVATION_DISTANCE: f32 = 0.5;
|
||||||
|
|
||||||
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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user