2
0
Эх сурвалжийг харах

serialize userData in GLTFExporter

makc 6 жил өмнө
parent
commit
9614c89197

+ 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 = [];