Browse Source

Update HeadsetType and HeadsetDriver docs;

bjorn 6 years ago
parent
commit
f73dc05cdb
4 changed files with 570 additions and 1597 deletions
  1. 531 1592
      api/init.lua
  2. 21 0
      api/lovr/headset/HeadsetDriver.lua
  3. 16 0
      api/lovr/headset/getDriver.lua
  4. 2 5
      api/lovr/headset/getType.lua

File diff suppressed because it is too large
+ 531 - 1592
api/init.lua


+ 21 - 0
api/lovr/headset/HeadsetDriver.lua

@@ -0,0 +1,21 @@
+return {
+  summary = 'VR APIs.',
+  description = [[
+    These are all of the supported VR APIs that LÖVR can use to power the lovr.headset module.  You
+    can change the order of headset drivers using `lovr.conf` to prefer or exclude specific VR APIs.
+  ]],
+  values = {
+    {
+      name = 'fake',
+      description = 'A VR simulator using keyboard/mouse.'
+    },
+    {
+      name = 'openvr',
+      description = 'OpenVR.'
+    },
+    {
+      name = 'webvr',
+      description = 'WebVR.'
+    }
+  }
+}

+ 16 - 0
api/lovr/headset/getDriver.lua

@@ -0,0 +1,16 @@
+return {
+  tag = 'headset',
+  summary = 'Get the VR API currently in use.',
+  description = [[
+    Returns the `HeadsetDriver` that is currently powering the lovr.headset module.  You can change
+    the order of headset drivers using `lovr.conf` to prefer or exclude specific VR APIs.
+  ]],
+  arguments = {},
+  returns = {
+    {
+      name = 'driver',
+      type = 'HeadsetDriver',
+      description = 'The driver of the headset in use, e.g. "OpenVR".'
+    }
+  }
+}

+ 2 - 5
api/lovr/headset/getType.lua

@@ -1,15 +1,12 @@
 return {
 return {
   tag = 'headset',
   tag = 'headset',
   summary = 'Get the type of connected headset.',
   summary = 'Get the type of connected headset.',
-  description = [[
-    Get the type of headset.  Currently only the HTC Vive is supported, though support for the
-    Oculus Rift and other devices is planned.
-  ]],
+  description = 'Returns the type of headset as a string, see HeadsetType.',
   arguments = {},
   arguments = {},
   returns = {
   returns = {
     {
     {
       name = 'type',
       name = 'type',
-      type = 'string',
+      type = 'HeadsetType',
       description = 'The type of the headset as a string, e.g. "Vive" for the HTC Vive.'
       description = 'The type of the headset as a string, e.g. "Vive" for the HTC Vive.'
     }
     }
   }
   }

Some files were not shown because too many files changed in this diff