evaluate.lua 1014 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. t = {
  10. type = 'number',
  11. description = 'The parameter to evaluate the Curve at.'
  12. }
  13. },
  14. returns = {
  15. x = {
  16. type = 'number',
  17. description = 'The x position of the point.'
  18. },
  19. y = {
  20. type = 'number',
  21. description = 'The y position of the point.'
  22. },
  23. z = {
  24. type = 'number',
  25. description = 'The z position of the point.'
  26. }
  27. },
  28. variants = {
  29. {
  30. arguments = { 't' },
  31. returns = { 'x', 'y', 'z' }
  32. }
  33. },
  34. notes = [[
  35. An error will be thrown if `t` is not between 0 and 1, or if the Curve has less than two points.
  36. ]],
  37. related = {
  38. 'Curve:getTangent',
  39. 'Curve:render',
  40. 'Curve:slice'
  41. }
  42. }