Clarify the running and building process.
This commit is contained in:
Родитель
b3f67a5dbe
Коммит
1aa298944b
12
README.md
12
README.md
|
@ -21,12 +21,16 @@ Clone this repo and then change directories into webxr-polyfill/
|
|||
npm install # downloads webpack and an http server
|
||||
npm start # builds the polyfill in dist/webxr-polyfill.js and start the http server in the current directory
|
||||
|
||||
## Builds
|
||||
|
||||
npm run build # builds the polyfill in dist/webxr-polyfill.js
|
||||
|
||||
Using one of the supported browsers listed below, go to http://YOUR_HOST_NAME:8080/
|
||||
|
||||
## Portable builds
|
||||
|
||||
To build the WebXR polyfill into a single file that you can use in a different codebase:
|
||||
|
||||
npm run build
|
||||
|
||||
The resulting file will be in dist/webxr-polyfill.js
|
||||
|
||||
## Writing your own XR apps
|
||||
|
||||
The WebXR polyfill is not dependent on any external libraries, but examples/common.js has a handy base class, XRExampleBase, that wraps all of the boilerplate of starting a WebXR session and rendering into a WebGL layer using Three.js.
|
||||
|
|
Загрузка…
Ссылка в новой задаче