mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-08-15 23:05:58 +08:00
Add a Draco glTF guide.
This commit is contained in:
parent
eae82ab804
commit
4cfdf0a92e
43
docs/guides/GLTF.md
Normal file
43
docs/guides/GLTF.md
Normal 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
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user