mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-03 01:09:34 -05:00
99 lines
3.6 KiB
Plaintext
99 lines
3.6 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())
|
|
|
|
--YYYY-MM-DDTHH:MN:SS
|
|
--openspace.time.setTime(openspace.time.currentWallTime())
|
|
--[[
|
|
-- March 9, 2016 total eclipse times from land
|
|
-- Palembang, South Sumatra, Indonesia
|
|
-- Partial solar eclipse begins: 6:20 a.m. local Western Indonesian Time
|
|
-- Total solar eclipse begins: 7:20 a.m. local time
|
|
-- Maximum eclipse: 7:21 a.m. local time
|
|
-- Total solar eclipse ends: 7:22 a.m. local time
|
|
-- Partial solar eclipse ends: 8:31 a.m. local time
|
|
|
|
-- 6:20 -> 23:20 day before in UTC
|
|
]]--
|
|
|
|
openspace.time.setTime("2016-03-08T22:45:00")
|
|
|
|
-- Total Lunar Eclipse Jan 31, 2018 at 10:51:13 UTC
|
|
-- Regions seeing, at least, some parts of the eclipse: North/East Europe,
|
|
-- Asia, Australia, North/East Africa, North America, North/East South America,
|
|
-- Pacific, Atlantic, Indian Ocean, Arctic, Antarctica.
|
|
--openspace.time.setTime("2018-01-31T10:30:00")
|
|
|
|
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("Sun.renderable.enabled", true)
|
|
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.resetCameraDirection()
|
|
|
|
openspace.printInfo("Done setting default values")
|
|
|
|
--openspace.setInteractionMode('GlobeBrowsing')
|
|
|
|
if openspace.modules.isLoaded("ISWA") then
|
|
openspace.iswa.addCdfFiles("${OPENSPACE_DATA}/cdflist.json");
|
|
end
|
|
end
|
|
|
|
|
|
return {
|
|
ScenePath = ".",
|
|
CommonFolder = "common",
|
|
Camera = {
|
|
Focus = "Earth",
|
|
--Focus = "Mars",
|
|
--Position = {526781518487.171326, 257168309890.072144, -1381125204152.817383},
|
|
--Rotation = {-0.106166, 0.981574, -0.084545, 0.134513},
|
|
--Position = {-21230341452.764542, -75199905816.520981, 126295587136.952240},
|
|
--Rotation = {0.243724, 0.002268, 0.964416, 0.102449},
|
|
Position = {-21235464763.652920, -75191278487.585068, 126294839057.346405},
|
|
Rotation = {0.224913, -0.096227, 0.939918, 0.238136},
|
|
|
|
-- Mars Position
|
|
Position = {113807010618.012451, -93349316388.687042, 190403814045.631592},
|
|
Rotation = {0.527685, 0.455945, -0.495623, 0.517707},
|
|
},
|
|
Modules = {
|
|
"sun",
|
|
--"atmosphereearth",
|
|
--"lodglobes/earth",
|
|
--"lodglobes/moon",
|
|
--"moon",
|
|
--"atmospheremars",
|
|
"lodglobes/mars",
|
|
--"toyvolume",
|
|
--"earth",
|
|
--"stars",
|
|
--"stars-denver",
|
|
--"milkyway",
|
|
-- "milkyway-eso",
|
|
}
|
|
}
|