setTexture.lua 780 B

123456789101112131415161718192021222324252627282930313233
  1. return {
  2. summary = 'Set a texture for the Material.',
  3. description = [[
  4. Sets a texture for a Material. Several predefined `MaterialTexture`s are supported. Any
  5. texture that is `nil` will use a single white pixel as a fallback.
  6. ]],
  7. arguments = {
  8. textureType = {
  9. type = 'MaterialTexture',
  10. default = [['diffuse']],
  11. description = 'The type of texture to set.'
  12. },
  13. texture = {
  14. type = 'Texture',
  15. description = 'The texture to apply, or `nil` to use the default.'
  16. }
  17. },
  18. returns = {},
  19. variants = {
  20. {
  21. arguments = { 'textureType', 'texture' },
  22. returns = {}
  23. },
  24. {
  25. arguments = { 'texture' },
  26. returns = {}
  27. }
  28. },
  29. related = {
  30. 'MaterialTexture',
  31. 'lovr.graphics.newTexture'
  32. }
  33. }