Browse Source

Merge pull request #13237 from HoldenCa/fix/13180

FBXLoader: PerspectiveCamera enhancement.
Mr.doob 7 năm trước cách đây
mục cha
commit
2a0a5477af
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      examples/js/loaders/FBXLoader.js

+ 3 - 0
examples/js/loaders/FBXLoader.js

@@ -1647,10 +1647,13 @@
 
 
 			}
 			}
 
 
+			var focalLength = cameraAttribute.FocalLength ? cameraAttribute.FocalLength.value : null;
+
 			switch ( type ) {
 			switch ( type ) {
 
 
 				case 0: // Perspective
 				case 0: // Perspective
 					model = new THREE.PerspectiveCamera( fov, aspect, nearClippingPlane, farClippingPlane );
 					model = new THREE.PerspectiveCamera( fov, aspect, nearClippingPlane, farClippingPlane );
+					if ( focalLength !== null ) model.setFocalLength( focalLength );
 					break;
 					break;
 
 
 				case 1: // Orthographic
 				case 1: // Orthographic