Browse Source

Document hand/left/point and hand/right/point;

bjorn 2 years ago
parent
commit
1a00e11bb2
2 changed files with 32 additions and 9 deletions
  1. 15 5
      api/init.lua
  2. 17 4
      api/lovr/headset/Device.lua

+ 15 - 5
api/init.lua

@@ -18390,11 +18390,20 @@ return {
           description = "Different types of input devices supported by the `lovr.headset` module.",
           key = "Device",
           module = "lovr.headset",
+          notes = "The difference between `hand/left` and `hand/left/point` is the first represents an object held in the hand, whereas the second represents the laser pointer used to aim.  Drawing a controller model would use `hand/left`, whereas drawing a pointer or aiming would use `hand/left/point`.",
           values = {
             {
               name = "head",
               description = "The headset."
             },
+            {
+              name = "left",
+              description = "A shorthand for hand/left."
+            },
+            {
+              name = "right",
+              description = "A shorthand for hand/right."
+            },
             {
               name = "hand/left",
               description = "The left controller."
@@ -18404,12 +18413,12 @@ return {
               description = "The right controller."
             },
             {
-              name = "left",
-              description = "A shorthand for hand/left."
+              name = "hand/left/point",
+              description = "The left controller pointer (pose only)."
             },
             {
-              name = "right",
-              description = "A shorthand for hand/right."
+              name = "hand/right/point",
+              description = "The right controller pointer (pose only)."
             },
             {
               name = "elbow/left",
@@ -22593,7 +22602,8 @@ return {
                     {
                       name = "raw",
                       type = "boolean",
-                      description = "Whether to return the 16 raw components."
+                      description = "Whether to return the 16 raw components.",
+                      default = "false"
                     }
                   },
                   returns = {

+ 17 - 4
api/lovr/headset/Device.lua

@@ -5,6 +5,14 @@ return {
       name = 'head',
       description = 'The headset.'
     },
+    {
+      name = 'left',
+      description = 'A shorthand for hand/left.'
+    },
+    {
+      name = 'right',
+      description = 'A shorthand for hand/right.'
+    },
     {
       name = 'hand/left',
       description = 'The left controller.'
@@ -14,12 +22,12 @@ return {
       description = 'The right controller.'
     },
     {
-      name = 'left',
-      description = 'A shorthand for hand/left.'
+      name = 'hand/left/point',
+      description = 'The left controller pointer (pose only).'
     },
     {
-      name = 'right',
-      description = 'A shorthand for hand/right.'
+      name = 'hand/right/point',
+      description = 'The right controller pointer (pose only).'
     },
     {
       name = 'elbow/left',
@@ -78,6 +86,11 @@ return {
       description = 'The right eye.'
     }
   },
+  notes = [[
+    The difference between `hand/left` and `hand/left/point` is the first represents an object held
+    in the hand, whereas the second represents the laser pointer used to aim.  Drawing a controller
+    model would use `hand/left`, whereas drawing a pointer or aiming would use `hand/left/point`.
+  ]],
   related = {
     'DeviceAxis',
     'DeviceButton',