Sfoglia il codice sorgente

Merge pull request #15289 from makc/patch-1

GLTFExporter: serialize scene userData
Mr.doob 6 anni fa
parent
commit
722ebb237a
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  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 );
 			outputJSON.scenes.push( gltfScene );
 
 
 			var nodes = [];
 			var nodes = [];