Browse Source

Add grip image;

bjorn 1 year ago
parent
commit
cbc127a1d0
2 changed files with 8 additions and 5 deletions
  1. 1 1
      api/init.lua
  2. 7 4
      api/lovr/headset/Device.lua

+ 1 - 1
api/init.lua

@@ -22116,7 +22116,7 @@ return {
           description = "Different types of input devices supported by the `lovr.headset` module.",
           key = "Device",
           module = "lovr.headset",
-          notes = "Here are the differences between the hand sub-devices:\n\n- The `/grip` pose is used to render an object held in the user's hand.  It's positioned at the\n  surface of the palm.  The X axis of the grip orientation is perpendicular to the palm,\n  pointing away from the left palm or into the right palm.  If you imagine the hand holding a\n  stick, the Z axis will be parallel to the stick.\n- The `/point` pose is used to aim or point at objects.  It's usually positioned slightly in\n  front of the hand or controller, and is oriented so the -Z axis points in a natural forward\n  direction.\n- The `pinch` pose is a stable point between the thumb and index finger on a hand, or a point\n  slightly in front of a controller.  The -Z axis will point forward, away from the hand.  It's\n  good for precise, close-range interaction.\n- The `poke` pose is a position located at the tip of the index finger, or a point slightly in\n  front of a controller.  The -Z axis will point forward out of the tip of the finger, the +Y\n  axis will be perpendicular to the fingernail.\n\nThese \"hand pose devices\" do not report any button input with e.g. `lovr.headset.isDown`.  The main `hand/left` and `hand/right` devices should be used for buttons and haptics.",
+          notes = "Here are the differences between the hand sub-devices:\n\nThe `/grip` pose is used to render an object held in the user's hand.  It's positioned at the surface of the palm.  The X axis of the grip orientation is perpendicular to the palm, pointing away from the left palm or into the right palm.  If you imagine the hand holding a stick, the Z axis will be parallel to the stick.\n\n<img src=\"/img/grip.svg\" width=\"100%\"/>\n\n- The `/point` pose is used to aim or point at objects.  It's usually positioned slightly in\n  front of the hand or controller, and is oriented so the -Z axis points in a natural forward\n  direction.\n- The `pinch` pose is a stable point between the thumb and index finger on a hand, or a point\n  slightly in front of a controller.  The -Z axis will point forward, away from the hand.  It's\n  good for precise, close-range interaction.\n- The `poke` pose is a position located at the tip of the index finger, or a point slightly in\n  front of a controller.  The -Z axis will point forward out of the tip of the finger, the +Y\n  axis will be perpendicular to the fingernail.\n\nThese \"hand pose devices\" do not report any button input with e.g. `lovr.headset.isDown`.  The main `hand/left` and `hand/right` devices should be used for buttons and haptics.",
           related = {
             "DeviceAxis",
             "DeviceButton",

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

@@ -139,10 +139,13 @@ return {
   notes = [[
     Here are the differences between the hand sub-devices:
 
-    - The `/grip` pose is used to render an object held in the user's hand.  It's positioned at the
-      surface of the palm.  The X axis of the grip orientation is perpendicular to the palm,
-      pointing away from the left palm or into the right palm.  If you imagine the hand holding a
-      stick, the Z axis will be parallel to the stick.
+    The `/grip` pose is used to render an object held in the user's hand.  It's positioned at the
+    surface of the palm.  The X axis of the grip orientation is perpendicular to the palm, pointing
+    away from the left palm or into the right palm.  If you imagine the hand holding a stick, the Z
+    axis will be parallel to the stick.
+
+    <img src="/img/grip.svg" width="100%"/>
+
     - The `/point` pose is used to aim or point at objects.  It's usually positioned slightly in
       front of the hand or controller, and is oriented so the -Z axis points in a natural forward
       direction.