getViewport.lua 785 B

1234567891011121314151617181920212223242526272829303132
  1. return {
  2. summary = 'Get the viewport of the layer.',
  3. description = [[
  4. Returns the viewport of the layer. The viewport is a 2D region of pixels that the layer will
  5. display within its plane.
  6. ]],
  7. arguments = {},
  8. returns = {
  9. x = {
  10. type = 'number',
  11. description = 'The x coordinate of the upper-left corner of the viewport.',
  12. },
  13. y = {
  14. type = 'number',
  15. description = 'The y coordinate of the upper-left corner of the viewport.',
  16. },
  17. w = {
  18. type = 'number',
  19. description = 'The width of the viewport, in pixels.',
  20. },
  21. h = {
  22. type = 'number',
  23. description = 'The height of the viewport, in pixels.',
  24. }
  25. },
  26. variants = {
  27. {
  28. arguments = {},
  29. returns = { 'x', 'y', 'w', 'h' }
  30. }
  31. }
  32. }