set.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. m = {
  25. type = 'Mat4',
  26. description = 'The matrix to use the position of.'
  27. }
  28. },
  29. returns = {
  30. v = {
  31. type = 'Vec3',
  32. description = 'The input vector.'
  33. }
  34. },
  35. variants = {
  36. {
  37. arguments = { 'x', 'y', 'z' },
  38. returns = { 'v' }
  39. },
  40. {
  41. arguments = { 'u' },
  42. returns = { 'v' }
  43. },
  44. {
  45. arguments = { 'm' },
  46. returns = { 'v' }
  47. }
  48. },
  49. related = {
  50. 'Vec3:unpack'
  51. }
  52. }