newCurve.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. return {
  2. tag = 'mathOther',
  3. summary = 'Create a new Curve.',
  4. description = 'Creates a new `Curve` from a list of control points.',
  5. arguments = {
  6. n = {
  7. type = 'number',
  8. description = 'The number of points to reserve for the Curve.'
  9. },
  10. x = {
  11. type = 'number',
  12. description = 'The x coordinate of the first control point.'
  13. },
  14. y = {
  15. type = 'number',
  16. description = 'The y coordinate of the first control point.'
  17. },
  18. z = {
  19. type = 'number',
  20. description = 'The z coordinate of the first control point.'
  21. },
  22. ['...'] = {
  23. type = '*',
  24. description = 'Additional control points.'
  25. },
  26. points = {
  27. type = 'table',
  28. description = 'A table of points, as above.'
  29. }
  30. },
  31. returns = {
  32. curve = {
  33. type = 'Curve',
  34. description = 'The new Curve.'
  35. }
  36. },
  37. variants = {
  38. {
  39. description = 'Create a Curve from a set of initial control points.',
  40. arguments = { 'x', 'y', 'z', '...' },
  41. returns = { 'curve' }
  42. },
  43. {
  44. description = 'Create a Curve from a (flat) table of points.',
  45. arguments = { 'points' },
  46. returns = { 'curve' }
  47. },
  48. {
  49. description = [[
  50. Create an empty Curve, reserving space ahead of time for a certain number of control points.
  51. ]],
  52. arguments = { 'n' },
  53. returns = { 'curve' }
  54. }
  55. }
  56. }