Crate stardust_xr_fusion

Source
Expand description

A library for Stardust XR clients to use with abstractions over the client, nodes, and event loop.

§Example

use stardust_xr_fusion::client::Client;

#[tokio::main(flavor="current_thread")]
async fn main() {
   let (_client, event_loop) = Client::connect_with_async_loop().await.unwrap();

   tokio::select! {
   	biased;
   	_ = tokio::signal::ctrl_c() => (),
   	e = event_loop => e.unwrap().unwrap(),
   }
}

Re-exports§

pub use stardust_xr as core;

Modules§

audio
Create audio!
client
Your connection to the Stardust server and other essentials.
data
Module containing pulse senders/receivers, the way to send non-spatial data through 3D space.
drawable
Anything the user can see such as lines, models and text.
fields
Analog SDFs to define boundaries for input, interaction, and behavior.
input
Spatial input using the Spatial Universal Interaction System (SUIS).
items
Self-contained nodes containing data and sometimes behavior.
node
The base of all objects in Stardust.
spatial
Nodes that represent spatial objects and zones to manipulate certain spatials from other clients.
startup_settings
A collection of utilities for launching new 2D or 3D clients with a sense of space and control over them.

Macros§

handle_action

Structs§

HandlerWrapper
A wrapper around a node and a handler struct implementing the node’s handler trait. Necessary because the methods on the handler may be called at any time and bundling the 2 together makes it harder to screw up. Can’t be created directly, nodes that could use handlers have a wrap() and wrap_raw() method on them that consumes them and a handler and returns a HandlerWrapper.

Type Aliases§

Mutex
A mutual exclusion primitive useful for protecting shared data
MutexGuard
An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.