瀏覽代碼

GLTFLoader: Fix perspective camera FOV.

Don McCurdy 7 年之前
父節點
當前提交
27f9ed6ce4
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      examples/js/loaders/GLTFLoader.js

+ 1 - 4
examples/js/loaders/GLTFLoader.js

@@ -2352,10 +2352,7 @@ THREE.GLTFLoader = ( function () {
 
 
 		if ( cameraDef.type === 'perspective' ) {
 		if ( cameraDef.type === 'perspective' ) {
 
 
-			var aspectRatio = params.aspectRatio || 1;
-			var xfov = params.yfov * aspectRatio;
-
-			camera = new THREE.PerspectiveCamera( THREE.Math.radToDeg( xfov ), aspectRatio, params.znear || 1, params.zfar || 2e6 );
+			camera = new THREE.PerspectiveCamera( THREE.Math.radToDeg( params.yfov ), params.aspectRatio || 1, params.znear || 1, params.zfar || 2e6 );
 
 
 		} else if ( cameraDef.type === 'orthographic' ) {
 		} else if ( cameraDef.type === 'orthographic' ) {