Browse Source

Update HeadsetType and HeadsetDriver docs;

bjorn 6 years ago
parent
commit
002fca148f

File diff suppressed because it is too large
+ 541 - 1602
api/init.lua


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

@@ -0,0 +1,29 @@
+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 = 'oculus',
+      description = 'Oculus Desktop SDK.'
+    },
+    {
+      name = 'oculusmobile',
+      description = 'Oculus Mobile SDK.'
+    },
+    {
+      name = 'openvr',
+      description = 'OpenVR.'
+    },
+    {
+      name = 'webvr',
+      description = 'WebVR.'
+    }
+  }
+}

+ 8 - 0
api/lovr/headset/HeadsetType.lua

@@ -10,6 +10,14 @@ return {
       name = 'rift',
       description = 'Oculus Rift.'
     },
+    {
+      name = 'go',
+      description = 'Oculus Go.'
+    },
+    {
+      name = 'gear',
+      description = 'Gear VR.'
+    },
     {
       name = 'windowsmr',
       description = 'A Windows Mixed Reality headset.'

+ 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 {
   tag = '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 = {},
   returns = {
     {
       name = 'type',
-      type = 'string',
+      type = 'HeadsetType',
       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