I was writing a custom IGLTFLoaderExtension that loads alternative index buffer for ngon wireframes from custom added gltf metadata.
However I had to call _loadIndicesAccessorAsync with a hacky any conversion: (this.loader as any)._loadIndicesAccessorAsync(...) to access the private method in order to load the index buffer accessor without duplicating half of GLTFLoader itself. But by doing so I lost type checking in case the internal method arguments are changed in future update.
Most other “internal” methods like that have already been exposed as public as needed by other extensions (eg. _loadFloatAccessorAsync, _createTextureAsync, _loadMeshPrimitiveAsync, _loadAnimationChannelAsync etc. are public), but seems like there are still some left private because no internal gltf extension has yet needed those.
Therefore would be great if this method was also changed to public to make it easier to write custom extensions even if they want to load additional index buffers. Maybe even change _loadVertexBufferViewAsync and _loadVertexAccessorAsync to public as well, in case someone needs those at some point in the future.
Any suggestions of the scope of such change? Just _loadIndicesAccessorAsync() or also other similar higher level methods that are still private?
I was thinking a person familiar with the code would be able to quickly go through the GLTFLoader methods and change the remaining sensible ones public as well because many of them would definitely be useful for people writing more complex custom extensions. Underscore + @internal flag should be enough to make it clear that they aren’t guaranteed to remain unchanged between releases, so allowing people who understand that utilize them would make sense to me.
But if you think that only changing _loadIndicesAccessorAsync() makes most sense I can go ahead an make a PR for it?