scale.lua 890 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. return {
  2. summary = 'Scale the matrix.',
  3. description = 'Scales the matrix.',
  4. arguments = {
  5. scale = {
  6. type = 'Vec3',
  7. description = 'The 3D scale to apply.'
  8. },
  9. sx = {
  10. type = 'number',
  11. description = 'The x component of the scale to apply.'
  12. },
  13. sy = {
  14. type = 'number',
  15. default = 'sx',
  16. description = 'The y component of the scale to apply.'
  17. },
  18. sz = {
  19. type = 'number',
  20. default = 'sx',
  21. description = 'The z component of the scale to apply.'
  22. }
  23. },
  24. returns = {
  25. self = {
  26. type = 'Mat4',
  27. description = 'The modified matrix.'
  28. }
  29. },
  30. variants = {
  31. {
  32. arguments = { 'scale' },
  33. returns = { 'self' }
  34. },
  35. {
  36. arguments = { 'sx', 'sy', 'sz' },
  37. returns = { 'self' }
  38. }
  39. },
  40. related = {
  41. 'Mat4:translate',
  42. 'Mat4:rotate',
  43. 'Mat4:identity'
  44. }
  45. }