Browse Source

Merge pull request #15112 from EliasHasle/patch-7

Add default frustum to OrthographicCamera
Mr.doob 6 years ago
parent
commit
fffb5f887e
1 changed files with 4 additions and 4 deletions
  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.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.far = ( far !== undefined ) ? far : 2000;