|
@@ -92,10 +92,12 @@ THREE.PerspectiveCamera.prototype.setViewOffset = function ( fullWidth, fullHeig
|
|
|
|
|
|
THREE.PerspectiveCamera.prototype.updateProjectionMatrix = function () {
|
|
|
|
|
|
+ var fov = THREE.Math.radToDeg( 2 * Math.atan( Math.tan( THREE.Math.degToRad( this.fov ) * 0.5 ) / this.zoom ) );
|
|
|
+
|
|
|
if ( this.fullWidth ) {
|
|
|
|
|
|
var aspect = this.fullWidth / this.fullHeight;
|
|
|
- var top = Math.tan( THREE.Math.degToRad( ( this.fov / this.zoom ) * 0.5 ) ) * this.near;
|
|
|
+ var top = Math.tan( THREE.Math.degToRad( fov * 0.5 ) ) * this.near;
|
|
|
var bottom = - top;
|
|
|
var left = aspect * bottom;
|
|
|
var right = aspect * top;
|
|
@@ -113,7 +115,7 @@ THREE.PerspectiveCamera.prototype.updateProjectionMatrix = function () {
|
|
|
|
|
|
} else {
|
|
|
|
|
|
- this.projectionMatrix.makePerspective( this.fov / this.zoom, this.aspect, this.near, this.far );
|
|
|
+ this.projectionMatrix.makePerspective( fov, this.aspect, this.near, this.far );
|
|
|
|
|
|
}
|
|
|
|