Skip to content

Commit cfba220

Browse files
authored
add docs (#6)
* add docs * add docs * add docs * add docs * add docs * add docs * add docs
1 parent f9c6d3f commit cfba220

File tree

650 files changed

+19960
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

650 files changed

+19960
-2
lines changed

docs/.gitkeep

Whitespace-only changes.

docs/api/_category_.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "API Reference",
3+
"position": 4
4+
}

docs/api/api.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# API Introduction
2+
3+
This section provides a detailed look at the APIs available for building immersive WebAR experiences with 8th Wall Studio.
4+
5+
The 8th Wall API reference is organized into two main groups:
6+
7+
## Studio API
8+
9+
The Studio API provides everything you need to build structured, dynamic experiences in Studio.
10+
11+
The Studio API includes:
12+
13+
- [**Entity-Component System (ECS)**](/docs/api/studio/ecs) — API for working with Studio’s ECS architecture, allowing you to create, modify, and organize entities and components at runtime.
14+
- [**World**](/docs/api/studio/world) — Core functions and utilities for managing the overall scene graph, including entity hierarchies, transforms, and spaces. The world is the container for all spaces, entities, queries, and observers in your project.
15+
- [**Events**](/docs/api/studio/events) — A rich system for sending and responding to runtime events within Studio.
16+
17+
Use the Studio API to create immersive, stateful experiences that respond to player input, world changes, and real-time interactions.
18+
19+
[Explore the Studio API →](/docs/api/studio)
20+
21+
22+
## Engine API
23+
24+
The Engine API provides lower-level access to 8th Wall’s underlying AR engine, including:
25+
26+
- **8th Wall Camera Pipeline Modules** — Camera pipeline modules developed by 8th Wall.
27+
- **Custom Camera Pipeline Modules** — Interface for working with the camera frame processing pipeline.
28+
29+
Use the Engine API when you need fine-grained control over camera input, frame processing, or when integrating custom WebGL or computer vision workflows into your project.
30+
31+
[Explore the Engine API →](/docs/api/engine)

docs/api/engine/_category_.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "Engine",
3+
"position": 2
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "AFrame",
3+
"position": 3
4+
}

docs/api/engine/aframe/aframe.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# XR8.AFrame
2+
3+
A-Frame (<https://aframe.io>) is a web framework designed for building virtual reality experiences.
4+
By adding 8th Wall Web to your A-Frame project, you can now easily build **augmented reality**
5+
experiences for the web.
6+
7+
## Components
8+
Component | Description
9+
--------- | -----------
10+
[xrconfig](/docs/api/engine/aframe/xrconfig) | Used to configure the camera feed
11+
[xrweb](/docs/api/engine/aframe/xrweb) | Used to configure world tracking
12+
[xrface](/docs/api/engine/aframe/xrface) | Used to configure face effects
13+
[xrlayers](/docs/api/engine/aframe/xrlayers) | Used to configure sky effects
14+
[xrlayerscene](/docs/api/engine/aframe/xrlayers) | Used to configure sky effects
15+
16+
## Functions
17+
18+
Function | Description
19+
-------- | -----------
20+
[xrconfigComponent](/docs/api/engine/aframe/xrconfig#xrconfigcomponent) | Creates an A-Frame component for configuring the camera which can be registered with `AFRAME.registerComponent()`. Generally won't need to be called directly.
21+
[xrwebComponent](/docs/api/engine/aframe/xrweb#xrwebcomponent) | Creates an A-Frame component for World Tracking and/or Image Target tracking which can be registered with `AFRAME.registerComponent()`. Generally won't need to be called directly.
22+
[xrfaceComponent](/docs/api/engine/aframe/xrface#xrfacecomponent) | Creates an A-Frame component for Face Effects tracking which can be registered with `AFRAME.registerComponent()`. Generally won't need to be called directly.
23+
[xrlayersComponent](/docs/api/engine/aframe/xrlayers#xrlayerscomponent) | Creates an A-Frame component for Layers tracking which can be registered with `AFRAME.registerComponent()`. Generally won't need to be called directly.
24+
[xrlayersceneComponent](/docs/api/engine/aframe/xrlayers#xrlayerscenecomponent) | Creates an A-Frame component for a Layer scene which can be registered with `AFRAME.registerComponent()`. Generally won't need to be called directly.
25+
26+
## Examples
27+
28+
#### Example - SLAM enabled (default) {#example---slam-enabled-default}
29+
30+
```html
31+
<a-scene xrconfig xrweb>
32+
```
33+
34+
#### Example - SLAM disabled (image tracking only) {#example---slam-disabled-image-tracking-only}
35+
36+
```html
37+
<a-scene xrconfig xrweb="disableWorldTracking: true">
38+
```
39+
40+
#### Example - Front camera (image tracking only) {#example---front-camera-image-tracking-only}
41+
42+
```html
43+
<a-scene xrconfig="cameraDirection: front" xrweb="disableWorldTracking: true">
44+
```
45+
46+
#### Example - Front camera Sky Effects {#example---front-camera-sky-effects}
47+
48+
```html
49+
<a-scene xrconfig="cameraDirection: front" xrlayers>
50+
```
51+
52+
#### Example - Sky + SLAM {#example---sky--slam}
53+
54+
```html
55+
<a-scene xrconfig xrweb xrlayers>
56+
<a-entity xrlayerscene="name: sky; edgeSmoothness:0.6; invertLayerMask: true;">
57+
<!-- Add your Sky Effects content here. -->
58+
</a-entity>
59+
</a-scene>
60+
```
61+
62+
#### Example - Face Effects {#example---face-effects}
63+
64+
```html
65+
<a-scene xrconfig xrface>
66+
```
67+
68+
#### Example - Face Effects with Ears {#example---face-effects-ears}
69+
70+
```html
71+
<a-scene xrconfig xrface="enableEars:true">
72+
```

docs/api/engine/aframe/xrconfig.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Camera Configuration
2+
3+
To configure the camera feed, add the `xrconfig` component to your `a-scene`:
4+
5+
`<a-scene xrconfig>`
6+
7+
## xrconfig Attributes (all optional) {#xrconfig-attributes}
8+
9+
Component | Type | Default | Description
10+
--------- | ---- | ------- | -----------
11+
cameraDirection | `String` | `'back'` | Desired camera to use. Choose from: `back` or `front`. Use `cameraDirection: front;` with `mirroredDisplay: true;` for selfie mode. Note that world tracking is only supported with `cameraDirection: back;`.`
12+
allowedDevices | `String` | `'mobile-and-headsets'` | Supported device classes. Choose from: `'mobile-and-headsets'` , `'mobile'` or `'any'`. Use `'any'` to enable laptop or desktop-type devices with built-in or attached webcams. Note that world tracking is only supported on `'mobile-and-headsets'` or `mobile`.
13+
mirroredDisplay | `Boolean` | `false` | If true, flip left and right in the output geometry and reverse the direction of the camera feed. Use `'mirroredDisplay: true;'` with `'cameraDirection: front;'` for selfie mode. Should not be enabled if World Tracking (SLAM) is enabled.
14+
disableXrTablet | `Boolean` | `false` | Disable the tablet visible in immersive sessions.
15+
xrTabletStartsMinimized | `Boolean` | `false` | The tablet will start minimized.
16+
disableDefaultEnvironment | `Boolean` | `false` | Disable the default "void space" background.
17+
disableDesktopCameraControls | `Boolean` | `false` | Disable WASD and mouse look for camera.
18+
disableDesktopTouchEmulation | `Boolean` | `false` | Disable desktop fake touches.
19+
disableXrTouchEmulation | `Boolean` | `false` | Don’t emit touch events based on controller raycasts with the scene.
20+
disableCameraReparenting | `Boolean` | `false` | Disable camera -> controller object move
21+
defaultEnvironmentFloorScale | `Number` | `1` | Shrink or grow the floor texture.
22+
defaultEnvironmentFloorTexture | Asset | | Specify an alternative texture asset or URL for the tiled floor.
23+
defaultEnvironmentFloorColor | Hex Color | `#1A1C2A` | Set the floor color.
24+
defaultEnvironmentFogIntensity | `Number` | `1` | Increase or decrease fog density.
25+
defaultEnvironmentSkyTopColor | Hex Color | `#BDC0D6` | Set the color of the sky directly above the user.
26+
defaultEnvironmentSkyBottomColor | Hex Color | `#1A1C2A` | Set the color of the sky at the horizon.
27+
defaultEnvironmentSkyGradientStrength | `Number` | `1` | Control how sharply the sky gradient transitions.
28+
29+
Notes:
30+
31+
* `cameraDirection`: When using `xrweb` to provide world tracking (SLAM), only the `back` camera is
32+
supported. If you are using the `front` camera, you must disable world tracking by setting
33+
`disableWorldTracking: true` on `xrweb`.
34+
35+
## xrconfigComponent()
36+
37+
`XR8.AFrame.xrconfigComponent()`
38+
39+
Creates an A-Frame component which can be registered with `AFRAME.registerComponent()`. This,
40+
however, generally won't need to be called directly. On 8th Wall Web script load, this component
41+
will be registered automatically if it is detected that A-Frame has loaded (i.e if `window.AFRAME`
42+
exists).
43+
44+
```javascript
45+
window.AFRAME.registerComponent('xrconfig', XR8.AFrame.xrconfigComponent())
46+
```

docs/api/engine/aframe/xrface.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Face Effects
2+
3+
If you want Face Effects tracking, add the `xrface` component to your `a-scene`:
4+
5+
`<a-scene xrconfig xrface>`
6+
7+
## xrface Attributes {#xrface-attributes}
8+
9+
Component | Type | Default | Description
10+
--------- | ---- | ------- | -----------
11+
meshGeometry | `Array` | `['face']` | Comma separated strings that configures which portions of the face mesh will have returned triangle indices. Can be any combination of `'face'`, `'eyes'`, `'iris'` and/or `'mouth'`.
12+
maxDetections [Optional] | `Number` | `1` | The maximum number of faces to detect. The available choices are 1, 2, or 3.
13+
uvType [Optional] | `String` | `[XR8.FaceController.UvType.STANDARD]` | Specifies which uvs are returned in the facescanning and faceloading event. Options are: `[XR8.FaceController.UvType.STANDARD, XR8.FaceController.UvType.PROJECTED]`
14+
enableEars [Optional] | `Boolean` | `false` | If true, runs ear detection simultaneosly with Face Effects and returns ear attachment points.
15+
16+
17+
Notes:
18+
19+
* `xrface` and `xrweb` cannot be used at the same time.
20+
* `xrface` and `xrlayers` cannot be used at the same time.
21+
* Best practice is to always use `xrconfig`; however, if you use `xrface` without `xrconfig` then `xrconfig` will be added automatically. When that happens all attributes which were set on `xrface` will be passed along to `xrconfig`.
22+
23+
## xrfaceComponent()
24+
25+
`XR8.AFrame.xrfaceComponent()`
26+
27+
Creates an A-Frame component which can be registered with `AFRAME.registerComponent()`. This,
28+
however, generally won't need to be called directly. On 8th Wall Web script load, this component
29+
will be registered automatically if it is detected that A-Frame has loaded (i.e if `window.AFRAME`
30+
exists).
31+
32+
```javascript
33+
window.AFRAME.registerComponent('xrface', XR8.AFrame.xrfaceComponent())
34+
```

docs/api/engine/aframe/xrlayers.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Sky Effects
2+
3+
If you want Sky Effects:
4+
5+
1. Add the `xrlayers` component to your `a-scene`
6+
2. Add the `xrlayerscene` component to an `a-entity` and add content you want to be in the sky under that `a-entity`.
7+
8+
```html
9+
<a-scene xrconfig xrlayers>
10+
<a-entity xrlayerscene="name: sky; edgeSmoothness:0.6; invertLayerMask: true;">
11+
<!-- Add your Sky Effects content here. -->
12+
</a-entity>
13+
</a-scene>
14+
```
15+
16+
## xrlayers Attributes {#xrlayers-attributes}
17+
18+
None
19+
20+
Notes:
21+
22+
* `xrlayers` and `xrface` cannot be used at the same time.
23+
* `xrlayers` and `xrweb` can be used at the same time. You must use `xrconfig` when doing so.
24+
* Best practice is to always use `xrconfig`; however, if you use `xrlayers` without `xrface` or `xrweb` or `xrconfig`, then `xrconfig` will be added automatically. When that happens all attributes which were set on `xrweb` will be passed along to `xrconfig`.
25+
26+
## xrlayerscene Attributes {#xrlayerscene-attributes}
27+
28+
Component | Type | Default | Description
29+
--------- | ---- | ------- | -----------
30+
name | `String` | `''` | The layer name. Should correspond to a layer from [`XR8.LayersController`](../layerscontroller/layerscontroller.md). Only supported layer at this time is `sky`.
31+
invertLayerMask | `Boolean` | `false` | If true, content you place in your scene will occlude non-sky areas. If false, content you place in your scene will occlude sky areas.
32+
edgeSmoothness | `Number` | `0` | Amount to smooth the edges of the layer. Valid values between 0-1.
33+
34+
## xrlayersceneComponent()
35+
36+
`XR8.AFrame.xrlayersceneComponent()`
37+
38+
Creates an A-Frame component which can be registered with `AFRAME.registerComponent()`. This,
39+
however, generally won't need to be called directly. On 8th Wall Web script load, this component
40+
will be registered automatically if it is detected that A-Frame has loaded (i.e if `window.AFRAME`
41+
exists).
42+
43+
```javascript
44+
window.AFRAME.registerComponent('xrlayersceneComponent', XR8.AFrame.xrlayersceneComponent())
45+
```
46+
47+
## xrlayersComponent()
48+
49+
`XR8.AFrame.xrlayersComponent()`
50+
51+
Creates an A-Frame component which can be registered with `AFRAME.registerComponent()`. This,
52+
however, generally won't need to be called directly. On 8th Wall Web script load, this component
53+
will be registered automatically if it is detected that A-Frame has loaded (i.e if `window.AFRAME`
54+
exists).
55+
56+
```javascript
57+
window.AFRAME.registerComponent('xrlayers', XR8.AFrame.xrlayersComponent())
58+
```

docs/api/engine/aframe/xrweb.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# World Tracking & Image Targets
2+
3+
If you want World Tracking or Image Targets, add the `xrweb` component to your `a-scene`:
4+
5+
`<a-scene xrconfig xrweb>`
6+
7+
## xrweb Attributes (all optional) {#xrweb-attributes}
8+
9+
Component | Type | Default | Description
10+
--------- | ---- | ------- | -----------
11+
scale | `String` | `'responsive'` | Either `'responsive'` or `'absolute'`. `'responsive'` will return values so that the camera on frame 1 is at the origin defined via [`XR8.XrController.updateCameraProjectionMatrix()`](../xrcontroller/updatecameraprojectionmatrix). `'absolute'` will return the camera, image targets, etc in meters. The default is `'responsive'`. When using `'absolute'` the x-position, z-position, and rotation of the starting pose will respect the parameters set in [`XR8.XrController.updateCameraProjectionMatrix()`](../xrcontroller/updatecameraprojectionmatrix) once scale has been estimated. The y-position will depend on the camera's physical height from the ground plane.
12+
disableWorldTracking | `Boolean` | `false` | If true, turn off SLAM tracking for efficiency.
13+
14+
Notes:
15+
16+
* `xrweb` and `xrface` cannot be used at the same time.
17+
* `xrweb` and `xrlayers` can be used at the same time. You must use `xrconfig` when doing so.
18+
* Best practice is to always use `xrconfig`; however, if you use `xrweb` without `xrface` or
19+
`xrlayers` or `xrconfig`, then `xrconfig` will be added automatically. When that happens all
20+
attributes which were set on `xrweb` will be passed along to `xrconfig`.
21+
* `cameraDirection`: World tracking (SLAM) is only supported on the `back` camera. If you are using
22+
the `front` camera, you must disable world tracking by setting `disableWorldTracking: true`.
23+
* World tracking (SLAM) is only supported on mobile devices.
24+
25+
## xrwebComponent()
26+
27+
`XR8.AFrame.xrwebComponent()`
28+
29+
Creates an A-Frame component which can be registered with `AFRAME.registerComponent()`. This,
30+
however, generally won't need to be called directly. On 8th Wall Web script load, this component
31+
will be registered automatically if it is detected that A-Frame has loaded (i.e if `window.AFRAME`
32+
exists).
33+
34+
```javascript
35+
window.AFRAME.registerComponent('xrweb', XR8.AFrame.xrwebComponent())
36+
```

0 commit comments

Comments
 (0)