getColor.lua 972 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. return {
  2. summary = 'Get a color property of the Material.',
  3. description = [[
  4. Returns a color property for a Material. Different types of colors are supported for different
  5. lighting parameters. Colors default to `(1.0, 1.0, 1.0, 1.0)` and are gamma corrected.
  6. ]],
  7. arguments = {
  8. {
  9. name = 'colorType',
  10. type = 'MaterialColor',
  11. default = [['diffuse']],
  12. description = 'The type of color to get.'
  13. }
  14. },
  15. returns = {
  16. {
  17. name = 'r',
  18. type = 'number',
  19. description = 'The red component of the color.'
  20. },
  21. {
  22. name = 'g',
  23. type = 'number',
  24. description = 'The green component of the color.'
  25. },
  26. {
  27. name = 'b',
  28. type = 'number',
  29. description = 'The blue component of the color.'
  30. },
  31. {
  32. name = 'a',
  33. type = 'number',
  34. description = 'The alpha component of the color.'
  35. }
  36. },
  37. related = {
  38. 'MaterialColor',
  39. 'lovr.graphics.setColor'
  40. }
  41. }