examples/FBXLoader.js
function ( relationships ) {

			var model;
			var cameraAttribute;

			relationships.children.forEach( function ( child ) {

				var attr = fbxTree.Objects.NodeAttribute[ child.ID ];

				if ( attr !== undefined ) {

					cameraAttribute = attr;

				}

			} );

			if ( cameraAttribute === undefined ) {

				model = new THREE.Object3D();

			} else {

				var type = 0;
				if ( cameraAttribute.CameraProjectionType !== undefined && cameraAttribute.CameraProjectionType.value === 1 ) {

					type = 1;

				}

				var nearClippingPlane = 1;
				if ( cameraAttribute.NearPlane !== undefined ) {

					nearClippingPlane = cameraAttribute.NearPlane.value / 1000;

				}

				var farClippingPlane = 1000;
				if ( cameraAttribute.FarPlane !== undefined ) {

					farClippingPlane = cameraAttribute.FarPlane.value / 1000;

				}


				var width = window.innerWidth;
				var height = window.innerHeight;

				if ( cameraAttribute.AspectWidth !== undefined && cameraAttribute.AspectHeight !== undefined ) {

					width = cameraAttribute.AspectWidth.value;
					height = cameraAttribute.AspectHeight.value;

				}

				var aspect = width / height;

				var fov = 45;
				if ( cameraAttribute.FieldOfView !== undefined ) {

					fov = cameraAttribute.FieldOfView.value;

				}

				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
						model = new THREE.OrthographicCamera( - width / 2, width / 2, height / 2, - height / 2, nearClippingPlane, farClippingPlane );
						break;

					default:
						console.warn( 'THREE.FBXLoader: Unknown camera type ' + type + '.' );
						model = new THREE.Object3D();
						break;

				}

			}

			return model;

		}
function ( relationships ) {

			var model;
			var cameraAttribute;

			relationships.children.forEach( function ( child ) {

				var attr = fbxTree.Objects.NodeAttribute[ child.ID ];

				if ( attr !== undefined ) {

					cameraAttribute = attr;

				}

			} );

			if ( cameraAttribute === undefined ) {

				model = new THREE.Object3D();

			} else {

				var type = 0;
				if ( cameraAttribute.CameraProjectionType !== undefined && cameraAttribute.CameraProjectionType.value === 1 ) {

					type = 1;

				}

				var nearClippingPlane = 1;
				if ( cameraAttribute.NearPlane !== undefined ) {

					nearClippingPlane = cameraAttribute.NearPlane.value / 1000;

				}

				var farClippingPlane = 1000;
				if ( cameraAttribute.FarPlane !== undefined ) {

					farClippingPlane = cameraAttribute.FarPlane.value / 1000;

				}


				var width = window.innerWidth;
				var height = window.innerHeight;

				if ( cameraAttribute.AspectWidth !== undefined && cameraAttribute.AspectHeight !== undefined ) {

					width = cameraAttribute.AspectWidth.value;
					height = cameraAttribute.AspectHeight.value;

				}

				var aspect = width / height;

				var fov = 45;
				if ( cameraAttribute.FieldOfView !== undefined ) {

					fov = cameraAttribute.FieldOfView.value;

				}

				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
						model = new THREE.OrthographicCamera( - width / 2, width / 2, height / 2, - height / 2, nearClippingPlane, farClippingPlane );
						break;

					default:
						console.warn( 'THREE.FBXLoader: Unknown camera type ' + type + '.' );
						model = new THREE.Object3D();
						break;

				}

			}

			return model;

		}
function ( relationships ) { var model ; var cameraAttribute ; relationships . children . forEach ( function ( child ) { var attr = fbxTree . Objects . NodeAttribute [ child . ID ] ; if ( attr !== undefined ) { cameraAttribute = attr ; } } ) ; if ( cameraAttribute === undefined ) { model = new THREE . Object3D ( ) ; } else { var type = 0 ; if ( cameraAttribute . CameraProjectionType !== undefined && cameraAttribute . CameraProjectionType . value === 1 ) { type = 1 ; } var nearClippingPlane = 1 ; if ( cameraAttribute . NearPlane !== undefined ) { nearClippingPlane = cameraAttribute . NearPlane . value / 1000 ; } var farClippingPlane = 1000 ; if ( cameraAttribute . FarPlane !== undefined ) { farClippingPlane = cameraAttribute . FarPlane . value / 1000 ; } var width = window . innerWidth ; var height = window . innerHeight ; if ( cameraAttribute . AspectWidth !== undefined && cameraAttribute . AspectHeight !== undefined ) { width = cameraAttribute . AspectWidth . value ; height = cameraAttribute . AspectHeight . value ; } var aspect = width / height ; var fov = 45 ; if ( cameraAttribute . FieldOfView !== undefined ) { fov = cameraAttribute . FieldOfView . value ; } 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 model = new THREE . OrthographicCamera ( - width / 2 , width / 2 , height / 2 , - height / 2 , nearClippingPlane , farClippingPlane ) ; break ; default : console . warn ( 'THREE.FBXLoader: Unknown camera type ' + type + '.' ) ; model = new THREE . Object3D ( ) ; break ; } } return model ; }
create a THREE.PerspectiveCamera or THREE.OrthographicCamera
create a THREE . PerspectiveCamera or THREE . OrthographicCamera