evaluate.lua 977 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. return {
  2. summary = 'Turn a number from 0 to 1 into a point on the Curve.',
  3. description = [[
  4. Returns a point on the Curve given a parameter `t` from 0 to 1. 0 will return the first
  5. control point, 1 will return the last point, .5 will return a point in the "middle" of the
  6. Curve, etc.
  7. ]],
  8. arguments = {
  9. {
  10. name = 't',
  11. type = 'number',
  12. description = 'The parameter to evaluate the Curve at.'
  13. }
  14. },
  15. returns = {
  16. {
  17. name = 'x',
  18. type = 'number',
  19. description = 'The x position of the point.'
  20. },
  21. {
  22. name = 'y',
  23. type = 'number',
  24. description = 'The y position of the point.'
  25. },
  26. {
  27. name = 'z',
  28. type = 'number',
  29. description = 'The z position of the point.'
  30. }
  31. },
  32. notes = [[
  33. An error will be thrown if `t` is not between 0 and 1, or if the Curve has less than two points.
  34. ]],
  35. related = {
  36. 'Curve:getTangent',
  37. 'Curve:render',
  38. 'Curve:slice'
  39. }
  40. }