Skip to content

Commit 0dc4b50

Browse files
authored
updates for r24
1 parent f94dcb3 commit 0dc4b50

18 files changed

+352
-364
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
8th Wall Web: WebAR for mobile devices!
44

5-
Built entirely using standards-compliant JavaScript and WebGL, 8th Wall Web is a complete implementation of 8th Wall’s Simultaneous Localization and Mapping (SLAM) engine, hyper-optimized for real-time AR on mobile browsers. Features include World Tracking, Image Targets, Face Effects, Lightship Visual Positioning System (VPS), and more.
5+
Built entirely using standards-compliant JavaScript and WebGL, 8th Wall Web is a complete implementation of 8th Wall’s Simultaneous Localization and Mapping (SLAM) engine, hyper-optimized for real-time AR on mobile browsers. Features include World Tracking, Image Targets, Face Effects, Lightship Visual Positioning System (VPS), Sky Effects, Hand Tracking, and more.
66

77
- - -
88

99
# Resources
1010

11-
* [Getting Started Guide](https://github.com/8thwall/web/tree/master/gettingstarted)
11+
* [Getting Started Guide](https://www.8thwall.com/docs/guides/advanced-topics/local-hosting#getting-started)
12+
* [Serving projects over HTTPS](https://www.8thwall.com/docs/guides/advanced-topics/local-hosting#serve-projects-over-https)
1213
* [Documentation](https://www.8thwall.com/docs/web/)
1314
* [8th Wall Website](https://www.8thwall.com)
14-
* [Serving projects locally](https://github.com/8thwall/web/tree/master/serve)
1515

1616
# Examples
1717

examples/aframe/reactapp/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ If you're developing on Windows, modify the `start` script in package.json to ex
2121
set HTTPS=true&&react-app-rewired start
2222
```
2323

24-
In order to use the [serve script](https://github.com/8thwall/web/tree/master/serve) for testing the production build, you may need to run `export NODE_OPTIONS=--openssl-legacy-provider`, and execute the script on the build folder.
25-
2624
## Learn More
2725

2826
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

gettingstarted/README.md

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,54 @@
11
# Getting Started with 8th Wall
22

3-
## Download and run sample projects
3+
Use your own development workflow with 8th Wall self-hosting.
44

5-
To get started with 8th Wall web development, you will need to:
6-
* Create a Pro 8th Wall account at https://www.8thwall.com.
7-
* Create a new self-hosted project and [copy your App Key](https://www.8thwall.com/docs/web/#app-key) from the project settings page.
8-
* Download the source code from this repo, and replace the app key in `index.html` with your app key.
9-
* Serve the source code on your local network over https using the [serve script](https://github.com/8thwall/web/tree/master/serve).
10-
* Authorize access to your app key on your phone by [authorizing the device](https://www.8thwall.com/docs/web/#device-authorization) or [whitelisting the domain](https://www.8thwall.com/docs/web/#connected-domains) (localhost / IP address).
11-
* Connect to your sever from your phone, accept certificate warnings and camera permissions.
5+
## Clone and run sample projects
126

13-
## What you should see
7+
Follow the getting started guide by cloning self-hosted sample projects from this repository.
8+
9+
To develop locally you need Node.js and npm installed. If you don't already have Node.js and npm installed, [get it here](https://www.npmjs.com/get-npm).
10+
11+
1. Download the source code from this repository and `cd` into an example of your choice (aframe is recommended for beginners).
12+
2. Replace the app key in `index.html` with your [app key from the project settings page](https://www.8thwall.com/docs/guides/projects/project-settings/#app-key) in the 8th Wall console.
13+
3. Authorize access to your app key on your device by [authorizing the device](https://www.8thwall.com/docs/web/#device-authorization) or [whitelisting the domain](https://www.8thwall.com/docs/web/#connected-domains) (localhost / IP address).
14+
4. Serve a project directory on your local network over HTTPS with [http-server](https://github.com/http-party/http-server#readme). See [Serve projects over HTTPS](https://www.8thwall.com/docs/guides/advanced-topics/local-hosting/#serve-projects-over-https).
15+
5. Connect to your sever from your device, accept certificate warnings and camera permissions. See [View Project on iOS](https://www.8thwall.com/docs/guides/advanced-topics/local-hosting/#view-project-on-ios) or [View Project on Android](https://www.8thwall.com/docs/guides/advanced-topics/local-hosting/#view-project-on-android).
16+
17+
## Serve projects over HTTPS
18+
19+
Browsers require HTTPS certificates to access the camera. Use [http-server](https://github.com/http-party/http-server#readme) to serve project directories with HTTPS.
20+
21+
First, you need to make sure that [openssl](https://github.com/openssl/openssl) is installed, and you have key.pem and cert.pem files. You can generate them using this command:
22+
23+
```
24+
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
25+
```
26+
27+
You will be prompted with a few questions after entering the command. Use 127.0.0.1 as value for Common name if you want to be able to install the certificate in your OS's root certificate store or browser so that it is trusted.
28+
29+
This generates a cert-key pair and it will be valid for 3650 days (about 10 years).
30+
31+
Then you can run `http-server` with `-S` for enabling SSL and `-C` for your certificate file:
32+
33+
```
34+
npx http-server [project-path] -S -C cert.pem
35+
```
36+
37+
Example:
38+
39+
```
40+
npx http-server gettingstarted/aframe/ -S -C cert.pem
41+
```
42+
43+
**NOTE**: The first IP address listed is **127.0.0.1:8080** (which is the loopback
44+
device aka "localhost") and your mobile phone won't be able to connect to that IP address directly.
45+
Please use one of the other IP addresses.
46+
47+
**WINDOWS USERS**: Run the http-server command using a standard Command Prompt window (cmd.exe). The script may generate errors if run from PowerShell.
48+
49+
Learn more in the [http-server documentation](https://github.com/http-party/http-server#tlsssl).
50+
51+
## What you should see
1452

1553
After following the steps above, you should have fully functional versions of:
1654

serve/README.md

Lines changed: 0 additions & 60 deletions
This file was deleted.

serve/bin/serve

Lines changed: 0 additions & 50 deletions
This file was deleted.

serve/bin/serve.bat

Lines changed: 0 additions & 46 deletions
This file was deleted.

serve/package.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

serve/src/empty.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)