diff options
author | nat-goodspeed <nat@lindenlab.com> | 2024-03-15 14:56:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-15 14:56:43 -0400 |
commit | c5dec705cf6bb3dce9381c9ec574335356051297 (patch) | |
tree | 0620f4bab572b1cd38ba8e8db03130b1e65ec1f7 /indra/newview/scripts/lua/LLGesture.lua | |
parent | ee8bc528bbf97ee8cc488651fb263b07b5c1c818 (diff) | |
parent | bac113e30d987d7884c58490e6ea39a1bbd87d05 (diff) |
Merge pull request #1004 from secondlife/lua-leap
Add leap.lua module to mediate LEAP request/response viewer interactions.
Diffstat (limited to 'indra/newview/scripts/lua/LLGesture.lua')
-rw-r--r-- | indra/newview/scripts/lua/LLGesture.lua | 23 |
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 |