newVec3.lua 1.2 KB

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