BoxGeometry.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <!DOCTYPE html>
  2. <html lang="ko">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. [page:BufferGeometry] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. [name]는 주어진 '폭', '높이', '깊이'를 갖는 직사각형 정육면체 형상에 대한 클래스입니다.
  14. 생성 시, 정육면체는 원점의 중심에 위치하며, 각 모서리는 축 중 하나와 평행합니다.
  15. </p>
  16. <iframe id="scene" src="scenes/geometry-browser.html#BoxGeometry"></iframe>
  17. <script>
  18. // iOS iframe auto-resize workaround
  19. if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
  20. const scene = document.getElementById( 'scene' );
  21. scene.style.width = getComputedStyle( scene ).width;
  22. scene.style.height = getComputedStyle( scene ).height;
  23. scene.setAttribute( 'scrolling', 'no' );
  24. }
  25. </script>
  26. <h2>코드 예제</h2>
  27. <code>
  28. const geometry = new THREE.BoxGeometry( 1, 1, 1 );
  29. const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
  30. const cube = new THREE.Mesh( geometry, material );
  31. scene.add( cube );
  32. </code>
  33. <h2>생성자</h2>
  34. <h3>[name]([param:Float width], [param:Float height], [param:Float depth], [param:Integer widthSegments], [param:Integer heightSegments], [param:Integer depthSegments])</h3>
  35. <p>
  36. width — 너비, 즉 X축에 평행한 모서리의 길이입니다. Optional; 기본값은 1 입니다.<br />
  37. height — 높이, 즉 Y축에 평행한 가장자리의 길이입니다. Optional; 기본값은 1 입니다.<br />
  38. depth — 깊이, 즉 Z축에 평행한 가장자리의 길이입니다. Optional; 기본값은 1 입니다.<br />
  39. widthSegments — 변의 폭을 따라 분할된 직사각형 면의 수입니다. Optional; 기본값은 1 입니다.<br />
  40. heightSegments — 변의 높이를 따라 분할된 직사각형 면의 수입니다. Optional; 기본값은 1 입니다.<br />
  41. depthSegments — 변의 깊이를 따라 분할된 직사각형 면의 수입니다. Optional; 기본값은 1 입니다.<br />
  42. </p>
  43. <h2>프로퍼티</h2>
  44. <p>일반 프로퍼티는 기본 [page:BufferGeometry] 클래스를 참조하십시오.</p>
  45. <h3>[property:Object parameters]</h3>
  46. <p>
  47. 각 생성자 매개 변수에 대한 속성을 가진 개체입니다. 인스턴스화 후에 수정해도 지오메트리는 변경되지 않습니다.
  48. </p>
  49. <h2>메서드</h2>
  50. <p>일반 메서드는 기본 [page:BufferGeometry] 클래스를 참조하십시오.</p>
  51. <h2>소스 코드</h2>
  52. <p>
  53. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  54. </p>
  55. </body>
  56. </html>