examples/FBXLoader.js
function getData( polygonVertexIndex, polygonIndex, vertexIndex, infoObject ) {

		var index;

		switch ( infoObject.mappingType ) {

			case 'ByPolygonVertex' :
				index = polygonVertexIndex;
				break;
			case 'ByPolygon' :
				index = polygonIndex;
				break;
			case 'ByVertice' :
				index = vertexIndex;
				break;
			case 'AllSame' :
				index = infoObject.indices[ 0 ];
				break;
			default :
				console.warn( 'THREE.FBXLoader: unknown attribute mapping type ' + infoObject.mappingType );

		}

		if ( infoObject.referenceType === 'IndexToDirect' ) index = infoObject.indices[ index ];

		var from = index * infoObject.dataSize;
		var to = from + infoObject.dataSize;

		return slice( dataArray, infoObject.buffer, from, to );

	}
function getData( polygonVertexIndex, polygonIndex, vertexIndex, infoObject ) {

		var index;

		switch ( infoObject.mappingType ) {

			case 'ByPolygonVertex' :
				index = polygonVertexIndex;
				break;
			case 'ByPolygon' :
				index = polygonIndex;
				break;
			case 'ByVertice' :
				index = vertexIndex;
				break;
			case 'AllSame' :
				index = infoObject.indices[ 0 ];
				break;
			default :
				console.warn( 'THREE.FBXLoader: unknown attribute mapping type ' + infoObject.mappingType );

		}

		if ( infoObject.referenceType === 'IndexToDirect' ) index = infoObject.indices[ index ];

		var from = index * infoObject.dataSize;
		var to = from + infoObject.dataSize;

		return slice( dataArray, infoObject.buffer, from, to );

	}
function getData ( polygonVertexIndex , polygonIndex , vertexIndex , infoObject ) { var index ; switch ( infoObject . mappingType ) { case 'ByPolygonVertex' : index = polygonVertexIndex ; break ; case 'ByPolygon' : index = polygonIndex ; break ; case 'ByVertice' : index = vertexIndex ; break ; case 'AllSame' : index = infoObject . indices [ 0 ] ; break ; default : console . warn ( 'THREE.FBXLoader: unknown attribute mapping type ' + infoObject . mappingType ) ; } if ( infoObject . referenceType === 'IndexToDirect' ) index = infoObject . indices [ index ] ; var from = index * infoObject . dataSize ; var to = from + infoObject . dataSize ; return slice ( dataArray , infoObject . buffer , from , to ) ; }
extracts the data from the correct position in the FBX array based on indexing type
extracts the data from the correct position in the FBX array based on indexing type