Spline.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <script src="../../list.js"></script>
  6. <script src="../../page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="../../page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <div class="desc">Represents a spline.</div>
  12. <h2>Constructor</h2>
  13. <h3>[name]( [page:Array points] )</h3>
  14. <div>Initialises the spline with *points*, which are the places through which the spline will go.</div>
  15. <h2>Properties</h2>
  16. <h3>.[page:Vector3 todo]</h3>
  17. <h2>Methods</h2>
  18. <h3>.initFromArray( [page:Array a] )</h3>
  19. <div>
  20. a — array of triplets containing x, y, z coordinates<br />
  21. </div>
  22. <div>Initialises using the data in the array as a series of points. Each value in *a* must be another array with three values, where a[n] is v, the value for the *nth* point, and v[0], v[1] and v[2] are the x, y and z coordinates of that point n, respectively.
  23. </div>
  24. <h3>.getPoint( [page:Integer k] )</h3>
  25. <div>
  26. k — point index
  27. </div>
  28. <div>Return the interpolated point at *k*.</div>
  29. <h3>.getControlPointsArray( )</h3>
  30. <div>Returns an array with triplets of x, y, z coordinates that correspond to the current control points.
  31. </div>
  32. <h3>.getLength( [page:Integer nSubDivisions] )</h3>
  33. <div>
  34. nSubDivisions — number of subdivisions between control points. Default is *100*.
  35. </div>
  36. <div>Returns the length of the spline when using nSubDivisions.</div>
  37. <h3>.reparametrizeByArcLength( [page:Float samplingCoef] )</h3>
  38. <div>
  39. samplingCoef — TODO
  40. </div>
  41. <div>TODO ???</div>
  42. <h2>Source</h2>
  43. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  44. </body>
  45. </html>