OBJLoader2 .loadMtl docs state content is text or array buffer, however array buffer is not supported. _loadMtl function in OBJLoader2 calls the following:
processMaterials(Validator.isValid(resource.content) ? mtlLoader.parse(resource.content) : null);
mtlLoader.parse doesn't take an array buffer, just text.
r92
/ping @kaisalmen
@pizza-r0b thanks for spotting this.
It seems to a good idea to use THREE.LoaderUtils.decodeText inside OBJLoader2.loadMtl to transform an ArrayBuffer to a String and make this work instead of adjusting the docs.
@Mugen87 I will take care. I have some other smaller bug fixes available for OBJLoader2 and will open a combined PR later.
@kaisalmen Thanks I wasn't aware of THREE.LoaderUtils.decodeText I was using TextDecoder
PR is now available!