Skip to content

Commit

Permalink
Restructur and start dedicated pages for user tutorials (#7)
Browse files Browse the repository at this point in the history
* rename filenames to reflect order

* introduce editorconfig

* Restructur and start dedicated pages for terminology and user tutorials

* update docusaurus and add mermaidjs support

* Add simplified architecture as diagram for now

* finish
  • Loading branch information
6543 authored Aug 21, 2024
1 parent 9672f2b commit 3b4cfc1
Show file tree
Hide file tree
Showing 20 changed files with 4,519 additions and 4,313 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
indent_style = space
indent_size = 2
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true


[*.md]
trim_trailing_whitespace = false
indent_size = 1

[*.{css,js,json}]
indent_style = tab
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
user_email: 41898282+github-actions[bot]@users.noreply.github.com
2 changes: 1 addition & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

GIT_USER=$1 USE_SSH=true yarn deploy
GIT_USER=$1 USE_SSH=true yarn deploy
35 changes: 35 additions & 0 deletions docs/01-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sidebar_position: 1
---

# Overview

Stardust XR _(formerly known as Stardust)_ is an XR [display server](https://itsfoss.com/display-server) designed for Linux-based systems<!-- (possibly most unix-based too, but untested)-->.<br/>
Unlike traditional display servers that focus on 2D screens, Stardust XR introduces new conventions to utilize unbounded 3D space in virtual or real environments.

## Priorities

- **3D Environment Focus**: While supporting 2D clients through the Wayland protocol, Stardust XR primarily aims to create and manage 3D environments.

- **Standard Interfaces**: Utilizes Wayland and OpenXR for 2D and XR app integration.

- **Stardust Protocol**: Implements a special protocol for:
- Creating virtual objects
- Developing 3D UIs around 2D apps (Panel Shells)
- Handling data as Items that can represent files, Wayland surfaces, etc.

- **Personal Device Interaction**: Focuses on individual user interactions rather than collaborative 3D spaces.

- **Flexible Object Interaction**: Users can choose objects that best suit their current scenario, with easy setup for default configurations.

## Architecture

![simplified architecture diagram](./simplified-architecture.png)

## Projects & Components

- [**telescope**](https://github.com/StardustXR/telescope): bundle most used components to have a demo environment set up
- ...

<!-- TODO: add more core components and projects! -->

86 changes: 86 additions & 0 deletions docs/02-getting-started/01-tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
sidebar_position: 1
---

# Tutorial

## Setup OpenXR

:::note
if you have no headset or other OpenXR device, you can skip this step and start with [installing nix](#install-nix).
:::

### SteamVR

#### Archlinux

TODO

#### NixOS

TODO

#### Others

TODO: collect links for setup on different distrons

### [Monado](https://monado.dev/)

#### Archlinux

TODO

#### NixOS

TODO

#### Others

TODO: collect links for setup on different distrons

## Install nix

For easy development and distribution this project uses the [nix package manager](https://nix.dev/).<br/>
This allows to ensure all dependency requirements are met.

:::info
Make sure to have [flakes enabled](https://nixos.wiki/wiki/flakes).
:::

You can install nix on all common linux systems:

#### Archlinux

```shell
# install git and nix
sudo pacman -Sy git nix
# enable flakes
echo 'experimental-features = nix-command flakes' | sudo tee -a /etc/nix/nix.conf
# enable nix daemon service
sudo systemctl enable nix-daemon.service
# add the current user to nix-users group
sudo usermod -aG nix-users $(id -un)
# reboot to apply user and service changes
sudo systemctl reboot
```

#### NixOS

TODO

#### Others

TODO: collect links for setup on different distrons

## Run Demo

1. clone https://github.com/StardustXR/telescope
2. make sure your OpenXR device works (if 2D mode is not used)
3. run `nix run .`

## Run wayland client

```shell
# run demo.mp4 video in a loop within Stardust
WAYLAND_DISPLAY=wayland-0 DISPLAY= mpv Downloads/demo.mp4 --loop
```
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ The Stardust XR IPC uses Unix domain sockets for communication and a protocol ba
The Stardust XR protocol is object-oriented, depending on a scenegraph on the server end and scenegraph or functionally equivalent structure on the client end. This allows easier implementation of the protocol while still remaining fast, reliable, and extensible.

## Clients
The clients tell the server what models to draw, where they would like to accept input in, etc. Stardust clients are much more suited to widgets or user interfaces to 2D/XR apps.
The clients tell the server what models to draw, where they would like to accept input in, etc. Stardust clients are much more suited to widgets or user interfaces to 2D/XR apps.
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Non-exhaustive list of clients:
![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.
- [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.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ and include the `stardust-xr-fusion` dependency in your `cargo.toml`. Documentat

## Molecules

`stardust-xr-molecules` is an even higher level widget library built on Fusion similar to [MRTK](https://github.com/microsoft/MixedRealityToolkit-Unity) to get your clients up and running faster. Documentation will be available at https://docs.rs/crate/stardust-xr-molecules/latest.
`stardust-xr-molecules` is an even higher level widget library built on Fusion similar to [MRTK](https://github.com/microsoft/MixedRealityToolkit-Unity) to get your clients up and running faster. Documentation will be available at https://docs.rs/crate/stardust-xr-molecules/latest.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Getting Started",
"position": 1
"position": 2
}
5 changes: 5 additions & 0 deletions docs/09-terminology.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Glossary

- **Item**: a virtual object that represents data
- **Panel Shells**: 3D UIs around 2D apps
- ...
12 changes: 0 additions & 12 deletions docs/getting-started/overview.md

This file was deleted.

Binary file added docs/simplified-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ module.exports = {
favicon: 'img/favicon.ico',
organizationName: 'StardustXR', // Usually your GitHub org/user name.
projectName: 'website', // Usually your repo name.
markdown: {
mermaid: true,
},
themes: ['@docusaurus/theme-mermaid'],
themeConfig: {
colorMode: {
defaultMode: "dark",
Expand All @@ -33,7 +37,7 @@ module.exports = {
},
{
type: 'doc',
docId: 'getting-started/overview',
docId: 'overview',
position: 'left',
label: 'Docs',
},
Expand Down Expand Up @@ -76,7 +80,7 @@ module.exports = {
},
{
label: 'Getting Started',
to: '/docs/getting-started/overview',
to: '/docs/getting-started/tutorial',
},
],
},
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.3",
"@docusaurus/preset-classic": "2.0.0-beta.3",
"@docusaurus/core": "2.4.1",
"@docusaurus/preset-classic": "2.4.1",
"@docusaurus/theme-mermaid": "2.4.1",
"@mdx-js/react": "^1.6.21",
"@svgr/webpack": "^5.5.0",
"clsx": "^1.1.1",
Expand Down
13 changes: 7 additions & 6 deletions sidebars.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ li.task-list-item > input[type="checkbox"] {
.gallery {
margin: 0 auto;
max-width: 1250px;
}
}
2 changes: 1 addition & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function HomepageHeader() {
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/getting-started/overview">
to="/docs/getting-started/tutorial">
Get Started
</Link>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ title: Roadmap
- [ ] Panel Item UI
- [ ] Flatland

More to come!
More to come!
2 changes: 1 addition & 1 deletion static/CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
stardustxr.org
stardustxr.org
Loading

0 comments on commit 3b4cfc1

Please sign in to comment.