function readBvh( lines ) {

			// read model structure
			if ( nextLine( lines ) !== "HIERARCHY" ) {

				throw "HIERARCHY expected";

			}

			var list = []; // collects flat array of all bones
			var root = readNode( lines, nextLine( lines ), list );

			// read motion data
			if ( nextLine( lines ) != "MOTION" ) {

				throw "MOTION  expected";

			}

			// number of frames
			var tokens = nextLine( lines ).split( /[\s]+/ );
			var numFrames = parseInt( tokens[ 1 ] );
			if ( isNaN( numFrames ) ) {

				throw "Failed to read number of frames.";

			}

			// frame time
			tokens = nextLine( lines ).split( /[\s]+/ );
			var frameTime = parseFloat( tokens[ 2 ] );
			if ( isNaN( frameTime ) ) {

				throw "Failed to read frame time.";

			}

			// read frame data line by line
			for ( var i = 0; i < numFrames; ++ i ) {

				tokens = nextLine( lines ).split( /[\s]+/ );

				readFrameData( tokens, i * frameTime, root, list );

			}

			return list;

		}
@author herzig / http://github.com/herzig

Description: reads BVH files and outputs a single THREE.Skeleton and an THREE.AnimationClip

Currently only supports bvh files containing a single root.