models?
This commit is contained in:
parent
c8c1a54304
commit
ea8057065a
5 changed files with 25 additions and 11 deletions
19
Cargo.lock
generated
19
Cargo.lock
generated
|
@ -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"
|
||||
|
|
|
@ -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"] }
|
||||
|
|
BIN
res/color_cube/color_cube.blend
Normal file
BIN
res/color_cube/color_cube.blend
Normal file
Binary file not shown.
BIN
res/color_cube/color_cube.glb
Normal file
BIN
res/color_cube/color_cube.glb
Normal file
Binary file not shown.
14
src/main.rs
14
src/main.rs
|
@ -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"),
|
||||
|
|
Loading…
Add table
Reference in a new issue