mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 20:50:59 -05:00
Add scripts to manipulate the camera
Add example asset using the new scripts for an IPAC
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
asset.onInitialize(function()
|
||||
openspace.clearKeys()
|
||||
openspace.bindKey("RIGHT", "openspace.navigation.addGlobalRotation(-5.0, 0.0)");
|
||||
openspace.bindKey("LEFT", "openspace.navigation.addGlobalRotation(5.0, 0.0)");
|
||||
openspace.bindKey("UP", "openspace.navigation.addGlobalRotation(0.0, 5.0)");
|
||||
openspace.bindKey("DOWN", "openspace.navigation.addGlobalRotation(0.0, -5.0)");
|
||||
|
||||
openspace.bindKey("CTRL+RIGHT", "openspace.navigation.addLocalRotation(-5.0, 0.0)");
|
||||
openspace.bindKey("CTRL+LEFT", "openspace.navigation.addLocalRotation(5.0, 0.0)");
|
||||
openspace.bindKey("CTRL+UP", "openspace.navigation.addLocalRotation(0.0, 5.0)");
|
||||
openspace.bindKey("CTRL+DOWN", "openspace.navigation.addLocalRotation(0.0, -5.0)");
|
||||
|
||||
openspace.bindKey("ALT+UP", "openspace.navigation.addTruckMovement(0.0, 5.0)");
|
||||
openspace.bindKey("ALT+DOWN", "openspace.navigation.addTruckMovement(0.0, -5.0)");
|
||||
|
||||
openspace.bindKey("SPACE", "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', '');openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Moon');openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);")
|
||||
openspace.bindKey("Z", "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', '');openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Earth');openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);")
|
||||
end)
|
||||
Reference in New Issue
Block a user