SplineCurve.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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:Curve] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. 연속된 점들로부터 매끄러운 2d 곡선을 만듭니다. 내부적으로 [page:Interpolations.CatmullRom]을 사용해 곡선을 만듭니다.
  14. </p>
  15. <h2>코드 예제</h2>
  16. <code>
  17. // Create a sine-like wave
  18. const curve = new THREE.SplineCurve( [
  19. new THREE.Vector2( -10, 0 ),
  20. new THREE.Vector2( -5, 5 ),
  21. new THREE.Vector2( 0, 0 ),
  22. new THREE.Vector2( 5, -5 ),
  23. new THREE.Vector2( 10, 0 )
  24. ] );
  25. const points = curve.getPoints( 50 );
  26. const geometry = new THREE.BufferGeometry().setFromPoints( points );
  27. const material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
  28. // Create the final object to add to the scene
  29. const splineObject = new THREE.Line( geometry, material );
  30. </code>
  31. <h2>생성자</h2>
  32. <h3>[name]( [param:Array points] )</h3>
  33. <p>points – [page:Vector2] 배열의 점으로 곡선을 정의합니다.</p>
  34. <h2>프로퍼티</h2>
  35. <p>일반 프로퍼티는 기본 [page:Curve] 클래스를 참고하세요.</p>
  36. <h3>[property:Array points]</h3>
  37. <p>곡선을 정의하는 [page:Vector2] 점들의 배열입니다.</p>
  38. <h2>메서드</h2>
  39. <p>일반 메서드는 기본 [page:Curve] 클래스를 참고하세요.</p>
  40. <h2>소스코드</h2>
  41. <p>
  42. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  43. </p>
  44. </body>
  45. </html>