CurvePath.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Curve] &rarr;
  12. <h1>曲线路径([name])</h1>
  13. <p class="desc">
  14. 一个扩展了[page:Curve]的抽象基类。CurvePath仅仅是一个已连接的曲线的数组,但保留了曲线的API。
  15. </p>
  16. <h2>构造函数</h2>
  17. <h3>[name]()</h3>
  18. <p>
  19. 构造函数中不传入参数。
  20. </p>
  21. <h2>属性</h2>
  22. <p>共有属性请参见其基类[page:Curve]。</p>
  23. <h3>[property:array curves]</h3>
  24. <p>[page:Curve Curves]数组。</p>
  25. <h3>[property:boolean autoClose]</h3>
  26. <p>是否自动闭合路径。</p>
  27. <h2>方法</h2>
  28. <p>共有方法请参见其基类[page:Curve]。</p>
  29. <h3>[method:null add]( [param:Curve curve] )</h3>
  30. <p>添加一条曲线到[page:.curves]数组中。</p>
  31. <h3>[method:null closePath]()</h3>
  32. <p>添加一条[page:LineCurve lineCurve]用于闭合路径。</p>
  33. <h3>[method:Float getCurveLengths]()</h3>
  34. <p>将[page:.curves]数组中曲线的长度相加。</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 -- 曲线分段数量。默认值为*12*。<br /><br />
  43. 返回一组使用getPoint( t )获得的divisions + 1个点。
  44. </p>
  45. <h3>[method:Array getSpacedPoints]( [param:Integer divisions] )</h3>
  46. <p>
  47. divisions -- 曲线分段数量。默认值为*40*。<br /><br />
  48. 返回一组使用getPointAt( u )获得的divisions + 1个均分点。
  49. </p>
  50. <h2>源代码</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>