blob: 7c6a842555106027428d1f7fdf7ad22552910359 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
local leap = require 'leap'
local mapargs = require 'mapargs'
local LLAgent = {}
function LLAgent.getRegionPosition()
return leap.request('LLAgent', {op = 'getPosition'}).region
end
function LLAgent.getGlobalPosition()
return leap.request('LLAgent', {op = 'getPosition'}).global
end
function LLAgent.setCamera(...)
local args = mapargs('camera_pos,focus_pos,focus_offset,camera_locked,focus_locked', ...)
args.op = 'setCameraParams'
leap.send('LLAgent', args)
end
function LLAgent.setFollowCamActive(active)
leap.send('LLAgent', {op = 'setFollowCamActive', active = active})
end
function LLAgent.removeCamParams()
leap.send('LLAgent', {op = 'removeCameraParams'})
end
return LLAgent
|