CurvePath.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <!DOCTYPE html>
  2. <html lang="en">
  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. An abstract base class extending [page:Curve]. A CurvePath is simply an array of connected curves,
  14. but retains the api of a curve.
  15. </p>
  16. <h2>Constructor</h2>
  17. <h3>[name]()</h3>
  18. <p>
  19. The constructor take no parameters.
  20. </p>
  21. <h2>Properties</h2>
  22. <p>See the base [page:Curve] class for common properties.</p>
  23. <h3>[property:array curves]</h3>
  24. <p>The array of [page:Curve Curves].</p>
  25. <h3>[property:boolean autoClose]</h3>
  26. <p>Whether or not to automatically close the path.</p>
  27. <h2>Methods</h2>
  28. <p>See the base [page:Curve] class for common methods.</p>
  29. <h3>[method:null add]( [param:Curve curve] )</h3>
  30. <p>Add a curve to the [page:.curves] array.</p>
  31. <h3>[method:null closePath]()</h3>
  32. <p>Adds a [page:LineCurve lineCurve] to close the path.</p>
  33. <h3>[method:Array getCurveLengths]()</h3>
  34. <p>Get list of cumulative curve lengths of the curves in the [page:.curves] array.</p>
  35. <h3>[method:Vector getPoint]( [param:Float t] )</h3>
  36. <p>
  37. [page:Float t] - A position on the curve. Must be in the range [ 0, 1 ]. <br><br />
  38. Returns a vector for a given position on the curve path.
  39. </p>
  40. <h3>[method:Array getPoints]( [param:Integer divisions] )</h3>
  41. <p>
  42. divisions -- number of pieces to divide the curve into. Default is *12*.<br /><br />
  43. Returns a set of divisions + 1 points using getPoint( t ).
  44. </p>
  45. <h3>[method:Array getSpacedPoints]( [param:Integer divisions] )</h3>
  46. <p>
  47. divisions -- number of pieces to divide the curve into. Default is *40*.<br /><br />
  48. Returns a set of divisions + 1 equi-spaced points using getPointAt( u ).
  49. </p>
  50. <h2>Source</h2>
  51. <p>
  52. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  53. </p>
  54. </body>
  55. </html>