Browse Source

lovr.headset.stopVibration;

bjorn 1 year ago
parent
commit
a622b72b14
3 changed files with 52 additions and 0 deletions
  1. 27 0
      api/init.lua
  2. 22 0
      api/lovr/headset/stopVibration.lua
  3. 3 0
      api/lovr/headset/vibrate.lua

+ 27 - 0
api/init.lua

@@ -23253,6 +23253,30 @@ return {
             }
           }
         },
+        {
+          name = "stopVibration",
+          tag = "input",
+          summary = "Stop vibration on a device.",
+          description = "Causes the device to stop any active haptics vibration.",
+          key = "lovr.headset.stopVibration",
+          module = "lovr.headset",
+          related = {
+            "lovr.headset.vibrate"
+          },
+          variants = {
+            {
+              arguments = {
+                {
+                  name = "device",
+                  type = "Device",
+                  description = "The device to stop the vibration on.",
+                  default = "'head'"
+                }
+              },
+              returns = {}
+            }
+          }
+        },
         {
           name = "submit",
           tag = "headset",
@@ -23278,6 +23302,9 @@ return {
           description = "Causes the device to vibrate with a custom strength, duration, and frequency, if possible.",
           key = "lovr.headset.vibrate",
           module = "lovr.headset",
+          related = {
+            "lovr.headset.stopVibration"
+          },
           variants = {
             {
               arguments = {

+ 22 - 0
api/lovr/headset/stopVibration.lua

@@ -0,0 +1,22 @@
+return {
+  tag = 'input',
+  summary = 'Stop vibration on a device.',
+  description = 'Causes the device to stop any active haptics vibration.',
+  arguments = {
+    device = {
+      type = 'Device',
+      default = [['head']],
+      description = 'The device to stop the vibration on.'
+    }
+  },
+  returns = {},
+  variants = {
+    {
+      arguments = { 'device' },
+      returns = {}
+    }
+  },
+  related = {
+    'lovr.headset.vibrate'
+  }
+}

+ 3 - 0
api/lovr/headset/vibrate.lua

@@ -37,5 +37,8 @@ return {
       arguments = { 'device', 'strength', 'duration', 'frequency' },
       returns = { 'vibrated' }
     }
+  },
+  related = {
+    'lovr.headset.stopVibration'
   }
 }