examples/FBXLoader.js
function ( relationships, geoNode, deformers ) {

			var skeletons = deformers.skeletons;
			var morphTargets = deformers.morphTargets;

			var modelNodes = relationships.parents.map( function ( parent ) {

				return fbxTree.Objects.Model[ parent.ID ];

			} );

			// don't create geometry if it is not associated with any models
			if ( modelNodes.length === 0 ) return;

			var skeleton = relationships.children.reduce( function ( skeleton, child ) {

				if ( skeletons[ child.ID ] !== undefined ) skeleton = skeletons[ child.ID ];

				return skeleton;

			}, null );

			var morphTarget = relationships.children.reduce( function ( morphTarget, child ) {

				if ( morphTargets[ child.ID ] !== undefined ) morphTarget = morphTargets[ child.ID ];

				return morphTarget;

			}, null );

			// TODO: if there is more than one model associated with the geometry, AND the models have
			// different geometric transforms, then this will cause problems
			// if ( modelNodes.length > 1 ) { }

			// For now just assume one model and get the preRotations from that
			var modelNode = modelNodes[ 0 ];

			var transformData = {};

			if ( 'RotationOrder' in modelNode ) transformData.eulerOrder = modelNode.RotationOrder.value;
			if ( 'GeometricTranslation' in modelNode ) transformData.translation = modelNode.GeometricTranslation.value;
			if ( 'GeometricRotation' in modelNode ) transformData.rotation = modelNode.GeometricRotation.value;
			if ( 'GeometricScaling' in modelNode ) transformData.scale = modelNode.GeometricScaling.value;

			var transform = generateTransform( transformData );

			return this.genGeometry( geoNode, skeleton, morphTarget, transform );

		}
function ( relationships, geoNode, deformers ) {

			var skeletons = deformers.skeletons;
			var morphTargets = deformers.morphTargets;

			var modelNodes = relationships.parents.map( function ( parent ) {

				return fbxTree.Objects.Model[ parent.ID ];

			} );

			// don't create geometry if it is not associated with any models
			if ( modelNodes.length === 0 ) return;

			var skeleton = relationships.children.reduce( function ( skeleton, child ) {

				if ( skeletons[ child.ID ] !== undefined ) skeleton = skeletons[ child.ID ];

				return skeleton;

			}, null );

			var morphTarget = relationships.children.reduce( function ( morphTarget, child ) {

				if ( morphTargets[ child.ID ] !== undefined ) morphTarget = morphTargets[ child.ID ];

				return morphTarget;

			}, null );

			// TODO: if there is more than one model associated with the geometry, AND the models have
			// different geometric transforms, then this will cause problems
			// if ( modelNodes.length > 1 ) { }

			// For now just assume one model and get the preRotations from that
			var modelNode = modelNodes[ 0 ];

			var transformData = {};

			if ( 'RotationOrder' in modelNode ) transformData.eulerOrder = modelNode.RotationOrder.value;
			if ( 'GeometricTranslation' in modelNode ) transformData.translation = modelNode.GeometricTranslation.value;
			if ( 'GeometricRotation' in modelNode ) transformData.rotation = modelNode.GeometricRotation.value;
			if ( 'GeometricScaling' in modelNode ) transformData.scale = modelNode.GeometricScaling.value;

			var transform = generateTransform( transformData );

			return this.genGeometry( geoNode, skeleton, morphTarget, transform );

		}
function ( relationships , geoNode , deformers ) { var skeletons = deformers . skeletons ; var morphTargets = deformers . morphTargets ; var modelNodes = relationships . parents . map ( function ( parent ) { return fbxTree . Objects . Model [ parent . ID ] ; } ) ; // don't create geometry if it is not associated with any models if ( modelNodes . length === 0 ) return ; var skeleton = relationships . children . reduce ( function ( skeleton , child ) { if ( skeletons [ child . ID ] !== undefined ) skeleton = skeletons [ child . ID ] ; return skeleton ; } , null ) ; var morphTarget = relationships . children . reduce ( function ( morphTarget , child ) { if ( morphTargets [ child . ID ] !== undefined ) morphTarget = morphTargets [ child . ID ] ; return morphTarget ; } , null ) ; // TODO: if there is more than one model associated with the geometry, AND the models have // different geometric transforms, then this will cause problems // if ( modelNodes.length > 1 ) { } // For now just assume one model and get the preRotations from that var modelNode = modelNodes [ 0 ] ; var transformData = { } ; if ( 'RotationOrder' in modelNode ) transformData . eulerOrder = modelNode . RotationOrder . value ; if ( 'GeometricTranslation' in modelNode ) transformData . translation = modelNode . GeometricTranslation . value ; if ( 'GeometricRotation' in modelNode ) transformData . rotation = modelNode . GeometricRotation . value ; if ( 'GeometricScaling' in modelNode ) transformData . scale = modelNode . GeometricScaling . value ; var transform = generateTransform ( transformData ) ; return this . genGeometry ( geoNode , skeleton , morphTarget , transform ) ; }
Parse single node mesh geometry in FBXTree.Objects.Geometry
Parse single node mesh geometry in FBXTree . Objects . Geometry