[page:Object3D] →

# [name]

Creates 6 cameras that render to a [page:WebGLRenderTargetCube].

## Examples

[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]
[example:webgl_materials_cubemap_dynamic2 materials / cubemap / dynamic2 ]
[example:webgl_shading_physical shading / physical ]
`//Create cube camera var cubeCamera = new THREE.CubeCamera( 1, 100000, 128 ); scene.add( cubeCamera ); //Create car var chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: cubeCamera.renderTarget } ); var car = new Mesh( carGeometry, chromeMaterial ); scene.add( car ); //Update the render target cube car.setVisible( false ); cubeCamera.position.copy( car.position ); cubeCamera.updateCubeMap( renderer, scene ); //Render the scene car.setVisible( true ); renderer.render( scene, camera );`

## Constructor

### [name]( [page:number near], [page:number far], [page:number cubeResolution] )

near -- The near clipping distance.
far -- The far clipping distance
cubeResolution -- Sets the width of the cube.
Constructs a CubeCamera that contains 6 [page:PerspectiveCamera PerspectiveCameras] that then render to a [page:WebGLRenderTargetCube]

## Properties

### [property:WebGLRenderTargetCube renderTarget]

The cube texture that gets generated.

## Methods

### [method:null updateCubeMap]( [page:WebGLRenderer renderer], [page:Scene scene] )

renderer -- The current WebGL renderer
scene -- The current scene
Call this to update the renderTarget.

## Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]