2
0
Эх сурвалжийг харах

Merge pull request #17344 from bovesan/gltf-export-texture-names

GLTF export texture names
Mr.doob 6 жил өмнө
parent
commit
9769ae4671

+ 6 - 0
examples/js/exporters/GLTFExporter.js

@@ -867,6 +867,12 @@ THREE.GLTFExporter.prototype = {
 
 			};
 
+			if ( map.name ) {
+
+				gltfTexture.name = map.name;
+
+			}
+
 			outputJSON.textures.push( gltfTexture );
 
 			var index = outputJSON.textures.length - 1;

+ 6 - 0
examples/jsm/exporters/GLTFExporter.js

@@ -891,6 +891,12 @@ GLTFExporter.prototype = {
 
 			};
 
+			if ( map.name ) {
+
+				gltfTexture.name = map.name;
+
+			}
+
 			outputJSON.textures.push( gltfTexture );
 
 			var index = outputJSON.textures.length - 1;