mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-28 06:59:46 -06:00
139 lines
4.3 KiB
Plaintext
139 lines
4.3 KiB
Plaintext
dofile(openspace.absPath('${SCRIPTS}/scene_helper.lua'))
|
|
|
|
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")
|
|
|
|
-- Usual start
|
|
openspace.time.setTime("2014-08-01T03:05:18.101")
|
|
|
|
-- Philae release
|
|
-- openspace.time.setTime("2014-11-12T08:00:00.000")
|
|
|
|
-- Shadow flyby
|
|
-- openspace.time.setTime("2015-02-14T12:00:00.000")
|
|
|
|
-- Load the common helper functions
|
|
dofile(openspace.absPath('${SCRIPTS}/common.lua'))
|
|
|
|
openspace.clearKeys()
|
|
helper.setCommonKeys()
|
|
|
|
helper.setDeltaTimeKeys({
|
|
1, 5, 10, 20, 40, 90, 360, 720, 2880, 14400,
|
|
28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600
|
|
})
|
|
|
|
openspace.bindKey(
|
|
"a",
|
|
"openspace.setPropertyValue('Interaction.origin', '67P')",
|
|
"Sets the focus of the camera on '67P'."
|
|
)
|
|
openspace.bindKey(
|
|
"s",
|
|
"openspace.setPropertyValue('Interaction.origin', 'Rosetta')",
|
|
"Sets the focus of the camera on 'Rosetta'."
|
|
)
|
|
|
|
openspace.bindKey(
|
|
"F5",
|
|
"openspace.time.setTime('2014-08-01T03:05:18.101')",
|
|
"Jumps to the time of initial approach of Rosetta to 67P."
|
|
)
|
|
openspace.bindKey(
|
|
"F6",
|
|
"openspace.time.setTime('2014-11-12T08:20:00.00')",
|
|
"Jumps to the time when the Philae lander is released."
|
|
)
|
|
openspace.bindKey(
|
|
"F8",
|
|
"openspace.setPropertyValue('67P.renderable.ProjectionComponent.clearAllProjections', true)",
|
|
"Removes all image projections from 67P."
|
|
)
|
|
|
|
openspace.bindKey(
|
|
"i",
|
|
helper.renderable.toggle('ImagePlaneRosetta'),
|
|
"Toggles the visibility of the free floating image plane."
|
|
)
|
|
openspace.bindKey(
|
|
"q",
|
|
helper.renderable.toggle('SunMarker'),
|
|
"Toggles the visibility of the text marking the location of the Sun."
|
|
)
|
|
openspace.bindKey(
|
|
"e",
|
|
helper.renderable.toggle('JupiterTrail') .. helper.renderable.toggle('SaturnTrail') ..
|
|
helper.renderable.toggle('UranusTrail') .. helper.renderable.toggle('NeptuneTrail'),
|
|
"Toggles the visibility of all trails further from the Sun than 67P."
|
|
)
|
|
openspace.bindKey(
|
|
"f",
|
|
helper.renderable.toggle('PhilaeTrail'),
|
|
"Toggles the visibility of Philae's trail."
|
|
)
|
|
|
|
openspace.bindKey(
|
|
"p",
|
|
helper.property.invert('67P.renderable.ProjectionComponent.performProjection'),
|
|
"Enables or disables the image projection on 67P."
|
|
)
|
|
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", true)
|
|
openspace.setPropertyValue("EarthMarker.renderable.Enabled", true)
|
|
|
|
openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55)
|
|
openspace.setPropertyValue("MilkyWay.renderable.Segments", 50)
|
|
|
|
openspace.setPropertyValue('67P.renderable.PerformShading', false);
|
|
|
|
openspace.printInfo("Done setting default values")
|
|
|
|
mark_interesting_nodes({
|
|
"Pluto", "NewHorizons", "Charon"
|
|
})
|
|
end
|
|
|
|
return {
|
|
ScenePath = ".",
|
|
CommonFolder = "common",
|
|
Camera = {
|
|
Focus = "67P",
|
|
Position = {526781518487.171326, 257168309890.072144, -1381125204152.817383},
|
|
Rotation = {-0.106166, 0.981574, -0.084545, 0.134513},
|
|
},
|
|
Modules = {
|
|
"sun",
|
|
"mercury",
|
|
"venus",
|
|
"earth",
|
|
"mars",
|
|
"jupiter/jupiter",
|
|
"saturn/saturn",
|
|
"uranus",
|
|
-- "neptune",
|
|
"stars/digitaluniverse",
|
|
-- "stars/denver",
|
|
"milkyway/digitaluniverse",
|
|
--"milkyway/eso",
|
|
"missions/rosetta",
|
|
}
|
|
}
|
|
|