Browse Source

Support texture name in GLTFLoader

Takahiro 8 years ago
parent
commit
9dbb37e234
1 changed files with 2 additions and 0 deletions
  1. 2 0
      examples/js/loaders/GLTFLoader.js

+ 2 - 0
examples/js/loaders/GLTFLoader.js

@@ -1070,6 +1070,8 @@ THREE.GLTFLoader = ( function () {
 
 
 							_texture.flipY = false;
 							_texture.flipY = false;
 
 
+							if ( texture.name !== undefined ) _texture.name = texture.name;
+
 							if ( texture.sampler ) {
 							if ( texture.sampler ) {
 
 
 								var sampler = json.samplers[ texture.sampler ];
 								var sampler = json.samplers[ texture.sampler ];