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

SceneExporter2 exporting userData.

Mr.doob 12 жил өмнө
parent
commit
bd52f79c0f

+ 3 - 1
examples/js/exporters/SceneExporter2.js

@@ -105,7 +105,7 @@ THREE.SceneExporter2.prototype = {
 			} else if ( object instanceof THREE.SpotLight ) {
 			} else if ( object instanceof THREE.SpotLight ) {
 
 
 				data.type = 'SpotLight';
 				data.type = 'SpotLight';
-				data.color = object.color.getHex();	
+				data.color = object.color.getHex();
 				data.intensity = object.intensity;
 				data.intensity = object.intensity;
 				data.position = object.position.toArray();
 				data.position = object.position.toArray();
 
 
@@ -131,6 +131,8 @@ THREE.SceneExporter2.prototype = {
 
 
 			}
 			}
 
 
+			data.userData = object.userData;
+
 			// parse children
 			// parse children
 
 
 			if ( object.children.length > 0 ) {
 			if ( object.children.length > 0 ) {