vec3.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. return {
  2. tag = 'vectors',
  3. summary = 'Create a temporary Vec3.',
  4. description = [[
  5. Creates a temporary 3D vector. This function takes the same arguments as `Vec3:set`.
  6. ]],
  7. arguments = {
  8. x = {
  9. type = 'number',
  10. default = '0',
  11. description = 'The x value of the vector.'
  12. },
  13. y = {
  14. type = 'number',
  15. default = 'x',
  16. description = 'The y value of the vector.'
  17. },
  18. z = {
  19. type = 'number',
  20. default = 'x',
  21. description = 'The z value of the vector.'
  22. },
  23. u = {
  24. type = 'Vec3',
  25. description = 'A vector to copy the values from.'
  26. },
  27. m = {
  28. type = 'Mat4',
  29. description = 'A matrix to use the position of.'
  30. },
  31. q = {
  32. type = 'Quat',
  33. description = 'A quat to use the direction of.'
  34. }
  35. },
  36. returns = {
  37. v = {
  38. type = 'Vec3',
  39. description = 'The new vector.'
  40. }
  41. },
  42. variants = {
  43. {
  44. arguments = { 'x', 'y', 'z' },
  45. returns = { 'v' }
  46. },
  47. {
  48. arguments = { 'u' },
  49. returns = { 'v' }
  50. },
  51. {
  52. arguments = { 'm' },
  53. returns = { 'v' }
  54. },
  55. {
  56. arguments = { 'q' },
  57. returns = { 'v' }
  58. }
  59. },
  60. related = {
  61. 'lovr.math.newVec3',
  62. 'Vec3',
  63. 'Vectors'
  64. }
  65. }