From 827a9c4c812cff1c2acb426bb5a03925279c0b1a Mon Sep 17 00:00:00 2001 From: Christoph Bartschat Date: Thu, 2 Apr 2026 17:27:06 -0700 Subject: [PATCH 1/5] Add npm configuration --- .gitignore | 1 + README.md | 51 +++++++++++++++++++++++++++++++++++------------- RELEASING.md | 16 +++++++++++++++ package.json | 33 +++++++++++++++++++++++++++++++ tools/prepare.sh | 29 +++++++++++++++++++++++++++ 5 files changed, 116 insertions(+), 14 deletions(-) create mode 100644 RELEASING.md create mode 100644 package.json create mode 100755 tools/prepare.sh diff --git a/.gitignore b/.gitignore index a8114c5..a827f75 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ # Mac OS **/.DS_Store +tmp diff --git a/README.md b/README.md index 75ccb18..7a917c4 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,43 @@ > [!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 more detailed information. + +### Option 1: Script tag + +```html + +``` + +### Option 2: npm + +``` +npm install @8thwall/engine-binary +``` + +When installed through npm, you will copy the artifacts into your published project, for example in webpack: -This repo holds the distributed 8th Wall engine binary. +```js +// Example webpack configuration +new CopyWebpackPlugin({ + patterns: [ + { + from: 'node_modules/@8thwall/engine-binary/dist', + to: 'external/xr', + } + ] +}) +``` -The 8th Wall engine binary contains the core 8th Wall AR engine and is included with each project exported using Buildable Code Export. +```html + +``` + +## Overview + +The 8th Wall engine binary contains the core 8th Wall AR engine It is provided as closed source and governed by a limited-use distribution license. @@ -26,15 +58,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. diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..dc7d797 --- /dev/null +++ b/RELEASING.md @@ -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` diff --git a/package.json b/package.json new file mode 100644 index 0000000..651b6b9 --- /dev/null +++ b/package.json @@ -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" + ] +} diff --git a/tools/prepare.sh b/tools/prepare.sh new file mode 100755 index 0000000..13fc696 --- /dev/null +++ b/tools/prepare.sh @@ -0,0 +1,29 @@ +#!/bin/bash +set -e + +rm -rf tmp +mkdir tmp +cp package.json LICENSE xr-standalone.zip README.md tmp + +# Put the following file to disk +cat < tmp/index.js +const XR8 = () => new Promise((resolve) => { + if (window.XR8) { + resolve(window.XR8) + } else { + window.addEventListener('xrloaded', () => resolve(window.XR8), {once: true}) + } +}) + +const XR8 = await +module.exports = { + xr8Ready, +} +EOF + +mkdir tmp/dist + +cd tmp/dist + +unzip ../xr-standalone.zip + From eb55fb2e68e45c1e54d3f1f8b15c574b3e594319 Mon Sep 17 00:00:00 2001 From: Christoph Bartschat Date: Thu, 2 Apr 2026 17:47:01 -0700 Subject: [PATCH 2/5] Add npm configuration --- README.md | 21 +++++++++++++-------- package.json | 2 +- tools/entry.js | 11 +++++++++++ tools/prepare.sh | 22 ++-------------------- 4 files changed, 27 insertions(+), 29 deletions(-) create mode 100644 tools/entry.js diff --git a/README.md b/README.md index 7a917c4..2b374fc 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,12 @@ ## Usage -See https://8thwall.org/docs/engine/overview for more detailed information. +See https://8thwall.org/docs/engine/overview for a more detailed guide. ### Option 1: Script tag ```html - + ``` ### Option 2: npm @@ -19,10 +19,9 @@ See https://8thwall.org/docs/engine/overview for more detailed information. npm install @8thwall/engine-binary ``` -When installed through npm, you will copy the artifacts into your published project, for example in webpack: +You will need to copy the included artifacts into your dist folder, for example in webpack: ```js -// Example webpack configuration new CopyWebpackPlugin({ patterns: [ { @@ -33,15 +32,21 @@ new CopyWebpackPlugin({ }) ``` +You can then load the SDK by adding the following to index.html: + ```html - + ``` -## Overview +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' -The 8th Wall engine binary contains the core 8th Wall AR engine +XR8Promise.then((XR8) => XR8.XrController.configure({})) +``` -It is provided as closed source and governed by a limited-use distribution license. +## Overview The 8th Wall engine binary includes the core AR capabilities that power 8th Wall experiences, including: diff --git a/package.json b/package.json index 651b6b9..dee1b9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@8thwall/engine-binary", - "version": "1.0.0", + "version": "1.0.0-alpha.2", "description": "Framework for cross platform, browser based AR", "author": "8th Wall Team", "license": "See LICENSE", diff --git a/tools/entry.js b/tools/entry.js new file mode 100644 index 0000000..fb46d79 --- /dev/null +++ b/tools/entry.js @@ -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, +} diff --git a/tools/prepare.sh b/tools/prepare.sh index 13fc696..49d9271 100755 --- a/tools/prepare.sh +++ b/tools/prepare.sh @@ -2,28 +2,10 @@ set -e rm -rf tmp -mkdir tmp +mkdir -p tmp/dist cp package.json LICENSE xr-standalone.zip README.md tmp - -# Put the following file to disk -cat < tmp/index.js -const XR8 = () => new Promise((resolve) => { - if (window.XR8) { - resolve(window.XR8) - } else { - window.addEventListener('xrloaded', () => resolve(window.XR8), {once: true}) - } -}) - -const XR8 = await -module.exports = { - xr8Ready, -} -EOF - -mkdir tmp/dist +cp tools/entry.js tmp/index.js cd tmp/dist - unzip ../xr-standalone.zip From 36c2a581463813b29a8a343240831325f72101cf Mon Sep 17 00:00:00 2001 From: Christoph Bartschat Date: Thu, 2 Apr 2026 17:52:45 -0700 Subject: [PATCH 3/5] Add npm configuration --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dee1b9b..928ed7d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@8thwall/engine-binary", - "version": "1.0.0-alpha.2", + "version": "1.0.0-alpha.3", "description": "Framework for cross platform, browser based AR", "author": "8th Wall Team", "license": "See LICENSE", From d313ff7d381020f9ca94ee80ae6b92667867ca22 Mon Sep 17 00:00:00 2001 From: Christoph Bartschat Date: Thu, 2 Apr 2026 17:53:39 -0700 Subject: [PATCH 4/5] Add npm configuration --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 928ed7d..651b6b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@8thwall/engine-binary", - "version": "1.0.0-alpha.3", + "version": "1.0.0", "description": "Framework for cross platform, browser based AR", "author": "8th Wall Team", "license": "See LICENSE", From 55fed609b07e35c494e953c33d1b1831aec47c1a Mon Sep 17 00:00:00 2001 From: Christoph Bartschat Date: Thu, 2 Apr 2026 17:58:26 -0700 Subject: [PATCH 5/5] Add npm configuration --- tools/prepare.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/prepare.sh b/tools/prepare.sh index 49d9271..f0c898d 100755 --- a/tools/prepare.sh +++ b/tools/prepare.sh @@ -5,7 +5,5 @@ 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 -