Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve GltfImport constructor API #710

Open
atteneder opened this issue Aug 9, 2024 · 1 comment
Open

Improve GltfImport constructor API #710

atteneder opened this issue Aug 9, 2024 · 1 comment
Labels
enhancement New feature or request import Import of glTF files
Milestone

Comments

@atteneder
Copy link
Owner

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
Copy link
Owner Author

Potentially part of #739

@atteneder atteneder added the import Import of glTF files label Dec 11, 2024
@atteneder atteneder moved this from To do to Planned in glTFast development Dec 18, 2024
@atteneder atteneder added this to the 7.0 milestone Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request import Import of glTF files
Projects
Status: Planned
Development

No branches or pull requests

1 participant