newCurve.lua 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. v = {
  23. type = 'Vec3',
  24. description = 'The first control point.'
  25. },
  26. ['...'] = {
  27. type = '*',
  28. description = 'Additional control points.'
  29. },
  30. points = {
  31. type = 'table',
  32. description = 'A table of control points, formatted as numbers or `Vec3` objects.'
  33. }
  34. },
  35. returns = {
  36. curve = {
  37. type = 'Curve',
  38. description = 'The new Curve.'
  39. }
  40. },
  41. variants = {
  42. {
  43. description = 'Create a Curve from a set of initial control points.',
  44. arguments = { 'x', 'y', 'z', '...' },
  45. returns = { 'curve' }
  46. },
  47. {
  48. description = 'Create a Curve from a set of initial control points, using vectors.',
  49. arguments = { 'v', '...' },
  50. returns = { 'curve' }
  51. },
  52. {
  53. description = [[
  54. Create a Curve from control points in a table. The table values can be numbers or `Vec3`
  55. objects.
  56. ]],
  57. arguments = { 'points' },
  58. returns = { 'curve' }
  59. },
  60. {
  61. description = [[
  62. Create an empty Curve, reserving space ahead of time for a certain number of control points.
  63. ]],
  64. arguments = { 'n' },
  65. returns = { 'curve' }
  66. }
  67. }
  68. }