Explorar el Código

Merge pull request #12824 from cnspaha/patch-4

GLTFLoader: export mesh and primitive extras
Mr.doob hace 7 años
padre
commit
5841442313
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      examples/js/loaders/GLTFLoader.js

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

@@ -2053,7 +2053,8 @@ THREE.GLTFLoader = ( function () {
 
 					}
 
-					if ( primitive.extras ) mesh.userData = primitive.extras;
+					if ( meshDef.extras !== undefined ) mesh.userData = meshDef.extras;
+					if ( primitive.extras !== undefined ) mesh.geometry.userData = primitive.extras;
 
 					// for Specular-Glossiness.
 					if ( material.isGLTFSpecularGlossinessMaterial === true ) {