getLayers.lua 761 B

12345678910111213141516171819202122232425262728293031
  1. return {
  2. tag = 'layers',
  3. summary = 'Get the list of active layers.',
  4. description = [[
  5. Returns the list of active `Layer` objects. These are the layers that will be rendered in the
  6. headset's display. They are rendered in order.
  7. ]],
  8. arguments = {},
  9. returns = {
  10. layers = {
  11. type = 'table',
  12. description = 'The list of layers.'
  13. }
  14. },
  15. variants = {
  16. {
  17. arguments = {},
  18. returns = { 'layers' }
  19. }
  20. },
  21. notes = [[
  22. Currently some VR systems are able to sort the layers by their Z depth, but on others layers
  23. later in the list will render on top of previous layers, regardless of depth.
  24. There is currently a maximum of 10 layers.
  25. ]],
  26. related = {
  27. 'lovr.headset.newLayer',
  28. 'Layer'
  29. }
  30. }