This commit is contained in:
Omar Shehata 2018-12-04 14:33:10 -05:00
parent b5da7be229
commit 7e9a7a87b8
3 changed files with 2 additions and 16 deletions

View File

@ -122,7 +122,7 @@ var argv = yargs
describe : 'The glTF will be saved with the KHR_materials_unlit extension.',
type : 'boolean',
default : defaults.unlit
},
}
}).parse(args);
if (argv.metallicRoughness + argv.specularGlossiness > 1) {

View File

@ -25,7 +25,6 @@ module.exports = loadMtl;
*
* @param {String} mtlPath Path to the .mtl file.
* @param {Object} options The options object passed along from lib/obj2gltf.js
* @param {Boolean} options.hasNormals Whether the model has normals.
* @returns {Promise} A promise resolving to an array of glTF materials with Texture objects stored in the texture slots.
*
* @private

View File

@ -184,17 +184,4 @@ describe('obj2gltf', function() {
obj2gltf(texturedObjPath, options);
}).toThrowDeveloperError();
});
it('adds KHR_materials_unlit to materials if unlit is set', function(done) {
var options = {
unlit : true
};
expect(obj2gltf(texturedObjPath, options)
.then(function(glb) {
for(var i = 0;i < glb.materials.length; i++) {
var material = glb.materials[i];
expect(material.extensions.KHR_materials_unlit).toBeDefined();
}
}), done).toResolve();
});
});