浏览代码

Fix GLTFExporter camera yfov value handling.

The GLTF yfov value is the vertical field of view. The camera.fov
attribute in THREE.js is also a vertical field of view, so it should not
be divided by the aspect ratio when exporting.
Matjaz Gregoric 6 年之前
父节点
当前提交
ebde638490
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/js/exporters/GLTFExporter.js

+ 1 - 1
examples/js/exporters/GLTFExporter.js

@@ -1408,7 +1408,7 @@ THREE.GLTFExporter.prototype = {
 				gltfCamera.perspective = {
 				gltfCamera.perspective = {
 
 
 					aspectRatio: camera.aspect,
 					aspectRatio: camera.aspect,
-					yfov: THREE.Math.degToRad( camera.fov ) / camera.aspect,
+					yfov: THREE.Math.degToRad( camera.fov ),
 					zfar: camera.far <= 0 ? 0.001 : camera.far,
 					zfar: camera.far <= 0 ? 0.001 : camera.far,
 					znear: camera.near < 0 ? 0 : camera.near
 					znear: camera.near < 0 ? 0 : camera.near