Browse Source

Merge pull request #15289 from makc/patch-1

GLTFExporter: serialize scene userData
Mr.doob 6 years ago
parent
commit
722ebb237a
1 changed files with 6 additions and 0 deletions
  1. 6 0
      examples/js/exporters/GLTFExporter.js

+ 6 - 0
examples/js/exporters/GLTFExporter.js

@@ -1666,6 +1666,12 @@ THREE.GLTFExporter.prototype = {
 
 			}
 
+			if ( scene.userData && Object.keys( scene.userData ).length > 0 ) {
+
+				gltfScene.extras = serializeUserData( scene );
+
+			}
+
 			outputJSON.scenes.push( gltfScene );
 
 			var nodes = [];