glTFast
glTFast copied to clipboard
Improve GltfImport constructor API
Problem
Currently there's a single GltfImport constructor that takes 4 optional parameters.
Problems with that:
- Already quite overloaded, this will be even more so once more parameters get added.
- It's not possible to change the behavior of the
loggerparameter to create a defaultConsoleLoggerifnullis provided, as that takes away the possibility of not setting a logger.
Solutions
- Create explicit overloads with no optional paramters at all.
- Implement a Factory/Builder like pattern with chained setup methods.
Solution 1 might lead to many overloads, potentially conflicting with the original one.
Solution 2 is potentially cleaner.
Potentially part of #739