From 4cfdf0a92ec7e74b9298844045b348aeafc7e19a Mon Sep 17 00:00:00 2001 From: Frank Galligan Date: Wed, 7 Feb 2018 20:58:54 -0800 Subject: [PATCH] Add a Draco glTF guide. --- docs/guides/GLTF.md | 43 +++++++++++++++++++++++++++++++++++++++++++ docs/guides/README.md | 3 +++ 2 files changed, 46 insertions(+) create mode 100644 docs/guides/GLTF.md diff --git a/docs/guides/GLTF.md b/docs/guides/GLTF.md new file mode 100644 index 0000000..cde6aae --- /dev/null +++ b/docs/guides/GLTF.md @@ -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 .gltf -d -s -o .gltf +``` + +The encoded glTF data will be written to the `output` folder. + + +## Render Draco glTF Using three-gltf-viewer + + diff --git a/docs/guides/README.md b/docs/guides/README.md index dc5e7ec..6cd26e5 100644 --- a/docs/guides/README.md +++ b/docs/guides/README.md @@ -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)