OBJLoader: Better handle "usemap" identifier. #18000
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some OBJ exporters still write
usemapinOBJfiles. However,OBJLoaderis not able to parse this line so far. The problem was once discussed here:https://www.reddit.com/r/threejs/comments/6hbbnt/trouble_with_mtl_obj_import/
Another user encounters now the same issue with the same asset package:
https://stackoverflow.com/questions/59010593/cannot-display-object-in-threejs-getting-error-three-objloader-unexpected-lin
This little patch ensures
OBJLoaderdoes not produce a runtime error but just ignoresusemap. The assets are loaded correctly now since they define their textures in MTL files, too. So it looks like a redundant definition of the used exporter.