Browse Source

Update lovr.headset.getAxis ranges; Rebuild;

bjorn 5 years ago
parent
commit
d70dc01827
2 changed files with 15 additions and 23 deletions
  1. 7 18
      api/init.lua
  2. 8 5
      api/lovr/headset/getAxis.lua

+ 7 - 18
api/init.lua

@@ -13337,10 +13337,6 @@ return {
           key = "DeviceAxis",
           module = "lovr.headset",
           values = {
-            {
-              name = "primary",
-              description = "The primary analog axis (usually thumbstick or touchpad)."
-            },
             {
               name = "trigger",
               description = "A trigger (1D)."
@@ -13353,10 +13349,6 @@ return {
               name = "touchpad",
               description = "A touchpad (2D)."
             },
-            {
-              name = "pinch",
-              description = "A tracked pinch gesture between the thumb and index finger (1D, Leap Motion)."
-            },
             {
               name = "grip",
               description = "A grip button or grab gesture (1D)."
@@ -13373,10 +13365,6 @@ return {
           key = "DeviceButton",
           module = "lovr.headset",
           values = {
-            {
-              name = "primary",
-              description = "The primary button (usually trigger)."
-            },
             {
               name = "trigger",
               description = "The trigger button."
@@ -13554,13 +13542,9 @@ return {
           name = "getAxis",
           tag = "input",
           summary = "Get the state of an analog axis on a device.",
-          description = "Get the current state of an analog axis on a device.  Axis values are between 0 and 1.  Some axes are multidimensional, for example a 2D touchpad or thumbstick with x/y axes.  For multidimensional axes, this function will return multiple values, one number for each axis.  In these cases, it can be useful to use the `select` function built in to Lua to select a particular axis component.",
+          description = "Get the current state of an analog axis on a device.  Some axes are multidimensional, for example a 2D touchpad or thumbstick with x/y axes.  For multidimensional axes, this function will return multiple values, one number for each axis.  In these cases, it can be useful to use the `select` function built in to Lua to select a particular axis component.",
           key = "lovr.headset.getAxis",
           module = "lovr.headset",
-          related = {
-            "DeviceAxis",
-            "lovr.headset.isDown"
-          },
           variants = {
             {
               arguments = {
@@ -13583,7 +13567,12 @@ return {
                 }
               }
             }
-          }
+          },
+          related = {
+            "DeviceAxis",
+            "lovr.headset.isDown"
+          },
+          notes = "The axis values will be between 0 and 1 for 1D axes, and between -1 and 1 for multidimensional axes."
         },
         {
           name = "getBoundsDepth",

+ 8 - 5
api/lovr/headset/getAxis.lua

@@ -2,11 +2,10 @@ return {
   tag = 'input',
   summary = 'Get the state of an analog axis on a device.',
   description = [[
-    Get the current state of an analog axis on a device.  Axis values are between 0 and 1.  Some
-    axes are multidimensional, for example a 2D touchpad or thumbstick with x/y axes.  For
-    multidimensional axes, this function will return multiple values, one number for each axis.  In
-    these cases, it can be useful to use the `select` function built in to Lua to select a
-    particular axis component.
+    Get the current state of an analog axis on a device.  Some axes are multidimensional, for
+    example a 2D touchpad or thumbstick with x/y axes.  For multidimensional axes, this function
+    will return multiple values, one number for each axis.  In these cases, it can be useful to use
+    the `select` function built in to Lua to select a particular axis component.
   ]],
   arguments = {
     {
@@ -30,6 +29,10 @@ return {
       ]]
     }
   },
+  notes = [[
+    The axis values will be between 0 and 1 for 1D axes, and between -1 and 1 for multidimensional
+    axes.
+  ]],
   related = {
     'DeviceAxis',
     'lovr.headset.isDown'