CapsuleGeometry.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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; [page:LatheGeometry] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. [name]는 주어진 반지름과 높이를 가진 캡슐 형상에 대한 클래스입니다.
  14. LatheGeometry를 사용하여 생성됩니다.
  15. </p>
  16. <iframe id="scene" src="scenes/geometry-browser.html#CapsuleGeometry"></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.CapsuleGeometry( 1, 1, 4, 8 );
  29. const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
  30. const capsule = new THREE.Mesh( geometry, material );
  31. scene.add( capsule );
  32. </code>
  33. <h2>생성자</h2>
  34. <h3>[name]([param:Float radius], [param:Float length], [param:Integer capSegments], [param:Integer radialSegments])</h3>
  35. <p>
  36. radius — 캡슐의 반경입니다. Optional; 기본값은 1 입니다.<br />
  37. length — 중간 구역의 길이입니다. Optional; 기본값은 1 입니다.<br />
  38. capSegments — 캡을 구성하는 데 사용된 곡선 면의 수입니다. Optional; 기본값은 4 입니다.<br />
  39. radialSegments — 캡슐 둘레 주변의 분할된 면의 수입니다. Optional; 기본값은 8 입니다.<br />
  40. </p>
  41. <h2>프로퍼티</h2>
  42. <p>일반 프로퍼티는 기본 [page:BufferGeometry] 클래스를 참조하십시오.</p>
  43. <h3>[property:Object parameters]</h3>
  44. <p>
  45. 각 생성자 매개 변수에 대한 속성을 가진 개체입니다. 인스턴스화 후에 수정해도 지오메트리는 변경되지 않습니다.
  46. </p>
  47. <h2>메서드</h2>
  48. <p>일반 메서드는 기본 [page:BufferGeometry] 클래스를 참조하십시오.</p>
  49. <h2>소스 코드</h2>
  50. <p>
  51. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  52. </p>
  53. </body>
  54. </html>