GLTFLoader: option to keep or prefer original texture or image name as name of loaded texture

We need to consider that a glTF texture is not a Babylon texture.

Here is how the mapping goes:

  • glTF textureInfo → Babylon.js Texture
  • glTF texture → Babylon.js InternalTexture
  • glTF image → no equivalent

glTF textureInfo is not a top-level glTF object with a name. Multiple glTF textureInfo can point to the same glTF texture. Multiple glTF texture can point to the same glTF image.

Maybe storing a name on the Babylon.js InternalTexture would work?

1 Like