Skip to content

Commit db5282e

Browse files
committed
docs: layers and secondary input sources
feat: xr layer for vanilla
1 parent f878ec8 commit db5282e

38 files changed

+3782
-4604
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ export function App() {
7272
-[Origin](https://docs.pmnd.rs/xr/tutorials/origin)
7373
- 🪄 [Teleport](https://docs.pmnd.rs/xr/tutorials/teleport)
7474
- 🕹️ [Gamepad](https://docs.pmnd.rs/xr/tutorials/gamepad)
75+
-[Secondary Input Sources](https://docs.pmnd.rs/xr/tutorials/secondary-input-sources)
76+
- 📺 [Layers](https://docs.pmnd.rs/xr/tutorials/layers)
7577
- 🎮 [Custom Controller/Hands/...](https://docs.pmnd.rs/xr/tutorials/custom-inputs)
7678
- ⚓️ [Anchors](https://docs.pmnd.rs/xr/tutorials/anchors)
7779
- 📱 [Dom Overlays](https://docs.pmnd.rs/xr/tutorials/dom-overlay)
@@ -81,8 +83,6 @@ export function App() {
8183
## Roadmap
8284

8385
- 🤳 XR Gestures
84-
- ➕ Multimodal
85-
- 📺 Layers
8686
- 🕺 Tracked Body
8787
- ↕ react-three/controls
8888

docs/advanced/performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Performance
33
description: Important considerations for building performant immersive web applications with react-three/xr
4-
nav: 20
4+
nav: 22
55
---
66

77
All performance optimizations for non-immersive 3D web applications are also applicable for immersive XR web applications. Relevant guides on the topic of performance for 3D web applications are the [R3F performance guide](https://docs.pmnd.rs/react-three-fiber/advanced/scaling-performance), [R3F performance pitfalls](https://docs.pmnd.rs/react-three-fiber/advanced/pitfalls), and the [Threejs tips and tricks](https://discoverthreejs.com/tips-and-tricks/#performance). In general, it is good to check if your web application's performance is GPU- or CPU-bound to select the correct optimization techniques.

docs/advanced/pitfalls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Pitfalls
33
description: Pitfalls to avoid when building immersive web applications with react-three/xr
4-
nav: 19
4+
nav: 21
55
---
66

77
## Changing the camera position in XR

docs/getting-started/all-components.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Component for rendering a mesh for the XRPlane based on the detected plane geome
5656

5757
Component that positions its children in the provided space.
5858

59+
- `space`: Property to provide the xr space or the reference space type, such as `"viewer"`.
60+
5961
### `TeleportTarget`
6062

6163
Component that allows to declare its children as teleport targets.
@@ -64,6 +66,24 @@ Component that allows to declare its children as teleport targets.
6466

6567
Component that allows to emit hit tests from its position in the scene graph.
6668

69+
- `onResults`: Property that allows to provide a callback to retrieve the hit test results.
70+
71+
### `XRLayer`
72+
73+
Component for rendering high quality quad, cylinder, or equirectangular layers inside supported sessions while including a fallback for not supported sessions.
74+
75+
- `src`: Property for displaying images and videos onto the layer. For rendering dynamic content to the layer, leave the `src` empty and put the the dynamic (3D) content into the children so the layer acts as a render target.
76+
- `shape`: Property to configure the shape of the layer (`"quad"`, `"cylinder"`, `"equirectangular"`).
77+
- `layout`: Property to configure the layout of the display content for stereo content (`"default"`, `"mono"`, `"stereo-left-right"`, `"stereo-top-bottom"`).
78+
- `centralAngle`: Property to configure the central angle in case the layer `shape` is a `"cylinder"`.
79+
- `centralHorizontalAngle`: Property to configure the central horizontal angle in case the layer `shape` is `"equirectangular"`.
80+
- `upperVerticalAngle`: Property to configure the upper vertical angle in case the layer `shape` is `"equirectangular"`.
81+
- `lowerVerticalAngle`: Property to configure the lower verical angle in case the layer `shape` is `"equirectangular"`.
82+
- `chromaticAberrationCorrection`: Property to configure whether chromatic abberration should be corrected by the layer.
83+
- `quality`: Property to configure for what type of content the layer should be optimized (`"default"`, `"text-optimized"`, `"graphics-optimized"`).
84+
85+
The component also accepts properties for changing the scale, position, rotation, and more.
86+
6787
## Pointer
6888

6989
The core interaction concept is based on (touch/grab/ray) pointers.

docs/getting-started/introduction.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ export function App() {
5252
-[Origin](../tutorials/origin.md)
5353
- 🪄 [Teleport](../tutorials/teleport.md)
5454
- 🕹️ [Gamepad](../tutorials/gamepad.md)
55+
-[Secondary Input Sources](../tutorials/secondary-input-sources.md)
56+
- 📺 [Layers](../tutorials/layers.md)
5557
- 🎮 [Custom Controller/Hands/...](../tutorials/custom-inputs.md)
5658
- ⚓️ [Anchors](../tutorials/anchors.md)
5759
- 📱 [Dom Overlay](../tutorials/dom-overlay.md)

docs/getting-started/introduction.pdf

-1.02 MB
Binary file not shown.

docs/migration/from-natuerlich.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: from Natuerlich
33
description: Migrate your application from natuerlich
4-
nav: 22
4+
nav: 24
55
---
66

77
@react-three/xr is inspired by natuerlich, and therefore, many things are similar, especially the way interactions are handled. However, a few things have been changed and renamed.

docs/migration/from-react-three-xr-5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: from @react-three/xr v5
33
description: Migrate your application from @react-three/xr v5
4-
nav: 21
4+
nav: 23
55
---
66

77
The goal of @react-three/xr v6 is to align this library closer to the react-three ecosystem. We, therefore, focussed on supporting the react-three/fiber event handlers. Another focus of v6 is to reduce boilerplate and provide more defaults while also giving developers more access to the lower-level WebXR primitives. In combination, these changes allow developers to build XR experiences that interoperate with the whole react-three ecosystem using only a few lines of code.

docs/tutorials/anchors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Anchors
33
description: How to create and manage anchors in your AR experience?
4-
nav: 15
4+
nav: 17
55
---
66

77
Anchors allow to anchor virtual objects into the physical world in AR experiences. `react-three/xr` offers a multitude of ways to create and manage anchors. A simple solution is `useXRAnchor`, which works similarly to `useState` as it returns the current anchor and a function to request a new anchor as a tuple.

docs/tutorials/custom-inputs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Custom Hands/Controllers/...
33
description: Customize interactions and style of inputs such as hands, controllers, and more
4-
nav: 14
4+
nav: 16
55
---
66

77
@react-three/xr provides a set of default hands, controllers, transient pointers, gazes, and screen input that can be configured and completely exchanged with your own implementation. The following example shows how to configure the ray color of the ray pointer in the users hand.

0 commit comments

Comments
 (0)