You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

88 lines
2.4 KiB

<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
[page:Object3D] &rarr;
<h1>[name]</h1>
<p class="desc">Cria 6 câmeras que renderizam para um [page:WebGLCubeRenderTarget].</p>
<h2>Exemplo de Código</h2>
<code>
// Create cube render target
const cubeRenderTarget = new THREE.WebGLCubeRenderTarget( 128, { generateMipmaps: true, minFilter: THREE.LinearMipmapLinearFilter } );
// Create cube camera
const cubeCamera = new THREE.CubeCamera( 1, 100000, cubeRenderTarget );
scene.add( cubeCamera );
// Create car
const chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: cubeRenderTarget.texture } );
const car = new THREE.Mesh( carGeometry, chromeMaterial );
scene.add( car );
// Update the render target cube
car.visible = false;
cubeCamera.position.copy( car.position );
cubeCamera.update( renderer, scene );
// Render the scene
car.visible = true;
renderer.render( scene, camera );
</code>
<h2>Exemplos</h2>
<p>
[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]
</p>
<h2>Construtor</h2>
<h3>[name]( [param:Number near], [param:Number far], [param:WebGLCubeRenderTarget renderTarget] )</h3>
<p>
near -- A distância de corte próxima. <br />
far -- A distância de corte distante. <br />
renderTarget -- O destino de renderização do cubo target.
</p>
<p>
Constrói uma CubeCamera que contém 6 [page:PerspectiveCamera PerspectiveCameras] que
renderizam para um [page:WebGLCubeRenderTarget].
</p>
<h2>Propriedades</h2>
<p>Veja a classe base [page:Object3D] para propriedades comuns.</p>
<h3>[property:WebGLCubeRenderTarget renderTarget]</h3>
<p>
O destino de renderização do cubo target.
</p>
<h2>Métodos</h2>
<p>Veja a classe base [page:Object3D] para métodos comuns.</p>
<h3>[method:undefined update]( [param:WebGLRenderer renderer], [param:Scene scene] )</h3>
<p>
renderer -- O renderizador (renderer) WebGL atual <br />
scene -- A cena (scene) atual
</p>
<p>
Chame isso para atualizar o [page:CubeCamera.renderTarget renderTarget].
</p>
<h2>Source</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>