Browse Source

Merge pull request #12824 from cnspaha/patch-4

GLTFLoader: export mesh and primitive extras
Mr.doob 7 years ago
parent
commit
5841442313
1 changed files with 2 additions and 1 deletions
  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 ) {