mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-08 12:39:49 -06:00
79 lines
2.7 KiB
Plaintext
79 lines
2.7 KiB
Plaintext
KernelCase = 2 -- Right now we only have the image times for case 2
|
|
|
|
|
|
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")
|
|
|
|
dofile(openspace.absPath('${SCRIPTS}/bind_keys_osirisrex.lua'))
|
|
|
|
--local startTime = "2019 APR 16 12:03:00.00"
|
|
openspace.time.setTime("2016 SEP 8 23:00:00.500")
|
|
|
|
openspace.scriptScheduler.loadFile("${OPENSPACE_DATA}/scene/missions/osirisrex/scheduled_scripts.lua")
|
|
|
|
end
|
|
|
|
function postInitialization()
|
|
--[[
|
|
The scripts in this function are executed after all objects in the scene have been
|
|
created and initialized, but before the first render call. This is the place to set
|
|
graphical settings for the renderables.
|
|
]]--
|
|
openspace.printInfo("Setting default values")
|
|
openspace.setPropertyValue("Sun.renderable.enabled", false)
|
|
openspace.setPropertyValue("SunMarker.renderable.enabled", false)
|
|
openspace.setPropertyValue("EarthMarker.renderable.enabled", false)
|
|
--openspace.setPropertyValue("Constellation Bounds.renderable.enabled", false)
|
|
openspace.setPropertyValue("PlutoTrail.renderable.enabled", true)
|
|
openspace.setPropertyValue("PlutoTexture.renderable.enabled", false)
|
|
|
|
openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55)
|
|
openspace.setPropertyValue("MilkyWay.renderable.segments", 50)
|
|
|
|
-- Activate night textures and water masks
|
|
openspace.setPropertyValue("Earth.RenderableGlobe.WaterMasks", {0, 1});
|
|
openspace.setPropertyValue("Earth.RenderableGlobe.NightLayers", {0, 1});
|
|
openspace.setPropertyValue("Earth.RenderableGlobe.Atmosphere", true);
|
|
|
|
openspace.printInfo("Done setting default values")
|
|
openspace.loadMission("${OPENSPACE_DATA}/scene/missions/osirisrex/osirisrex/osirisrex.mission")
|
|
|
|
openspace.resetCameraDirection()
|
|
end
|
|
|
|
return {
|
|
ScenePath = ".",
|
|
CommonFolder = "common",
|
|
Camera = {
|
|
Focus = "OsirisRex",
|
|
Position = {26974590199.661884, 76314608558.908020, -127086452897.101791},
|
|
Rotation = {0.729548, -0.126024, 0.416827, 0.527382},
|
|
},
|
|
Modules = {
|
|
"sun",
|
|
"mercury",
|
|
"venus",
|
|
"lodglobes/earth",
|
|
"moon",
|
|
"mars",
|
|
"jupiter",
|
|
"saturn",
|
|
"uranus",
|
|
"neptune",
|
|
"stars",
|
|
-- "stars-denver",
|
|
"milkyway",
|
|
-- "milkyway-eso",
|
|
"missions/osirisrex",
|
|
}
|
|
}
|
|
|