summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/require
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2024-08-30 14:48:36 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2024-08-30 14:48:36 +0300
commit4312a2b7703f6ba35a1cdcd1edc48dddfe084270 (patch)
tree8ed6d43d2c79e57edef5e1b92f19ca310eef2089 /indra/newview/scripts/lua/require
parent6e47dc1af90c242c792c90e93d013355c9a43b97 (diff)
Add throttle for playing an animation; add demo script
Diffstat (limited to 'indra/newview/scripts/lua/require')
-rw-r--r--indra/newview/scripts/lua/require/LLAgent.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/require/LLAgent.lua b/indra/newview/scripts/lua/require/LLAgent.lua
index 56907f53cd..07ef1e0b0b 100644
--- a/indra/newview/scripts/lua/require/LLAgent.lua
+++ b/indra/newview/scripts/lua/require/LLAgent.lua
@@ -53,6 +53,8 @@ function LLAgent.removeCamParams()
leap.send('LLAgent', {op = 'removeCameraParams'})
end
+-- Play specified animation by "item_id" locally
+-- if "inworld" is specified as true, animation will be played inworld instead
function LLAgent.playAnimation(...)
local args = mapargs('item_id,inworld', ...)
args.op = 'playAnimation'
@@ -63,6 +65,8 @@ function LLAgent.stopAnimation(item_id)
return leap.request('LLAgent', {op = 'stopAnimation', item_id=item_id})
end
+-- Get animation info by "item_id"
+-- reply contains "duration", "is_loop", "num_joints", "asset_id", "priority"
function LLAgent.getAnimationInfo(item_id)
return leap.request('LLAgent', {op = 'getAnimationInfo', item_id=item_id}).anim_info
end