frenchtoast747 / webgl-obj-loader

A simple OBJ model loader to help facilitate the learning of WebGL.
http://frenchtoast747.github.io/webgl-obj-loader/
MIT License
281 stars 59 forks source link

Create MTL Option Parser Class #33

Closed frenchtoast747 closed 6 years ago

frenchtoast747 commented 6 years ago

The image/texture/reflection map files have options that can be passed along with the filename. A new option parser class should be created to be able to handle these options.

Note, according to the Wikipedia page, the format specifies that the filename always comes after the options, however, there is at least one vendor that allows for the filename to come before. This should be considered.

The most difficult part of parsing the options (and why we most likely have to write a custom parser) is due to the -o, -s, and -t options allowing 0, 1, or 2 args.