Merge branch 'master' into feature/video-on-globe

This commit is contained in:
Malin E
2022-11-28 13:09:38 +01:00
4162 changed files with 40247 additions and 85550 deletions

8
Jenkinsfile vendored
View File

@@ -68,7 +68,7 @@ parallel tools: {
},
linux_gcc_make: {
if (env.USE_BUILD_OS_LINUX == 'true') {
node('linux' && 'gcc') {
node('linux-gcc') {
stage('linux-gcc-make/scm') {
deleteDir();
gitHelper.checkoutGit(url, branch);
@@ -114,7 +114,7 @@ linux_gcc_make: {
},
linux_gcc_ninja: {
if (env.USE_BUILD_OS_LINUX == 'true') {
node('linux' && 'gcc') {
node('linux-gcc') {
stage('linux-gcc-ninja/scm') {
deleteDir();
gitHelper.checkoutGit(url, branch);
@@ -158,7 +158,7 @@ linux_gcc_ninja: {
},
linux_clang_make: {
if (env.USE_BUILD_OS_LINUX == 'true') {
node('linux' && 'clang') {
node('linux-clang') {
stage('linux-clang-make/scm') {
deleteDir()
gitHelper.checkoutGit(url, branch);
@@ -203,7 +203,7 @@ linux_clang_make: {
},
linux_clang_ninja: {
if (env.USE_BUILD_OS_LINUX == 'true') {
node('linux' && 'clang') {
node('linux-clang') {
stage('linux-clang-ninja/scm') {
deleteDir()
gitHelper.checkoutGit(url, branch);

View File

@@ -81,6 +81,19 @@ namespace {
} // geometry
std::optional<Profile> loadProfileFromFile(QWidget* parent, std::string filename) {
// Verify that the file actually exists
if (!std::filesystem::exists(filename)) {
QMessageBox::critical(
parent,
"Exception",
QString::fromStdString(fmt::format(
"Could not open profile file '{}'", filename
))
);
return std::nullopt;
}
std::ifstream inFile;
try {
inFile.open(filename, std::ifstream::in);
@@ -407,11 +420,24 @@ void LauncherWindow::populateProfilesList(std::string preset) {
++_userAssetCount;
}
std::sort(profiles.begin(), profiles.end());
for (const fs::directory_entry& p : profiles) {
for (const fs::directory_entry& profile : profiles) {
std::filesystem::path path = profile.path();
_profileBox->addItem(
QString::fromStdString(p.path().stem().string()),
QString::fromStdString(p.path().string())
QString::fromStdString(path.stem().string()),
QString::fromStdString(path.string())
);
// Add toooltip
std::optional<Profile> p = loadProfileFromFile(this, path.string());
int idx = _profileBox->count() - 1;
if (p.has_value() && (*p).meta.has_value()) {
const std::optional<std::string>& d = (*p).meta.value().description;
if (d.has_value()) {
// Tooltip has to be 'rich text' to linebreak properly
QString tooltip = QString::fromStdString(fmt::format("<p>{}</p>", *d));
_profileBox->setItemData(idx, tooltip, Qt::ToolTipRole);
}
}
}
_profileBox->addItem(QString::fromStdString("--- OpenSpace Profiles ---"));
@@ -431,11 +457,23 @@ void LauncherWindow::populateProfilesList(std::string preset) {
// Add sorted items to list
for (const fs::directory_entry& profile : profiles) {
std::string abc = profile.path().string();
std::filesystem::path path = profile.path();
_profileBox->addItem(
QString::fromStdString(profile.path().stem().string()),
QString::fromStdString(profile.path().string())
QString::fromStdString(path.stem().string()),
QString::fromStdString(path.string())
);
// Add toooltip
std::optional<Profile> p = loadProfileFromFile(this, path.string());
int idx = _profileBox->count() - 1;
if (p.has_value() && (*p).meta.has_value()) {
const std::optional<std::string>& d = (*p).meta.value().description;
if (d.has_value()) {
// Tooltip has to be 'rich text' to linebreak properly
QString tooltip = QString::fromStdString(fmt::format("<p>{}</p>", *d));
_profileBox->setItemData(idx, tooltip, Qt::ToolTipRole);
}
}
}
// Try to find the requested profile and set it as the current one
@@ -568,7 +606,6 @@ void LauncherWindow::openProfileEditor(const std::string& profile, bool isUserPr
}
else {
// Otherwise, we want to load that profile
std::string fullProfilePath = saveProfilePath + profile + ".profile";
p = loadProfileFromFile(this, fullProfilePath);
if (!p.has_value()) {

View File

@@ -133,7 +133,6 @@ void ScriptlogDialog::updateScriptList() {
_scriptlogList->addItem(QString::fromStdString(script));
}
}
_scriptlogList->setCurrentRow(index != -1 ? index : 0);
}
void ScriptlogDialog::saveChosenScripts() {

View File

@@ -216,21 +216,20 @@ void checkJoystickStatus() {
state.isConnected = true;
state.name = glfwGetJoystickName(i);
std::fill(state.axes.begin(), state.axes.end(), 0.f);
std::fill(state.buttons.begin(), state.buttons.end(), JoystickAction::Idle);
// Check axes and buttons
glfwGetJoystickAxes(i, &state.nAxes);
glfwGetJoystickButtons(i, &state.nButtons);
state.axes.resize(state.nAxes);
state.buttons.resize(state.nButtons);
std::fill(state.axes.begin(), state.axes.end(), 0.f);
std::fill(state.buttons.begin(), state.buttons.end(), JoystickAction::Idle);
}
const float* axes = glfwGetJoystickAxes(i, &state.nAxes);
state.axes.resize(state.nAxes);
std::memcpy(state.axes.data(), axes, state.nAxes * sizeof(float));
const unsigned char* buttons = glfwGetJoystickButtons(i, &state.nButtons);
state.buttons.resize(state.nButtons);
for (int j = 0; j < state.nButtons; ++j) {
const bool currentlyPressed = buttons[j] == GLFW_PRESS;
@@ -948,6 +947,12 @@ void setSgctDelegateFunctions() {
sgctDelegate.showStatistics = [](bool enabled) {
Engine::instance().setStatsGraphVisibility(enabled);
};
sgctDelegate.numberOfNodes = []() {
return ClusterManager::instance().numberOfNodes();
};
sgctDelegate.currentNode = []() {
return ClusterManager::instance().thisNodeId();
};
}
void checkCommandLineForSettings(int& argc, char** argv, bool& hasSGCT, bool& hasProfile,

View File

@@ -1,16 +1,16 @@
local function getIlluminationCommand(node, global)
local commandString = "local node = \"" .. node .. "\"\n"
if (node == "Current Focus") then
if (node == "Current Focus") then
commandString = "local node = openspace.navigation.getNavigationState().Anchor\n"
end
if (global) then
commandString = commandString .. [[
if (openspace.hasProperty("Scene."..node..".Renderable.UseAccurateNormals")) then
if (openspace.hasProperty("Scene."..node..".Renderable.UseAccurateNormals")) then
local list = openspace.getProperty("Scene." .. node .. ".Renderable.Layers.NightLayers.*.Enabled")
if (#list > 0) then
openspace.setPropertyValue("Scene." .. node .. ".Renderable.Layers.NightLayers.*.Enabled", false)
else
openspace.setPropertyValueSingle("Scene." .. node .. ".Renderable.PerformShading", false)
openspace.setPropertyValueSingle("Scene." .. node .. ".Renderable.PerformShading", false)
end
if openspace.hasSceneGraphNode(node .. "Atmosphere") then
openspace.setPropertyValueSingle("Scene." .. node .. "Atmosphere.Renderable.SunFollowingCamera", true)

View File

@@ -2,8 +2,14 @@ local fade_up_trails = {
Identifier = "os.fade_up_trails",
Name = "Show All Trails",
Command = [[
openspace.setPropertyValue("Scene.*Trail.Renderable.Fade", 1, 2);
openspace.setPropertyValue("Scene.*trail.Renderable.Fade", 1, 2);
local capList = openspace.getProperty("Scene.*Trail.Renderable.Fade");
for _,v in ipairs(capList) do
openspace.setPropertyValueSingle(v, 1, 2);
end
local list = openspace.getProperty("Scene.*trail.Renderable.Fade");
for _,v in ipairs(list) do
openspace.setPropertyValueSingle(v, 1, 2);
end
]],
Documentation = "Fade up all enabled trails in the Scene",
GuiPath = "/Trails",
@@ -15,8 +21,14 @@ local fade_down_trails = {
Identifier = "os.fade_down_trails",
Name = "Hide All Trails",
Command = [[
openspace.setPropertyValue("Scene.*Trail.Renderable.Fade", 0, 2);
openspace.setPropertyValue("Scene.*trail.Renderable.Fade", 0, 2);
local capList = openspace.getProperty("Scene.*Trail.Renderable.Fade");
for _,v in ipairs(capList) do
openspace.setPropertyValueSingle(v, 0, 2);
end
local list = openspace.getProperty("Scene.*trail.Renderable.Fade");
for _,v in ipairs(list) do
openspace.setPropertyValueSingle(v, 0, 2);
end
]],
Documentation = "Fade down all enabled trails in the Scene",
GuiPath = "/Trails",

View File

@@ -4,14 +4,14 @@ local toggle_trails = {
Command = [[
local list = openspace.getProperty("{planetTrail_solarSystem}.Renderable.Enabled");
for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end
local moonlist = openspace.getProperty("{moonTrail_solarSystem}.Renderable.Enabled");
for _,v in pairs(moonlist) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end
]],
Documentation = "Toggles the visibility of planet and moon trails",
GuiPath = "/Solar System",
IsLocal = false,
}
}
asset.onInitialize(function()
openspace.action.registerAction(toggle_trails)

View File

@@ -56,7 +56,7 @@ local hide_trail = {
else
node = openspace.navigation.getNavigationState().Anchor
end
if openspace.hasSceneGraphNode(node .. "Trail") then
openspace.setPropertyValueSingle("Scene." .. node .. "Trail.Renderable.Fade", 0.0, 1.0)
elseif openspace.hasSceneGraphNode(node .. "_trail") then
@@ -81,7 +81,7 @@ local show_trail = {
else
node = openspace.navigation.getNavigationState().Anchor
end
if openspace.hasSceneGraphNode(node .. "Trail") then
openspace.setPropertyValueSingle("Scene." .. node .. "Trail.Renderable.Fade", 1.0, 1.0)
elseif openspace.hasSceneGraphNode(node .. "_trail") then

View File

@@ -67,7 +67,7 @@ local toggle_trails = {
Command = [[
local list = openspace.getProperty("{planetTrail_solarSystem}.Renderable.Enabled");
for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end
local moonlist = openspace.getProperty("{moonTrail_solarSystem}.Renderable.Enabled");
for _,v in pairs(moonlist) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end
]],

View File

@@ -43,7 +43,7 @@ local obj = {
OnApproach = { "os.example.generic" },
OnReach = { "os.example.generic" },
OnRecede = { "os.example.generic" },
OnExit = { "os.example.generic" },
OnExit = { "os.example.generic" },
GUI = {
Name = "Example Event Model",
Path = "/Example",

View File

@@ -52,7 +52,13 @@ local property_value = {
DisplayString = "Earth is enabled: {}"
}
asset.onInitialize(function()
local elapsed_time = {
Type = "DashboardItemElapsedTime",
Identifier = "ElapsedTime",
ReferenceTime = "2022-10-12 12:00:00"
}
asset.onInitialize(function()
openspace.dashboard.addDashboardItem(angle)
openspace.dashboard.addDashboardItem(date)
openspace.dashboard.addDashboardItem(simulation_increment)
@@ -61,9 +67,11 @@ asset.onInitialize(function()
openspace.dashboard.addDashboardItem(parallel_connection)
openspace.dashboard.addDashboardItem(mission)
openspace.dashboard.addDashboardItem(property_value)
openspace.dashboard.addDashboardItem(elapsed_time)
end)
asset.onDeinitialize(function()
openspace.dashboard.removeDashboardItem(elapsed_time)
openspace.dashboard.removeDashboardItem(property_value)
openspace.dashboard.removeDashboardItem(mission)
openspace.dashboard.removeDashboardItem(parallel_connection)
@@ -74,6 +82,7 @@ asset.onDeinitialize(function()
openspace.dashboard.removeDashboardItem(angle)
end)
asset.export(elapsed_time)
asset.export(property_value)
asset.export(mission)
asset.export(parallel_connection)

View File

@@ -97,14 +97,14 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(sphericalGrid)
openspace.addSceneGraphNode(boxGrid)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(boxGrid)
openspace.removeSceneGraphNode(sphericalGrid)
openspace.removeSceneGraphNode(planarGrid)
openspace.removeSceneGraphNode(radialGrid)
end)
asset.export(radialGrid)
asset.export(sphericalGrid)
asset.export(planarGrid)

View File

@@ -1,47 +0,0 @@
local stateMachineHelper = asset.require("util/lua_state_machine_helper")
local states = {
{
Title = "Highlight EarthTrail",
Play = function ()
openspace.setPropertyValue("Scene.EarthTrail.Renderable.Appearance.LineWidth", 10, 1)
end,
Rewind = function ()
openspace.setPropertyValue("Scene.EarthTrail.Renderable.Appearance.LineWidth", 2, 1)
end
},
{
Title = "Highlight MarsTrail",
Play = function ()
openspace.setPropertyValue("Scene.EarthTrail.Renderable.Appearance.LineWidth", 2, 1)
openspace.setPropertyValue("Scene.MarsTrail.Renderable.Appearance.LineWidth", 10, 1)
end,
Rewind = function ()
openspace.setPropertyValue("Scene.MarsTrail.Renderable.Appearance.LineWidth", 2, 1)
openspace.setPropertyValue("Scene.EarthTrail.Renderable.Appearance.LineWidth", 10, 1)
end
}
}
local stateMachine
function next()
stateMachine.goToNextState()
end
function previous()
stateMachine.goToPreviousState()
end
asset.onInitialize(function()
stateMachine = stateMachineHelper.createStateMachine(states)
openspace.bindKey("RIGHT", "next()")
openspace.bindKey("LEFT", "previous()")
end)
asset.onDeinitialize(function()
stateMachine = nil
openspace.clearKey("RIGHT")
openspace.clearKey("LEFT")
end)

View File

@@ -68,8 +68,8 @@ Fragment getFragment() {
frag.color.rgb = normalize(vs_normalViewSpace);
}
frag.color.a = 1.0;
frag.gPosition = vs_positionCameraSpace;
frag.gNormal = vec4(vs_normalViewSpace, 0.0);
frag.gPosition = vs_positionCameraSpace;
frag.gNormal = vec4(vs_normalViewSpace, 0.0);
frag.disableLDR2HDR = true;
return frag;
}

View File

@@ -51,7 +51,7 @@ void main() {
gl_Position = positionScreenSpace;
vs_st = in_st;
vs_screenSpaceDepth = positionScreenSpace.w;
vs_normalViewSpace = normalize(mat3(normalTransform) * (mat3(meshNormalTransform) * in_normal));
// TBN matrix for normal mapping

View File

@@ -39,9 +39,9 @@ local model = {
asset.onInitialize(function()
openspace.addSceneGraphNode(model)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(model)
end)
asset.export(model)

View File

@@ -48,11 +48,11 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(circle)
openspace.addSceneGraphNode(ellipse)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(ellipse)
openspace.removeSceneGraphNode(circle)
end)
asset.export(circle)
asset.export(ellipse)

View File

@@ -24,9 +24,9 @@ local RenderablePlaneImageOnline = {
asset.onInitialize(function()
openspace.addSceneGraphNode(RenderablePlaneImageOnline)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(RenderablePlaneImageOnline)
end)
asset.export(RenderablePlaneImageOnline)

View File

@@ -23,9 +23,9 @@ local Spout = {
asset.onInitialize(function()
openspace.addSceneGraphNode(Spout)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Spout)
end)
asset.export(Spout)

View File

@@ -4,7 +4,7 @@ local deck = nil
asset.onInitialize(function ()
deck = helper.createDeck("example", {
UseRadiusAzimuthElevation = true,
RadiusAzimuthElevation = {1.0, 0.0, 0.0}, -- use for dome
RadiusAzimuthElevation = { 1.0, 0.0, 0.0 }, -- use for dome
UsePerspectiveProjection = true,
FaceCamera = true,
Scale = 0.7
@@ -17,7 +17,7 @@ asset.onInitialize(function ()
-- Add global functions for controlling slide deck and bind to keys
rawset(_G, "nextSlide", function()
helper.goToNextSlide(deck, interpolationDuration)
helper.goToNextSlide(deck, interpolationDuration)
end)
rawset(_G, "previousSlide", function()

View File

@@ -39,7 +39,7 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(n)
end
end)
asset.onDeinitialize(function()
for _, n in ipairs(spheres) do
openspace.removeSceneGraphNode(n)

View File

@@ -1,11 +1,11 @@
-- Create a state machine with a few different states. The state machine can be controlled through
-- the scripting commands from the state machine module.
local targetNode = function(nodeIdentifier)
local targetNode = function(nodeIdentifier)
return [[
openspace.setPropertyValueSingle("NavigationHandler.OrbitalNavigator.RetargetAnchor", nil)
openspace.setPropertyValueSingle(
"NavigationHandler.OrbitalNavigator.Anchor",
"NavigationHandler.OrbitalNavigator.Anchor",
"]] .. nodeIdentifier .. [["
)
openspace.setPropertyValueSingle("NavigationHandler.OrbitalNavigator.Aim", "")

View File

@@ -40,7 +40,7 @@ local layer_folder = {
Description = "Temporal coverage: 01 Jan 1981 - 31 Dec 2020"
}
asset.onInitialize(function()
asset.onInitialize(function()
openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer_prototype)
openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer_folder)
end)

View File

@@ -9,36 +9,36 @@ local transforms = asset.require("scene/solarsystem/sun/transforms")
local sunRadius = 695508000
local volume = {
Identifier = "GeneratedVolume",
Parent = transforms.SolarSystemBarycenter.Identifier,
Renderable = {
Type = "RenderableTimeVaryingVolume",
SourceDirectory = asset.localResource("cartesian"),
TransferFunction = asset.localResource("../transferfunction.txt"),
StepSize = 0.01,
MinValue = 0,
MaxValue = 1,
GridType = "Cartesian",
SecondsBefore = 50*365*24*60*60, -- 50 years before
SecondsAfter = 50*365*24*60*60 -- 50 years after
},
GUI = {
Path = "/Examples"
},
Transform = {
Scale = {
Type = "StaticScale",
Scale = 1000 * sunRadius
}
Identifier = "GeneratedVolume",
Parent = transforms.SolarSystemBarycenter.Identifier,
Transform = {
Scale = {
Type = "StaticScale",
Scale = 1000 * sunRadius
}
},
Renderable = {
Type = "RenderableTimeVaryingVolume",
SourceDirectory = asset.localResource("cartesian"),
TransferFunction = asset.localResource("../transferfunction.txt"),
StepSize = 0.01,
MinValue = 0,
MaxValue = 1,
GridType = "Cartesian",
SecondsBefore = 50*365*24*60*60, -- 50 years before
SecondsAfter = 50*365*24*60*60 -- 50 years after
},
GUI = {
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(volume)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(volume)
end)
asset.export(volume)

View File

@@ -36,7 +36,7 @@ local volume = {
asset.onInitialize(function()
openspace.addSceneGraphNode(volume)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(volume)
end)

View File

@@ -11,6 +11,12 @@ local astronomicalUnit = 149597870700
local volume = {
Identifier = "GeneratedVolume",
Parent = transforms.SolarSystemBarycenter.Identifier,
Transform = {
Scale = {
Type = "StaticScale",
Scale = astronomicalUnit
}
},
Renderable = {
Type = "RenderableTimeVaryingVolume",
SourceDirectory = asset.localResource("spherical"),
@@ -24,19 +30,13 @@ local volume = {
},
GUI = {
Path = "/Examples"
},
Transform = {
Scale = {
Type = "StaticScale",
Scale = astronomicalUnit
}
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(volume)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(volume)
end)

View File

@@ -20,9 +20,9 @@ local ToyVolume = {
asset.onInitialize(function()
openspace.addSceneGraphNode(ToyVolume)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(ToyVolume)
end)
asset.export(ToyVolume)

View File

@@ -8,13 +8,13 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(n)
end
end)
asset.onDeinitialize(function()
for _, n in ipairs(nodes) do
openspace.removeSceneGraphNode(n)
end
end)
for _, n in ipairs(nodes) do
asset.export(n)
end

View File

@@ -1,4 +1,4 @@
asset.onInitialize(function ()
asset.onInitialize(function ()
openspace.setPropertyValueSingle("Modules.Exoplanets.Enabled", true)
openspace.setPropertyValueSingle("Modules.Exoplanets.ShowComparisonCircle", false)
openspace.setPropertyValueSingle("Modules.Exoplanets.ShowHabitableZone", true)

View File

@@ -12,7 +12,7 @@ local colormaps = asset.syncedResource({
Version = 3
})
asset.onInitialize(function ()
asset.onInitialize(function ()
-- Set the default data files used for the exoplanet system creation
-- (Check if already set, to not override value set in another file)
local p = "Modules.Exoplanets.DataFolder";
@@ -31,9 +31,9 @@ asset.export("DataPath", DataPath)
asset.meta = {
Name = "Exoplanet Data",
Version = "3.0",
Description = [[The data that is used for the exoplanet systems. The data has been
derived from the 'Planetary Systems Composite Data' dataset from the NASA Exoplanet
Archive]],
Description = [[The data that is used for the exoplanet systems. The data has been
derived from the 'Planetary Systems Composite Data' dataset from the NASA Exoplanet
Archive]],
Author = "OpenSpace Team",
URL = "https://exoplanetarchive.ipac.caltech.edu/docs/data.html",
License = "MIT license"

View File

@@ -1,4 +1,4 @@
asset.onInitialize(function ()
asset.onInitialize(function ()
openspace.setPropertyValueSingle("Modules.SkyBrowser.Enabled", true)
openspace.setPropertyValueSingle("Modules.SkyBrowser.ShowTitleInGuiBrowser", false)
-- More settings are available, but for now using the default values

View File

@@ -21,8 +21,8 @@ local circle = {
},
GUI = {
Name = "Hover Circle",
Description = [[A circular marker that shows the position on the night sky
of the object hovered in the sky browser UI. The circle will hide/show up
Description = [[A circular marker that shows the position on the night sky
of the object hovered in the sky browser UI. The circle will hide/show up
dynamically, depending on the interaction with the items in the UI]],
Path = "/SkyBrowser"
}
@@ -42,7 +42,7 @@ asset.export(circle)
asset.meta = {
Name = "SkyBrowser Hover Circle",
Version = "1.0",
Description = [[Includes a circular marker that shows the position on the night sky
Description = [[Includes a circular marker that shows the position on the night sky
of the object hovered in the sky browser UI]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",

View File

@@ -53,11 +53,11 @@ local object = {
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)

View File

@@ -48,11 +48,11 @@ local object = {
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)

View File

@@ -50,11 +50,11 @@ local object = {
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)

View File

@@ -63,11 +63,11 @@ local object = {
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)

View File

@@ -125,14 +125,14 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(planck)
openspace.addSceneGraphNode(Halpha)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Halpha)
openspace.removeSceneGraphNode(planck)
openspace.removeSceneGraphNode(cbe)
openspace.removeSceneGraphNode(wmap)
end)
asset.export(wmap)
asset.export(cbe)
asset.export(planck)

View File

@@ -132,14 +132,14 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(multiverse_planck_3)
openspace.addSceneGraphNode(multiverse_planck_4)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(multiverse_planck_4)
openspace.removeSceneGraphNode(multiverse_planck_3)
openspace.removeSceneGraphNode(multiverse_planck_2)
openspace.removeSceneGraphNode(multiverse_planck_1)
end)
asset.export(multiverse_planck_1)
asset.export(multiverse_planck_2)
asset.export(multiverse_planck_3)

View File

@@ -81,7 +81,7 @@ local deepSkyImages = {
Name = "Deep Sky Objects Images",
Path = "/Universe/Galaxies",
Description = [[Census: 63 images and labels. DU Version 1.3. <br> These data are
2-D images of Messier objects placed in 3-D space. Not only do we place these
2-D images of Messier objects placed in 3-D space. Not only do we place these
images at the proper location and give them the correct orientation, we also
size them accurately so that you can fly to the globular cluster M13, for
example, and see just how small the cluster of hundreds of thousands of stars

View File

@@ -39,7 +39,7 @@ asset.require("./voids")
asset.meta = {
Name = "Digital Universe",
Version = "1.0",
Description = [[This asset is a meta asset, containing all the assets from the AMNH
Description = [[This asset is a meta asset, containing all the assets from the AMNH
Digital Universe]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",

View File

@@ -46,7 +46,7 @@ local object = {
abundance of stars brighter than the Sun. The globular clusters form one of
the most complete data sets in the Atlas. Data for the clusters represent
almost all the clusters in our Galaxy—several on the opposite side of Galactic
center may be invisible to us. The clusters orbit the Milky Way in random
center may be invisible to us. The clusters orbit the Milky Way in random
orientations, as comets orbit the Sun.(Description from URL) <br><br> Data
Reference: Properties of Galactic Globular Clusters, C. Francis+
(U Cambridge)]],
@@ -69,16 +69,16 @@ asset.meta = {
Name = "Globular Clusters",
Version = "2.1",
Description = [[Census: 157 globular clusters. DU Version 2.6. Globular star clusters
are gravitationally bound groups of 100,000 to 1 million stars. They are compact,
spherical "balls" of stars with very high stellar densities in their centers (stars
near their center are within a light year of one another). These clusters are
typically 30 to 100 light years in diameter. If Earth were located inside one of these
clusters, our sky would be lit by an abundance of stars brighter than the Sun. The
globular clusters form one of the most complete data sets in the Atlas. Data for the
clusters represent almost all the clusters in our Galaxy—several on the opposite side
of Galactic center may be invisible to us. The clusters orbit the Milky Way in random
orientations, as comets orbit the Sun.(Description from URL) <br><br> Data Reference:
Properties of Galactic Globular Clusters, C. Francis+ (U Cambridge)]],
are gravitationally bound groups of 100,000 to 1 million stars. They are compact,
spherical "balls" of stars with very high stellar densities in their centers (stars
near their center are within a light year of one another). These clusters are
typically 30 to 100 light years in diameter. If Earth were located inside one of these
clusters, our sky would be lit by an abundance of stars brighter than the Sun. The
globular clusters form one of the most complete data sets in the Atlas. Data for the
clusters represent almost all the clusters in our Galaxy—several on the opposite side
of Galactic center may be invisible to us. The clusters orbit the Milky Way in random
orientations, as comets orbit the Sun.(Description from URL) <br><br> Data Reference:
Properties of Galactic Globular Clusters, C. Francis+ (U Cambridge)]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"

View File

@@ -33,7 +33,7 @@ local radio = {
-- First TV signals strong enough to leave the ionosphere
ReferenceDate = "1936 AUG 01 12:00:00",
Speed = 299792458 -- c
},
},
Rotation = {
Type = "StaticRotation",
Rotation = equatorialRotationMatrix
@@ -59,7 +59,7 @@ local oort = {
Scale = {
Type = "StaticScale",
Scale = 7.47989845E15
},
},
Rotation = {
Type = "StaticRotation",
Rotation = eclipticRotationMatrix
@@ -85,7 +85,7 @@ local ecliptic = {
Scale = {
Type = "StaticScale",
Scale = 9.46377307652E17
},
},
Rotation = {
Type = "StaticRotation",
Rotation = eclipticRotationMatrix
@@ -141,7 +141,7 @@ local equatorial = {
Scale = {
Type = "StaticScale",
Scale = 4.28601E17;
},
},
Rotation = {
Type = "StaticRotation",
Rotation = equatorialRotationMatrix

View File

@@ -49,11 +49,11 @@ local object = {
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)

View File

@@ -47,11 +47,11 @@ local object = {
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)

View File

@@ -46,11 +46,11 @@ local plane = {
asset.onInitialize(function()
openspace.addSceneGraphNode(plane)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(plane)
end)
asset.export(plane)

View File

@@ -43,11 +43,11 @@ local plane = {
asset.onInitialize(function()
openspace.addSceneGraphNode(plane)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(plane)
end)
asset.export(plane)

View File

@@ -38,11 +38,11 @@ local sphere = {
asset.onInitialize(function()
openspace.addSceneGraphNode(sphere)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(sphere)
end)
asset.export(sphere)

View File

@@ -37,21 +37,18 @@ local object = {
GUI = {
Name = "Open Star Clusters",
Path = "/Milky Way",
Description = [[Census: 2,040 clusters. DU Version 5.7. <br>
An open star cluster is a loose assemblage of stars numbering from
hundreds to thousands that are bound by their mutual gravitation.
Astronomers know from their stellar spectra that stars in open clusters
are typically young. (With a star's spectrum, we can determine
the spectral type and the luminosity class, revealing the star's age.)
Because these are young stars, we expect to see them in the
star-forming regions of our Galaxy, namely in the spiral arms. For
this reason, open clusters exist, for the most part, in the plane of the
Galaxy, where we view the arms edge-on as that band of light in
the night sky. Because of this, open clusters were originally known
as Galactic clusters, but this term fell out of favor once astronomers
began to understand that the Galaxy includes objects beyond the
Milky Way's disk. <br><br> Data Reference: Optically
visible open clusters and Candidates (Dias+ 2002-2015)]]
Description = [[Census: 2,040 clusters. DU Version 5.7. <br> An open star cluster is a
loose assemblage of stars numbering from hundreds to thousands that are bound by
their mutual gravitation. Astronomers know from their stellar spectra that stars in
open clusters are typically young. (With a star's spectrum, we can determine the
spectral type and the luminosity class, revealing the star's age.) Because these are
young stars, we expect to see them in the star-forming regions of our Galaxy, namely
in the spiral arms. For this reason, open clusters exist, for the most part, in the
plane of the Galaxy, where we view the arms edge-on as that band of light in the
night sky. Because of this, open clusters were originally known as Galactic
clusters, but this term fell out of favor once astronomers began to understand that
the Galaxy includes objects beyond the Milky Way's disk. <br><br> Data Reference:
Optically visible open clusters and Candidates (Dias+ 2002-2015)]]
}
}

View File

@@ -55,11 +55,11 @@ local object = {
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)

View File

@@ -58,11 +58,11 @@ local object = {
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)

View File

@@ -172,7 +172,7 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(node)
end
end)
asset.onDeinitialize(function()
for i = #nodes, 1, -1 do
local node = nodes[i]

View File

@@ -100,12 +100,12 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(stars)
openspace.addSceneGraphNode(sunstar)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(sunstar)
openspace.removeSceneGraphNode(stars)
end)
asset.export(stars)
asset.export(sunstar)

View File

@@ -58,11 +58,11 @@ local gaia_abundance_apogee = {
asset.onInitialize(function()
openspace.addSceneGraphNode(gaia_abundance_apogee)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(gaia_abundance_apogee)
end)
asset.export(gaia_abundance_apogee)

View File

@@ -65,11 +65,11 @@ local GaiaStars = {
asset.onInitialize(function()
openspace.addSceneGraphNode(GaiaStars)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(GaiaStars)
end)
asset.export(GaiaStars)

View File

@@ -58,11 +58,11 @@ local gaia_abundance_galah = {
asset.onInitialize(function()
openspace.addSceneGraphNode(gaia_abundance_galah)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(gaia_abundance_galah)
end)
asset.export(gaia_abundance_galah)

View File

@@ -35,11 +35,11 @@ local object = {
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)

View File

@@ -53,11 +53,11 @@ local MilkyWayVolumeGalaxy = {
asset.onInitialize(function()
openspace.addSceneGraphNode(MilkyWayVolumeGalaxy)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(MilkyWayVolumeGalaxy)
end)
asset.export(MilkyWayVolumeGalaxy)

View File

@@ -53,11 +53,11 @@ local OrionClusterStars = {
asset.onInitialize(function()
openspace.addSceneGraphNode(OrionClusterStars)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(OrionClusterStars)
end)
asset.export(OrionClusterStars)

View File

@@ -53,6 +53,7 @@ local OrionNebulaModel = {
Scale = 0.67500000
}
},
InteractionSphere = 0.8,
Renderable = {
Type = "RenderableModel",
GeometryFile = sync .. "orion_nebula.obj",
@@ -91,7 +92,7 @@ local OrionNebulaShocksModel = {
Renderable = {
Type = "RenderableModel",
GeometryFile = sync .. "orishocks.obj",
Opacity = 1.0,
Opacity = 1.0,
DisableFaceCulling = false,
SpecularIntensity = 0.0,
AmbientIntensity = 0.0,
@@ -127,7 +128,7 @@ local OrionNebulaProplydsModel = {
Renderable = {
Type = "RenderableModel",
GeometryFile = sync .. "proplyds.obj",
Opacity = 1.0,
Opacity = 1.0,
DisableFaceCulling = false,
SpecularIntensity = 0.0,
AmbientIntensity = 0.0,
@@ -157,14 +158,14 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(OrionNebulaShocksModel)
openspace.addSceneGraphNode(OrionNebulaProplydsModel)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(OrionNebulaProplydsModel)
openspace.removeSceneGraphNode(OrionNebulaShocksModel)
openspace.removeSceneGraphNode(OrionNebulaModel)
openspace.removeSceneGraphNode(NebulaHolder)
end)
asset.export(NebulaHolder)
asset.export(OrionNebulaModel)
asset.export(OrionNebulaShocksModel)

View File

@@ -26,11 +26,11 @@ local NebulaPosition = {
asset.onInitialize(function()
openspace.addSceneGraphNode(NebulaPosition)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(NebulaPosition)
end)
asset.export(NebulaPosition)

View File

@@ -49,11 +49,11 @@ local object = {
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)

View File

@@ -0,0 +1,62 @@
local transforms = asset.require("./transforms")
asset.require("spice/base")
local Ceres = {
Identifier = "Ceres",
Parent = transforms.CeresPosition.Identifier,
Renderable = {
Type = "RenderableGlobe",
Radii = { 487.3E3, 487.3E3, 454.7E3 },
SegmentsPerPatch = 64,
Layers = {}
},
Tag = { "planet_solarSystem", "planet_terrestrial", "dwarf_planet" },
GUI = {
Path = "/Solar System/Dwarf Planets/Ceres"
}
}
local CeresLabel = {
Identifier = "CeresLabel",
Parent = Ceres.Identifier,
Renderable = {
Enabled = false,
Type = "RenderableLabel",
Text = "Ceres",
FontSize = 70.0,
Size = 8.66,
MinMaxSize = { 1, 100 },
BlendMode = "Additive",
OrientationOption = "Camera View Direction"
},
Tag = { "solarsystem_labels" },
GUI = {
Name = "Ceres Label",
Path = "/Solar System/Dwarf Planets/Ceres",
Description = "Label for Ceres, visible at the solarsystem overview zoom level"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Ceres)
openspace.addSceneGraphNode(CeresLabel)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(CeresLabel)
openspace.removeSceneGraphNode(Ceres)
end)
asset.export(Ceres)
asset.export(CeresLabel)
asset.meta = {
Name = "Ceres",
Version = "1.0",
Description = "Ceres globe, and main label",
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}

View File

@@ -0,0 +1,12 @@
asset.require("./layers/colorlayers/lamo_local", false)
asset.require("./layers/colorlayers/lamo", true)
asset.meta = {
Name = "Default Ceres Layers",
Version = "1.0",
Description = "Default Ceres layers are: LAMO",
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}

View File

@@ -0,0 +1,23 @@
local Kernels = asset.syncedResource({
Name = "Ceres Kernels",
Type = "HttpSynchronization",
Identifier = "ceres_kernels",
Version = 1
})
local CeresKernels = {
Kernels .. "ceres_v01.tpc",
Kernels .. "sb_ceres_140724.bsp",
Kernels .. "sb_ceres_110211.bsp"
}
asset.export("CeresKernels", CeresKernels)
asset.meta = {
Name = "Ceres Spice Kernels",
Version = "1.0",
Description = "SPICE kernels for Ceres",
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "NASA"
}

View File

@@ -0,0 +1,20 @@
<GDAL_WMS>
<Service name="TMS">
<ServerUrl>http://wms.itn.liu.se/Ceres/LAMO/tile/${z}/${y}/${x}</ServerUrl>
</Service>
<DataWindow>
<UpperLeftX>-180.0</UpperLeftX>
<UpperLeftY>90</UpperLeftY>
<LowerRightX>180.0</LowerRightX>
<LowerRightY>-90.0</LowerRightY>
<SizeX>131072</SizeX>
<SizeY>65536</SizeY>
<TileLevel>9</TileLevel>
<YOrigin>top</YOrigin>
</DataWindow>
<Projection>EPSG:4326</Projection>
<BlockSizeX>256</BlockSizeX>
<BlockSizeY>256</BlockSizeY>
<BandsCount>1</BandsCount>
<MaxConnections>10</MaxConnections>
</GDAL_WMS>

View File

@@ -0,0 +1,28 @@
local globeIdentifier = asset.require("../../ceres").Ceres.Identifier
local layer = {
Identifier = "LAMO_",
Name = "LAMO [Sweden]",
Enabled = asset.enabled,
FilePath = asset.localResource('LAMO.wms'),
}
asset.onInitialize(function ()
openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
end)
asset.onDeinitialize(function()
openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", layer)
end)
asset.export("layer", layer)
asset.meta = {
Name = "LAMO [Sweden]",
Version = "1.0",
Description = [[]],
Author = "",
URL = "",
License = ""
}

View File

@@ -0,0 +1,35 @@
local globeIdentifier = asset.require("../../ceres").Ceres.Identifier
local textures = asset.syncedResource({
Name = "Ceres Textures",
Type = "HttpSynchronization",
Identifier = "ceres_textures",
Version = 2
})
local layer = {
Identifier = "LAMO_Local",
Name = "LAMO [Local]",
Enabled = asset.enabled,
FilePath = textures .. "ceres_lamo_4096x2048.png",
}
asset.onInitialize(function ()
openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
end)
asset.onDeinitialize(function()
openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", layer)
end)
asset.export("layer", layer)
asset.meta = {
Name = "LAMO [Local]",
Version = "1.0",
Description = [[]],
Author = "",
URL = "",
License = ""
}

View File

@@ -0,0 +1,44 @@
local transforms = asset.require("scene/solarsystem/sun/transforms")
asset.require("spice/base")
local kernels = asset.require("./kernels").CeresKernels
local CeresTrail = {
Identifier = "CeresTrail",
Parent = transforms.SolarSystemBarycenter.Identifier,
Renderable = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Target = "CERES",
Observer = "SSB",
Kernels = kernels
},
Color = { 0.7, 0.8, 0.7 },
Period = 1680,
Resolution = 1000
},
Tag = { "planetTrail_solarSystem", "planetTrail_dwarf" },
GUI = {
Name = "Ceres Trail",
Path = "/Solar System/Dwarf Planets/Ceres"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(CeresTrail)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(CeresTrail)
end)
asset.export(CeresTrail)
asset.meta = {
Name = "Ceres Trail",
Version = "1.0",
Description = "Trail of Ceres as observed by the Sun. Data from NASA Spice",
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}

View File

@@ -0,0 +1,46 @@
local transforms = asset.require("scene/solarsystem/sun/transforms")
asset.require("spice/base")
local kernels = asset.require("./kernels").CeresKernels
local CeresPosition = {
Identifier = "CeresPosition",
Parent = transforms.SolarSystemBarycenter.Identifier,
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_CERES",
DestinationFrame = "GALACTIC",
Kernels = kernels
},
Translation = {
Type = "SpiceTranslation",
Target = "CERES",
Observer = "SSB",
Kernels = kernels
}
},
GUI = {
Name = "Ceres Position",
Path = "/Solar System/Dwarf Planets/Ceres",
Hidden = true
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(CeresPosition)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(CeresPosition)
end)
asset.export(CeresPosition)
asset.meta = {
Name = "Ceres Transforms",
Version = "1.0",
Description = "Ceres transform",
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}

View File

@@ -53,11 +53,11 @@ local Charon = {
asset.onInitialize(function()
openspace.addSceneGraphNode(Charon)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Charon)
end)
asset.export(Charon)

View File

@@ -16,10 +16,10 @@ local CharonTrailBarycentric = {
Period = 6.38723,
Resolution = 1000
},
Tag = {
"moonTrail_solarSystem",
"moonTrail_dwarf",
"moonTrail_pluto",
Tag = {
"moonTrail_solarSystem",
"moonTrail_dwarf",
"moonTrail_pluto",
"moonTrail_minor"
},
GUI = {
@@ -31,11 +31,11 @@ local CharonTrailBarycentric = {
asset.onInitialize(function()
openspace.addSceneGraphNode(CharonTrailBarycentric)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(CharonTrailBarycentric)
end)
asset.export(CharonTrailBarycentric)

View File

@@ -7,7 +7,7 @@ local layer = {
FilePath = "WMS:https://planetarymaps.usgs.gov/cgi-bin/mapserv?map=/maps/pluto/charon_simp_cyl.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=NEWHORIZONS_CHARON_MOSAIC&SRS=EPSG:4326&BBOX=-180,-90.0003,359.972,90",
}
asset.onInitialize(function ()
asset.onInitialize(function ()
openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
end)

View File

@@ -7,7 +7,7 @@ local layer = {
FilePath = "WMS:https://planetarymaps.usgs.gov/cgi-bin/mapserv?map=/maps/pluto/pluto_simp_cyl.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=NEWHORIZONS_PLUTO_MOSAIC&SRS=EPSG:4326&BBOX=-180,-90,360,90",
}
asset.onInitialize(function ()
asset.onInitialize(function ()
openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
end)
@@ -31,7 +31,7 @@ asset.meta = {
parallax - or the difference in the apparent relative positions - of features on
the surface obtained at different viewing angles during the encounter. Scientists
use these parallax displacements of high and low terrain to estimate landform
heights.The mosaic is available in Equirectangular projection at an equatorial
heights.The mosaic is available in Equirectangular projection at an equatorial
pixel scale of 300 meters per pixel (m). (Description from URL)]],
Author = "USGS",
URL = "https://astrogeology.usgs.gov/search/map/Pluto/NewHorizons/" ..

View File

@@ -40,10 +40,10 @@ local HydraTrail = {
Period = 38.20177,
Resolution = 1000
},
Tag = {
"moonTrail_solarSystem",
"moonTrail_dwarf",
"moonTrail_pluto",
Tag = {
"moonTrail_solarSystem",
"moonTrail_dwarf",
"moonTrail_pluto",
"moonTrail_minor"
},
GUI = {
@@ -56,12 +56,12 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(Hydra)
openspace.addSceneGraphNode(HydraTrail)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(HydraTrail)
openspace.removeSceneGraphNode(Hydra)
end)
asset.export(Hydra)
asset.export(HydraTrail)

View File

@@ -39,10 +39,10 @@ local KerberosTrail = {
Period = 32.16756,
Resolution = 1000
},
Tag = {
"moonTrail_solarSystem",
"moonTrail_dwarf",
"moonTrail_pluto",
Tag = {
"moonTrail_solarSystem",
"moonTrail_dwarf",
"moonTrail_pluto",
"moonTrail_minor"
},
GUI = {
@@ -55,12 +55,12 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(Kerberos)
openspace.addSceneGraphNode(KerberosTrail)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(KerberosTrail)
openspace.removeSceneGraphNode(Kerberos)
end)
asset.export(Kerberos)
asset.export(KerberosTrail)

View File

@@ -39,10 +39,10 @@ local NixTrail = {
Period = 24.85463,
Resolution = 1000
},
Tag = {
"moonTrail_solarSystem",
"moonTrail_dwarf",
"moonTrail_pluto",
Tag = {
"moonTrail_solarSystem",
"moonTrail_dwarf",
"moonTrail_pluto",
"moonTrail_minor"
},
GUI = {
@@ -55,12 +55,12 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(Nix)
openspace.addSceneGraphNode(NixTrail)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(NixTrail)
openspace.removeSceneGraphNode(Nix)
end)
asset.export(Nix)
asset.export(NixTrail)

View File

@@ -38,10 +38,10 @@ local StyxTrail = {
Period = 20.16155,
Resolution = 1000
},
Tag = {
"moonTrail_solarSystem",
"moonTrail_dwarf",
"moonTrail_pluto",
Tag = {
"moonTrail_solarSystem",
"moonTrail_dwarf",
"moonTrail_pluto",
"moonTrail_minor"
},
GUI = {
@@ -54,12 +54,12 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(Styx)
openspace.addSceneGraphNode(StyxTrail)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(StyxTrail)
openspace.removeSceneGraphNode(Styx)
end)
asset.export(Styx)
asset.export(StyxTrail)

View File

@@ -43,7 +43,7 @@ local Pluto = {
Color = { 1.0, 1.0, 0.0 }
}
},
Tag = { "planet_solarSystem", "planet_terrestrial" },
Tag = { "planet_solarSystem", "planet_terrestrial", "dwarf_planet" },
GUI = {
Path = "/Solar System/Dwarf Planets/Pluto"
}
@@ -74,12 +74,12 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(Pluto)
openspace.addSceneGraphNode(PlutoLabel)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(PlutoLabel)
openspace.removeSceneGraphNode(Pluto)
end)
asset.export(Pluto)
asset.export(PlutoLabel)

View File

@@ -27,11 +27,11 @@ local PlutoTrailBarycentric = {
asset.onInitialize(function()
openspace.addSceneGraphNode(PlutoTrailBarycentric)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(PlutoTrailBarycentric)
end)
asset.export(PlutoTrailBarycentric)

View File

@@ -36,11 +36,11 @@ local PlutoKeplerianTrail = {
asset.onInitialize(function()
openspace.addSceneGraphNode(PlutoKeplerianTrail)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(PlutoKeplerianTrail)
end)
asset.export(PlutoKeplerianTrail)

View File

@@ -31,11 +31,11 @@ local PlutoBarycenterTrail = {
asset.onInitialize(function()
openspace.addSceneGraphNode(PlutoBarycenterTrail)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(PlutoBarycenterTrail)
end)
asset.export(PlutoBarycenterTrail)

View File

@@ -24,11 +24,11 @@ local PlutoBarycenter = {
asset.onInitialize(function()
openspace.addSceneGraphNode(PlutoBarycenter)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(PlutoBarycenter)
end)
asset.export(PlutoBarycenter)

View File

@@ -1,18 +1,18 @@
local resetLoopAction = {
Documentation = "Reset button. Sets time to start of dataset. No loop",
GuiPath = "2012July",
Identifier = "2012july.reset_loop",
IsLocal = false,
Name = "Reset button",
Command = "openspace.time.setTime('2012-JUL-01 07:00:00.00');\nopenspace.time.setDeltaTime(1400);\nopenspace.scriptScheduler.clear();"
Documentation = "Reset button. Sets time to start of dataset. No loop",
GuiPath = "2012July",
Identifier = "2012july.reset_loop",
IsLocal = false,
Name = "Reset button",
Command = "openspace.time.setTime('2012-JUL-01 07:00:00.00');\nopenspace.time.setDeltaTime(1400);\nopenspace.scriptScheduler.clear();"
}
asset.export(resetLoopAction)
asset.onInitialize(function ()
openspace.action.registerAction(resetLoopAction)
openspace.action.registerAction(resetLoopAction)
end)
asset.onDeinitialize(function ()
openspace.action.removeAction(resetLoopAction)
openspace.action.removeAction(resetLoopAction)
end)

View File

@@ -32,11 +32,11 @@ local travelSpeedIndicator = {
asset.onInitialize(function()
openspace.addSceneGraphNode(travelSpeedIndicator)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(travelSpeedIndicator)
end)
asset.export(travelSpeedIndicator)

View File

@@ -55,12 +55,12 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(C2019Q4BorisovPosition)
openspace.addSceneGraphNode(C2019Q4BorisovTrail)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(C2019Q4BorisovTrail)
openspace.removeSceneGraphNode(C2019Q4BorisovPosition)
end)
asset.export(C2019Q4BorisovPosition)
asset.export(C2019Q4BorisovTrail)

View File

@@ -56,12 +56,12 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(OumuamuaPosition)
openspace.addSceneGraphNode(OumuamuaTrail)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(OumuamuaTrail)
openspace.removeSceneGraphNode(OumuamuaPosition)
end)
asset.export(OumuamuaPosition)
asset.export(OumuamuaTrail)

View File

@@ -254,7 +254,7 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(node)
end
end)
asset.onDeinitialize(function()
for i = #nodes, 1, -1 do
local node = nodes[i]

View File

@@ -60,11 +60,11 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(Apollo11Lem)
openspace.addSceneGraphNode(Apollo11LemModel)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Apollo11LemModel)
openspace.removeSceneGraphNode(Apollo11Lem)
end)
asset.export(Apollo11Lem)
asset.export(Apollo11LemModel)

View File

@@ -84,11 +84,11 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(Apollo15)
openspace.addSceneGraphNode(Apollo15Trail)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Apollo15Trail)
openspace.removeSceneGraphNode(Apollo15)
end)
asset.export(Apollo15)
asset.export(Apollo15Trail)

View File

@@ -32,7 +32,7 @@ local kernels = {
-- folder .. "apollo15_panoramic.0001.ti",
-- --tspk
-- folder .. "de421.bsp",
-- folder .. "de421.bsp",
-- folder .. "moon_pa_de421_1900-2050.bpc",
-- --iak

View File

@@ -166,7 +166,7 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(node)
end
end)
asset.onDeinitialize(function()
for i = #nodes, 1, -1 do
local node = nodes[i]

View File

@@ -166,7 +166,7 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(node)
end
end)
asset.onDeinitialize(function()
for i = #nodes, 1, -1 do
local node = nodes[i]

View File

@@ -61,11 +61,11 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(Station7BoulderHolder)
openspace.addSceneGraphNode(Station7BoulderModel)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Station7BoulderModel)
openspace.removeSceneGraphNode(Station7BoulderHolder)
end)
asset.export(Station7BoulderHolder)
asset.export(Station7BoulderModel)

View File

@@ -60,11 +60,11 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(Apollo17Lem)
openspace.addSceneGraphNode(Apollo17LemModel)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Apollo17LemModel)
openspace.removeSceneGraphNode(Apollo17Lem)
end)
asset.export(Apollo17Lem)
asset.export(Apollo17LemModel)

View File

@@ -69,11 +69,11 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(Apollo8Launch)
openspace.addSceneGraphNode(Apollo8LaunchModel)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Apollo8LaunchModel)
openspace.removeSceneGraphNode(Apollo8Launch)
end)
asset.export(Apollo8Launch)
asset.export(Apollo8LaunchModel)

View File

@@ -98,13 +98,13 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(Apollo8Model)
openspace.addSceneGraphNode(Apollo8Pivot)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Apollo8Pivot)
openspace.removeSceneGraphNode(Apollo8Model)
openspace.removeSceneGraphNode(Apollo8)
end)
asset.export(Apollo8)
asset.export(Apollo8Model)
asset.export(Apollo8Pivot)

View File

@@ -82,13 +82,13 @@ asset.onInitialize(function()
openspace.addSceneGraphNode(MoonTrail)
openspace.addSceneGraphNode(EarthBarycenterTrail)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(EarthBarycenterTrail)
openspace.removeSceneGraphNode(MoonTrail)
openspace.removeSceneGraphNode(LaunchTrail)
end)
asset.export(LaunchTrail)
asset.export(MoonTrail)
asset.export(EarthBarycenterTrail)

View File

@@ -101,7 +101,7 @@ local hide_apollo_labels = {
IsLocal = true
}
asset.onInitialize(function ()
asset.onInitialize(function ()
openspace.action.registerAction(show_apollo_labels)
openspace.action.registerAction(hide_apollo_labels)
for _, node in ipairs(nodes) do

View File

@@ -1,98 +0,0 @@
local transforms = asset.require("scene/solarsystem/sun/transforms")
local kernels = asset.syncedResource({
Name = "Dawn Kernels",
Type = "HttpSynchronization",
Identifier = "dawn_kernels",
Version = 2
})
local textures = asset.syncedResource({
Name = "Ceres Textures",
Type = "HttpSynchronization",
Identifier = "ceres_textures",
Version = 1
})
local Ceres = {
Identifier = "Ceres",
Parent = transforms.SolarSystemBarycenter.Identifier,
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_CERES",
DestinationFrame = "GALACTIC",
Kernels = {
kernels .. "dawn_ceres_v01.tpc",
kernels .. "sb_ceres_140724.bsp",
kernels .. "sb_ceres_110211.bsp"
}
},
Translation = {
Type = "SpiceTranslation",
Target = "CERES",
Observer = "SSB",
Kernels = {
kernels .. "dawn_ceres_v01.tpc",
kernels .. "sb_ceres_140724.bsp",
kernels .. "sb_ceres_110211.bsp"
}
}
},
Renderable = {
Type = "RenderableGlobe",
Radii = { 6.390E5, 6.390E5, 6.390E5 },
SegmentsPerPatch = 64,
Layers = {
ColorLayers = {
{
Identifier = "Texture",
FilePath = textures .. "gray.png",
Enabled = true
}
}
}
},
GUI = {
Path = "/Solar System/Dwarf Planets/Ceres"
}
}
local CeresTrail = {
Identifier = "CeresTrail",
Parent = transforms.SolarSystemBarycenter.Identifier,
Renderable = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Target = "CERES",
Observer = "SSB"
},
Color = { 0.7, 0.8, 0.7 },
StartTime = "2010 JAN 01 00:00:00.000",
EndTime = "2100 JAN 01 00:00:00.000",
Period = 1325.0,
Resolution = 3600 * 24
},
GUI = {
Name = "Ceres Trail",
Path = "/Solar System/Asteroid Belt/Vesta"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Ceres)
openspace.addSceneGraphNode(CeresTrail)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(CeresTrail)
openspace.removeSceneGraphNode(Ceres)
end)
asset.export(Ceres)
asset.export(CeresTrail)

Some files were not shown because too many files have changed in this diff Show More