CurvePath.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <!DOCTYPE html>
  2. <html lang="zh">
  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. 一个扩展了[page:Curve]的抽象基类。CurvePath仅仅是一个已连接的曲线的数组,但保留了曲线的API。
  14. </p>
  15. <h2>构造函数</h2>
  16. <h3>[name]()</h3>
  17. <p>
  18. 构造函数中不传入参数。
  19. </p>
  20. <h2>属性</h2>
  21. <p>共有属性请参见其基类[page:Curve]。</p>
  22. <h3>[property:Array curves]</h3>
  23. <p>[page:Curve Curves]数组。</p>
  24. <h3>[property:Boolean autoClose]</h3>
  25. <p>是否自动闭合路径。</p>
  26. <h2>方法</h2>
  27. <p>共有方法请参见其基类[page:Curve]。</p>
  28. <h3>[method:null add]( [param:Curve curve] )</h3>
  29. <p>添加一条曲线到[page:.curves]数组中。</p>
  30. <h3>[method:null closePath]()</h3>
  31. <p>添加一条[page:LineCurve lineCurve]用于闭合路径。</p>
  32. <h3>[method:Array getCurveLengths]()</h3>
  33. <p>Get list of cumulative curve lengths of the curves in the [page:.curves] array.</p>
  34. <h3>[method:Vector getPoint]( [param:Float t] )</h3>
  35. <p>
  36. [page:Float t] - A position on the curve. Must be in the range [ 0, 1 ]. <br><br />
  37. Returns a vector for a given position on the curve path.
  38. </p>
  39. <h3>[method:Array getPoints]( [param:Integer divisions] )</h3>
  40. <p>
  41. divisions -- 曲线分段数量。默认值为*12*。<br /><br />
  42. 返回一组使用getPoint( t )获得的divisions + 1个点。
  43. </p>
  44. <h3>[method:Array getSpacedPoints]( [param:Integer divisions] )</h3>
  45. <p>
  46. divisions -- 曲线分段数量。默认值为*40*。<br /><br />
  47. 返回一组使用getPointAt( u )获得的divisions + 1个均分点。
  48. </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>