Browse Source

Fix GLTFExporter not exporting Scene userData

Benjamin MICHEL 5 years ago
parent
commit
51f564cf71
2 changed files with 4 additions and 4 deletions
  1. 2 2
      examples/js/exporters/GLTFExporter.js
  2. 2 2
      examples/jsm/exporters/GLTFExporter.js

+ 2 - 2
examples/js/exporters/GLTFExporter.js

@@ -1348,7 +1348,7 @@ THREE.GLTFExporter.prototype = {
 									attribute.getX( j ) - baseAttribute.getX( j ),
 									attribute.getY( j ) - baseAttribute.getY( j ),
 									attribute.getZ( j ) - baseAttribute.getZ( j )
-									);
+								);
 
 							}
 
@@ -1922,7 +1922,7 @@ THREE.GLTFExporter.prototype = {
 
 			if ( scene.userData && Object.keys( scene.userData ).length > 0 ) {
 
-				gltfScene.extras = serializeUserData( scene );
+				gltfScene.extras = serializeUserData( scene, gltfScene );
 
 			}
 

+ 2 - 2
examples/jsm/exporters/GLTFExporter.js

@@ -1372,7 +1372,7 @@ GLTFExporter.prototype = {
 									attribute.getX( j ) - baseAttribute.getX( j ),
 									attribute.getY( j ) - baseAttribute.getY( j ),
 									attribute.getZ( j ) - baseAttribute.getZ( j )
-									);
+								);
 
 							}
 
@@ -1946,7 +1946,7 @@ GLTFExporter.prototype = {
 
 			if ( scene.userData && Object.keys( scene.userData ).length > 0 ) {
 
-				gltfScene.extras = serializeUserData( scene );
+				gltfScene.extras = serializeUserData( scene, gltfScene );
 
 			}