Browse Source

Issue #13180. FBXLoader PerspectiveCamera enhancement.

andts 7 years ago
parent
commit
eb1e4bc60e
1 changed files with 3 additions and 0 deletions
  1. 3 0
      examples/js/loaders/FBXLoader.js

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

@@ -1525,10 +1525,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