Sfoglia il codice sorgente

GLTFLoader: Texture URI as name. (#25664)

sunag 2 anni fa
parent
commit
b9002a805d
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      examples/jsm/loaders/GLTFLoader.js

+ 1 - 1
examples/jsm/loaders/GLTFLoader.js

@@ -2988,7 +2988,7 @@ class GLTFParser {
 
 			texture.flipY = false;
 
-			texture.name = textureDef.name || sourceDef.name || '';
+			texture.name = textureDef.name || sourceDef.name || sourceDef.uri || '';
 
 			const samplers = json.samplers || {};
 			const sampler = samplers[ textureDef.sampler ] || {};