getDimensions.lua 765 B

1234567891011121314151617181920212223242526272829303132
  1. return {
  2. tag = 'canvas',
  3. summary = 'Get the dimensions of the Pass\'s canvas.',
  4. description = 'Returns the dimensions 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. height = {
  12. type = 'number',
  13. description = 'The texture height.'
  14. }
  15. },
  16. variants = {
  17. {
  18. arguments = {},
  19. returns = { 'width', 'height' }
  20. }
  21. },
  22. notes = 'If the pass doesn\'t have a canvas, this function returns zeros.',
  23. related = {
  24. 'Pass:getWidth',
  25. 'Pass:getHeight',
  26. 'Pass:getViewCount',
  27. 'Pass:getCanvas',
  28. 'Pass:setCanvas',
  29. 'lovr.system.getWindowDimensions',
  30. 'lovr.headset.getDisplayDimensions'
  31. }
  32. }