mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-20 20:40:26 -05:00
* Introduced guiName to PropertyOwner * Added requirement that PropertyOwner::identifier may not contain whitespaces * Changed Name to Identifier in asset and scene files * Added new PropertyOwner to RenderEngine that owns the ScreenSpaceRenderables * Moved Name and GuiPath into GUI group * Added user-facing names to layer groups
52 lines
1.6 KiB
Plaintext
52 lines
1.6 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')
|
|
assetHelper.requestAll(asset, 'scene/solarsystem/planets')
|
|
asset.request('scene/digitaluniverse/stars')
|
|
asset.request('scene/digitaluniverse/milkyway')
|
|
asset.require('scene/solarsystem/missions/dawn/ceres')
|
|
asset.require('scene/solarsystem/missions/dawn/dawn')
|
|
asset.require('scene/solarsystem/missions/dawn/vesta')
|
|
|
|
-- Load default key bindings applicable to most scenes
|
|
asset.require('util/default_keybindings')
|
|
|
|
local DawnAsset = asset.require('scene/solarsystem/missions/dawn/dawn')
|
|
|
|
asset.onInitialize(function ()
|
|
openspace.time.setTime("2011 AUG 06 00:00:00")
|
|
|
|
openspace.setDefaultDashboard()
|
|
openspace.setDefaultGuiSorting()
|
|
|
|
openspace.markInterestingNodes({
|
|
"Dawn", "Ceres", "Vesta"
|
|
})
|
|
|
|
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({
|
|
Focus = DawnAsset.Dawn.Identifier,
|
|
Position = { 526781518487.171326, 257168309890.072144, -1381125204152.817383 },
|
|
Rotation = { -0.106166, 0.981574, -0.084545, 0.134513 },
|
|
})
|
|
end)
|
|
|
|
asset.onDeinitialize(function ()
|
|
openspace.removeVirtualProperty("*Trail.renderable.Enabled")
|
|
openspace.removeInterestingNodes({
|
|
"Dawn", "Ceres", "Vesta"
|
|
})
|
|
end)
|