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

Editor: Yet more optimisations and clean up.

上级 27754463
......@@ -45,6 +45,8 @@ var Editor = function () {
this.loader = new Loader( this );
this.scene = new THREE.Scene();
this.scene.name = 'Scene';
this.sceneHelpers = new THREE.Scene();
this.object = {};
......
......@@ -434,24 +434,13 @@ Sidebar.Object3D = function ( editor ) {
signals.sceneGraphChanged.add( function () {
var scene = editor.scene;
var options = {};
options[ scene.id ] = 'Scene';
( function addObjects( objects ) {
for ( var i = 0, l = objects.length; i < l; i ++ ) {
var object = objects[ i ];
scene.traverse( function ( object ) {
options[ object.id ] = object.name;
addObjects( object.children );
}
options[ object.id ] = object.name;
} )( scene.children );
} );
objectParent.setOptions( options );
......
......@@ -591,8 +591,6 @@ var Viewport = function ( editor ) {
function render() {
console.trace();
sceneHelpers.updateMatrixWorld();
scene.updateMatrixWorld();
......
......@@ -480,7 +480,13 @@ UI.Select.prototype.getValue = function () {
UI.Select.prototype.setValue = function ( value ) {
this.dom.value = value;
value = String( value );
if ( this.dom.value !== value ) {
this.dom.value = value;
}
return this;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册