다면체는 평평한 면을 가진 3차원 입체입니다. 이 클래스는 정점 배열을 구에 투영한 다음 원하는 세부 수준으로 나눕니다. 이 클래스는 [page:DodecahedronGeometry], [page:IcosahedronGeometry], [page:OctahedronGeometry], 및 [page:TetrahedronGeometry] 에서 각각의 형상을 생성하는 데 사용됩니다 .
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 );
vertices — 다음과 같은 형태의 점 [page:Array] [1,1,1, -1,-1,-1, ... ]
indices — 다음과 같은 형식의 면을 구성하는 인덱스들의 [page:Array] [0,1,2, 2,3,0, ... ]
radius — [page:Float] - 최종 모양의 반지름
detail — [page:Integer] - 지오메트리를 세분화할 레벨 수. 디테일이 많을수록 모양이 부드러워집니다.
일반 프로퍼티는 기본 [page:BufferGeometry] 클래스를 참조하십시오.
각 생성자 매개 변수에 대한 속성이 있는 개체입니다. 인스턴스화 후 수정해도 형상은 변경되지 않습니다.
일반 메서드는 기본 [page:BufferGeometry] 클래스를 참조하십시오.
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]