-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from ux3d/feature/npm_package
Feature/npm package
- Loading branch information
Showing
41 changed files
with
236 additions
and
383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,3 @@ debug.log | |
/3751792e8d692473.wasm | ||
/1053c4edd3398f26.wasm | ||
npm_package/*.map | ||
npm_package/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[submodule "assets/models"] | ||
path = app_web/assets/models | ||
path = assets/models | ||
url = https://github.com/KhronosGroup/glTF-Sample-Models.git | ||
[submodule "assets/environments"] | ||
path = app_web/assets/environments | ||
path = assets/environments | ||
url = https://github.com/KhronosGroup/glTF-Sample-Environments.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,23 @@ | ||
.vscode | ||
assets | ||
*.html | ||
# top level directories | ||
.git/ | ||
.vscode/ | ||
app_headless/ | ||
app_web/ | ||
assets/ | ||
source/ | ||
documentation/ | ||
.project | ||
.settings | ||
.eslintignore | ||
.gitattributes | ||
.gitmodules | ||
.eslintrc.json | ||
|
||
# files types to ignore | ||
rollup.config.js | ||
package-lock.json | ||
.DS_Store | ||
npm-debug.log | ||
yarn.lock | ||
*.map | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
glTF Sample Viewer Web App | ||
============================== | ||
|
||
[](http://gltf.ux3d.io/) | ||
|
||
This is the official [Khronos](https://www.khronos.org/) [glTF 2.0](https://www.khronos.org/gltf/) Sample Viewer using [WebGL](https://www.khronos.org/webgl/): [glTF 2.0 Sample Viewer](http://gltf.ux3d.io/) | ||
|
||
|
||
Viewer | ||
====== | ||
|
||
Link to the live [glTF 2.0 Sample Viewer](http://gltf.ux3d.io/). | ||
|
||
Usage | ||
----- | ||
|
||
### Controls | ||
|
||
`click + drag` : Rotate model | ||
|
||
`scroll` : Zoom camera | ||
|
||
`GUI` : Use to change models and settings | ||
|
||
### Change glTF model | ||
|
||
* Choose one of the glTF models in the selection list | ||
* Drag and drop glTF files into viewer | ||
|
||
### Change the environment map | ||
* Drag and drop a .hdr panorama file | ||
|
||
Setup | ||
----- | ||
|
||
For local usage and debugging, please follow these instructions: | ||
|
||
0. Make sure [Git LFS](https://git-lfs.github.com) is installed. | ||
|
||
1. Checkout the [`master`](../../tree/master) branch | ||
|
||
2. Pull the submodules for the required [glTF sample models](https://github.com/KhronosGroup/glTF-Sample-Models) and [environments](https://github.com/KhronosGroup/glTF-Sample-Environments) `git submodule update --init --recursive` | ||
|
||
3. Build the web app | ||
- `cd app_web` | ||
- run `npm install` | ||
- start a demo in the browser with `npm run dev`, and open http://localhost:8000. | ||
|
||
When making changes, the project is automatically rebuilt and the `app_web/dist/` directory is populated with the web app. This directory contains all files necessary for deployment to a webserver. | ||
|
||
Debugging | ||
--------- | ||
|
||
* Requirements | ||
* [Visual Studio Code](https://code.visualstudio.com/) or [vscodium](https://github.com/VSCodium/vscodium) | ||
* [Chrome](https://www.google.com/chrome/) or [Firefox](https://www.mozilla.org/en-US/firefox/new/) | ||
* Install the [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) or [Debugger for Firefox](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-firefox-debug) extension for Visual Studio Code | ||
* Open the project directory in Visual Studio Code and select `Debug->Add Configuration->Chrome` or `Debug->Add Configuration->Firefox` so the `.vscode/launch.json` file is created. | ||
* Append `/app_web/dist` to `${workspaceFolder}` in the `launch.json` file | ||
* `Debug->Start Debugging` should now launch a Chrome or Firefox window with the sample viewer and VS Code breakpoints should be hit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.