提交 1265ec4e 编写于 作者: M Mr.doob

GUI: Outliner is now recursive.

上级 f957d588
......@@ -278,6 +278,7 @@ UI.Select = function ( position ) {
this.dom.style.height = '16px';
this.dom.style.border = '0px';
this.dom.style.padding = '0px';
this.dom.style.whiteSpace = 'pre';
this.onChangeCallback = null;
......@@ -313,7 +314,7 @@ UI.Select.prototype.setOptions = function ( options ) {
var option = document.createElement( 'option' );
option.value = key;
option.appendChild( document.createTextNode( options[ key ] ) );
option.innerHTML = options[ key ];
this.dom.appendChild( option );
}
......
......@@ -63,12 +63,19 @@ Sidebar.Outliner = function ( signals ) {
var options = {};
for ( var i in scene.children ) {
( function createList( object, pad ) {
var object = scene.children[ i ];
options[ object.id ] = ' - ' + object.name + '[' + getObjectInstanceName( object ) + ']';
for ( var key in object.children ) {
}
var child = object.children[ key ];
options[ child.id ] = pad + '+ ' + object.name + ' [' + getObjectInstanceName( child ) + ']';
createList( child, pad + '   ' );
}
} )( scene, '' );
sceneGraph.setOptions( options );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册