mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-09 14:58:37 -05:00
Added key binding from Lua possible
- Possible to add key bindings from Lua possible. This calls Lua scripts from key commands. - Temporary fixed a small bug for volume rendering
This commit is contained in:
21
scripts/bind_keys.lua
Normal file
21
scripts/bind_keys.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
openspace.clearKeys()
|
||||
|
||||
function setEarthAsOrigin()
|
||||
openspace.setOrigin('Earth')
|
||||
end
|
||||
|
||||
interaction_speed = 2.75
|
||||
|
||||
-- Key Bindings
|
||||
openspace.bindKey("f1", "setEarthAsOrigin()")
|
||||
openspace.bindKey("f2", "openspace.setOrigin('Mercury')")
|
||||
openspace.bindKey("f3", "openspace.setPropertyValue('Earth.renderable.enabled', true)")
|
||||
openspace.bindKey("f4", "openspace.setPropertyValue('Earth.renderable.enabled', false)")
|
||||
openspace.bindKey("f5", "loadKeyBindings()")
|
||||
|
||||
|
||||
openspace.bindKey("U", "openspace.distance(-interaction_speed * openspace.dt(), 13.0)")
|
||||
openspace.bindKey("J", "openspace.distance(interaction_speed * openspace.dt(), 13.0)")
|
||||
|
||||
openspace.bindKey("PRINT_SCREEN", "openspace.takeScreenshot()")
|
||||
Reference in New Issue
Block a user