Reputation: 1158
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.
Upvotes: 11
Views: 4374
Reputation: 15239
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 ║
╚════════════════════════════════════╩═══════════╩════════════╝
Upvotes: 9
Reputation: 1768
For now, The main difference is that the OBJLoader2 supports web worker for asynchronous loading. And it offer a choice for user between syn and asyn.
Upvotes: 5
Reputation: 10155
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
Upvotes: 11