feat: examplesss

This commit is contained in:
technobaboo
2023-07-11 12:34:41 -07:00
parent 6889f52094
commit 1a6df6154c
11 changed files with 19 additions and 92 deletions

View File

@@ -1,55 +0,0 @@
---
sidebar_position: 3
---
# Installation
As Stardust is a display server, it is split into multiple parts. Don't be afraid to ask questions in the [Matrix](https://matrix.to/#/#stardustxr:matrix.org) or [Discord](https://discord.gg/A9w7fKE) servers!
## [stardust-xr](https://github.com/StardustXR/stardust-xr-server) (reference server)
<!-- ### Packages -->
<!-- AUR: `stardust-xr-git` -->
### Build system
1. Cargo
### Build dependencies
1. Flatbuffers >= 2.0.8
2. EGL+GLES 3.2
3. GLX+Xlib
4. fontconfig
5. dlopen
6. libseat (such as [seatd](https://sr.ht/~kennylevinsen/seatd/))
7. wayland
8. OpenXR Loader (required even if run in flatscreen mode, generally just named `openxr`)
### Download
```bash
git clone https://github.com/StardustXR/stardust-xr-server.git
cd stardust-xr-server
```
### Build
```bash
cargo build
```
### Install
(this step isn't required. Using `cargo run` while developing is just fine)
```bash
cargo install --path .
```
## [Flatland](https://github.com/StardustXR/flatland) (Simple simula-like panel UI client for 2D app interaction)
### Build system
1. Cargo
### Build dependencies
1. Flatbuffers >= 2.0.8
### Install
```bash
cargo install flatland
```

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 4
---
# Making Clients

View File

@@ -9,4 +9,4 @@ Stardust XR (informally known as Stardust) is an XR display server for Linux-bas
Unlike many display servers, Stardust is not trying to reinvent how applications interface with the system. Stardust uses Wayland and will use OpenXR for 2D/XR app integration. Stardust however has a special protocol for creation of virtual objects such as 3D UIs around 2D apps (called Panel Shells) and handling of data as objects (called Items, can represent files or Wayland surfaces or such). Stardust is not a collaborative 3D space, instead focusing on your own personal device and interactions with it.
Put simply, Stardust is a system UI framework where multiple different clients (programs that connect to Stardust directly) can create objects for the user to interact with their apps and device. The user can choose to use the objects that work best for their current scenario, and default setups can easily be created so users start out with all the essentials.
Put simply, Stardust is a system UI base where multiple different clients (programs that connect to Stardust directly) can create objects for the user to interact with their apps and device. The user can choose to use the objects that work best for their current scenario, and default setups can easily be created so users start out with all the essentials.

View File

@@ -0,0 +1,17 @@
---
sidebar_position: 3
---
# Setup
First you need to install and run the server from https://github.com/StardustXR/server. Follow the README. If you have issues getting OpenXR to work, try running https://gitlab.freedesktop.org/monado/demos/xrgears first.
After the server is running, you'll need to run some clients. Here's a demo showing some off:
![A showcase of some different clients](/img/docs/clients/demo_01.mp4)
Non-exhaustive list of clients:
- [Flatland](https://github.com/StardustXR/flatland): A panel item UI (XR equivalent of a window manager) so you can interact with your apps using virtual touchscreens. To show Wayland apps, run them with the proper `WAYLAND_DISPLAY` environment variable, in the server's startup script, or use a stardust launcher such as gravity or protostar. Flatland works great in 3DoF or 6DoF with direct touch and pointer interaction.
![A flat panel containing the prism launcher](/img/docs/clients/flatland.png)
- [Gravity](https://github.com/StardustXR/gravity): Command line tool to launch programs inside of stardust at a particular offset in space. This is nestable so you can run a script using gravity, and then gravity inside that script to make a whole composed setup out of thin air! It also ensures that everything launched through it will properly connect to the stardust server, such as wayland clients.
- [Protostar](https://github.com/StardustXR/protostar): Prototype app launcher library/examples. Grab app icons and drop them in space to launch apps where they're dropped.
- [Magnetar](https://github.com/StardustXR/magnetar): Workspaces in 3D. Any object inside the rings will move with them, so you can move a bunch of stuff out of the way temporarily when you don't need it.

View File

@@ -1,35 +0,0 @@
---
sidebar_position: 4
---
# Starting
First, try running `cargo run` in a terminal window. If a headset is plugged in and OpenXR is working no window will show up. However, the headset should show the same things as the window that opens:
![A pitch black void with a single bleach white hand in the middle](/img/docs/run/xr_mode_windowed_blank.png)
### Images
Flatscreen mode upon initial startup:
![A pitch black window representing Stardust in flatscreen mode](/img/docs/run/flatscreen_1.png)
XR mode when OpenXR somehow fails:
![A black void representing Stardust in XR mode with a hand skeleton in the middle](/img/docs/run/flatscreen_2.png)
Flatscreen mode when `~/.config/stardust/skytex.hdr` is [Zhengyang Gate](https://polyhaven.com/a/zhengyang_gate):
![A pitch black window representing Stardust in flatscreen mode](/img/docs/run/flatscreen_3.png)
### Help screen
```
stardust-xr-server 0.10.0
Nova King <technobaboo@proton.me>
Stardust XR reference display server
USAGE:
stardust-xr-server [OPTIONS]
OPTIONS:
-f, --flatscreen Force flatscreen mode and use the mouse pointer as a 3D pointer
-h, --help Print help information
-o, --overlay <PRIORITY> Run Stardust XR as an overlay with given priority
-V, --version Print version information
```