浏览代码

SceneExporter2 exporting userData.

Mr.doob 12 年之前
父节点
当前提交
bd52f79c0f
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      examples/js/exporters/SceneExporter2.js

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

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