Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api/studio/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The all-new Studio Runtime 2.0 comes with a rebuilt physics engine. Some physics
- We added a new `type` property (required) to `ecs.Collider` to allow for determining if and how physics simulation should apply to the object. Previously, a mass value above 0 determined if a collider was Dynamic or not (0 mass = Static), and Kinematic colliders were not supported.
- Allowed values: `ColliderType.Static`, `ColliderType.Kinematic`, `ColliderType.Dynamic`
- Kinematic colliders are not affected by physics forces, but can have motion and can affect other dynamic bodies through collisions
- See [Collider API documentation](https://www.8thwall.com/docs/api/studio/ecs/collider/) for details and use cases
- See [Collider API documentation](/docs/api/studio/ecs/collider/) for details and use cases

### Fixes and Enhancements
- Enabled stricter typescript checking on by default at build time to improve error reporting
Expand Down
4 changes: 2 additions & 2 deletions docs/api/studio/events/xr/face.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ This event is emitted by Face Effects when a face is first found.
| transform | [`TransformObject`](#TransformObject) | Transform information of the located face. |
| vertices | `[{x, y, z}]` | Position of face points, relative to transform. |
| normals | `[{x, y, z}]` | Normal direction of vertices, relative to transform. |
| attachmentPoints | `{ name, position: {x,y,z} }` | See [`XR8.FaceController.AttachmentPoints`](https://www.8thwall.com/docs/api/engine/facecontroller/attachmentpoints/) for list of available attachment points. `position` is relative to the transform. |
| attachmentPoints | `{ name, position: {x,y,z} }` | See [`XR8.FaceController.AttachmentPoints`](/docs/api/engine/facecontroller/attachmentpoints/) for list of available attachment points. `position` is relative to the transform. |
| uvsInCameraFrame | `[{u, v}]` | The list of uv positions in the camera frame corresponding to the returned vertex points. |

#### Example
Expand All @@ -93,7 +93,7 @@ This event is emitted by Face Effects when faces are subsequently found.
| transform | [`TransformObject`](#TransformObject) | Transform information of the located face. |
| vertices | `[{x, y, z}]` | Position of face points, relative to transform. |
| normals | `[{x, y, z}]` | Normal direction of vertices, relative to transform. |
| attachmentPoints | `{ name, position: {x,y,z} }` | See [`XR8.FaceController.AttachmentPoints`](https://www.8thwall.com/docs/api/engine/facecontroller/attachmentpoints/) for list of available attachment points. `position` is relative to the transform. |
| attachmentPoints | `{ name, position: {x,y,z} }` | See [`XR8.FaceController.AttachmentPoints`](/docs/api/engine/facecontroller/attachmentpoints/) for list of available attachment points. `position` is relative to the transform. |
| uvsInCameraFrame | `[{u, v}]` | The list of uv positions in the camera frame corresponding to the returned vertex points. |

#### Example
Expand Down
6 changes: 5 additions & 1 deletion docs/engine/engine.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
sidebar_label: Introduction
sidebar_label: Engine Introduction
---

# 8th Wall Engine

:::info
If you are developing an 8th Wall project with [Studio](/docs/studio), the 8th Wall Engine is included in all projects by default and does not require additional setup.
:::

The 8th Wall AR Engine is a complete implementation of 8th Wall's Simultaneous Localization and Mapping (SLAM) engine, hyper-optimized for real-time WebAR on browsers. AR features include World Tracking, Image Targets, Face Effects, and Sky Segmentation.

The engine is built-in to Studio projects, and is also easily integrated into modern 3D JavaScript frameworks such as [A-Frame](<https://aframe.io/>), [three.js](<https://threejs.org/>), [PlayCanvas](<https://www.playcanvas.com>), and [Babylon.js](<https://www.babylonjs.com/>).
Expand Down
4 changes: 2 additions & 2 deletions docs/engine/guides/advanced-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ experience. These events will be particular to your WebAR project, but some exam
* etc…

In this example, we’ll create a Tag (with Trigger) and add it to the
["AFrame: Place Ground"](https://www.8thwall.com/8thwall/placeground-aframe) sample project that
["AFrame: Place Ground"](https://github.com/8thwall/aframe-world-effects-example) example that
fires each time a 3D model is spawned.

#### Create Custom Event Trigger {#create-custom-event-trigger}
Expand Down Expand Up @@ -95,7 +95,7 @@ In your 8th Wall project, add the following line of javascript to fire this trig

`window.dataLayer.push({event: 'placeModel'})`

##### Example - based on <https://www.8thwall.com/8thwall/placeground-aframe/master/tap-place.js> {#example---based-on-httpswww8thwallcom8thwallplaceground-aframemastertap-placejs}
##### Example - based on <https://github.com/8thwall/aframe-world-effects-example/blob/main/src/tap-place.js>

```javascript
export const tapPlaceComponent = {
Expand Down
30 changes: 4 additions & 26 deletions docs/engine/guides/coaching-overlay.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,9 @@ customizable by developers, enabling you to focus your time on building your Web

### Use Absolute Scale Coaching Overlay in Your Project: {#use-absolute-scale-coaching-overlay-in-your-project}

1. Open your Project
2. Add the following tag to `head.html`
1. Clone a project that contains the coaching overlay. The coaching overlay is included as a part of the `external` folder.

```jsx
<meta name="8thwall:package" content="@8thwall.coaching-overlay">
```

Note: For Self-Hosted projects, you would add the following `<script>` tag to your page instead:

```jsx
<script src='https://cdn.8thwall.com/web/coaching-overlay/coaching-overlay.js'></script>
```

3. Optionally, customize the parameters of your `coaching-overlay` component as defined below. For
2. Optionally, customize the parameters of the `coaching-overlay` component as defined below. For
Non-AFrame projects, please refer to the
[CoachingOverlay.configure()](/docs/api/engine/coachingoverlay/configure) documentation.

Expand Down Expand Up @@ -138,20 +127,9 @@ enabling you to focus your time on building your WebAR experience.

### Use Sky Effects Coaching Overlay in Your Project {#use-sky-effects-coaching-overlay-in-your-project}

1. Open your Project
2. Add the following tag to `head.html`

```jsx
<meta name="8thwall:package" content="@8thwall.coaching-overlay">
```

Note: For Self-Hosted projects, you would add the following `<script>` tag to your page instead:

```jsx
<script src='https://cdn.8thwall.com/web/coaching-overlay/coaching-overlay.js'></script>
```
1. Clone a project that contains the coaching overlay. The coaching overlay is included as a part of the `external` folder.

3. Optionally, customize the parameters of your `sky-coaching-overlay` component as defined below.
2. Optionally, customize the parameters of the `sky-coaching-overlay` component as defined below.
For Non-AFrame projects, please refer to the SkyCoachingOverlay.configure() documentation.

### A-Frame component parameters (all optional) {#sky-coaching-overlay-parameters}
Expand Down
126 changes: 4 additions & 122 deletions docs/engine/guides/iframe.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
id: ios-8th-wall-web-inside-an-iframe
id: iframe
sidebar_position: 7
---

Expand All @@ -14,124 +14,6 @@ the following [feature-policy directives](https://developer.mozilla.org/en-US/do
<iframe allow="camera;gyroscope;accelerometer;magnetometer;xr-spatial-tracking;microphone;"></iframe>
```

NOTE: microphone is optional.

## LEGACY METHOD: Supporting iOS versions prior to iOS 15 {#legacy-method-supporting-ios-versions-prior-to-ios-15}

The following is **ONLY** required for supporting Inline AR in iOS versions prior to iOS 15. Given
the high adoption of iOS 15+, we **NO LONGER** recommend using this approach.

See the latest iOS adoption stats from Apple: <https://developer.apple.com/support/app-store/>

In addition to including the allow parameter with the correct
[feature-policy directives](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy#directives)
in your iframe as explained above, to support World Tracking projects on iOS versions prior to iOS
15, you must also include additional javascript on both the OUTER and INNER AR pages as explained
below.

In these versions, Safari blocks deviceorientation and devicemotion event access from cross-origin
iframes. To counter this, you must include two scripts in your project to ensure cross-compatibility
with iOS when deploying World Tracking projects.

This is **not required for Face Effects or Image Target projects** (with `disableWorldTracking` set
to `true`).

When implemented correctly, this process enables the OUTER website to send motion events down to the
INNER AR website, a requirement for World Tracking.

#### For the OUTER website {#for-the-outer-website}

**iframe.js** must be included in the **HEAD** of the **OUTER** page via this script tag:

```html
<script src="//cdn.8thwall.com/web/iframe/iframe.js"></script>
```

When starting AR, register the XRIFrame by iframe ID:

```js
window.XRIFrame.registerXRIFrame(IFRAME_ID)
```

When stoppping AR, deregister the XRIFrame:

```js
window.XRIFrame.deregisterXRIFrame()
```

#### For the INNER website {#for-the-inner-website}

**iframe-inner.js** must be included in the **HEAD** of your **INNER AR** website with this script tag:

```html
<script src="//cdn.8thwall.com/web/iframe/iframe-inner.js"></script>
```

By allowing the inner and outer windows to communicate, deviceorientation/devicemotion data can be shared.

See sample project at <https://www.8thwall.com/8thwall/inline-ar>

#### Examples {#examples}

##### Outer Page {#outer-page}

```jsx
// Send deviceorientation/devicemotion to the INNER iframe
<script src="//cdn.8thwall.com/web/iframe/iframe.js"></script>

...
const IFRAME_ID = 'my-iframe' // Iframe containing AR content.
const onLoad = () => {
window.XRIFrame.registerXRIFrame(IFRAME_ID)
}
// Add event listenters and callbacks for the body DOM.
window.addEventListener('load', onLoad, false)

...

<body>
<iframe
id="my-iframe"
style="border: 0; width: 100%; height: 100%"
allow="camera;microphone;gyroscope;accelerometer;"
src="https://www.other-domain.com/my-web-ar/">
</iframe>
</body>
```

##### Inner Page: AFrame projects {#inner-page-aframe-projects}

```html
<head>
<!-- Recieve deviceorientation/devicemotion from the OUTER window -->
<script src="//cdn.8thwall.com/web/iframe/iframe-inner.js"></script>
</head>

...

<body>
<!-- For A-FRAME -->
<!-- NOTE: The iframe-inner script must load after A-FRAME, and iframe-inner component must appear
before xrweb. -->
<a-scene iframe-inner xrweb>
...
</a-scene>
```

##### Inner Page: Non-AFrame projects {#inner-page-non-aframe-projects}

```html
<head>
<!-- Recieve deviceorientation/devicemotion from the OUTER window -->
<script src="//cdn.8thwall.com/web/iframe/iframe-inner.js"></script>
</head>

...

<!-- For non-AFrame projects, add iframeInnerPipelineModule to the custom pipeline module section,
typically located in "onxrloaded" like so: -->
XR8.addCameraPipelineModules([
// Custom pipeline modules
iframeInnerPipelineModule,
])
```
:::note
All permissions are required for AR **except for microphone**.
:::
15 changes: 2 additions & 13 deletions docs/engine/guides/landing-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,8 @@ time on building your WebAR experience.

## Use Landing Pages in Your Project {#use-landing-pages-in-your-project}

1. Open your Project
2. Add the following tag to `head.html`

`<meta name="8thwall:package" content="@8thwall.landing-page">`

Note: For Self-Hosted projects, you would add the following `<script>` tag to your page instead:

`<script src='https://cdn.8thwall.com/web/landing-page/landing-page.js'></script>`

3. **Remove** `xrextras-almost-there` from your A-Frame project, or
`XRExtras.AlmostThere.pipelineModule()` from your Non-AFrame project. (Landing Pages include
almost-there logic in addition to the updates to the QR code page.)
4. Optionally, customize the parameters of your `landing-page` component as defined below. For
1. Clone a project that contains the landing page script. The landing page script is included as a part of the `external` folder.
2. Optionally, customize the parameters of the `landing-page` component as defined below. For
Non-AFrame projects, please refer to the [LandingPage.configure()](/docs/api/engine/landingpage/configure)
documentation.

Expand Down
Loading
Loading