mirror of https://github.com/CesiumGS/obj2gltf.git
Cleanup
This commit is contained in:
parent
b5da7be229
commit
7e9a7a87b8
|
@ -122,7 +122,7 @@ var argv = yargs
|
||||||
describe : 'The glTF will be saved with the KHR_materials_unlit extension.',
|
describe : 'The glTF will be saved with the KHR_materials_unlit extension.',
|
||||||
type : 'boolean',
|
type : 'boolean',
|
||||||
default : defaults.unlit
|
default : defaults.unlit
|
||||||
},
|
}
|
||||||
}).parse(args);
|
}).parse(args);
|
||||||
|
|
||||||
if (argv.metallicRoughness + argv.specularGlossiness > 1) {
|
if (argv.metallicRoughness + argv.specularGlossiness > 1) {
|
||||||
|
|
|
@ -25,7 +25,6 @@ module.exports = loadMtl;
|
||||||
*
|
*
|
||||||
* @param {String} mtlPath Path to the .mtl file.
|
* @param {String} mtlPath Path to the .mtl file.
|
||||||
* @param {Object} options The options object passed along from lib/obj2gltf.js
|
* @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.
|
* @returns {Promise} A promise resolving to an array of glTF materials with Texture objects stored in the texture slots.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
|
|
|
@ -184,17 +184,4 @@ describe('obj2gltf', function() {
|
||||||
obj2gltf(texturedObjPath, options);
|
obj2gltf(texturedObjPath, options);
|
||||||
}).toThrowDeveloperError();
|
}).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();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue