Browse Source

GLTFLoader: Texture URI as name. (#25664)

sunag 2 năm trước cách đây
mục cha
commit
b9002a805d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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 ] || {};