SphereGeometry.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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">구 형상을 생성하기 위한 클래스입니다.</p>
  13. <iframe id="scene" src="scenes/geometry-browser.html#SphereGeometry"></iframe>
  14. <script>
  15. // iOS iframe auto-resize workaround
  16. if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
  17. const scene = document.getElementById( 'scene' );
  18. scene.style.width = getComputedStyle( scene ).width;
  19. scene.style.height = getComputedStyle( scene ).height;
  20. scene.setAttribute( 'scrolling', 'no' );
  21. }
  22. </script>
  23. <h2>코드 예제</h2>
  24. <code>
  25. const geometry = new THREE.SphereGeometry( 15, 32, 16 );
  26. const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
  27. const sphere = new THREE.Mesh( geometry, material );
  28. scene.add( sphere );
  29. </code>
  30. <h2>생성자</h2>
  31. <h3>[name]([param:Float radius], [param:Integer widthSegments], [param:Integer heightSegments], [param:Float phiStart], [param:Float phiLength], [param:Float thetaStart], [param:Float thetaLength])</h3>
  32. <p>
  33. radius — 구 반지름. Default is 1.<br />
  34. widthSegments — 수평 세그먼트의 수입니다. 최소값은 3 입니다, 그리고 기본값은 32 입니다.<br />
  35. heightSegments — 수직 세그먼트의 수입니다. 최소값은 2 입니다, 그리고 기본값은 16 입니다.<br />
  36. phiStart — 수평 시작 각도를 지정합니다. 기본값은 0 입니다.<br />
  37. phiLength — 수평 스위프 각도 크기를 지정합니다. 기본값은 Math.PI * 2 입니다.<br />
  38. thetaStart — 수직 시작 각도를 지정합니다. 기본값은 0 입니다.<br />
  39. thetaLength — 수직 스위프 각도 크기를 지정합니다. 기본값은 Math.PI 입니다.<br />
  40. </p>
  41. <p>
  42. 지오메트리는 Y축(수평 스윕)과 Z축(수직 스윕) 주위의 정점을 스윕하고 계산하여 생성됩니다.따라서, 우리가 정점 계산을 시작(또는 종료)하는 지점을 정의하기 위해, 다른 값의 phiStart, phiLength, 세타Start 및 세타Length를 사용하여 불완전한 구('sphere slices' 와 유사한)를 만들 수 있다.
  43. </p>
  44. <h2>프로퍼티</h2>
  45. <p>일반 프로퍼티는 기본 [page:BufferGeometry] 클래스를 참조하십시오.</p>
  46. <h3>[property:Object parameters]</h3>
  47. <p>
  48. 각 생성자 매개 변수에 대한 속성이 있는 개체입니다. 인스턴스화 후 수정해도 형상은 변경되지 않습니다.
  49. </p>
  50. <h2>메서드</h2>
  51. <p>일반 메서드는 기본 [page:BufferGeometry] 클래스를 참조하십시오.</p>
  52. <h2>소스 코드</h2>
  53. <p>
  54. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  55. </p>
  56. </body>
  57. </html>