Added possibility to load MTL files via File object #12591
Closed
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.
Use case:
The user has the possibility to load a obj + mtl file via an input file tag (multiple files allowed) into a viewer.
So before I use the MTLLoader I seperate the obj file from the mtl and map (.png, .jpg) files.
Afterwards I wanna load the mtl file but I only have the File object at hand no URL.
So I first load the map files as data urls and then load the mtl file and create the textures from the map files if needed.
Any suggestions? Feel free to criticize ;)
PS: If this change is approved I also will open another PR for the documentation of the function "loadByFiles".