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

2 years ago
<!DOCTYPE html>
<html lang="ko">
<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">[page:WebGLCubeRenderTarget]에 렌더링되는 6개의 카메라를 생성합니다.</p>
<h2>코드 예제</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>예제</h2>
<p>
[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]
</p>
<h2>생성자</h2>
<h3>[name]( [param:Number near], [param:Number far], [param:WebGLCubeRenderTarget renderTarget] )</h3>
<p>
near -- 근거리 클리핑 거리. <br />
far -- 원거리 클리핑 거리. <br />
renderTarget -- 큐브 렌더 타겟 목적지.
</p>
<p>
[page:WebGLCubeRenderTarget]에 렌더링하는 6개의 [page:PerspectiveCamera PerspectiveCameras]를 포함하는 CubeCamera를 생성합니다.
</p>
<h2>프로퍼티</h2>
<p>일반 프로퍼티는 기본 [page:Object3D] 클래스를 참고하세요.</p>
<h3>[property:WebGLCubeRenderTarget renderTarget]</h3>
<p>
큐브 렌더 타겟 목적지.
</p>
<h2>메서드</h2>
<p>일반 메서드는 기본 [page:Object3D] 클래스를 참고하세요.</p>
<h3>[method:undefined update]( [param:WebGLRenderer renderer], [param:Scene scene] )</h3>
<p>
renderer -- 현재의 WebGL 렌더러 <br />
scene -- 현재 장면
</p>
<p>
[page:CubeCamera.renderTarget renderTarget]를 업데이트 할 때 호출합니다.
</p>
<h2>소스 코드</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>