Examples of using the three.js ObjLoader also use the MTLLoader which is given a separate path to the mtl file.
https://github.com/mrdoob/three.js/blob/master/examples/
I think the primary issue is that the objloader as it's currently written needs to have materials in hand to know what materials to apply when the obj file is loaded.
Applying an mtl file to an existing mesh is non-trivial.
The other caveat is that I can't seem to find anywhere where objloader supports more than one mtl file.
Conclusion is that objloader as is is not ready or supported for what you would like to do. But since it's open source and accepting pull reqs, you could potentially write an objloader of your own. If you google you will find there was an attempt called objmtlloader.js. But apparently it was problematic and removed.
If you're ok with one mtllib per obj, and you don't want to write code however, you could use the following pattern:
var loader = new THREE.OBJLoader( manager );
var objpath = 'path/to/your/object.obj';
loader.load( objpath, function ( object ) {
loadMats(object, objpath);
},
function(eve){console.log("obj progress", eve)},
function(xhr){console.log("obj error", e)}
);
var loadMats = function(obj, objpath){
imgloader = new THREE.MTLLoader(manager);
imgloader.setPath(objpath.substring(0, objpath.lastIndexOf("/")+1));
imgloader.load( obj.materialLibraries[0],
function(materials){
var objLoader = new THREE.OBJLoader(manager);
objLoader.setMaterials(materials);
objLoader.load(objpath, function(object) {
scene.add(object);
},
function(eve){console.log("obj progress", eve)},
function(xhr){console.log("obj error", e)}
);
},
function(eve){console.log("mtl progress", eve)},
function(xhr){console.log("mtl error", e)}
);
}
This pattern loads the obj, allows it to discover the material file names, and then loads them. This pattern is problematic in that it must load the obj twice, but we can assume the second load it's cached in browser ram and should take just a few milliseconds.
This is a crap answer, and maybe someone can correct me, but since no one has answered, I am going to say this is how I would handle grabbing mtl files from the mtllib lines, and work on better support going forward.
All that said, knowing the mtl spec, it seems rather silly that an obj file would use multiple MTL files unless the MTL were shared among many obj files.