isVisible.lua 978 B

123456789101112131415161718192021222324252627282930313233
  1. return {
  2. tag = 'headset-misc',
  3. summary = 'Check if content is being shown in the headset display.',
  4. description = [[
  5. Returns whether LÖVR's content is being presented to the headset display. Normally this will
  6. be true, but some VR runtimes allow applications to be hidden or "minimized", similar to desktop
  7. windows.
  8. ]],
  9. arguments = {},
  10. returns = {
  11. visible = {
  12. type = 'boolean',
  13. description = 'Whether the application is visible.'
  14. }
  15. },
  16. variants = {
  17. {
  18. arguments = {},
  19. returns = { 'visible' }
  20. }
  21. },
  22. notes = [[
  23. `lovr.draw` may still be called even when the application is invisible, and apps should continue
  24. to render the scene normally because the VR system may use this for timing info. If the VR
  25. system decides that the application no longer needs to render, LÖVR will stop calling
  26. `lovr.draw`.
  27. ]],
  28. related = {
  29. 'lovr.visible',
  30. 'lovr.headset.isFocused',
  31. 'lovr.focus'
  32. }
  33. }