Files
OpenSpace/data/assets/juno.scene
Emil Axelsson 2e71eaa4cb Feature/anchor and aim (#799)
Introduce the ability to navigate using an anchor and aim.
Example use: Set spacecraft as anchor and planet as aim to always look down at a planet, while followin the spacecraft in its orbit.
2019-02-19 18:46:58 +01:00

55 lines
1.7 KiB
Plaintext

local assetHelper = asset.require('util/asset_helper')
local sceneHelper = asset.require('util/scene_helper')
-- Specifying which other assets should be loaded in this scene
asset.require('spice/base')
assetHelper.requestAll(asset, 'scene/solarsystem/sun')
asset.request('scene/solarsystem/planets')
asset.request('scene/digitaluniverse/stars')
asset.request('scene/digitaluniverse/milkyway')
assetHelper.requireAll(asset, 'scene/solarsystem/missions/juno')
-- Load default key bindings applicable to most scenes
asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/default_joystick')
asset.require('util/webgui')
local junoAsset = asset.require('scene/solarsystem/missions/juno/juno')
assetHelper.registerInterestingNodes(asset, {
"Jupiter", "Juno"
})
asset.onInitialize(function ()
openspace.time.setTime("2016-07-01T10:05:00.00")
openspace.setDefaultGuiSorting()
sceneHelper.setDeltaTimeKeys({
1, 5, 10, 20, 40, 90, 360, 720, 2880, 14400,
28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600
})
openspace.addVirtualProperty(
"BoolProperty",
"Show Trails",
"*Trail.Renderable.Enabled",
"Disable or enable all trails of the scene at the same time",
true,
nil,
nil
)
openspace.navigation.setCameraState({
Anchor = junoAsset.Juno.Identifier,
Position = { 1837386367.601345, -389860693812.834839, 714830404470.398926 },
Rotation = { -0.336540, 0.711402, -0.099212, 0.608937 },
})
end)
asset.onDeinitialize(function ()
openspace.removeVirtualProperty("*Trail.Renderable.Enabled")
end)