Browse Source

GLTFLoader: export mesh and primitive extras

see PR #12760
Pascal Häusler 7 years ago
parent
commit
471931c541
1 changed files with 2 additions and 1 deletions
  1. 2 1
      examples/js/loaders/GLTFLoader.js

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

@@ -2076,7 +2076,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.
 					// for Specular-Glossiness.
 					if ( material.isGLTFSpecularGlossinessMaterial === true ) {
 					if ( material.isGLTFSpecularGlossinessMaterial === true ) {