You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.2 KiB
HTML
68 lines
2.2 KiB
HTML
<!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:BufferGeometry] →
|
|
|
|
<h1>[name]</h1>
|
|
|
|
<p class="desc">
|
|
다면체는 평평한 면을 가진 3차원 입체입니다. 이 클래스는 정점 배열을 구에 투영한 다음 원하는 세부 수준으로 나눕니다.
|
|
이 클래스는 [page:DodecahedronGeometry], [page:IcosahedronGeometry], [page:OctahedronGeometry],
|
|
및 [page:TetrahedronGeometry] 에서 각각의 형상을 생성하는 데 사용됩니다 .
|
|
</p>
|
|
|
|
<h2>코드 예제</h2>
|
|
<code>
|
|
const verticesOfCube = [
|
|
-1,-1,-1, 1,-1,-1, 1, 1,-1, -1, 1,-1,
|
|
-1,-1, 1, 1,-1, 1, 1, 1, 1, -1, 1, 1,
|
|
];
|
|
|
|
const indicesOfFaces = [
|
|
2,1,0, 0,3,2,
|
|
0,4,7, 7,3,0,
|
|
0,1,5, 5,4,0,
|
|
1,2,6, 6,5,1,
|
|
2,3,7, 7,6,2,
|
|
4,5,6, 6,7,4
|
|
];
|
|
|
|
const geometry = new THREE.PolyhedronGeometry( verticesOfCube, indicesOfFaces, 6, 2 );
|
|
</code>
|
|
|
|
<h2>생성자</h2>
|
|
|
|
|
|
<h3>[name]([param:Array vertices], [param:Array indices], [param:Float radius], [param:Integer detail])</h3>
|
|
<p>
|
|
vertices — 다음과 같은 형태의 점 [page:Array] [1,1,1, -1,-1,-1, ... ] <br />
|
|
indices — 다음과 같은 형식의 면을 구성하는 인덱스들의 [page:Array] [0,1,2, 2,3,0, ... ] <br />
|
|
radius — [page:Float] - 최종 모양의 반지름 <br />
|
|
detail — [page:Integer] - 지오메트리를 세분화할 레벨 수. 디테일이 많을수록 모양이 부드러워집니다.
|
|
</p>
|
|
|
|
<h2>프로퍼티</h2>
|
|
<p>일반 프로퍼티는 기본 [page:BufferGeometry] 클래스를 참조하십시오.</p>
|
|
|
|
<h3>[property:Object parameters]</h3>
|
|
<p>
|
|
각 생성자 매개 변수에 대한 속성이 있는 개체입니다. 인스턴스화 후 수정해도 형상은 변경되지 않습니다.
|
|
</p>
|
|
|
|
<h2>메서드</h2>
|
|
<p>일반 메서드는 기본 [page:BufferGeometry] 클래스를 참조하십시오.</p>
|
|
|
|
<h2>소스 코드</h2>
|
|
|
|
<p>
|
|
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
|
</p>
|
|
</body>
|
|
</html>
|