CurvePath.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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
  14. array of connected curves, but retains the api of a curve.
  15. </p>
  16. <h2>Constructor</h2>
  17. <h3>[name]()</h3>
  18. <p>The constructor take no parameters.</p>
  19. <h2>Properties</h2>
  20. <p>See the base [page:Curve] class for common properties.</p>
  21. <h3>[property:Array curves]</h3>
  22. <p>The array of [page:Curve Curves].</p>
  23. <h3>[property:Boolean autoClose]</h3>
  24. <p>Whether or not to automatically close the path.</p>
  25. <h2>Methods</h2>
  26. <p>See the base [page:Curve] class for common methods.</p>
  27. <h3>[method:undefined add]( [param:Curve curve] )</h3>
  28. <p>Add a curve to the [page:.curves] array.</p>
  29. <h3>[method:this closePath]()</h3>
  30. <p>Adds a [page:LineCurve lineCurve] to close the path.</p>
  31. <h3>[method:Array getCurveLengths]()</h3>
  32. <p>
  33. Get list of cumulative curve lengths of the curves in the [page:.curves]
  34. array.
  35. </p>
  36. <h3>[method:Array getPoints]( [param:Integer divisions] )</h3>
  37. <p>
  38. divisions -- number of pieces to divide the curve into. Default is
  39. `12`.<br /><br />
  40. Returns an array of points representing a sequence of curves. The
  41. `division` parameter defines the number of pieces each curve is divided
  42. into. However, for optimization and quality purposes, the actual sampling
  43. resolution for each curve depends on its type. For example, for a
  44. [page:LineCurve], the returned number of points is always just 2.
  45. </p>
  46. <h3>[method:Array getSpacedPoints]( [param:Integer divisions] )</h3>
  47. <p>
  48. divisions -- number of pieces to divide the curve into. Default is
  49. `40`.<br /><br />
  50. Returns a set of divisions + 1 equi-spaced points using getPointAt( u ).
  51. </p>
  52. <h2>Source</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>