浏览代码

Editor: Support scenes without cameras.

Mr.doob 12 年之前
父节点
当前提交
39648e3b35
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      editor/js/ui/Viewport.js

+ 5 - 1
editor/js/ui/Viewport.js

@@ -767,6 +767,10 @@ var Viewport = function ( signals ) {
 			controls.object = camera;
 			controls.update();
 
+		} else {
+
+			scene.add( camera );
+
 		}
 
 		if ( newClearColor ) {
@@ -806,7 +810,7 @@ var Viewport = function ( signals ) {
 		}
 
 		signals.sceneChanged.dispatch( scene );
-		signals.objectSelected.dispatch( null );
+		signals.objectSelected.dispatch( camera );
 
 	} );