diff --git a/scripts/bind_keys_newhorizons.lua b/scripts/bind_keys_newhorizons.lua index ca436024f9..7d82119ab0 100644 --- a/scripts/bind_keys_newhorizons.lua +++ b/scripts/bind_keys_newhorizons.lua @@ -11,9 +11,15 @@ helper.setDeltaTimeKeys({ 2160, 4320, 8640 }) -openspace.bindKey("F5", "openspace.setPropertyValue('Interaction.coordinateSystem', 'Sun'); openspace.printInfo('Changing Viewpoint to Sun-in-center');"); -openspace.bindKey("F6", "openspace.setPropertyValue('Interaction.coordinateSystem', 'Jupiter'); openspace.printInfo('Changing Viewpoint to Jupiter-in-center');"); -openspace.bindKey("F7", "openspace.setPropertyValue('Interaction.coordinateSystem', 'Pluto'); openspace.printInfo('Changing Viewpoint to Pluto-in-center');"); +openspace.bindKey("a", "openspace.setPropertyValue('Interaction.origin', 'NewHorizons')") +openspace.bindKey("s", "openspace.setPropertyValue('Interaction.origin', 'PlutoProjection')") +openspace.bindKey("d", "openspace.setPropertyValue('Interaction.origin', 'Charon')") +openspace.bindKey("z", "openspace.setPropertyValue('Interaction.origin', 'JupiterProjection')") +openspace.bindKey("x", "openspace.setPropertyValue('Interaction.origin', 'Europa')") + +openspace.bindKey("F5", "openspace.setPropertyValue('Interaction.coordinateSystem', 'Sun'); openspace.printInfo('Changing Viewpoint to Sun');"); +openspace.bindKey("F6", "openspace.setPropertyValue('Interaction.coordinateSystem', 'Jupiter'); openspace.printInfo('Changing Viewpoint to Jupiter');"); +openspace.bindKey("F7", "openspace.setPropertyValue('Interaction.coordinateSystem', 'Pluto'); openspace.printInfo('Changing Viewpoint to Pluto');"); openspace.bindKey("F8", "openspace.setPropertyValue('PlutoProjection.renderable.clearAllProjections', true); openspace.setPropertyValue('Charon.renderable.clearAllProjections', true);") @@ -25,12 +31,6 @@ openspace.bindKey("F12", "openspace.time.setTime('2015-07-14T12:45:00.00'); open openspace.bindKey("r", helper.property.invert('PlutoProjection.renderable.fk')) -openspace.bindKey("a", "openspace.setPropertyValue('Interaction.origin', 'NewHorizons')") -openspace.bindKey("s", "openspace.setPropertyValue('Interaction.origin', 'PlutoProjection')") -openspace.bindKey("d", "openspace.setPropertyValue('Interaction.origin', 'Charon')") -openspace.bindKey("z", "openspace.setPropertyValue('Interaction.origin', 'JupiterProjection')") -openspace.bindKey("x", "openspace.setPropertyValue('Interaction.origin', 'Europa')") - openspace.bindKey("KP_8", helper.property.increment('PlutoProjection.renderable.heightExaggeration', 2)) openspace.bindKey("KP_2", helper.property.decrement('PlutoProjection.renderable.heightExaggeration', 2)) diff --git a/scripts/bind_keys_rosetta.lua b/scripts/bind_keys_rosetta.lua index 8b420b1f4e..2806c022be 100644 --- a/scripts/bind_keys_rosetta.lua +++ b/scripts/bind_keys_rosetta.lua @@ -1,45 +1,26 @@ --[[ OpenSpace keybinding script ]]-- -- This script sets the default keybindings and is executed at startup +-- Load the common helper functions +dofile(openspace.absPath('${SCRIPTS}/common.lua')) + openspace.clearKeys() -openspace.bindKey("F1", "openspace.gui.toggle()") -openspace.bindKey("F2", "openspace.setPerformanceMeasurement(true)") -openspace.bindKey("F3", "openspace.setPerformanceMeasurement(false)") -openspace.bindKey("F5", "openspace.setPropertyValue('Interaction.coordinateSystem', 'Sun'); openspace.printInfo('Changing Viewpoint to Sun-in-center');"); -openspace.bindKey("F6", "openspace.setPropertyValue('Interaction.coordinateSystem', '67P'); openspace.printInfo('Changing Viewpoint to 67P-in-center');"); +helper.setCommonKeys() -openspace.bindKey("PRINT_SCREEN", "openspace.takeScreenshot()") - -openspace.bindKey("SPACE", "openspace.time.togglePause()") - --- Bookmarks for the New Horizons encounter -openspace.bindKey("1", "openspace.time.setDeltaTime(1)") -openspace.bindKey("2", "openspace.time.setDeltaTime(5)") -openspace.bindKey("3", "openspace.time.setDeltaTime(10)") -openspace.bindKey("4", "openspace.time.setDeltaTime(20)") -openspace.bindKey("5", "openspace.time.setDeltaTime(40)") -openspace.bindKey("6", "openspace.time.setDeltaTime(90)") -openspace.bindKey("7", "openspace.time.setDeltaTime(360)") -openspace.bindKey("8", "openspace.time.setDeltaTime(720)") -openspace.bindKey("9", "openspace.time.setDeltaTime(2880)") -openspace.bindKey("0", "openspace.time.setDeltaTime(14400)") -openspace.bindKey("SHIFT+1", "openspace.time.setDeltaTime(28800)") -openspace.bindKey("SHIFT+2", "openspace.time.setDeltaTime(57600)") -openspace.bindKey("SHIFT+3", "openspace.time.setDeltaTime(115200)") -openspace.bindKey("SHIFT+4", "openspace.time.setDeltaTime(230400)") -openspace.bindKey("SHIFT+5", "openspace.time.setDeltaTime(460800)") - -openspace.bindKey("i", "local b = openspace.getPropertyValue('ImagePlaneRosetta.renderable.enabled'); openspace.setPropertyValue('ImagePlaneRosetta.renderable.enabled', not b)") - -openspace.bindKey("F8", "openspace.setPropertyValue('67P.renderable.clearAllProjections', true"); +helper.setDeltaTimeKeys({ + 1, 5, 10, 20, 40, 90, 360, 720, 2880, 14400, + 28800, 57600, 115200, 230400, 460800 +}) openspace.bindKey("a", "openspace.setPropertyValue('Interaction.origin', '67P')") openspace.bindKey("s", "openspace.setPropertyValue('Interaction.origin', 'Rosetta')") -openspace.bindKey("q", "local b = openspace.getPropertyValue('SunMarker.renderable.enabled'); openspace.setPropertyValue('SunMarker.renderable.enabled', not b)") -openspace.bindKey("e", "local b = openspace.getPropertyValue('EarthMarker.renderable.enabled'); openspace.setPropertyValue('EarthMarker.renderable.enabled', not b)") +openspace.bindKey("F5", "openspace.setPropertyValue('Interaction.coordinateSystem', 'Sun'); openspace.printInfo('Changing Viewpoint to Sun');"); +openspace.bindKey("F6", "openspace.setPropertyValue('Interaction.coordinateSystem', '67P'); openspace.printInfo('Changing Viewpoint to 67P');"); +openspace.bindKey("F8", "openspace.setPropertyValue('67P.renderable.clearAllProjections', true"); + +openspace.bindKey("i", helper.renderable.toggle('ImagePlaneRosetta')) +openspace.bindKey("q", helper.renderable.toggle('SunMarker')) +openspace.bindKey("e", helper.renderable.toggle('EarthMarker')) openspace.bindKey("c", "openspace.parallel.setAddress('130.236.142.51');openspace.parallel.setPassword('newhorizons-20150714');openspace.parallel.connect();") - -openspace.bindKey("COMMA", "openspace.setRenderer('Framebuffer');") -openspace.bindKey("PERIOD", "openspace.setRenderer('ABuffer');") \ No newline at end of file