Explorar o código

CombinedCamera: Fixed Orthographic fov. See #5558.

Mr.doob %!s(int64=10) %!d(string=hai) anos
pai
achega
4e05d11d50
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/js/cameras/CombinedCamera.js

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

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