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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Mac OS
**/.DS_Store
tmp
58 changes: 43 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,50 @@
> [!IMPORTANT]
> This is not the MIT-licensed open source 8th Wall engine. That is in a separate repository which can be found [here](https://github.com/8thwall/8thwall/blob/main/packages/engine/README.md).

## Overview
## Usage

See https://8thwall.org/docs/engine/overview for a more detailed guide.

### Option 1: Script tag

```html
<script src="https://cdn.jsdelivr.net/npm/@8thwall/engine-binary@1/dist/xr.js" async crossorigin="anonymous" data-preload-chunks="slam"></script>
```

### Option 2: npm

```
npm install @8thwall/engine-binary
```

You will need to copy the included artifacts into your dist folder, for example in webpack:

```js
new CopyWebpackPlugin({
patterns: [
{
from: 'node_modules/@8thwall/engine-binary/dist',
to: 'external/xr',
}
]
})
```

This repo holds the distributed 8th Wall engine binary.
You can then load the SDK by adding the following to index.html:

The 8th Wall engine binary contains the core 8th Wall AR engine and is included with each project exported using Buildable Code Export.
```html
<script src="./external/xr/xr.js" async data-preload-chunks="slam"></script>
```

It is provided as closed source and governed by a limited-use distribution license.
When importing the package, you will get a simple helper for accessing XR8 once it is loaded. This promise will only resolve if the script tag is included in the HTML.

```js
import {XR8Promise} from '@8thwall/engine-binary'

XR8Promise.then((XR8) => XR8.XrController.configure({}))
```

## Overview

The 8th Wall engine binary includes the core AR capabilities that power 8th Wall experiences, including:

Expand All @@ -26,15 +63,6 @@ The 8th Wall engine binary does not include:
- Niantic Spatial products such as VPS, Lightship Maps, or the Geospatial Browser
- Hand Tracking

## Usage

See https://8th.io/getting-started for an integration guide.

## Resources

Read more about this release and how to migrate your projects to the 8th Wall engine binary here:
## Acceptable Use and License

- [Self-hosted Project Migration Guide](https://www.8thwall.com/docs/migration/self-hosted/)
- [Distributed 8th Wall Engine Binary](https://8thwall.com/docs/migration/faq/#distributed-8th-wall-engine-binary)
- [Distributed Engine Binary License and Permitted Use](https://www.8thwall.com/docs/migration/faq/#distributed-engine-binary-license-and-permitted-use)
- [8th Wall Transition Update: Engine Distribution and Open Source Plans](https://www.8thwall.com/blog/post/202888018234/8th-wall-update-engine-distribution-and-open-source-plans)
The Distributed Engine Binary is available through a limited-use license which places restrictions on how it can be used. The full license text is [here](https://github.com/8thwall/engine/blob/main/LICENSE). Please see the [Permitted Use FAQ](https://8thwall.org/docs/migration/faq#distributed-engine-binary-license-and-permitted-use) and [Attribution Guidelines](https://8thwall.org/docs/open-source) for more information.
16 changes: 16 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Releasing

## Publishing a pre-release build

1. Update the package.json version to the expected version number
2. `./tools/prepare.sh`
2. `cd tmp`
3. `npm publish --tag alpha --access public`

## Publishing a production build

1. Update the package.json version to indicate the changes made since last release, following Semver. Make sure the version does not have a build suffix.
2. `./tools/prepare.sh`
2. `cd tmp`
3. `npm publish --tag latest --access public --dry-run`
4. If the preview looks good, run again without `--dry-run`
33 changes: 33 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "@8thwall/engine-binary",
"version": "1.0.0",
"description": "Framework for cross platform, browser based AR",
"author": "8th Wall Team",
"license": "See LICENSE",
"homepage": "https://8thwall.org",
"bugs": {
"url": "https://github.com/8thwall/8thwall/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/8thwall/engine.git"
},
"keywords": [
"8thwall",
"ar",
"xr",
"augmented reality",
"world tracking",
"image tracking",
"face tracking",
"slam",
"webxr"
],
"main": "index.js",
"files": [
"dist",
"index.js",
"LICENSE",
"README.md"
]
}
11 changes: 11 additions & 0 deletions tools/entry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const XR8Promise = new Promise((resolve) => {
if (window.XR8) {
resolve(window.XR8)
} else {
window.addEventListener('xrloaded', () => resolve(window.XR8), {once: true})
}
})

module.exports = {
XR8Promise,
}
9 changes: 9 additions & 0 deletions tools/prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -e

rm -rf tmp
mkdir -p tmp/dist
cp package.json LICENSE xr-standalone.zip README.md tmp
cp tools/entry.js tmp/index.js
cd tmp/dist
unzip ../xr-standalone.zip