123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <!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">
- [name]는 주어진 '폭', '높이', '깊이'를 갖는 직사각형 정육면체 형상에 대한 클래스입니다.
- 생성 시, 정육면체는 원점의 중심에 위치하며, 각 모서리는 축 중 하나와 평행합니다.
- </p>
- <iframe id="scene" src="scenes/geometry-browser.html#BoxGeometry"></iframe>
- <script>
- // iOS iframe auto-resize workaround
- if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
- const scene = document.getElementById( 'scene' );
- scene.style.width = getComputedStyle( scene ).width;
- scene.style.height = getComputedStyle( scene ).height;
- scene.setAttribute( 'scrolling', 'no' );
- }
- </script>
- <h2>코드 예제</h2>
- <code>
- const geometry = new THREE.BoxGeometry( 1, 1, 1 );
- const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
- const cube = new THREE.Mesh( geometry, material );
- scene.add( cube );
- </code>
- <h2>생성자</h2>
- <h3>[name]([param:Float width], [param:Float height], [param:Float depth], [param:Integer widthSegments], [param:Integer heightSegments], [param:Integer depthSegments])</h3>
- <p>
- width — 너비, 즉 X축에 평행한 모서리의 길이입니다. Optional; 기본값은 1 입니다.<br />
- height — 높이, 즉 Y축에 평행한 가장자리의 길이입니다. Optional; 기본값은 1 입니다.<br />
- depth — 깊이, 즉 Z축에 평행한 가장자리의 길이입니다. Optional; 기본값은 1 입니다.<br />
- widthSegments — 변의 폭을 따라 분할된 직사각형 면의 수입니다. Optional; 기본값은 1 입니다.<br />
- heightSegments — 변의 높이를 따라 분할된 직사각형 면의 수입니다. Optional; 기본값은 1 입니다.<br />
- depthSegments — 변의 깊이를 따라 분할된 직사각형 면의 수입니다. Optional; 기본값은 1 입니다.<br />
- </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>
|