This commit is contained in:
Sean Lilley 2017-08-11 12:01:23 -04:00
parent 72baced2ed
commit b2e4fb6deb

View File

@ -17,6 +17,11 @@ module.exports = loadMtl;
/** /**
* Parse a .mtl file and load textures referenced within. Returns an array of glTF materials with Texture * Parse a .mtl file and load textures referenced within. Returns an array of glTF materials with Texture
* objects stored in the texture slots. * objects stored in the texture slots.
* <p>
* Packed PBR textures (like metallicRoughnessOcclusion and specularGlossiness) require all input textures to be decoded before hand.
* If a texture is of an unsupported format like .gif or .tga it can't be packed and a metallicRoughness texture will not be created.
* Similarly if a texture cannot be found it will be ignored and a default value will be used instead.
* </p>
* *
* @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