mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 04:00:37 -06:00
119 lines
3.3 KiB
Plaintext
119 lines
3.3 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.time.setTime(openspace.time.currentWallTime())
|
|
dofile(openspace.absPath('${SCRIPTS}/bind_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("SunGlare.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", false)
|
|
-- openspace.setPropertyValue("PlutoTexture.renderable.enabled", false)
|
|
|
|
openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55)
|
|
openspace.setPropertyValue("MilkyWay.renderable.segments", 50)
|
|
|
|
openspace.printInfo("Done setting default values")
|
|
|
|
--openspace.iswa.addCygnet(0,"z", "Kameleon");
|
|
--openspace.iswa.addCygnet(0,"y", "Kameleon");
|
|
--openspace.iswa.addCygnet(0,"x", "Kameleon");
|
|
|
|
openspace.iswa.addCygnet(-4,"Data");
|
|
|
|
--openspace.iswa.addCygnet(-1,"Data");
|
|
--openspace.iswa.addCygnet(-2,"Data");
|
|
--openspace.iswa.addCygnet(-3,"Data");
|
|
|
|
--openspace.iswa.addCygnet(-1,"Data","GM");
|
|
--openspace.iswa.addCygnet(-2,"Data","GM");
|
|
--openspace.iswa.addCygnet(-3,"Data","GM");
|
|
|
|
|
|
|
|
--[[
|
|
openspace.iswa.addScreenSpaceCygnet(
|
|
{
|
|
CygnetId = 2,
|
|
Position = {-0.8, 0.3},
|
|
Scale = 0.2
|
|
});
|
|
{
|
|
Type = "ScreenSpaceCygnet",
|
|
CygnetId = 7,
|
|
Position = {0.0, 0.0},
|
|
FlatScreen = true,
|
|
Scale = 0.25,
|
|
});
|
|
|
|
openspace.registerScreenSpaceRenderable(
|
|
{
|
|
Name = "Crazy Cat",
|
|
Type = "ScreenSpaceImage",
|
|
TexturePath = "${OPENSPACE_DATA}/test2.jpg",
|
|
Position = {0.8, -0.3},
|
|
FlatScreen = true,
|
|
Scale = 0.25,
|
|
});
|
|
|
|
openspace.registerScreenSpaceRenderable(
|
|
{
|
|
Name = "From Online",
|
|
Type = "ScreenSpaceImage",
|
|
URL = "http://i.imgur.com/KUunHgr.jpg",
|
|
Position = {-0.8, 0.3},
|
|
FlatScreen = true,
|
|
Scale = 0.25,
|
|
});
|
|
]]--
|
|
end
|
|
|
|
|
|
return {
|
|
ScenePath = ".",
|
|
CommonFolder = "common",
|
|
Camera = {
|
|
Focus = "Earth",
|
|
Position = {1, 0, 0, 5},
|
|
},
|
|
Modules = {
|
|
"sun",
|
|
--"mercury",
|
|
--"venus",
|
|
"earth",
|
|
--"mars",
|
|
--"jupiter",
|
|
--"saturn",
|
|
--"uranus",
|
|
--"neptune",
|
|
"stars",
|
|
-- "stars-denver",
|
|
"milkyway",
|
|
-- "milkyway-eso",
|
|
--"constellationbounds",
|
|
--"fieldlines",
|
|
--"io",
|
|
--"europa",
|
|
--"ganymede",
|
|
--"callisto",
|
|
--"gridGalactic",
|
|
--"gridEcliptic",
|
|
--"gridEquatorial",
|
|
}
|
|
}
|