What's the main difference between this two classes, ObjLoader and ObjLoader2?
In which case we should use one or another?
Why there are two classes? Is one more stable or efficient than the other?
It's not very clear for me when I read the documentation.
I have sometimes wondered this too..
So I decided this time to jump down the rabbit hole (writing this post as I go down the hole).
This is what I have found.
So, It seems to me that OBJLoader2 is meant to be a more performant loader for OBJ files. Having a look at The main commiter's github page reveals a repository specifically for the OBJLoader2 class.
There is documentation on the OBJLoader2 class in the authors github repository here
Found some interesting comparisons by the creator here:
╔════════════════════════════════════╦═══════════╦════════════╗
║ Feature ║ OBJLoader ║ OBJLoader2 ║
╠════════════════════════════════════╬═══════════╬════════════╣
║Handle all face types ║ x ║ x ║
║Support for points and lines ║ x ║ x ║
║Negative face indices ║ x ║ x ║
║Support Ngons ║ x ║ x ║
║Flat/Smooth Multi-Materials ║ ║ x ║
║Indexed Rendering ║ ║ x ║
║Handle Face-Type change inside group║ ║ x ║
║Deactivate console logging ║ ║ x ║
║Load MTLs via MTLLoader if desired ║ ║ x ║
╚════════════════════════════════════╩═══════════╩════════════╝
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With