line.lua 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. return {
  2. tag = 'drawing',
  3. summary = 'Draw a line.',
  4. description = [[
  5. Draws a line between points. `Pass:mesh` can also be used to draw line segments using the
  6. `line` `DrawMode`.
  7. ]],
  8. arguments = {
  9. x1 = {
  10. type = 'number',
  11. description = 'The x coordinate of the first point.'
  12. },
  13. y1 = {
  14. type = 'number',
  15. description = 'The y coordinate of the first point.'
  16. },
  17. z1 = {
  18. type = 'number',
  19. description = 'The z coordinate of the first point.'
  20. },
  21. x2 = {
  22. type = 'number',
  23. description = 'The x coordinate of the next point.'
  24. },
  25. y2 = {
  26. type = 'number',
  27. description = 'The y coordinate of the next point.'
  28. },
  29. z2 = {
  30. type = 'number',
  31. description = 'The z coordinate of the next point.'
  32. },
  33. t = {
  34. type = 'table',
  35. description = [[
  36. A table of numbers or `Vec3` objects (not a mix) representing points of the line.
  37. ]]
  38. },
  39. v1 = {
  40. type = 'Vec3',
  41. description = 'A vector containing the position of the first point of the line.'
  42. },
  43. v2 = {
  44. type = 'Vec3',
  45. description = 'A vector containing the position of the next point on the line.'
  46. },
  47. ['...'] = {
  48. type = '*',
  49. description = 'More points to add to the line.'
  50. }
  51. },
  52. returns = {},
  53. variants = {
  54. {
  55. arguments = { 'x1', 'y1', 'z1', 'x2', 'y2', 'z2', '...' },
  56. returns = {}
  57. },
  58. {
  59. arguments = { 't' },
  60. returns = {}
  61. },
  62. {
  63. arguments = { 'v1', 'v2', '...' },
  64. returns = {}
  65. }
  66. },
  67. notes = 'There is currently no way to increase line thickness.'
  68. }