Sfoglia il codice sorgente

Merge pull request #13237 from HoldenCa/fix/13180

FBXLoader: PerspectiveCamera enhancement.
Mr.doob 7 anni fa
parent
commit
2a0a5477af
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  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 ) {
 
 				case 0: // Perspective
 					model = new THREE.PerspectiveCamera( fov, aspect, nearClippingPlane, farClippingPlane );
+					if ( focalLength !== null ) model.setFocalLength( focalLength );
 					break;
 
 				case 1: // Orthographic