瀏覽代碼

remove unnecessary complication of calculation which only obscures what is (#9151)

happening
aardgoose 9 年之前
父節點
當前提交
3420a94d26
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      examples/js/cameras/CombinedCamera.js

+ 1 - 3
examples/js/cameras/CombinedCamera.js

@@ -66,9 +66,7 @@ THREE.CombinedCamera.prototype.toOrthographic = function () {
 	var hyperfocus = ( near + far ) / 2;
 	var hyperfocus = ( near + far ) / 2;
 
 
 	var halfHeight = Math.tan( fov * Math.PI / 180 / 2 ) * hyperfocus;
 	var halfHeight = Math.tan( fov * Math.PI / 180 / 2 ) * hyperfocus;
-	var planeHeight = 2 * halfHeight;
-	var planeWidth = planeHeight * aspect;
-	var halfWidth = planeWidth / 2;
+	var halfWidth = halfHeight * aspect;
 
 
 	halfHeight /= this.zoom;
 	halfHeight /= this.zoom;
 	halfWidth /= this.zoom;
 	halfWidth /= this.zoom;