-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
GLTFLoader: Log error when loader extension doesn't have a name. #26559
GLTFLoader: Log error when loader extension doesn't have a name. #26559
Conversation
Do you mind giving more context?
|
Hi, yes sure
|
This is OK with me, though I would prefer to just log the error message and not to print the implementation of the plugin. |
The idea with logging the implementation was to get an idea which plugin was misbehaving would you prefer to log e.g. the constructor name if that exists (or something else) ? |
I'm hoping it is enough to basically say, a plugin was invalid because it has no name, and let the developer set a breakpoint. Devtools will point you to the source line of the log. Slightly subjective opinion — but I prefer that libraries log strings and not objects, since they may run in remote environments with logging capabilities that differ from the browser's, and I do know of places GLTFLoader is used like that. |
Some random thoughts from my end
|
I will remove logging the object and keep it simple, no problem. About the validation: I would prefer to avoid situations where two extension become incompatible (because both miss a name) which could have easily been prevented by warning the authors about it. But in our case a check for non unique would also have helped of course |
Description
This logs an error when a new GltfLoader plugin is registered that does not have a name
This contribution is funded by 🌵 Needle