function CubeCamera(near, far, resolution, autoUpdate)
{
	Object3D.call(this);

	this.name = "cubecamera";
	this.type = "CubeCamera";

	/**
	 * CubeCamera near plane.
	 *
	 * @property near
	 * @type {number}
	 */
	this.near = near !== undefined ? near : 1e-2;

	/**
	 * CubeCamera far plane.
	 *
	 * @property far
	 * @type {number}
	 */
	this.far = far !== undefined ? far : 1e4;

	/**
	 * Resolution of each face. Should be a power of 2 (32, 64, 128, ...).
	 *
	 * @property resolution
	 * @type {number}
	 */
	this.resolution = resolution !== undefined ? resolution : 256;

	/**
	 * Auto update indicates if the cube camera is updated automatically each frame.
	 * 
	 * @property autoUpdate
	 * @type {boolean}
	 */
	this.autoUpdate = autoUpdate !== undefined ? autoUpdate : false;

	/**
	 * Array of 6 cameras used to render each face of the cube.
	 *
	 * @property cameras
	 * @type {Array}
	 */
	this.cameras = [];
	for (var i = 0; i < 6; i++)
	{
		var camera = new PerspectiveCamera(90, 1, this.near, this.far);
		camera.parent = this;
		this.cameras.push(camera);
	}

	this.cameras[0].up.set(0, -1, 0);
	this.cameras[0].lookAt(new Vector3(1, 0, 0));
	this.cameras[1].up.set(0, -1, 0);
	this.cameras[1].lookAt(new Vector3(-1, 0, 0));
	this.cameras[2].up.set(0, 0, 1);
	this.cameras[2].lookAt(new Vector3(0, 1, 0));
	this.cameras[3].up.set(0, 0, -1);
	this.cameras[3].lookAt(new Vector3(0, -1, 0));
	this.cameras[4].up.set(0, -1, 0);
	this.cameras[4].lookAt(new Vector3(0, 0, 1));
	this.cameras[5].up.set(0, -1, 0);
	this.cameras[5].lookAt(new Vector3(0, 0, -1));

	/**
	 * WebGL cube render target to where the scene is rendered.
	 *
	 * @property target
	 * @type {WebGLCubeRenderTarget}
	 */
	this.renderTarget = new WebGLCubeRenderTarget(this.resolution,
		{
			format: RGBFormat,
			magFilter: LinearFilter,
			minFilter: LinearFilter,
			generateMipmaps: false
		});


	var self = this;
	Object.defineProperties(this,
		{
		/**
		 * CubeTexture generated by this CubeCamera.
		 *
		 * Can be attached to materials as envMap.
		 * 
		 * @property cube
		 * @type {CubeTexture}
		 */
			cube:
		{
			get: function() {return self.renderTarget.texture;},
			set: function() {}
		}
		});

	this.scene = null;
	this.renderer = null;
}
Reflection probes are used to create CubeTextures dinamically.

These CubeTextures can be attributed to materials programatically.

@class CubeCamera
@extends {Object3D}
@module Misc