Skip to content

Instantly share code, notes, and snippets.

@realsby
Created May 29, 2019 23:49
Show Gist options
  • Save realsby/ea5d50dee06e077af0a359a7b11b00e5 to your computer and use it in GitHub Desktop.
Save realsby/ea5d50dee06e077af0a359a7b11b00e5 to your computer and use it in GitHub Desktop.
optimize gltf files
npm install -g gltf-pipeline
https://github.com/AnalyticalGraphicsInc/gltf-pipeline
# re-pack the model into a GLB, adding Draco compression
gltf-pipeline -i orginal.gltf -o optimized.glb --binary --draco
gltf-pipeline -i optimized.glb -o tmp/tmp.gltf --separate --json
# optimize the textures in tmp/
cd tmp
gltf-pipeline -i tmp.gltf -o model.glb
gltf-pipeline -i tmp/model.glb -o orginal.gltf --draco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment