Merge branch 'StardustXR:dev' into dev

This commit is contained in:
AnnoyingRains
2025-08-31 02:18:41 +10:00
committed by GitHub
3 changed files with 10 additions and 17 deletions

5
Cargo.lock generated
View File

@@ -1165,7 +1165,6 @@ dependencies = [
"clap",
"color-eyre",
"glam 0.25.0",
"libc",
"manifest-dir-macros",
"protostar",
"serde",
@@ -1366,9 +1365,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.174"
version = "0.2.158"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]]
name = "libredox"

View File

@@ -15,4 +15,3 @@ tokio = { workspace = true }
serde = { workspace = true }
stardust-xr-fusion = { workspace = true }
stardust-xr-molecules = { workspace = true }
libc = "0.2.174"

View File

@@ -5,24 +5,24 @@ use app::App;
use color_eyre::eyre::Result;
use glam::Quat;
use hex::{HEX_CENTER, HEX_DIRECTION_VECTORS};
use manifest_dir_macros::directory_relative_path;
use protostar::xdg::{get_desktop_files, parse_desktop_file, DesktopFile};
use protostar::xdg::{DesktopFile, get_desktop_files, parse_desktop_file};
use serde::{Deserialize, Serialize};
use stardust_xr_fusion::{
ClientHandle,
client::Client,
core::values::{
color::{color_space::LinearRgb, rgba_linear, Rgba},
ResourceID,
color::{Rgba, color_space::LinearRgb, rgba_linear},
},
drawable::{MaterialParameter, Model, ModelPartAspect},
node::NodeError,
project_local_resources,
root::{ClientState, FrameInfo, RootAspect, RootEvent},
spatial::{Spatial, SpatialAspect, Transform},
ClientHandle,
};
use stardust_xr_molecules::{
button::{Button, ButtonSettings},
FrameSensitive, Grabbable, GrabbableSettings, PointerMode, UIElement,
button::{Button, ButtonSettings},
};
use std::{f32::consts::PI, sync::Arc, time::Duration};
@@ -34,23 +34,18 @@ const ACTIVATION_DISTANCE: f32 = 0.05;
const DEFAULT_HEX_COLOR: Rgba<f32, LinearRgb> = rgba_linear!(0.211, 0.937, 0.588, 1.0);
const BTN_SELECTED_COLOR: Rgba<f32, LinearRgb> = rgba_linear!(0.0, 1.0, 0.0, 1.0);
const BTN_COLOR: Rgba<f32, LinearRgb> = rgba_linear!(1.0, 1.0, 0.0, 1.0);
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<()> {
unsafe {
libc::signal(libc::SIGPIPE, libc::SIG_DFL);
}
color_eyre::install().unwrap();
color_eyre::install().unwrap();
tracing_subscriber::fmt()
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
.pretty()
.init();
let owned_client = Client::connect().await?;
owned_client.setup_resources(&[&project_local_resources!("../res")])?;
let client = owned_client.handle();
let async_loop = owned_client.async_event_loop();
client
.get_root()
.set_base_prefixes(&[directory_relative_path!("../res").to_string()])
.unwrap();
let mut grid = AppHexGrid::new(&client).await;
let mut owned_client = async_loop.stop().await.unwrap();
let event_loop = owned_client.sync_event_loop(|handle, _| {