Remove occurences of khr_materials_common for code (not tests yet)

This commit is contained in:
Sean Lilley 2017-04-20 10:23:00 -04:00
parent d0e8b90566
commit d6d0d392c6
4 changed files with 3 additions and 23 deletions

View File

@ -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`|

View File

@ -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

View File

@ -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

View File

@ -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,