From 877e0fb61f4d87c2f988049c071e0360c8867c32 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Fri, 9 Sep 2022 11:16:36 +0200 Subject: [PATCH 1/5] Replace tabs with spaces in Eiffeltower asset --- .../educational/scale/eiffeltower.asset | 123 +++++++++--------- 1 file changed, 62 insertions(+), 61 deletions(-) diff --git a/data/assets/educational/scale/eiffeltower.asset b/data/assets/educational/scale/eiffeltower.asset index dc91b4ed1d..226a41b6d5 100644 --- a/data/assets/educational/scale/eiffeltower.asset +++ b/data/assets/educational/scale/eiffeltower.asset @@ -2,76 +2,77 @@ local earthAsset = asset.require('scene/solarsystem/planets/earth/earth') local sunAsset = asset.require('scene/solarsystem/sun/sun') local modelFolder = asset.syncedResource({ - Name = "Eiffel Tower Model", - Type = "HttpSynchronization", - Identifier = "eiffel_tower_model", - Version = 1 + Name = "Eiffel Tower Model", + Type = "HttpSynchronization", + Identifier = "eiffel_tower_model", + Version = 1 }) - + local eiffelTower = { - Identifier = "eiffelTower", - Parent = earthAsset.Earth.Identifier, - --Note: Lat/Lon/Scale values comes from alignment with Esri World Imagery 2D layer - Transform = { - Translation = { - Type = "GlobeTranslation", - Globe = earthAsset.Earth.Identifier, - Longitude = 2.29448, - Latitude = 48.85824, - Altitude = 0.0, - UseHeightmap = true - }, - Rotation = { - Type = "GlobeRotation", - Globe = earthAsset.Earth.Identifier, - Longitude = 2.29448, - Latitude = 48.85824, - UseHeightmap = false - }, - Scale = { - Type = "StaticScale", - Scale = 4.38 - } - }, - Renderable = { - Type = "RenderableModel", - GeometryFile = modelFolder .. "eiffeltower.osmodel", - ModelScale = "Centimeter", - RotationVector = { 0.0, 45.0, 0.0 }, - LightSources = { sunAsset.LightSource } - }, - GUI = { - Name = "Eiffel Tower", - Path = "/Scale Objects" - } + Identifier = "eiffelTower", + Parent = earthAsset.Earth.Identifier, + --Note: Lat/Lon/Scale values comes from alignment with Esri World Imagery 2D layer + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = earthAsset.Earth.Identifier, + Longitude = 2.29448, + Latitude = 48.85824, + Altitude = 0.0, + UseHeightmap = true + }, + Rotation = { + Type = "GlobeRotation", + Globe = earthAsset.Earth.Identifier, + Longitude = 2.29448, + Latitude = 48.85824, + UseHeightmap = false + }, + Scale = { + Type = "StaticScale", + Scale = 4.38 + } + }, + Renderable = { + Type = "RenderableModel", + GeometryFile = modelFolder .. "eiffeltower.osmodel", + ModelScale = "Centimeter", + RotationVector = { 0.0, 45.0, 0.0 }, + LightSources = { sunAsset.LightSource } + }, + GUI = { + Name = "Eiffel Tower", + Path = "/Scale Objects" + } } local updatePositionAction = { - Identifier = "os.drop_eiffel_tower", - Name = "Drop Eiffel Tower under camera", - Command = [[local lat, lon, alt = openspace.globebrowsing.getGeoPositionForCamera(); - local camera = openspace.navigation.getNavigationState(); - openspace.setParent('eiffelTower', camera.Anchor) - openspace.setPropertyValueSingle('Scene.eiffelTower.Translation.Globe', camera.Anchor); - openspace.setPropertyValueSingle('Scene.eiffelTower.Translation.Latitude', lat); - openspace.setPropertyValueSingle('Scene.eiffelTower.Translation.Longitude', lon); - openspace.setPropertyValueSingle('Scene.eiffelTower.Rotation.Globe', camera.Anchor); - openspace.setPropertyValueSingle('Scene.eiffelTower.Rotation.Latitude', lat); - openspace.setPropertyValueSingle('Scene.eiffelTower.Rotation.Longitude', lon); - ]], - Documentation = "Updates the Eiffel Tower position based on the globe location of the camera", - GuiPath = "/Scale Objects", - IsLocal = false + Identifier = "os.drop_eiffel_tower", + Name = "Drop Eiffel Tower under camera", + Command = [[ + local lat, lon, alt = openspace.globebrowsing.getGeoPositionForCamera(); + local camera = openspace.navigation.getNavigationState(); + openspace.setParent('eiffelTower', camera.Anchor) + openspace.setPropertyValueSingle('Scene.eiffelTower.Translation.Globe', camera.Anchor); + openspace.setPropertyValueSingle('Scene.eiffelTower.Translation.Latitude', lat); + openspace.setPropertyValueSingle('Scene.eiffelTower.Translation.Longitude', lon); + openspace.setPropertyValueSingle('Scene.eiffelTower.Rotation.Globe', camera.Anchor); + openspace.setPropertyValueSingle('Scene.eiffelTower.Rotation.Latitude', lat); + openspace.setPropertyValueSingle('Scene.eiffelTower.Rotation.Longitude', lon); + ]], + Documentation = "Updates the Eiffel Tower position based on the globe location of the camera", + GuiPath = "/Scale Objects", + IsLocal = false } asset.onInitialize(function() - openspace.addSceneGraphNode(eiffelTower) - openspace.action.registerAction(updatePositionAction) + openspace.addSceneGraphNode(eiffelTower) + openspace.action.registerAction(updatePositionAction) end) - + asset.onDeinitialize(function() - openspace.action.removeAction(updatePositionAction) - openspace.removeSceneGraphNode(eiffelTower) + openspace.action.removeAction(updatePositionAction) + openspace.removeSceneGraphNode(eiffelTower) end) - + asset.export(eiffelTower) From ff89d7860c790afde193fcc49b419ba029d0dfaf Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Fri, 9 Sep 2022 11:34:56 +0200 Subject: [PATCH 2/5] Use Sun position instead of SSB in Sun light source (see #2223) --- data/assets/scene/solarsystem/sun/sun.asset | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/assets/scene/solarsystem/sun/sun.asset b/data/assets/scene/solarsystem/sun/sun.asset index 2fe5742c43..93dda2e374 100644 --- a/data/assets/scene/solarsystem/sun/sun.asset +++ b/data/assets/scene/solarsystem/sun/sun.asset @@ -48,7 +48,7 @@ local SunLabel = { local LightSource = { Type = "SceneGraphLightSource", Identifier = "Sun", - Node = transforms.SolarSystemBarycenter.Identifier, + Node = Sun.Identifier, Intensity = 1.0 } @@ -56,12 +56,12 @@ asset.onInitialize(function() openspace.addSceneGraphNode(Sun) openspace.addSceneGraphNode(SunLabel) end) - + asset.onDeinitialize(function() openspace.removeSceneGraphNode(SunLabel) openspace.removeSceneGraphNode(Sun) end) - + asset.export(Sun) asset.export(SunLabel) asset.export("LightSource", LightSource) From 31f859b5896af7e39814969951fea4dfc0889b97 Mon Sep 17 00:00:00 2001 From: Gene Payne Date: Sun, 11 Sep 2022 21:33:15 -0600 Subject: [PATCH 3/5] Fixed string_view conversion bug in TaskRunner --- apps/TaskRunner/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/TaskRunner/main.cpp b/apps/TaskRunner/main.cpp index 194b52e4de..663e27140d 100644 --- a/apps/TaskRunner/main.cpp +++ b/apps/TaskRunner/main.cpp @@ -113,7 +113,7 @@ int main(int argc, char** argv) { // Register the base path as the directory where the configuration file lives std::filesystem::path base = configFile.parent_path(); constexpr std::string_view BasePathToken = "${BASE}"; - FileSys.registerPathToken(BasePathToken, base); + FileSys.registerPathToken(BasePathToken.data(), base); // Using same configuration for size as in apps/OpenSpace/main.cpp glm::ivec2 size = glm::ivec2(1920, 1080); From dbb973b0ec48fad056dfca1534a7dd0618af6b02 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Tue, 13 Sep 2022 10:53:30 +0200 Subject: [PATCH 4/5] Update GUI hash * Geo Location panel * Dependency updates * Getting started tour + some other changes/improvements --- data/assets/util/webgui.asset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/assets/util/webgui.asset b/data/assets/util/webgui.asset index 440e8f6e93..046e87c494 100644 --- a/data/assets/util/webgui.asset +++ b/data/assets/util/webgui.asset @@ -3,7 +3,7 @@ asset.require("./static_server") local guiCustomization = asset.require("customization/gui") -- Select which commit hashes to use for the frontend and backend -local frontendHash = "aeffda7eef46f4eaddfebcb41389672d2c473b35" +local frontendHash = "9f0298993d738f487c93c559084593945b5e093e" local dataProvider = "data.openspaceproject.com/files/webgui" local frontend = asset.syncedResource({ From 7946a93ee593f47c55db8b3a6c112208c16b33c3 Mon Sep 17 00:00:00 2001 From: Gene Payne Date: Tue, 13 Sep 2022 16:10:03 -0600 Subject: [PATCH 5/5] Fix for linux crashing when reading OMM files Linux doesn't use the '\r' line ending, so it doesn't recognize a line with only '\r' as being empty. --- modules/space/kepler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/space/kepler.cpp b/modules/space/kepler.cpp index 32b2c67769..08a75b267b 100644 --- a/modules/space/kepler.cpp +++ b/modules/space/kepler.cpp @@ -499,7 +499,7 @@ std::vector readOmmFile(std::filesystem::path file) { std::optional current = std::nullopt; std::string line; while (std::getline(f, line)) { - if (line.empty()) { + if (line.empty() || line == "\r") { continue; }