function loadCompressedTexture(data)
	{
		var texture = new CompressedTexture();
		
		if (data.isCubemap === true)
		{
			var faces = data.mipmaps.length / data.mipmapCount;

			texture.isCubeTexture = true;
			texture.image = [];

			for (var f = 0; f < faces; f++)
			{
				texture.image[f] = {mipmaps: []};

				for (var i = 0; i < data.mipmapCount; i ++)
				{
					texture.image[f].mipmaps.push(data.mipmaps[f * data.mipmapCount + i]);
					texture.image[f].format = data.format;
					texture.image[f].width = data.width;
					texture.image[f].height = data.height;
				}
			}

			texture.magFilter = LinearFilter;
			texture.minFilter = LinearFilter;
			texture.mapping = CubeReflectionMapping;
		}
		else
		{
			texture.image.width = data.width;
			texture.image.height = data.height;
			texture.mipmaps = data.mipmaps;
		}

		if (data.mipmapCount === 1)
		{
			texture.minFilter = LinearFilter;
		}

		texture.format = data.format;
		texture.needsUpdate = true;

		return texture;
	}
Load texture from file object, checks the type of the file, can be used to load all types of textures

Supports browser supported format (png, jpeg, bmp, gif, etc), and GPU compressed formats (pvr, dds, ktx, etc).

@static
@method loadTexture
@param {File} file
@param {Function} onLoad