plane.lua 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. return {
  2. tag = 'drawing',
  3. summary = 'Draw a plane.',
  4. description = 'Draws a plane.',
  5. arguments = {
  6. x = {
  7. type = 'number',
  8. default = '0',
  9. description = 'The x coordinate of the center of the plane.'
  10. },
  11. y = {
  12. type = 'number',
  13. default = '0',
  14. description = 'The y coordinate of the center of the plane.'
  15. },
  16. z = {
  17. type = 'number',
  18. default = '0',
  19. description = 'The z coordinate of the center of the plane.'
  20. },
  21. width = {
  22. type = 'number',
  23. default = '1',
  24. description = 'The width of the plane.'
  25. },
  26. height = {
  27. type = 'number',
  28. default = '1',
  29. description = 'The height of the plane.'
  30. },
  31. angle = {
  32. type = 'number',
  33. default = '0',
  34. description = 'The rotation of the plane around its rotation axis, in radians.'
  35. },
  36. ax = {
  37. type = 'number',
  38. default = '0',
  39. description = 'The x component of the axis of rotation.'
  40. },
  41. ay = {
  42. type = 'number',
  43. default = '1',
  44. description = 'The y component of the axis of rotation.'
  45. },
  46. az = {
  47. type = 'number',
  48. default = '0',
  49. description = 'The z component of the axis of rotation.'
  50. },
  51. position = {
  52. type = 'Vec3',
  53. description = 'The position of the plane.'
  54. },
  55. size = {
  56. type = 'Vec2',
  57. description = 'The size of the plane.'
  58. },
  59. orientation = {
  60. type = 'Quat',
  61. description = 'The orientation of the plane.'
  62. },
  63. transform = {
  64. type = 'Mat4',
  65. description = 'The transform of the plane.'
  66. },
  67. style = {
  68. type = 'DrawStyle',
  69. default = [['fill']],
  70. description = 'Whether the plane should be drawn filled or outlined.'
  71. },
  72. columns = {
  73. type = 'number',
  74. default = '1',
  75. description = 'The number of horizontal segments in the plane.'
  76. },
  77. rows = {
  78. type = 'number',
  79. default = 'columns',
  80. description = 'The number of vertical segments in the plane.'
  81. }
  82. },
  83. returns = {},
  84. variants = {
  85. {
  86. arguments = { 'x', 'y', 'z', 'width', 'height', 'angle', 'ax', 'ay', 'az', 'style', 'columns', 'rows' },
  87. returns = {}
  88. },
  89. {
  90. arguments = { 'position', 'size', 'orientation', 'style', 'columns', 'rows' },
  91. returns = {}
  92. },
  93. {
  94. arguments = { 'transform', 'style', 'columns', 'rows' },
  95. returns = {}
  96. }
  97. }
  98. }