diff --git a/README.md b/README.md index 412c69a..18eff2d 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,7 @@ Using obj2gltf as a command-line tool: |`-n`, `--generateNormals`|Generate normals if they are missing.|No, default `false`| |`--optimizeForCesium`|Optimize the glTF for Cesium by using the sun as a default light source.|No, default `false`| |`--ao`|Apply ambient occlusion to the converted model.|No, default `false`| -|`--kmc`|Output glTF with the KHR_materials_common extension.|No, default `false`| -|`--bypassPipeline`|Bypass the gltf-pipeline for debugging purposes. This option overrides many of the options above and will save the glTF with the KHR_materials_common extension.|No, default `false`| +|`--bypassPipeline`|Bypass the gltf-pipeline for debugging purposes. This option overrides many of the options above.|No, default `false`| |`--checkTransparency`|Do a more exhaustive check for texture transparency by looking at the alpha channel of each pixel. By default textures are considered to be opaque.|No, default `false`| |`--secure`|Prevent the converter from reading image or mtl files outside of the input obj directory.|No, default `false`| diff --git a/bin/obj2gltf.js b/bin/obj2gltf.js index 8e77725..cf7204f 100644 --- a/bin/obj2gltf.js +++ b/bin/obj2gltf.js @@ -76,13 +76,8 @@ var argv = yargs type: 'boolean', default: defaults.ao }, - kmc : { - describe: 'Output glTF with the KHR_materials_common extension.', - type: 'boolean', - default: defaults.kmc - }, bypassPipeline : { - describe: 'Bypass the gltf-pipeline for debugging purposes. This option overrides many of the options above and will save the glTF with the KHR_materials_common extension.', + describe: 'Bypass the gltf-pipeline for debugging purposes. This option overrides many of the options above.', type: 'boolean', default: defaults.bypassPipeline }, @@ -116,7 +111,6 @@ var options = { optimizeForCesium : argv.optimizeForCesium, generateNormals : argv.generateNormals, ao : argv.ao, - kmc : argv.kmc, bypassPipeline : argv.bypassPipeline, checkTransparency : argv.checkTransparency, secure : argv.secure diff --git a/lib/obj2gltf.js b/lib/obj2gltf.js index eeffc24..c362989 100644 --- a/lib/obj2gltf.js +++ b/lib/obj2gltf.js @@ -31,9 +31,8 @@ module.exports = obj2gltf; * @param {Boolean} [options.optimizeForCesium=false] Optimize the glTF for Cesium by using the sun as a default light source. * @param {Boolean} [options.generateNormals=false] Generate normals if they are missing. * @param {Boolean} [options.ao=false] Apply ambient occlusion to the converted model. - * @param {Boolean} [options.kmc=false] Output glTF with the KHR_materials_common extension. * @param {Boolean} [options.textureCompressionOptions] Options sent to the compressTextures stage of gltf-pipeline. - * @param {Boolean} [options.bypassPipeline=false] Bypass the gltf-pipeline for debugging purposes. This option overrides many of the options above and will save the glTF with the KHR_materials_common extension. + * @param {Boolean} [options.bypassPipeline=false] Bypass the gltf-pipeline for debugging purposes. This option overrides many of the options above. * @param {Boolean} [options.checkTransparency=false] Do a more exhaustive check for texture transparency by looking at the alpha channel of each pixel. * @param {Boolean} [options.secure=false] Prevent the converter from reading image or mtl files outside of the input obj directory. * @param {Logger} [options.logger] A callback function for handling logged messages. Defaults to console.log. @@ -50,7 +49,6 @@ function obj2gltf(objPath, gltfPath, options) { var optimizeForCesium = defaultValue(options.optimizeForCesium, defaults.optimizeForCesium); var generateNormals = defaultValue(options.generateNormals, defaults.generateNormals); var ao = defaultValue(options.ao, defaults.ao); - var kmc = defaultValue(options.kmc, defaults.kmc); var textureCompressionOptions = options.textureCompressionOptions; var bypassPipeline = defaultValue(options.bypassPipeline, defaults.bypassPipeline); var checkTransparency = defaultValue(options.checkTransparency, defaults.checkTransparency); @@ -86,7 +84,6 @@ function obj2gltf(objPath, gltfPath, options) { gltfPath = path.join(path.dirname(gltfPath), modelName + extension); var aoOptions = ao ? {} : undefined; - var kmcOptions = kmc ? {} : undefined; var pipelineOptions = { createDirectory : false, @@ -101,7 +98,6 @@ function obj2gltf(objPath, gltfPath, options) { optimizeForCesium : optimizeForCesium, smoothNormals : generateNormals, aoOptions : aoOptions, - kmcOptions : kmcOptions, textureCompressionOptions : textureCompressionOptions }; @@ -187,12 +183,6 @@ obj2gltf.defaults = { * @default false */ ao: false, - /** - * Gets or sets whether the model will be saved with the KHR_materials_common extension. - * @type Boolean - * @default false - */ - kmc: false, /** * Gets or sets whether the converter will bypass the gltf-pipeline for debugging purposes. * @type Boolean diff --git a/specs/lib/obj2gltfSpec.js b/specs/lib/obj2gltfSpec.js index b152f9f..e85d1b7 100644 --- a/specs/lib/obj2gltfSpec.js +++ b/specs/lib/obj2gltfSpec.js @@ -39,7 +39,6 @@ describe('obj2gltf', function() { quantize : false, compressTextureCoordinates : false, aoOptions : undefined, - kmcOptions : undefined, smoothNormals : false, optimizeForCesium : false, textureCompressionOptions : undefined, @@ -64,7 +63,6 @@ describe('obj2gltf', function() { optimizeForCesium : true, generateNormals : true, ao : true, - kmc : true, textureCompressionOptions : textureCompressionOptions, checkTransparency : true, secure : true, @@ -85,7 +83,6 @@ describe('obj2gltf', function() { quantize : true, compressTextureCoordinates : true, aoOptions : {}, - kmcOptions : {}, smoothNormals : true, optimizeForCesium : true, textureCompressionOptions : textureCompressionOptions,