Add a Draco glTF guide.

This commit is contained in:
Frank Galligan 2018-02-07 20:58:54 -08:00 committed by Frank Galligan
parent eae82ab804
commit 4cfdf0a92e
2 changed files with 46 additions and 0 deletions

43
docs/guides/GLTF.md Normal file
View File

@ -0,0 +1,43 @@
# glTF
Using [glTF](https://www.khronos.org/gltf/) with Draco.
## Encode Draco glTF Using gltf-pipeline
### Prerequisites
Install [node.js](https://nodejs.org) 6.0 or greater. See the node.js [downloads](https://nodejs.org/en/download/) for details.
### Installing
Clone this [forked repository](https://github.com/FrankGalligan/gltf-pipeline) of gltf-pipeline using this command line:
```
git clone git@github.com:FrankGalligan/gltf-pipeline.git
cd gltf-pipeline
```
_**Note** that we **strongly** recommend [using SSH] with GitHub, not HTTPS._
Check out the Draco compression extension branch.
```
git checkout -b draco_compression_extension origin/draco_compression_extension
```
Install all the dependencies.
```
npm install
```
### Encode Draco glTF
Encode the Draco glTF using default settings.
```
node ./bin/gltf-pipeline.js -i <in>.gltf -d -s -o <out>.gltf
```
The encoded glTF data will be written to the `output` folder.
## Render Draco glTF Using three-gltf-viewer

View File

@ -10,3 +10,6 @@ _**Contents**_
* [Browser](BROWSER.md)
* [JavaScript Decode](BROWSER.md#JavaScript-Decode)
* [Three.js Render](../../javascript/example/README.md)
* [glTF](GLTF.md)
* [Encode Draco glTF Using gltf-pipeline](GLTF.md#Encode-Draco-glTF-Using-gltf-pipeline)
* [Render Draco glTF Using three-gltf-viewer](GLTF.md#Render-Draco-glTF-Using-three-gltf-viewer)