瀏覽代碼

Merge pull request #12007 from proteamer/dev

GLTFLoader: check if material.extra is defined before assign it
Mr.doob 8 年之前
父節點
當前提交
05d67cc5b9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/js/loaders/GLTFLoader.js

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

@@ -1669,7 +1669,7 @@ THREE.GLTFLoader = ( function () {
 				// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#materialnormaltexture
 				_material.normalScale.x = -1;
 
-				_material.userData = material.extras;
+				if ( material.extras ) _material.userData = material.extras;
 
 				return _material;