Files
OpenSpace/data/scene/default.scene
T
Alexander Bock 222bbe22ab Feature/gb gui (#390)
Implemented new GUI component to handle WMS servers
* Add Lua scripts to support adding GIBS datasets (closes #222)
* Add Lua function to load WMS servers from a predefined file

* Workaround for Visual Studio 15.3 compile fix in Windows headers

* Initial support for parsing GetCapabilities file and automatically add layers

* Add a Trigger property to remove a layer

* Support default servers

* Add default file

* Move WMS server code from GUI component into GlobeBrowsingModule

* Add Lua scripts for loading and removing WMS servers
Automatically load default servers on startup

* Reset tile provider before removing a layer tolimit the crash risk
Add "From focus" button to switch globebrowsing gui to the same node as the focus

* Remove warnings
Remove compile error with nonexisting GDALOpenEx function
2017-08-19 20:23:08 -04:00

130 lines
4.7 KiB
Plaintext

-- Add folders to this list that contain .info files describing HiRISE patches
local mars_folders = {
-- Add a folder 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
}
function preInitialization()
--[[
The scripts in this function are executed after the scene is loaded but before the
scene elements have been initialized, thus they should be used to set the time at
which the scene should start and other settings that might determine initialization
critical objects.
]]--
openspace.spice.loadKernel("${SPICE}/naif0012.tls")
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
openspace.time.setTime(openspace.time.currentWallTime())
dofile(openspace.absPath('${SCRIPTS}/bind_common_keys.lua'))
-- Toggle night texture, shading, atmosphere and water
openspace.bindKey("s",
helper.property.invert('Earth.RenderableGlobe.Layers.NightLayers.Earth at Night 2012.Enabled') ..
helper.property.invert('Earth.RenderableGlobe.PerformShading') ..
helper.property.invert('Earth.RenderableGlobe.Atmosphere') ..
helper.property.invert('Earth.RenderableGlobe.Layers.WaterMasks.MODIS_Water_Mask.Enabled'),
"Toggle night texture, shading, atmosphere, and water for Earth."
)
-- Toggle background
openspace.bindKey("b",
helper.property.invert('MilkyWay.renderable.Enabled') ..
helper.property.invert('Stars.renderable.Enabled'),
"Toggle background (Stars and Milkyway)."
)
openspace.bindKey("g",
helper.property.invert('MilkyWay.renderable.Enabled') ..
helper.property.invert('Stars.renderable.Enabled') ..
helper.property.invert('Earth.RenderableGlobe.Layers.NightLayers.Earth at Night 2012.Enabled') ..
helper.property.invert('Earth.RenderableGlobe.PerformShading') ..
helper.property.invert('Mars.RenderableGlobe.PerformShading') ..
helper.property.invert('Earth.RenderableGlobe.Atmosphere') ..
helper.property.invert('Earth.RenderableGlobe.Layers.WaterMasks.MODIS_Water_Mask.Enabled') ..
helper.property.invert('Moon.RenderableGlobe.Enabled') ..
helper.property.invert('Sun.renderable.Enabled'),
"Toogles background and shading mode on the Earth and Mars alongside visibility of the Moon and the Sun"
)
openspace.bindKey("h",
"openspace.setPropertyValue('*Trail.renderable.Enabled', false)",
"Disables visibility of the trails"
)
openspace.globebrowsing.loadWMSServersFromFile(
openspace.absPath("${OPENSPACE_DATA}/globebrowsing_servers.lua")
)
end
function postInitialization()
openspace.addVirtualProperty(
"BoolProperty",
"Show Trails",
"*Trail.renderable.Enabled",
"Disable or enable all trails of the scene at the same time",
true,
nil,
nil
)
openspace.printInfo("Setting default values")
openspace.setPropertyValue("SunGlare.renderable.Enabled", false)
openspace.setPropertyValue("SunMarker.renderable.Enabled", false)
openspace.setPropertyValue("Constellation Bounds.renderable.Enabled", false)
openspace.setPropertyValue("Earth.RenderableGlobe.Atmosphere", true)
openspace.setPropertyValue("Earth.RenderableGlobe.Debug.LevelByProjectedAreaElseDistance", false)
openspace.setPropertyValue("Ecliptic Grid.renderable.Enabled", false)
openspace.setPropertyValue("Equatorial Grid.renderable.Enabled", false)
openspace.setPropertyValue("Galactic Grid.renderable.Enabled", false)
openspace.globebrowsing.goToGeo(58.5877, 16.1924, 20000000)
openspace.printInfo("Done setting default values")
-- Add the CTX and HiRISE patches described at the top of this file
for _, file in pairs(mars_folders) do
openspace.globebrowsing.addBlendingLayersFromDirectory(file, "Mars")
end
end
return {
ScenePath = ".",
CommonFolder = "common",
Camera = {
Focus = "Earth",
Position = {0, 0, 0},
Rotation = {0.758797, 0.221490, -0.605693, -0.091135},
},
Modules = {
"sun",
"mercury",
"venus",
"earth",
"moon",
"mars",
"jupiter",
"saturn",
"uranus",
"neptune",
"stars/digitaluniverse",
-- "stars/denver",
"milkyway/digitaluniverse",
--"milkyway/eso",
-- "satellites"
"constellationbounds",
"grids"
}
}