浏览代码

Merge pull request #15112 from EliasHasle/patch-7

Add default frustum to OrthographicCamera
Mr.doob 6 年之前
父节点
当前提交
fffb5f887e
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/cameras/OrthographicCamera.js

+ 4 - 4
src/cameras/OrthographicCamera.js

@@ -15,10 +15,10 @@ function OrthographicCamera( left, right, top, bottom, near, far ) {
 	this.zoom = 1;
 	this.zoom = 1;
 	this.view = null;
 	this.view = null;
 
 
-	this.left = left;
-	this.right = right;
-	this.top = top;
-	this.bottom = bottom;
+	this.left = ( left !== undefined ) ? left : - 1;
+	this.right = ( right !== undefined ) ? right : 1;
+	this.top = ( top !== undefined ) ? top : 1;
+	this.bottom = ( bottom !== undefined ) ? bottom : - 1;
 
 
 	this.near = ( near !== undefined ) ? near : 0.1;
 	this.near = ( near !== undefined ) ? near : 0.1;
 	this.far = ( far !== undefined ) ? far : 2000;
 	this.far = ( far !== undefined ) ? far : 2000;