paintFaces = function ( geometry, radius, angles, colors, directionIsDown ) {

				var f, n, p, vertexIndex, color;

				var direction = directionIsDown ? 1 : - 1;

				var faceIndices = [ 'a', 'b', 'c', 'd' ];

				var coord = [ ], aColor, bColor, t = 1, A = {}, B = {}, applyColor = false, colorIndex;

				for ( var k = 0; k < angles.length; k ++ ) {

					var vec = { };

					// push the vector at which the color changes
					vec.y = direction * ( Math.cos( angles[ k ] ) * radius );

					vec.x = direction * ( Math.sin( angles[ k ] ) * radius );

					coord.push( vec );

				}

				// painting the colors on the faces
				for ( var i = 0; i < geometry.faces.length ; i ++ ) {

					f  = geometry.faces[ i ];

					n = ( f instanceof THREE.Face3 ) ? 3 : 4;

					for ( var j = 0; j < n; j ++ ) {

						vertexIndex = f[ faceIndices[ j ] ];

						p = geometry.vertices[ vertexIndex ];

						for ( var index = 0; index < colors.length; index ++ ) {

							// linear interpolation between aColor and bColor, calculate proportion
							// A is previous point (angle)
							if ( index === 0 ) {

								A.x = 0;
								A.y = directionIsDown ? radius : - 1 * radius;

							} else {

								A.x = coord[ index - 1 ].x;
								A.y = coord[ index - 1 ].y;

							}

							// B is current point (angle)
							B = coord[ index ];

							if ( undefined !== B ) {

								// p has to be between the points A and B which we interpolate
								applyColor = directionIsDown ? p.y <= A.y && p.y > B.y : p.y >= A.y && p.y < B.y;

								if ( applyColor ) {

									bColor = colors[ index + 1 ];

									aColor = colors[ index ];

									// below is simple linear interpolation
									t = Math.abs( p.y - A.y ) / ( A.y - B.y );

									// to make it faster, you can only calculate this if the y coord changes, the color is the same for points with the same y
									color = interpolateColors( aColor, bColor, t );

									f.vertexColors[ j ] = color;

								}

							} else if ( undefined === f.vertexColors[ j ] ) {

								colorIndex = directionIsDown ? colors.length - 1 : 0;
								f.vertexColors[ j ] = colors[ colorIndex ];

							}

						}

					}

				}

			}
Vertically paints the faces interpolating between the
specified colors at the specified angels. This is used for the Background
node, but could be applied to other nodes with multiple faces as well.

When used with the Background node, default is directionIsDown is true if
interpolating the skyColor down from the Zenith. When interpolationg up from
the Nadir i.e. interpolating the groundColor, the directionIsDown is false.

The first angle is never specified, it is the Zenith (0 rad). Angles are specified
in radians. The geometry is thought a sphere, but could be anything. The color interpolation
is linear along the Y axis in any case.

You must specify one more color than you have angles at the beginning of the colors array.
This is the color of the Zenith (the top of the shape).

@param geometry
@param radius
@param angles
@param colors
@param boolean directionIsDown Whether to work bottom up or top down.