Files
OpenSpace/data/assets/gaia.scene
Jonathas Costa a6b90991b2 Merging Master
2019-07-22 16:47:58 -04:00

47 lines
1.4 KiB
Plaintext

local has_gaia = openspace.modules.isLoaded('Gaia')
if not has_gaia then
openspace.printFatal('Could not load scene "' .. asset.filePath .. '" due to missing module "gaia"')
do return end
end
asset.require('./base')
local assetHelper = asset.require('util/asset_helper')
-- Augment default scene with gaia data, 3D model and trail
asset.require('scene/milkyway/gaia/gaiastars')
asset.require('scene/milkyway/gaia/apogee')
asset.require('scene/milkyway/gaia/galah')
asset.require('scene/solarsystem/missions/gaia/gaia')
asset.require('scene/solarsystem/missions/gaia/trail')
assetHelper.registerDashboardItems(asset, {
{
Type = "DashboardItemDistance",
Identifier = "GaiaEarthDistance",
GuiName = "Gaia Earth Distance",
SourceType = "Node",
SourceNodeName = "Gaia",
DestinationType = "Node Surface",
DestinationNodeName = "Earth"
}
})
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
asset.onInitialize(function ()
openspace.setPropertyValueSingle('Scene.Stars.Renderable.Enabled', false);
openspace.markInterestingNodes({ "Gaia" })
openspace.navigation.setNavigationState({
Anchor = earthAsset.Earth.Identifier,
Position = { 1000000000000.0, 1000000000000.0, 1000000000000.0 },
})
end)
asset.onDeinitialize(function ()
openspace.removeInterestingNodes({ "Gaia" })
end)