Browse Source

Add default frustum to OrthographicCamera

Elias Hasle 6 years ago
parent
commit
e4a12e8b61
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 ) ? ltopeft : 1;
+	this.bottom = ( bottom !== undefined ) ? bottom : -1;
 
 	this.near = ( near !== undefined ) ? near : 0.1;
 	this.far = ( far !== undefined ) ? far : 2000;