set.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. return {
  2. summary = 'Set the components of the vector.',
  3. description = 'Sets the components of the vector, either from numbers or an existing vector.',
  4. arguments = {
  5. x = {
  6. type = 'number',
  7. default = '0',
  8. description = 'The new x value of the vector.'
  9. },
  10. y = {
  11. type = 'number',
  12. default = 'x',
  13. description = 'The new y value of the vector.'
  14. },
  15. z = {
  16. type = 'number',
  17. default = 'x',
  18. description = 'The new z value of the vector.'
  19. },
  20. u = {
  21. type = 'Vec3',
  22. description = 'The vector to copy the values from.'
  23. },
  24. q = {
  25. type = 'Quat',
  26. description = 'A quat to use the direction of.'
  27. },
  28. m = {
  29. type = 'Mat4',
  30. description = 'The matrix to use the position of.'
  31. }
  32. },
  33. returns = {
  34. v = {
  35. type = 'Vec3',
  36. description = 'The input vector.'
  37. }
  38. },
  39. variants = {
  40. {
  41. arguments = { 'x', 'y', 'z' },
  42. returns = { 'v' }
  43. },
  44. {
  45. arguments = { 'u' },
  46. returns = { 'v' }
  47. },
  48. {
  49. arguments = { 'q' },
  50. returns = { 'v' }
  51. },
  52. {
  53. arguments = { 'm' },
  54. returns = { 'v' }
  55. }
  56. },
  57. related = {
  58. 'Vec3:unpack'
  59. }
  60. }