Files
OpenSpace/data/assets/customization/globebrowsing.asset
2019-09-18 11:59:03 -04:00

70 lines
3.1 KiB
Plaintext

-- Add require statements for assets exporting the neccessary globes
-- here we add Mars, Moon and Mercury:
asset.require('../scene/solarsystem/planets/mars/mars')
asset.require('../scene/solarsystem/planets/earth/moon/moon')
asset.require('../scene/solarsystem/planets/mercury/mercury')
local CreateFocusNodes = false
-- Add folders to this list that contain .info files describing patches
-- OBS: Even on Windows, you have to use forward slashes (/) or double backslashes (\\)
-- rather than single backslashes (\) as they are otherwise interpreted as escape
-- sequences
-- For example: C:/OpenSpace or C:\\OpenSpace rather than C:\OpenSpace
local vrt_folders = {
Mars = {
-- Add folders here whose contents will be automatically added to the Mars globe
-- If multiple folders are added, the results will be added sequentially, meaning that
-- if areas overlap (for example CTX and HiRISE) and CTX is specified *after* HiRISE,
-- CTX will stomp over the HiRISE.
-- tl;dr: Specify CTX folders first, then HiRISE
-- example: 'C:/OpenSpace/GlobeBrowsingData/Mars/CTX'
-- We recommend using this folder for CTX
openspace.absPath('${ASSETS}/scene/solarsystem/planets/mars/map_service_configs/ESRI/CTX'),
openspace.absPath('${BASE}/../OpenSpaceData/Mars/CTX'),
-- if not and you have a custom path for CTX layers, enter it below
'',
-- Our provided HiRISE layer
openspace.absPath('${ASSETS}/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE'),
-- We recommend using this folder for HiRISE
openspace.absPath('${BASE}/../OpenSpaceData/Mars/HiRISE'),
-- if not and you have a custom path for HiRISE layers, enter it below
'',
},
Moon = {
-- Add folders here whose contents will be automatically added to the Moon globe
-- If multiple folders are added, the results will be added sequentially, meaning that
-- if areas overlap, images from the lower results will overwrite the images from former
-- results
-- example: 'C:/OpenSpace/GlobeBrowsingData/Moon'
openspace.absPath('${BASE}/../OpenSpaceData/Moon'),
openspace.absPath('${BASE}/../OpenSpaceData/Apollo'),
''
},
Mercury = {
-- Add folders here whose contents will be automatically added to the Mercury globe
-- If multiple folders are added, the results will be added sequentially, meaning that
-- if areas overlap, images from the lower results will overwrite the images from former
-- results
-- example: 'C:/OpenSpace/GlobeBrowsingData/Mercury'
openspace.absPath('${BASE}/../OpenSpaceData/Mercury'),
''
}
}
asset.onInitialize(function ()
-- Add local patches described at the top of this file
for obj, list in pairs(vrt_folders) do
for _, dir in pairs(list) do
openspace.globebrowsing.addBlendingLayersFromDirectory(dir, obj)
if CreateFocusNodes then
openspace.globebrowsing.addFocusNodesFromDirectory(dir, obj)
end
end
end
end)