glTFast icon indicating copy to clipboard operation
glTFast copied to clipboard

Improve GltfImport constructor API

Open atteneder opened this issue 1 year ago • 1 comments

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 logger parameter to create a default ConsoleLogger if null is provided, as that takes away the possibility of not setting a logger.

Solutions

  1. Create explicit overloads with no optional paramters at all.
  2. 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.

atteneder avatar Aug 09 '24 14:08 atteneder

Potentially part of #739

atteneder avatar Dec 11 '24 15:12 atteneder