From a1fe8005d1d89bc8cc979943088c3e0c0433dfa6 Mon Sep 17 00:00:00 2001 From: Shehzan Mohammed Date: Mon, 20 Feb 2017 10:56:34 -0500 Subject: [PATCH] Fixes to optimize option --- README.md | 2 +- bin/obj2gltf.js | 4 ++-- lib/convert.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 32801d8..b94d9d5 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,8 @@ Using obj2gltf as a command-line tool: |`-o`|Directory or filename for the exported glTF file.|No| |`-b`|Output binary glTF.|No, default `false`| |`-s`|Writes out separate geometry/animation data files, shader files, and textures instead of embedding them in the glTF file.|No, default `false`| -|`-p`|Use the optimization stages in the glTF pipeline|No, default `false`| |`-t`|Write out separate textures only.|No, default `false`| +|`-z`|Use the optimization stages in the glTF pipeline|No, default `false`| |`--ao`|Apply ambient occlusion to the converted model.|No, default `false`| |`-h`|Display help|No| diff --git a/bin/obj2gltf.js b/bin/obj2gltf.js index c87bd19..590a907 100644 --- a/bin/obj2gltf.js +++ b/bin/obj2gltf.js @@ -50,9 +50,9 @@ var argv = yargs type: 'boolean' }, 'optimize': { - alias: 'p', + alias: 'z', default: false, - describe: 'Turn the optimization pipeline stages on/off to preserve the original glTF hierarchy.', + describe: 'Use the optimization stages in the glTF pipeline.', type: 'boolean' }, 'cesium': { diff --git a/lib/convert.js b/lib/convert.js index 7c540a7..eb1b062 100644 --- a/lib/convert.js +++ b/lib/convert.js @@ -54,7 +54,7 @@ function convert(objPath, gltfPath, options) { createDirectory : false, basePath : basePath, textureCompressionOptions : textureCompressionOptions, - preserve : optimize + preserve : !optimize }; return loadObj(objPath)