summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/LLGesture.lua
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2024-03-15 21:11:39 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2024-03-15 21:13:35 +0200
commit5a6ec3e26ad9a6fb33e18a3d0198482c0685a4fa (patch)
tree9303750372967dced1f06d1e5d9b6f8a64bce317 /indra/newview/scripts/lua/LLGesture.lua
parentfdfff5305bc9d97bb27d36a7fe18bab693e42aed (diff)
parentc5dec705cf6bb3dce9381c9ec574335356051297 (diff)
Merge branch 'release/luau-scripting' into lua-floater
Diffstat (limited to 'indra/newview/scripts/lua/LLGesture.lua')
-rw-r--r--indra/newview/scripts/lua/LLGesture.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/LLGesture.lua b/indra/newview/scripts/lua/LLGesture.lua
new file mode 100644
index 0000000000..cb410446d7
--- /dev/null
+++ b/indra/newview/scripts/lua/LLGesture.lua
@@ -0,0 +1,23 @@
+-- Engage the LLGesture LLEventAPI
+
+leap = require 'leap'
+
+local LLGesture = {}
+
+function LLGesture.getActiveGestures()
+ return leap.request('LLGesture', {op='getActiveGestures'})['gestures']
+end
+
+function LLGesture.isGesturePlaying(id)
+ return leap.request('LLGesture', {op='isGesturePlaying', id=id})['playing']
+end
+
+function LLGesture.startGesture(id)
+ leap.send('LLGesture', {op='startGesture', id=id})
+end
+
+function LLGesture.stopGesture(id)
+ leap.send('LLGesture', {op='stopGesture', id=id})
+end
+
+return LLGesture