This commit is contained in:
ethan merchant 2024-04-09 18:27:21 -04:00
parent c8c1a54304
commit ea8057065a
5 changed files with 25 additions and 11 deletions

19
Cargo.lock generated
View file

@ -95,15 +95,6 @@ dependencies = [
"winapi",
]
[[package]]
name = "color-cube"
version = "0.1.0"
dependencies = [
"stardust-xr-fusion",
"stardust-xr-molecules",
"tokio",
]
[[package]]
name = "color-eyre"
version = "0.6.3"
@ -144,6 +135,16 @@ dependencies = [
"tracing-error",
]
[[package]]
name = "color_cube"
version = "0.1.0"
dependencies = [
"manifest-dir-macros",
"stardust-xr-fusion",
"stardust-xr-molecules",
"tokio",
]
[[package]]
name = "convert_case"
version = "0.6.0"

View file

@ -1,11 +1,12 @@
[package]
name = "color-cube"
name = "color_cube"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
manifest-dir-macros = "0.1.18"
stardust-xr-fusion = { git = "https://github.com/StardustXR/core" }
stardust-xr-molecules = { git = "https://github.com/StardustXR/molecules" }
tokio = { version = "1.37.0", features = ["full"] }

Binary file not shown.

Binary file not shown.

View file

@ -1,9 +1,21 @@
use stardust_xr_fusion::client::Client;
use manifest_dir_macros::directory_relative_path;
use stardust_xr_fusion::{client::Client, core::values::ResourceID, drawable::Model, spatial::Transform};
#[tokio::main]
async fn main() {
let (client, event_loop) = Client::connect_with_async_loop().await.unwrap();
client.set_base_prefixes(&[directory_relative_path!("res")]);
let model = Model::create(
client.get_root(),
Transform::none(),
&ResourceID::new_namespaced(
"color_cube",
"color_cube.glb"
),
);
tokio::select! {
_ = tokio::signal::ctrl_c() => (),
_ = event_loop => panic!("server crashed"),