diff --git a/.gitignore b/.gitignore index c71edd624b..d80ea9cee9 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ .vscode CMakeCache.txt CMakeFiles +CMakeLists.txt.user cmake-build-* cmake_install.cmake install_manifest.txt diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index c164947107..0d902bbe4f 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit c1649471074314a5aebfc6b7726eae4e3955c8ea +Subproject commit 0d902bbe4f13be7e1e532aa4428b9cc90422611b diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index 204f1d5334..b4860fdeaf 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -353,7 +353,6 @@ void mainInitFunc(GLFWwindow*) { // // Screenshots // - std::string screenshotPath = "${SCREENSHOTS}"; if (global::configuration.shouldUseScreenshotDate) { std::time_t now = std::time(nullptr); @@ -520,7 +519,7 @@ void mainPostSyncPreDrawFunc() { -void mainRenderFunc(const RenderData& data) { +void mainRenderFunc(const sgct::RenderData& data) { ZoneScoped #ifdef OPENSPACE_HAS_VTUNE @@ -595,7 +594,7 @@ void mainRenderFunc(const RenderData& data) { -void mainDraw2DFunc(const RenderData& data) { +void mainDraw2DFunc(const sgct::RenderData& data) { ZoneScoped #ifdef OPENSPACE_HAS_VTUNE @@ -1304,9 +1303,9 @@ int main(int argc, char** argv) { ghoul::deinitialize(); } catch (...) { - Engine::destroy(); global::openSpaceEngine.deinitialize(); ghoul::deinitialize(); + Engine::destroy(); throw; } diff --git a/data/assets/apollo8.scene b/data/assets/apollo8.scene deleted file mode 100644 index fd8fcebb42..0000000000 --- a/data/assets/apollo8.scene +++ /dev/null @@ -1,127 +0,0 @@ ---apollo.scene -asset.require('./base') -local propertyHelper = asset.require('util/property_helper') -local sceneHelper = asset.require('util/scene_helper') - - -asset.require('scene/solarsystem/planets/earth/moon/moon') -asset.require('scene/solarsystem/missions/apollo/8/apollo8.asset') - --- Custom Keybindings -local Keybindings = { - { - Key = "E", - Command = "openspace.time.setPause(true);" .. - "openspace.time.setDeltaTime(1);" .. - "openspace.time.setTime('1968 DEC 24 16:37:31');" .. - "openspace.navigation.setNavigationState({" .. - " Anchor = 'Apollo8'," .. - " Position = { 1.494592E1, 3.236777E1, -4.171296E1 }," .. - " ReferenceFrame = 'Root'," .. - " Up = { 0.960608E0, -0.212013E0, 0.179675E0 }" .. - "});" .. - "openspace.setPropertyValue('*Trail.Renderable.Enabled', false)", - Documentation = "Jump to right before the earthrise photo", - Name = "Set Earthrise time", - GuiPath = "/Missions/Apollo/8", - Local = false - }, - { - Key = "U", - Command = "openspace.time.setTime('1968-12-21T12:51:37.00')" .. - "openspace.setPropertyValueSingle('Scene.Apollo8LaunchTrail.Renderable.Enabled', true);", - Documentation = "Jump to time right before Apollo 8 liftoff, with its trail enabled", - Name = "Set Apollo 8 launch time", - GuiPath = "/Missions/Apollo/8", - Local = false - }, - { - Key = "K", - Command = propertyHelper.invert('Scene.Moon.Renderable.Layers.ColorLayers.Kaguya_Utah.Enabled'), - Documentation = "Toggles Moon Kaguya color layer", - Name = "Toggle Kaguya layer on the Moon", - GuiPath = "/Missions/Apollo", - Local = false - }, - { - Key = "T", - Command = propertyHelper.invert('Scene.Apollo8MoonTrail.Renderable.Enabled'), - Documentation = "Toggles the trails of the Apollo 8 orbits, focused around the Moon", - Name = "Toggle Apollo 8 orbits", - GuiPath = "/Missions/Apollo/8", - Local = false - }, - { - Key = "SHIFT+T", - Command = propertyHelper.invert('Scene.Apollo8LaunchTrail.Renderable.Enabled'), - Documentation = "Toggles the trails of the Apollo 8 Launch, focused around the Earth", - Name = "Toggle Apollo 8 launch trail", - GuiPath = "/Missions/Apollo/8", - Local = false - }, - { - Key = "CTRL+T", - Command = propertyHelper.invert('Scene.Apollo8EarthBarycenterTrail.Renderable.Enabled'), - Documentation = "Toggles the trails of the full Apollo 8, with Earth's frame of reference", - Name = "Toggles Apollo 8 full trail", - GuiPath = "/Missions/Apollo/8", - Local = false - }, - { - Key = "S", - Command = propertyHelper.invert('Scene.Moon.Renderable.PerformShading'), - Documentation = "Toggles shading for the Moon", - Name = "Toggle Moon shading", - GuiPath = "/Missions/Apollo", - Local = false - }, - { - Key = "PAGE_UP", - Command = "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', '')" .. - "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Apollo8')" .. - "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)", - Documentation = "Set camera focus to Apollo 8", - Name = "Focus on Apollo 8", - GuiPath = "/Missions/Apollo/8", - Local = false - }, - { - Key = "PAGE_DOWN", - Command = "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', '')" .. - "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Moon')" .. - "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)", - Documentation = "Set camera focus to the Moon", - Name = "Focus on Moon", - GuiPath = "/Missions/Apollo", - Local = false - }, - { - Key = "HOME", - Command = "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', '')" .. - "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Earth')" .. - "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)", - Documentation = "Set camera focus to the Earth", - Name = "Focus on Earth", - GuiPath = "/Missions/Apollo", - Local = false - } -} - -local earthAsset = asset.require('scene/solarsystem/planets/earth/earth') -asset.onInitialize(function () - sceneHelper.bindKeys(Keybindings) - - openspace.time.setTime("1968-12-21T12:51:51.0") - -- Earthrise: - -- openspace.time.setTime("1968-12-24T16:37:19.0") - - openspace.markInterestingNodes({ "Earth", "Moon", "Apollo8", "Apollo8Launch" }) - - openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.MinimumAllowedDistance', 0.000000); - - openspace.globebrowsing.goToGeo(earthAsset.Earth.Identifier, 20, -60, 15000000) -end) - -asset.onDeinitialize(function () - openspace.removeInterestingNodes({ "Earth", "Moon", "Apollo8" }) -end) diff --git a/data/assets/apollo_sites.scene b/data/assets/apollo_sites.scene deleted file mode 100644 index aaf8a3c147..0000000000 --- a/data/assets/apollo_sites.scene +++ /dev/null @@ -1,113 +0,0 @@ -asset.require('./base') - -local sceneHelper = asset.require('util/scene_helper') --- local station2 = asset.require('scene/solarsystem/missions/apollo/17/bouldersstation2') --- local station6 = asset.require('scene/solarsystem/missions/apollo/17/bouldersstation6') --- local station7 = asset.require('scene/solarsystem/missions/apollo/17/bouldersstation7') -asset.require('scene/solarsystem/missions/apollo/8/apollo8') -asset.require('scene/solarsystem/missions/apollo/11/apollo11') -asset.require('scene/solarsystem/missions/apollo/17/lem') -asset.require('scene/solarsystem/missions/apollo/apollo_globebrowsing') -asset.require('scene/solarsystem/missions/apollo/11/lem_flipbook') -asset.require('scene/solarsystem/missions/apollo/insignias_map') - -local Keybindings = { - { - Key = "m", - Command = "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Moon'); " .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);", - Documentation = "Focus on Moon", - Name = "Focus on Moon", - GuiPath = "/Missions/Apollo", - Local = false - }, - { - Key = "F9", - Command = "openspace.setPropertyValue('Scene.Moon.Renderable.Layers.ColorLayers.A17_*.Enabled', false);" .. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_11.Enabled', false);" .. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A11_M177481212_p_longlat.Enabled', false);" .. - "openspace.setPropertyValueSingle('Scene.Apollo11MoonTrail.Renderable.Enabled', false);" .. - "openspace.setPropertyValueSingle('Scene.Apollo11LemTrail.Renderable.Enabled', false);".. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_17.Enabled', false);", - Documentation = "Disable apollo site on moon when switching", - Name = "Disable Apollo site", - GuiPath = "/Missions/Apollo", - Local = false - }, - { - Key = "F11", - Command = "openspace.time.setTime('1969 JUL 20 20:17:40');" .. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_11.Enabled', true);" .. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A11_M177481212_p_longlat.Enabled', true);" .. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.LodScaleFactor', 20.11);" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Apollo11LemPosition');" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);" .. - "openspace.setPropertyValueSingle('Scene.Apollo11MoonTrail.Renderable.Enabled', true);" .. - "openspace.setPropertyValueSingle('Scene.Apollo11LemTrail.Renderable.Enabled', true);", - Documentation = "Setup for A11 site", - Name = "Setup A11 site", - GuiPath = "/Missions/Apollo/11", - Local = false - }, - { - Key = "F7", - Command = "openspace.time.setTime('1972 DEC 12 19:47:11');" .. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.BlendMode', 0.000000);" .. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.Enabled', true);" .. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_17.Enabled', true);" .. - -- "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station6a.Enabled', true);" .. - -- "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station6a.BlendMode', 0.000000);" .. - -- "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station2.Enabled', true);" .. - -- "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station2.BlendMode', 0.000000);" .. - -- "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station7.Enabled', true);" .. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_LEM.Enabled', true);" .. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_LEM.BlendMode', 0.000000);" .. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_NAC_Alt_p.Enabled', true);" .. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_NAC_Alt_p.BlendMode', 0.000000);" .. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.LodScaleFactor', 20.17);" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Apollo17LemModel');" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);" .. - "openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station7.BlendMode', 0.000000);", - Documentation = "Setup for A17 site", - Name = "Setup A17 site", - GuiPath = "/Missions/Apollo/17", - Local = false - } -} - -local moonAsset = asset.require('scene/solarsystem/planets/earth/moon/moon') -asset.onInitialize(function () - openspace.time.setTime("1972 DEC 12 19:47:11") - - sceneHelper.bindKeys(Keybindings) - - openspace.markInterestingNodes({ - "Moon", "Apollo11LemModel", "Apollo17LemModel", - "Apollo11", "Apollo11LunarLander", - -- "Station_2_Boulder2", "Station_6_Fragment1" - }) - - openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.BlendMode', 0); - -- To enable both sites by default, uncomment these lines - -- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.Enabled', true); - -- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_17.Enabled', true); - -- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_LEM.Enabled', true); - -- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_LEM.BlendMode', 0.000000); - -- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_NAC_Alt_p.Enabled', true); - -- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_NAC_Alt_p.BlendMode', 0.000000); - -- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station7.BlendMode', 0.000000); - -- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_11.Enabled', true); - -- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A11_M177481212_p_longlat.Enabled', true); - - openspace.globebrowsing.goToGeo(moonAsset.Moon.Identifier, 20, -60, 15000000) - - openspace.setPropertyValueSingle("Scene.Moon.Renderable.PerformShading", false) -end) - -asset.onDeinitialize(function () - openspace.removeInterestingNodes({ - "Moon", "Apollo11Lem", "Apollo17Lem", - "Apollo11", "Apollo11LemPosition", - -- "Station_6_Fragment1", "Station_6_Fragments_2_3" - }) -end) diff --git a/data/assets/asteroids.scene b/data/assets/asteroids.scene deleted file mode 100644 index e2d9d2b0e4..0000000000 --- a/data/assets/asteroids.scene +++ /dev/null @@ -1,36 +0,0 @@ -asset.require('./base') - -local earthAsset = asset.require('scene/solarsystem/planets/earth/earth') - -asset.require('scene/solarsystem/sssb/amor_asteroid') -asset.require('scene/solarsystem/sssb/apollo_asteroid') -asset.require('scene/solarsystem/sssb/aten_asteroid') -asset.require('scene/solarsystem/sssb/atira_asteroid') -asset.require('scene/solarsystem/sssb/centaur_asteroid') -asset.require('scene/solarsystem/sssb/chiron-type_comet') -asset.require('scene/solarsystem/sssb/encke-type_comet') -asset.require('scene/solarsystem/sssb/halley-type_comet') -asset.require('scene/solarsystem/sssb/inner_main_belt_asteroid') -asset.require('scene/solarsystem/sssb/jupiter_trojan_asteroid') -asset.require('scene/solarsystem/sssb/jupiter-family_comet') -asset.require('scene/solarsystem/sssb/main_belt_asteroid') -asset.require('scene/solarsystem/sssb/mars-crossing_asteroid') -asset.require('scene/solarsystem/sssb/outer_main_belt_asteroid') -asset.require('scene/solarsystem/sssb/transneptunian_object_asteroid') -asset.require('scene/solarsystem/sssb/pha') -asset.require('scene/solarsystem/sssb/c2019y4atlas') - -asset.onInitialize(function () - local now = openspace.time.currentWallTime() - -- Jump back one day to be able to show complete weather data on Earth. - openspace.time.setTime(openspace.time.advancedTime(now, "-1d")) - - openspace.globebrowsing.goToGeo("Earth", 58.5877, 16.1924, 2.7e12) - - openspace.markInterestingNodes({ "Earth", "Mars", "Moon", "Sun" }) - openspace.setPropertyValue('Scene.C2019Y4AtlasTrail.Renderable.Enabled', false) -end) - -asset.onDeinitialize(function () - openspace.removeInterestingNodes({ "Earth", "Mars", "Moon", "Sun" }) -end) diff --git a/data/assets/base_profile.asset b/data/assets/base_profile.asset deleted file mode 100644 index 15fdae811f..0000000000 --- a/data/assets/base_profile.asset +++ /dev/null @@ -1,25 +0,0 @@ --- This is a base scene that is included in most other scenes to set up defaults --- loading this scene directly without any other elements added on top of it will --- probably not work - -local assetHelper = asset.require('util/asset_helper') -local sceneHelper = asset.require('util/scene_helper') -local propertyHelper = asset.require('util/property_helper') - --- Specifying which other assets should be loaded in this scene -asset.require('spice/base') --- Load default key bindings applicable to most scenes -asset.require('util/default_keybindings') -asset.require('util/default_dashboard') -asset.require('util/default_joystick') - --- Load web gui -local webGui = asset.require('util/webgui') - -asset.onInitialize(function () - webGui.setCefRoute("onscreen") - openspace.setDefaultGuiSorting() - openspace.globebrowsing.loadWMSServersFromFile( - openspace.absPath("${DATA}/globebrowsing_servers.lua") - ) -end) \ No newline at end of file diff --git a/data/assets/dawn.profile b/data/assets/dawn.profile deleted file mode 100644 index 533e43d6dc..0000000000 --- a/data/assets/dawn.profile +++ /dev/null @@ -1,18 +0,0 @@ -#Version -1.0 - -#Asset -scene/solarsystem/missions/dawn/ceres required -scene/solarsystem/missions/dawn/dawn required -scene/solarsystem/missions/dawn/vesta required - -#Time -absolute 2011 AUG 06 00:00:00 - -#Camera -setNavigationState "Dawn" 526781518487.171326, 257168309890.072144, -1381125204152.817383 - -#MarkNodes -Dawn -Ceres -Vesta diff --git a/data/assets/dawn.scene b/data/assets/dawn.scene deleted file mode 100644 index 8af4d7bf6d..0000000000 --- a/data/assets/dawn.scene +++ /dev/null @@ -1,21 +0,0 @@ -asset.require('./base') - -asset.require('scene/solarsystem/missions/dawn/ceres') -asset.require('scene/solarsystem/missions/dawn/dawn') -asset.require('scene/solarsystem/missions/dawn/vesta') - -local DawnAsset = asset.require('scene/solarsystem/missions/dawn/dawn') -asset.onInitialize(function () - openspace.time.setTime("2011 AUG 06 00:00:00") - - openspace.markInterestingNodes({ "Dawn", "Ceres", "Vesta" }) - - openspace.navigation.setNavigationState({ - Anchor = DawnAsset.Dawn.Identifier, - Position = { 526781518487.171326, 257168309890.072144, -1381125204152.817383 }, - }) -end) - -asset.onDeinitialize(function () - openspace.removeInterestingNodes({ "Dawn", "Ceres", "Vesta" }) -end) diff --git a/data/assets/default.profile b/data/assets/default.profile deleted file mode 100644 index b5614baf84..0000000000 --- a/data/assets/default.profile +++ /dev/null @@ -1,21 +0,0 @@ -#Version -1.0 - -#Asset -scene/solarsystem/planets/earth/earth required -scene/solarsystem/planets/earth/satellites/satellites required - -#Property -setPropertyValue {earth_satellites}.Renderable.Enabled false - -#Time -relative -1d - -#Camera -goToGeo "Earth" 58.5877 16.1924 20000000 - -#MarkNodes -Earth -Mars -Moon -Sun diff --git a/data/assets/default.scene b/data/assets/default.scene deleted file mode 100644 index ef529c05bc..0000000000 --- a/data/assets/default.scene +++ /dev/null @@ -1,29 +0,0 @@ -asset.require('./base') - -local earthAsset = asset.require('scene/solarsystem/planets/earth/earth') -asset.require('scene/solarsystem/planets/earth/satellites/satellites.asset') - -asset.onInitialize(function () - local now = openspace.time.currentWallTime() - -- Jump back one day to be able to show complete weather data on Earth. - openspace.time.setTime(openspace.time.advancedTime(now, "-1d")) - - openspace.globebrowsing.goToGeo("Earth", 58.5877, 16.1924, 20000000) - - openspace.markInterestingNodes({ "Earth", "Mars", "Moon", "Sun" }) - - openspace.setPropertyValue("{earth_satellites}.Renderable.Enabled", false) -end) - -asset.onDeinitialize(function () - openspace.removeInterestingNodes({ "Earth", "Mars", "Moon", "Sun" }) -end) - -asset.meta = { - Name = "Default scene", - Version = "1.0", - Description = [[ Bla bla, something something asteroids ]], - Author = "OpenSpace Team", - URL = "http://openspaceproject.com", - License = "MIT license" -} diff --git a/data/assets/default_full.profile b/data/assets/default_full.profile deleted file mode 100644 index e6c2522523..0000000000 --- a/data/assets/default_full.profile +++ /dev/null @@ -1,23 +0,0 @@ -#Version -1.0 - -#Asset -scene/solarsystem/planets/earth/earth required -scene/solarsystem/planets/jupiter/minor_moons required -scene/solarsystem/planets/saturn/minor_moons required -scene/solarsystem/planets/uranus/minor_moons required -scene/solarsystem/planets/neptune/inner_moons required -scene/solarsystem/planets/neptune/irregular_prograde_moons required -scene/solarsystem/planets/neptune/irregular_retrograde_moons required - -#Time -relative -1d - -#Camera -goToGeo "Earth" 58.5877 16.1924 20000000 - -#MarkNodes -Earth -Mars -Moon -Sun diff --git a/data/assets/default_full.scene b/data/assets/default_full.scene deleted file mode 100644 index faf201f55e..0000000000 --- a/data/assets/default_full.scene +++ /dev/null @@ -1,7 +0,0 @@ -asset.require('./default') -asset.require('scene/solarsystem/planets/jupiter/minor_moons') -asset.require('scene/solarsystem/planets/saturn/minor_moons') -asset.require('scene/solarsystem/planets/uranus/minor_moons') -asset.require('scene/solarsystem/planets/neptune/inner_moons') -asset.require('scene/solarsystem/planets/neptune/irregular_prograde_moons') -asset.require('scene/solarsystem/planets/neptune/irregular_retrograde_moons') diff --git a/data/assets/gaia.profile b/data/assets/gaia.profile deleted file mode 100644 index 82d54557b1..0000000000 --- a/data/assets/gaia.profile +++ /dev/null @@ -1,22 +0,0 @@ -#Version -1.0 - -#Module -Gaia openspace.printFatal('Could not load scene due to missing module "gaia"') - -#Asset -scene/solarsystem/planets/earth/earth required -scene/milkyway/gaia/gaiastars required -scene/milkyway/gaia/apogee required -scene/milkyway/gaia/galah required -scene/solarsystem/missions/gaia/gaia required -scene/solarsystem/missions/gaia/trail required - -#Property -setPropertyValueSingle Scene.Stars.Renderable.Enabled false - -#Camera -setNavigationState "Earth" 1000000000000.0, 1000000000000.0, 1000000000000.0 - -#MarkNodes -Gaia diff --git a/data/assets/gaia.scene b/data/assets/gaia.scene deleted file mode 100644 index 45213dfeaa..0000000000 --- a/data/assets/gaia.scene +++ /dev/null @@ -1,46 +0,0 @@ -local has_gaia = openspace.modules.isLoaded('Gaia') -if not has_gaia then - openspace.printFatal('Could not load scene "' .. asset.filePath .. '" due to missing module "gaia"') - do return end -end - -asset.require('./base') - - -local assetHelper = asset.require('util/asset_helper') - --- Augment default scene with gaia data, 3D model and trail -asset.require('scene/milkyway/gaia/gaiastars') -asset.require('scene/milkyway/gaia/apogee') -asset.require('scene/milkyway/gaia/galah') -asset.require('scene/solarsystem/missions/gaia/gaia') -asset.require('scene/solarsystem/missions/gaia/trail') - -assetHelper.registerDashboardItems(asset, { - { - Type = "DashboardItemDistance", - Identifier = "GaiaEarthDistance", - GuiName = "Gaia Earth Distance", - SourceType = "Node", - SourceNodeName = "Gaia", - DestinationType = "Node Surface", - DestinationNodeName = "Earth" - } -}) - -local earthAsset = asset.require('scene/solarsystem/planets/earth/earth') - -asset.onInitialize(function () - openspace.setPropertyValueSingle('Scene.Stars.Renderable.Enabled', false); - - openspace.markInterestingNodes({ "Gaia" }) - - openspace.navigation.setNavigationState({ - Anchor = earthAsset.Earth.Identifier, - Position = { 1000000000000.0, 1000000000000.0, 1000000000000.0 }, - }) -end) - -asset.onDeinitialize(function () - openspace.removeInterestingNodes({ "Gaia" }) -end) diff --git a/data/assets/insight.scene b/data/assets/insight.scene deleted file mode 100644 index d185471418..0000000000 --- a/data/assets/insight.scene +++ /dev/null @@ -1,87 +0,0 @@ -asset.require('./base') - -local sceneHelper = asset.require('util/scene_helper') - --- Keybindings that are specific for this scene -local Keybindings = { - { - Key = "i", - Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -469.300000);" .. - "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset', -470.800006);" .. - "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.insight_ctx.Enabled', true);" .. - "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled', true);" .. - -- "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.insight_ctx.Settings.Gamma', 3.098590);" .. - -- "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.insight_ctx.Settings.Multiplier', 3.568080);" .. - "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.MOC_WA_Color_Utah.Settings.Multiplier', 2.816900);" .. - "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Settings.Gamma', 0.938970);" .. - "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.MOC_WA_Color_Utah.Settings.Gamma', 2.394370);" .. - "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled', true);", - Documentation = "Setup Insight landing layers", - Name = "Setup Insight layers", - GuiPath = "/Missions/Insight", - Local = false - }, - { - Key = "SHIFT+i", - Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', 0);" .. - "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset', 0);" .. - "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.insight_ctx.Enabled', false);" .. - "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled', false);" .. - "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled', false);", - -- "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.insight_ctx.Settings.Gamma', 1.0);" .. - -- "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.insight_ctx.Settings.Multiplier', 1.0);" .. - "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.MOC_WA_Color_Utah.Settings.Multiplier', 1.0);" .. - "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Settings.Gamma', 1.0);" .. - "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.MOC_WA_Color_Utah.Settings.Gamma', 1.0);"; - Documentation = "Undo Insight landing layers setup", - Name = "Unset Insight layers", - GuiPath = "/Missions/Insight", - Local = false - } -} - -local insightAsset = asset.require('scene/solarsystem/missions/insight/edl') - -asset.onInitialize(function () - openspace.time.setTime("2018 NOV 26 19:39:03.68") - - sceneHelper.bindKeys(Keybindings) - - openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -469.300000); - openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset', -470.800006); - openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled', true); - -- openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.insight_ctx.Enabled', true); - -- openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.insight_ctx.Settings.Gamma', 3.098590); - -- openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.insight_ctx.Settings.Multiplier', 3.568080); - openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.MOC_WA_Color_Utah.Settings.Multiplier', 2.81690); - openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Settings.Gamma', 0.938970); - openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.MOC_WA_Color_Utah.Settings.Gamma', 2.394370); - openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled', true); - - openspace.markInterestingNodes({ "Insight" }) - - openspace.navigation.setNavigationState({ - Anchor = insightAsset.Insight.Identifier, - Position = { 8.430115E0, -1.791710E1, 2.813660E0 }, - ReferenceFrame = "Root", - Up = { 0.494659E0,0.357162E0,0.792306E0 }, - }) - -end) - -asset.onDeinitialize(function () - sceneHelper.unbindKeys(Keybindings) - - openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', 0); - openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset', 0); - openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled', false); - -- openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.insight_ctx.Enabled', false); - -- openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.insight_ctx.Settings.Gamma', 1.0); - -- openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.insight_ctx.Settings.Multiplier', 1.0); - openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.MOC_WA_Color_Utah.Settings.Multiplier', 1.0); - openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Settings.Gamma', 1.0); - openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.MOC_WA_Color_Utah.Settings.Gamma', 1.0); - openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled', false); - - openspace.removeInterestingNodes({ "Insight" }) -end) diff --git a/data/assets/juno.scene b/data/assets/juno.scene deleted file mode 100644 index f17e5c3f8b..0000000000 --- a/data/assets/juno.scene +++ /dev/null @@ -1,31 +0,0 @@ -asset.request('./base') - -local assetHelper = asset.require('util/asset_helper') -local sceneHelper = asset.require('util/scene_helper') - -assetHelper.requireAll(asset, 'scene/solarsystem/missions/juno') - - -local junoAsset = asset.require('scene/solarsystem/missions/juno/juno') - -asset.onInitialize(function () - openspace.time.setTime("2016-07-01T10:05:00.00") - - openspace.markInterestingNodes({ "Jupiter", "Juno" }) - - sceneHelper.setDeltaTimeKeys({ - 1, 5, 10, 20, 40, 90, 360, 720, 2880, 14400, - 28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600 - }) - - openspace.navigation.setNavigationState({ - Anchor = junoAsset.Juno.Identifier, - Position = { 1.243398E8, 7.176068E7, -1.519733E7 }, - ReferenceFrame = "Root", - Up = { -0.377400E0, 0.764573E0, 0.522492E0 }, - }) -end) - -asset.onDeinitialize(function () - openspace.removeInterestingNodes({ "Jupiter", "Juno" }) -end) diff --git a/data/assets/mars.scene b/data/assets/mars.scene deleted file mode 100644 index 0d7a8b34c8..0000000000 --- a/data/assets/mars.scene +++ /dev/null @@ -1,61 +0,0 @@ -asset.require('./base') -local sceneHelper = asset.require('util/scene_helper') - -local perseveranceAsset = asset.require('scene/solarsystem/missions/perseverance/perseverance') -local perseveranceShortcuts = asset.require('scene/solarsystem/missions/perseverance/shortcuts') - -local insightAsset = asset.require('scene/solarsystem/missions/insight/edl') -local insightShortcuts = asset.require('scene/solarsystem/missions/insight/shortcuts') - -local insightEDLShortcuts = sceneHelper.extractShortcuts({"Insight Height Offset", - "Enable HiRISE", - "Insight EDL Time", - "Insight EDL NavigationState"}, - insightShortcuts.Shortcuts) - -local insightDisableShortcuts = sceneHelper.extractShortcuts({ - "Default Height Offset", - "Disable HiRISE"}, - insightShortcuts.Shortcuts) - -local PerseverenceLandedShortcuts = sceneHelper.extractShortcuts({ - "Perseverance Height Offset", - "Perseverance landed time", - "Enable HiRISE"}, - perseveranceShortcuts.Shortcuts) - - -local Keybindings = { - sceneHelper.createKeyBindFromShortcuts("i", - insightEDLShortcuts, - "/Missions/Insight", - "Set and goto Insight Landing", - "Setup scene for insight EDL" - ), - sceneHelper.createKeyBindFromShortcuts("SHIFT+i", - insightDisableShortcuts, - "/Missions/Insight", - "Unset Insight Landing", - "Disable Mars layer settings used for insight EDL" - ), - sceneHelper.createKeyBindFromShortcuts("p", - PerseverenceLandedShortcuts, - "/Missions/Perseverance" - ) -} - -asset.onInitialize(function () - local now = openspace.time.currentWallTime() - openspace.time.setTime(now) - - sceneHelper.bindKeys(Keybindings) - - openspace.globebrowsing.goToGeo("Mars", 58.5877, 16.1924, 8000000) - - openspace.markInterestingNodes({ "Mars", insightAsset.Insight.Identifier, "Perseverance" }) -end) - -asset.onDeinitialize(function () - sceneHelper.unbindKeys(Keybindings) - openspace.removeInterestingNodes({ "Mars", insightAsset.Insight.Identifier}) -end) diff --git a/data/assets/messenger.scene b/data/assets/messenger.scene deleted file mode 100644 index dc2f722880..0000000000 --- a/data/assets/messenger.scene +++ /dev/null @@ -1,46 +0,0 @@ -asset.require('./base') - -local assetHelper = asset.require('util/asset_helper') -local sceneHelper = asset.require('util/scene_helper') - -local MessengerAsset = asset.require('scene/solarsystem/missions/messenger/messengerSC') - -if not openspace.modules.isLoaded("Volume") then - openspace.printWarning("Volume module is not loaded, skipping asset: mercurymagnetosphere") -else - asset.require('scene/solarsystem/missions/messenger/mercurymagnetosphere') -end - -assetHelper.registerDashboardItems(asset, { - { - Type = "DashboardItemDistance", - Identifier = "MessengerDistance", - GuiName = "Messenger - Mercury Distance", - SourceType = "Node", - SourceNodeName = "Messenger", - DestinationType = "Node", - DestinationNodeName = "Mercury" - } -}) - -asset.onInitialize(function () - openspace.time.setTime("2011 MAY 13 00:05:18") - - openspace.markInterestingNodes({ "Mercury", "Messenger", "Sun" }) - - sceneHelper.setDeltaTimeKeys({ - 1, 5, 10, 20, 40, 90, 360, 720, 2880, 14400, - 28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600 - }) - - openspace.navigation.setNavigationState({ - Anchor = "Mercury", - Position = { 2.423690E11, 1.979038E11, -2.241483E10 }, - ReferenceFrame = "Root", - Up = { -0.492046E0, 0.666088E0, 0.560551E0 } - }) -end) - -asset.onDeinitialize(function () - openspace.removeInterestingNodes({ "Mercury", "Messenger", "Sun" }) -end) diff --git a/data/assets/newhorizons.scene b/data/assets/newhorizons.scene deleted file mode 100644 index 9de5012f7d..0000000000 --- a/data/assets/newhorizons.scene +++ /dev/null @@ -1,274 +0,0 @@ -asset.require('./base'); - -asset.require('scene/solarsystem/missions/newhorizons/newhorizons') -local NewHorizonsAsset = asset.require('scene/solarsystem/missions/newhorizons/model') - -local assetHelper = asset.require('util/asset_helper') -local propertyHelper = asset.require('util/property_helper') -local sceneHelper = asset.require('util/scene_helper') -local renderableHelper = asset.require('util/renderable_helper') - -local Keybindings = { - { - Key = "a", - Command = "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'NewHorizons');" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', '');" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)", - Documentation = "Sets the focus of the camera on 'NewHorizons'.", - Name = "Focus on New Horizons", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "SHIFT+a", - Command = "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'NewHorizons');" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', 'Pluto');" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)", - Documentation = "Sets the focus of the camera on 'NewHorizons'.", - Name = "Anchor at New Horizons, Aim at Pluto", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "s", - Command = "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Pluto');".. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', '');" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)", - Documentation = "Sets the focus of the camera on 'Pluto'", - Name = "Focus on Pluto", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "d", - Command = "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Charon');".. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', '');" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)", - Documentation = "Sets the focus of the camera on 'Charon'.", - Name = "Focus on New Charon", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "F7", - Command = -[[local enabled = openspace.getPropertyValue('Scene.PlutoProjection.Renderable.ProjectionComponent.PerformProjection') -openspace.setPropertyValue('Scene.PlutoProjection.Renderable.ProjectionComponent.PerformProjection', not enabled) -openspace.setPropertyValue('Scene.CharonProjection.Renderable.ProjectionComponent.PerformProjection', not enabled) -openspace.setPropertyValueSingle("Dashboard.NewHorizonsInstruments.Enabled", not enabled)]], - Documentation = "Toggles New Horizons image projection.", - Name = "Toggle NH Image Projection", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "F8", - Command = "openspace.setPropertyValue('Scene.PlutoProjection.Renderable.ProjectionComponent.ClearAllProjections', true);" .. - "openspace.setPropertyValue('Scene.CharonProjection.Renderable.ProjectionComponent.ClearAllProjections', true);", - Documentation = "Removes all image projections from Pluto and Charon.", - Name = "Clear image projections", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "F9", - Command = "openspace.time.setTime('2015-07-14T09:00:00.00');" .. - "openspace.setPropertyValue('Scene.PlutoProjection.Renderable.ProjectionComponent.ClearAllProjections', true);" .. - "openspace.setPropertyValue('Scene.CharonProjection.Renderable.ProjectionComponent.ClearAllProjections', true);", - Documentation = "Jumps to the 14th of July 2015 at 0900 UTC and clears all projections.", - Name = "Reset time and projections", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "KP_8", - Command = propertyHelper.increment('Scene.PlutoProjection.Renderable.HeightExaggeration', 5000), - Documentation = "Increases the height map exaggeration on Pluto.", - Name = "Pluto HeightExaggeration +", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "CTRL+I", - Command = propertyHelper.increment('Scene.PlutoProjection.Renderable.HeightExaggeration', 5000), - Documentation = "Increases the height map exaggeration on Pluto.", - Name = "Pluto HeightExaggeration +", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "KP_2", - Command = propertyHelper.decrement('Scene.PlutoProjection.Renderable.HeightExaggeration', 5000), - Documentation = "Decreases the height map exaggeration on Pluto.", - Name = "Pluto HeightExaggeration -", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "CTRL+K", - Command = propertyHelper.decrement('Scene.PlutoProjection.Renderable.HeightExaggeration', 5000), - Documentation = "Decreases the height map exaggeration on Pluto.", - Name = "Pluto HeightExaggeration -", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "KP_9", - Command = propertyHelper.increment('Scene.CharonProjection.Renderable.HeightExaggeration', 5000), - Documentation = "Increases the height map exaggeration on Charon.", - Name = "Charon HeightExaggeration +", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "CTRL+O", - Command = propertyHelper.increment('Scene.CharonProjection.Renderable.HeightExaggeration', 5000), - Documentation = "Increases the height map exaggeration on Charon.", - Name = "Charon HeightExaggeration +", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "KP_3", - Command = propertyHelper.decrement('Scene.CharonProjection.Renderable.HeightExaggeration', 5000), - Documentation = "Decreases the height map exaggeration on Charon.", - Name = "Charon HeightExaggeration -", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "CTRL+L", - Command = propertyHelper.decrement('Scene.CharonProjection.Renderable.HeightExaggeration', 5000), - Documentation = "Decreases the height map exaggeration on Charon.", - Name = "Charon HeightExaggeration -", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "o", - Command = propertyHelper.invert('Scene.PlutoBarycentricTrail.Renderable.Enabled'), - Documentation = "Toggles the visibility of the trail behind Pluto.", - Name = "Toggle Pluto Trail", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "j", - Command = renderableHelper.toggle('Scene.PlutoText') .. renderableHelper.toggle('Scene.CharonText') .. - renderableHelper.toggle('Scene.HydraText') .. renderableHelper.toggle('Scene.NixText') .. - renderableHelper.toggle('Scene.KerberosText') .. renderableHelper.toggle('Scene.StyxText'), - Documentation = "Toggles the visibility of the text labels of Pluto, Charon, Hydra, Nix, Kerberos, and Styx.", - Name = "Toggle Pluto Labels", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "l", - Command = propertyHelper.fadeInOut('Scene.Labels.Renderable.Opacity', 2.0), - Documentation = "Toggles the visibility of the labels for the New Horizons instruments.", - Name = "Toggle New Horizons Labels", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "m", - Command = propertyHelper.invert('Scene.NH_LORRI.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_LEISA.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_MVIC_PAN1.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_MVIC_PAN2.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_MVIC_RED.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_MVIC_BLUE.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_MVIC_FT.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_MVIC_METHANE.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_MVIC_NIR.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_ALICE_AIRGLOW.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_ALICE_SOC.Renderable.SolidDraw'), - Documentation = "Draws the instrument field of views in a solid color or as lines.", - Name = "Toggle instrument FOVs", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "Shift+t", - Command = renderableHelper.toggle('Scene.PlutoShadow') .. renderableHelper.toggle('Scene.CharonShadow'), - Documentation = "Toggles the visibility of the shadow visualization of Pluto and Charon.", - Name = "Toggle Shadows", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "t", - Command = renderableHelper.toggle('Scene.NewHorizonsTrailPluto'), - Documentation = "Toggles the trail of New Horizons.", - Name = "Toggle NH Trail", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "h", - Name="Hide Trails", - Command = "local list = openspace.getProperty('*Trail.Renderable.Enabled'); for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end", - Documentation = "Disables visibility of the trails", - GuiPath = "/Rendering", - Local = false - }, - -} - - -assetHelper.registerDashboardItems(asset, { - { - Type = "DashboardItemSpacing", - Identifier = "NewHorizonsSpacing", - GuiName = "New Horizons Spacing", - Spacing = 25 - }, - { - Type = "DashboardItemDistance", - Identifier = "NewHorizonsPlutoDistance", - GuiName = "New Horizons Pluto Distance", - SourceType = "Node", - SourceNodeName = "NewHorizons", - DestinationType = "Node Surface", - DestinationNodeName = "PlutoProjection" - }, - { - Type = "DashboardItemInstruments", - Identifier = "NewHorizonsInstruments", - GuiName = "NewHorizons Instruments", - } -}) - -asset.onInitialize(function () - openspace.time.setTime("2015-07-14T08:00:00.00") - sceneHelper.bindKeys(Keybindings) - - openspace.markInterestingNodes({ "Pluto", "NewHorizons", "Charon" }) - - sceneHelper.setDeltaTimeKeys({ - 1, 5, 10, 20, 40, 60, 120, 360, 540, 1080, - 2160, 4320, 8640 - }) - - openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.FollowAnchorNodeRotationDistance', 20.000000); - openspace.setPropertyValueSingle('Scene.Pluto.Renderable.Enabled', false) - openspace.setPropertyValueSingle('Scene.Charon.Renderable.Enabled', false) - openspace.setPropertyValueSingle("Scene.PlutoBarycenterTrail.Renderable.Enabled", false) - - openspace.navigation.setNavigationState({ - Anchor = "NewHorizons", - ReferenceFrame = "Root", - Position = { -6.572656E1, -7.239404E1, -2.111890E1 }, - Up = { 0.102164, -0.362945, 0.926193 } - }) -end) - -asset.onDeinitialize(function () - sceneHelper.unbindKeys(Keybindings) - - openspace.removeInterestingNodes({ "Pluto", "NewHorizons", "Charon" }) - - openspace.setPropertyValueSingle('Scene.Pluto.Renderable.Enabled', true) - openspace.setPropertyValueSingle('Scene.Charon.Renderable.Enabled', true) - openspace.setPropertyValueSingle('Scene.PlutoBarycenterTrail.Renderable.Enabled', true) -end) diff --git a/data/assets/osirisrex.scene b/data/assets/osirisrex.scene deleted file mode 100644 index 285fdb5252..0000000000 --- a/data/assets/osirisrex.scene +++ /dev/null @@ -1,147 +0,0 @@ -asset.require('./base') - -local assetHelper = asset.require('util/asset_helper') -local sceneHelper = asset.require('util/scene_helper') -local propertyHelper = asset.require('util/property_helper') - -asset.require('scene/solarsystem/missions/osirisrex/osirisrex') - --- Custom Keybindings -local Keybindings = { - { - Key = "a", - Command = "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'OsirisRex')" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', '');" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)", - Documentation = "Sets the focus of the camera on 'OsirisRex'.", - Name = "Focus on OsirisRex", - GuiPath = "/Missions/Osiris Rex", - Local = false - }, - { - Key = "s", - Command = "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'BennuBarycenter')" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', '');" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)", - Documentation = "Sets the focus of the camera on 'Bennu'", - Name = "Focus on Bennu", - GuiPath = "/Missions/Osiris Rex", - Local = false - }, - -- TODO - -- Maybe these can be fixed later - -- { - -- Key = "F6", - -- Command = "openspace.printInfo('Set time: Launch');openspace.time.setTime('2016 SEP 08 23:05:00');", - -- Documentation = "Sets the time to the launch of Osiris Rex.", - -- Name = "Set launch time", - -- GuiPath = "/Missions/Osiris Rex", - -- Local = false - -- }, - -- { - -- Key = "F7", - -- Command = "openspace.printInfo('Set time: Gravity Assist');openspace.time.setTime('2017 SEP 22 15:00:00');", - -- Documentation = "Sets the time to the Earth gravity assist.", - -- Name = "Set Earth gravity assist time", - -- GuiPath = "/Missions/Osiris Rex", - -- Local = false - -- }, - { - Key = "F8", - Command = "openspace.printInfo('Set time: Approach');openspace.time.setTime('2018-SEP-11 21:31:01.183');", - Documentation = "Sets the time to the approach at Bennu.", - Name = "Set Bennu approach time", - GuiPath = "/Missions/Osiris Rex", - Local = false - }, - { - Key = "F9", - Command = "openspace.printInfo('Set time: Preliminary Survey');openspace.time.setTime('2018-NOV-20 01:13:12.183');", - Documentation = "Sets the time to the preliminary survey of Bennu.", - Name = "Set Bennu survey time", - GuiPath = "/Missions/Osiris Rex", - Local = false - }, - { - Key = "F10", - Command = "openspace.printInfo('Set time: Orbital B');openspace.time.setTime('2019-APR-08 10:35:27.186');", - Documentation = "Sets the time to the orbital B event.", - Name = "Set orbital B event time", - GuiPath = "/Missions/Osiris Rex", - Local = false - }, - { - Key = "F11", - Command = "openspace.printInfo('Set time: Recon');openspace.time.setTime('2019-MAY-25 03:50:31.195');", - Documentation = "Sets the time to the recon event.", - Name = "Set recon event time", - GuiPath = "/Missions/Osiris Rex", - Local = false - }, - { - Key = "q", - Command = propertyHelper.invert('Scene.SunMarker.Renderable.Enabled'), - Documentation = "Toggles the visibility of the text marking the location of the Sun.", - Name = "Toggle Sun marker", - GuiPath = "/Missions/Osiris Rex", - Local = false - }, - -- { - -- Key = "e", - -- Command = propertyHelper.invert('Scene.EarthMarker.Renderable.Enabled'), - -- Documentation = "Toggles the visibility of the text marking the location of the Earth.", - -- Name = "Toggle Earth marker", - -- GuiPath = "/Missions/Osiris Rex", - -- Local = false - -- } -} - -local OsirisRexAsset = asset.require('scene/solarsystem/missions/osirisrex/model') - -assetHelper.registerDashboardItems(asset, { - { - Type = "DashboardItemSpacing", - Identifier = "OsirisRexSpacing", - GuiName = "OSIRIS-REx Spacing", - Spacing = 25 - }, - { - Type = "DashboardItemDistance", - Identifier = "OsirisRexBennuDistance", - GuiName = "OSIRIS-REx Bennu Distance", - SourceType = "Node", - SourceNodeName = "OsirisRex", - DestinationType = "Node", - DestinationNodeName = "BennuBarycenter" - }, - { - Type = "DashboardItemInstruments", - Identifier = "OsirisRexInstruments", - GuiName = "OSIRIS-REx Instruments", - } -}) - -asset.onInitialize(function () - - openspace.time.setTime("2018 10 30 23:00:00.500") - - sceneHelper.bindKeys(Keybindings) - - sceneHelper.setDeltaTimeKeys({ - 1, 5, 10, 20, 40, 60, 120, 360, 540, 1080, - 2160, 4320, 8640 - }) - - openspace.markInterestingNodes({ "OsirisRex", "BennuBarycenter", "Earth" }) - - openspace.navigation.setNavigationState({ - Anchor = OsirisRexAsset.OsirisRex.Identifier, - Position = { 26974590199.661884, 76314608558.908020, -127086452897.101791 } - }) -end) - -asset.onDeinitialize(function () - sceneHelper.unbindKeys(Keybindings) - - openspace.removeInterestingNodes({ "OsirisRex", "BennuBarycenter", "Earth" }) -end) diff --git a/data/assets/rosetta.scene b/data/assets/rosetta.scene deleted file mode 100644 index f1470372a1..0000000000 --- a/data/assets/rosetta.scene +++ /dev/null @@ -1,152 +0,0 @@ -asset.require('./base') - - -local assetHelper = asset.require('util/asset_helper') -local sceneHelper = asset.require('util/scene_helper') -local propertyHelper = asset.require('util/property_helper') -local renderableHelper = asset.require('util/renderable_helper') - -asset.require('scene/solarsystem/missions/rosetta/67p') -asset.require('scene/solarsystem/missions/rosetta/rosetta') - --- Custom Keybindings -local Keybindings = { - { - Key = "a", - Command = "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', '67P');" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', '');" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)", - Documentation = "Sets the focus of the camera on '67P'.", - Name = "Focus on 67P", - GuiPath = "/Missions/Rosetta", - Local = false - }, - { - Key = "s", - Command = "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Rosetta');" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', '');" .. - "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)", - Documentation = "Sets the focus of the camera on 'Rosetta'", - Name = "Focus on Rosetta", - GuiPath = "/Missions/Rosetta", - Local = false - }, - { - Key = "Shift+F6", - Command = "openspace.time.setTime('2014-08-01T03:05:18.10')", - Documentation = "Jumps to the time of initial approach of Rosetta to 67P.", - Name = "Set initial approach time", - GuiPath = "/Missions/Rosetta", - Local = false - }, - { - Key = "F6", - Command = "openspace.time.setTime('2014-11-12T08:20:00.00')", - Documentation = "Jumps to the time when the Philae lander is released.", - Name = "Set lander release time", - GuiPath = "/Missions/Rosetta", - Local = false - }, - { - Key = "F8", - Command = "openspace.setPropertyValue('Scene.67P.Renderable.ProjectionComponent.ClearAllProjections', true)", - Documentation = "Removes all image projections from 67P.", - Name = "Clear 67P projections", - GuiPath = "/Missions/Rosetta", - Local = false - }, - -- { - -- Key = "q", - -- Command = propertyHelper.invert('Scene.SunMarker.Renderable.Enabled'), - -- Documentation = "Toggles the visibility of the text marking the location of the Sun.", - -- Name = "Toggle Sun marker", - -- GuiPath = "/Missions/Rosetta", - -- Local = false - -- }, - { - Key = "e", - Command = renderableHelper.toggle('Scene.JupiterTrail') .. renderableHelper.toggle('Scene.SaturnTrail') .. - renderableHelper.toggle('Scene.UranusTrail') .. renderableHelper.toggle('Scene.NeptuneTrail'), - Documentation = "Toggles the visibility of all trails further from the Sun than 67P.", - Name = "Toggle outer planetary trails", - GuiPath = "/Missions/Rosetta", - Local = false - }, - { - Key = "i", - Command = renderableHelper.toggle('Scene.ImagePlaneRosetta'), - Documentation = "Toggles the visibility of the free floating image plane.", - Name = "Toggle image plane", - GuiPath = "/Missions/Rosetta", - Local = false - }, - { - Key = "o", - Command = renderableHelper.toggle('Scene.PhilaeTrail'), - Documentation = "Toggles the visibility of Philae's trail.", - Name = "Toggle Philae trail", - GuiPath = "/Missions/Rosetta", - Local = false - }, - { - Key = "p", - Command = propertyHelper.invert('Scene.67P.Renderable.ProjectionComponent.PerformProjection'), - Documentation = "Enables or disables the image projection on 67P.", - Name = "Toggle 67P projection", - GuiPath = "/Missions/Rosetta", - Local = false - } -} - -local Comet67PAsset = asset.require('scene/solarsystem/missions/rosetta/67p') - -assetHelper.registerDashboardItems(asset, { - { - Type = "DashboardItemSpacing", - Identifier = "RosettaSpacing", - GuiName = "Rosetta Spacing", - Spacing = 25 - }, - { - Type = "DashboardItemDistance", - Identifier = "Rosetta67PDistance", - GuiName = "Rosetta 67P Distance", - SourceType = "Node", - SourceNodeName = "Rosetta", - DestinationType = "Node", - DestinationNodeName = "67P" - }, - { - Type = "DashboardItemInstruments", - Identifier = "RosettaInstruments", - GuiName = "Rosetta Instruments", - } -}) - -asset.onInitialize(function () - openspace.time.setTime("2014-08-01T03:05:00.000") - sceneHelper.bindKeys(Keybindings) - - openspace.markInterestingNodes({ "67P", "Rosetta", "Philae" }) - - sceneHelper.setDeltaTimeKeys({ - 1, 5, 10, 20, 40, 90, 360, 720, 2880, 14400, - 28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600 - }) - - openspace.navigation.setNavigationState({ - Anchor = Comet67PAsset.Comet67P.Identifier, - ReferenceFrame = "Root", - Position = { -7.294781E5 , -6.657894E5, 2.509047E6 }, - Up = { 0.146529E0, 0.944727E0, 0.293290E0 } - }) - - openspace.setPropertyValue('Scene.67P.Renderable.PerformShading', false); - openspace.setPropertyValue('Scene.ImagePlaneRosetta.Renderable.Enabled', false); - -end) - -asset.onDeinitialize(function () - sceneHelper.unbindKeys(Keybindings) - openspace.removeInterestingNodes({ "67P", "Rosetta", "Philae" }) -end) diff --git a/data/assets/scene/milkyway/constellations/constellation_art.asset b/data/assets/scene/milkyway/constellations/constellation_art.asset index 4ddf6afba2..74a3fb9bd2 100644 --- a/data/assets/scene/milkyway/constellations/constellation_art.asset +++ b/data/assets/scene/milkyway/constellations/constellation_art.asset @@ -1,3 +1,7 @@ +<<<<<<< HEAD +local constellationsCSV = asset.localResource('constellation_data.csv') +======= +>>>>>>> master local transforms = asset.require("scene/solarsystem/sun/transforms") local images = asset.syncedResource({ @@ -80,8 +84,11 @@ end local nodes = {} asset.onInitialize(function () +<<<<<<< HEAD +======= local constellationsCSV = images .. "/constellation_data.csv" +>>>>>>> master nodes = createConstellations('Constellation Art', constellationsCSV) for _, n in ipairs(nodes) do openspace.addSceneGraphNode(n); diff --git a/data/assets/scene/solarsystem/missions/apollo/8/trails.asset b/data/assets/scene/solarsystem/missions/apollo/8/trails.asset index bd5d5f594e..5919504dcd 100644 --- a/data/assets/scene/solarsystem/missions/apollo/8/trails.asset +++ b/data/assets/scene/solarsystem/missions/apollo/8/trails.asset @@ -22,7 +22,8 @@ local LaunchTrail = { Color = { 0.70, 0.50, 0.20 }, StartTime = "1968 DEC 21 12:51:00", EndTime = "1968 DEC 21 23:23:22", - SampleInterval = 30 + SampleInterval = 30, + RenderBinMode = "PostDeferredTransparent" }, GUI = { Name = "Apollo 8 Launch Trail", diff --git a/data/assets/scene/solarsystem/missions/gaia/dashboard.asset b/data/assets/scene/solarsystem/missions/gaia/dashboard.asset new file mode 100644 index 0000000000..bac51a5ad2 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/gaia/dashboard.asset @@ -0,0 +1,12 @@ +local assetHelper = asset.require('util/asset_helper') +assetHelper.registerDashboardItems(asset, { + { + Type = "DashboardItemDistance", + Identifier = "GaiaEarthDistance", + GuiName = "Gaia Earth Distance", + SourceType = "Node", + SourceNodeName = "Gaia", + DestinationType = "Node Surface", + DestinationNodeName = "Earth" + } +}) diff --git a/data/assets/scene/solarsystem/missions/messenger/dashboard.asset b/data/assets/scene/solarsystem/missions/messenger/dashboard.asset new file mode 100644 index 0000000000..d271c312ba --- /dev/null +++ b/data/assets/scene/solarsystem/missions/messenger/dashboard.asset @@ -0,0 +1,13 @@ +local assetHelper = asset.require('util/asset_helper') + +assetHelper.registerDashboardItems(asset, { + { + Type = "DashboardItemDistance", + Identifier = "MessengerDistance", + GuiName = "Messenger - Mercury Distance", + SourceType = "Node", + SourceNodeName = "Messenger", + DestinationType = "Node", + DestinationNodeName = "Mercury" + } +}) diff --git a/data/assets/scene/solarsystem/missions/newhorizons/dashboard.asset b/data/assets/scene/solarsystem/missions/newhorizons/dashboard.asset new file mode 100644 index 0000000000..477303bc06 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/newhorizons/dashboard.asset @@ -0,0 +1,24 @@ +local assetHelper = asset.require('util/asset_helper') + +assetHelper.registerDashboardItems(asset, { + { + Type = "DashboardItemSpacing", + Identifier = "NewHorizonsSpacing", + GuiName = "New Horizons Spacing", + Spacing = 25 + }, + { + Type = "DashboardItemDistance", + Identifier = "NewHorizonsPlutoDistance", + GuiName = "New Horizons Pluto Distance", + SourceType = "Node", + SourceNodeName = "NewHorizons", + DestinationType = "Node Surface", + DestinationNodeName = "PlutoProjection" + }, + { + Type = "DashboardItemInstruments", + Identifier = "NewHorizonsInstruments", + GuiName = "NewHorizons Instruments", + } +}) diff --git a/data/assets/scene/solarsystem/missions/osirisrex/dashboard.asset b/data/assets/scene/solarsystem/missions/osirisrex/dashboard.asset new file mode 100644 index 0000000000..9fc97a6439 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/osirisrex/dashboard.asset @@ -0,0 +1,24 @@ +local assetHelper = asset.require('util/asset_helper') + +assetHelper.registerDashboardItems(asset, { + { + Type = "DashboardItemSpacing", + Identifier = "OsirisRexSpacing", + GuiName = "OSIRIS-REx Spacing", + Spacing = 25 + }, + { + Type = "DashboardItemDistance", + Identifier = "OsirisRexBennuDistance", + GuiName = "OSIRIS-REx Bennu Distance", + SourceType = "Node", + SourceNodeName = "OsirisRex", + DestinationType = "Node", + DestinationNodeName = "BennuBarycenter" + }, + { + Type = "DashboardItemInstruments", + Identifier = "OsirisRexInstruments", + GuiName = "OSIRIS-REx Instruments", + } +}) diff --git a/data/assets/scene/solarsystem/missions/rosetta/dashboard.asset b/data/assets/scene/solarsystem/missions/rosetta/dashboard.asset new file mode 100644 index 0000000000..c84614fe7c --- /dev/null +++ b/data/assets/scene/solarsystem/missions/rosetta/dashboard.asset @@ -0,0 +1,24 @@ +local assetHelper = asset.require('util/asset_helper') + +assetHelper.registerDashboardItems(asset, { + { + Type = "DashboardItemSpacing", + Identifier = "RosettaSpacing", + GuiName = "Rosetta Spacing", + Spacing = 25 + }, + { + Type = "DashboardItemDistance", + Identifier = "Rosetta67PDistance", + GuiName = "Rosetta 67P Distance", + SourceType = "Node", + SourceNodeName = "Rosetta", + DestinationType = "Node", + DestinationNodeName = "67P" + }, + { + Type = "DashboardItemInstruments", + Identifier = "RosettaInstruments", + GuiName = "Rosetta Instruments", + } +}) diff --git a/data/assets/scene/solarsystem/missions/voyager/dashboard.asset b/data/assets/scene/solarsystem/missions/voyager/dashboard.asset new file mode 100644 index 0000000000..777aae93c5 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/voyager/dashboard.asset @@ -0,0 +1,22 @@ +local assetHelper = asset.require('util/asset_helper') + +assetHelper.registerDashboardItems(asset, { + { + Type = "DashboardItemDistance", + Identifier = "Voyager1Distance", + GuiName = "Voyager 1 - Earth Distance", + SourceType = "Node", + SourceNodeName = "Voyager_1", + DestinationType = "Node", + DestinationNodeName = "Earth" + }, + { + Type = "DashboardItemDistance", + Identifier = "Voyager2Distance", + GuiName = "Voyager 2 - Earth Distance", + SourceType = "Node", + SourceNodeName = "Voyager_2", + DestinationType = "Node", + DestinationNodeName = "Earth" + } +}) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset index 5fb881fdd5..72fabc4988 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset @@ -91,7 +91,8 @@ local initializeAndAddNodes = function() Body = identifier, Observer = transforms.EarthInertial.Identifier, File = path, - LineNumber = 1 + LineNumber = 1, + RenderBinMode = "PostDeferredTransparent" }, Color = { 0.9, 0.6715, 0.0 }, Fade = 1.5, diff --git a/data/assets/scene/solarsystem/sun/glare.asset b/data/assets/scene/solarsystem/sun/glare.asset index 8d13f5fa9a..57d3a6eed3 100644 --- a/data/assets/scene/solarsystem/sun/glare.asset +++ b/data/assets/scene/solarsystem/sun/glare.asset @@ -16,7 +16,7 @@ local SunGlare = { Texture = textures .. "/halo.png", BlendMode = "Additive", Opacity = 0.65, - RenderableType = "Transparency" + RenderableType = "PreDeferredTransparency" }, Transform = { Translation = { diff --git a/data/assets/touch.scene b/data/assets/touch.scene deleted file mode 100644 index d981a1ebcb..0000000000 --- a/data/assets/touch.scene +++ /dev/null @@ -1,37 +0,0 @@ -local has_touch = openspace.modules.isLoaded('Touch') -if not has_touch then - openspace.printFatal('Could not load scene "' .. asset.filePath .. '" due to missing module "touch"') - do return end -end - -asset.require('./base') -local webGui = asset.require('util/webgui') - -local earthAsset = asset.require('scene/solarsystem/planets/earth/earth') - -asset.onInitialize(function () - local now = openspace.time.currentWallTime() - -- Jump back one day to be able to show complete weather data on Earth. - openspace.time.setTime(openspace.time.advancedTime(now, "-1d")) - - openspace.markInterestingNodes( - { "Earth", "Mars", "Moon" } - ) - - openspace.navigation.setNavigationState({ - Anchor = earthAsset.Earth.Identifier, - Position = { 58.5877, 16.1924, 20000000 } - }) - - openspace.setPropertyValueSingle('Scene.Pluto.Renderable.Enabled', false) - openspace.setPropertyValueSingle('Scene.Charon.Renderable.Enabled', false) - openspace.setPropertyValueSingle('Scene.PlutoBarycenterTrail.Renderable.Enabled', false) - - webGui.setCefRoute("ontouch") -end) - -asset.onDeinitialize(function () - openspace.removeInterestingNodes( - { "Earth", "Mars", "Moon" } - ) -end) diff --git a/data/assets/util/scene_helper.asset b/data/assets/util/scene_helper.asset index 579af633d8..9e7a87cc3c 100644 --- a/data/assets/util/scene_helper.asset +++ b/data/assets/util/scene_helper.asset @@ -9,7 +9,6 @@ local bindKeys = function(t, ignoreWarning) local currentKey = openspace.getKeyBinding(k.Key) if (next(currentKey) ~= nil) and (not ignoreWarning) then - openspace.printWarning('New keybind for "' .. k.Key .. '" is added, but a previous keybind already existed. If you want to silence this warning, pass "true", to this call to bindKeys') end diff --git a/data/assets/util/tle_helper.asset b/data/assets/util/tle_helper.asset index 9aa08a3c71..c87a21b231 100644 --- a/data/assets/util/tle_helper.asset +++ b/data/assets/util/tle_helper.asset @@ -84,7 +84,8 @@ function satellites(title, file, color, group) Path = file, SegmentQuality = 3, Color = color, - Fade = 1.5 + Fade = 1.5, + RenderBinMode = "PostDeferredTransparent" }, Tag = { "earth_satellites" }, GUI = { diff --git a/data/assets/voyager.scene b/data/assets/voyager.scene deleted file mode 100644 index c5789bf926..0000000000 --- a/data/assets/voyager.scene +++ /dev/null @@ -1,61 +0,0 @@ -asset.require('./base') - -local assetHelper = asset.require('util/asset_helper') -local sceneHelper = asset.require('util/scene_helper') - -asset.require('scene/solarsystem/planets/jupiter/minor_moons') -asset.require('scene/solarsystem/planets/saturn/minor_moons') -asset.require('scene/solarsystem/planets/uranus/minor_moons') -asset.require('scene/solarsystem/planets/neptune/inner_moons') -asset.require('scene/solarsystem/planets/neptune/irregular_prograde_moons') -asset.require('scene/solarsystem/planets/neptune/irregular_retrograde_moons') -asset.require('scene/solarsystem/missions/voyager/voyager1') -asset.require('scene/solarsystem/missions/voyager/voyager2') - -local VoyagerAsset = asset.require('scene/solarsystem/missions/voyager/voyager1') - -assetHelper.registerDashboardItems(asset, { - { - Type = "DashboardItemDistance", - Identifier = "Voyager1Distance", - GuiName = "Voyager 1 - Earth Distance", - SourceType = "Node", - SourceNodeName = "Voyager_1", - DestinationType = "Node", - DestinationNodeName = "Earth" - }, - { - Type = "DashboardItemDistance", - Identifier = "Voyager2Distance", - GuiName = "Voyager 2 - Earth Distance", - SourceType = "Node", - SourceNodeName = "Voyager_2", - DestinationType = "Node", - DestinationNodeName = "Earth" - } -}) - -asset.onInitialize(function () - openspace.time.setTime("1977 SEP 10 12:00:00") - - sceneHelper.setDeltaTimeKeys({ - 1, 5, 10, 20, 40, 90, 360, 720, 2880, 14400, - 28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600 - }) - - openspace.markInterestingNodes({ - "Earth", "Voyager 1", "Voyager 2", "Jupiter", "Saturn", "Uranus", "Neptune" - }) - - openspace.navigation.setNavigationState({ - Anchor = VoyagerAsset.Voyager_1.Identifier, - ReferenceFrame = "Root", - Position = { 526781518487.171326, 257168309890.072144, -1381125204152.817383 } - }) -end) - -asset.onDeinitialize(function () - openspace.removeInterestingNodes({ - "Earth", "Voyager 1", "Voyager 2", "Jupiter", "Saturn", "Uranus", "Neptune" - }) -end) diff --git a/data/assets/apollo8.profile b/data/profiles/apollo8.profile similarity index 92% rename from data/assets/apollo8.profile rename to data/profiles/apollo8.profile index 7c7b3f73bb..e4cf732215 100644 --- a/data/assets/apollo8.profile +++ b/data/profiles/apollo8.profile @@ -2,13 +2,14 @@ 1.0 #Asset -scene/solarsystem/planets/earth/moon/moon required -scene/solarsystem/missions/apollo/8/apollo8 required -scene/solarsystem/planets/earth/earth required +util/property_helper propertyHelper +base +scene/solarsystem/planets/earth/moon/moon +scene/solarsystem/missions/apollo/8/apollo8 +scene/solarsystem/planets/earth/earth earthAsset #Property setPropertyValueSingle NavigationHandler.OrbitalNavigator.MinimumAllowedDistance 0.000000 -setPropertyValueSingle Scene.Moon.Renderable.LodScaleFactor 24.0 #Keybinding E Jump to right before the earthrise photo Set Earthrise time /Missions/Apollo/8 false "openspace.time.setPause(true); openspace.time.setDeltaTime(1); openspace.time.setTime('1968 DEC 24 16:37:31'); openspace.navigation.setNavigationState({Anchor = 'Apollo8', Position = { 1.494592E1, 3.236777E1, -4.171296E1 }, ReferenceFrame = 'Root', Up = { 0.960608E0, -0.212013E0, 0.179675E0 }}); openspace.setPropertyValue('*Trail.Renderable.Enabled', false)" @@ -26,7 +27,7 @@ HOME Set camera focus to the Earth Focus on Earth /Missions/Apollo false "opensp absolute 1968-12-21T12:51:51.0 #Camera -goToGeo "Earth" 20 -60 15000000 +goToGeo earthAsset.Earth.Identifier 20 -60 15000000 #MarkNodes Earth diff --git a/data/assets/apollo_sites.profile b/data/profiles/apollo_sites.profile similarity index 88% rename from data/assets/apollo_sites.profile rename to data/profiles/apollo_sites.profile index 9c42c9fa97..20cad5733f 100644 --- a/data/assets/apollo_sites.profile +++ b/data/profiles/apollo_sites.profile @@ -2,13 +2,14 @@ 1.0 #Asset -scene/solarsystem/planets/earth/moon/moon required -scene/solarsystem/missions/apollo/8/apollo8 required -scene/solarsystem/missions/apollo/11/apollo11 required -scene/solarsystem/missions/apollo/17/lem required -scene/solarsystem/missions/apollo/apollo_globebrowsing required -scene/solarsystem/missions/apollo/11/lem_flipbook required -scene/solarsystem/missions/apollo/insignias_map required +base +scene/solarsystem/planets/earth/moon/moon moonAsset +scene/solarsystem/missions/apollo/8/apollo8 +scene/solarsystem/missions/apollo/11/apollo11 +scene/solarsystem/missions/apollo/17/lem +scene/solarsystem/missions/apollo/apollo_globebrowsing +scene/solarsystem/missions/apollo/11/lem_flipbook +scene/solarsystem/missions/apollo/insignias_map #Property setPropertyValueSingle Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.BlendMode 0 @@ -24,7 +25,7 @@ F7 Setup for A17 site Setup A17 site /Missions/Apollo/17 false "openspace.time.s absolute 1972 DEC 12 19:47:11 #Camera -goToGeo "Moon" 20 -60 15000000 +goToGeo moonAsset.Moon.Identifier 20 -60 15000000 #MarkNodes Moon diff --git a/data/profiles/asteroids.profile b/data/profiles/asteroids.profile new file mode 100644 index 0000000000..9e0495975f --- /dev/null +++ b/data/profiles/asteroids.profile @@ -0,0 +1,34 @@ +#Version +1.0 + +#Asset +base +scene/solarsystem/planets/earth/earth earthAsset +scene/solarsystem/sssb/amor_asteroid +scene/solarsystem/sssb/apollo_asteroid +scene/solarsystem/sssb/aten_asteroid +scene/solarsystem/sssb/atira_asteroid +scene/solarsystem/sssb/centaur_asteroid +scene/solarsystem/sssb/chiron-type_comet +scene/solarsystem/sssb/encke-type_comet +scene/solarsystem/sssb/halley-type_comet +scene/solarsystem/sssb/inner_main_belt_asteroid +scene/solarsystem/sssb/jupiter_trojan_asteroid +scene/solarsystem/sssb/jupiter-family_comet +scene/solarsystem/sssb/main_belt_asteroid +scene/solarsystem/sssb/mars-crossing_asteroid +scene/solarsystem/sssb/outer_main_belt_asteroid +scene/solarsystem/sssb/transneptunian_object_asteroid +scene/solarsystem/sssb/pha + +#Time +relative -1d + +#Camera +goToGeo earthAsset.Earth.Identifier 58.5877 16.1924 2.7e12 + +#MarkNodes +Earth +Mars +Moon +Sun diff --git a/data/profiles/dawn.profile b/data/profiles/dawn.profile new file mode 100644 index 0000000000..d61491cc3f --- /dev/null +++ b/data/profiles/dawn.profile @@ -0,0 +1,19 @@ +#Version +1.0 + +#Asset +base +scene/solarsystem/missions/dawn/ceres +scene/solarsystem/missions/dawn/dawn DawnAsset +scene/solarsystem/missions/dawn/vesta + +#Time +absolute 2011 AUG 06 00:00:00 + +#Camera +setNavigationState DawnAsset.Dawn.Identifier 526781518487.171326, 257168309890.072144, -1381125204152.817383 + +#MarkNodes +Dawn +Ceres +Vesta diff --git a/data/profiles/default.profile b/data/profiles/default.profile new file mode 100644 index 0000000000..cedf4ad6d7 --- /dev/null +++ b/data/profiles/default.profile @@ -0,0 +1,22 @@ +#Version +1.0 + +#Asset +base +scene/solarsystem/planets/earth/earth earthAsset +scene/solarsystem/planets/earth/satellites/satellites + +#Property +setPropertyValue {earth_satellites}.Renderable.Enabled false + +#Time +relative -1d + +#Camera +goToGeo earthAsset.Earth.Identifier 58.5877 16.1924 20000000 + +#MarkNodes +Earth +Mars +Moon +Sun diff --git a/data/profiles/default_full.profile b/data/profiles/default_full.profile new file mode 100644 index 0000000000..6e0644ddde --- /dev/null +++ b/data/profiles/default_full.profile @@ -0,0 +1,28 @@ +#Version +1.0 + +#Asset +base +scene/solarsystem/planets/earth/earth +scene/solarsystem/planets/earth/satellites/satellites +scene/solarsystem/planets/jupiter/minor_moons +scene/solarsystem/planets/saturn/minor_moons +scene/solarsystem/planets/uranus/minor_moons +scene/solarsystem/planets/neptune/inner_moons +scene/solarsystem/planets/neptune/irregular_prograde_moons +scene/solarsystem/planets/neptune/irregular_retrograde_moons + +#Property +setPropertyValue {earth_satellites}.Renderable.Enabled false + +#Time +relative -1d + +#Camera +goToGeo "Earth" 58.5877 16.1924 20000000 + +#MarkNodes +Earth +Mars +Moon +Sun diff --git a/data/profiles/gaia.profile b/data/profiles/gaia.profile new file mode 100644 index 0000000000..9b123c9933 --- /dev/null +++ b/data/profiles/gaia.profile @@ -0,0 +1,24 @@ +#Version +1.0 + +#Module +Gaia openspace.printFatal('Could not load gaia profile due to missing module "gaia"') + +#Asset +base +scene/solarsystem/planets/earth/earth +scene/milkyway/gaia/gaiastars +scene/milkyway/gaia/apogee +scene/milkyway/gaia/galah +scene/solarsystem/missions/gaia/gaia +scene/solarsystem/missions/gaia/trail +scene/solarsystem/missions/gaia/dashboard + +#Property +setPropertyValueSingle Scene.Stars.Renderable.Enabled false + +#Camera +setNavigationState "Earth" 1000000000000.0, 1000000000000.0, 1000000000000.0 + +#MarkNodes +Gaia diff --git a/data/assets/insight.profile b/data/profiles/insight.profile similarity index 93% rename from data/assets/insight.profile rename to data/profiles/insight.profile index 0491c3e059..8367730f5e 100644 --- a/data/assets/insight.profile +++ b/data/profiles/insight.profile @@ -2,7 +2,8 @@ 1.0 #Asset -scene/solarsystem/missions/insight/edl required +base +scene/solarsystem/missions/insight/edl insightAsset #Property setPropertyValueSingle Scene.PlutoBarycenterTrail.Renderable.Enabled false @@ -23,7 +24,7 @@ SHIFT+i Undo Insight landing layers setup Unset Insight layers /Missions/Insight absolute 2018 NOV 26 19:39:03.68 #Camera -setNavigationState "Insight" "Root" 8.430115E0, -1.791710E1, 2.813660E0 0.494659E0,0.357162E0,0.792306E0 +setNavigationState insightAsset.Insight.Identifier "Root" 8.430115E0, -1.791710E1, 2.813660E0 0.494659E0,0.357162E0,0.792306E0 #MarkNodes Insight diff --git a/data/assets/juno.profile b/data/profiles/juno.profile similarity index 94% rename from data/assets/juno.profile rename to data/profiles/juno.profile index d2bb28a316..e1d1a021d5 100644 --- a/data/assets/juno.profile +++ b/data/profiles/juno.profile @@ -2,7 +2,8 @@ 1.0 #Asset -scene/solarsystem/missions/juno/juno required +base +scene/solarsystem/missions/juno/juno junoAsset #Keybinding 1 Setting the simulation speed to 1 seconds per realtime second Set sim speed 1 /Simulation Speed false "openspace.time.interpolateDeltaTime(1)" @@ -30,7 +31,7 @@ Shift+0 Setting the simulation speed to 14745600 seconds per realtime second Set absolute 2016-07-01T10:05:00.00 #Camera -setNavigationState "Juno" "Root" 1.243398E8, 7.176068E7, -1.519733E7 -0.377400E0, 0.764573E0, 0.522492E0 +setNavigationState junoAsset.Juno.Identifier "Root" 1.243398E8, 7.176068E7, -1.519733E7 -0.377400E0, 0.764573E0, 0.522492E0 #MarkNodes Jupiter diff --git a/data/profiles/mars.profile b/data/profiles/mars.profile new file mode 100644 index 0000000000..bcd26230b8 --- /dev/null +++ b/data/profiles/mars.profile @@ -0,0 +1,25 @@ +#Version +1.0 + +#Asset +util/scene_helper sceneHelper +base +scene/solarsystem/missions/perseverance/perseverance +scene/solarsystem/missions/perseverance/shortcuts perseveranceShortcuts +scene/solarsystem/missions/insight/edl insightAsset +scene/solarsystem/missions/insight/shortcuts insightShortcuts + +#Camera +goToGeo "Mars" 58.5877 16.1924 8000000 + +#MarkNodes +Mars +Insight +Perseverance + +#AdditionalScripts +local insightEDLShortcuts = sceneHelper.extractShortcuts({"Insight Height Offset", "Enable HiRISE", "Insight EDL Time", "Insight EDL NavigationState"}, insightShortcuts.Shortcuts) +local insightDisableShortcuts = sceneHelper.extractShortcuts({"Default Height Offset", "Disable HiRISE"}, insightShortcuts.Shortcuts) +local PerseverenceLandedShortcuts = sceneHelper.extractShortcuts({"Perseverance Height Offset", "Perseverance landed time", "Enable HiRISE"}, perseveranceShortcuts.Shortcuts) +local Keybindings = { sceneHelper.createKeyBindFromShortcuts("i", insightEDLShortcuts, "/Missions/Insight", "Set and goto Insight Landing", "Setup scene for insight EDL" ), sceneHelper.createKeyBindFromShortcuts("SHIFT+i", insightDisableShortcuts, "/Missions/Insight", "Unset Insight Landing", "Disable Mars layer settings used for insight EDL" ), sceneHelper.createKeyBindFromShortcuts("p", PerseverenceLandedShortcuts, "/Missions/Perseverance" )} +sceneHelper.bindKeys(Keybindings) diff --git a/data/assets/messenger.profile b/data/profiles/messenger.profile similarity index 97% rename from data/assets/messenger.profile rename to data/profiles/messenger.profile index 8a508388d9..bdbb7d2722 100644 --- a/data/assets/messenger.profile +++ b/data/profiles/messenger.profile @@ -5,7 +5,9 @@ Volume asset.require('scene/solarsystem/missions/messenger/mercurymagnetosphere') openspace.printWarning("Volume module is not loaded, skipping asset: mercurymagnetosphere") #Asset -scene/solarsystem/missions/messenger/messengerSC required +base +scene/solarsystem/missions/messenger/dashboard +scene/solarsystem/missions/messenger/messengerSC #Keybinding 1 Setting the simulation speed to 1 seconds per realtime second Set sim speed 1 /Simulation Speed false "openspace.time.interpolateDeltaTime(1)" diff --git a/data/assets/newhorizons.profile b/data/profiles/newhorizons.profile similarity index 97% rename from data/assets/newhorizons.profile rename to data/profiles/newhorizons.profile index ff3a46a096..f7be9639a7 100644 --- a/data/assets/newhorizons.profile +++ b/data/profiles/newhorizons.profile @@ -2,8 +2,12 @@ 1.0 #Asset -scene/solarsystem/missions/newhorizons/newhorizons required -scene/solarsystem/missions/newhorizons/model required +util/property_helper propertyHelper +util/renderable_helper renderableHelper +base +scene/solarsystem/missions/newhorizons/newhorizons +scene/solarsystem/missions/newhorizons/model +scene/solarsystem/missions/newhorizons/dashboard #Property setPropertyValueSingle NavigationHandler.OrbitalNavigator.FollowAnchorNodeRotationDistance 20.000000 diff --git a/data/assets/osirisrex.profile b/data/profiles/osirisrex.profile similarity index 64% rename from data/assets/osirisrex.profile rename to data/profiles/osirisrex.profile index eec35f2466..c7b783877e 100644 --- a/data/assets/osirisrex.profile +++ b/data/profiles/osirisrex.profile @@ -2,8 +2,11 @@ 1.0 #Asset -scene/solarsystem/missions/osirisrex/model required -scene/solarsystem/missions/osirisrex/osirisrex required +util/property_helper propertyHelper +base +scene/solarsystem/missions/osirisrex/model OsirisRexAsset +scene/solarsystem/missions/osirisrex/osirisrex +scene/solarsystem/missions/osirisrex/dashboard #Property setPropertyValueSingle NavigationHandler.OrbitalNavigator.FollowAnchorNodeRotationDistance 20.000000 @@ -12,13 +15,13 @@ setPropertyValueSingle Scene.Charon.Renderable.Enabled false setPropertyValueSingle Scene.PlutoBarycenterTrail.Renderable.Enabled false #Keybinding -a Sets the focus of the camera on 'OsirisRex'. Focus on OsirisRex /Missions/Osiris Rex false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'OsirisRex'); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', ''); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" +a Sets the focus of the camera on 'OsirisRex' Focus on OsirisRex /Missions/Osiris Rex false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'OsirisRex'); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', ''); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" s Sets the focus of the camera on 'Bennu' Focus on Bennu /Missions/Osiris Rex false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'BennuBarycenter'); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', ''); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" -F8 Sets the time to the approach at Bennu. Set Bennu approach time /Missions/Osiris Rex false "openspace.printInfo('Set time: Approach'); openspace.time.setTime('2018-SEP-11 21:31:01.183')" -F9 Sets the time to the preliminary survey of Bennu. Set Bennu survey time /Missions/Osiris Rex false "openspace.printInfo('Set time: Preliminary Survey'); openspace.time.setTime('2018-NOV-20 01:13:12.183')" -F10 Sets the time to the orbital B event. Set orbital B event time /Missions/Osiris Rex false "openspace.printInfo('Set time: Orbital B'); openspace.time.setTime('2019-APR-08 10:35:27.186')" -F11 Sets the time to the recon event. Set recon event time /Missions/Osiris Rex false "openspace.printInfo('Set time: Recon'); openspace.time.setTime('2019-MAY-25 03:50:31.195')" -q Toggles the visibility of the text marking the location of the Sun. Toggle Sun marker /Missions/Osiris Rex false propertyHelper.invert('Scene.SunMarker.Renderable.Enabled') +F8 Sets the time to the approach at Bennu Set Bennu approach time /Missions/Osiris Rex false "openspace.printInfo('Set time: Approach'); openspace.time.setTime('2018-SEP-11 21:31:01.183')" +F9 Sets the time to the preliminary survey of Bennu Set Bennu survey time /Missions/Osiris Rex false "openspace.printInfo('Set time: Preliminary Survey'); openspace.time.setTime('2018-NOV-20 01:13:12.183')" +F10 Sets the time to the orbital B event Set orbital B event time /Missions/Osiris Rex false "openspace.printInfo('Set time: Orbital B'); openspace.time.setTime('2019-APR-08 10:35:27.186')" +F11 Sets the time to the recon event Set recon event time /Missions/Osiris Rex false "openspace.printInfo('Set time: Recon'); openspace.time.setTime('2019-MAY-25 03:50:31.195')" +q Toggles the visibility of the text marking the location of the Sun Toggle Sun marker /Missions/Osiris Rex false propertyHelper.invert('Scene.SunMarker.Renderable.Enabled') 1 Setting the simulation speed to 1 seconds per realtime second Set sim speed 1 /Simulation Speed false "openspace.time.interpolateDeltaTime(1)" 2 Setting the simulation speed to 5 seconds per realtime second Set sim speed 5 /Simulation Speed false "openspace.time.interpolateDeltaTime(5)" 3 Setting the simulation speed to 10 seconds per realtime second Set sim speed 10 /Simulation Speed false "openspace.time.interpolateDeltaTime(10)" @@ -37,7 +40,7 @@ Shift+3 Setting the simulation speed to 8640 seconds per realtime second Set sim absolute 2018 10 30 23:00:00.500 #Camera -setNavigationState "OsirisRex" 26974590199.661884, 76314608558.908020, -127086452897.101791 +setNavigationState OsirisRexAsset.OsirisRex.Identifier 26974590199.661884, 76314608558.908020, -127086452897.101791 #MarkNodes OsirisRex diff --git a/data/assets/rosetta.profile b/data/profiles/rosetta.profile similarity index 66% rename from data/assets/rosetta.profile rename to data/profiles/rosetta.profile index 0b0bd37881..dd27b61191 100644 --- a/data/assets/rosetta.profile +++ b/data/profiles/rosetta.profile @@ -5,29 +5,33 @@ Volume asset.require('scene/solarsystem/missions/messenger/mercurymagnetosphere') openspace.printWarning("Volume module is not loaded, skipping asset: mercurymagnetosphere") #Asset -scene/solarsystem/missions/rosetta/67p required -scene/solarsystem/missions/rosetta/rosetta required +util/property_helper propertyHelper +util/renderable_helper renderableHelper +base +scene/solarsystem/missions/rosetta/67p Comet67PAsset +scene/solarsystem/missions/rosetta/rosetta +scene/solarsystem/missions/rosetta/dashboard #Property setPropertyValue Scene.67P.Renderable.PerformShading false setPropertyValue Scene.ImagePlaneRosetta.Renderable.Enabled false #Keybinding -a Sets the focus of the camera on '67P'. Focus on 67P /Missions/Rosetta false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', '67P'); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', ''); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" +a Sets the focus of the camera on '67P' Focus on 67P /Missions/Rosetta false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', '67P'); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', ''); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" s Sets the focus of the camera on 'Rosetta' Focus on Rosetta /Missions/Rosetta false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Rosetta'); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', ''); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" -F5 Jumps to the time of initial approach of Rosetta to 67P. Set initial approach time /Missions/Rosetta false "openspace.time.setTime('2014-08-01T03:05:18.101')" F6 Jumps to the time when the Philae lander is released. Set lander release time /Missions/Rosetta false "openspace.time.setTime('2014-11-12T08:20:00.00')" +Shift+F6 Jumps to the time of initial approach of Rosetta to 67P. Set initial approach time /Missions/Rosetta false "openspace.time.setTime('2014-08-01T03:05:18.101')" F8 Removes all image projections from 67P. Clear 67P projections /Missions/Rosetta false "openspace.setPropertyValue('Scene.67P.Renderable.ProjectionComponent.ClearAllProjections', true)" e Toggles the visibility of all trails further from the Sun than 67P. Toggle outer planetary trails /Missions/Rosetta false renderableHelper.toggle('Scene.JupiterTrail')..renderableHelper.toggle('Scene.SaturnTrail')..renderableHelper.toggle('Scene.UranusTrail')..renderableHelper.toggle('Scene.NeptuneTrail') i Toggles the visibility of the free floating image plane. Toggle image plane /Missions/Rosetta false renderableHelper.toggle('Scene.ImagePlaneRosetta') -g Toggles the visibility of Philae's trail. Toggle Philae trail /Missions/Rosetta false renderableHelper.toggle('Scene.PhilaeTrail') +o Toggles the visibility of Philae's trail. Toggle Philae trail /Missions/Rosetta false renderableHelper.toggle('Scene.PhilaeTrail') p Enables or disables the image projection on 67P. Toggle 67P projection /Missions/Rosetta false propertyHelper.invert('Scene.67P.Renderable.ProjectionComponent.PerformProjection') #Time absolute 2014-08-01T03:05:00.000 #Camera -setNavigationState "67P" "Root" -7.294781E5 , -6.657894E5, 2.509047E6 0.146529E0, 0.944727E0, 0.293290E0 +setNavigationState Comet67PAsset.Comet67P.Identifier "Root" -7.294781E5 , -6.657894E5, 2.509047E6 0.146529E0, 0.944727E0, 0.293290E0 #MarkNodes 67P diff --git a/data/assets/touch.profile b/data/profiles/touch.profile similarity index 75% rename from data/assets/touch.profile rename to data/profiles/touch.profile index 237a1c79b5..8fe818c78b 100644 --- a/data/assets/touch.profile +++ b/data/profiles/touch.profile @@ -5,8 +5,9 @@ Touch local webGui = asset.require('util/webgui'); webGui.setCefRoute("ontouch") openspace.printFatal('Could not load scene due to missing module "touch"') #Asset -scene/solarsystem/planets/earth/earth required -util/webgui required +base +scene/solarsystem/planets/earth/earth earthAsset +util/webgui #Property setPropertyValueSingle Scene.Pluto.Renderable.Enabled false @@ -17,7 +18,7 @@ setPropertyValueSingle Scene.PlutoBarycenterTrail.Renderable.Enabled false relative -1d #Camera -setNavigationState "Earth" 58.5877,16.1924,20000000 +setNavigationState earthAsset.Earth.Identifier 58.5877,16.1924,20000000 #MarkNodes Earth diff --git a/data/assets/voyager.profile b/data/profiles/voyager.profile similarity index 85% rename from data/assets/voyager.profile rename to data/profiles/voyager.profile index 150344f1e1..a95f48581e 100644 --- a/data/assets/voyager.profile +++ b/data/profiles/voyager.profile @@ -2,14 +2,16 @@ 1.0 #Asset -scene/solarsystem/planets/jupiter/minor_moons required -scene/solarsystem/planets/saturn/minor_moons required -scene/solarsystem/planets/uranus/minor_moons required -scene/solarsystem/planets/neptune/inner_moons required -scene/solarsystem/planets/neptune/irregular_prograde_moons required -scene/solarsystem/planets/neptune/irregular_retrograde_moons required -scene/solarsystem/missions/voyager/voyager1 required -scene/solarsystem/missions/voyager/voyager2 required +base +scene/solarsystem/planets/jupiter/minor_moons +scene/solarsystem/planets/saturn/minor_moons +scene/solarsystem/planets/uranus/minor_moons +scene/solarsystem/planets/neptune/inner_moons +scene/solarsystem/planets/neptune/irregular_prograde_moons +scene/solarsystem/planets/neptune/irregular_retrograde_moons +scene/solarsystem/missions/voyager/voyager1 VoyagerAsset +scene/solarsystem/missions/voyager/voyager2 +scene/solarsystem/missions/voyager/dashboard #Keybinding 1 Setting the simulation speed to 1 seconds per realtime second Set sim speed 1 /Simulation Speed false "openspace.time.interpolateDeltaTime(1)" @@ -42,7 +44,7 @@ setPropertyValueSingle Scene.PlutoBarycenterTrail.Renderable.Enabled false absolute 1977 SEP 10 12:00:00 #Camera -setNavigationState "Voyager_1" "Root" 526781518487.171326, 257168309890.072144, -1381125204152.817383 +setNavigationState VoyagerAsset.Voyager_1.Identifier "Root" 526781518487.171326, 257168309890.072144, -1381125204152.817383 #MarkNodes Earth diff --git a/ext/ghoul b/ext/ghoul index 3048e4837b..d35be27b61 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 3048e4837b8f96b555d5dd326f0b68289ad0ac37 +Subproject commit d35be27b61140e76d8283999d9faee16977b1bfc diff --git a/include/openspace/engine/configuration.h b/include/openspace/engine/configuration.h index 907ccd0e3f..41643b3041 100644 --- a/include/openspace/engine/configuration.h +++ b/include/openspace/engine/configuration.h @@ -91,6 +91,7 @@ struct Configuration { glm::dvec3 screenSpaceRotation = glm::dvec3(0.0); glm::dvec3 masterRotation = glm::dvec3(0.0); bool isConsoleDisabled = false; + bool usingProfile = false; std::map moduleConfigurations; diff --git a/include/openspace/engine/globals.h b/include/openspace/engine/globals.h index 523936c496..0bf76957f5 100644 --- a/include/openspace/engine/globals.h +++ b/include/openspace/engine/globals.h @@ -65,6 +65,7 @@ namespace scripting { class ScriptEngine; class ScriptScheduler; } // namespace scripting +class Profile; namespace global { @@ -100,6 +101,7 @@ properties::PropertyOwner& gRootPropertyOwner(); properties::PropertyOwner& gScreenSpaceRootPropertyOwner(); scripting::ScriptEngine& gScriptEngine(); scripting::ScriptScheduler& gScriptScheduler(); +Profile& gProfile(); } // namespace detail @@ -139,6 +141,7 @@ static properties::PropertyOwner& screenSpaceRootPropertyOwner = detail::gScreenSpaceRootPropertyOwner(); static scripting::ScriptEngine& scriptEngine = detail::gScriptEngine(); static scripting::ScriptScheduler& scriptScheduler = detail::gScriptScheduler(); +static Profile& profile = detail::gProfile(); void initialize(); void initializeGL(); diff --git a/include/openspace/engine/openspaceengine.h b/include/openspace/engine/openspaceengine.h index abe5fe8687..967629e94b 100644 --- a/include/openspace/engine/openspaceengine.h +++ b/include/openspace/engine/openspaceengine.h @@ -76,6 +76,7 @@ public: const glm::mat4& projectionMatrix); void drawOverlays(); void postDraw(); + void resetPropertyChangeFlags(); void keyboardCallback(Key key, KeyModifier mod, KeyAction action); void charCallback(unsigned int codepoint, KeyModifier modifier); void mouseButtonCallback(MouseButton button, MouseAction action, KeyModifier mods); @@ -110,6 +111,7 @@ private: void runGlobalCustomizationScripts(); void configureLogging(); std::string generateFilePath(std::string openspaceRelativePath); + void resetPropertyChangeFlagsOfSubowners(openspace::properties::PropertyOwner* po); std::unique_ptr _scene; std::unique_ptr _assetManager; diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index b3856c5981..98ceb9b5ff 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -65,6 +66,12 @@ public: */ void preSynchronization(); + /** + * If enabled, calling this function will render information about the session + * recording that is currently taking place to the screen. + */ + void render(); + /** * Current time based on playback mode */ @@ -209,6 +216,8 @@ public: std::vector playbackList() const; private: + properties::BoolProperty _renderPlaybackInformation; + enum class RecordedType { Camera = 0, Time, diff --git a/include/openspace/properties/property.h b/include/openspace/properties/property.h index 1e5dd5c8b3..ce92102ece 100644 --- a/include/openspace/properties/property.h +++ b/include/openspace/properties/property.h @@ -495,6 +495,18 @@ public: */ virtual std::string generateAdditionalJsonDescription() const; + /** + * Returns whether or not the property value has changed. + * + * \return true if the property has changed + */ + bool hasChanged() const; + + /** + * Reset the valChanged flag to an unchanged state, as if value has not been changed. + */ + void resetToUnchanged(); + protected: static const char* IdentifierKey; static const char* NameKey; @@ -531,6 +543,9 @@ protected: /// The callback function sthat will be invoked whenever the value changes std::vector>> _onDeleteCallbacks; + /// Flag indicating that this property value has been changed after initialization + bool _isValueDirty = false; + private: void notifyDeleteListeners(); diff --git a/include/openspace/properties/templateproperty.inl b/include/openspace/properties/templateproperty.inl index 56fdca6a1a..f8bdb0ecd3 100644 --- a/include/openspace/properties/templateproperty.inl +++ b/include/openspace/properties/templateproperty.inl @@ -176,6 +176,7 @@ void openspace::properties::TemplateProperty::setValue(T val) { if (val != _value) { _value = std::move(val); notifyChangeListeners(); + _isValueDirty = true; } } @@ -196,6 +197,7 @@ void TemplateProperty::set(std::any value) { if (v != _value) { _value = std::move(v); notifyChangeListeners(); + _isValueDirty = true; } } diff --git a/include/openspace/rendering/renderable.h b/include/openspace/rendering/renderable.h index d43b8f9bb7..1b2817c946 100644 --- a/include/openspace/rendering/renderable.h +++ b/include/openspace/rendering/renderable.h @@ -53,8 +53,9 @@ public: enum class RenderBin : int { Background = 1, Opaque = 2, - Transparent = 4, - Overlay = 8 + PreDeferredTransparent = 4, + PostDeferredTransparent = 8, + Overlay = 16 }; static std::unique_ptr createFromDictionary( diff --git a/include/openspace/scene/assetloader.h b/include/openspace/scene/assetloader.h index 52a3084078..4d99b176f8 100644 --- a/include/openspace/scene/assetloader.h +++ b/include/openspace/scene/assetloader.h @@ -218,6 +218,7 @@ private: _onDependencyInitializationFunctionRefs; std::unordered_map>> _onDependencyDeinitializationFunctionRefs; + int _assetsTableRef = 0; }; diff --git a/include/openspace/scene/profile.h b/include/openspace/scene/profile.h new file mode 100644 index 0000000000..71473693ee --- /dev/null +++ b/include/openspace/scene/profile.h @@ -0,0 +1,163 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2020 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#ifndef __OPENSPACE_CORE___PROFILE___H__ +#define __OPENSPACE_CORE___PROFILE___H__ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace openspace { + +namespace scripting { struct LuaLibrary; } + +class Profile { +public: + // Version + struct Version { + int major = 0; + int minor = 0; + }; + struct Module { + std::string name; + std::string loadedInstruction; + std::string notLoadedInstruction; + }; + struct Meta { + std::string name; + std::string version; + std::string description; + std::string author; + std::string url; + std::string license; + }; + struct Asset { + std::string path; + std::string name; + }; + struct Property { + enum class SetType { + SetPropertyValue, + SetPropertyValueSingle + }; + + SetType setType; + std::string name; + std::string value; + }; + struct Keybinding { + KeyWithModifier key; + std::string documentation; + std::string name; + std::string guiPath; + bool isLocal; + std::string script; + }; + struct Time { + enum class Type { + Absolute, + Relative + }; + + Type type; + std::string time; + }; + struct CameraNavState { + static constexpr const char* Type = "setNavigationState"; + + std::string anchor; + std::string aim; + std::string referenceFrame; + glm::dvec3 position; + std::optional up; + std::optional yaw; + std::optional pitch; + }; + struct CameraGoToGeo { + static constexpr const char* Type = "goToGeo"; + + std::string anchor; + double latitude; + double longitude; + std::optional altitude; + }; + using CameraType = std::variant; + + Profile() = default; + Profile(const std::vector& content); + std::string serialize() const; + + std::string convertToScene() const; + + /** + * Saves all current settings, starting from the profile that was loaded at startup, + * and all of the property & asset changes that were made since startup. + */ + void saveCurrentSettingsToProfile(const properties::PropertyOwner& rootOwner, + const std::string& currentTime, + interaction::NavigationHandler::NavigationState navState); + + /// If the value passed to this function is 'true', the addAsset and removeAsset + /// functions will be no-ops instead + void setIgnoreUpdates(bool ignoreUpdates); + + /// Adds a new asset and checks for duplicates + void addAsset(const std::string& path); + + /// Removes an asset + void removeAsset(const std::string& path); + + /** + * Returns the Lua library that contains all Lua functions available to provide + * profile functionality. + * \return The Lua library that contains all Lua functions available for profiles + */ + static scripting::LuaLibrary luaLibrary(); + +private: + static constexpr const Version CurrentVersion = Version { 1, 0 }; + + Version version = CurrentVersion; + std::vector modules; + std::optional meta; + std::vector assets; + std::vector properties; + std::vector keybindings; + std::optional