mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 03:00:58 -06:00
71 lines
2.1 KiB
Plaintext
71 lines
2.1 KiB
Plaintext
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'))
|
|
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("SunMarker.renderable.Enabled", false)
|
|
openspace.setPropertyValue("EarthMarker.renderable.Enabled", false)
|
|
openspace.setPropertyValue("Constellation Bounds.renderable.Enabled", false)
|
|
|
|
openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55)
|
|
openspace.setPropertyValue("MilkyWay.renderable.Segments", 50)
|
|
|
|
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.resetCameraDirection()
|
|
|
|
openspace.printInfo("Done setting default values")
|
|
end
|
|
|
|
|
|
return {
|
|
ScenePath = ".",
|
|
CommonFolder = "common",
|
|
Camera = {
|
|
Focus = "Earth",
|
|
Position = {505370268486.696167, 1089706179272.719116, -890259148524.319458},
|
|
Rotation = {0.250635, -0.028751, 0.879269, 0.404030},
|
|
},
|
|
Modules = {
|
|
"sun",
|
|
"mercury",
|
|
"venus",
|
|
"earth",
|
|
"mars",
|
|
"jupiter",
|
|
"saturn",
|
|
"uranus",
|
|
"neptune",
|
|
"stars",
|
|
-- "stars-denver",
|
|
"milkyway",
|
|
--"milkyway-eso",
|
|
"constellationbounds",
|
|
}
|
|
}
|