getWidth.lua 652 B

12345678910111213141516171819202122232425262728
  1. return {
  2. tag = 'canvas',
  3. summary = 'Get the width of the Pass\'s canvas.',
  4. description = 'Returns the width of the textures of the Pass\'s canvas, in pixels.',
  5. arguments = {},
  6. returns = {
  7. width = {
  8. type = 'number',
  9. description = 'The texture width.'
  10. }
  11. },
  12. variants = {
  13. {
  14. arguments = {},
  15. returns = { 'width' }
  16. }
  17. },
  18. notes = 'If the pass doesn\'t have a canvas, this function returns zero.',
  19. related = {
  20. 'Pass:getHeight',
  21. 'Pass:getDimensions',
  22. 'Pass:getViewCount',
  23. 'Pass:getCanvas',
  24. 'Pass:setCanvas',
  25. 'lovr.system.getWindowWidth',
  26. 'lovr.headset.getDisplayWidth'
  27. }
  28. }