From b8e9193bc755f5b97e7aa637985e2e246f7e5c32 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 11 Jul 2024 10:34:06 +0200 Subject: [PATCH 01/99] Add Lua function to calculate the number of seconds between dates and use it in assets (#3332) --- .../examples/volume/generated/cartesian.asset | 4 +-- .../volume/generated/cartesiansequence.asset | 4 +-- .../examples/volume/generated/spherical.asset | 4 +-- .../bastille_day/density_volume.asset | 4 +-- .../interstellar/c-2019_q4_borisov.asset | 2 +- .../solarsystem/interstellar/oumuamua.asset | 3 +- .../messenger/mercurymagnetosphere.asset | 4 +-- .../missions/pioneer/pioneer10.asset | 12 ++++--- .../missions/pioneer/pioneer11.asset | 12 ++++--- .../missions/voyager/voyager1.asset | 16 ++++++---- .../missions/voyager/voyager2.asset | 25 +++++++++------ .../voyager1_2__pioneer10_11.asset | 14 +++----- .../satellites/communications/amateur.asset | 2 +- .../communications/experimental.asset | 2 +- .../communications/geostationary.asset | 2 +- .../communications/globalstar.asset | 2 +- .../satellites/communications/gorizont.asset | 2 +- .../satellites/communications/intelsat.asset | 2 +- .../satellites/communications/iridium.asset | 2 +- .../communications/iridium_next.asset | 2 +- .../satellites/communications/molniya.asset | 2 +- .../satellites/communications/orbcomm.asset | 2 +- .../communications/other_comm.asset | 2 +- .../satellites/communications/raduga.asset | 2 +- .../earth/satellites/communications/ses.asset | 2 +- .../satellites/communications/starlink.asset | 2 +- .../earth/satellites/debris/debris_asat.asset | 2 +- .../satellites/debris/debris_breezem.asset | 2 +- .../satellites/debris/debris_fengyun.asset | 2 +- .../satellites/debris/debris_iridium33.asset | 2 +- .../satellites/debris/debris_kosmos2251.asset | 2 +- .../debris/volume/cartesian_volume.asset | 4 +-- .../debris/volume/spherical_volume.asset | 4 +-- .../earth/satellites/misc/active.asset | 2 +- .../earth/satellites/misc/brightest.asset | 2 +- .../earth/satellites/misc/cubesats.asset | 2 +- .../earth/satellites/misc/hubble_trail.asset | 2 +- .../planets/earth/satellites/misc/iss.asset | 4 +-- .../earth/satellites/misc/military.asset | 2 +- .../planets/earth/satellites/misc/other.asset | 2 +- .../planets/earth/satellites/misc/radar.asset | 2 +- .../earth/satellites/misc/spacestations.asset | 2 +- .../earth/satellites/misc/tiangong.asset | 2 +- .../earth/satellites/misc/tle-new.asset | 2 +- .../earth/satellites/navigation/beidou.asset | 2 +- .../earth/satellites/navigation/galileo.asset | 2 +- .../satellites/navigation/glosnass.asset | 2 +- .../earth/satellites/navigation/gps.asset | 2 +- .../earth/satellites/navigation/musson.asset | 2 +- .../earth/satellites/navigation/nnss.asset | 2 +- .../earth/satellites/navigation/sbas.asset | 2 +- .../earth/satellites/science/education.asset | 2 +- .../satellites/science/engineering.asset | 2 +- .../earth/satellites/science/geodetic.asset | 2 +- .../earth/satellites/science/spaceearth.asset | 2 +- .../earth/satellites/weather/aqua.asset | 2 +- .../earth/satellites/weather/argos.asset | 2 +- .../earth/satellites/weather/dmc.asset | 2 +- .../satellites/weather/earth_resources.asset | 2 +- .../earth/satellites/weather/goes.asset | 2 +- .../earth/satellites/weather/noaa.asset | 2 +- .../earth/satellites/weather/planet.asset | 2 +- .../earth/satellites/weather/sarsat.asset | 2 +- .../earth/satellites/weather/snpp.asset | 2 +- .../earth/satellites/weather/spire.asset | 2 +- .../earth/satellites/weather/tdrss.asset | 2 +- .../earth/satellites/weather/terra.asset | 2 +- .../earth/satellites/weather/weather.asset | 2 +- .../scene/solarsystem/sssb/c2019y4atlas.asset | 10 +++--- src/util/time.cpp | 3 ++ src/util/time_lua.inl | 32 +++++++++++++++++++ 71 files changed, 157 insertions(+), 110 deletions(-) diff --git a/data/assets/examples/volume/generated/cartesian.asset b/data/assets/examples/volume/generated/cartesian.asset index f9c84e35f1..07a4797a1b 100644 --- a/data/assets/examples/volume/generated/cartesian.asset +++ b/data/assets/examples/volume/generated/cartesian.asset @@ -25,8 +25,8 @@ local Volume = { MinValue = 0, MaxValue = 1, GridType = "Cartesian", - SecondsBefore = 50 * 365 * 24 * 60 * 60, -- 50 years before - SecondsAfter = 50 * 365 * 24 * 60 * 60 -- 50 years after + SecondsBefore = 50 * openspace.time.secondsPerYear(), -- 50 years before + SecondsAfter = 50 * openspace.time.secondsPerYear() -- 50 years after }, GUI = { Path = "/Examples" diff --git a/data/assets/examples/volume/generated/cartesiansequence.asset b/data/assets/examples/volume/generated/cartesiansequence.asset index 24d0877da5..b45e1cc17f 100644 --- a/data/assets/examples/volume/generated/cartesiansequence.asset +++ b/data/assets/examples/volume/generated/cartesiansequence.asset @@ -19,8 +19,8 @@ local Volume = { MinValue = 0, MaxValue = 1, GridType = "Cartesian", - SecondsBefore = 50 * 365 * 24 * 60 * 60, -- 50 years before - SecondsAfter = 50 * 365 * 24 * 60 * 60 -- 50 years after + SecondsBefore = 50 * openspace.time.secondsPerYear(), -- 50 years before + SecondsAfter = 50 * openspace.time.secondsPerYear() -- 50 years after }, GUI = { Path = "/Examples" diff --git a/data/assets/examples/volume/generated/spherical.asset b/data/assets/examples/volume/generated/spherical.asset index 82c61fede8..04f41e286f 100644 --- a/data/assets/examples/volume/generated/spherical.asset +++ b/data/assets/examples/volume/generated/spherical.asset @@ -25,8 +25,8 @@ local Volume = { MinValue = 0, MaxValue = 1, GridType = "Spherical", - SecondsBefore = 50 * 365 * 24 * 60 * 60, -- 50 years before - SecondsAfter = 50 * 365 * 24 * 60 * 60 -- 50 years after + SecondsBefore = 50 * openspace.time.secondsPerYear(), -- 50 years before + SecondsAfter = 50 * openspace.time.secondsPerYear() -- 50 years after }, GUI = { Path = "/Examples" diff --git a/data/assets/scene/solarsystem/heliosphere/bastille_day/density_volume.asset b/data/assets/scene/solarsystem/heliosphere/bastille_day/density_volume.asset index 919230b635..1f7dbef0e1 100644 --- a/data/assets/scene/solarsystem/heliosphere/bastille_day/density_volume.asset +++ b/data/assets/scene/solarsystem/heliosphere/bastille_day/density_volume.asset @@ -39,8 +39,8 @@ local DensityVolume = { TransferFunction = asset.resource("transferfunctions/mas-mhd-r-squared.txt"), SourceDirectory = densityDirectory, GridType = "Spherical", - SecondsBefore = 24 * 60 * 60, - SecondsAfter = 24 * 60 * 60, + SecondsBefore = openspace.time.secondsPerDay(), + SecondsAfter = openspace.time.secondsPerDay(), Dimensions = { 100, 100, 128 }, InvertDataAtZ = true }, diff --git a/data/assets/scene/solarsystem/interstellar/c-2019_q4_borisov.asset b/data/assets/scene/solarsystem/interstellar/c-2019_q4_borisov.asset index ae18a90f26..63179278e5 100644 --- a/data/assets/scene/solarsystem/interstellar/c-2019_q4_borisov.asset +++ b/data/assets/scene/solarsystem/interstellar/c-2019_q4_borisov.asset @@ -27,7 +27,7 @@ local C2019Q4BorisovTrail = { Color = { 0.9, 0.9, 0.0 }, StartTime = "2015 JAN 01 00:00:00", EndTime = "2050 JAN 01 00:00:00", - SampleInterval = 60 * 60 * 24 -- = 86 400 seconds in 1 day + SampleInterval = openspace.time.secondsPerDay() }, GUI = { Name = "C/2019 Q4 Borisov Trail", diff --git a/data/assets/scene/solarsystem/interstellar/oumuamua.asset b/data/assets/scene/solarsystem/interstellar/oumuamua.asset index ecc79dd698..28ba280136 100644 --- a/data/assets/scene/solarsystem/interstellar/oumuamua.asset +++ b/data/assets/scene/solarsystem/interstellar/oumuamua.asset @@ -27,8 +27,7 @@ local OumuamuaTrail = { Color = { 0.9, 0.9, 0.0 }, StartTime = "2014 JAN 01 00:00:00", EndTime = "2050 JAN 01 00:00:00", - SampleInterval = 86400, - TimeStampSubsampleFactor = 1 + SampleInterval = openspace.time.secondsPerDay() }, GUI = { Name = "'Oumuamua Trail", diff --git a/data/assets/scene/solarsystem/missions/messenger/mercurymagnetosphere.asset b/data/assets/scene/solarsystem/missions/messenger/mercurymagnetosphere.asset index 0d20153a15..7d5be5882e 100644 --- a/data/assets/scene/solarsystem/missions/messenger/mercurymagnetosphere.asset +++ b/data/assets/scene/solarsystem/missions/messenger/mercurymagnetosphere.asset @@ -42,8 +42,8 @@ local Magnetosphere = { StepSize = 0.003, Dimensions = { 64, 64, 64 }, GridType = "Cartesian", - SecondsBefore = 24 * 60 * 60 * 365 * 100, - SecondsAfter = 24 * 60 * 60 * 365 * 100 + SecondsBefore = 100 * openspace.time.secondsPerYear(), + SecondsAfter = 100 * openspace.time.secondsPerYear() }, GUI = { Name = "Mercury Magnetosphere", diff --git a/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset b/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset index 4e1635593a..f1d9fabd52 100644 --- a/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset +++ b/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset @@ -32,6 +32,9 @@ local Pioneer10 = { } } +local StartTime = "1972 MAR 03 02:04:00" +local EndTime = "1990 JAN 02 00:00:00" + local Pioneer10Trail = { Identifier = "Pioneer_10Trail", Parent = sunTransforms.SolarSystemBarycenter.Identifier, @@ -43,11 +46,12 @@ local Pioneer10Trail = { Observer = coreKernels.ID.SolarSystemBarycenter }, Color = { 0.70, 0.50, 0.20 }, - StartTime = "1972 MAR 03 02:04:00", - EndTime = "1990 JAN 02 00:00:00", + StartTime = StartTime, + EndTime = EndTime, EnableFade = false, - SampleInterval = 6545 * 2 - -- 6545 is the number of days between the Start and End time (aka sample every 2d) + -- 1 sample every 2d + SampleInterval = + openspace.time.duration(StartTime, EndTime) / openspace.time.secondsPerYear() * 2 }, GUI = { Name = "Pioneer 10 Trail (SPICE)", diff --git a/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset b/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset index a96e530106..5d841c3873 100644 --- a/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset +++ b/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset @@ -37,6 +37,9 @@ local Pioneer11 = { } } +local StartTime = "1973 APR 06 02:25:00.000" +local EndTime = "1990 JAN 02 00:00:00.000" + local Pioneer11Trail = { Identifier = "Pioneer_11Trail", Parent = sunTransforms.SolarSystemBarycenter.Identifier, @@ -48,11 +51,12 @@ local Pioneer11Trail = { Observer = coreKernels.ID.SolarSystemBarycenter }, Color = { 0.70, 0.50, 0.20 }, - StartTime = "1973 APR 06 02:25:00.000", - EndTime = "1990 JAN 02 00:00:00.000", + StartTime = StartTime, + EndTime = EndTime, EnableFade = false, - -- 6087 is the number of days between the Start and End time (so sample every 2d) - SampleInterval = 6087 * 2 + -- 1 sample every 2d + SampleInterval = + openspace.time.duration(StartTime, EndTime) / openspace.time.secondsPerYear() * 2 }, GUI = { Name = "Pioneer 11 Trail (SPICE)", diff --git a/data/assets/scene/solarsystem/missions/voyager/voyager1.asset b/data/assets/scene/solarsystem/missions/voyager/voyager1.asset index f8b4f2b701..0d7660639b 100644 --- a/data/assets/scene/solarsystem/missions/voyager/voyager1.asset +++ b/data/assets/scene/solarsystem/missions/voyager/voyager1.asset @@ -95,8 +95,9 @@ local VoyagerTrailCruiseEarthJupiter = { Color = { 0.70, 0.50, 0.20 }, StartTime = "1977 SEP 05", EndTime = "1979 MAR 04", - -- 545 is the number of days between the Start and End time - SampleInterval = 545 * 2 + -- 1 sample every 2d + SampleInterval = openspace.time.duration("1977 SEP 05", "1979 MAR 04") / + openspace.time.secondsPerYear() * 2 }, Tag = { "voyager1_trail" }, GUI = { @@ -145,8 +146,9 @@ local VoyagerTrailCruiseJupiterSaturn = { Color = { 0.70, 0.50, 0.20 }, StartTime = "1979 MAR 09", EndTime = "1980 NOV 11", - -- 618 is the number of days between the Start and End time - SampleInterval = 618 * 2 + -- 1 sample every 2d + SampleInterval = openspace.time.duration("1979 MAR 09", "1980 NOV 11") / + openspace.time.secondsPerYear() * 2 }, Tag = { "voyager1_trail" }, GUI = { @@ -195,8 +197,10 @@ local VoyagerTrailCruiseSaturnInf = { Color = { 0.70, 0.50, 0.20 }, StartTime = "1980 NOV 16", EndTime = "2100 JAN 01", - -- 43511 is the number of days between the Start and End time - SampleInterval = 43511 * 2 + -- 1 sample every 2d + SampleInterval = openspace.time.duration("1980 NOV 16", "2100 JAN 01") / + openspace.time.secondsPerYear() * 2 + }, Tag = { "voyager1_trail" }, GUI = { diff --git a/data/assets/scene/solarsystem/missions/voyager/voyager2.asset b/data/assets/scene/solarsystem/missions/voyager/voyager2.asset index 6cf8f2587d..884865df88 100644 --- a/data/assets/scene/solarsystem/missions/voyager/voyager2.asset +++ b/data/assets/scene/solarsystem/missions/voyager/voyager2.asset @@ -98,8 +98,9 @@ local VoyagerTrailCruiseEarthJupiter = { Color = { 0.70, 0.50, 0.20 }, StartTime = "1977-AUG-20 16:07:06.535", EndTime = "1979 JUL 06", - -- 669 is the number of days between the Start and End time - SampleInterval = 669 * 2 + -- 1 sample every 2d + SampleInterval = openspace.time.duration("1977-AUG-20 16:07:06.535", "1979 JUL 06") / + openspace.time.secondsPerYear() * 2 }, Tag = { "voyager2_trail" }, GUI = { @@ -148,8 +149,9 @@ local VoyagerTrailCruiseJupiterSaturn = { Color = { 0.70, 0.50, 0.20 }, StartTime = "1979 JUL 15", EndTime = "1981 AUG 23", - -- 770 is the number of days between the Start and End time - SampleInterval = 770 * 2 + -- 1 sample every 2d + SampleInterval = openspace.time.duration("1979 JUL 15", "1981 AUG 23") / + openspace.time.secondsPerYear() * 2 }, Tag = { "voyager2_trail" }, GUI = { @@ -198,8 +200,9 @@ local VoyagerTrailCruiseSaturnUranus = { Color = { 0.70, 0.50, 0.20 }, StartTime = "1981 AUG 30", EndTime = "1986 JAN 22", - -- 1971 is the number of days between the Start and End time - SampleInterval = 1971 * 2 + -- 1 sample every 2d + SampleInterval = openspace.time.duration("1981 AUG 30", "1986 JAN 22") / + openspace.time.secondsPerYear() * 2 }, Tag = { "voyager2_trail" }, GUI = { @@ -248,8 +251,9 @@ local VoyagerTrailCruiseUranusNeptune = { Color = { 0.70, 0.50, 0.20 }, StartTime = "1986 JAN 27", EndTime = "1989 AUG 24", - -- 1305 is the number of days between the Start and End time - SampleInterval = 1305 * 2 + -- 1 sample every 2d + SampleInterval = openspace.time.duration("1986 JAN 27", "1989 AUG 24") / + openspace.time.secondsPerYear() * 2 }, Tag = { "voyager2_trail" }, GUI = { @@ -298,8 +302,9 @@ local VoyagerTrailCruiseNeptuneInf = { Color = { 0.70, 0.50, 0.20 }, StartTime = "1989 AUG 26", EndTime = "2100 JAN 01", - -- 40306 is the number of days between the Start and End time - SampleInterval = 40306 * 2 + -- 1 sample every 2d + SampleInterval = openspace.time.duration("1989 AUG 26", "2100 JAN 01") / + openspace.time.secondsPerYear() * 2 }, Tag = { "voyager2_trail" }, GUI = { diff --git a/data/assets/scene/solarsystem/missions/voyagerpioneer/voyager1_2__pioneer10_11.asset b/data/assets/scene/solarsystem/missions/voyagerpioneer/voyager1_2__pioneer10_11.asset index 4e3fcb065d..d8fa9d58ac 100644 --- a/data/assets/scene/solarsystem/missions/voyagerpioneer/voyager1_2__pioneer10_11.asset +++ b/data/assets/scene/solarsystem/missions/voyagerpioneer/voyager1_2__pioneer10_11.asset @@ -13,8 +13,6 @@ local pioneer_horizons = asset.resource({ }) -local SampleInterval = 24 * 60 * 60 - local Voyager1 = { Identifier = "Voyager1", Parent = "SolarSystemBarycenter", @@ -34,8 +32,7 @@ local Voyager1 = { Fade = 5.0, StartTime = "1977 SEP 06 00:00:00", EndTime = "2030 JAN 01 00:00:00", - SampleInterval = SampleInterval, - TimeStampSubsampleFactor = 1 + SampleInterval = openspace.time.secondsPerDay() }, GUI = { Name = "Voyager 1 Trail", @@ -64,8 +61,7 @@ local Voyager2 = { Fade = 5.0, StartTime = "1977 AUG 21 00:00:00", EndTime = "2030 JAN 01 00:00:00", - SampleInterval = SampleInterval, - TimeStampSubsampleFactor = 1 + SampleInterval = openspace.time.secondsPerDay() }, GUI = { Name = "Voyager 2 Trail", @@ -94,8 +90,7 @@ local Pioneer10 = { Fade = 5.0, StartTime = "1972 MAR 04 00:00:00", EndTime = "2030 JAN 01 00:00:00", - SampleInterval = SampleInterval, - TimeStampSubsampleFactor = 1 + SampleInterval = openspace.time.secondsPerDay() }, GUI = { Name = "Pioneer 10 Trail", @@ -124,8 +119,7 @@ local Pioneer11 ={ Fade = 5.0, StartTime = "1973 APR 07 00:00:00", EndTime = "2030 JAN 01 00:00:00", - SampleInterval = SampleInterval, - TimeStampSubsampleFactor = 1 + SampleInterval = openspace.time.secondsPerDay() }, GUI = { Name = "Pioneer 11 Trail", diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/amateur.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/amateur.asset index d4e4d7b6d6..ed48d2e0a3 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/amateur.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/amateur.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_amateur_radio", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=amateur&FORMAT=kvn", Filename = "amateur.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/experimental.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/experimental.asset index 9d58a8c7ca..fc9655828f 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/experimental.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/experimental.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_x-comm", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=x-comm&FORMAT=kvn", Filename = "x-comm.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/geostationary.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/geostationary.asset index 7a1b6be672..c8ff854b88 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/geostationary.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/geostationary.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_geo", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=geo&FORMAT=kvn", Filename = "geo.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/globalstar.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/globalstar.asset index bb93c189ca..a76d042f90 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/globalstar.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/globalstar.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_globalstar", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=globalstar&FORMAT=kvn", Filename = "globalstar.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/gorizont.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/gorizont.asset index 42e204acf6..bb74c08ce4 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/gorizont.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/gorizont.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_gorizont", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=gorizont&FORMAT=kvn", Filename = "gorizont.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/intelsat.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/intelsat.asset index 2c4816984c..4601e65efe 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/intelsat.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/intelsat.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_intelsat", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=intelsat&FORMAT=kvn", Filename = "intelsat.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium.asset index 01299f9c3c..12c4a6e28e 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_iridium", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=iridium&FORMAT=kvn", Filename = "iridium.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium_next.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium_next.asset index 8b09625174..759e31cafd 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium_next.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium_next.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_iridium-NEXT", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=iridium-NEXT&FORMAT=kvn", Filename = "iridium-NEXT.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/molniya.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/molniya.asset index f2e60e19f0..58586625e0 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/molniya.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/molniya.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_molniya", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=molniya&FORMAT=kvn", Filename = "molniya.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/orbcomm.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/orbcomm.asset index d3c7c5eb14..107171335d 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/orbcomm.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/orbcomm.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_orbcomm", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=orbcomm&FORMAT=kvn", Filename = "orbcomm.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/other_comm.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/other_comm.asset index 8e18913e25..dd9d8a7180 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/other_comm.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/other_comm.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_other-comm", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=other-comm&FORMAT=kvn", Filename = "other-comm.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/raduga.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/raduga.asset index 2212d24c84..ba24bec98c 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/raduga.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/raduga.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_raduga", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=raduga&FORMAT=kvn", Filename = "raduga.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/ses.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/ses.asset index 3997ca2050..8a2ae6cfe1 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/ses.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/ses.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_ses", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=ses&FORMAT=kvn", Filename = "ses.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/starlink.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/starlink.asset index 1896b47717..323cdd446b 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/starlink.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/starlink.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_starlink", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=starlink&FORMAT=kvn", Filename = "starlink.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_asat.asset b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_asat.asset index 7e8c010368..320860f245 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_asat.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_asat.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_2019-006", Url = "https://www.celestrak.com/NORAD/elements/gp.php?INTDES=2019-006&FORMAT=kvn", Filename = "2019-006.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_breezem.asset b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_breezem.asset index 2c1ddc4212..085e280b89 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_breezem.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_breezem.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_2012-044", Url = "https://www.celestrak.com/NORAD/elements/gp.php?INTDES=2012-044&FORMAT=kvn", Filename = "2012-044.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_fengyun.asset b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_fengyun.asset index 4bee1421bc..a52a8393ff 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_fengyun.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_fengyun.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_1999-025", Url = "https://www.celestrak.com/NORAD/elements/gp.php?INTDES=1999-025&FORMAT=kvn", Filename = "1999-025.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_iridium33.asset b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_iridium33.asset index 008f12c0cb..bc251261fe 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_iridium33.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_iridium33.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_iridium-33-debris", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=iridium-33-debris&FORMAT=kvn", Filename = "iridium-33-debris.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_kosmos2251.asset b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_kosmos2251.asset index 60df8431ab..bcad916d9f 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_kosmos2251.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_kosmos2251.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_cosmos-2251-debris", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=cosmos-2251-debris&FORMAT=kvn", Filename = "cosmos-2251-debris.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/cartesian_volume.asset b/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/cartesian_volume.asset index 221d6f6842..a3cbf648f6 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/cartesian_volume.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/cartesian_volume.asset @@ -24,8 +24,8 @@ local DebrisVolumeCartesian = { MinValue = 0, MaxValue = 1, GridType = "Cartesian", - SecondsBefore = 50 * 365 * 24 * 60 * 60, - SecondsAfter = 50 * 365 * 24 * 60 * 60 + SecondsBefore = 50 * openspace.time.secondsPerYear(), + SecondsAfter = 50 * openspace.time.secondsPerYear() }, GUI = { Name = "Debris Volume - Cartesian", diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/spherical_volume.asset b/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/spherical_volume.asset index bd6fbebc7b..64b6ddfb18 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/spherical_volume.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/spherical_volume.asset @@ -24,8 +24,8 @@ local DebrisVolumeSpherical = { MinValue = 0, MaxValue = 1, GridType = "Spherical", - SecondsBefore = 50 * 365 * 24 * 60 * 60, - SecondsAfter = 50 * 365 * 24 * 60 * 60 + SecondsBefore = 50 * openspace.time.secondsPerYear(), + SecondsAfter = 50 * openspace.time.secondsPerYear() }, GUI = { Name = "DebrisVolume - Spherical", diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/active.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/active.asset index 4931acb8ab..e13d13d328 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/active.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/active.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_active", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=active&FORMAT=kvn", Filename = "active.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/brightest.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/brightest.asset index 6d730202e6..c02b1d4735 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/brightest.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/brightest.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_visual", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=visual&FORMAT=kvn", Filename = "visual.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/cubesats.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/cubesats.asset index d5e4be6491..7188ae6c79 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/cubesats.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/cubesats.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_cubesat", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=cubesat&FORMAT=kvn", Filename = "cubesat.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/hubble_trail.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/hubble_trail.asset index e76db0267e..b29818479d 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/hubble_trail.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/hubble_trail.asset @@ -9,7 +9,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_hst", Url = "https://www.celestrak.com/NORAD/elements/gp.php?CATNR=20580&FORMAT=kvn", Filename = "hst.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) 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 80fdcca2c4..36efd6a593 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset @@ -24,7 +24,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_iss", Url = "https://www.celestrak.com/NORAD/elements/gp.php?CATNR=25544&FORMAT=kvn", Filename = "ISS.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) local tle = asset.resource({ @@ -33,7 +33,7 @@ local tle = asset.resource({ Identifier = "satellite_tle_data_iss", Url = "https://www.celestrak.com/NORAD/elements/gp.php?CATNR=25544&FORMAT=tle", Filename = "ISS.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/military.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/military.asset index 35c2cf0fce..1098be5793 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/military.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/military.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_military", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=military&FORMAT=kvn", Filename = "military.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/other.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/other.asset index a7188dd62f..64ea9f90d9 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/other.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/other.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_other", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=other&FORMAT=kvn", Filename = "other.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/radar.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/radar.asset index 5c3f925612..75d2402b85 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/radar.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/radar.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_radar", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=radar&FORMAT=kvn", Filename = "radar.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/spacestations.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/spacestations.asset index 94ac750ee0..ad7ef07723 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/spacestations.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/spacestations.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_stations", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=stations&FORMAT=kvn", Filename = "stations.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/tiangong.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/tiangong.asset index b58a428eb1..7b0a23b77e 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/tiangong.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/tiangong.asset @@ -16,7 +16,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_tiangong", Url = "https://www.celestrak.com/NORAD/elements/gp.php?CATNR=48274&FORMAT=kvn", Filename = "Tiangong.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/tle-new.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/tle-new.asset index e7716f1b04..cd7537f716 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/tle-new.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/tle-new.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_tle-new", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=last-30-days&FORMAT=kvn", Filename = "tle-new.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/beidou.asset b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/beidou.asset index e8161cb938..dfd9306d03 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/beidou.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/beidou.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_beidou", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=beidou&FORMAT=kvn", Filename = "beidou.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/galileo.asset b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/galileo.asset index b371767419..4a905b2cdd 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/galileo.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/galileo.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_galileo", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=galileo&FORMAT=kvn", Filename = "galileo.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/glosnass.asset b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/glosnass.asset index 3348aadfba..84b6de8b2f 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/glosnass.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/glosnass.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_glo-ops", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=glo-ops&FORMAT=kvn", Filename = "glo-ops.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/gps.asset b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/gps.asset index a6a7f9f1cb..31b8578fb6 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/gps.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/gps.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_gps-ops", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=gps-ops&FORMAT=kvn", Filename = "gps-ops.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/musson.asset b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/musson.asset index 53fd23ec0b..6b688a3585 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/musson.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/musson.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_musson", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=musson&FORMAT=kvn", Filename = "musson.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/nnss.asset b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/nnss.asset index cf083e6a39..0457dafb50 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/nnss.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/nnss.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_nnss", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=nnss&FORMAT=kvn", Filename = "nnss.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/sbas.asset b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/sbas.asset index 55401243bb..a092adf1d6 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/sbas.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/sbas.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_sbas", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=sbas&FORMAT=kvn", Filename = "sbas.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/science/education.asset b/data/assets/scene/solarsystem/planets/earth/satellites/science/education.asset index 408e8b7fd5..d7567078de 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/science/education.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/science/education.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_education", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=education&FORMAT=kvn", Filename = "education.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/science/engineering.asset b/data/assets/scene/solarsystem/planets/earth/satellites/science/engineering.asset index 7d14321be1..5ee3c70cf3 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/science/engineering.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/science/engineering.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_engineering", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=engineering&FORMAT=kvn", Filename = "engineering.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/science/geodetic.asset b/data/assets/scene/solarsystem/planets/earth/satellites/science/geodetic.asset index 348418d008..656c7d6330 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/science/geodetic.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/science/geodetic.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_geodetic", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=geodetic&FORMAT=kvn", Filename = "geodetic.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/science/spaceearth.asset b/data/assets/scene/solarsystem/planets/earth/satellites/science/spaceearth.asset index 42d4b5c09c..8daedff803 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/science/spaceearth.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/science/spaceearth.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_science", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=science&FORMAT=kvn", Filename = "science.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset index 0d9664f73c..d8a9f8e2f3 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset @@ -9,7 +9,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_aqua", Url = "https://www.celestrak.com/NORAD/elements/gp.php?CATNR=27424&FORMAT=kvn", Filename = "Aqua.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/argos.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/argos.asset index 7be059f832..fd2a4bab75 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/argos.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/argos.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_argos", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=argos&FORMAT=kvn", Filename = "argos.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/dmc.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/dmc.asset index 05588ee42c..051a79b8c1 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/dmc.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/dmc.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_dmc", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=dmc&FORMAT=kvn", Filename = "dmc.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/earth_resources.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/earth_resources.asset index 4848a12932..5d23acbdb8 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/earth_resources.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/earth_resources.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_resource", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=resource&FORMAT=kvn", Filename = "resource.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/goes.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/goes.asset index a694780a81..68d2a9dd4e 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/goes.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/goes.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_goes", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=goes&FORMAT=kvn", Filename = "goes.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/noaa.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/noaa.asset index 7ff751cda9..d3e360be01 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/noaa.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/noaa.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_noaa", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=noaa&FORMAT=kvn", Filename = "noaa.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/planet.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/planet.asset index dab42495da..b28fe2cc53 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/planet.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/planet.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_planet", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=planet&FORMAT=kvn", Filename = "planet.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/sarsat.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/sarsat.asset index b988cfe526..a786fa426c 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/sarsat.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/sarsat.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_sarsat", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=sarsat&FORMAT=kvn", Filename = "sarsat.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset index cc6957477c..3094da65ec 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset @@ -9,7 +9,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_snpp", Url = "https://www.celestrak.com/NORAD/elements/gp.php?CATNR=37849&FORMAT=kvn", Filename = "SNPP.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/spire.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/spire.asset index c1c545f937..972274778a 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/spire.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/spire.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_spire", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=spire&FORMAT=kvn", Filename = "spire.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/tdrss.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/tdrss.asset index 48ae177086..e44459833c 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/tdrss.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/tdrss.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_tdrss", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=tdrss&FORMAT=kvn", Filename = "tdrss.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset index d19b20f30c..ba5fbdb877 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset @@ -9,7 +9,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_terra", Url = "https://www.celestrak.com/NORAD/elements/gp.php?CATNR=25994&FORMAT=kvn", Filename = "Terra.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/weather.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/weather.asset index 479eeee5d6..c4a0c29460 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/weather.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/weather.asset @@ -8,7 +8,7 @@ local omm = asset.resource({ Identifier = "satellite_omm_data_weather", Url = "https://www.celestrak.com/NORAD/elements/gp.php?GROUP=weather&FORMAT=kvn", Filename = "weather.txt", - SecondsUntilResync = 24 * 60 * 60 + SecondsUntilResync = openspace.time.secondsPerDay() }) diff --git a/data/assets/scene/solarsystem/sssb/c2019y4atlas.asset b/data/assets/scene/solarsystem/sssb/c2019y4atlas.asset index a9c113c9b8..3dafeab613 100644 --- a/data/assets/scene/solarsystem/sssb/c2019y4atlas.asset +++ b/data/assets/scene/solarsystem/sssb/c2019y4atlas.asset @@ -10,6 +10,9 @@ local orbit = asset.resource({ }) .. "c2019y4atlas.hrz" +local StartTime = "1950 JAN 1 00:00:00" +local EndTime = "2100 JAN 1 00:00:00" + local C2019Y4AtlasTrail = { Identifier = "C2019Y4AtlasTrail", Parent = sunTransforms.SolarSystemBarycenter.Identifier, @@ -26,10 +29,9 @@ local C2019Y4AtlasTrail = { }, Color = { 0.533333, 0.850980, 0.996078 }, EnableFade = false, - StartTime = "1950 JAN 1 0:00:00", - EndTime = "2100 JAN 1 00:00:00", - SampleInterval = 52595, -- About 14h 36m 35.5200s in seconds - TimeStampSubsampleFactor = 1 + StartTime = StartTime, + EndTime = EndTime, + SampleInterval = openspace.time.duration(StartTime, EndTime) / 90000 }, GUI = { Name = "C2019 Y4 Atlas Trail", diff --git a/src/util/time.cpp b/src/util/time.cpp index d46edef658..a6ca8e8d37 100644 --- a/src/util/time.cpp +++ b/src/util/time.cpp @@ -223,6 +223,9 @@ scripting::LuaLibrary Time::luaLibrary() { codegen::lua::CurrentApplicationTime, codegen::lua::AdvancedTime, codegen::lua::ConvertTime, + codegen::lua::Duration, + codegen::lua::SecondsPerDay, + codegen::lua::SecondsPerYear } }; } diff --git a/src/util/time_lua.inl b/src/util/time_lua.inl index a0dd915112..3a0536105a 100644 --- a/src/util/time_lua.inl +++ b/src/util/time_lua.inl @@ -22,6 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include + namespace { /** @@ -374,6 +376,36 @@ namespace { } } +/** + * Returns the number of seconds between the provided start time and end time. If the end + * time is before the start time, the return value is negative. If the start time is equal + * to the end time, the return value is 0. + * Both start and end times must be valid ISO 8601 date strings. + */ +[[codegen::luawrap]] double duration(std::string start, std::string end) { + using namespace openspace; + + const double tStart = Time::convertTime(start); + const double tEnd = Time::convertTime(end); + return tEnd - tStart; +} + +/** + * Returns the number of seconds per day where a day in this case is exactly 24 hours. + * The total number of seconds is equal to 86400. + */ +[[codegen::luawrap]] int secondsPerDay() { + return openspace::SecondsPerDay; +} + +/** + * Returns the number of seconds in a Julian year, which is equal to 31557600. + */ +[[codegen::luawrap]] int secondsPerYear() { + // We could use a call to SPICE here, but the value is a constant anyway + return openspace::SecondsPerYear; +} + #include "time_lua_codegen.cpp" } // namespace From c0f85857d464e3fe377b5019e31da51f3504bc5a Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Mon, 15 Jul 2024 08:52:22 +0200 Subject: [PATCH 02/99] "Fix" warning from hdf.asset (#3343) The "proximity" parameter does not exist in the dataset. Just addd all tha parameters for color mapping. --- data/assets/scene/digitaluniverse/hdf.asset | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/data/assets/scene/digitaluniverse/hdf.asset b/data/assets/scene/digitaluniverse/hdf.asset index 73df37d79d..68585a4aa7 100644 --- a/data/assets/scene/digitaluniverse/hdf.asset +++ b/data/assets/scene/digitaluniverse/hdf.asset @@ -32,11 +32,7 @@ local Object = { }, Coloring = { ColorMapping = { - File = ColorMap .. "hudf.cmap", - ParameterOptions = { - { Key = "proximity", Range = { 1.0, 25.0 } }, - { Key = "redshift", Range = { 0.0, 0.075 } } - } + File = ColorMap .. "hudf.cmap" } }, Unit = "Mpc", From 065d73db641ed974bd66bb382c88e97da8be6e40 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 15 Jul 2024 18:54:49 +0200 Subject: [PATCH 03/99] Add non-main dashboard as a propertyowner for a ScreenSpaceDashboard --- modules/base/rendering/screenspacedashboard.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/base/rendering/screenspacedashboard.cpp b/modules/base/rendering/screenspacedashboard.cpp index 1e32157e71..e6ad767d9a 100644 --- a/modules/base/rendering/screenspacedashboard.cpp +++ b/modules/base/rendering/screenspacedashboard.cpp @@ -92,6 +92,10 @@ ScreenSpaceDashboard::ScreenSpaceDashboard(const ghoul::Dictionary& dictionary) throw ghoul::RuntimeError("Cannot specify items when using the main dashboard"); } + if (!_useMainDashboard) { + addPropertySubOwner(_dashboard); + } + if (p.items.has_value()) { ghoul_assert(_useMainDashboard, "Cannot add items to the main dashboard"); for (const ghoul::Dictionary& item : *p.items) { From acab685178558f2f81d198ef85c6023522488894 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 16 Jul 2024 12:27:03 +0200 Subject: [PATCH 04/99] Apply coding style to Lua scripting files --- modules/gaia/scripts/filtering.lua | 166 +++-- .../globebrowsing/scripts/layer_support.lua | 703 +++++++++--------- .../globebrowsing/scripts/node_support.lua | 71 +- modules/space/scripts/spice.lua | 14 +- 4 files changed, 516 insertions(+), 438 deletions(-) diff --git a/modules/gaia/scripts/filtering.lua b/modules/gaia/scripts/filtering.lua index 6179d3acd6..8de241bd5b 100644 --- a/modules/gaia/scripts/filtering.lua +++ b/modules/gaia/scripts/filtering.lua @@ -1,102 +1,126 @@ openspace.gaia.documentation = { - { - Name = "addClippingBox", - Arguments = {{ "name", "String" },{ "size", "vec3" }, { "position", "vec3" }}, - Documentation = "Creates a clipping box for the Gaia renderable in the first argument" + { + Name = "addClippingBox", + Arguments = { + { "name", "String" }, + { "size", "vec3" }, + { "position", "vec3" } }, - { - Name = "removeClippingBox", - Arguments = {}, - Documentation = "" + Documentation = "Creates a clipping box for the Gaia renderable in the first argument" + }, + { + Name = "removeClippingBox", + Arguments = {}, + Documentation = "" + }, + { + Name = "addClippingSphere", + Arguments = { + { "name", "String" }, + { "radius", "Number" } }, - { - Name = "addClippingSphere", - Arguments = {{ "name", "String" }, { "radius", "Number" }}, - Documentation = "Creates a clipping sphere for the Gaia renderable in the first argument" - } + Documentation = "Creates a clipping sphere for the Gaia renderable in the first argument" + } } openspace.gaia.addClippingBox = function (name, size, position) - local grid_identifier = "Filtering_Box" - local kilo_parsec_in_meter = 30856775814913700000 + local grid_identifier = "Filtering_Box" + local kilo_parsec_in_meter = 30856775814913700000 - if openspace.hasSceneGraphNode(grid_identifier) then - openspace.removeSceneGraphNode(grid_identifier) - end + if openspace.hasSceneGraphNode(grid_identifier) then + openspace.removeSceneGraphNode(grid_identifier) + end - local grid = { - Identifier = grid_identifier, - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { position[1] * kilo_parsec_in_meter, position[2] * kilo_parsec_in_meter, position[3] * kilo_parsec_in_meter } - } - }, - Renderable = { - Type = "RenderableBoxGrid", - Color = { 0.6, 0.5, 0.7 }, - LineWidth = 2.0, - Size = { size[1] * kilo_parsec_in_meter, size[2] * kilo_parsec_in_meter, size[3] * kilo_parsec_in_meter} - }, - GUI = { - Name = "Filtering Grid", - Path = "/Other/Grids" + local grid = { + Identifier = grid_identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { + position[1] * kilo_parsec_in_meter, + position[2] * kilo_parsec_in_meter, + position[3] * kilo_parsec_in_meter } + } + }, + Renderable = { + Type = "RenderableBoxGrid", + Color = { 0.6, 0.5, 0.7 }, + LineWidth = 2.0, + Size = { + size[1] * kilo_parsec_in_meter, + size[2] * kilo_parsec_in_meter, + size[3] * kilo_parsec_in_meter + } + }, + GUI = { + Name = "Filtering Grid", + Path = "/Other/Grids" } + } - openspace.addSceneGraphNode(grid) + openspace.addSceneGraphNode(grid) - openspace.setPropertyValue('Scene.' .. name .. '.renderable.FilterPosX', { (position[1] - size[1] / 2) * kilo_parsec_in_meter, (position[1] + size[1] / 2) * kilo_parsec_in_meter }) - openspace.setPropertyValue('Scene.' .. name .. '.renderable.FilterPosY', { (position[2] - size[2] / 2) * kilo_parsec_in_meter, (position[2] + size[2] / 2) * kilo_parsec_in_meter }) - openspace.setPropertyValue('Scene.' .. name .. '.renderable.FilterPosZ', { (position[3] - size[3] / 2) * kilo_parsec_in_meter, (position[3] + size[3] / 2) * kilo_parsec_in_meter }) + openspace.setPropertyValue( + "Scene." .. name .. ".renderable.FilterPosX", + { (position[1] - size[1] / 2) * kilo_parsec_in_meter, (position[1] + size[1] / 2) * kilo_parsec_in_meter } + ) + openspace.setPropertyValue( + "Scene." .. name .. ".renderable.FilterPosY", + { (position[2] - size[2] / 2) * kilo_parsec_in_meter, (position[2] + size[2] / 2) * kilo_parsec_in_meter } + ) + openspace.setPropertyValue( + "Scene." .. name .. ".renderable.FilterPosZ", + { (position[3] - size[3] / 2) * kilo_parsec_in_meter, (position[3] + size[3] / 2) * kilo_parsec_in_meter } + ) end openspace.gaia.removeClippingBox = function() - local grid_identifier = "Filtering_Box" + local grid_identifier = "Filtering_Box" - if openspace.hasSceneGraphNode(grid_identifier) then - openspace.removeSceneGraphNode(grid_identifier) - end + if openspace.hasSceneGraphNode(grid_identifier) then + openspace.removeSceneGraphNode(grid_identifier) + end end openspace.gaia.addClippingSphere = function (name, radius) - local grid_identifier = "Filtering_Sphere" - local kilo_parsec_in_meter = 30856775814913700000 + local grid_identifier = "Filtering_Sphere" + local kilo_parsec_in_meter = 30856775814913700000 - if openspace.hasSceneGraphNode(grid_identifier) then - openspace.removeSceneGraphNode(grid_identifier) - end + if openspace.hasSceneGraphNode(grid_identifier) then + openspace.removeSceneGraphNode(grid_identifier) + end - local grid = { - Identifier = grid_identifier, - Transform = { - Scale = { - Type = "StaticScale", - Scale = radius * kilo_parsec_in_meter - } - }, - Renderable = { - Type = "RenderableSphericalGrid", - Color = { 0.6, 0.5, 0.7 }, - LineWidth = 1.0, - }, - GUI = { - Name = "Filtering Sphere", - Path = "/Other/Grids" - } + local grid = { + Identifier = grid_identifier, + Transform = { + Scale = { + Type = "StaticScale", + Scale = radius * kilo_parsec_in_meter + } + }, + Renderable = { + Type = "RenderableSphericalGrid", + Color = { 0.6, 0.5, 0.7 }, + LineWidth = 1.0, + }, + GUI = { + Name = "Filtering Sphere", + Path = "/Other/Grids" } + } - openspace.addSceneGraphNode(grid) + openspace.addSceneGraphNode(grid) - openspace.setPropertyValue('Scene.' .. name .. '.renderable.FilterDist', radius * kilo_parsec_in_meter) + openspace.setPropertyValue("Scene." .. name .. ".renderable.FilterDist", radius * kilo_parsec_in_meter) end openspace.gaia.removeClippingSphere = function() - local grid_identifier = "Filtering_Sphere" + local grid_identifier = "Filtering_Sphere" - if openspace.hasSceneGraphNode(grid_identifier) then - openspace.removeSceneGraphNode(grid_identifier) - end + if openspace.hasSceneGraphNode(grid_identifier) then + openspace.removeSceneGraphNode(grid_identifier) + end end diff --git a/modules/globebrowsing/scripts/layer_support.lua b/modules/globebrowsing/scripts/layer_support.lua index e779650232..c43a904941 100644 --- a/modules/globebrowsing/scripts/layer_support.lua +++ b/modules/globebrowsing/scripts/layer_support.lua @@ -1,396 +1,433 @@ openspace.globebrowsing.documentation = { - { - Name = "createTemporalGibsGdalXml", - Arguments = {{ "layerName", "String" }, { "resolution", "String" }, { "format", "String" }}, - Documentation = [[ - Creates an XML configuration for a temporal GIBS dataset to be used in - a TemporalTileprovider - ]] + { + Name = "createTemporalGibsGdalXml", + Arguments = { + { "layerName", "String" }, + { "resolution", "String" }, + { "format", "String" } }, - { - Name = "createGibsGdalXml", - Arguments = {{ "layerName", "String" }, { "date", "String" }, { "resolution", "String" }, { "format", "String" }}, - Documentation = - "Creates an XML configuration for a GIBS dataset." .. - "Arguments are: layerName, date, resolution, format." .. - "For all specifications, see " .. - "https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+Available+Imagery+Products" .. - "Usage:" .. - "openspace.globebrowsing.addLayer(" .. - "\"Earth\"," .. - "\"ColorLayers\"," .. - "{" .. - "Name = \"MODIS_Terra_Chlorophyll_A\"," .. - "FilePath = openspace.globebrowsing.createGibsGdalXml(" .. - "\"MODIS_Terra_Chlorophyll_A\"," .. - "\"2013-07-02\"," .. - "\"1km\"," .. - "\"png\"" .. - ")" .. - "}" .. - ")" + Documentation = [[ + Creates an XML configuration for a temporal GIBS dataset to be used in a + TemporalTileprovider + ]] + }, + { + Name = "createGibsGdalXml", + Arguments = { + { "layerName", "String" }, + { "date", "String" }, + { "resolution", "String" }, + { "format", "String" } }, - { - Name = "addGibsLayer", - Arguments = {{ "layer", "String" }, { "resolution", "String" }, { "format", "String" }, { "startDate", "String" }, { "endDate", "String" }}, - Documentation = "Adds a new layer from NASA GIBS to the Earth globe. Arguments " .. - "are: imagery layer name, imagery resolution, start date, end date, format. " .. - "For all specifications, see " .. - "https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+Available+Imagery+Products" .. - "Usage:" .. - "openspace.globebrowsing.addGibsLayer('AIRS_Temperature_850hPa_Night', '2km', '2013-07-15', 'Present', 'png')" + Documentation = [[ + Creates an XML configuration for a GIBS dataset. + Arguments are: layerName, date, resolution, format. + For all specifications, see + https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+Available+Imagery+Products + + Usage: + openspace.globebrowsing.addLayer( + "Earth", + "ColorLayers", + { + Name = "MODIS_Terra_Chlorophyll_A", + FilePath = openspace.globebrowsing.createGibsGdalXml( + "MODIS_Terra_Chlorophyll_A", + "2013-07-02", + "1km", + "png" + ) + } + ) + ]] + }, + { + Name = "addGibsLayer", + Arguments = { + { "layer", "String" }, + { "resolution", "String" }, + { "format", "String" }, + { "startDate", "String" }, + { "endDate", "String" } }, - { - Name = "parseInfoFile", - Arguments = {{ "file", "String" }}, - Documentation = - "Parses the passed info file and return the table with the information " .. - "provided in the info file. The return table contains the optional keys: " .. - "'Color', 'Height', 'Node', 'Location', 'Identifier'." .. - "Usage: local t = openspace.globebrowsing.parseInfoFile(file)" .. - "openspace.globebrowsing.addLayer(\"Earth\", \"ColorLayers\", t.color)" .. - "openspace.globebrowsing.addLayer(\"Earth\", \"HeightLayers\", t.height)" + Documentation = [[ + Adds a new layer from NASA GIBS to the Earth globe. Arguments are: imagery layer + name, imagery resolution, start date, end date, format. + For all specifications, see + https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+Available+Imagery+Products + Usage: + openspace.globebrowsing.addGibsLayer( + "AIRS_Temperature_850hPa_Night", "2km", "2013-07-15", "Present", "png" + ) + ]] + }, + { + Name = "parseInfoFile", + Arguments = { + { "file", "String" } }, - { - Name = "addBlendingLayersFromDirectory", - Arguments = {{ "directory", "String" }, { "nodeName", "String" }}, - Documentation = - "Retrieves all info files recursively in the directory passed as the first " .. - "argument to this function. The color and height tables retrieved from these " .. - "info files are then added to the RenderableGlobe identified by name passed " .. - "to the second argument." .. - "Usage: openspace.globebrowsing.addBlendingLayersFromDirectory(directory, \"Earth\")" + Documentation = [[ + Parses the passed info file and return the table with the information provided in + the info file. The return table contains the optional keys: + 'Color', 'Height', 'Node', 'Location', 'Identifier'. + Usage: + local t = openspace.globebrowsing.parseInfoFile(file) + openspace.globebrowsing.addLayer("Earth", "ColorLayers", t.color) + openspace.globebrowsing.addLayer("Earth", "HeightLayers", t.height) + ]] + }, + { + Name = "addBlendingLayersFromDirectory", + Arguments = { + { "directory", "String" }, + { "nodeName", "String" } }, - { - Name = "addFocusNodesFromDirectory", - Arguments = {{ "directory", "String" }, { "nodeName", "String" }}, - Documentation = - "Retrieves all info files recursively in the directory passed as the first " .. - "argument to this function. The name and location retrieved from these info " .. - "files are then used to create new SceneGraphNodes that can be used as " .. - "focus nodes. " .. - "Usage: openspace.globebrowsing.addFocusNodesFromDirectory(directory, \"Mars\")" + Documentation = [[ + Retrieves all info files recursively in the directory passed as the first argument + to this function. The color and height tables retrieved from these info files are + then added to the RenderableGlobe identified by name passed to the second argument. + Usage: + openspace.globebrowsing.addBlendingLayersFromDirectory(directory, "Earth") + ]] + }, + { + Name = "addFocusNodesFromDirectory", + Arguments = { + { "directory", "String" }, + { "nodeName", "String" } }, - { - Name = "addFocusNodeFromLatLong", - Arguments = {{ "name", "String" }, { "globeIdentifier", "String" }, { "latitude", "Number" }, { "longitude", "Number" }, { "altitude", "Number" }}, - Documentation = - "Creates a new SceneGraphNode that can be used as focus node. " .. - "Usage: openspace.globebrowsing.addFocusNodeFromLatLong(" .. - "\"Olympus Mons\", \"Mars\", -18.65, 226.2, optionalAltitude)" + Documentation = [[ + Retrieves all info files recursively in the directory passed as the first argument + to this function. The name and location retrieved from these info files are then + used to create new SceneGraphNodes that can be used as focus nodes. + Usage: + openspace.globebrowsing.addFocusNodesFromDirectory(directory, "Mars") + ]] + }, + { + Name = "addFocusNodeFromLatLong", + Arguments = { + { "name", "String" }, + { "globeIdentifier", "String" }, + { "latitude", "Number" }, + { "longitude", "Number" }, + { "altitude", "Number" } }, - { - Name = "loadWMSServersFromFile", - Arguments = {{ "filePath", "String" }}, - Documentation = - "Loads all WMS servers from the provided file and passes them to the " .. - "'openspace.globebrowsing.loadWMSCapabilities' file." - } + Documentation = [[ + Creates a new SceneGraphNode that can be used as focus node. + Usage: + openspace.globebrowsing.addFocusNodeFromLatLong( + "Olympus Mons", "Mars", -18.65, 226.2, optionalAltitude + ) + ]] + }, + { + Name = "loadWMSServersFromFile", + Arguments = { + { "filePath", "String" } + }, + Documentation = [[ + Loads all WMS servers from the provided file and passes them to the + 'openspace.globebrowsing.loadWMSCapabilities' file. + ]] + } } openspace.globebrowsing.addGibsLayer = function(layerName, resolution, format, startDate, endDate) - if endDate == 'Present' then - endDate = '' - end + if endDate == "Present" then + endDate = "" + end - local layer = { - Identifier = layerName, - Type = "TemporalTileLayer", - Mode = "Prototyped", - Prototyped = { - Time = { - Start = startDate, - End = endDate - }, - TemporalResolution = "1d", - TimeFormat = "YYYY-MM-DD", - Prototype = openspace.globebrowsing.createTemporalGibsGdalXml(layerName, resolution, format) - } + local layer = { + Identifier = layerName, + Type = "TemporalTileLayer", + Mode = "Prototyped", + Prototyped = { + Time = { + Start = startDate, + End = endDate + }, + TemporalResolution = "1d", + TimeFormat = "YYYY-MM-DD", + Prototype = openspace.globebrowsing.createTemporalGibsGdalXml(layerName, resolution, format) } + } - openspace.globebrowsing.addLayer( - 'Earth', - 'ColorLayers', - layer - ) + openspace.globebrowsing.addLayer("Earth", "ColorLayers", layer) end openspace.globebrowsing.createGibsGdalXml = function (layerName, date, resolution, format) - local tileLevel = 5 - -- These resolutions are defined by GIBS: https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers#GIBSAPIforDevelopers-Script-levelAccessviaGDAL - if resolution == "2km" then - tileLevel = 5 - elseif resolution == "1km" then - tileLevel = 6 - elseif resolution == "500m" then - tileLevel = 7 - elseif resolution == "250m" then - tileLevel = 8 - elseif resolution == "125m" then - tileLevel = 9 - elseif resolution == "62.5m" then - tileLevel = 10 - elseif resolution == "31.25m" then - tileLevel = 11 - elseif resolution == "15.625m" then - tileLevel = 12 - else - openspace.printError("Unknown resolution: " .. resolution) - return "" - end + local tileLevel = 5 + -- These resolutions are defined by GIBS: https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers#GIBSAPIforDevelopers-Script-levelAccessviaGDAL + if resolution == "2km" then + tileLevel = 5 + elseif resolution == "1km" then + tileLevel = 6 + elseif resolution == "500m" then + tileLevel = 7 + elseif resolution == "250m" then + tileLevel = 8 + elseif resolution == "125m" then + tileLevel = 9 + elseif resolution == "62.5m" then + tileLevel = 10 + elseif resolution == "31.25m" then + tileLevel = 11 + elseif resolution == "15.625m" then + tileLevel = 12 + else + openspace.printError("Unknown resolution: " .. resolution) + return "" + end - local rasterCount = 3 - if format == "jpg" then - if layerName == "ASTER_GDEM_Greyscale_Shaded_Relief" then - rasterCount = 1 - else - rasterCount = 3 - end - elseif format == "png" then - rasterCount = 4 + local rasterCount = 3 + if format == "jpg" then + if layerName == "ASTER_GDEM_Greyscale_Shaded_Relief" then + rasterCount = 1 else - openspace.printError("Unknown format \"" .. format .. "\". Use 'jpg' or 'png'") - return "" + rasterCount = 3 end + elseif format == "png" then + rasterCount = 4 + else + openspace.printError("Unknown format \"" .. format .. "\". Use 'jpg' or 'png'") + return "" + end - local gdalWmsTemplate = + local gdalWmsTemplate = "" .. - "" .. - "https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/" .. - layerName .. "/default/" .. date .. "/" .. resolution .. - "/${z}/${y}/${x}." .. format .. "" .. - "" .. - "" .. - "-180.0" .. - "90" .. - "396.0" .. - "-198" .. - "" .. tileLevel .. "" .. - "2" .. - "1" .. - "top" .. - "" .. - "EPSG:4326" .. - "512" .. - "512" .. - "" .. rasterCount .. "" .. - "true" .. - "400,204,404" .. - "true" .. - "5" .. + "" .. + "https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/" .. + layerName .. "/default/" .. date .. "/" .. resolution .. + "/${z}/${y}/${x}." .. format .. "" .. + "" .. + "" .. + "-180.0" .. + "90" .. + "396.0" .. + "-198" .. + "" .. tileLevel .. "" .. + "2" .. + "1" .. + "top" .. + "" .. + "EPSG:4326" .. + "512" .. + "512" .. + "" .. rasterCount .. "" .. + "true" .. + "400,204,404" .. + "true" .. + "5" .. "" - return gdalWmsTemplate + return gdalWmsTemplate end openspace.globebrowsing.createTemporalGibsGdalXml = function (layerName, resolution, format) - return openspace.globebrowsing.createGibsGdalXml(layerName, "${OpenSpaceTimeId}", resolution, format) + return openspace.globebrowsing.createGibsGdalXml(layerName, "${OpenSpaceTimeId}", resolution, format) end openspace.globebrowsing.parseInfoFile = function (file) - -- We are loading these values from an external info file and since we are switching - -- to a strict Lua, we need to predefine these global variables - local function declare(name) - rawset(_G, name, "") - end + -- We are loading these values from an external info file and since we are switching + -- to a strict Lua, we need to predefine these global variables + local function declare(name) + rawset(_G, name, "") + end - declare("Name") - declare("Identifier") - declare("Description") - declare("ColorFile") - declare("HeightFile") - declare("Location") - declare("ZIndex") - declare("BlendMode") + declare("Name") + declare("Identifier") + declare("Description") + declare("ColorFile") + declare("HeightFile") + declare("Location") + declare("ZIndex") + declare("BlendMode") - local dir = openspace.directoryForPath(file) - local file_func, error = loadfile(file) - if file_func then - file_func() - else - openspace.printError('Error loading file "' .. file .. '": '.. error) - return nil - end + local dir = openspace.directoryForPath(file) + local file_func, error = loadfile(file) + if file_func then + file_func() + else + openspace.printError('Error loading file "' .. file .. '": '.. error) + return nil + end - -- Hoist the global variables into local space - local Name = rawget(_G, "Name") - local Identifier = rawget(_G, "Identifier") - local Description = rawget(_G, "Description") - local ColorFile = rawget(_G, "ColorFile") - local HeightFile = rawget(_G, "HeightFile") - local Location = rawget(_G, "Location") - local ZIndex = rawget(_G, "ZIndex") - local BlendMode = rawget(_G, "BlendMode") + -- Hoist the global variables into local space + local Name = rawget(_G, "Name") + local Identifier = rawget(_G, "Identifier") + local Description = rawget(_G, "Description") + local ColorFile = rawget(_G, "ColorFile") + local HeightFile = rawget(_G, "HeightFile") + local Location = rawget(_G, "Location") + local ZIndex = rawget(_G, "ZIndex") + local BlendMode = rawget(_G, "BlendMode") - -- Now we can start - local name = Name or Identifier - local identifier = Identifier - local zIndex = ZIndex - local blendMode = BlendMode - if zIndex == "" then - zIndex = nil - end - if blendMode == "" then - -- Color blending is the default for .info files if nothing else is specified - blendMode = "Color" - end + -- Now we can start + local name = Name or Identifier + local identifier = Identifier + local zIndex = ZIndex + local blendMode = BlendMode + if zIndex == "" then + zIndex = nil + end + if blendMode == "" then + -- Color blending is the default for .info files if nothing else is specified + blendMode = "Color" + end - if identifier == "" then - openspace.printError('Error loading file "' .. file .. '": No "Identifier" found') - return nil - end + if identifier == "" then + openspace.printError('Error loading file "' .. file .. '": No "Identifier" found') + return nil + end - local color = nil - if ColorFile and ColorFile ~= "" then - color = { - Identifier = identifier, - Name = name, - Description = Description or "", - FilePath = dir .. '/' .. ColorFile, - BlendMode = blendMode, - ZIndex = zIndex - } - end - - local height = nil - if HeightFile and HeightFile ~= "" then - height = { - Identifier = identifier, - Name = name, - Description = Description or "", - FilePath = dir .. '/' .. HeightFile, - TilePixelSize = 65, - ZIndex = zIndex - } - end - - local location = nil - if Location then - location = Location - end - - return { - Color = color, - Height = height, - Name = name, - Location = location, - Identifier = identifier + local color = nil + if ColorFile and ColorFile ~= "" then + color = { + Identifier = identifier, + Name = name, + Description = Description or "", + FilePath = dir .. "/" .. ColorFile, + BlendMode = blendMode, + ZIndex = zIndex } + end + + local height = nil + if HeightFile and HeightFile ~= "" then + height = { + Identifier = identifier, + Name = name, + Description = Description or "", + FilePath = dir .. "/" .. HeightFile, + TilePixelSize = 65, + ZIndex = zIndex + } + end + + local location = nil + if Location then + location = Location + end + + return { + Color = color, + Height = height, + Name = name, + Location = location, + Identifier = identifier + } end openspace.globebrowsing.addBlendingLayersFromDirectory = function (dir, node_name) - local function ends_with(str, ending) - return ending == '' or str:sub(-#ending) == ending - end - - -- Walking the directory with an empty string will cause the current working directory - -- to be walked recursively. This is probably not what the users expects (and it is - -- also one of the default values in the globebrowsing customization script), so we - -- ignore the empty string here - - if dir == nil or dir == '' then - openspace.printError("No directory specified") - return - end - if node_name == nil or node_name == '' then - openspace.printError("No node name specified") - return - end - - local files = openspace.walkDirectoryFiles(dir, true, true) - - for _, file in pairs(files) do - if file and file:find('.info') and ends_with(file, '.info') then - local t = openspace.globebrowsing.parseInfoFile(file) - - if t and t.Color then - openspace.printInfo("Adding color layer '" .. t.Color["Identifier"] .. "'") - openspace.globebrowsing.addLayer(node_name, "ColorLayers", t.Color) - end - if t and t.Height then - openspace.printInfo("Adding height layer '" .. t.Height["Identifier"] .. "'") - openspace.globebrowsing.addLayer(node_name, "HeightLayers", t.Height) - end - end + local function ends_with(str, ending) + return ending == "" or str:sub(-#ending) == ending + end + + -- Walking the directory with an empty string will cause the current working directory + -- to be walked recursively. This is probably not what the users expects (and it is + -- also one of the default values in the globebrowsing customization script), so we + -- ignore the empty string here + + if dir == nil or dir == "" then + openspace.printError("No directory specified") + return + end + if node_name == nil or node_name == "" then + openspace.printError("No node name specified") + return + end + + local files = openspace.walkDirectoryFiles(dir, true, true) + + for _, file in pairs(files) do + if file and file:find(".info") and ends_with(file, ".info") then + local t = openspace.globebrowsing.parseInfoFile(file) + + if t and t.Color then + openspace.printInfo("Adding color layer '" .. t.Color["Identifier"] .. "'") + openspace.globebrowsing.addLayer(node_name, "ColorLayers", t.Color) + end + if t and t.Height then + openspace.printInfo("Adding height layer '" .. t.Height["Identifier"] .. "'") + openspace.globebrowsing.addLayer(node_name, "HeightLayers", t.Height) + end end + end end openspace.globebrowsing.addFocusNodesFromDirectory = function (dir, node_name) - local files = openspace.walkDirectoryFiles(dir, true, true) + local files = openspace.walkDirectoryFiles(dir, true, true) - for _, file in pairs(files) do - if file and file:find('.info') then - local t = openspace.globebrowsing.parseInfoFile(file) + for _, file in pairs(files) do + if file and file:find(".info") then + local t = openspace.globebrowsing.parseInfoFile(file) - if node_name and t and t.Location then - openspace.printInfo("Creating focus node for '" .. node_name .. "'") + if node_name and t and t.Location then + openspace.printInfo("Creating focus node for '" .. node_name .. "'") - local lat = t.Location.Center[1] - local long = t.Location.Center[2] + local lat = t.Location.Center[1] + local long = t.Location.Center[2] - local identifier = node_name .. " - " .. t.Identifier - local name = node_name .. " - " .. t.Name + local identifier = node_name .. " - " .. t.Identifier + local name = node_name .. " - " .. t.Name - openspace.addSceneGraphNode({ - Identifier = identifier, - Parent = node_name, - Transform = { - Translation = { - Type = "GlobeTranslation", - Globe = node_name, - Latitude = lat, - Longitude = long, - UseHeightmap = true - } - }, - GUI = { - Path = "/Other/Bookmarks", - Name = name - } - }) - end - end + openspace.addSceneGraphNode({ + Identifier = identifier, + Parent = node_name, + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = node_name, + Latitude = lat, + Longitude = long, + UseHeightmap = true + } + }, + GUI = { + Path = "/Other/Bookmarks", + Name = name + } + }) + end end + end end openspace.globebrowsing.addFocusNodeFromLatLong = function (name, globe_identifier, lat, long, altitude) - altitude = altitude or 0; + altitude = altitude or 0; - local identifier = globe_identifier .. "-" .. name + local identifier = globe_identifier .. "-" .. name - openspace.addSceneGraphNode({ - Identifier = identifier, - Parent = globe_identifier, - Transform = { - Translation = { - Type = "GlobeTranslation", - Globe = globe_identifier, - Latitude = lat, - Longitude = long, - FixedAltitude = altitude - } - }, - GUI = { - Path = "/Other/Bookmarks", - Name = identifier - } - }) + openspace.addSceneGraphNode({ + Identifier = identifier, + Parent = globe_identifier, + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = globe_identifier, + Latitude = lat, + Longitude = long, + FixedAltitude = altitude + } + }, + GUI = { + Path = "/Other/Bookmarks", + Name = identifier + } + }) - return identifier + return identifier end openspace.globebrowsing.loadWMSServersFromFile = function (file_path) - local servers = dofile(file_path) + local servers = dofile(file_path) - for key, value in pairs(servers) do - local globe = key - for _,val in pairs(value) do - openspace.globebrowsing.loadWMSCapabilities( - val["Name"], - globe, - val["URL"] - ) - end + for key, value in pairs(servers) do + local globe = key + for _,val in pairs(value) do + openspace.globebrowsing.loadWMSCapabilities(val["Name"], globe, val["URL"] ) end + end end diff --git a/modules/globebrowsing/scripts/node_support.lua b/modules/globebrowsing/scripts/node_support.lua index d0154a160f..937798766b 100644 --- a/modules/globebrowsing/scripts/node_support.lua +++ b/modules/globebrowsing/scripts/node_support.lua @@ -1,35 +1,50 @@ openspace.globebrowsing.documentation = { { Name = "setNodePosition", - Arguments = {{ "nodeIdentifer", "String" }, { "globeIdentifier", "String" }, { "latitude", "Number" }, { "longitude", "Number" }, { "altitude", "Number" }}, - Documentation = - "Sets the position of a SceneGraphNode that has GlobeTranslation/GlobeRotations. " .. - "Usage: openspace.globebrowsing.setNodePosition(" .. - "\"Scale_StatueOfLiberty\", \"Earth\", 40.000, -117.5, optionalAltitude)" + Arguments = { + { "nodeIdentifer", "String" }, + { "globeIdentifier", "String" }, + { "latitude", "Number" }, + { "longitude", "Number" }, + { "altitude", "Number" } + }, + Documentation = [[ + Sets the position of a SceneGraphNode that has GlobeTranslation/GlobeRotations. + Usage: + openspace.globebrowsing.setNodePosition( + "Scale_StatueOfLiberty", "Earth", 40.000, -117.5, optionalAltitude + ) + ]] }, { Name = "setNodePositionFromCamera", - Arguments = {{ "nodeIdentifer", "String" }, { "useAltitude", "Boolean" }}, - Documentation = - "Sets the position of a SceneGraphNode that has GlobeTranslation/GlobeRotations" .. - " to match the camera. Only uses camera position not rotation. If useAltitude" .. - " is true, then the position will also be updated to the camera's altitude." .. - "Usage: openspace.globebrowsing.setNodePositionFromCamera(" .. - "\"Scale_StatueOfLiberty\", optionalUseAltitude)" + Arguments = { + { "nodeIdentifer", "String" }, + { "useAltitude", "Boolean" } + }, + Documentation = [[ + Sets the position of a SceneGraphNode that has GlobeTranslation/GlobeRotations to + match the camera. Only uses camera position not rotation. If useAltitude is true, + then the position will also be updated to the camera's altitude. + Usage: + openspace.globebrowsing.setNodePositionFromCamera( + "Scale_StatueOfLiberty", optionalUseAltitude + ) + ]] } } openspace.globebrowsing.setNodePosition = function (node_identifer, globe_identifier, lat, lon, altitude) openspace.setParent(node_identifer, globe_identifier) - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Translation.Globe', globe_identifier); - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Translation.Latitude', lat); - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Translation.Longitude', lon); - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Rotation.Globe', globe_identifier); - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Rotation.Latitude', lat); - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Rotation.Longitude', lon); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Translation.Globe", globe_identifier); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Translation.Latitude", lat); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Translation.Longitude", lon); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Rotation.Globe", globe_identifier); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Rotation.Latitude", lat); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Rotation.Longitude", lon); if (altitude) then - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Translation.Altitude', altitude); - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Translation.Altitude', altitude); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Translation.Altitude", altitude); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Translation.Altitude", altitude); end end @@ -37,14 +52,14 @@ openspace.globebrowsing.setNodePositionFromCamera = function (node_identifer, us local lat, lon, alt = openspace.globebrowsing.geoPositionForCamera(); local camera = openspace.navigation.getNavigationState(); openspace.setParent(node_identifer, camera.Anchor) - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Translation.Globe', camera.Anchor); - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Translation.Latitude', lat); - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Translation.Longitude', lon); - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Rotation.Globe', camera.Anchor); - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Rotation.Latitude', lat); - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Rotation.Longitude', lon); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Translation.Globe", camera.Anchor); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Translation.Latitude", lat); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Translation.Longitude", lon); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Rotation.Globe", camera.Anchor); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Rotation.Latitude", lat); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Rotation.Longitude", lon); if (use_altitude) then - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Translation.Altitude', alt); - openspace.setPropertyValueSingle('Scene.' .. node_identifer .. '.Translation.Altitude', alt); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Translation.Altitude", alt); + openspace.setPropertyValueSingle("Scene." .. node_identifer .. ".Translation.Altitude", alt); end end diff --git a/modules/space/scripts/spice.lua b/modules/space/scripts/spice.lua index d0d53e918f..09c12aa05d 100644 --- a/modules/space/scripts/spice.lua +++ b/modules/space/scripts/spice.lua @@ -1,15 +1,17 @@ openspace.space.documentation = { { Name = "tleToSpiceTranslation", - Arguments = {{ "tlePath", "String" }}, + Arguments = { + { "tlePath", "String" } + }, Return = "{ Translation, SpiceKernel }", Documentation = [[ - Takes the provided TLE file, converts it into a SPICE kernel and returns a - SpiceTranslation instance that can be used to access the information in the TLE - file using SPICE's superior integral solver. + Takes the provided TLE file, converts it into a SPICE kernel and returns a + SpiceTranslation instance that can be used to access the information in the TLE + file using SPICE's superior integral solver. - The second return value is the spice kernel that should be loaded and unloaded by - whoever called this function. + The second return value is the spice kernel that should be loaded and unloaded by + whoever called this function. ]] } } From f10a2b1a22866b386d9c15b0ee9a2c169031ed23 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 16 Jul 2024 12:46:15 +0200 Subject: [PATCH 05/99] Add a new Lua function to create debug axes for the current focus node --- modules/debugging/debuggingmodule.cpp | 8 ++++-- modules/debugging/scripts/axes.lua | 35 +++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 modules/debugging/scripts/axes.lua diff --git a/modules/debugging/debuggingmodule.cpp b/modules/debugging/debuggingmodule.cpp index 87d81a8663..93add8f04f 100644 --- a/modules/debugging/debuggingmodule.cpp +++ b/modules/debugging/debuggingmodule.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -63,13 +64,16 @@ std::vector DebuggingModule::documentations() cons scripting::LuaLibrary DebuggingModule::luaLibrary() const { return { - "debugging", - { + .name = "debugging", + .functions = { codegen::lua::RenderCameraPath, codegen::lua::RemoveRenderedCameraPath, codegen::lua::RenderPathControlPoints, codegen::lua::RemovePathControlPoints, codegen::lua::AddCartesianAxes + }, + .scripts = { + absPath("${MODULE_DEBUGGING}/scripts/axes.lua") } }; } diff --git a/modules/debugging/scripts/axes.lua b/modules/debugging/scripts/axes.lua new file mode 100644 index 0000000000..4fa5dac1f1 --- /dev/null +++ b/modules/debugging/scripts/axes.lua @@ -0,0 +1,35 @@ +openspace.debugging.documentation = { + { + Name = "createCoordinateAxes", + Arguments = {}, + Documentation = [[ + Creates a new scene graph node that show the coordinate system used for the + currently selected focus node. + ]] + } +} + +openspace.debugging.createCoordinateAxes = function () + local anchor = openspace.navigation.getNavigationState().Anchor + local radius = openspace.propertyValue("Scene." .. anchor .. ".EvaluatedInteractionSphere") + + local node = { + Identifier = anchor .. "_DebugAxes", + Parent = anchor, + Transform = { + Scale = { + Type = "StaticScale", + Scale = radius * 2.5 + } + }, + Renderable = { + Type = "RenderableCartesianAxes" + }, + GUI = { + Name = anchor .. " (Debug Axes)", + Path = openspace.propertyValue("Scene." .. anchor .. ".GuiPath") + } + } + + openspace.addSceneGraphNode(node) +end From cca2f7e272d2cdbd8f4223603becb02dbed90392 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Wed, 17 Jul 2024 09:54:59 +0200 Subject: [PATCH 06/99] Add possiblity to sort SGNs in GUI based on numerical value (#3340) * Add possiblity to sort SGNs in GUI based on numerical value And apply to grids * Fix mistake in docs * Apply suggestions from code review Co-authored-by: Ylva Selling * Rename Order -> Ordering and remove unused getter functions * Update GUI hash to match the UI changes --------- Co-authored-by: Ylva Selling --- data/assets/scene/digitaluniverse/grids.asset | 39 ++++++++++++------- data/assets/util/webgui.asset | 2 +- include/openspace/scene/scenegraphnode.h | 6 ++- src/scene/scenegraphnode.cpp | 35 +++++++++++++++++ 4 files changed, 66 insertions(+), 16 deletions(-) diff --git a/data/assets/scene/digitaluniverse/grids.asset b/data/assets/scene/digitaluniverse/grids.asset index 56ae14703a..c0b5341290 100644 --- a/data/assets/scene/digitaluniverse/grids.asset +++ b/data/assets/scene/digitaluniverse/grids.asset @@ -270,7 +270,8 @@ local Plane1lh = { }, GUI = { Name = "1lh Grid", - Path = "/Other/Grids" + Path = "/Other/Grids", + OrderingNumber = LightHour } } @@ -301,7 +302,8 @@ local Plane1ld = { }, GUI = { Name = "1ld Grid", - Path = "/Other/Grids" + Path = "/Other/Grids", + OrderingNumber = LightDay } } @@ -332,7 +334,8 @@ local Plane1lm = { }, GUI = { Name = "1lm Grid", - Path = "/Other/Grids" + Path = "/Other/Grids", + OrderingNumber = LightMonth } } @@ -363,7 +366,8 @@ local Plane1ly = { }, GUI = { Name = "1ly Grid", - Path = "/Other/Grids" + Path = "/Other/Grids", + OrderingNumber = LightYear } } @@ -394,7 +398,8 @@ local Plane10ly = { }, GUI = { Name = "10ly Grid", - Path = "/Other/Grids" + Path = "/Other/Grids", + OrderingNumber = 10 * LightYear } } @@ -425,7 +430,8 @@ local Plane100ly = { }, GUI = { Name = "100ly Grid", - Path = "/Other/Grids" + Path = "/Other/Grids", + OrderingNumber = 100 * LightYear } } @@ -456,7 +462,8 @@ local Plane1kly = { }, GUI = { Name = "1kly Grid", - Path = "/Other/Grids" + Path = "/Other/Grids", + OrderingNumber = 1000 * LightYear } } @@ -487,7 +494,8 @@ local Plane10kly = { }, GUI = { Name = "10kly Grid", - Path = "/Other/Grids" + Path = "/Other/Grids", + OrderingNumber = 10000 * LightYear } } @@ -513,7 +521,8 @@ local Plane100kly = { }, GUI = { Name = "100kly Grid", - Path = "/Other/Grids" + Path = "/Other/Grids", + OrderingNumber = 100000 * LightYear } } @@ -539,7 +548,8 @@ local Plane1Mly = { }, GUI = { Name = "1Mly Grid", - Path = "/Other/Grids" + Path = "/Other/Grids", + OrderingNumber = 1E6 * LightYear } } @@ -565,7 +575,8 @@ local Plane10Mly = { }, GUI = { Name = "10Mly Grid", - Path = "/Other/Grids" + Path = "/Other/Grids", + OrderingNumber = 10E6 * LightYear } } @@ -591,7 +602,8 @@ local Plane100Mly = { }, GUI = { Name = "100Mly Grid", - Path = "/Other/Grids" + Path = "/Other/Grids", + OrderingNumber = 100E6 * LightYear } } @@ -617,7 +629,8 @@ local Plane20Gly = { }, GUI = { Name = "20Gly Grid", - Path = "/Other/Grids" + Path = "/Other/Grids", + OrderingNumber = 20E9 * LightYear } } diff --git a/data/assets/util/webgui.asset b/data/assets/util/webgui.asset index 3ee09e3a7c..36dae8ce95 100644 --- a/data/assets/util/webgui.asset +++ b/data/assets/util/webgui.asset @@ -4,7 +4,7 @@ local guiCustomization = asset.require("customization/gui") -- Select which commit hashes to use for the frontend and backend -local frontendHash = "67262b3edb3c33580d73e0bb5a61a0321a0b218e" +local frontendHash = "654c79e7f30e61249b93be509758ac675022e5f3" local frontend = asset.resource({ Identifier = "WebGuiFrontend", diff --git a/include/openspace/scene/scenegraphnode.h b/include/openspace/scene/scenegraphnode.h index fbd426ab14..edb3a9558f 100644 --- a/include/openspace/scene/scenegraphnode.h +++ b/include/openspace/scene/scenegraphnode.h @@ -170,15 +170,17 @@ private: std::vector _onRecedeAction; std::vector _onExitAction; + ghoul::mm_unique_ptr _renderable; + // If this value is 'true' GUIs are asked to hide this node from collections, as it // might be a node that is not very interesting (for example barycenters) properties::BoolProperty _guiHidden; - ghoul::mm_unique_ptr _renderable; - properties::StringProperty _guiPath; properties::StringProperty _guiDisplayName; properties::StringProperty _guiDescription; + properties::FloatProperty _guiOrderingNumber; + properties::BoolProperty _useGuiOrdering; // Transformation defined by translation, rotation and scale struct { diff --git a/src/scene/scenegraphnode.cpp b/src/scene/scenegraphnode.cpp index 9c72936bb1..55f8064813 100644 --- a/src/scene/scenegraphnode.cpp +++ b/src/scene/scenegraphnode.cpp @@ -175,6 +175,23 @@ namespace { openspace::properties::Property::Visibility::Hidden }; + constexpr openspace::properties::Property::PropertyInfo GuiOrderInfo = { + "GuiOrderingNumber", + "Gui Ordering Number", + "This is an optional numerical value that will affect the sorting of this scene " + "graph node in relation to its neighbors in the GUI. Nodes with the same value " + "will be sorted alphabetically.", + openspace::properties::Property::Visibility::Hidden + }; + + constexpr openspace::properties::Property::PropertyInfo UseGuiOrderInfo = { + "UseGuiOrdering", + "Use Gui Ordering", + "If true, use the 'GuiOrderingNumber' to place this scene graph node in a " + "sorted way in relation to its neighbors in the GUI", + openspace::properties::Property::Visibility::Hidden + }; + constexpr openspace::properties::Property::PropertyInfo ShowDebugSphereInfo = { "ShowDebugSphere", "Show Debug Sphere", @@ -309,6 +326,15 @@ namespace { // scene graph node. This is most useful to trim collective lists of nodes and // not display, for example, barycenters std::optional hidden; + + // If this value is specified, the scene graph node will be ordered in + // relation to its neighbors in the GUI based on this value, so that nodes + // with a higher value appear later in the list. Scene graph nodes with the + // same value will be sorted alphabetically. + // + // The nodes without a given value will be placed at the bottom of the list + // and sorted alphabetically. + std::optional orderingNumber; }; // Additional information that is passed to GUI applications. These are all hints // and do not have any impact on the actual function of the scene graph node @@ -362,6 +388,11 @@ ghoul::mm_unique_ptr SceneGraphNode::createFromDictionary( } result->_guiPath = *p.gui->path; } + + result->_useGuiOrdering = p.gui->orderingNumber.has_value(); + if (p.gui->orderingNumber.has_value()) { + result->_guiOrderingNumber = *p.gui->orderingNumber; + } } result->_boundingSphere = p.boundingSphere.value_or(result->_boundingSphere); @@ -512,6 +543,8 @@ SceneGraphNode::SceneGraphNode() , _guiPath(GuiPathInfo, "/") , _guiDisplayName(GuiNameInfo) , _guiDescription(GuiDescriptionInfo) + , _guiOrderingNumber(GuiOrderInfo, 0.f) + , _useGuiOrdering(UseGuiOrderInfo, false) , _transform { ghoul::mm_unique_ptr( global::memoryManager->PersistentMemory.alloc() @@ -593,6 +626,8 @@ SceneGraphNode::SceneGraphNode() addProperty(_guiDescription); addProperty(_guiHidden); addProperty(_guiPath); + addProperty(_guiOrderingNumber); + addProperty(_useGuiOrdering); } SceneGraphNode::~SceneGraphNode() {} From babbb4f97c37c68aa26e77b7917180cde2fc2153 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Wed, 17 Jul 2024 11:25:26 +0200 Subject: [PATCH 07/99] 2024 Digital Universe Data Update (#3335) * Update 2dF.asset * Changes to the filename metadata, as wekll as the description. * 2024 DU updates. * Apply suggestions from code review Co-authored-by: Alexander Bock Apply suggestions from code review * Changes to the asset descriptions, the GUI path, and some of the settings. * Fixed minor error in a variable name. * Wrote the individual descriptions for each asset. * Adjusted the size (brightness). * Update identifier to one that works * Update asset versions and correctly format asset files * Reset exoplanet rings size To make them visible when viewed further away, e..g at the distance of the radiosphere, and make the Kepler FoV more apparent * Clean up scale variables * Line-break long descriptions As long as we expect users to manually edit files, they need to be readable * Remove letters that sorts the grids by size * Split allsky into two assets Remove asset that was split in two and update DU meta asset * Replace dwarfs texture with generic point texture resource * Remove all DU version comments, to reduce "noise" These would be confusing to our users * Some final cleanup * Remove commented radii * Local Universe -> Nearby Surveys * Remove asset versions * Apply suggestions from code review Co-authored-by: Malin E Co-authored-by: Alexander Bock * Remove background setting (non-existing) for spheres * Rmeove commented out lines in star orbits asset They are confusing, and the label file they refer to does not exist * Apply suggestions from code review * Fix some missing line breaks * Update sync identifiers to match updates in BigBang PR * Reuse point textures from the same resource instead of having one copy per dataset The texture used is the same * Set brown dwarfs dataset version to 1 * Update bookmarks file with updated star poistions --------- Co-authored-by: Brian Abbott <80659386+brianpatrick@users.noreply.github.com> Co-authored-by: brianpatrick Co-authored-by: Malin E Co-authored-by: Alexander Bock --- data/assets/base.asset | 15 +- data/assets/global/openspacebookmarks.asset | 2 +- data/assets/nightsky/altaz.asset | 11 +- .../assets/nightsky/cardinal_directions.asset | 5 +- data/assets/nightsky/ecliptic_band.asset | 16 +- data/assets/nightsky/equatorial_band.asset | 12 +- data/assets/nightsky/galactic_band.asset | 20 +- data/assets/nightsky/light_pollution.asset | 3 +- data/assets/nightsky/meridian.asset | 10 +- data/assets/nightsky/nightsky.asset | 1 + data/assets/nightsky/planets.asset | 11 +- data/assets/nightsky/zenith.asset | 5 +- data/assets/scene/digitaluniverse/2dF.asset | 29 +- data/assets/scene/digitaluniverse/2mass.asset | 22 +- data/assets/scene/digitaluniverse/6dF.asset | 27 +- data/assets/scene/digitaluniverse/abell.asset | 33 +- .../allsky_hydrogenalpha.asset | 67 +++++ .../digitaluniverse/allsky_visible.asset | 59 ++++ .../digitaluniverse/alternatestarlabels.asset | 22 +- .../digitaluniverse/backgroundradiation.asset | 123 ++++---- .../scene/digitaluniverse/brown_dwarfs.asset | 79 +++++ .../digitaluniverse/constellationbounds.asset | 11 +- .../digitaluniverse/constellations.asset | 56 +--- .../scene/digitaluniverse/deepsky.asset | 4 +- .../digitaluniverse/digitaluniverse.asset | 20 +- .../assets/scene/digitaluniverse/dwarfs.asset | 91 ------ .../scene/digitaluniverse/exoplanets.asset | 23 +- .../exoplanets_candidates.asset | 36 ++- .../{clusters.asset => galaxy_clusters.asset} | 16 +- .../{groups.asset => galaxy_groups.asset} | 15 +- .../digitaluniverse/globularclusters.asset | 41 +-- data/assets/scene/digitaluniverse/grids.asset | 281 +++++++++--------- .../scene/digitaluniverse/h2regions.asset | 29 +- ...ldwarfs.asset => local_group_dwarfs.asset} | 32 +- .../scene/digitaluniverse/milkyway.asset | 20 +- .../digitaluniverse/milkyway_arm_labels.asset | 38 +-- .../digitaluniverse/milkyway_label.asset | 15 +- .../digitaluniverse/milkyway_sphere.asset | 57 ---- .../digitaluniverse/obassociations.asset | 24 +- .../scene/digitaluniverse/oort_cloud.asset | 72 +++++ .../scene/digitaluniverse/openclusters.asset | 30 +- .../digitaluniverse/planetarynebulae.asset | 32 +- .../scene/digitaluniverse/pulsars.asset | 39 ++- .../scene/digitaluniverse/quasars.asset | 34 +-- data/assets/scene/digitaluniverse/sdss.asset | 45 ++- .../digitaluniverse/star_uncertainty.asset | 65 ++++ .../scene/digitaluniverse/starlabels.asset | 11 +- .../scene/digitaluniverse/starorbits.asset | 66 ++-- data/assets/scene/digitaluniverse/stars.asset | 26 +- .../scene/digitaluniverse/superclusters.asset | 24 +- .../digitaluniverse/supernovaremnants.asset | 26 +- data/assets/scene/digitaluniverse/tully.asset | 51 ++-- data/assets/scene/digitaluniverse/voids.asset | 22 +- .../scene/digitaluniverse/white_dwarfs.asset | 67 +++++ .../constellations/constellation_art.asset | 2 +- data/assets/scene/milkyway/milkyway/eso.asset | 3 +- .../scene/milkyway/milkyway/volume.asset | 2 +- 57 files changed, 1059 insertions(+), 939 deletions(-) create mode 100644 data/assets/scene/digitaluniverse/allsky_hydrogenalpha.asset create mode 100644 data/assets/scene/digitaluniverse/allsky_visible.asset create mode 100644 data/assets/scene/digitaluniverse/brown_dwarfs.asset delete mode 100644 data/assets/scene/digitaluniverse/dwarfs.asset rename data/assets/scene/digitaluniverse/{clusters.asset => galaxy_clusters.asset} (70%) rename data/assets/scene/digitaluniverse/{groups.asset => galaxy_groups.asset} (72%) rename data/assets/scene/digitaluniverse/{localdwarfs.asset => local_group_dwarfs.asset} (55%) delete mode 100644 data/assets/scene/digitaluniverse/milkyway_sphere.asset create mode 100644 data/assets/scene/digitaluniverse/oort_cloud.asset create mode 100644 data/assets/scene/digitaluniverse/star_uncertainty.asset create mode 100644 data/assets/scene/digitaluniverse/white_dwarfs.asset diff --git a/data/assets/base.asset b/data/assets/base.asset index 3f07199c09..ff5967475c 100644 --- a/data/assets/base.asset +++ b/data/assets/base.asset @@ -42,29 +42,31 @@ asset.require("scene/digitaluniverse/2dF") asset.require("scene/digitaluniverse/2mass") asset.require("scene/digitaluniverse/6dF") asset.require("scene/digitaluniverse/abell") +asset.require("scene/digitaluniverse/allsky_hydrogenalpha") +asset.require("scene/digitaluniverse/allsky_visible") asset.require("scene/digitaluniverse/alternatestarlabels") asset.require("scene/digitaluniverse/backgroundradiation") -asset.require("scene/digitaluniverse/clusters") +asset.require("scene/digitaluniverse/brown_dwarfs") +asset.require("scene/digitaluniverse/galaxy_clusters") asset.require("scene/digitaluniverse/constellationbounds") asset.require("scene/digitaluniverse/constellations") -asset.require("scene/digitaluniverse/deepsky") -asset.require("scene/digitaluniverse/dwarfs") asset.require("scene/digitaluniverse/exoplanets") asset.require("scene/digitaluniverse/exoplanets_candidates") asset.require("scene/digitaluniverse/globularclusters") asset.require("scene/digitaluniverse/grids") -asset.require("scene/digitaluniverse/groups") +asset.require("scene/digitaluniverse/galaxy_groups") asset.require("scene/digitaluniverse/h2regions") -asset.require("scene/digitaluniverse/localdwarfs") +asset.require("scene/digitaluniverse/local_group_dwarfs") asset.require("scene/digitaluniverse/milkyway") asset.require("scene/digitaluniverse/milkyway_arm_labels") asset.require("scene/digitaluniverse/milkyway_label") -asset.require("scene/digitaluniverse/milkyway_sphere") asset.require("scene/digitaluniverse/obassociations") +asset.require("scene/digitaluniverse/oort_cloud") asset.require("scene/digitaluniverse/openclusters") asset.require("scene/digitaluniverse/planetarynebulae") asset.require("scene/digitaluniverse/pulsars") asset.require("scene/digitaluniverse/quasars") +asset.require("scene/digitaluniverse/star_uncertainty") asset.require("scene/digitaluniverse/starlabels") asset.require("scene/digitaluniverse/starorbits") asset.require("scene/digitaluniverse/stars") @@ -72,6 +74,7 @@ asset.require("scene/digitaluniverse/superclusters") asset.require("scene/digitaluniverse/supernovaremnants") asset.require("scene/digitaluniverse/tully") asset.require("scene/digitaluniverse/voids") +asset.require("scene/digitaluniverse/white_dwarfs") asset.require("nightsky/nightsky") asset.require("customization/globebrowsing") diff --git a/data/assets/global/openspacebookmarks.asset b/data/assets/global/openspacebookmarks.asset index d266a22610..5cc6ec1214 100644 --- a/data/assets/global/openspacebookmarks.asset +++ b/data/assets/global/openspacebookmarks.asset @@ -1,6 +1,6 @@ local bookmarkHelper = asset.require("util/generate_bookmarks") -local dataProvider = "http://data.openspaceproject.com/files/bookmarks/v2/bookmarks.csv" +local dataProvider = "http://data.openspaceproject.com/files/bookmarks/v3/bookmarks.csv" local bookmarksCSV = asset.resource({ Identifier = "openspace_bookmarks", diff --git a/data/assets/nightsky/altaz.asset b/data/assets/nightsky/altaz.asset index 6a2fd04120..9c6fe16962 100644 --- a/data/assets/nightsky/altaz.asset +++ b/data/assets/nightsky/altaz.asset @@ -25,8 +25,8 @@ local AltAzGridPosition = { } }, GUI = { - Name = "Altitude/Azimuth Grid Position", - Path = "/Other/Night Sky", + Name = "Altitude-Azimuth Grid Position", + Path = "/Night Sky/Coordinate Systems/Altitude-Azimuth", Hidden = true } } @@ -48,17 +48,17 @@ local AltAzGrid = { Type = "RenderableSphericalGrid", Enabled = asset.enabled, Opacity = 0.8, - Color = { 0.4, 0.8, 0.4 }, + Color = { 0.2, 0.4, 0.2 }, LineWidth = 2.0, RenderBinMode = "PostDeferredTransparent" }, GUI = { - Name = "Altitude/Azimuth Grid", + Name = "Altitude-Azimuth Grid", Description = [[A local Altitude/Azimuth grid centered around your position on a planetary surface. The grid can be toggled, hidden or shown using the accompanying actions in the actions panel, under "Night Sky". Use these actions to move it to another planet. The default is Earth.]], - Path = "/Other/Night Sky" + Path = "/Night Sky/Coordinate Systems/Altitude-Azimuth" } } @@ -126,6 +126,7 @@ asset.export("HideAltaz", HideAltaz.Identifier) asset.export("ToggleAltaz", ToggleAltaz.Identifier) + asset.meta = { Name = "Altitude/Azimuth Grid", Description = [[A local Altitude/Azimuth grid centered around your position on a diff --git a/data/assets/nightsky/cardinal_directions.asset b/data/assets/nightsky/cardinal_directions.asset index 50d2487c15..a8c0afb512 100644 --- a/data/assets/nightsky/cardinal_directions.asset +++ b/data/assets/nightsky/cardinal_directions.asset @@ -33,7 +33,7 @@ local CardinalDirectionsPosition = { }, GUI = { Name = "Cardinal Directions Position", - Path = "/Other/Night Sky", + Path = "/Night Sky", Hidden = true } } @@ -63,7 +63,7 @@ local CardinalDirectionSphere = { Description = [[A textured sphere showing the cardinal directions. The sphere is placed on the planet surface and follows the camera's movements. ]], - Path = "/Other/Night Sky" + Path = "/Night Sky" } } @@ -158,6 +158,7 @@ asset.export("ShowNeswLettersSmall", ShowNeswLettersSmall.Identifier) asset.export("HideNesw", HideNesw.Identifier) + asset.meta = { Name = "Cardinal Directions", Description = [[Adds a sphere showing the cardinal directions, that follows the camera diff --git a/data/assets/nightsky/ecliptic_band.asset b/data/assets/nightsky/ecliptic_band.asset index 1f0a7d93a5..b67dd33c4a 100644 --- a/data/assets/nightsky/ecliptic_band.asset +++ b/data/assets/nightsky/ecliptic_band.asset @@ -22,7 +22,7 @@ local EclipticLine = { Transform = { Scale = { Type = "StaticScale", - Scale = 4.28601E17 + Scale = 9.46377307652E17 }, Rotation = { Type = "StaticRotation", @@ -32,16 +32,15 @@ local EclipticLine = { Renderable = { Type = "RenderableRadialGrid", Opacity = 0.8, - Color = { 1.0, 1.0, 1.0 }, - LineWidth = 3.0, + Color = { 0.5, 0.24, 0.24 }, + LineWidth = 4.0, GridSegments = { 1, 1 }, - Radii = { 0.5, 0.5 }, Enabled = asset.enabled }, GUI = { - Name = "Ecliptic Line", + Name = "Ecliptic", Description = "A line representation of the Ecliptic plane.", - Path = "/Other/Lines" + Path = "/Night Sky/Coordinate Systems/Ecliptic" } } @@ -57,7 +56,7 @@ local EclipticBand = { Renderable = { Type = "RenderableSphereImageLocal", Texture = textures .. "band2x.png", - Size = 4.28601E17, + Size = 9.46377307652E17, Segments = 50, DisableFadeInOut = true, Orientation = "Inside", @@ -67,7 +66,7 @@ local EclipticBand = { GUI = { Name = "Ecliptic Band", Description = "A band representation of the Ecliptic plane.", - Path = "/Other/Lines" + Path = "/Night Sky/Coordinate Systems/Ecliptic" } } @@ -162,6 +161,7 @@ asset.export("HideEclipticBand", HideEclipticBand.Identifier) asset.export("ToggleEclipticBand", ToggleEclipticBand.Identifier) + asset.meta = { Name = "Ecliptic Band/Line", Description = [[A line and band representation of the Ecliptic plane, including actions diff --git a/data/assets/nightsky/equatorial_band.asset b/data/assets/nightsky/equatorial_band.asset index 6b0084aad5..1fb892ddea 100644 --- a/data/assets/nightsky/equatorial_band.asset +++ b/data/assets/nightsky/equatorial_band.asset @@ -19,22 +19,21 @@ local EquatorialLine = { }, Scale = { Type = "StaticScale", - Scale = 4.28601E17 + Scale = 7.5686E17 } }, Renderable = { Type = "RenderableRadialGrid", Opacity = 0.8, - Color = { 1.0, 1.0, 1.0 }, - LineWidth = 3.0, + Color = { 0.6, 0.6, 0.2 }, + LineWidth = 4.0, GridSegments = { 1, 1 }, - Radii = { 0.5, 0.5 }, Enabled = asset.enabled }, GUI = { - Name = "Equatorial Line", + Name = "Celestial Equator", Description = "A line representation of the Equatorial plane.", - Path = "/Other/Lines" + Path = "/Night Sky/Coordinate Systems/Equatorial" } } @@ -90,6 +89,7 @@ asset.export("HideEquatorialLine", HideEquatorialLine.Identifier) asset.export("ToggleEquatorialLine", ToggleEquatorialLine.Identifier) + asset.meta = { Name = "Equatorial Line", Description = [[A line representation of the Equatorial plane, including actions diff --git a/data/assets/nightsky/galactic_band.asset b/data/assets/nightsky/galactic_band.asset index 6d1838cc3d..14a36db686 100644 --- a/data/assets/nightsky/galactic_band.asset +++ b/data/assets/nightsky/galactic_band.asset @@ -2,8 +2,8 @@ local transforms = asset.require("scene/solarsystem/sun/transforms") -local GalacticBand = { - Identifier = "GalacticBand", +local GalacticLine = { + Identifier = "GalacticLine", Parent = transforms.SolarSystemBarycenter.Name, Transform = { Scale = { @@ -14,16 +14,15 @@ local GalacticBand = { Renderable = { Type = "RenderableRadialGrid", Opacity = 0.8, - Color = { 1.0, 1.0, 1.0 }, - LineWidth = 3.0, + Color = { 0.08, 0.40, 0.40 }, + LineWidth = 4.0, GridSegments = { 1, 1 }, - Radii = { 0.5, 0.5 }, Enabled = asset.enabled }, GUI = { - Name = "Galactic Equator Line", + Name = "Galactic Equator", Description = "A line representation of the Galactic Equator plane.", - Path = "/Other/Lines" + Path = "/Night Sky/Coordinate Systems/Galactic" } } @@ -60,7 +59,7 @@ local ToggleGalacticBand = { } asset.onInitialize(function() - openspace.addSceneGraphNode(GalacticBand) + openspace.addSceneGraphNode(GalacticLine) openspace.action.registerAction(ShowGalacticBand) openspace.action.registerAction(HideGalacticBand) end) @@ -68,14 +67,15 @@ end) asset.onDeinitialize(function() openspace.action.removeAction(HideGalacticBand) openspace.action.removeAction(ShowGalacticBand) - openspace.removeSceneGraphNode(GalacticBand) + openspace.removeSceneGraphNode(GalacticLine) end) -asset.export(GalacticBand) +asset.export(GalacticLine) asset.export("ShowGalacticBand", ShowGalacticBand.Identifier) asset.export("HideGalacticBand", HideGalacticBand.Identifier) + asset.meta = { Name = "Galactic Line", Description = [[A line representation of the Galactic Equator plane, including actions diff --git a/data/assets/nightsky/light_pollution.asset b/data/assets/nightsky/light_pollution.asset index 84b2e6a68d..4dba3318bf 100644 --- a/data/assets/nightsky/light_pollution.asset +++ b/data/assets/nightsky/light_pollution.asset @@ -42,7 +42,6 @@ local LightPollutionSphere = { Orientation = "Inside", MirrorTexture = true, FadeOutThreshold = 1.00, - Background = true, RenderBinMode = "PostDeferredTransparent", Enabled = asset.enabled }, @@ -51,7 +50,7 @@ local LightPollutionSphere = { Description = [[A sphere used to simulate the effect of light pollution on the night sky. Different pollution levels can be set using the provided actions. These alter the opacity of the sphere.]], - Path = "/Other/Night Sky", + Path = "/Night Sky/Effects", Hidden = false } } diff --git a/data/assets/nightsky/meridian.asset b/data/assets/nightsky/meridian.asset index 79673acb00..e855406882 100644 --- a/data/assets/nightsky/meridian.asset +++ b/data/assets/nightsky/meridian.asset @@ -24,7 +24,7 @@ local MeridianPosition = { }, GUI = { Name = "Local Meridian Position", - Path = "/Other/Lines", + Path = "/Night Sky/Coordinate Systems/Altitude-Azimuth", Hidden = true } } @@ -41,17 +41,16 @@ local MeridianPlane = { Renderable = { Type = "RenderableRadialGrid", Opacity = 0.8, - Color = { 1.0, 1.0, 1.0 }, - LineWidth = 3.0, + Color = { 0.4, 0.8, 0.4 }, + LineWidth = 6.0, GridSegments = { 1, 1 }, - Radii = { 0.5, 0.5 }, Enabled = asset.enabled, RenderBinMode = "PostDeferredTransparent" }, GUI = { Name = "Local Meridian", Description = [[A line representation of the Local Meridian]], - Path = "/Other/Lines" + Path = "/Night Sky/Coordinate Systems/Altitude-Azimuth" } } @@ -121,6 +120,7 @@ asset.export("HideMeridian", HideMeridian.Identifier) asset.export("ToggleMeridian", ToggleMeridian.Identifier) + asset.meta = { Name = "Meridian", Description = [[A line representation of the Local Meridian, including actions diff --git a/data/assets/nightsky/nightsky.asset b/data/assets/nightsky/nightsky.asset index 7805b575d0..b2f428af7b 100644 --- a/data/assets/nightsky/nightsky.asset +++ b/data/assets/nightsky/nightsky.asset @@ -11,6 +11,7 @@ asset.require("actions/nightsky/camera", false) asset.require("actions/nightsky/daytime", false) + asset.meta = { Name = "Night Sky Assets", Description = [[A collection of assets useful for studying the night sky.]], diff --git a/data/assets/nightsky/planets.asset b/data/assets/nightsky/planets.asset index 7830ac0d3d..13d88df45f 100644 --- a/data/assets/nightsky/planets.asset +++ b/data/assets/nightsky/planets.asset @@ -32,7 +32,7 @@ local Mercury = { Name = "Night Sky Mercury", Description = [[A night sky version of the planet Mercury, making it visible as a bright object on the sky (textured representation).]], - Path = "/Other/Night Sky/Planets" + Path = "/Night Sky/Planets" } } @@ -54,7 +54,7 @@ local Venus = { Name = "Night Sky Venus", Description = [[A night sky version of the planet Venus, making it visible as a bright object on the sky (textured representation).]], - Path = "/Other/Night Sky/Planets" + Path = "/Night Sky/Planets" } } @@ -74,7 +74,7 @@ local Mars = { Tag = { "nightsky_billboard" }, GUI = { Name = "Night Sky Mars", - Path = "/Other/Night Sky/Planets" + Path = "/Night Sky/Planets" } } @@ -96,7 +96,7 @@ local Jupiter = { Name = "Night Sky Jupiter", Description = [[A night sky version of the planet Jupiter, making it visible as a bright object on the sky (textured representation).]], - Path = "/Other/Night Sky/Planets" + Path = "/Night Sky/Planets" } } @@ -118,7 +118,7 @@ local Saturn = { Name = "Night Sky Saturn", Description = [[A night sky version of the planet Saturn, making it visible as a bright object on the sky (textured representation).]], - Path = "/Other/Night Sky/Planets" + Path = "/Night Sky/Planets" } } @@ -208,6 +208,7 @@ asset.export("HideNightSkyPlanets", HideNightSkyPlanets.Identifier) asset.export("ToggleNightSkyPlanets", ToggleNightSkyPlanets.Identifier) + asset.meta = { Name = "Night Sky Planets", Description = [[A collection of night sky versions of the planets Mercury, Venus, diff --git a/data/assets/nightsky/zenith.asset b/data/assets/nightsky/zenith.asset index 4cdfd4acca..ddbdd3a760 100644 --- a/data/assets/nightsky/zenith.asset +++ b/data/assets/nightsky/zenith.asset @@ -33,7 +33,7 @@ local ZenithPosition = { }, GUI = { Name = "Zenith Position", - Path = "/Other/Points", + Path = "/Night Sky/Coordinate Systems/Altitude-Azimuth", Hidden = true } } @@ -61,7 +61,7 @@ local ZenithDot = { Description = [[A dot representation of the Local Zenith, based on the camera's current position on a planet. Use the provided show or toggle action to move it between planets. The default is Earth.]], - Path = "/Other/Points" + Path = "/Night Sky/Coordinate Systems/Altitude-Azimuth" } } @@ -129,6 +129,7 @@ asset.export("HideZenith", HideZenith.Identifier) asset.export("ToggleZenith", ToggleZenith.Identifier) + asset.meta = { Name = "Zenith", Description = [[A dot representation of the Local Zenith (based on the current diff --git a/data/assets/scene/digitaluniverse/2dF.asset b/data/assets/scene/digitaluniverse/2dF.asset index 34602de58f..0297cc93db 100644 --- a/data/assets/scene/digitaluniverse/2dF.asset +++ b/data/assets/scene/digitaluniverse/2dF.asset @@ -1,8 +1,8 @@ local textures = asset.resource({ - Name = "2dF Textures", + Name = "Point Textures", Type = "HttpSynchronization", - Identifier = "digitaluniverse_2dF_textures", - Version = 2 + Identifier = "digitaluniverse_point_textures", + Version = 1 }) local speck = asset.resource({ @@ -41,20 +41,13 @@ local Object = { }, GUI = { Name = "2dF Galaxies", - Path = "/Universe/Galaxies", - Description = [[Census 229,293 galaxies. DU Version 1.7.
The Two-degree Field - (2dF) Survey was a project designed to map portions of the extragalactic universe. The - 2dF instrument was mounted on the 3.9-meter (12.8-foot) Anglo-Australian Telescope - (AAT), located 450 km (280 miles) northwest of Sydney. The telescope has a two-degree - field of view on the sky, enabling large parts of the sky to be observed at one time. - For each pointing of the telescope, the instrument can acquire up to 400 spectra - simultaneously via optical fibers that feed into two spectrographs. Each spectrograph - sees light that is between 350 nm and 800 nm, spanning the visible spectrum.

- The 2dF survey has three main components: the North Galactic Pole strip, the South - Galactic Pole strip, and the random fields that surround the South Galactic Pole - strip. The galaxy survey is composed of about 230,000 galaxies with brightness and - redshift measurements. (Description from URL)

Data Reference: 2dF Galaxy - Redshift Survey (2dFGRS Team, 1998-2003)]] + Path = "/Universe/Deep Sky Surveys", + Description = [[The Two-degree Field (2dF) Survey was a project designed to map + portions of the extragalactic universe. The 2dF survey has three main components: + the North Galactic Pole strip, the South Galactic Pole strip, and the random fields + that surround the South Galactic Pole strip. Colors: Orange galaxies show dense + regions of galaxies, aqua galaxies are areas of intermediate density, and green + galaxies are areas of lower density. Census: 229,293 galaxies.]] } } @@ -73,7 +66,7 @@ asset.export(Object) asset.meta = { Name = "2dF Galaxies", - Description = "Digital Universe asset for the The Two-degree Field (2dF) Survey", + Description = Object.GUI.Description, Author = "Brian Abbott (AMNH), Eric Gawiser (Rutgers U)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" diff --git a/data/assets/scene/digitaluniverse/2mass.asset b/data/assets/scene/digitaluniverse/2mass.asset index b8ec2ba045..f05c1d84d0 100644 --- a/data/assets/scene/digitaluniverse/2mass.asset +++ b/data/assets/scene/digitaluniverse/2mass.asset @@ -1,8 +1,8 @@ local textures = asset.resource({ - Name = "2MASS Textures", + Name = "Point Textures", Type = "HttpSynchronization", - Identifier = "digitaluniverse_2mass_textures", - Version = 2 + Identifier = "digitaluniverse_point_textures", + Version = 1 }) local speck = asset.resource({ @@ -42,14 +42,14 @@ local Object = { }, GUI = { Name = "2MASS Galaxies", - Path = "/Universe/Galaxies", + Path = "/Universe/Nearby Surveys", Description = [[The Two Micron All-Sky Survey (2MASS) is an infrared survey of the - sky published in 2003. Because it is looking in the infrared, and this is a composite - of the 2MASS point-source catalog, most of the light from this survey is starlight. In - visible light, clouds of gas and dust obscure our view. However, in infrared, the - longer wavelengths of light can penetrate these clouds without being scattered, - thereby revealing stars that would normally be hidden to our eye. - (Description from URL)]] + sky published in 2003. Taken from two telescopes in Arizona and Chile, it offers an + all-sky view of galaxies beyond the Milky Way. Because it is infrared, the light + detected is mostly from cool stars within the galaxies, which comprises the majority + of mass in a galaxy. Colors: Orange galaxies show dense regions of galaxies, aqua + galaxies are areas of intermediate density, and green galaxies are areas of lower + density. Census: 43,533 galaxies.]] } } @@ -68,7 +68,7 @@ asset.export(Object) asset.meta = { Name = "2MASS Galaxies", - Description = "Digital Universe asset for the Two Micron All-Sky Survey (2MASS) survey", + Description = Object.GUI.Description, Author = "Brian Abbott (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" diff --git a/data/assets/scene/digitaluniverse/6dF.asset b/data/assets/scene/digitaluniverse/6dF.asset index c1de5b1b9e..48039ecc6e 100644 --- a/data/assets/scene/digitaluniverse/6dF.asset +++ b/data/assets/scene/digitaluniverse/6dF.asset @@ -1,8 +1,8 @@ local textures = asset.resource({ - Name = "6dF Textures", + Name = "Point Textures", Type = "HttpSynchronization", - Identifier = "digitaluniverse_6dF_textures", - Version = 2 + Identifier = "digitaluniverse_point_textures", + Version = 1 }) local speck = asset.resource({ @@ -42,18 +42,13 @@ local Object = { }, GUI = { Name = "6dF Galaxies", - Path = "/Universe/Galaxies", - Description = [[Census 109,569 galaxies. DU Version 1.4.
The Six-degree Field - (6dF) Galaxy Survey mapped nearly half the sky from the Anglo-Australian - Observatory. Unlike previous datasets, this one is not all-sky, meaning there - are patches of sky that are not covered. In this case, the entire northern - hemisphere has no coverage at all. This catalog overlaps with the Tully - dataset, and there is a noticeable difference in the quality of these - datasets. Tully is much tighter and the structure is more apparent, while the - 6dF data are more spread out. This is because of local motions within galaxy - clusters have not been corrected in these data. (Description from URL) -

Data Reference: The 6dF Galaxy Survey Redshift Catalogue - (Jones+, 2009)]] + Path = "/Universe/Deep Sky Surveys", + Description = [[The Six-degree Field (6dF) Galaxy Survey mapped nearly half the sky + from the Anglo-Australian Observatory. Because it's a southern hemisphere survey, + there is no coverage in these data for the northern hemisphere's sky. As with all + galaxy surveys, the organge galaxies are in relatively dense areas, the green + galaxies are in relatively sparse areas, and the aqua galaxies are between. Census: + 109,569 galaxies.]] } } @@ -72,7 +67,7 @@ asset.export(Object) asset.meta = { Name = "6dF Galaxies", - Description = "Digital Universe asset for The Six-degree Field (6dF) Galaxy Survey", + Description = Object.GUI.Description, Author = "Brian Abbott (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" diff --git a/data/assets/scene/digitaluniverse/abell.asset b/data/assets/scene/digitaluniverse/abell.asset index 51d563b570..dce457d151 100644 --- a/data/assets/scene/digitaluniverse/abell.asset +++ b/data/assets/scene/digitaluniverse/abell.asset @@ -1,8 +1,8 @@ local textures = asset.resource({ - Name = "Abell Textures", + Name = "Point Textures", Type = "HttpSynchronization", - Identifier = "digitaluniverse_abell_textures", - Version = 2 + Identifier = "digitaluniverse_point_textures", + Version = 1 }) local speck = asset.resource({ @@ -30,7 +30,7 @@ local Object = { File = speck .. "abell.label", Opacity = 1.0, Color = { 0.0, 0.8, 0.0 }, - Size = 22, + Size = 21.2, MinMaxSize = { 10, 12 }, Unit = "Mpc", TransformationMatrix = TransformMatrix @@ -46,26 +46,21 @@ local Object = { Unit = "Mpc", TransformationMatrix = TransformMatrix, SizeSettings = { - ScaleExponent = 22.6, + ScaleExponent = 23.2, MaxSize = 0.27, EnableMaxSizeControl = true } }, GUI = { Name = "Abell Galaxy Clusters", - Path = "/Universe/Galaxies", - Description = [[Census 2,246 galaxies. DU Version 1.4.
The Abell catalog - includes all the nearby, and not so nearby, galaxy clusters. The northern - hemisphere survey, published in 1958, was compiled by George Abell (1927-1983) - from the Palomar Sky Survey plates. A subsequent southern hemisphere catalog - was published posthumously in 1989. Further analysis by Brent Tully determined - their distance and three-dimensional distribution. Each point in this data set - represents a cluster of tens to hundreds (possibly even thousands) of - galaxies, similar to the Virgo or Fornax Clusters. You will notice some points - are assigned colors while most are gray. The data set also has an arbitrary - cut-off for completeness, resulting in the rectangular shape of the data set. - (Description from URL)

Data Reference: Abell Clusters of Rich - Galaxies, Brent Tully (U Hawaii), Stuart Levy (NCSA/UIUC)]] + Path = "/Universe/Deep Sky Surveys", + Description = [[The Abell catalog includes all the nearby, and not so nearby, galaxy + clusters. The northern hemisphere survey, published in 1958, was compiled by George + Abell from the Palomar Sky Survey plates. A subsequent southern hemisphere catalog + was published posthumously in 1989. Each point in this data set represents a + cluster of tens to hundreds (possibly even thousands) of galaxies, similar to the + Virgo or Fornax Clusters. The data have an arbitrary cut-off for completeness, + resulting in the rectangular shape of the data set. Census: 2,246 galaxy clusters.]] } } @@ -84,7 +79,7 @@ asset.export(Object) asset.meta = { Name = "Abell Galaxy Clusters", - Description = "Digital Universe asset for The Abell catalog", + Description = Object.GUI.Description, Author = "Stuart Levy (NCSA/UIUC), Brian Abbott (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" diff --git a/data/assets/scene/digitaluniverse/allsky_hydrogenalpha.asset b/data/assets/scene/digitaluniverse/allsky_hydrogenalpha.asset new file mode 100644 index 0000000000..caf7cfde10 --- /dev/null +++ b/data/assets/scene/digitaluniverse/allsky_hydrogenalpha.asset @@ -0,0 +1,67 @@ +local textures = asset.resource({ + Name = "Multiwavelength Milky Way Textures", + Type = "HttpSynchronization", + Identifier = "digitaluniverse_multiwavelength_milkyway_textures", + Version = 1 +}) + + +local Object = { + Identifier = "AllSky_HAlpha", + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, math.pi } + } + }, + Renderable = { + Type = "RenderableSphereImageLocal", + Enabled = false, + Size = 9.2E21, + Segments = 40, + Opacity = 0.4, + Texture = textures .. "mwHalpha-f.png", + Orientation = "Inside", + MirrorTexture = true, + FadeOutThreshold = 0.025 + }, + GUI = { + Name = "Hydrogen Alpha", + Path = "/Milky Way/All Sky Images", + Description = [[Hydrogen-alpha is a term that describes light from the ground state of + the hydrogen atom. When an electron in an atom moves from one energy level to a + higher one, we say the atom is excited. When the electron moves back down to the + lower energy level, light is released at a wavelength commensurate with the energy + between the two levels. For the H-alpha line, this energy difference translates to a + wavelength in the extreme red end of the visible spectrum. This survey of the sky is + a snapshot of light from this wavelength. + + One distinctive element of the sky at this wavelength is the presence of large, + spherical bubbles surrounding hot stars. Many nebulae and star-forming regions are + visible, including the Great Nebula of Orion. We also see that galaxies emit H-alpha + light, including the Andromeda Galaxy and the faint M33, the large face-on spiral in + Triangulum, and the Large and Small Magellanic Clouds (LMC and SMC) in the southern + sky. Census: 1 all-sky image.]] + } +} + + +asset.onInitialize(function() + openspace.addSceneGraphNode(Object) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Object) +end) + +asset.export(Object) + + + +asset.meta = { + Name = "Milky Way All-Sky Hydrogen Alpha", + Description = Object.GUI.Description, + Author = "Brian Abbott, Carter Emmart (AMNH), OpenSpace Team", + URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", + License = "AMNH Digital Universe" +} diff --git a/data/assets/scene/digitaluniverse/allsky_visible.asset b/data/assets/scene/digitaluniverse/allsky_visible.asset new file mode 100644 index 0000000000..437d4f492c --- /dev/null +++ b/data/assets/scene/digitaluniverse/allsky_visible.asset @@ -0,0 +1,59 @@ +local textures = asset.resource({ + Name = "Milky Way All Sky Textures", + Type = "HttpSynchronization", + Identifier = "milkyway_textures", + Version = 2 +}) + + +local Object = { + Identifier = "AllSky_Visible", + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, math.pi } + } + }, + Renderable = { + Type = "RenderableSphereImageLocal", + Size = 9.2E21, + Segments = 40, + Opacity = 0.25, + Texture = textures .. "DarkUniverse_mellinger_4k.jpg", + Orientation = "Inside", + MirrorTexture = true, + FadeOutThreshold = 0.0015, + DimInAtmosphere = true + }, + Tag = { "daytime_hidden" }, + GUI = { + Name = "Visible Milky Way", + Path = "/Milky Way/All Sky Images", + Description = [[An all-sky image of the night sky as our eye sees it (in the visible + spectrum), with the stars removed. You will see the brightest part of the Galaxy if + you look toward Galactic center toward the constellations Scorpius and Sagittarius. + This bright haze is the light from millions of stars; the dark lanes are foreground + dust clouds, obscuring our view of the stars behind them. Census: 1 all-sky image.]] + } +} + + +asset.onInitialize(function() + openspace.addSceneGraphNode(Object) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Object) +end) + +asset.export(Object) + + + +asset.meta = { + Name = "Milky Way All-Sky Visible Light", + Description = Object.GUI.Description, + Author = "Brian Abbott, Carter Emmart (AMNH), OpenSpace Team", + URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", + License = "AMNH Digital Universe" +} diff --git a/data/assets/scene/digitaluniverse/alternatestarlabels.asset b/data/assets/scene/digitaluniverse/alternatestarlabels.asset index 7d14086700..04e2dff18c 100644 --- a/data/assets/scene/digitaluniverse/alternatestarlabels.asset +++ b/data/assets/scene/digitaluniverse/alternatestarlabels.asset @@ -2,7 +2,7 @@ local speck = asset.resource({ Name = "Alternate Star Labels Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_alternatestarlabels_speck", - Version = 2 + Version = 3 }) @@ -13,10 +13,10 @@ local Object = { Enabled = false, Labels = { Enabled = true, - File = speck .. "altstarlabels.label", + File = speck .. "stars_alt_labels.label", Color = { 0.4, 0.4, 0.4 }, Size = 14.7, - MinMaxSize = { 6, 20 }, + MinMaxSize = { 15, 20 }, Unit = "pc" }, Opacity = 0.65, @@ -25,13 +25,9 @@ local Object = { GUI = { Name = "Stars Labels - Alternate", Path = "/Milky Way/Stars", - Description = [[Census 3,395 star names. DU Version 1.8.
The main star data - identify the accepted IAU star names for the brightest stars. However, astronomers - have long cataloged thousands of stars beyond the brightest ones we see. Several - attempts over thousands of years to name all the visible stars have led to two - main catalogs: Johann Bayer's Catalog from 1603 and John Flamsteed's Catalog - published in 1725. (Description from URL)

Data Reference: Various - sources]] + Description = [[Alternate star labels for the stars. Priority goes to Bayer IDs + (Greek designations, like Alpha Orionis), then to Flamsteed numbers (like 1 + Orionis).]] } } @@ -49,9 +45,9 @@ asset.export(Object) asset.meta = { - Name = "Stars Labels - Alternate", - Description = "Digital Universe asset for alternate start labels", - Author = "Brian Abbott (AMNH)", + Name = "Alternative Labels for the Stars", + Description = Object.GUI.Description, + Author = "Zack Reeves, Brian Abbott (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/backgroundradiation.asset b/data/assets/scene/digitaluniverse/backgroundradiation.asset index c92e587606..e1a753a756 100644 --- a/data/assets/scene/digitaluniverse/backgroundradiation.asset +++ b/data/assets/scene/digitaluniverse/backgroundradiation.asset @@ -13,6 +13,38 @@ local textures = asset.resource({ }) +local COBE = { + Identifier = "COBE", + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, math.pi } + } + }, + Renderable = { + Type = "RenderableSphereImageLocal", + Enabled = false, + Size = 3975.41417036064E23, + Segments = 80, + Opacity = 0.5, + Texture = textures .. "COBErect.png", + Orientation = "Both", + MirrorTexture = true, + FadeInThreshold = 0.4 + }, + GUI = { + Name = "1990 COBE CMB", + Path = "/Universe/Cosmic Microwave Background", + Description = [[In 1990, COBE, the Cosmic Background Explorer, took the first + detailed map of the cosmic microwave background light. The red areas are + relatively hotter areas of the CMB, while the blue areas are cooler than the + average. The lines of latitude and longitude are baked into this image, and + reflect galactic coordinates. Image resolution is 7 degrees. Census: 1 + all-sky image.]] + } +} + + local WMAP = { Identifier = "WMAP", Transform = { @@ -33,35 +65,16 @@ local WMAP = { FadeInThreshold = 0.4 }, GUI = { - Name = "Wilkinson Microwave Anisotropy Probe (WMAP)", - Path = "/Universe/Cosmic Microwave Background" + Name = "2003 WMAP CMB", + Path = "/Universe/Cosmic Microwave Background", + Description = [[WMAP, the Wilkinson Microwave Anisotropy Probe, released this all-sky + image of the cosmic microwave background light in 2003. The blue colors are slightly + cooler than average and red is slightly warmer, with fluctuations of about a + 100,000th of a degree above or below the average. The resolution on this image is + 0.5 degrees. Census: 1 all-sky image.]] } } -local CBE = { - Identifier = "CBE", - Transform = { - Rotation = { - Type = "StaticRotation", - Rotation = { 0, 0, math.pi } - } - }, - Renderable = { - Type = "RenderableSphereImageLocal", - Enabled = false, - Size = 3975.41417036064E23, - Segments = 80, - Opacity = 0.5, - Texture = textures .. "COBErect.png", - Orientation = "Both", - MirrorTexture = true, - FadeInThreshold = 0.4 - }, - GUI = { - Name = "Cosmic Background Explorer", - Path = "/Universe/Cosmic Microwave Background" - } -} local Planck = { Identifier = "Planck", @@ -83,67 +96,43 @@ local Planck = { FadeInThreshold = 0.4 }, GUI = { - Name = "Planck", - Path = "/Universe/Cosmic Microwave Background" - } -} - - -local HAlpha = { - Identifier = "HAlpha", - Transform = { - Rotation = { - Type = "StaticRotation", - Rotation = { 0, 0, math.pi } - } - }, - Renderable = { - Type = "RenderableSphereImageLocal", - Enabled = false, - Size = 9.2E21, - Segments = 40, - Opacity = 0.4, - Texture = textures .. "mwHalpha-f.png", - Orientation = "Inside", - MirrorTexture = true, - FadeOutThreshold = 0.025, - Background = true - }, - GUI = { - Name = "H Alpha", - Path = "/Milky Way/All Sky Images" + Name = "2013 Planck CMB", + Path = "/Universe/Cosmic Microwave Background", + Description = [[The Planck mission's 2013 image of the cosmic microwave background + light release is the most detailed view of the CMB we have to date. The orange + areas represent the slightly hotter areas, and the blue areas show the areas that + are slightly cooler. The resolution on this image is 0.16 degrees. Census: 1 + all-sky image.]] } } asset.onInitialize(function() + openspace.addSceneGraphNode(COBE) openspace.addSceneGraphNode(WMAP) - openspace.addSceneGraphNode(CBE) openspace.addSceneGraphNode(Planck) - openspace.addSceneGraphNode(HAlpha) end) asset.onDeinitialize(function() - openspace.removeSceneGraphNode(HAlpha) openspace.removeSceneGraphNode(Planck) - openspace.removeSceneGraphNode(CBE) openspace.removeSceneGraphNode(WMAP) + openspace.removeSceneGraphNode(COBE) end) +asset.export(COBE) asset.export(WMAP) -asset.export(CBE) asset.export(Planck) -asset.export(HAlpha) asset.meta = { - Name = "Background Radiation", - Description = [[Various AllSky images for the Milky Way and observable Universe. - Included: Wilkinson Microwave Anisotropy Probe (WMAP), Cosmic Background Explorer, - Planck, and H Alpha

Data Reference: Planck/ESA and the Planck - Collaboration, Wilkinson Microwave Anisotropy Probe/NASA, Doug - Finkbeiner (Princeton)]], + Name = "Cosmic Microwave Background", + Description = [[All-sky images of the Cosmic Microwave Background Light. The CMB has + been mapped by three main missions: COBE, WMAP, and Planck. The images are not true + all-sky images because the light from our own galaxy has been subtracted out of them. + From the discovery of the CMB in 1964, to the three space telescopes whose images we + see in this asset, we've gained a more detailed view of the CMB light, thereby telling + us more about the origin of the universe.]], Author = "Brian Abbott (AMNH), OpenSpace Team", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" diff --git a/data/assets/scene/digitaluniverse/brown_dwarfs.asset b/data/assets/scene/digitaluniverse/brown_dwarfs.asset new file mode 100644 index 0000000000..768a4791d6 --- /dev/null +++ b/data/assets/scene/digitaluniverse/brown_dwarfs.asset @@ -0,0 +1,79 @@ +local textures = asset.resource({ + Name = "Point Textures", + Type = "HttpSynchronization", + Identifier = "digitaluniverse_point_textures", + Version = 1 +}) + +local speck = asset.resource({ + Name = "Brown Dwarf Speck Files", + Type = "HttpSynchronization", + Identifier = "digitaluniverse_brown_dwarfs_speck", + Version = 1 +}) + + +local Object = { + Identifier = "BrownDwarfs", + Renderable = { + Type = "RenderablePointCloud", + Enabled = false, + File = speck .. "bd.speck", + Texture = { + File = textures .. "point3.png" + }, + Unit = "pc", + Coloring = { + FixedColor = { 0.4, 0.0, 0.1 }, + ColorMapping = { + File = speck .. "bd.cmap", + ParameterOptions = { + { Key = "typeindex", Range = { 1.0, 4.0 } } + } + } + }, + SizeSettings = { + ScaleExponent = 15.8, + MaxSize = 0.7, + EnableMaxSizeControl = true + } + }, + GUI = { + Name = "Brown Dwarfs", + Path = "/Milky Way/Substellar Objects", + Description = [[For decades it was believed that M stars were the coolest stars in + the Galaxy. Some M stars, called red dwarfs, make up 70% of the stars in the + Galaxy. However, a new class of objects, even cooler than M stars, was recently + discovered and given a spectral type of L. L-type objects straddle the boundary + between red dwarfs and brown dwarfs and they are typically very dim stars or brown + dwarfs. Even cooler than L-type objects are T-type objects. These are mostly brown + dwarfs and resemble large, massive, Jupiter-like objects, too large to be planets + and typically too small to be stars. Beyond the T dwarfs are the Y-type objects, + which are even more dim. Brown dwarfs are extremely difficult to see, mainly because + they are so dim in optical light. However, they appear brighter in infrared light. + Colors: We represent these objects as exaggeratged points and they are either red + for L type objects, Maroon for T type, and purple for Y type objects. Census: + 2,196 objects.]] + } +} + + +asset.onInitialize(function() + openspace.addSceneGraphNode(Object) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Object) +end) + +asset.export(Object) + + + +asset.meta = { + Name = "Brown Dwarfs", + Author = "Brian Abbott, Zack Reeves, Jackie Faherty (AMNH)", + Description = Object.GUI.Description, + License = "AMNH Digital Universe", + URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", +} diff --git a/data/assets/scene/digitaluniverse/constellationbounds.asset b/data/assets/scene/digitaluniverse/constellationbounds.asset index 1858cdd07a..b366279854 100644 --- a/data/assets/scene/digitaluniverse/constellationbounds.asset +++ b/data/assets/scene/digitaluniverse/constellationbounds.asset @@ -35,10 +35,12 @@ local Object = { } }, GUI = { - Name = "Constellation Bounds", + Name = "Constellation Boundaries", Path = "/Milky Way/Constellations", - Description = [[A Spherical mesh dividing the sky into regions that fit the - constellations]] + Description = [[As a continent is divided into countries, astronomers divide the sky + into 88 regions called constellations. Every object falls into one of these 88 + regions. The boundaries of these regions are shown in this asset. Use these in + concert with the constellation labels. Census: 88 constellations.]] } } @@ -57,8 +59,7 @@ asset.export(Object) asset.meta = { Name = "Constellation Bounds", - Description = [[DU asset providing a Spherical mesh dividing the sky into regions that - fit the constellations]], + Description = Object.GUI.Description, Author = "Brian Abbott (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" diff --git a/data/assets/scene/digitaluniverse/constellations.asset b/data/assets/scene/digitaluniverse/constellations.asset index 2258107161..49a0768069 100644 --- a/data/assets/scene/digitaluniverse/constellations.asset +++ b/data/assets/scene/digitaluniverse/constellations.asset @@ -6,7 +6,7 @@ local speck = asset.resource({ Name = "Constellation Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_constellations_data", - Version = 2 + Version = 3 }) @@ -35,31 +35,6 @@ local function zodiacsString(zodiacsList) return zodiacsString end -local ConstellationsExtragalactic = { - Identifier = "ConstellationsExtragalactic", - Renderable = { - Type = "RenderableConstellationLines", - Enabled = false, - Labels = { - File = speck .. "constellationsEXGAL.label", - Opacity = 0.4, - Color = { 0.8, 0.8, 0.8 }, - Size = 20.0, - MinMaxSize = { 20, 30 }, - Unit = "Mpc" - }, - Opacity = 0.4, - File = speck .. "constellationsEXGAL.speck", - NamesFile = speck .. "constellations.dat", - Colors = { { 0.6, 0.4, 0.4 }, { 0.8, 0.0, 0.0 }, { 0.0, 0.3, 0.8 } }, - Unit = "Mpc", - -- Selection = zodiacs - }, - GUI = { - Name = "Constellations (Extragalactic)", - Path = "/Milky Way/Constellations" - } -} local Constellations = { Identifier = "Constellations", @@ -67,7 +42,7 @@ local Constellations = { Type = "RenderableConstellationLines", Enabled = false, Labels = { - File = speck .. "constellations.label", + File = speck .. "constellation_lines.label", Opacity = 0.3, Color = { 0.8, 0.8, 0.8 }, Size = 14.5, @@ -75,7 +50,7 @@ local Constellations = { Unit = "pc" }, Opacity = 0.3, - File = speck .. "constellations.speck", + File = speck .. "constellation_lines.speck", NamesFile = speck .. "constellations.dat", Colors = { { 0.6, 0.4, 0.4 }, { 0.8, 0.0, 0.0 }, { 0.0, 0.3, 0.8 } }, Unit = "pc", @@ -83,17 +58,14 @@ local Constellations = { }, Tag = { "daytime_hidden" }, GUI = { - Name = "Constellations", + Name = "Constellation Lines", Path = "/Milky Way/Constellations", - Description = [[Census 88 constellations and labels. DU Version 3.4.
These - modern constellations are largely based on those of the Babylonians and - Greeks; however, most cultures have their own figures and stories of the sky. - More than half the official constellations adopted by scientists in 1930 were - known to the ancients over 2,000 years ago. Each star falls into one of these - 88 regions. Of course, today we know the stars in any given constellation do - not necessarily have any physical relationship with one another. One star may - be nearby, while an adjacent star in the sky may be far away.(Description - from URL)

Data Reference: various]] + Description = [[Lines connecting the stars that make up the constellation figures. + We represent the constellations by connecting the main stars that make up the + constellation "stick figures," as seen from Earth. Colors: most constellations + are pink, while the zodical constellations are red. We also color Orion and Ursa + Major blue as two recognizable constellations in the night sky. Census: 88 + constellations.]] } } @@ -137,7 +109,6 @@ local ShowZodiacs = { asset.onInitialize(function() - openspace.addSceneGraphNode(ConstellationsExtragalactic) openspace.addSceneGraphNode(Constellations) openspace.action.registerAction(ShowConstellations) @@ -151,10 +122,8 @@ asset.onDeinitialize(function() openspace.action.removeAction(ShowConstellations) openspace.removeSceneGraphNode(Constellations) - openspace.removeSceneGraphNode(ConstellationsExtragalactic) end) -asset.export(ConstellationsExtragalactic) asset.export(Constellations) asset.export("ShowConstellations", ShowConstellations.Identifier) asset.export("HideConstellations", HideConstellations.Identifier) @@ -163,9 +132,8 @@ asset.export("ShowZodiacs", ShowZodiacs.Identifier) asset.meta = { - Name = "Constellations", - Description = "Digital Universe asset for constellation lines", - Author = "Brian Abbott (AMNH)", + Description = Constellations.GUI.Description, + Author = "Brian Abbott, Zack Reeves (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/deepsky.asset b/data/assets/scene/digitaluniverse/deepsky.asset index f7d75e7f3e..3973a79262 100644 --- a/data/assets/scene/digitaluniverse/deepsky.asset +++ b/data/assets/scene/digitaluniverse/deepsky.asset @@ -49,7 +49,7 @@ local DeepSkyObjects = { }, GUI = { Name = "Deep Sky Objects Points", - Path = "/Universe/Galaxies", + Path = "/Universe/Nearby Surveys", Description = "Point cloud and labels for Deep Sky Objects" } } @@ -87,7 +87,7 @@ local DeepSkyObjectsImages = { }, GUI = { Name = "Deep Sky Objects Images", - Path = "/Universe/Galaxies", + Path = "/Universe/Nearby Surveys", Description = [[Census: 63 images and labels. DU Version 1.3.
These data are 2-D images of Messier objects placed in 3-D space. Not only do we place these images at the proper location and give them the correct orientation, we also diff --git a/data/assets/scene/digitaluniverse/digitaluniverse.asset b/data/assets/scene/digitaluniverse/digitaluniverse.asset index 2c7c8ef4dc..36ff48a180 100644 --- a/data/assets/scene/digitaluniverse/digitaluniverse.asset +++ b/data/assets/scene/digitaluniverse/digitaluniverse.asset @@ -3,44 +3,46 @@ asset.require("./2dF") asset.require("./2mass") asset.require("./6dF") asset.require("./abell") -asset.require("./alternatestarlabels") +asset.require("./allsky_hydrogenalpha") +asset.require("./allsky_visible") asset.require("./backgroundradiation") asset.require("./backgroundradiation_multiverse") -asset.require("./clusters") +asset.require("./brown_dwarfs") +asset.require("./galaxy_clusters") asset.require("./constellationbounds") asset.require("./constellations") -asset.require("./deepsky") -asset.require("./dwarfs") asset.require("./exoplanets") asset.require("./exoplanets_candidates") asset.require("./globularclusters") asset.require("./grids") -asset.require("./groups") +asset.require("./galaxy_groups") asset.require("./h2regions") -asset.require("./localdwarfs") +asset.require("./local_group_dwarfs") asset.require("./milkyway") asset.require("./milkyway_arm_labels") asset.require("./milkyway_label") -asset.require("./milkyway_sphere") asset.require("./obassociations") +asset.require("./oort_cloud") asset.require("./openclusters") asset.require("./planetarynebulae") asset.require("./pulsars") asset.require("./quasars") asset.require("./starlabels") +asset.require("./alternatestarlabels") asset.require("./starorbits") +asset.require("./star_uncertainty") asset.require("./stars") asset.require("./superclusters") asset.require("./supernovaremnants") asset.require("./tully") asset.require("./voids") +asset.require("./white_dwarfs") asset.meta = { Name = "Digital Universe", - Description = [[This asset is a meta asset, containing all the assets from the AMNH - Digital Universe]], + Description = [[This asset is a meta asset, containing all the assets from the AMNH Digital Universe.]], Author = "Brian Abbott (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" diff --git a/data/assets/scene/digitaluniverse/dwarfs.asset b/data/assets/scene/digitaluniverse/dwarfs.asset deleted file mode 100644 index 4d7d93caf0..0000000000 --- a/data/assets/scene/digitaluniverse/dwarfs.asset +++ /dev/null @@ -1,91 +0,0 @@ -local textures = asset.resource({ - Name = "Brown Dwarf Textures", - Type = "HttpSynchronization", - Identifier = "digitaluniverse_dwarfs_textures", - Version = 1 -}) - -local speck = asset.resource({ - Name = "Brown Dwarf Speck Files", - Type = "HttpSynchronization", - Identifier = "digitaluniverse_dwarfs_speck", - Version = 3 -}) - - -local Object = { - Identifier = "Dwarfs", - Renderable = { - Type = "RenderablePointCloud", - Enabled = false, - File = speck .. "dwarfs.speck", - Labels = { - File = speck .. "dwarfs.label", - Color = { 0.5, 0.1, 0.2 }, - Size = 14.6, - MinMaxSize = { 10, 20 }, - Unit = "pc" - }, - Opacity = 1.0, - Texture = { - File = textures .. "point3.png", - }, - Unit = "pc", - Coloring = { - FixedColor = { 0.4, 0.0, 0.1 }, - ColorMapping = { - File = speck .. "dwarfs.cmap", - ParameterOptions = { - { Key = "typeindex", Range = { 1.0, 4.0 } } - } - } - }, - SizeSettings = { - ScaleExponent = 16.2, - MaxSize = 0.7, - EnableMaxSizeControl = true - } - }, - GUI = { - Name = "Brown Dwarfs", - Path = "/Milky Way", - Description = [[Census: 785 L dwarfs, 101 T dwarfs, 17 Y dwarfs. DU Version 6.4. -
In astronomy, there are dwarf stars-red, white, and brown-dwarf novae, - and even dwarf galaxies. As you might imagine, astronomers use the term dwarf - when they refer to the smaller objects in any given class. For decades it was - believed that M stars were the coolest stars in the Galaxy. Some M stars, - called red dwarfs, make up 70% of the stars in the Galaxy, including our - nearest known neighbor, Proxima Centauri. However, a new class of objects, - even cooler than M stars, was recently discovered and given a spectral type - of L. L-type objects straddle the boundary between red dwarfs and brown - dwarfs, the latter of which are not massive enough to ignite the nuclear - processes necessary for it to shine as a star. L-type objects are typically - very dim stars or brown dwarfs. Even cooler than L-type objects are T-type - objects. These are mostly brown dwarfs and resemble large, massive, - Jupiter-like objects, too large to be planets and typically too small to be - stars. Beyond the T dwarfs are the Y-type objects, which are even more - dim.(Description from URL)

Data Reference: The Brown Dwarf Kinematics - Project (Faherty+ 2019)]] - } -} - - -asset.onInitialize(function() - openspace.addSceneGraphNode(Object) -end) - -asset.onDeinitialize(function() - openspace.removeSceneGraphNode(Object) -end) - -asset.export(Object) - - - -asset.meta = { - Name = "Brown Dwarfs", - Description = "Digital Universe asset for Brown Dwarfs", - Author = "Brian Abbott (AMNH)", - URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", - License = "AMNH Digital Universe" -} diff --git a/data/assets/scene/digitaluniverse/exoplanets.asset b/data/assets/scene/digitaluniverse/exoplanets.asset index 933465dbdb..ec0dcdfdf7 100644 --- a/data/assets/scene/digitaluniverse/exoplanets.asset +++ b/data/assets/scene/digitaluniverse/exoplanets.asset @@ -9,7 +9,7 @@ local speck = asset.resource({ Name = "Exoplanets Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_exoplanets_speck", - Version = 3 + Version = 4 }) @@ -22,7 +22,7 @@ local Object = { Labels = { File = speck .. "expl.label", Color = { 0.3, 0.3, 0.8 }, - Size = 14.8, + Size = 13.75, MinMaxSize = { 10, 100 }, Unit = "pc" }, @@ -40,13 +40,14 @@ local Object = { GUI = { Name = "Exoplanets", Path = "/Milky Way/Exoplanets", - Description = [[Census: 5,361 planets in 3,982 systems. DU Version 20.12.
- Extrasolar planets, or exoplanets, are a relatively new phenomenon in - astronomy. While many astronomers believed in their existence, no - observational evidence was available until 1995. Since that time, scientists - have discovered thousands of systems consisting of one or more planets around - a host star.(Description from URL)

Data Reference: NASA Exoplanet - Archive (CalTech/NASA)]] + Description = [[Extrasolar planets, or exoplanets, are a relatively new phenomenon in + astronomy - no observational evidence was available until 1995. To the eye, + exoplanets are lost in the glare of their host star. Unconventional techniques are + required to infer or observe them. Here, exoplanet systems are represented by a blue + ring centered on each host star. The ring is not intended to signify an orbit, but + serve only as a marker. The labels list the host star name, and if there is more + than one planet, will list the number of planets in parentheses. Census: 5,589 + planets in 4,139 systems.]] } } @@ -65,8 +66,8 @@ asset.export(Object) asset.meta = { Name = "Exoplanets", - Description = "Digital Universe asset for Exoplanets", - Author = "Brian Abbott (AMNH)", + Description = Object.GUI.Description, + Author = "Brian Abbott, Zack Reeves (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/exoplanets_candidates.asset b/data/assets/scene/digitaluniverse/exoplanets_candidates.asset index abca6cf097..91d8dcaba8 100644 --- a/data/assets/scene/digitaluniverse/exoplanets_candidates.asset +++ b/data/assets/scene/digitaluniverse/exoplanets_candidates.asset @@ -9,7 +9,7 @@ local speck = asset.resource({ Name = "Exoplanets Candidates Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_exoplanets_candidates_speck", - Version = 1 + Version = 2 }) @@ -19,13 +19,19 @@ local Object = { Type = "RenderablePointCloud", Enabled = false, Opacity = 0.99, - File = speck .. "exoplanet_candidates.speck", + File = speck .. "expl_candidates.speck", Unit = "pc", Texture = { File = textures .. "halo.png", }, Coloring = { - FixedColor = { 1.0, 1.0, 0.0 } + FixedColor = { 1.0, 1.0, 0.0 }, + ColorMapping = { + File = speck .. "expl_candidates.cmap", + ParameterOptions = { + { Key = "survey_num" } + } + } }, SizeSettings = { ScaleExponent = 17.8, @@ -34,18 +40,16 @@ local Object = { } }, GUI = { - Name = "Planetary Candidates", + Name = "Exoplanetary Candidates", Path = "/Milky Way/Exoplanets", - Description = [[Census: 6,082 stars with candidate planetary systems. DU Version 11.8. -
The exoplanet candidate stars are likely hosts for exoplanets. These are stars - plucked from NASA's Kepler and TESS space telescopes. The Kepler mission was - designed to stare at one spot, roughly twelve degrees across, in the constellation - Cygnus. By staring at one spot, the spacecraft could monitor over 500,000 stars in - that field for subtle variations in brightness. The data included here are the stars - that are considered good candidates to host planets. Rather than represent them + Description = [[The exoplanet candidate stars are likely hosts for exoplanets. These + are stars plucked from NASA's Kepler and TESS space telescopes. Further observations + are needed to confirm a planet's existence. Rather than represent them photo-realistically, with accurate colors, we choose to visualize them as generic, - pure yellow stars. (Description from URL)

Data Reference: NASA Exoplanet - Archive (CalTech/NASA)]] + colored stars. The nature of these stars is not important, it is the sheer numbers + of potential exoplanets that allows us to wonder just how many we will find in the + entire Galaxy. Colors: Yellow denote Kepler candidates, Orange stars are from the K2 + mission, and green stars are from TESS. Census: 7,225 candidate stars.]] } } @@ -63,9 +67,9 @@ asset.export(Object) asset.meta = { - Name = "Planetary Candidates", - Description = "Digital Universe asset for Planetary Candidates", - Author = "Brian Abbott, Emily Rice, and Jason No (AMNH)", + Name = "Exoplanetary Candidates", + Description = Object.GUI.Description, + Author = "Brian Abbott, Zack Reeves, Emily Rice, and Jason No (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/clusters.asset b/data/assets/scene/digitaluniverse/galaxy_clusters.asset similarity index 70% rename from data/assets/scene/digitaluniverse/clusters.asset rename to data/assets/scene/digitaluniverse/galaxy_clusters.asset index 7b8e34a08d..82ca6b29c9 100644 --- a/data/assets/scene/digitaluniverse/clusters.asset +++ b/data/assets/scene/digitaluniverse/galaxy_clusters.asset @@ -21,9 +21,9 @@ local Object = { Labels = { Enabled = true, File = speck .. "galclust.label", - Color = { 1.0, 0.44, 0.0 }, + Color = { 0.9, 0.5, 0.22 }, Size = 22, - MinMaxSize = { 8, 20 }, + MinMaxSize = { 8, 15 }, Unit = "Mpc", TransformationMatrix = TransformMatrix }, @@ -33,12 +33,10 @@ local Object = { }, GUI = { Name = "Galaxy Cluster Labels", - Path = "/Universe/Galaxies", - Description = [[Census 15 galaxy cluster labels. DU Version 1.2.
The Galaxy - clusters dataset is a series of labels that mark where the large clusters of - galaxies are in the nearby universe. These labels must be used in conjunction - with the Tully galaxy group.(Description from URL)

Data Reference: - Brian Abbott (AMNH)]] + Path = "/Universe/Nearby Surveys", + Description = [[The galaxy clusters dataset is a series of labels that mark where the + large clusters of galaxies are in the nearby universe. These labels must be used in + conjunction with the Tully galaxy group. Census: 15 galaxy cluster labels.]] } } @@ -57,7 +55,7 @@ asset.export(Object) asset.meta = { Name = "Galaxy Clusters Labels", - Description = "Digital Universe asset for Galaxy Clusters", + Description = Object.GUI.Description, Author = "Brian Abbott (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" diff --git a/data/assets/scene/digitaluniverse/groups.asset b/data/assets/scene/digitaluniverse/galaxy_groups.asset similarity index 72% rename from data/assets/scene/digitaluniverse/groups.asset rename to data/assets/scene/digitaluniverse/galaxy_groups.asset index 6039b93fca..e56532083a 100644 --- a/data/assets/scene/digitaluniverse/groups.asset +++ b/data/assets/scene/digitaluniverse/galaxy_groups.asset @@ -21,8 +21,8 @@ local Object = { Labels = { Enabled = true, File = speck .. "groups.label", - Color = { 0.1, 0.6, 0.2 }, - Size = 21.5, + Color = { 0.1, 0.4, 0.2 }, + Size = 20.4, MinMaxSize = { 8, 20 }, Unit = "Mpc", TransformationMatrix = TransformMatrix @@ -33,11 +33,10 @@ local Object = { }, GUI = { Name = "Galaxy Group Labels", - Path = "/Universe/Galaxies", - Description = [[Census: 62 galaxy group labels. DU Version 1.2.
The Galaxy - Groups data are a set of labels that mark the nearby galaxy groups. The Milky Way - is in the Local Group, and we are surrounded by many other groups.(Description - from URL)

Data Reference: Brian Abbott (AMNH)]] + Path = "/Universe/Nearby Surveys", + Description = [[The Galaxy Groups data are a set of labels that mark the nearby + galaxy groups. The Milky Way is in the Local Group, and we are surrounded by + many other groups delineated by these labels. Census: 62 galaxy group labels.]] } } @@ -57,7 +56,7 @@ asset.export(Object) asset.meta = { Name = "Galaxy Group Labels", Author = "Brian Abbott (AMNH)", - Description = "Digital Universe asset for Galaxy Groups", + Description = Object.GUI.Description, URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/globularclusters.asset b/data/assets/scene/digitaluniverse/globularclusters.asset index ccc07cc910..c2f97e6a63 100644 --- a/data/assets/scene/digitaluniverse/globularclusters.asset +++ b/data/assets/scene/digitaluniverse/globularclusters.asset @@ -9,7 +9,7 @@ local speck = asset.resource({ Name = "Globular Clusters Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_globularclusters_speck", - Version = 2 + Version = 3 }) @@ -20,7 +20,7 @@ local Object = { Enabled = false, Labels = { File = speck .. "gc.label", - Color = { 0.5, 0.5, 0.0 }, + Color = { 0.36, 0.36, 0.0 }, Size = 16.7, MinMaxSize = { 4, 20 }, Unit = "pc" @@ -28,32 +28,23 @@ local Object = { Coloring = { FixedColor = { 0.8, 0.8, 0.0 } }, - Opacity = 0.4, + Opacity = 0.65, File = speck .. "gc.speck", PolygonSides = 5, Unit = "pc", SizeSettings = { - ScaleExponent = 18.9, + ScaleExponent = 18.6, MaxSize = 13.0, EnableMaxSizeControl = true } }, GUI = { Name = "Globular Clusters", - Path = "/Milky Way", - Description = [[Census: 157 globular clusters. DU Version 2.6.
Globular star - clusters are gravitationally bound groups of 100,000 to 1 million stars. They - are compact, spherical "balls" of stars with very high stellar densities in - their centers (stars near their center are within a light year of one - another). These clusters are typically 30 to 100 light years in diameter. If - Earth were located inside one of these clusters, our sky would be lit by an - abundance of stars brighter than the Sun. The globular clusters form one of - the most complete data sets in the Atlas. Data for the clusters represent - almost all the clusters in our Galaxy—several on the opposite side of Galactic - center may be invisible to us. The clusters orbit the Milky Way in random - orientations, as comets orbit the Sun.(Description from URL)

Data - Reference: Properties of Galactic Globular Clusters, C. Francis+ - (U Cambridge)]] + Path = "/Milky Way/Star Clusters", + Description = [[Globular star clusters are gravitationally bound groups of 100,000 + to 1 million stars. They are compact, spherical "balls" of stars with very high + stellar densities. These clusters are typically 30 to 100 light years in diameter. + Census: 161 globular clusters.]] } } @@ -72,18 +63,8 @@ asset.export(Object) asset.meta = { Name = "Globular Clusters", - Description = [[Census: 157 globular clusters. DU Version 2.6. Globular star clusters - are gravitationally bound groups of 100,000 to 1 million stars. They are compact, - spherical "balls" of stars with very high stellar densities in their centers (stars - near their center are within a light year of one another). These clusters are - typically 30 to 100 light years in diameter. If Earth were located inside one of these - clusters, our sky would be lit by an abundance of stars brighter than the Sun. The - globular clusters form one of the most complete data sets in the Atlas. Data for the - clusters represent almost all the clusters in our Galaxy—several on the opposite side - of Galactic center may be invisible to us. The clusters orbit the Milky Way in random - orientations, as comets orbit the Sun.(Description from URL)

Data Reference: - Properties of Galactic Globular Clusters, C. Francis+ (U Cambridge)]], - Author = "Brian Abbott (AMNH)", + Description = Object.GUI.Description, + Author = "Brian Abbott, Zack Reeves (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/grids.asset b/data/assets/scene/digitaluniverse/grids.asset index c0b5341290..d36526ba0d 100644 --- a/data/assets/scene/digitaluniverse/grids.asset +++ b/data/assets/scene/digitaluniverse/grids.asset @@ -66,84 +66,20 @@ local RadioSphere = { }, GUI = { Name = "Radio Sphere", - Path = "/Other/Grids" - } -} - -local OortSphere = { - Identifier = "OortSphere", - Parent = transforms.SolarSystemBarycenter.Name, - Transform = { - Scale = { - Type = "StaticScale", - Scale = 7.47989845E15 - }, - Rotation = { - Type = "StaticRotation", - Rotation = EclipticRotationMatrix - } - }, - Renderable = { - Type = "RenderableSphericalGrid", - Enabled = false, - Opacity = 0.8, - Color = { 0.8, 0.4, 0.4 }, - LineWidth = 2.0 - }, - GUI = { - Name = "Oort Sphere", - Path = "/Other/Grids" - } -} - -local EclipticSphere = { - Identifier = "EclipticSphere", - Parent = transforms.SolarSystemBarycenter.Name, - Transform = { - Scale = { - Type = "StaticScale", - Scale = 9.46377307652E17 - }, - Rotation = { - Type = "StaticRotation", - Rotation = EclipticRotationMatrix - } - }, - Renderable = { - Type = "RenderableSphericalGrid", - Enabled = false, - Opacity = 1.0, - Color = { 0.74, 0.26, 0.26 }, - LineWidth = 2.0 - }, - GUI = { - Name = "Ecliptic Sphere", - Path = "/Other/Grids" - } -} - -local EclipticSphereLabels = { - Identifier = "EclipticSphereLabels", - Parent = transforms.SolarSystemBarycenter.Name, - Renderable = { - Type = "RenderablePointCloud", - Enabled = false, - Labels = { - Enabled = true, - File = speck .. "eclip.label", - Color = { 0.5, 0.5, 0.5 }, - Size = 14.75, - MinMaxSize = { 1, 50 }, - Unit = "pc", - TransformationMatrix = EclipticTransformationMatrix - }, - Opacity = 0.65, - Unit = "pc", - TransformationMatrix = EclipticTransformationMatrix - }, - GUI = { - Name = "Ecliptic Sphere Labels", - Path = "/Other/Grids" + Path = "/Milky Way/Grids", + Description = [[The radio sphere describes the theoretical extent of Earth's radio + signals in space. Before television carrier waves, early-warning radar first used + in World War II, and the detonation of atomic weapons, Earth was radio-quiet to the + universe (AM and FM radio signals bounce off the atmosphere and do not escape it). + After the use of these and other radio emitters began, in the late 1930s and early + 1940s, signals were able to escape the atmosphere and travel into space at the speed + of light. Since then, we have been broadcasting to the universe. We mention earlier + that this is the theoretical extent of these signals. In reality, these signals + will dissipate rapidly into the ambient cosmic noise of the universe. All light + falls off as the square of the distance, and radio waves are no different. The + signals that emanate from Earth are likely lost in the noise before they leave the + solar system, but the radio sphere remains a visually compelling astronomical + concept.]] } } @@ -153,7 +89,7 @@ local EquatorialSphere = { Transform = { Scale = { Type = "StaticScale", - Scale = 4.28601E17 + Scale = 80 * LightYear }, Rotation = { Type = "StaticRotation", @@ -163,13 +99,16 @@ local EquatorialSphere = { Renderable = { Type = "RenderableSphericalGrid", Enabled = false, - Opacity = 0.8, - Color = { 0.69, 0.68, 0.29 }, - LineWidth = 2.0 + Opacity = 1.0, + Color = { 0.3, 0.3, 0.15 }, + LineWidth = 2.0, + GridSegments = { 18, 24 }, }, GUI = { - Name = "Equatorial Sphere", - Path = "/Other/Grids" + Name = "Equatorial Coordinates", + Path = "/Night Sky/Coordinate Systems/Equatorial", + Description = [[An 80-light-year sphere representing equatorial coordinates (right + ascension and declination).]] } } @@ -193,8 +132,65 @@ local EquatorialSphereLabels = { TransformationMatrix = EquatorialTransformationMatrix }, GUI = { - Name = "Equatorial Sphere Labels", - Path = "/Other/Grids" + Name = "Equatorial Coordinates Labels", + Path = "/Night Sky/Coordinate Systems/Equatorial", + Description = [[Labels on a sphere representing right ascension in hours and + declination in degrees.]] + } +} + +local EclipticSphere = { + Identifier = "EclipticSphere", + Parent = transforms.SolarSystemBarycenter.Name, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 100 * LightYear + }, + Rotation = { + Type = "StaticRotation", + Rotation = EclipticRotationMatrix + } + }, + Renderable = { + Type = "RenderableSphericalGrid", + Enabled = false, + Opacity = 1.0, + Color = { 0.3, 0.15, 0.15 }, + LineWidth = 2.0 + }, + GUI = { + Name = "Ecliptic Coordinates", + Path = "/Night Sky/Coordinate Systems/Ecliptic", + Description = [[A 100-light-year sphere representing ecliptic coordinates (ecliptic + longitude and latitude).]] + } +} + +local EclipticSphereLabels = { + Identifier = "EclipticSphereLabels", + Parent = transforms.SolarSystemBarycenter.Name, + Renderable = { + Type = "RenderablePointCloud", + Enabled = false, + Labels = { + Enabled = true, + File = speck .. "eclip.label", + Color = { 0.5, 0.5, 0.5 }, + Size = 14.5, + MinMaxSize = { 1, 50 }, + Unit = "pc", + TransformationMatrix = EclipticTransformationMatrix + }, + Opacity = 0.65, + Unit = "pc", + TransformationMatrix = EclipticTransformationMatrix + }, + GUI = { + Name = "Ecliptic Coordinates Labels", + Path = "/Night Sky/Coordinate Systems/Ecliptic", + Description = [[Labels on a sphere representing ecliptic longitude and latitude in + degrees.]] } } @@ -204,7 +200,7 @@ local GalacticSphere = { Transform = { Scale = { Type = "StaticScale", - Scale = 9.46377307652E18 + Scale = 1000 * LightYear } }, Renderable = { @@ -212,11 +208,13 @@ local GalacticSphere = { Enabled = false, LineWidth = 2.0, Opacity = 1.0, - Color = { 0.0, 0.6, 0.6 } + Color = { 0.05, 0.25, 0.25 } }, GUI = { - Name = "Galactic Sphere", - Path = "/Other/Grids" + Name = "Galactic Coordinates", + Path = "/Night Sky/Coordinate Systems/Galactic", + Description = [[A 1000-light-year sphere representing galactic coordinates (galactic + longitude and latitude).]] } } @@ -230,7 +228,7 @@ local GalacticSphereLabels = { Enabled = true, File = speck .. "galac.label", Color = { 0.5, 0.5, 0.5 }, - Size = 15.8, + Size = 15.5, MinMaxSize = { 1, 100 }, Unit = "pc" }, @@ -238,8 +236,10 @@ local GalacticSphereLabels = { Unit = "pc" }, GUI = { - Name = "Galactic Sphere Labels", - Path = "/Other/Grids" + Name = "Galactic Coordinates Labels", + Path = "/Night Sky/Coordinate Systems/Galactic", + Description = [[Labels on a sphere representing galactic longitude and latitude in + degrees.]] } } @@ -258,7 +258,7 @@ local Plane1lh = { Labels = { File = speck .. "1lh.label", Color = { 0.0, 0.2, 0.5 }, - Size = 9.5, + Size = 8.9, MinMaxSize = { 0, 30 }, Unit = "Km" }, @@ -269,8 +269,9 @@ local Plane1lh = { Size = { 2 * LightHour, 2 * LightHour } }, GUI = { - Name = "1lh Grid", - Path = "/Other/Grids", + Name = "1-light-hour Grid", + Path = "/Solar System/Grids", + Description = [[A 1-light-hour Cartesian grid aligned on the plane of the Solar System.]], OrderingNumber = LightHour } } @@ -301,8 +302,9 @@ local Plane1ld = { Size = { 2 * LightDay, 2 * LightDay } }, GUI = { - Name = "1ld Grid", - Path = "/Other/Grids", + Name = "1-light-day Grid", + Path = "/Solar System/Grids", + Description = [[A 1-light-day Cartesian grid aligned on the plane of the Solar System.]], OrderingNumber = LightDay } } @@ -333,8 +335,9 @@ local Plane1lm = { Size = { 2 * LightMonth, 2 * LightMonth } }, GUI = { - Name = "1lm Grid", - Path = "/Other/Grids", + Name = "1-light-month Grid", + Path = "/Solar System/Grids", + Description = [[A 1-light-month Cartesian grid aligned on the plane of the Solar System.]], OrderingNumber = LightMonth } } @@ -365,8 +368,9 @@ local Plane1ly = { Size = { 2 * LightYear, 2 * LightYear } }, GUI = { - Name = "1ly Grid", - Path = "/Other/Grids", + Name = "1-light-year Grid", + Path = "/Solar System/Grids", + Description = [[A 1-light-year Cartesian grid aligned on the plane of the Solar System.]], OrderingNumber = LightYear } } @@ -397,8 +401,9 @@ local Plane10ly = { Size = { 10 * 2 * LightYear, 10 * 2 * LightYear } }, GUI = { - Name = "10ly Grid", - Path = "/Other/Grids", + Name = "10-light-year Grid", + Path = "/Milky Way/Grids", + Description = [[A 10-light-year Cartesian grid aligned on the plane of the Solar System.]], OrderingNumber = 10 * LightYear } } @@ -429,8 +434,9 @@ local Plane100ly = { Size = { 100 * 2 * LightYear, 100 * 2 * LightYear } }, GUI = { - Name = "100ly Grid", - Path = "/Other/Grids", + Name = "100-light-year Grid", + Path = "/Milky Way/Grids", + Description = [[A 100-light-year Cartesian grid aligned on the plane of the Solar System.]], OrderingNumber = 100 * LightYear } } @@ -461,8 +467,9 @@ local Plane1kly = { Size = { 1000 * 2 * LightYear, 1000 * 2 * LightYear } }, GUI = { - Name = "1kly Grid", - Path = "/Other/Grids", + Name = "1,000-light-year Grid", + Path = "/Milky Way/Grids", + Description = [[A 1,000-light-year Cartesian grid aligned on the plane of the Solar System.]], OrderingNumber = 1000 * LightYear } } @@ -493,8 +500,9 @@ local Plane10kly = { Size = { 10000 * 2 * LightYear, 10000 * 2 * LightYear } }, GUI = { - Name = "10kly Grid", - Path = "/Other/Grids", + Name = "10,000-light-year Grid", + Path = "/Milky Way/Grids", + Description = [[A 10,000-light-year Cartesian grid aligned on the plane of the Solar System.]], OrderingNumber = 10000 * LightYear } } @@ -507,7 +515,7 @@ local Plane100kly = { Labels = { File = speck .. "100kly.label", Color = { 0.0, 0.2, 0.5 }, - Size = 18.6, + Size = 18.0, MinMaxSize = { 0, 30 }, Unit = "Mpc" }, @@ -520,8 +528,9 @@ local Plane100kly = { Size = { 100000 * 2 * LightYear, 100000 * 2 * LightYear } }, GUI = { - Name = "100kly Grid", - Path = "/Other/Grids", + Name = "100,000-light-year Grid", + Path = "/Universe/Grids", + Description = [[A 100,000-light-year Cartesian grid aligned on the plane of the Milky Way.]], OrderingNumber = 100000 * LightYear } } @@ -534,7 +543,7 @@ local Plane1Mly = { Labels = { File = speck .. "1Mly.label", Color = { 0.0, 0.2, 0.5 }, - Size = 19.6, + Size = 19.0, MinMaxSize = { 0, 30 }, Unit = "Mpc" }, @@ -547,8 +556,9 @@ local Plane1Mly = { Size = { 1E6 * 2 * LightYear, 1E6 * 2 * LightYear } }, GUI = { - Name = "1Mly Grid", - Path = "/Other/Grids", + Name = "1-million-light-year Grid", + Path = "/Universe/Grids", + Description = [[A 1-million-light-year Cartesian grid aligned on the plane of the Milky Way.]], OrderingNumber = 1E6 * LightYear } } @@ -561,7 +571,7 @@ local Plane10Mly = { Labels = { File = speck .. "10Mly.label", Color = { 0.0, 0.2, 0.5 }, - Size = 20.6, + Size = 20.3, MinMaxSize = { 0, 30 }, Unit = "Mpc" }, @@ -574,8 +584,9 @@ local Plane10Mly = { Size = { 10E6 * 2 * LightYear, 10E6 * 2 * LightYear } }, GUI = { - Name = "10Mly Grid", - Path = "/Other/Grids", + Name = "10-million-light-year Grid", + Path = "/Universe/Grids", + Description = [[A 10-million-light-year Cartesian grid aligned on the plane of the Milky Way.]], OrderingNumber = 10E6 * LightYear } } @@ -588,7 +599,7 @@ local Plane100Mly = { Labels = { File = speck .. "100Mly.label", Color = { 0.0, 0.2, 0.5 }, - Size = 21.6, + Size = 20.9, MinMaxSize = { 0, 30 }, Unit = "Mpc" }, @@ -601,8 +612,9 @@ local Plane100Mly = { Size = { 100E6 * 2 * LightYear, 100E6 * 2 * LightYear } }, GUI = { - Name = "100Mly Grid", - Path = "/Other/Grids", + Name = "100-million-light-year Grid", + Path = "/Universe/Grids", + Description = [[A 100-million-light-year Cartesian grid aligned on the plane of the Milky Way.]], OrderingNumber = 100E6 * LightYear } } @@ -615,7 +627,7 @@ local Plane20Gly = { Labels = { File = speck .. "20Gly.label", Color = { 0.0, 0.2, 0.5 }, - Size = 23.6, + Size = 23.1, MinMaxSize = { 0, 30 }, Unit = "Mpc" }, @@ -628,8 +640,9 @@ local Plane20Gly = { Size = { 20E9 * 2 * LightYear, 20E9 * 2 * LightYear } }, GUI = { - Name = "20Gly Grid", - Path = "/Other/Grids", + Name = "20-billion-light-year Grid", + Path = "/Universe/Grids", + Description = [[A 20-billion-light-year Cartesian grid aligned on the plane of the Milky Way.]], OrderingNumber = 20E9 * LightYear } } @@ -637,7 +650,6 @@ local Plane20Gly = { asset.onInitialize(function() openspace.addSceneGraphNode(RadioSphere) - openspace.addSceneGraphNode(OortSphere) openspace.addSceneGraphNode(EclipticSphere) openspace.addSceneGraphNode(EclipticSphereLabels) openspace.addSceneGraphNode(EquatorialSphere) @@ -679,12 +691,10 @@ asset.onDeinitialize(function() openspace.removeSceneGraphNode(EquatorialSphere) openspace.removeSceneGraphNode(EclipticSphereLabels) openspace.removeSceneGraphNode(EclipticSphere) - openspace.removeSceneGraphNode(OortSphere) openspace.removeSceneGraphNode(RadioSphere) end) asset.export(RadioSphere) -asset.export(OortSphere) asset.export(EclipticSphere) asset.export(EclipticSphereLabels) asset.export(EquatorialSphere) @@ -709,13 +719,14 @@ asset.export(Plane20Gly) asset.meta = { Name = "Grids", - Description = [[Various grids for showing size reference. Included: 10,000 light year - grid, 10 light year grid, 20 billion light year grid, 10 million light year grid, - 100 light year grid, 100 million light year grid, Ecliptic Coordinate Sphere - (500-light-year radius), Galactic Coordinate Sphere (1000-light-year radius), - Galaxy Coordinate Grid, Celestial Coordinates / Radio Sphere (dynamic radius), 1 - billion light year grid, Celestial Coordinate Sphere (1000000-light-year radius), - 1,000 light year grid, 1 million light year grid, 1 light year grid]], + Description = [[Various grids and spheres for showing size reference. Included: + 10,000 light year grid, 10 light year grid, 20 billion light year grid, 10 million + light year grid, 100 light year grid, 100 million light year grid, Ecliptic + Coordinate Sphere (500-light-year radius), Galactic Coordinate Sphere + (1000-light-year radius), Galaxy Coordinate Grid, Celestial Coordinates / Radio Sphere + (dynamic radius), 1 billion light year grid, Celestial Coordinate Sphere + (1000000-light-year radius), 1,000 light year grid, 1 million light year grid, + 1 light year grid.]], Author = "Brian Abbott (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" diff --git a/data/assets/scene/digitaluniverse/h2regions.asset b/data/assets/scene/digitaluniverse/h2regions.asset index 000ca7c6f1..21f88f9a7f 100644 --- a/data/assets/scene/digitaluniverse/h2regions.asset +++ b/data/assets/scene/digitaluniverse/h2regions.asset @@ -9,7 +9,7 @@ local speck = asset.resource({ Name = "HII Regions Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_h2regions_speck", - Version = 3 + Version = 4 }) @@ -33,25 +33,23 @@ local Object = { PolygonSides = 6, Unit = "pc", SizeSettings = { - ScaleExponent = 18.24, + ScaleExponent = 18.5, MaxSize = 8.0, EnableMaxSizeControl = true } }, GUI = { Name = "HII Regions", - Path = "/Milky Way", - Description = [[Census: 1,271 nebulae. DU Version 4.6.
H ii (pronounced - H-two) regions are stellar nurseries for newborn stars. Stars are born from - condensing clouds of hydrogen gas. As these clouds condense, the densities - become high enough to form stars. From Earth's perspective, you'll notice that - the H ii regions all lie close to the Galactic plane. This is not an accident - of nature. These star-forming regions lie in the plane of the Galaxy because - that is where star formation occurs in spiral galaxies such as our Milky Way. - Because of this, they are great tracers of the spiral arms of the Galaxy, and - were instrumental in our understanding of the Galaxy's overall structure - (Description from URL)

Data Reference: The WISE catalog of Galactic - HII Regions (Anderson+, 2014)]] + Path = "/Milky Way/Nebulae", + Description = [[HII (pronounced "H-two") regions are stellar nurseries for newborn + stars. Stars are born from condensing clouds of hydrogen gas. As these clouds + condense, the densities become high enough to form stars. An HII region is the + surrounding clouds of hydrogen that glow from the stars born within them. The + result is a bright, glowing nebula which is seen to great distances. One local + celebrity among HII regions is the Orion Nebula (M42). These star-forming regions + lie in the plane of the Galaxy because that is where star formation occurs in + spiral galaxies such as our Milky Way. Because of this, they are great tracers of + the spiral arms of the Galaxy. Census: 1,108 star-forming regions.]] } } @@ -70,8 +68,7 @@ asset.export(Object) asset.meta = { Name = "HII Regions", - Description = "Digital Universe asset for HII Regions", - Author = "Carter Emmart, Brian Abbott (AMNH)", + Description = Object.GUI.Description, URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/localdwarfs.asset b/data/assets/scene/digitaluniverse/local_group_dwarfs.asset similarity index 55% rename from data/assets/scene/digitaluniverse/localdwarfs.asset rename to data/assets/scene/digitaluniverse/local_group_dwarfs.asset index 23ad7fadb8..4535910ce0 100644 --- a/data/assets/scene/digitaluniverse/localdwarfs.asset +++ b/data/assets/scene/digitaluniverse/local_group_dwarfs.asset @@ -23,12 +23,12 @@ local Object = { Labels = { File = speck .. "localgroup.label", Color = { 0.3, 0.3, 1.0 }, - Size = 18.3, + Size = 18.4, MinMaxSize = { 7, 20 }, Unit = "Mpc" }, Coloring = { - FixedColor = { 0.0, 1.0, 0.0 }, + FixedColor = { 0.5, 1.0, 1.0 }, ColorMapping = { File = speck .. "localgroup.cmap", ParameterOptions = { @@ -39,25 +39,25 @@ local Object = { PolygonSides = 12, Unit = "Mpc", SizeSettings = { - ScaleExponent = 20.2, + ScaleExponent = 20.77, MaxSize = 0.7, EnableMaxSizeControl = true } }, GUI = { Name = "Local Group", - Path = "/Universe/Galaxies", - Description = [[Census: 102 galaxies. DU Version 6.4.
A group of galaxies is - a small number of large galaxies that are typically surrounded by a large - number of small galaxies. The Milky Way belongs to the Local Group, and is one - of roughly 100 galaxies in that group. The Milky Way, the Andromeda Galaxy - (also known as Messier 31, or M31), and the Triangulum Galaxy (M33) are three - of the largest galaxies in the Local Group. Each is a spiral galaxy containing - hundreds of billions of stars. Surrounding the Milky Way and Andromeda are a - bevy of dwarf galaxies-smaller, often irregular galaxies, that contain - hundreds of millions to a few billion stars. (Description from URL)

- Data Reference: Properties of dwarf galaxies in the Local Group - (McConnachie+, 2012)]] + Path = "/Universe/Nearby Surveys", + Description = [[A group of galaxies is typically composed of a small number of large + galaxies that are surrounded by a large number of small galaxies. The Milky Way + belongs to the Local Group, and is one of roughly 100 galaxies in that group. The + Milky Way, the Andromeda Galaxy (also known as Messier 31, or M31), and the + Triangulum Galaxy (M33) are three of the largest galaxies in the Local Group. Each + is a spiral galaxy containing hundreds of billions of stars. Surrounding the Milky + Way and Andromeda are a bevy of dwarf galaxies--smaller, often irregular galaxies, + that contain hundreds of millions to a few billion stars. Colors: Aqua are galaxies + associated with the Milky Way, Yellow shows galaxies huddled around the Andromeda + Galaxy, Green are other Local Group members, and Gray are neighboring galaxies not + in the Local Group. Census: 102 galaxies.]] } } @@ -76,7 +76,7 @@ asset.export(Object) asset.meta = { Name = "Local Group", - Description = "Digital Universe asset for the Local Goup", + Description = Object.GUI.Description, Author = "Brian Abbott (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" diff --git a/data/assets/scene/digitaluniverse/milkyway.asset b/data/assets/scene/digitaluniverse/milkyway.asset index 64ff019b9a..dd9cf291d0 100644 --- a/data/assets/scene/digitaluniverse/milkyway.asset +++ b/data/assets/scene/digitaluniverse/milkyway.asset @@ -39,15 +39,14 @@ local Object = { }, GUI = { Name = "Milky Way Galaxy Image", - Path = "/Milky Way", - Description = [[Census: 1 image. DU Version 2.2.
The exterior view of the - Milky Way is simply a two-dimensional image. The image is that of NGC 1232, a - galaxy thought to resemble our Milky Way. The image has been properly sized - and approximately oriented to function as a placeholder, allowing one to see - the context of the Galaxy relative to other data in the atlas. The features - you see in the image, of course, do not represent our Galaxy, per se, but - resemble similar features found in our Galaxy.(Description from URL) -

Data Reference: European Southern Observatory]] + Path = "/Milky Way/Galaxy", + Description = [[The exterior view of the Milky Way is represented here by a + two-dimensional image. The image is that of NGC 1232, a galaxy thought to resemble + our Milky Way. The image has been properly sized and approximately oriented to + function as a placeholder, allowing one to see the context of the Galaxy relative + to other data in the atlas. The features you see in the image, of course, do not + represent our Galaxy, per se, but resemble similar features found in our Galaxy. + Census: 1 image.]] } } @@ -66,8 +65,7 @@ asset.export(Object) asset.meta = { Name = "MilkyWay Galaxy", - Description = [[Digital Universe asset containt 2D image of the MilkyWay. For - extragalactic viewing]], + Description = Object.GUI.Description, Author = "Brian Abbott, Carter Emmart (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" diff --git a/data/assets/scene/digitaluniverse/milkyway_arm_labels.asset b/data/assets/scene/digitaluniverse/milkyway_arm_labels.asset index d55bc511a7..10e31e117c 100644 --- a/data/assets/scene/digitaluniverse/milkyway_arm_labels.asset +++ b/data/assets/scene/digitaluniverse/milkyway_arm_labels.asset @@ -40,12 +40,15 @@ local Object = { }, GUI = { Name = "Milky Way Arms Labels", - Path = "/Milky Way", - Description = [[Census: 1 image. DU Version: 1.2. This image contains labels for - the Milky Way's spiral arms. We label them in this manner ("hard coding" the - labels into an image rather than having native labels) so that they can retain - their size, shape, and location as they overlay the galaxy. (Description from - Digital Universe Data Profiles)]] + Path = "/Milky Way/Galaxy", + Description = [[This is an image that contains labels for the Milky Way's spiral + arms. We label them in this manner--"hard-coding" the labels into an image rather + than having native labels--so that they can retain their size, shape, and location + as they overlay the galaxy. These labels are designed to be a guide, and they map + more accurately to the various datasets in the Digital Universe. For example, the + pulsars, the star-forming (HII) regions, and open clusters all show the local spiral + structure. We can use trends in these data sets to map the arms of the Milky Way. + Census: 1 image.]] } } @@ -64,27 +67,8 @@ asset.export(Object) asset.meta = { Name = "Milky Way Arms Labels", - Description = "Image with arm labels for the Milky Way galaxy", + Description = Object.GUI.Description, Author = "Brian Abbott (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", - License = [[Copyright © American Museum of Natural History. All rights reserved. -

Downloading the Atlas: AMNH offers the Atlas free of charge via our - website, http://www.haydenplanetarium.org/. The User is free to download and/or - duplicate verbatim copies of the Atlas provided this license and copyright - information accompany the Atlas.

Modifying the Atlas: The user is free to - modify the Atlas by either adding data or altering existing data, provided it is - for personal use only. Once the user modifies the Atlas, it is no longer part of - AMNH's Atlas and cannot be used publicly alongside or within the Atlas without - written permission from AMNH.

Distributing the Atlas: The user is - forbidden to distribute and use the Atlas for profit, as part of a software and/or - production system that will subsequently be redistributed, or for public - consumption (via print, electronic media, or broadcast/produced pieces) without - written permission from AMNH.

Neither the names of American Museum of - Natural History and Hayden Planetarium nor the names of their contributors may be - used to endorse or promote products derived from this Atlas without specific, - prior written permission.

The Atlas is free but is offered WITHOUT ANY - WARRANTY of any kind. We provide the Atlas as is and take no responsibility for - any damage resulting from the use of this Atlas. The entire risk as to the quality - and performance of this product is with the user.

For more information, - please visit http://www.haydenplanetarium.org/universe]] + License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/milkyway_label.asset b/data/assets/scene/digitaluniverse/milkyway_label.asset index 68b6b07559..41a7752969 100644 --- a/data/assets/scene/digitaluniverse/milkyway_label.asset +++ b/data/assets/scene/digitaluniverse/milkyway_label.asset @@ -13,7 +13,7 @@ local TransformMatrix = { } -local HomeLabel = { +local Object = { Identifier = "HomeLabel", Renderable = { Type = "RenderablePointCloud", @@ -30,27 +30,28 @@ local HomeLabel = { }, GUI = { Name = "Home Label", - Path = "/Universe/Galaxies", - Description = "Label for the Milky Way titled 'Home', sided for the galactic level" + Path = "/Universe/Nearby Surveys", + Description = [[Label for the Milky Way titled 'Home', sized for viewing outside + the Milky Way Galaxy.]] } } asset.onInitialize(function() - openspace.addSceneGraphNode(HomeLabel) + openspace.addSceneGraphNode(Object) end) asset.onDeinitialize(function() - openspace.removeSceneGraphNode(HomeLabel) + openspace.removeSceneGraphNode(Object) end) -asset.export(HomeLabel) +asset.export(Object) asset.meta = { Name = "Home Label", - Description = "Label for the Milky Way titled 'Home', sided for the galactic level", + Description = Object.GUI.Description, Author = "OpenSpace Team", URL = "http://openspaceproject.com", License = "MIT license" diff --git a/data/assets/scene/digitaluniverse/milkyway_sphere.asset b/data/assets/scene/digitaluniverse/milkyway_sphere.asset deleted file mode 100644 index 3bb9723354..0000000000 --- a/data/assets/scene/digitaluniverse/milkyway_sphere.asset +++ /dev/null @@ -1,57 +0,0 @@ -local sphereTextures = asset.resource({ - Name = "Milky Way Sphere Textures", - Type = "HttpSynchronization", - Identifier = "milkyway_textures", - Version = 2 -}) - - -local Sphere = { - Identifier = "MilkyWay", - Transform = { - Rotation = { - Type = "StaticRotation", - Rotation = { 0, 0, math.pi } - } - }, - Renderable = { - Type = "RenderableSphereImageLocal", - Size = 9.2E21, - Segments = 40, - Opacity = 0.25, - Texture = sphereTextures .. "DarkUniverse_mellinger_4k.jpg", - Orientation = "Inside", - MirrorTexture = true, - FadeOutThreshold = 0.0015, - Background = true, - DimInAtmosphere = true - }, - Tag = { "daytime_hidden" }, - GUI = { - Name = "Milky Way Sphere", - Path = "/Milky Way", - Description = [[All sky image of the Milky Way that is visible when inside. Fades - out when zooming away from the Milky Way]] - } -} - - -asset.onInitialize(function() - openspace.addSceneGraphNode(Sphere) -end) - -asset.onDeinitialize(function() - openspace.removeSceneGraphNode(Sphere) -end) - -asset.export(Sphere) - - - -asset.meta = { - Name = "Milky Way Galaxy Sphere", - Description = "All sky image of the Milky Way", - Author = "OpenSpace Team", - URL = "http://openspaceproject.com", - License = "MIT license" -} diff --git a/data/assets/scene/digitaluniverse/obassociations.asset b/data/assets/scene/digitaluniverse/obassociations.asset index c8ceffb51d..ad3a01a619 100644 --- a/data/assets/scene/digitaluniverse/obassociations.asset +++ b/data/assets/scene/digitaluniverse/obassociations.asset @@ -48,18 +48,14 @@ local Object = { }, GUI = { Name = "OB Associations", - Path = "/Milky Way", - Description = [[Census: 61 OB associations. DU Version 2.4.
OB associations - are young groups of stars that were formed within a giant molecular cloud, but - have dispersed after the original gas and dust from the cloud was blown away - by the star's radiation pressure. Although an association's stars are no - longer gravitationally bound to one another, they share a common motion in - space because they were formed from the same cloud. This allows astronomers to - easily determine OB association membership stars. These objects are color - coded by their spiral arm membership. Blue associations trace the Sagittarius - Arm. Purple associations are in the local Orion Spur. Orange associations are - in the Perseus Arm (Description from URL)

Data Reference: New List of - OB Associations (Melnik+)]] + Path = "/Milky Way/Star Clusters", + Description = [[Stellar associations are loose agglomerations of stars that form from + the same gas cloud. OB associations typically have on the order of dozens of O and + B stars in them (hotter, massive, younger stars) in addition to cooler stars. Over + time the stars dispurse and the association is less concentrated. These associations + track relatviey recent star formation. Colors: Blue trace the Sagittarius Arm, + Purple are in the local Orion Spur, and Orange are in the Perseus Arm. Census: 61 OB + associations.]] } } @@ -78,8 +74,8 @@ asset.export(Object) asset.meta = { Name = "OB Associations", - Description = "Digital Universe asset for OB Associations", - Author = "Brian Abbott (AMNH)", + Description = Object.GUI.Description, + Author = "Brian Abbott, Zack Reeves (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/oort_cloud.asset b/data/assets/scene/digitaluniverse/oort_cloud.asset new file mode 100644 index 0000000000..52c9e45384 --- /dev/null +++ b/data/assets/scene/digitaluniverse/oort_cloud.asset @@ -0,0 +1,72 @@ +local transforms = asset.require("scene/solarsystem/sun/transforms") + + + +local speck = asset.resource({ + Name = "Grids Speck Files", + Type = "HttpSynchronization", + Identifier = "digitaluniverse_grids_speck", + Version = 3 +}) + + +local EclipticRotationMatrix = { + -0.05487554, 0.4941095, -0.8676661, + -0.9938214 , -0.1109906, -0.0003515167, + -0.09647644, 0.8622859, 0.4971472 +} + +local Object = { + Identifier = "OortSphere", + Parent = transforms.SolarSystemBarycenter.Name, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 7.47989845E15 + }, + Rotation = { + Type = "StaticRotation", + Rotation = EclipticRotationMatrix + } + }, + Renderable = { + Type = "RenderableSphericalGrid", + Enabled = false, + Opacity = 0.8, + Color = { 0.4, 0.3, 0.2 }, + LineWidth = 2.0, + Segments = 24 + }, + GUI = { + Name = "Oort Sphere", + Path = "/Solar System/Comets", + Description = [[The Oort cloud is a region of space surrounding the Sun where comets + are believed to originate. It is believed to extend from 20,000-100,000 Astronomical + Units (AU), with its greatest concentration around 50,000 AU (1 AU is the average + Earth-Sun distance, which equals 149 million kilometers, or 93 million miles). We + represent the Oort cloud with a 50,000-AU-radius, wire-frame sphere representing + the location of the central concentration. Fifty thousand astronomical units is + equal to about 10 light months, which is 0.8 light years, or 4.8 trillion miles.]] + } +} + + +asset.onInitialize(function() + openspace.addSceneGraphNode(Object) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Object) +end) + +asset.export(Object) + + + +asset.meta = { + Name = "Oort Cloud Sphere", + Description = Object.GUI.Description, + Author = "Brian Abbott (AMNH)", + URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", + License = "AMNH Digital Universe" +} diff --git a/data/assets/scene/digitaluniverse/openclusters.asset b/data/assets/scene/digitaluniverse/openclusters.asset index 6069a90547..035b42cda3 100644 --- a/data/assets/scene/digitaluniverse/openclusters.asset +++ b/data/assets/scene/digitaluniverse/openclusters.asset @@ -9,7 +9,7 @@ local speck = asset.resource({ Name = "Open Clusters Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_openclusters_speck", - Version = 3 + Version = 4 }) @@ -20,39 +20,33 @@ local Object = { Enabled = false, Labels = { File = speck .. "oc.label", - Color = { 0.05, 0.4, 0.2 }, + Color = { 0.0, 0.36, 0.14 }, Size = 15.5, MinMaxSize = { 4, 30 }, Unit = "pc" }, Coloring = { - FixedColor = { 0.1, 0.8, 0.4 } + FixedColor = { 0.13, 0.99, 0.50 } }, - Opacity = 0.5, + Opacity = 0.9, File = speck .. "oc.speck", Unit = "pc", PolygonSides = 12, SizeSettings = { - ScaleExponent = 17.6, + ScaleExponent = 17.8, MaxSize = 23.0, EnableMaxSizeControl = true } }, GUI = { Name = "Open Star Clusters", - Path = "/Milky Way", - Description = [[Census: 1,867 clusters. DU Version 7.8.
An open star cluster is a - loose assemblage of stars numbering from hundreds to thousands that are bound by - their mutual gravitation. Astronomers know from their stellar spectra that stars in - open clusters are typically young. (With a star's spectrum, we can determine the - spectral type and the luminosity class, revealing the star's age.) Because these are + Path = "/Milky Way/Star Clusters", + Description = [[An open star cluster is a loose assemblage of stars numbering from + hundreds to thousands that are bound by their mutual gravitation. Because these are young stars, we expect to see them in the star-forming regions of our Galaxy, namely in the spiral arms. For this reason, open clusters exist, for the most part, in the - plane of the Galaxy, where we view the arms edge-on as that band of light in the - night sky. Because of this, open clusters were originally known as Galactic - clusters, but this term fell out of favor once astronomers began to understand that - the Galaxy includes objects beyond the Milky Way's disk.

Data Reference: - Galactic spiral structure revealed by Gaia EDR3 (Poggio+, 2021)]] + plane of the Galaxy and indicate relatively recent star formation. Census: 1,867 star + clusters.]] } } @@ -71,8 +65,8 @@ asset.export(Object) asset.meta = { Name = "Open Star Clusters", - Description = "Digital Universe asset for Open Star Clusters", - Author = "Brian Abbott (AMNH)", + Description = Object.GUI.Description, + Author = "Brian Abbott, Zack Reeves (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/planetarynebulae.asset b/data/assets/scene/digitaluniverse/planetarynebulae.asset index 09b64c8215..68ce205538 100644 --- a/data/assets/scene/digitaluniverse/planetarynebulae.asset +++ b/data/assets/scene/digitaluniverse/planetarynebulae.asset @@ -9,7 +9,7 @@ local speck = asset.resource({ Name = "Planetary Nebulae Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_planetarynebulae_speck", - Version = 2 + Version = 3 }) @@ -20,7 +20,7 @@ local Object = { Enabled = false, Labels = { File = speck .. "pn.label", - Color = { 0.25, 0.25, 0.65 }, + Color = { 0.35, 0.35, 0.60 }, Size = 16.24, MinMaxSize = { 4, 25 }, Unit = "pc" @@ -28,27 +28,29 @@ local Object = { Coloring = { FixedColor = { 0.4, 0.4, 0.9 } }, - Opacity = 0.65, + Opacity = 0.99, File = speck .. "pn.speck", PolygonSides = 3, Unit = "pc", SizeSettings = { - ScaleExponent = 18.46, + ScaleExponent = 18.2, MaxSize = 19.0, EnableMaxSizeControl = true } }, GUI = { Name = "Planetary Nebulae", - Path = "/Milky Way", - Description = [[Census: 283 nebulae. DU Version 2.8.
A planetary nebula is an - expanding shell of gas ejected from a star late in its life cycle. Appearing - like greenish disks to a telescopic observer, planetary nebulae received their - name from their resemblance to the gaseous planets of our solar system. In no - way are they related to planets, rather, they are products of dying stars. - (Description from URL)

Data Reference: Planetary Nebulae distances - in Gaia DR2 (Kimeswenger+, 2018), Strasbourg-ESO Catalog of Planetary Nebulae - (Acker+ 1992)]] + Path = "/Milky Way/Nebulae", + Description = [[A planetary nebula is an expanding shell of gas ejected from an + average-sized star late in its life cycle. Appearing like greenish disks to a + telescopic observer, planetary nebulae received their name from their resemblance to + the gaseous planets of our solar system. In no way are they related to planets, + rather, they are products of dying stars. As the gas from the star expands, it + sweeps up the cooler gas like a snowplow. The gas glows because of the ultraviolet + light from the stellar remnant at the center. Because the planetary nebula phase of + a star's evolution is relatively short, we observe only those that have occurred + recently in the younger stellar population. Therefore, we expect to see planetary + nebulae in the disk of the Galaxy. Census: 1,657 planetary nebulae.]] } } @@ -67,8 +69,8 @@ asset.export(Object) asset.meta = { Name = "Planetary Nebulae", - Description = "Digital Universe asset for Planetary Nebulae", - Author = "Brian Abbott (AMNH)", + Description = Object.GUI.Description, + Author = "Brian Abbott, Zack Reeves (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/pulsars.asset b/data/assets/scene/digitaluniverse/pulsars.asset index 6e40f56363..82be71fa9b 100644 --- a/data/assets/scene/digitaluniverse/pulsars.asset +++ b/data/assets/scene/digitaluniverse/pulsars.asset @@ -9,7 +9,7 @@ local speck = asset.resource({ Name = "Pulsars Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_pulsars_speck", - Version = 2 + Version = 3 }) @@ -19,9 +19,9 @@ local Object = { Type = "RenderablePolygonCloud", Enabled = false, Labels = { - File = speck .. "pulsar.label", - Color = { 0.7, 0.2, 0.2 }, - Size = 15.77, + File = speck .. "pulsars.label", + Color = { 0.75, 0.21, 0.21 }, + Size = 15.27, MinMaxSize = { 4, 20 }, Unit = "pc" }, @@ -29,30 +29,27 @@ local Object = { FixedColor = { 0.7, 0.0, 0.0 } }, Opacity = 1.0, - File = speck .. "pulsar.speck", + File = speck .. "pulsars.speck", PolygonSides = 4, Unit = "pc", SizeSettings = { - ScaleExponent = 18.4, + ScaleExponent = 18.1, MaxSize = 19.0, EnableMaxSizeControl = true } }, GUI = { Name = "Pulsars", - Path = "/Milky Way", - Description = [[Census: 2,498 pulsars. DU Version 5.6.
Upon death, stars - leave behind one of three possible remnants: a white dwarf, a neutron star, or - a black hole. Stars that are more massive than the sun will often become - neutron stars in a violent explosion called a supernova. During a supernova, - the core of the star collapses under such high pressure that the electrons, - which normally remain outside the atomic nucleus, are forced to combine with - the protons in the nucleus. Atomic nuclei break apart, producing what is - called a degenerate state of matter. The collapse is halted when the material - cannot be packed any tighter. At this point, the star has a radius of about - 10-15 kilometers. The density of this material is so high that a teaspoonful - would weigh about 100 million tons on Earth. (Description from URL)

- Data Reference: ATNF Pulsar Catalogue, (Manchester+, 2005)]] + Path = "/Milky Way/Stellar Remnants", + Description = [[A pulsar is a spinning neutron star, an ultra-dense stellar remnant + resulting from a supernova-driven collapse of the stellar core. Upon death, stars + leave behind one of three possible remnants: a white dwarf, a neutron star, or a + black hole. Stars that are more massive than the sun will often become neutron + stars in a violent explosion called a supernova. Pulsars are not pulsing but are + spinning neutron stars whose beams of radiation point toward Earth just as a + lighthouse sweeps the horizon. Their strong magnetic fields funnel beams of light + from its poles. When these beams point to Earth, we see a strong radio signal. + Census: 3,221 pulsars.]] } } @@ -71,8 +68,8 @@ asset.export(Object) asset.meta = { Name = "Pulsars", - Description = "Digital Universe asset for Pulsars", - Author = "Brian Abbott (AMNH)", + Description = Object.GUI.Description, + Author = "Brian Abbott, Zack Reeves (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/quasars.asset b/data/assets/scene/digitaluniverse/quasars.asset index 7815c2acdb..d9482df27a 100644 --- a/data/assets/scene/digitaluniverse/quasars.asset +++ b/data/assets/scene/digitaluniverse/quasars.asset @@ -1,15 +1,15 @@ local textures = asset.resource({ - Name = "Quasars Textures", + Name = "Point Textures", Type = "HttpSynchronization", - Identifier = "digitaluniverse_quasars_textures", - Version = 2 + Identifier = "digitaluniverse_point_textures", + Version = 1 }) local speck = asset.resource({ Name = "Quasars Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_quasars_speck", - Version = 2 + Version = 3 }) local colormaps = asset.resource({ @@ -26,7 +26,7 @@ local Object = { Type = "RenderablePointCloud", Enabled = true, Opacity = 0.95, - File = speck .. "quasars.speck", + File = speck .. "qso.speck", Texture = { File = textures .. "point3A.png", }, @@ -35,14 +35,12 @@ local Object = { FadeInDistances = { 1000.0, 10000.0 } -- Fade in value in the same unit as "Unit" }, Coloring = { - FixedColor = { 1.0, 0.4, 0.2 }, + FixedColor = { 0.85, 0.35, 0.18 }, ColorMapping = { Enabled = false, File = colormaps .. "viridis.cmap", ParameterOptions = { - { Key = "distMpc", Range = { 440.5, 8852.099609 } }, - { Key = "redshift", Range = { 0.102, 7.085 } }, - { Key = "Tlookback", Range = { 1.4, 13.0 } } + { Key = "lookback_time", Range = { 1.4, 13.0 } } } } }, @@ -54,15 +52,11 @@ local Object = { }, GUI = { Name = "Quasars", - Path = "/Universe", - Description = [[Census: 569,442 quasars. DU Version 2.2.
- Quasars are the most distant objects we can see. They are extremely active - galaxies that contain supermassive black holes which are gobbling up material - at a furious rate. The Million Quasars Catalogue is an aggregate catalog of - several surveys, including 2dF and Sloan. So, it should not be surprising that - the shape of these data mimic the shape of the Sloan and 2dF galaxy surveys, - with large parts of the sky unobserved.(Description from URL)

Data - Reference: The Million Quasars catalog (Flesch, 2017)]] + Path = "/Universe/Deep Sky Surveys", + Description = [[Quasars are the most distant objects we see. They are extremely + active galaxies that contain supermassive black holes which gobble up material at a + furious rate. As the material falls into the black hole, it forms a disk and emits + high-energy light that we see to great distances. Census: 755,850 quasars.]] } } @@ -81,8 +75,8 @@ asset.export(Object) asset.meta = { Name = "Quasars", - Description = "Digital Universe asset for Quasars", - Author = "Brian Abbott (AMNH)", + Description = Object.GUI.Description, + Author = "Brian Abbott, Sohum Udani (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/sdss.asset b/data/assets/scene/digitaluniverse/sdss.asset index 7bd45ca637..7d59a9d162 100644 --- a/data/assets/scene/digitaluniverse/sdss.asset +++ b/data/assets/scene/digitaluniverse/sdss.asset @@ -1,15 +1,15 @@ local textures = asset.resource({ - Name = "Sloan Digital Sky Survey Textures", + Name = "Point Textures", Type = "HttpSynchronization", - Identifier = "digitaluniverse_sloandss_textures", - Version = 2 + Identifier = "digitaluniverse_point_textures", + Version = 1 }) local speck = asset.resource({ Name = "Sloan Digital Sky Survey Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_sloandss_speck", - Version = 3 + Version = 4 }) @@ -19,14 +19,13 @@ local Object = { Type = "RenderablePointCloud", Enabled = true, Opacity = 0.8, - File = speck .. "SDSSgals.speck", + File = speck .. "sdss.speck", Coloring = { FixedColor = { 0.8, 0.8, 1.0 }, ColorMapping = { File = speck .. "SDSSgals.cmap", ParameterOptions = { - { Key = "proximity", Range = { 1.0, 50.0 } }, - { Key = "redshift", Range = { 0.0, 0.075 } } + { Key = "num_nearby_galaxies", Range = { 1.0, 25.0 } } } } }, @@ -45,22 +44,16 @@ local Object = { }, GUI = { Name = "Sloan Digital Sky Survey", - Path = "/Universe/Galaxies", - Description = [[Census: 2,600,258 galaxies. DU Version 10.6.
The Sloan Digital - Sky Survey (SDSS) is an ambitious project to image about 35% of the sky, deep - into the universe. The survey measured the position and brightness of almost 1 - billion objects, and obtained spectra to more than 4 million objects. This is - not an all-sky survey, so there are large parts of the sky that remain - unobserved, which produces the bow tie distribution and the black areas where - there surely are galaxies, but we have yet to observe them. These galaxies - appear to extend beyond the 2dF survey to distances that exceed 5 billion - light years. However, the weblike structure of clusters, filaments, and voids - seems to fade by about 2 billion light years. Beyond this distance, the - completeness of the survey drops so that only the intrinsically bright - galaxies are visible. The weblike cosmic structure is echoed in these data, - with orange clusters standing out among the less dense aqua-colored galaxies - and the less dense regions of green-colored galaxies. (Description from URL) -

Data Reference: Sloan Digital Sky Survey (http://www.sdss.org/)]] + Path = "/Universe/Deep Sky Surveys", + Description = [[The Sloan Digital Sky Survey (SDSS) is an ambitious project to image + about 35% of the sky, deep into the universe. The SDSS galaxies form triangular + wedges, revealing those parts of the sky observed by the telescope. If the entire + sky were covered, you would see a spherical distribution of galaxies surrounding + the Milky Way. With only 35% of the entire sky observed, we see only a few select + slices or larger wedgelike portions from that sphere. The weblike cosmic structure + is echoed in these data, with orange clusters standing out among the less dense + aqua-colored galaxies and the less dense regions of green-colored galaxies. + Census: 2,862,767 galaxies.]] } } @@ -78,9 +71,9 @@ asset.export(Object) asset.meta = { - Name = "Sloan Digital Sky Survey", - Description = "Digital Universe asset for The Sloan Digital Sky Survey (SDSS)", - Author = "Brian Abbott (AMNH)", + Name = "Sloan Digital Sky Survey Galaxies", + Description = Object.GUI.Description, + Author = "Brian Abbott, Zack Reeves (AMNH), Eric Gawiser (Rutgers)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/star_uncertainty.asset b/data/assets/scene/digitaluniverse/star_uncertainty.asset new file mode 100644 index 0000000000..2273022321 --- /dev/null +++ b/data/assets/scene/digitaluniverse/star_uncertainty.asset @@ -0,0 +1,65 @@ +local speck = asset.resource({ + Name = "Star Uncertainty Files", + Type = "HttpSynchronization", + Identifier = "digitaluniverse_star_uncertainty_data", + Version = 1 +}) + + +local Object = { + Identifier = "StarUncertainty", + Renderable = { + Type = "RenderableConstellationLines", + Enabled = false, + Labels = { + File = speck .. "star_uncertainty.label", + Opacity = 0.75, + Color = { 0.6, 0.6, 1.0 }, + Size = 14.1, + MinMaxSize = { 8, 170 }, + Unit = "pc" + }, + Opacity = 0.8, + LineWidth = 5.0, + File = speck .. "star_uncertainty.speck", + NamesFile = speck .. "star_uncertainty.dat", + Colors = { { 1.0, 1.0, 0.0 }, { 0.0, 0.8, 1.0 }, { 0.957, 0.51, 0.10 } }, + Unit = "pc", + DimInAtmosphere = true + }, + Tag = { "daytime_hidden" }, + GUI = { + Name = "Star Distance Uncertainty", + Path = "/Milky Way/Stars", + Description = [[The uncertainty of a star's position is derived from the uncertainty + in its parallax measurement. This results in a range in distance where the star + could exist. Here we draw lines on top of select stars which give us a visual cue + of the range in possible distances for that star. Colors: Aqua lines are stars with + Gaia geometric parallax measurements (the most accurate), orange lines indicate + stars with Hipparcos geometric parallaxes, and yellow lines are stars with Gaia + photogeomentric parallaxes (the least accurate). The label includes the star name + and the length of the uncertainty in light years. Census: 3,440 stars with + uncertainty.]] + } +} + + +asset.onInitialize(function() + openspace.addSceneGraphNode(Object) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Object) +end) + +asset.export(Object) + + + +asset.meta = { + Name = "Star Distance Uncertainty", + Description = Object.GUI.Description, + Author = "Brian Abbott, Zack Reeves (AMNH)", + URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", + License = "AMNH Digital Universe" +} diff --git a/data/assets/scene/digitaluniverse/starlabels.asset b/data/assets/scene/digitaluniverse/starlabels.asset index 85c3d64c0e..368ec4a330 100644 --- a/data/assets/scene/digitaluniverse/starlabels.asset +++ b/data/assets/scene/digitaluniverse/starlabels.asset @@ -2,7 +2,7 @@ local speck = asset.resource({ Name = "Star Labels Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_starlabels_speck", - Version = 2 + Version = 3 }) @@ -15,7 +15,7 @@ local Object = { Enabled = true, File = speck .. "stars.label", Color = { 0.4, 0.4, 0.4 }, - Size = 14.7, + Size = 14.4, MinMaxSize = { 6, 50 }, Unit = "pc" }, @@ -25,7 +25,8 @@ local Object = { GUI = { Name = "Stars Labels", Path = "/Milky Way/Stars", - Description = "Labels for stars in the Milky Way. See 'Stars' for more info" + Description = [[Common name labels for nearby stars in the Milky Way. See 'Stars' + for more information.]] } } @@ -44,8 +45,8 @@ asset.export(Object) asset.meta = { Name = "Star Labels", - Description = "Digital Universe asset for labels of the stars", - Author = "Brian Abbott (AMNH)", + Description = Object.GUI.Description, + Author = "Brian Abbott, Zack Reeves, Andrew Ayala, Jackie Faherty (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/starorbits.asset b/data/assets/scene/digitaluniverse/starorbits.asset index ecf8a63b95..4efbe36beb 100644 --- a/data/assets/scene/digitaluniverse/starorbits.asset +++ b/data/assets/scene/digitaluniverse/starorbits.asset @@ -4,163 +4,136 @@ local earth_transforms = asset.require("scene/solarsystem/planets/earth/transfor local speck = asset.resource({ - Name = "Grids Speck Files", + Name = "Star Orbits Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_starorbits_speck", - Version = 1 + Version = 2 }) local SunOrbit = { Identifier = "SunOrbit", - --Parent = transforms.SolarSystemBarycenter.Name, Renderable = { Type = "RenderableDUMeshes", Enabled = false, Opacity = 1.0, File = speck .. "starorbits-Sun.speck", MeshColor = { { 1.0, 0.65, 0.0 } }, - --LabelFile = speck .. "1ld.label", - -- TextColor = { 0.0, 0.2, 0.5 }, - -- TextMinMaxSize = { 0, 30 }, Unit = "pc" }, GUI = { Name = "Sun Orbit", Path = "/Milky Way/Stars/Stars Orbits", - Description = "Orbits of the Sun around the Milky Way" + Description = [[Projected orbit of the Sun around the Milky Way over the next 1 + billion years.]] } } local BarnardsOrbit = { Identifier = "BarnardsOrbit", - --Parent = transforms.SolarSystemBarycenter.Name, Renderable = { Type = "RenderableDUMeshes", Enabled = false, Opacity = 1.0, File = speck .. "starorbits-BarnardsStar.speck", MeshColor = { { 0.39, 0.58, 0.93 } }, - --LabelFile = speck .. "1ld.label", - -- TextColor = { 0.0, 0.2, 0.5 }, - -- TextSize = 10.3, - -- TextMinMaxSize = { 0, 30 }, Unit = "pc" }, GUI = { Name = "Barnards Orbit", Path = "/Milky Way/Stars/Stars Orbits", - Description = "Orbits of Barnard's Star around the Milky Way" + Description = [[Projected orbit of Barnard's Star around the Milky Way over the next + 1 billion years.]] } } local KapteynsOrbit = { Identifier = "KapteynsOrbit", - --Parent = transforms.SolarSystemBarycenter.Name, Renderable = { Type = "RenderableDUMeshes", Enabled = false, Opacity = 1.0, File = speck .. "starorbits-KapteynsStar.speck", MeshColor = { { 0.6, 0.6, 0.6 } }, - --LabelFile = speck .. "1ld.label", - -- TextColor = { 0.0, 0.2, 0.5 }, - -- TextSize = 10.3, - -- TextMinMaxSize = { 0, 30 }, Unit = "pc" }, GUI = { Name = "Kapteyns Orbit", Path = "/Milky Way/Stars/Stars Orbits", - Description = "Orbits of Kapteyn's Star around the Milky Way" + Description = [[Projected orbit of Kapteyn's Star around the Milky Way over the next + 1 billion years.]] } } local Lacaille9352Orbit = { Identifier = "Lacaille9352Orbit", - --Parent = transforms.SolarSystemBarycenter.Name, Renderable = { Type = "RenderableDUMeshes", Enabled = false, Opacity = 1.0, File = speck .. "starorbits-Lacaille9352.speck", MeshColor = { { 0.58, 0.0, 0.83 } }, - --LabelFile = speck .. "1ld.label", - -- TextColor = { 0.0, 0.2, 0.5 }, - -- TextSize = 10.3, - -- TextMinMaxSize = { 0, 30 }, Unit = "pc" }, GUI = { Name = "Lacaille 9352 Orbit", Path = "/Milky Way/Stars/Stars Orbits", - Description = "Orbits of Lacaille9352 around the Milky Way" + Description = [[Projected orbit of Lacaille9352 around the Milky Way over the next + 1 billion years.]] } } local LSR1826Orbit = { Identifier = "LSR1826Orbit", - --Parent = transforms.SolarSystemBarycenter.Name, Renderable = { Type = "RenderableDUMeshes", Enabled = false, Opacity = 1.0, File = speck .. "starorbits-LSR1826+3014.speck", MeshColor = { { 0.0, 0.39, 0.0 } }, - --LabelFile = speck .. "1ld.label", - -- TextColor = { 0.0, 0.2, 0.5 }, - -- TextSize = 10.3, - -- TextMinMaxSize = { 0, 30 }, Unit = "pc" }, GUI = { Name = "LSR1826+3014 Orbit", Path = "/Milky Way/Stars/Stars Orbits", - Description = "Orbits of LSR1826+3014 around the Milky Way" + Description = [[Projected orbit of LSR1826+3014 around the Milky Way over the next 1 + billion years.]] } } local LSRJ0822Orbit = { Identifier = "LSRJ0822Orbit", - --Parent = transforms.SolarSystemBarycenter.Name, Renderable = { Type = "RenderableDUMeshes", Enabled = false, Opacity = 1.0, File = speck .. "starorbits-LSRJ0822+1700.speck", MeshColor = { { 0.5, 1.0, 0.0 } }, - --LabelFile = speck .. "1ld.label", - -- TextColor = { 0.0, 0.2, 0.5 }, - -- TextSize = 10.3, - -- TextMinMaxSize = { 0, 30 }, Unit = "pc" }, GUI = { Name = "LSRJ0822+1700 Orbit", Path = "/Milky Way/Stars/Stars Orbits", - Description = "Orbits of LSRJ0822+1700 around the Milky Way" + Description = [[Projected orbit of LSRJ0822+1700 around the Milky Way over the next 1 + billion years.]] } } local PM_J13420Orbit = { Identifier = "PM_J13420Orbit", - --Parent = transforms.SolarSystemBarycenter.Name, Renderable = { Type = "RenderableDUMeshes", Enabled = false, Opacity = 1.0, File = speck .. "starorbits-PM_J13420-3415.speck", MeshColor = { { 0.70, 0.13, 0.13 } }, - --LabelFile = speck .. "1ld.label", - -- TextColor = { 0.0, 0.2, 0.5 }, - -- TextSize = 10.3, - -- TextMinMaxSize = { 0, 30 }, Unit = "pc" }, GUI = { Name = "PM_J13420-3415 Orbit", Path = "/Milky Way/Stars/Stars Orbits", - Description = "Orbits of PM_J13420-3415 around the Milky Way" + Description = [[Projected orbit of PM_J13420-3415 around the Milky Way over the next + 1 billion years.]] } } @@ -197,11 +170,8 @@ asset.export(PM_J13420Orbit) asset.meta = { Name = "Star Orbits", - Description = [[Select Star Orbital paths that delineate their trajectory around the - Milky Way over 1 billion years into the future. Included: Sun, Barnards, Kapteyns, - Lacaille 9352, LSR1826+3014, LSRJ0822+1700, PM_J13420-3415.

Data - Reference: Sebastien Lepine (AMNH)]], - Author = "Brian Abbott (AMNH)", + Description = [[Projected star orbits for selected stars over the next 1 billion years. Census: 7 star orbits.]], + Author = "Brian Abbott, Zack Reeves (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/stars.asset b/data/assets/scene/digitaluniverse/stars.asset index 0d5ff15e04..ef29bce444 100644 --- a/data/assets/scene/digitaluniverse/stars.asset +++ b/data/assets/scene/digitaluniverse/stars.asset @@ -2,7 +2,7 @@ local speck = asset.resource({ Name = "Stars Speck Files", Type = "HttpSynchronization", Identifier = "stars_du", - Version = 5 + Version = 6 }) local sunspeck = asset.resource({ @@ -62,13 +62,13 @@ local Stars = { GUI = { Name = "Stars", Path = "/Milky Way/Stars", - Description = [[Census: 116,584 stars with 321 labels.
DU Version 8.10. This - star catalog is a combination of all available star catalogs, wherein we - choose the best distance available to place the stars around the Sun as - accurately as is possible. (Description from URL)

Data Reference: - Gaia Data Release 3 (Gaia Collaboration, 2022); XHIP: An Extended Hipparcos - Compilation (Anderson E., Francis C. 2012); Hipparcos Catalog (European Space Agency - 1997); Gliese Catalog (Gliese and Jahriess 1991)]] + Description = [[These are the nearby stars that surround the Sun and are close enough + to get accurate distances. These include all the stars we see with the unaided eye + and many stars dimmer than that. Over the entire night sky, all year round, and in + the northern and southern hemispheres, we can see roughly 9,000 stars total with + the unaided eye. Stars are the light factories of the universe, and come in a + variety of sizes, colors, and brightnesses. The base catalog is Hipparcos, with Gaia + DR3 data applied for distance and velocity when available. Census: 112,746 stars.]] } } @@ -105,10 +105,10 @@ local SunStar = { DimInAtmosphere = true }, GUI = { - Name = "Sun Star", + Name = "Sun", Path = "/Milky Way/Stars", - Description = [[Individual star to represent the sun when outside of the solar - system]] + Description = [[Individual star to represent the Sun when outside of the Solar + System.]] } } @@ -130,8 +130,8 @@ asset.export(SunStar) asset.meta = { Name = "Stars", - Description = "Digital Universe asset for the stars", - Author = "Brian Abbott (AMNH)", + Description = Stars.GUI.Description, + Author = "Brian Abbott, Zack Reeves, Andrew Ayala, Jackie Faherty (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/superclusters.asset b/data/assets/scene/digitaluniverse/superclusters.asset index 7899d631bd..71c50f95ad 100644 --- a/data/assets/scene/digitaluniverse/superclusters.asset +++ b/data/assets/scene/digitaluniverse/superclusters.asset @@ -1,8 +1,8 @@ local textures = asset.resource({ - Name = "Galaxy Superclusters Textures", + Name = "Point Textures", Type = "HttpSynchronization", - Identifier = "digitaluniverse_superclusters_textures", - Version = 2 + Identifier = "digitaluniverse_point_textures", + Version = 1 }) local speck = asset.resource({ @@ -40,14 +40,14 @@ local Object = { } }, GUI = { - Name = "Galaxy Superclusters", - Path = "/Universe/Galaxies", - Description = [[Census: 33 labels. DU Version 1.3.
The superclusters dataset - is a set of labels that mark the major galaxy superclusters in the local universe. - They correspond to, and should be viewed with, the Abell clusters. Astronomers - estimate there are 10 million superclusters in the observable universe. - (Description from URL)

Data Reference: Superclusters of Abell and X-ray - clusters (Einasto+, 2001)]] + Name = "Supercluster Labels", + Path = "/Universe/Deep Sky Surveys", + Description = [[The superclusters dataset is a set of labels that mark the major + galaxy superclusters in the local universe. They correspond to, and should be viewed + with, the Abell clusters. Astronomers estimate there are 10 million superclusters in + the observable universe. Often, they carry constellation names because they are + viewed in those constellations from our night-sky perspective. Census: 33 + supercluster labels.]] } } @@ -66,7 +66,7 @@ asset.export(Object) asset.meta = { Name = "Galaxy Superclusters", - Description = "Digital Universe asset for Galaxy Superclusters", + Description = Object.GUI.Description, Author = "Brian Abbott (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" diff --git a/data/assets/scene/digitaluniverse/supernovaremnants.asset b/data/assets/scene/digitaluniverse/supernovaremnants.asset index b44c695f32..3b890d0858 100644 --- a/data/assets/scene/digitaluniverse/supernovaremnants.asset +++ b/data/assets/scene/digitaluniverse/supernovaremnants.asset @@ -9,7 +9,7 @@ local speck = asset.resource({ Name = "Supernova Remnants Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_supernovaremnants_speck", - Version = 2 + Version = 3 }) @@ -20,8 +20,8 @@ local Object = { Enabled = false, Labels = { File = speck .. "snr.label", - Color = { 0.6, 0.46, 0.0 }, - Size = 16.44, + Color = { 0.51, 0.40, 0.04 }, + Size = 16.0, MinMaxSize = { 4, 100 }, Unit = "pc" }, @@ -40,12 +40,16 @@ local Object = { }, GUI = { Name = "Supernova Remnants", - Path = "/Milky Way", - Description = [[Census: 112 supernova remnants.
DU Version 3.7. A supernova - remnant is the ejected gas that results from a supernova. It glows for a - cosmically short period of time before mixing with the interstellar medium. - (Description from URL)

Data Reference: The First Fermi LAT SNR - Catalog (Acero+, 2016)]] + Path = "/Milky Way/Nebulae", + Description = [[A supernova remnant is the nebulous gas left over from a supernova + explosion. This gas expands at great speeds and rams into the surrounding + interstellar gas. This excites the surrounding gas and causes it to glow, producing + the nebulous cloud we observe from Earth. A supernova remnant contains a neutron + star or pulsar at its center, the core of the dying star. The cloud that enshrouds + the core does not last long, though. After about 50,000 years, the gas mixes into + the interstellar medium and no longer glows. Astronomically, this is a very short + time, so the supernova remnants we see must be left from explosions that have + occurred recently, cosmically speaking. Census: 112 supernova remnants.]] } } @@ -63,8 +67,8 @@ asset.export(Object) asset.meta = { Name = "Supernova Remnants", - Description = "Digital Universe asset for Supernova Remnants", - Author = "Brian Abbott (AMNH)", + Description = Object.GUI.Description, + Author = "Brian Abbott, Zack Reeves (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/tully.asset b/data/assets/scene/digitaluniverse/tully.asset index f9fd6daa1d..44d72b1a50 100644 --- a/data/assets/scene/digitaluniverse/tully.asset +++ b/data/assets/scene/digitaluniverse/tully.asset @@ -54,30 +54,25 @@ local TullyGalaxies = { FadeInDistances = { 0.001, 1.0 } -- Fade in value in the same unit as "Unit" }, SizeSettings = { - ScaleExponent = 21.9, + ScaleExponent = 21.7, MaxSize = 0.3, EnableMaxSizeControl = true } }, GUI = { Name = "Tully Galaxies", - Path = "/Universe/Galaxies", - Description = [[Census: 30,059 galaxies. DU Version 1.5.
The Tully Catalog is - the most polished, accurate catalog of nearby galaxies. It includes over 30,000 - galaxies in the local universe that surround the Milky Way. This catalog - demonstrates the large-scale structure of the universe exceptionally well. And, - each galaxy has a representative image reflecting its morphological type, and is - properly sized and inclined. Size and shape. The data form a cube, which is an + Path = "/Universe/Nearby Surveys", + Description = [[The Tully Catalog is the most polished, accurate catalog of nearby + galaxies. It includes over 30,000 galaxies in the local universe that surround the + Milky Way. This catalog demonstrates the large-scale structure of the universe + exceptionally well. Each galaxy has a representative image that is properly sized + and inclined and reflects its morphological type. The data form a cube, which is an arbitrary cutoff based on the completeness of these data. Beyond this, data from - these sources are not as reliable, so effort is made to show a complete picture, - albeit limited by observations (for example, we cannot see dwarf galaxies much - beyond the Local Group). The size of the cube is roughly 1 billion light years on - a diagonal (so the farthest galaxies in the dataset are about 1 billion light - years from the Milky Way), or about 700 million light years per side. -

Colors. Orange denotes more dense regions of the local universe, aqua is - given to galaxies in an intermediate-density area, and green is given to lower - density regions.(Description from URL)

Data Reference: Tully Galaxy - Catalog: Brent Tully (U Hawaii), Stuart Levy (NCSA/UIUC)]] + these sources are not as reliable. The size of the cube is roughly 1 billion light + years on a diagonal, or about 700 million light years per side. Colors: Orange + denotes more dense regions of the local universe, aqua is given to galaxies in an + intermediate-density area, and green is given to lower density regions. Census: + 30,059 galaxies.]] } } @@ -111,17 +106,14 @@ local TullyGalaxiesImages = { }, GUI = { Name = "Tully Galaxies Images", - Path = "/Universe/Galaxies", - Description = [[Each galaxy is represented by an image - that represents its morphological type (spiral, elliptical, etc.). Most of these - come from The Galaxy Catalog. A handful of nearby galaxies are represented by - their actual images, which come mostly from the National Optical Astronomy - Observatory (NOAO). Each of these images has been altered from its original state. - These images were taken from Earth on some of the world's largest telescopes, so - foreground stars from our own Galaxy appear in each image. We are representing - galaxies in extragalactic space, so we have removed the stars from each image. - (Description from URL)

Data Reference: Tully Galaxy Catalog: Brent Tully - (U Hawaii), Stuart Levy (NCSA/UIUC)]] + Path = "/Universe/Nearby Surveys", + Description = [[Each Tully galaxy is represented by an image that represents its + morphological type (spiral, elliptical, etc.). Most of these come from The Galaxy + Catalog. A handful of nearby galaxies are represented by their actual images, which + come mostly from the National Optical Astronomy Observatory (NOAO). Each of these + images has been altered from its original state. Taken from Earth, foreground stars + from our own Galaxy appear in each image and were removed. Census: 30,159 galaxy + images.]] } } @@ -143,8 +135,7 @@ asset.export(TullyGalaxiesImages) asset.meta = { Name = "Tully Galaxies", - Description = [[Digital Universe asset for Tully Galaxies, including point cloud and - images]], + Description = TullyGalaxies.GUI.Description, Author = "Stuart Levy (NCSA/UIUC), Brian Abbott (AMNH)", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" diff --git a/data/assets/scene/digitaluniverse/voids.asset b/data/assets/scene/digitaluniverse/voids.asset index 6493e3a500..66dfd12df0 100644 --- a/data/assets/scene/digitaluniverse/voids.asset +++ b/data/assets/scene/digitaluniverse/voids.asset @@ -25,17 +25,15 @@ local Object = { }, GUI = { Name = "Voids", - Path = "/Universe/Galaxies", - Description = [[Census: 24 cosmic voids. DU Version 1.2.
Cosmic voids are - vast, empty spaces where there are either no galaxies, or very few galaxies. - They are associated with cold spots in the cosmic microwave background (CMB) - light, the earliest picture we have of the universe (see page 58). Those cold - spots in the CMB evolved into large voids, some as much as 300 million light - years in diameter. Labels roughly denote the location of cosmic voids in the - Tully galaxies. Voids are only visible with motion cuing as you spin around - these data. The labels help to guide the eye and provide sign posts for the - largest voids in our cosmic neighborhood. (Description from URL)

Data - Reference: various sources]] + Path = "/Universe/Nearby Surveys", + Description = [[Cosmic voids are vast, empty spaces where there are either no + galaxies, or very few galaxies. They are associated with cold spots in the cosmic + microwave background (CMB) light, the earliest picture we have of the universe. + Those cold spots in the CMB evolved into large voids, some as much as 300 million + light years in diameter. Labels roughly denote the location of cosmic voids in the + Tully galaxies. Voids are only visible with motion cuing as you spin around these + data. The labels help to guide the eye and provide sign posts for the largest voids + in our cosmic neighborhood. Census: 24 cosmic void labels.]] } } @@ -55,7 +53,7 @@ asset.export(Object) asset.meta = { Name = "Voids", Author = "Brian Abbott (AMNH)", - Description = "Digital Universe asset for Cosmic voids", + Description = Object.GUI.Description, URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe" } diff --git a/data/assets/scene/digitaluniverse/white_dwarfs.asset b/data/assets/scene/digitaluniverse/white_dwarfs.asset new file mode 100644 index 0000000000..4d0813d4e3 --- /dev/null +++ b/data/assets/scene/digitaluniverse/white_dwarfs.asset @@ -0,0 +1,67 @@ +local textures = asset.resource({ + Name = "Point Textures", + Type = "HttpSynchronization", + Identifier = "digitaluniverse_point_textures", + Version = 1 +}) + +local speck = asset.resource({ + Name = "White Dwarf Speck Files", + Type = "HttpSynchronization", + Identifier = "digitaluniverse_white_dwarfs_speck", + Version = 1 +}) + + +local Object = { + Identifier = "WhiteDwarfs", + Renderable = { + Type = "RenderablePointCloud", + Enabled = false, + File = speck .. "wd.speck", + Texture = { + File = textures .. "point3.png", + }, + Unit = "pc", + Coloring = { + FixedColor = { 1.0, 1.0, 1.0 }, + }, + SizeSettings = { + ScaleExponent = 15.5, + MaxSize = 0.7, + EnableMaxSizeControl = true + } + }, + GUI = { + Name = "White Dwarfs", + Path = "/Milky Way/Stellar Remnants", + Description = [[A white dwarf is the core of a dying star. These are dim objects that + are roughly the size of Earth but with the desity of a sunlike star. Stars that are + not massive enough to end in a neutraon star or black hole will evolve into a white + dwarf. This is the ultimate fate of over 95% of the stars in our Galaxy. As the + star is dying, the outer layers will expand out and the gas will glow and become a + planetaery nebula, while the core of the star transforms into a white dwarf. Census: + 192,613 white dwarfs.]] + } +} + + +asset.onInitialize(function() + openspace.addSceneGraphNode(Object) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Object) +end) + +asset.export(Object) + + + +asset.meta = { + Name = "White Dwarfs", + Description = Object.GUI.Description, + Author = "Zack Reeves, Brian Abbott (AMNH)", + URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", + License = "AMNH Digital Universe" +} diff --git a/data/assets/scene/milkyway/constellations/constellation_art.asset b/data/assets/scene/milkyway/constellations/constellation_art.asset index 937e5ebd7c..f9f4e25d66 100644 --- a/data/assets/scene/milkyway/constellations/constellation_art.asset +++ b/data/assets/scene/milkyway/constellations/constellation_art.asset @@ -84,7 +84,7 @@ local function createConstellations(baseIdentifier, guiPath, constellationfile) Tag = { "ImageConstellation", group, "daytime_hidden" }, GUI = { Name = name .. " Image", - Path = "/Milky Way/" .. guiPath, + Path = "/Milky Way/Constellations/" .. guiPath, Description = name .. " Image" } } diff --git a/data/assets/scene/milkyway/milkyway/eso.asset b/data/assets/scene/milkyway/milkyway/eso.asset index 41323b2229..285e1c75cf 100644 --- a/data/assets/scene/milkyway/milkyway/eso.asset +++ b/data/assets/scene/milkyway/milkyway/eso.asset @@ -22,8 +22,7 @@ local Object = { Texture = textures .. "eso0932a_blend.png", Orientation = "Inside", MirrorTexture = true, - FadeOutThreshold = 0.01, - Background = true + FadeOutThreshold = 0.01 }, GUI = { Name = "Milky Way (ESO)", diff --git a/data/assets/scene/milkyway/milkyway/volume.asset b/data/assets/scene/milkyway/milkyway/volume.asset index e6af7d4bea..642e21d4f4 100644 --- a/data/assets/scene/milkyway/milkyway/volume.asset +++ b/data/assets/scene/milkyway/milkyway/volume.asset @@ -45,7 +45,7 @@ local MilkyWayVolume = { } }, GUI = { - Path = "/Milky Way", + Path = "/Milky Way/Galaxy", Name = "Milky Way Volume", Description = "Volumetric rendering of Milky Way galaxy based on simulation from NAOJ" } From 6337b8e5aabb36e4449d5191346db597050b5dd3 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 17 Jul 2024 13:17:03 +0200 Subject: [PATCH 08/99] Move the statistics and frame info rendering from the RenderEngine into the debugging module (closes #1248) --- include/openspace/rendering/renderengine.h | 4 - modules/debugging/debuggingmodule.cpp | 94 +++++++++++++++++++++- modules/debugging/debuggingmodule.h | 12 +++ src/rendering/renderengine.cpp | 70 ---------------- 4 files changed, 105 insertions(+), 75 deletions(-) diff --git a/include/openspace/rendering/renderengine.h b/include/openspace/rendering/renderengine.h index 032efebf69..6047fbc961 100644 --- a/include/openspace/rendering/renderengine.h +++ b/include/openspace/rendering/renderengine.h @@ -186,10 +186,7 @@ private: properties::IntListProperty _screenshotWindowIds; properties::BoolProperty _applyWarping; - properties::BoolProperty _showStatistics; - properties::FloatProperty _statisticsScale; properties::BoolProperty _screenshotUseDate; - properties::BoolProperty _showFrameInformation; properties::BoolProperty _disableMasterRendering; properties::FloatProperty _globalBlackOutFactor; @@ -218,7 +215,6 @@ private: std::vector _programs; - std::shared_ptr _fontFrameInfo; std::shared_ptr _fontCameraInfo; std::shared_ptr _fontVersionInfo; std::shared_ptr _fontShutdown; diff --git a/modules/debugging/debuggingmodule.cpp b/modules/debugging/debuggingmodule.cpp index 93add8f04f..5781dc60f2 100644 --- a/modules/debugging/debuggingmodule.cpp +++ b/modules/debugging/debuggingmodule.cpp @@ -26,7 +26,10 @@ #include #include +#include #include +#include +#include #include #include #include @@ -38,15 +41,99 @@ #include #include #include +#include +#include #include #include #include #include "debuggingmodule_lua.inl" +namespace { + constexpr std::string_view KeyFontMono = "Mono"; + + constexpr openspace::properties::Property::PropertyInfo ShowStatisticsInfo = { + "ShowStatistics", + "Show Statistics", + "Show updating, rendering, and network statistics on all rendering nodes.", + openspace::properties::Property::Visibility::AdvancedUser + }; + + constexpr openspace::properties::Property::PropertyInfo StatisticsScaleInfo = { + "StatisticsScale", + "Statistics Scale", + "This value is scaling the statatistics window by the provided amount. For flat " + "projections this is rarely necessary, but it is important when using a setup " + "where the cornders of the image are masked out.", + openspace::properties::Property::Visibility::AdvancedUser + }; + + constexpr openspace::properties::Property::PropertyInfo ShowFrameNumberInfo = { + "ShowFrameInformation", + "Show Frame Information", + "If this value is enabled, the current frame number and frame times are rendered " + "into the window.", + openspace::properties::Property::Visibility::AdvancedUser + }; +} // namespace + namespace openspace { -DebuggingModule::DebuggingModule() : OpenSpaceModule(Name) {} +DebuggingModule::DebuggingModule() + : OpenSpaceModule(Name) + , _showStatistics(ShowStatisticsInfo, false) + , _statisticsScale(StatisticsScaleInfo, 1.f, 0.f, 1.f) + , _showFrameInformation(ShowFrameNumberInfo, false) +{ + _showStatistics.onChange([this]() { + global::windowDelegate->showStatistics(_showStatistics); + // We need to reset the scale as it is not updated when the statistics window is + // not currently shown + global::windowDelegate->setStatisticsGraphScale(_statisticsScale); + }); + addProperty(_showStatistics); + + _statisticsScale.onChange([this]() { + global::windowDelegate->setStatisticsGraphScale(_statisticsScale); + }); + addProperty(_statisticsScale); + + addProperty(_showFrameInformation); + + global::callback::render->push_back([this]() { + if (_showFrameInformation) { + ZoneScopedN("Show Frame Information"); + WindowDelegate* del = global::windowDelegate; + + glm::vec2 penPosition = glm::vec2( + global::renderEngine->fontResolution().x / 2 - 50, + global::renderEngine->fontResolution().y / 3 + ); + + std::string fn = std::to_string(global::renderEngine->frameNumber()); + const WindowDelegate::Frustum frustum = del->frustumMode(); + std::string fr = [](WindowDelegate::Frustum f) -> std::string { + switch (f) { + case WindowDelegate::Frustum::Mono: return ""; + case WindowDelegate::Frustum::LeftEye: return "(left)"; + case WindowDelegate::Frustum::RightEye: return "(right)"; + default: throw ghoul::MissingCaseException(); + + } + }(frustum); + + std::string sgFn = std::to_string(del->swapGroupFrameNumber()); + std::string dt = std::to_string(del->deltaTime()); + std::string avgDt = std::to_string(del->averageDeltaTime()); + + const std::string res = std::format( + "Frame: {} {}\nSwap group frame: {}\nDt: {}\nAvg Dt: {}", + fn, fr, sgFn, dt, avgDt + ); + RenderFont(*_fontFrameInfo, penPosition, res); + } + }); +} void DebuggingModule::internalInitialize(const ghoul::Dictionary&) { ghoul::TemplateFactory* fRenderable = @@ -56,6 +143,11 @@ void DebuggingModule::internalInitialize(const ghoul::Dictionary&) { fRenderable->registerClass("RenderableDebugPlane"); } +void DebuggingModule::internalInitializeGL() { + const Configuration::FontSizes fontSize = global::configuration->fontSize; + _fontFrameInfo = global::fontManager->font(KeyFontMono, fontSize.frameInfo); +} + std::vector DebuggingModule::documentations() const { return { RenderableDebugPlane::Documentation() diff --git a/modules/debugging/debuggingmodule.h b/modules/debugging/debuggingmodule.h index 4dcc34d075..ccd7439d88 100644 --- a/modules/debugging/debuggingmodule.h +++ b/modules/debugging/debuggingmodule.h @@ -27,6 +27,10 @@ #include +#include +#include +#include + namespace openspace { class DebuggingModule : public OpenSpaceModule { @@ -41,6 +45,14 @@ public: protected: void internalInitialize(const ghoul::Dictionary&) override; + void internalInitializeGL() override; + +private: + properties::BoolProperty _showStatistics; + properties::FloatProperty _statisticsScale; + properties::BoolProperty _showFrameInformation; + + std::shared_ptr _fontFrameInfo; }; } // namespace openspace diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index db8bf2ea75..60d8b580d2 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -139,22 +139,6 @@ namespace { openspace::properties::Property::Visibility::AdvancedUser }; - constexpr openspace::properties::Property::PropertyInfo ShowStatisticsInfo = { - "ShowStatistics", - "Show Statistics", - "Show updating, rendering, and network statistics on all rendering nodes.", - openspace::properties::Property::Visibility::AdvancedUser - }; - - constexpr openspace::properties::Property::PropertyInfo StatisticsScaleInfo = { - "StatisticsScale", - "Statistics Scale", - "This value is scaling the statatistics window by the provided amount. For flat " - "projections this is rarely necessary, but it is important when using a setup " - "where the cornders of the image are masked out.", - openspace::properties::Property::Visibility::AdvancedUser - }; - constexpr openspace::properties::Property::PropertyInfo ScreenshotUseDateInfo = { "ScreenshotUseDate", "Screenshot Folder uses Date", @@ -163,14 +147,6 @@ namespace { openspace::properties::Property::Visibility::AdvancedUser }; - constexpr openspace::properties::Property::PropertyInfo ShowFrameNumberInfo = { - "ShowFrameInformation", - "Show Frame Information", - "If this value is enabled, the current frame number and frame times are rendered " - "into the window.", - openspace::properties::Property::Visibility::AdvancedUser - }; - constexpr openspace::properties::Property::PropertyInfo DisableMasterInfo = { "DisableMasterRendering", "Disable Master Rendering", @@ -321,10 +297,7 @@ RenderEngine::RenderEngine() , _showCameraInfo(ShowCameraInfo, true) , _screenshotWindowIds(ScreenshotWindowIdsInfo) , _applyWarping(ApplyWarpingInfo, false) - , _showStatistics(ShowStatisticsInfo, false) - , _statisticsScale(StatisticsScaleInfo, 1.f, 0.f, 1.f) , _screenshotUseDate(ScreenshotUseDateInfo, false) - , _showFrameInformation(ShowFrameNumberInfo, false) , _disableMasterRendering(DisableMasterInfo, false) , _globalBlackOutFactor(GlobalBlackoutFactorInfo, 1.f, 0.f, 1.f) , _applyBlackoutToMaster(ApplyBlackoutToMasterInfo, true) @@ -395,19 +368,6 @@ RenderEngine::RenderEngine() addProperty(_screenshotWindowIds); addProperty(_applyWarping); - _showStatistics.onChange([this]() { - global::windowDelegate->showStatistics(_showStatistics); - // We need to reset the scale as it is not updated when the statistics window is - // not currently shown - global::windowDelegate->setStatisticsGraphScale(_statisticsScale); - }); - addProperty(_showStatistics); - - _statisticsScale.onChange([this]() { - global::windowDelegate->setStatisticsGraphScale(_statisticsScale); - }); - addProperty(_statisticsScale); - _screenshotUseDate.onChange([this]() { // If there is no screenshot folder, don't bother with handling the change if (!FileSys.hasRegisteredToken("${STARTUP_SCREENSHOT}")) { @@ -453,7 +413,6 @@ RenderEngine::RenderEngine() }); addProperty(_horizFieldOfView); - addProperty(_showFrameInformation); addProperty(_framerateLimit); addProperty(_globalRotation); @@ -540,7 +499,6 @@ void RenderEngine::initializeGL() { { ZoneScopedN("Fonts"); TracyGpuZone("Fonts"); - _fontFrameInfo = global::fontManager->font(KeyFontMono, fontSize.frameInfo); _fontShutdown = global::fontManager->font(KeyFontMono, fontSize.shutdown); _fontCameraInfo = global::fontManager->font(KeyFontMono, fontSize.cameraInfo); _fontVersionInfo = global::fontManager->font(KeyFontMono, fontSize.versionInfo); @@ -721,35 +679,7 @@ void RenderEngine::render(const glm::mat4& sceneMatrix, const glm::mat4& viewMat (*global::callback::webBrowserPerformanceHotfix)(); } - if (_showFrameInformation) { - ZoneScopedN("Show Frame Information"); - glm::vec2 penPosition = glm::vec2( - fontResolution().x / 2 - 50, - fontResolution().y / 3 - ); - - std::string fn = std::to_string(_frameNumber); - const WindowDelegate::Frustum frustum = global::windowDelegate->frustumMode(); - std::string fr = [](WindowDelegate::Frustum f) -> std::string { - switch (f) { - case WindowDelegate::Frustum::Mono: return ""; - case WindowDelegate::Frustum::LeftEye: return "(left)"; - case WindowDelegate::Frustum::RightEye: return "(right)"; - default: throw ghoul::MissingCaseException(); - } - }(frustum); - - std::string sgFn = std::to_string(global::windowDelegate->swapGroupFrameNumber()); - std::string dt = std::to_string(global::windowDelegate->deltaTime()); - std::string avgDt = std::to_string(global::windowDelegate->averageDeltaTime()); - - const std::string res = std::format( - "Frame: {} {}\nSwap group frame: {}\nDt: {}\nAvg Dt: {}", - fn, fr, sgFn, dt, avgDt - ); - RenderFont(*_fontFrameInfo, penPosition, res); - } if (renderingEnabled && !delegate.isGuiWindow()) { ZoneScopedN("Render ScreenSpace Renderable"); From 01483ef982894113e52d83be1b1d77e0c4b4c2e8 Mon Sep 17 00:00:00 2001 From: Malin E Date: Wed, 17 Jul 2024 09:56:06 -0400 Subject: [PATCH 09/99] Add support for model vertex colors (#3346) * Add model vertex color support * Fix an issue with the Tiangong model not loading properly and set a correct bounding sphere size for it * Update caching for models * Update previous model examples to the new format * And add a new example to test the new vertex colors support * Apply suggestions from code review Co-authored-by: Alexander Bock * Add a model example with lighting * Improve the basic example and add a separate example for vertex colors * Add visual test for vertex colors (#3348) * Update the readme file for the visual tests * Add asset instruction to the visual testing readme * Add visual test for RenderableModel with vertex colors * Apply suggestions from code review Co-authored-by: Alexander Bock * Update test when asset changed name --------- Co-authored-by: Alexander Bock * Update Ghoul --------- Co-authored-by: Alexander Bock --- data/assets/examples/animation.asset | 196 ------------------ .../examples/modelshader/modelshader.asset | 53 ----- .../advanced/model_shader.asset | 50 +++++ .../renderablemodel/data}/model_fs.glsl | 0 .../renderablemodel/data}/model_vs.glsl | 0 .../renderable/renderablemodel/model.asset | 43 ++++ .../renderablemodel/model_animation.asset | 49 +++++ .../model_animation_mode_bounce.asset | 52 +++++ ...del_animation_mode_bounce_infinitely.asset | 52 +++++ .../model_animation_mode_loop.asset | 51 +++++ ...model_animation_mode_loop_infinitely.asset | 51 +++++ .../renderablemodel/model_lighting.asset | 51 +++++ .../renderablemodel/model_vertex_colors.asset | 43 ++++ .../earth/satellites/misc/tiangong.asset | 2 +- ext/ghoul | 2 +- modules/base/shaders/model_fs.glsl | 16 +- modules/base/shaders/model_vs.glsl | 3 + tests/visual/README.md | 39 ++-- .../renderable/model_vertex_colors.ostest | 25 +++ 19 files changed, 509 insertions(+), 269 deletions(-) delete mode 100644 data/assets/examples/animation.asset delete mode 100644 data/assets/examples/modelshader/modelshader.asset create mode 100644 data/assets/examples/renderable/renderablemodel/advanced/model_shader.asset rename data/assets/examples/{modelshader => renderable/renderablemodel/data}/model_fs.glsl (100%) rename data/assets/examples/{modelshader => renderable/renderablemodel/data}/model_vs.glsl (100%) create mode 100644 data/assets/examples/renderable/renderablemodel/model.asset create mode 100644 data/assets/examples/renderable/renderablemodel/model_animation.asset create mode 100644 data/assets/examples/renderable/renderablemodel/model_animation_mode_bounce.asset create mode 100644 data/assets/examples/renderable/renderablemodel/model_animation_mode_bounce_infinitely.asset create mode 100644 data/assets/examples/renderable/renderablemodel/model_animation_mode_loop.asset create mode 100644 data/assets/examples/renderable/renderablemodel/model_animation_mode_loop_infinitely.asset create mode 100644 data/assets/examples/renderable/renderablemodel/model_lighting.asset create mode 100644 data/assets/examples/renderable/renderablemodel/model_vertex_colors.asset create mode 100644 tests/visual/renderable/model_vertex_colors.ostest diff --git a/data/assets/examples/animation.asset b/data/assets/examples/animation.asset deleted file mode 100644 index 78a7d9dc35..0000000000 --- a/data/assets/examples/animation.asset +++ /dev/null @@ -1,196 +0,0 @@ -local sun = asset.require("scene/solarsystem/sun/transforms") -local transforms = asset.require("scene/solarsystem/planets/earth/transforms") - - - -local model = asset.resource({ - Name = "Animated Box", - Type = "HttpSynchronization", - Identifier = "animated_box", - Version = 1 -}) - - -local StartTime = "2021 06 01 00:00:00" - -local AnimationLoop = { - Identifier = "AnimationLoop", - Parent = transforms.EarthCenter.Identifier, - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 0.0, -11E7, 0.0 } - } - }, - Renderable = { - Type = "RenderableModel", - GeometryFile = model .. "BoxAnimated.glb", - EnableAnimation = true, - AnimationMode = "LoopFromStart", - AnimationStartTime = StartTime, - ModelScale = 3E7, - LightSources = { - sun.LightSource - } - }, - GUI = { - Name = "Animated Model (LoopFromStart)", - Path = "/Examples", - Description = "Simple animated box model with the animation mode 'LoopFromStart'" - } -} - -local AnimationLoopInf = { - Identifier = "AnimationLoopInf", - Parent = transforms.EarthCenter.Identifier, - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 0.0, 11E7, 0.0 } - } - }, - Renderable = { - Type = "RenderableModel", - GeometryFile = model .. "BoxAnimated.glb", - EnableAnimation = true, - AnimationMode = "LoopInfinitely", - AnimationStartTime = StartTime, - ModelScale = 3E7, - LightSources = { - sun.LightSource - } - }, - GUI = { - Name = "Animated Model (LoopInfinitely)", - Path = "/Examples", - Description = "Simple animated box model with the animation mode 'LoopInfinitely'" - } -} - -local AnimationOnce = { - Identifier = "AnimationOnce", - Parent = transforms.EarthCenter.Identifier, - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 11E7, 0.0, 0.0 } - } - }, - Renderable = { - Type = "RenderableModel", - GeometryFile = model .. "BoxAnimated.glb", - EnableAnimation = true, - AnimationMode = "Once", - AnimationStartTime = StartTime, - ModelScale = 3E7, - LightSources = { - sun.LightSource - } - }, - GUI = { - Name = "Animated Model (Once)", - Path = "/Examples", - Description = "Simple animated box model with the animation mode 'Once'" - } -} - -local AnimationBounceInf = { - Identifier = "AnimationBounceInf", - Parent = transforms.EarthCenter.Identifier, - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 0.0, 0.0, 11E7 } - } - }, - Renderable = { - Type = "RenderableModel", - GeometryFile = model .. "BoxAnimated.glb", - EnableAnimation = true, - AnimationMode = "BounceInfinitely", - AnimationStartTime = StartTime, - ModelScale = 3E7, - LightSources = { - sun.LightSource - } - }, - GUI = { - Name = "Animated Model (BounceInfinitely)", - Path = "/Examples", - Description = "Simple animated box model with the animation mode 'BounceInfinitely'" - } -} - -local AnimationBounce = { - Identifier = "AnimationBounce", - Parent = transforms.EarthCenter.Identifier, - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 0.0, 0.0, -11E7 } - } - }, - Renderable = { - Type = "RenderableModel", - GeometryFile = model .. "BoxAnimated.glb", - EnableAnimation = true, - AnimationMode = "BounceFromStart", - AnimationStartTime = StartTime, - ModelScale = 3E7, - LightSources = { - sun.LightSource - } - }, - GUI = { - Name = "Animated Model (BounceFromStart)", - Path = "/Examples", - Description = "Simple animated box model with the animation mode 'BounceFromStart'" - } -} - - -asset.onInitialize(function() - openspace.addSceneGraphNode(AnimationLoop) - openspace.addSceneGraphNode(AnimationLoopInf) - openspace.addSceneGraphNode(AnimationOnce) - openspace.addSceneGraphNode(AnimationBounceInf) - openspace.addSceneGraphNode(AnimationBounce) -end) - -asset.onDeinitialize(function() - openspace.removeSceneGraphNode(AnimationBounce) - openspace.removeSceneGraphNode(AnimationBounceInf) - openspace.removeSceneGraphNode(AnimationOnce) - openspace.removeSceneGraphNode(AnimationLoopInf) - openspace.removeSceneGraphNode(AnimationLoop) -end) - - -asset.export(AnimationLoop) -asset.export(AnimationLoopInf) -asset.export(AnimationOnce) -asset.export(AnimationBounceInf) -asset.export(AnimationBounce) - - - -asset.meta = { - Name = "Animation Example asset", - Description = "Simple animation example asset with an animated box model", - Author = "OpenSpace Team", - URL = "http://openspaceproject.com", - License = "MIT license" -} - --- Model --- @TODO: At the moment, this overwrites the previous meta description. Probably needs a way to specify multiple meta's per file? -asset.meta = { - Name = "Animated Box Model", - Description = "Simple animated box model", - Author = "Cesium, https://cesium.com/", - URL = "https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated", - License = [[ - Creative Commons Attribution 4.0 International License, - https://creativecommons.org/licenses/by/4.0/ - ]] -} diff --git a/data/assets/examples/modelshader/modelshader.asset b/data/assets/examples/modelshader/modelshader.asset deleted file mode 100644 index 6204ab3eb9..0000000000 --- a/data/assets/examples/modelshader/modelshader.asset +++ /dev/null @@ -1,53 +0,0 @@ -local sun = asset.require("scene/solarsystem/sun/sun") -local transforms = asset.require("scene/solarsystem/planets/earth/transforms") - - - -local model = asset.resource({ - Name = "Animated Box", - Type = "HttpSynchronization", - Identifier = "animated_box", - Version = 1 -}) - - -local Model = { - Identifier = "ModelShader", - Parent = transforms.EarthCenter.Identifier, - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { -11E7, 0.0, 0.0 } - } - }, - Renderable = { - Type = "RenderableModel", - GeometryFile = model .. "BoxAnimated.glb", - ModelScale = 3E7, - -- (malej 2023-MAY-22) Note that PerformShading should be false in this example, - -- since these example shaders dont't contain any light calculations - PerformShading = false, - VertexShader = asset.resource("model_vs.glsl"), - FragmentShader = asset.resource("model_fs.glsl"), - EnableAnimation = true, - AnimationStartTime = "2023 05 11 00:00:00", - AnimationTimeScale = "Second", - AnimationMode = "LoopInfinitely" - }, - GUI = { - Name = "Model Shader", - Path = "/Examples", - Description = "Simple box model with a custom shader" - } -} - - -asset.onInitialize(function() - openspace.addSceneGraphNode(Model) -end) - -asset.onDeinitialize(function() - openspace.removeSceneGraphNode(Model) -end) - -asset.export(Model) diff --git a/data/assets/examples/renderable/renderablemodel/advanced/model_shader.asset b/data/assets/examples/renderable/renderablemodel/advanced/model_shader.asset new file mode 100644 index 0000000000..8db9863e65 --- /dev/null +++ b/data/assets/examples/renderable/renderablemodel/advanced/model_shader.asset @@ -0,0 +1,50 @@ +-- Custom Shaders +-- This example loads a model with custom shaders. + +-- Load the example model from OpenSpace servers +-- If you want to use your own model, this block of code can be safely deleted +local model = asset.resource({ + Name = "Animated Box", + Type = "HttpSynchronization", + Identifier = "animated_box", + Version = 1 +}) + +local Node = { + Identifier = "RenderableModel_Example_Shader", + Renderable = { + Type = "RenderableModel", + GeometryFile = model .. "BoxAnimated.glb", + -- Use the line below insted of the one above if you want to use your own model + --GeometryFile = "C:/path/to/model.fbx", + + -- PerformShading is turned off since the provided custom shaders does not do any + -- light calculations + PerformShading = false, + -- Custom shaders + VertexShader = asset.resource("../data/model_vs.glsl"), + FragmentShader = asset.resource("../data/model_fs.glsl"), + }, + GUI = { + Name = "RenderableModel - Custom Shaders", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) + + +-- Model credit +--[[ + Author = Cesium, https://cesium.com/ + URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated + License = + Creative Commons Attribution 4.0 International License, + https://creativecommons.org/licenses/by/4.0/ +]] diff --git a/data/assets/examples/modelshader/model_fs.glsl b/data/assets/examples/renderable/renderablemodel/data/model_fs.glsl similarity index 100% rename from data/assets/examples/modelshader/model_fs.glsl rename to data/assets/examples/renderable/renderablemodel/data/model_fs.glsl diff --git a/data/assets/examples/modelshader/model_vs.glsl b/data/assets/examples/renderable/renderablemodel/data/model_vs.glsl similarity index 100% rename from data/assets/examples/modelshader/model_vs.glsl rename to data/assets/examples/renderable/renderablemodel/data/model_vs.glsl diff --git a/data/assets/examples/renderable/renderablemodel/model.asset b/data/assets/examples/renderable/renderablemodel/model.asset new file mode 100644 index 0000000000..b10567b2e4 --- /dev/null +++ b/data/assets/examples/renderable/renderablemodel/model.asset @@ -0,0 +1,43 @@ +-- Basic +-- This example loads a model. + +-- Load the example model from OpenSpace servers +-- If you want to use your own model, this block of code can be safely deleted +local model = asset.resource({ + Name = "Animated Box", + Type = "HttpSynchronization", + Identifier = "animated_box", + Version = 1 +}) + +local Node = { + Identifier = "RenderableModel_Example", + Renderable = { + Type = "RenderableModel", + GeometryFile = model .. "BoxAnimated.glb", + -- Use the line below insted of the one above if you want to use your own model + --GeometryFile = "C:/path/to/model.fbx", + }, + GUI = { + Name = "RenderableModel - Basic", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) + + +-- Model credit +--[[ + Author = Cesium, https://cesium.com/ + URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated + License = + Creative Commons Attribution 4.0 International License, + https://creativecommons.org/licenses/by/4.0/ +]] diff --git a/data/assets/examples/renderable/renderablemodel/model_animation.asset b/data/assets/examples/renderable/renderablemodel/model_animation.asset new file mode 100644 index 0000000000..b977c80e2a --- /dev/null +++ b/data/assets/examples/renderable/renderablemodel/model_animation.asset @@ -0,0 +1,49 @@ +-- Animation +-- This example loads a model with an animation. The animation starts at a set time, in +-- this case "2024 07 09 12:00:00". + +-- Load the example model from OpenSpace servers +-- If you want to use your own model, this block of code can be safely deleted +local model = asset.resource({ + Name = "Animated Box", + Type = "HttpSynchronization", + Identifier = "animated_box", + Version = 1 +}) + +local Node = { + Identifier = "RenderableModel_Example_Animation", + Renderable = { + Type = "RenderableModel", + GeometryFile = model .. "BoxAnimated.glb", + -- Use the line below insted of the one above if you want to use your own model + --GeometryFile = "C:/path/to/model.fbx", + + -- Animation Parameters: + EnableAnimation = true, + -- Start the animation and play it once at this time + AnimationStartTime = "2024 07 09 12:00:00", + }, + GUI = { + Name = "RenderableModel - Basic Animation", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) + + +-- Model credit +--[[ + Author = Cesium, https://cesium.com/ + URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated + License = + Creative Commons Attribution 4.0 International License, + https://creativecommons.org/licenses/by/4.0/ +]] diff --git a/data/assets/examples/renderable/renderablemodel/model_animation_mode_bounce.asset b/data/assets/examples/renderable/renderablemodel/model_animation_mode_bounce.asset new file mode 100644 index 0000000000..0ab0634aa1 --- /dev/null +++ b/data/assets/examples/renderable/renderablemodel/model_animation_mode_bounce.asset @@ -0,0 +1,52 @@ +-- Animation Bounce From Start +-- This example loads a model with an animation. The animation starts at a set time, in +-- this case "2024 07 09 12:00:00" and is set to bounce after that time (bounce is similar +-- to a boomerang for videos). + +-- Load the example model from OpenSpace servers +-- If you want to use your own model, this block of code can be safely deleted +local model = asset.resource({ + Name = "Animated Box", + Type = "HttpSynchronization", + Identifier = "animated_box", + Version = 1 +}) + +local Node = { + Identifier = "RenderableModel_Example_Animation_Bounce", + Renderable = { + Type = "RenderableModel", + GeometryFile = model .. "BoxAnimated.glb", + -- Use the line below insted of the one above if you want to use your own model + --GeometryFile = "C:/path/to/model.fbx", + + -- Animation Parameters: + EnableAnimation = true, + -- Start the animation and play it once at this time + AnimationStartTime = "2024 07 09 12:00:00", + -- Bounce the animation after the set start time + AnimationMode = "BounceFromStart", + }, + GUI = { + Name = "RenderableModel - Animation Bounce From Start", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) + + +-- Model credit +--[[ + Author = Cesium, https://cesium.com/ + URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated + License = + Creative Commons Attribution 4.0 International License, + https://creativecommons.org/licenses/by/4.0/ +]] diff --git a/data/assets/examples/renderable/renderablemodel/model_animation_mode_bounce_infinitely.asset b/data/assets/examples/renderable/renderablemodel/model_animation_mode_bounce_infinitely.asset new file mode 100644 index 0000000000..1fd1d5c33b --- /dev/null +++ b/data/assets/examples/renderable/renderablemodel/model_animation_mode_bounce_infinitely.asset @@ -0,0 +1,52 @@ +-- Animation Bounce Infinitely +-- This example loads a model with an animation. The animation starts at a set time, in +-- this case "2024 07 09 12:00:00" and is set to bounce both before and after that time +-- (bounce is similar to a boomerang for videos). + +-- Load the example model from OpenSpace servers +-- If you want to use your own model, this block of code can be safely deleted +local model = asset.resource({ + Name = "Animated Box", + Type = "HttpSynchronization", + Identifier = "animated_box", + Version = 1 +}) + +local Node = { + Identifier = "RenderableModel_Example_Animation_Bounce_Infinitely", + Renderable = { + Type = "RenderableModel", + GeometryFile = model .. "BoxAnimated.glb", + -- Use the line below insted of the one above if you want to use your own model + --GeometryFile = "C:/path/to/model.fbx", + + -- Animation Parameters: + EnableAnimation = true, + -- Start the animation and play it once at this time + AnimationStartTime = "2024 07 09 12:00:00", + -- Bounce the animation both before and after the set start time + AnimationMode = "BounceInfinitely", + }, + GUI = { + Name = "RenderableModel - Animation Bounce Infinitely", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) + + +-- Model credit +--[[ + Author = Cesium, https://cesium.com/ + URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated + License = + Creative Commons Attribution 4.0 International License, + https://creativecommons.org/licenses/by/4.0/ +]] diff --git a/data/assets/examples/renderable/renderablemodel/model_animation_mode_loop.asset b/data/assets/examples/renderable/renderablemodel/model_animation_mode_loop.asset new file mode 100644 index 0000000000..2d441b0771 --- /dev/null +++ b/data/assets/examples/renderable/renderablemodel/model_animation_mode_loop.asset @@ -0,0 +1,51 @@ +-- Animation Loop From Start +-- This example loads a model with an animation. The animation starts at a set time, in +-- this case "2024 07 09 12:00:00" and is set to loop after that time. + +-- Load the example model from OpenSpace servers +-- If you want to use your own model, this block of code can be safely deleted +local model = asset.resource({ + Name = "Animated Box", + Type = "HttpSynchronization", + Identifier = "animated_box", + Version = 1 +}) + +local Node = { + Identifier = "RenderableModel_Example_Animation_Loop", + Renderable = { + Type = "RenderableModel", + GeometryFile = model .. "BoxAnimated.glb", + -- Use the line below insted of the one above if you want to use your own model + --GeometryFile = "C:/path/to/model.fbx", + + -- Animation Parameters: + EnableAnimation = true, + -- Start the animation and play it once at this time + AnimationStartTime = "2024 07 09 12:00:00", + -- Loop the animation after the set start time + AnimationMode = "LoopFromStart", + }, + GUI = { + Name = "RenderableModel - Animation Loop From Start", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) + + +-- Model credit +--[[ + Author = Cesium, https://cesium.com/ + URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated + License = + Creative Commons Attribution 4.0 International License, + https://creativecommons.org/licenses/by/4.0/ +]] diff --git a/data/assets/examples/renderable/renderablemodel/model_animation_mode_loop_infinitely.asset b/data/assets/examples/renderable/renderablemodel/model_animation_mode_loop_infinitely.asset new file mode 100644 index 0000000000..5b8852c970 --- /dev/null +++ b/data/assets/examples/renderable/renderablemodel/model_animation_mode_loop_infinitely.asset @@ -0,0 +1,51 @@ +-- Animation Loop Infinitely +-- This example loads a model with an animation. The animation starts at a set time, in +-- this case "2024 07 09 12:00:00" and is set to loop both before and after that time. + +-- Load the example model from OpenSpace servers +-- If you want to use your own model, this block of code can be safely deleted +local model = asset.resource({ + Name = "Animated Box", + Type = "HttpSynchronization", + Identifier = "animated_box", + Version = 1 +}) + +local Node = { + Identifier = "RenderableModel_Example_Animation_Loop_Infinitely", + Renderable = { + Type = "RenderableModel", + GeometryFile = model .. "BoxAnimated.glb", + -- Use the line below insted of the one above if you want to use your own model + --GeometryFile = "C:/path/to/model.fbx", + + -- Animation Parameters: + EnableAnimation = true, + -- Start the animation and play it once at this time + AnimationStartTime = "2024 07 09 12:00:00", + -- Loop the animation both before and after the set start time + AnimationMode = "LoopInfinitely", + }, + GUI = { + Name = "RenderableModel - Animation Loop Infinitely", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) + + +-- Model credit +--[[ + Author = Cesium, https://cesium.com/ + URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated + License = + Creative Commons Attribution 4.0 International License, + https://creativecommons.org/licenses/by/4.0/ +]] diff --git a/data/assets/examples/renderable/renderablemodel/model_lighting.asset b/data/assets/examples/renderable/renderablemodel/model_lighting.asset new file mode 100644 index 0000000000..d848937f2c --- /dev/null +++ b/data/assets/examples/renderable/renderablemodel/model_lighting.asset @@ -0,0 +1,51 @@ +-- Lighting +-- This example loads a model and load the Sun to illuminate it. + +-- Load the asset of the Sun to illuminate the model +local sun = asset.require("scene/solarsystem/sun/transforms") + +-- Load the example model from OpenSpace servers +-- If you want to use your own model, this block of code can be safely deleted +local model = asset.resource({ + Name = "Animated Box", + Type = "HttpSynchronization", + Identifier = "animated_box", + Version = 1 +}) + +local Node = { + Identifier = "RenderableModel_Example_Lighting", + Renderable = { + Type = "RenderableModel", + GeometryFile = model .. "BoxAnimated.glb", + -- Use the line below insted of the one above if you want to use your own model + --GeometryFile = "C:/path/to/model.fbx", + + -- Add the Sun as a light source to illuminate the model + LightSources = { + sun.LightSource + } + }, + GUI = { + Name = "RenderableModel - Lighting", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) + + +-- Model credit +--[[ + Author = Cesium, https://cesium.com/ + URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated + License = + Creative Commons Attribution 4.0 International License, + https://creativecommons.org/licenses/by/4.0/ +]] diff --git a/data/assets/examples/renderable/renderablemodel/model_vertex_colors.asset b/data/assets/examples/renderable/renderablemodel/model_vertex_colors.asset new file mode 100644 index 0000000000..83471ddacb --- /dev/null +++ b/data/assets/examples/renderable/renderablemodel/model_vertex_colors.asset @@ -0,0 +1,43 @@ +-- Vertex Colors +-- This example loads a model with vertex colors as material. + +-- Load the example model from OpenSpace servers +-- If you want to use your own model, this block of code can be safely deleted +local model = asset.resource({ + Name = "Vertex Colors Test Model", + Type = "HttpSynchronization", + Identifier = "model_vertex_color_test", + Version = 1 +}) + +local Node = { + Identifier = "RenderableModel_Example_Vertex_Colors", + Renderable = { + Type = "RenderableModel", + GeometryFile = model .. "VertexColorTest.glb", + -- Use the line below insted of the one above if you want to use your own model + --GeometryFile = "C:/path/to/model.fbx", + }, + GUI = { + Name = "RenderableModel - Vertex Colors", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) + + +-- Model credit +--[[ + Author = Ed Mackey + URL = "https://github.com/KhronosGroup/glTF-Sample-Models/tree/main/2.0/VertexColorTest" + License = + Creative Commons Attribution 4.0 International License, + https://creativecommons.org/licenses/by/4.0/ +]] diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/tiangong.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/tiangong.asset index 7b0a23b77e..5f421a2df9 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/tiangong.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/tiangong.asset @@ -23,7 +23,7 @@ local omm = asset.resource({ local TiangongPosition = { Identifier = "TiangongPosition", Parent = transforms.EarthInertial.Identifier, - BoundingSphere = 54.5, -- half the width + BoundingSphere = 27.8, -- half the width Transform = { Translation = { Type = "GPTranslation", diff --git a/ext/ghoul b/ext/ghoul index 07e37f0029..bb3695cc14 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 07e37f0029bf68f4178fe091445eff7339c9ff17 +Subproject commit bb3695cc14b12e26d46bc06914715200417c879e diff --git a/modules/base/shaders/model_fs.glsl b/modules/base/shaders/model_fs.glsl index c15de3dc49..e1ff381e39 100644 --- a/modules/base/shaders/model_fs.glsl +++ b/modules/base/shaders/model_fs.glsl @@ -29,6 +29,7 @@ in vec3 vs_normalViewSpace; in vec4 vs_positionCameraSpace; in float vs_screenSpaceDepth; in mat3 vs_TBN; +in vec3 vs_color; uniform float ambientIntensity = 0.2; uniform float diffuseIntensity = 1.0; @@ -36,6 +37,7 @@ uniform float specularIntensity = 1.0; uniform bool performShading = true; uniform bool use_forced_color = false; +uniform bool use_vertex_colors = false; uniform bool has_texture_diffuse; uniform bool has_texture_normal; uniform bool has_texture_specular; @@ -95,7 +97,7 @@ Fragment getFragment() { } // Base color - vec4 diffuseAlbedo; + vec4 diffuseAlbedo = vec4(0.0); if (has_texture_diffuse) { diffuseAlbedo = texture(texture_diffuse, vs_st); } @@ -103,6 +105,16 @@ Fragment getFragment() { diffuseAlbedo = color_diffuse; } + // Multiply with vertex color if specified + if (use_vertex_colors) { + diffuseAlbedo.rgb *= vs_color; + + // Make sure to not go beyond color range + diffuseAlbedo.r = clamp(diffuseAlbedo.r, 0.0, 1.0); + diffuseAlbedo.g = clamp(diffuseAlbedo.g, 0.0, 1.0); + diffuseAlbedo.b = clamp(diffuseAlbedo.b, 0.0, 1.0); + } + if (performShading) { // Specular color vec3 specularAlbedo; @@ -118,7 +130,7 @@ Fragment getFragment() { } } - // Bumb mapping + // Bump mapping vec3 normal; if (has_texture_normal) { vec3 normalAlbedo = texture(texture_normal, vs_st).rgb; diff --git a/modules/base/shaders/model_vs.glsl b/modules/base/shaders/model_vs.glsl index 9d12edc407..d8dfbeee0f 100644 --- a/modules/base/shaders/model_vs.glsl +++ b/modules/base/shaders/model_vs.glsl @@ -30,12 +30,14 @@ layout(location = 0) in vec4 in_position; layout(location = 1) in vec2 in_st; layout(location = 2) in vec3 in_normal; layout(location = 3) in vec3 in_tangent; +layout(location = 4) in vec3 in_color; out vec2 vs_st; out vec3 vs_normalViewSpace; out float vs_screenSpaceDepth; out vec4 vs_positionCameraSpace; out mat3 vs_TBN; +out vec3 vs_color; uniform mat4 modelViewTransform; uniform mat4 projectionTransform; @@ -51,6 +53,7 @@ void main() { gl_Position = positionScreenSpace; vs_st = in_st; + vs_color = in_color; vs_screenSpaceDepth = positionScreenSpace.w; vs_normalViewSpace = diff --git a/tests/visual/README.md b/tests/visual/README.md index 010a0e9f3f..a6528c4410 100644 --- a/tests/visual/README.md +++ b/tests/visual/README.md @@ -1,33 +1,40 @@ # Visual Test Specification -All `.ostest` files in this folders specify visual image tests that are automatically run to ensure that changes in OpenSpace do not negatively impact the rendered results. The tested results are available at https://regression.openspaceproject.com. +All `.ostest` files in these folders specify visual image tests that are automatically run to ensure that changes in OpenSpace do not negatively impact the rendered results. The test results are available at https://regression.openspaceproject.com. -The files are organized by folders, which are used as the "group" name for the test and filename of each test (without `.ostest` extension) is used as the name of the test. In general the first folder should name a profile that is being tested by the files within or a specific use-case, such as testing all renderables. Additional subfolders can be used as required within each top-level folder. +The files are organized in folders, where the folder name is used as the "group" name for the tests within, and the filename of each test (without the `.ostest` extension) is used as the name of the test. In general, the top-level folder should name a profile or a specific use case that is tested by the files within, such as testing all renderables. Additional subfolders can be used within each top-level folder. ## Test Structure -Each test must have a `screenshot` instruction as the last entry, which causes an image to be created that is used as the end result of the test. Only exactly one `screenshot` instruction per test is currently supported. Each `.ostest` file is a JSON file with two top-level keys: `profile` provides the name of the profile that should be loaded before running these test instructions, and `commands` is a list of instructions that should be executed after the profile was loaded. All instructions must have a `type` key to determine which type of instruction it is and most have a `value` key that determines the parameters for that instruction. +Each test must have a `screenshot` instruction as the **last** entry, which causes an image to be created that is used as the result of the test. Only exactly one `screenshot` instruction per test is currently supported. Each `.ostest` file is a JSON file with two top-level keys: `profile` provides the name of the profile that should be loaded before running these test instructions, and `commands` is a list of instructions that should be executed after the profile is loaded. All instructions must have a `type` and `value` key to determine which type of instruction it is and the parameters for that instruction. + +By default on the servers that generate tests for https://regression.openspaceproject.com, all tests always start paused, MRF caching is enabled, and the user interface and dashboard items are disabled. ### Best practices - - By default, all tests always start paused, MRF caching is enabled, and the user interface and dashboard items are disabled - - All test should start with in instruction to set a specific time to improve reproducibility - - The few instructions there are per test, the better - - Adding `wait` instructions to ensure OpenSpace has time to load dynamic datasets increases reliability, but too many `wait`s will slow-down the over all testing + - All tests should start with the instruction to set a specific time to improve reproducibility + - The fewer instructions there are per test, the better + - Adding `wait` instructions to ensure OpenSpace has time to load dynamic datasets increases reliability, but too many `wait`s will slow down the overall testing - Avoid `recording` and use `navigationstate` and `time` instead - - Avoid `script` if possible and use dedicated instructions when they exist. If we see the same `script` instruction used in many tests, they can be upgraded to a first-class instruction at later stage + - Avoid `script` if possible and use dedicated instructions when they exist. If we see the same `script` instruction used in several tests, they can be upgraded to a dedicated instruction at a later stage ### Instructions - - `action`: Triggers an action that must already be defined in the profile or that was defined previously in this test. The provided value must be a string that is the identifier of the action that should be triggered. + - `action`: Triggers an action that must already be defined in the profile or previously defined in the test. The provided value must be a string that is the identifier of the action that should be triggered. Example: `{ "type": "action", "value": "os.FadeDownTrails" }` Script Equivalent: `openspace.action.triggerAction` - - `deltatime`: Instantly changes the delta time in OpenSpace to the provided value. The provided value must be a number that is the delta time in seconds per realtime second that the engine should be set to. + - `asset`: Loads a given asset file. The provided value must be a string that is the path to the asset file to be loaded. This is specified relative to the `data/asset` folder inside OpenSpace. + + Example: `{ "type": "asset", "value": "path/to/file.asset" }` + + Script Equivalent: `openspace.asset.add` + + - `deltatime`: Instantly changes the delta time in OpenSpace to the provided value. The provided value must be a number that is the delta time in seconds per real-time second that the engine should be set to. Example: `{ "type": "deltatime", "value": 10 }` Script Equivalent: `openspace.time.setDeltaTime` - - `navigationstate`: Sets the camera to the provided navigation state. The provided value must be an object that must contain at least a `anchor` and `position` and may optionally contain an `aim`, `referenceFrame`, `up`, `yaw`, `pitch`, and `timestamp`. All these values are then used to instantaneously set the position of the camera. + - `navigationstate`: Instantly moves the camera to the provided navigation state. The provided value must be an object that must contain at least an `anchor` and `position` key and may optionally contain the keys `aim`, `referenceFrame`, `up`, `yaw`, `pitch`, and `timestamp`. All these values are then used to instantaneously set the position and rotation of the camera. Example: `{ "type": "navigationstate", "value": { "anchor": "Juno", "pitch": -0.0165756, "position": [ -22.49081, 1.191533, 26.35740 ], "up": [ 0.0288083, 0.999373, -0.0205962 ], "yaw": 0.152454 } }` @@ -39,7 +46,7 @@ Each test must have a `screenshot` instruction as the last entry, which causes a Script Equivalent: `openspace.time.setPause` - - `property`: Sets a specific property or group of properties to the specified value. This change is instantaneous. The provided value must contain a `property` key that is the identifier or regex for the property that should be set and a `value` key that is the new value for the property. The type of the `value` must be correct for the matched `property`. + - `property`: Instantly sets a specific property or group of properties to the specified value. The provided value must be an object containing another `property` and `value` key. The (other) `property` key is the identifier or regex for the property or properties that should be set. The (other) `value` key is the new value for the property where the type must match the (other) `property`. Example: `{ "type": "property", "value": { "property": "Scene.Constellations.Renderable.Enabled", "value": true } }` @@ -51,19 +58,19 @@ Each test must have a `screenshot` instruction as the last entry, which causes a Script Equivalent: `openspace.sessionRecording.startPlayback` - - `screenshot`: Takes a screenshot of the application. At the moment, there can be only exactly one instruction of this type and it should be the last instruction in the test. This instruction also does not take any parameters + - `screenshot`: Takes a screenshot of the application. At the moment, there can be only exactly one instruction of this type and it must be the last instruction in the test. This instruction is the only one to not use the `value` key. Example: `{ "type": "screenshot" }` Script Equivalent: `openspace.takeScreenshot` - - `script`: Executes the script that is passed in as a value. That value must be a string that is the Lua script that is executed directly. + - `script`: Instantly executes the script that is passed in as a value. That value must be a string that is the Lua script to execute. - Example: `{ "type": "script", "value": "openspace.printError("Hello world") }` + Example: `{ "type": "script", "value": "openspace.printError('Hello world')" }` Script Equivalent: `value` - - `time`: Sets the in-game time to the provided value. The value can be either a string, in which case it needs to be a valid date-time string, or a number, in which case it represents the number of seconds past the J2000 epoch. + - `time`: Sets the in-game time to the provided value. The value can be either a string, which needs to be a valid date-time string, or a number, which represents the number of seconds past the J2000 epoch. Example: `{ "type": "time", "value": "2016-07-01T00:00:01.00" }` diff --git a/tests/visual/renderable/model_vertex_colors.ostest b/tests/visual/renderable/model_vertex_colors.ostest new file mode 100644 index 0000000000..e9ea0e9d8b --- /dev/null +++ b/tests/visual/renderable/model_vertex_colors.ostest @@ -0,0 +1,25 @@ +{ + "profile": "empty", + "commands": [ + { "type": "time", "value": "2024-07-11T12:00:00.00" }, + { + "type": "property", + "value": { "property": "NavigationHandler.OrbitalNavigator.LimitZoom.EnabledMinimumAllowedDistance", "value": false } + }, + { + "type": "asset", + "value": "examples/renderable/renderablemodel/model_vertex_colors.asset" + }, + { "type": "wait", "value": 5 }, + { + "type": "navigationstate", + "value": { + "anchor": "RenderableModel_Example_Vertex_Colors", + "up": [ -0.008132849760983194, 0.9986021710677091, 0.0522260537818345 ], + "position": [0.10334103813188818, -0.20823861895763798, 3.9977746547860167 ] + } + }, + { "type": "wait", "value": 2 }, + { "type": "screenshot" } + ] +} From cabb8cb55bd8d73b430fea538d7a06db4805496d Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 18 Jul 2024 11:11:26 +0200 Subject: [PATCH 10/99] Add Down and Up keybinds to set the time to realtime and "now" respectively (closes #3275) --- data/assets/default_keybindings.asset | 60 +++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/data/assets/default_keybindings.asset b/data/assets/default_keybindings.asset index 66446dfd25..f12f872467 100644 --- a/data/assets/default_keybindings.asset +++ b/data/assets/default_keybindings.asset @@ -158,6 +158,42 @@ local PreviousDeltaStepImmediate = { IsLocal = true } +local RealTimeDeltaStepInterpolate = { + Identifier = "os.RealTimeDeltaStepInterpolate", + Name = "Reset the simulation time to realtime (interpolate)", + Command = "openspace.time.interpolateDeltaTime(1)", + Documentation = "Smoothly interpolate the simulation speed to match real-time speed", + GuiPath = "/Time/Simulation Speed", + IsLocal = true +} + +local RealTimeDeltaStepImmediate = { + Identifier = "os.RealTimeDeltaStepImmediate", + Name = "Reset the simulation time to realtime (immediate)", + Command = "openspace.time.setDeltaTime(1)", + Documentation = "Immediately set the simulation speed to match real-time speed", + GuiPath = "/Time/Simulation Speed", + IsLocal = true +} + +local DateToNowInterpolate = { + Identifier = "os.DateToNowInterpolate", + Name = "Set the in-game time to now (interpolate)", + Command = "openspace.time.interpolateTime(openspace.time.currentWallTime())", + Documentation = "Immediately set the current in-game time to the 'now' time", + GuiPath = "/Time/Simulation Speed", + IsLocal = true +} + +local DateToNowImmediate = { + Identifier = "os.DateToNowImmediate", + Name = "Set the in-game time to now (immediate)", + Command = "openspace.time.setTime(openspace.time.currentWallTime())", + Documentation = "Smoothly interpolate the current in-game time to the 'now' time", + GuiPath = "/Time/Simulation Speed", + IsLocal = true +} + local ReloadGui = { Identifier = "os.ReloadGui", Name = "Reload GUI", @@ -217,6 +253,18 @@ asset.onInitialize(function() openspace.action.registerAction(PreviousDeltaStepImmediate) openspace.bindKey("Shift+Left", PreviousDeltaStepImmediate.Identifier) + openspace.action.registerAction(RealTimeDeltaStepInterpolate) + openspace.bindKey("Down", RealTimeDeltaStepInterpolate.Identifier) + + openspace.action.registerAction(RealTimeDeltaStepImmediate) + openspace.bindKey("Shift+Down", RealTimeDeltaStepImmediate.Identifier) + + openspace.action.registerAction(DateToNowInterpolate) + openspace.bindKey("Up", DateToNowInterpolate.Identifier) + + openspace.action.registerAction(DateToNowImmediate) + openspace.bindKey("Shift+Up", DateToNowImmediate.Identifier) + openspace.action.registerAction(ReloadGui) openspace.bindKey("F5", ReloadGui.Identifier) end) @@ -225,6 +273,18 @@ asset.onDeinitialize(function() openspace.clearKey("F5") openspace.action.removeAction(ReloadGui) + openspace.clearKey("Shift+Up") + openspace.actiion.removeAction(DateToNowImmediate) + + openspace.clearKey("Up") + openspace.actiion.removeAction(DateToNowInterpolate) + + openspace.clearKey("Shift+Down") + openspace.action.removeAction(RealTimeDeltaStepImmediate) + + openspace.clearKey("Down") + openspace.action.removeAction(RealTimeDeltaStepInterpolate) + openspace.clearKey("Shift+Left") openspace.action.removeAction(PreviousDeltaStepImmediate) From 981a13a8556316bdc71dfd2ed611fed86c25374f Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 18 Jul 2024 11:18:57 +0200 Subject: [PATCH 11/99] Add new TileProvider to select tile providers based on the date and apply to VIIRS Joint Polar Satellite System (#3350) --- .../colorlayers/definitions/noaa20.asset | 33 +++ .../colorlayers/definitions/noaa21.asset | 33 +++ .../layers/colorlayers/definitions/snpp.asset | 33 +++ .../colorlayers/esri_noaa20_combo.asset | 22 +- .../colorlayers/esri_noaa21_combo.asset | 22 +- .../layers/colorlayers/esri_snpp_combo.asset | 52 +++++ .../layers/colorlayers/esri_viirs_combo.asset | 33 ++- .../colorlayers/viirs_noaa20_temporal.asset | 32 +-- .../colorlayers/viirs_noaa21_temporal.asset | 23 +++ .../colorlayers/viirs_snpp_temporal.asset | 32 +-- modules/globebrowsing/CMakeLists.txt | 2 + modules/globebrowsing/globebrowsingmodule.cpp | 3 + .../shaders/texturetilemapping.glsl | 12 +- modules/globebrowsing/src/gpulayergroup.cpp | 2 + modules/globebrowsing/src/layer.cpp | 7 +- modules/globebrowsing/src/layergroupid.h | 7 +- .../src/tileprovider/tileproviderbydate.cpp | 190 ++++++++++++++++++ .../src/tileprovider/tileproviderbydate.h | 65 ++++++ 18 files changed, 477 insertions(+), 126 deletions(-) create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa20.asset create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa21.asset create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/snpp.asset create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_snpp_combo.asset create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_noaa21_temporal.asset create mode 100644 modules/globebrowsing/src/tileprovider/tileproviderbydate.cpp create mode 100644 modules/globebrowsing/src/tileprovider/tileproviderbydate.h diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa20.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa20.asset new file mode 100644 index 0000000000..c948982e52 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa20.asset @@ -0,0 +1,33 @@ +local Layer = { + Identifier = "Temporal_NOAA20_VIIRS", + Name = "Temporal NOAA20 VIIRS", + Type = "TemporalTileProvider", + Mode = "Prototyped", + Prototyped = { + Time = { + Start = "2018-01-05", + End = "Today" + }, + TemporalResolution = "1d", + TimeFormat = "YYYY-MM-DD", + Prototype = openspace.globebrowsing.createTemporalGibsGdalXml( + "VIIRS_NOAA20_CorrectedReflectance_TrueColor", + "250m", + "jpg" + ) + }, + PadTiles = false +} + + +asset.export("Layer", Layer) + + + +asset.meta = { + Name = "NOAA 20", + Description = [[A layer that sources its images from the NOAA-20 satellite that is part of the Joint Polar Satellite System.]], + Author = "OpenSpace Team", + URL = "http://www.openspaceproject.com", + License = "MIT License" +} diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa21.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa21.asset new file mode 100644 index 0000000000..200649673e --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa21.asset @@ -0,0 +1,33 @@ +local Layer = { + Identifier = "Temporal_NOAA21_VIIRS", + Name = "Temporal NOAA21 VIIRS", + Type = "TemporalTileProvider", + Mode = "Prototyped", + Prototyped = { + Time = { + Start = "2024-04-19", + End = "Today" + }, + TemporalResolution = "1d", + TimeFormat = "YYYY-MM-DD", + Prototype = openspace.globebrowsing.createTemporalGibsGdalXml( + "VIIRS_NOAA21_CorrectedReflectance_TrueColor", + "250m", + "jpg" + ) + }, + PadTiles = false +} + + +asset.export("Layer", Layer) + + + +asset.meta = { + Name = "NOAA 20", + Description = [[A layer that sources its images from the NOAA-21 satellite that is part of the Joint Polar Satellite System.]], + Author = "OpenSpace Team", + URL = "http://www.openspaceproject.com", + License = "MIT License" +} diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/snpp.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/snpp.asset new file mode 100644 index 0000000000..50b9648d00 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/snpp.asset @@ -0,0 +1,33 @@ +local Layer = { + Identifier = "Temporal_SNPP_VIIRS", + Name = "Temporal SNPP VIIRS", + Type = "TemporalTileProvider", + Mode = "Prototyped", + Prototyped = { + Time = { + Start = "2015-11-24", + End = "Today" + }, + TemporalResolution = "1d", + TimeFormat = "YYYY-MM-DD", + Prototype = openspace.globebrowsing.createTemporalGibsGdalXml( + "VIIRS_SNPP_CorrectedReflectance_TrueColor", + "250m", + "jpg" + ) + }, + PadTiles = false +} + + +asset.export("Layer", Layer) + + + +asset.meta = { + Name = "NOAA 20", + Description = [[A layer that sources its images from the Suomi NPP satellite that is part of the Joint Polar Satellite System.]], + Author = "OpenSpace Team", + URL = "http://www.openspaceproject.com", + License = "MIT License" +} diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_noaa20_combo.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_noaa20_combo.asset index ae680ca127..19466f157a 100644 --- a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_noaa20_combo.asset +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_noaa20_combo.asset @@ -1,4 +1,5 @@ local globe = asset.require("../../earth") +local noaa20 = asset.require("./definitions/noaa20") @@ -11,26 +12,7 @@ local Layer = { LevelTileProviders = { { MaxLevel = 4, - TileProvider = { - Identifier = "Temporal_VIIRS_NOAA20", - Name = "Temporal VIIRS NOAA20", - Type = "TemporalTileProvider", - Mode = "Prototyped", - Prototyped = { - Time = { - Start = "2020-04-25", - End = "Today" - }, - TemporalResolution = "1d", - TimeFormat = "YYYY-MM-DD", - Prototype = openspace.globebrowsing.createTemporalGibsGdalXml( - "VIIRS_NOAA20_CorrectedReflectance_TrueColor", - "250m", - "jpg" - ) - }, - PadTiles = false - } + TileProvider = noaa20.Layer }, { MaxLevel = 22, diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_noaa21_combo.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_noaa21_combo.asset index 504ca739eb..06b44c5325 100644 --- a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_noaa21_combo.asset +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_noaa21_combo.asset @@ -1,4 +1,5 @@ local globe = asset.require("../../earth") +local noaa21 = asset.require("./definitions/noaa21") @@ -11,26 +12,7 @@ local Layer = { LevelTileProviders = { { MaxLevel = 4, - TileProvider = { - Identifier = "Temporal_VIIRS_NOAA21", - Name = "Temporal VIIRS NOAA21", - Type = "TemporalTileProvider", - Mode = "Prototyped", - Prototyped = { - Time = { - Start = "2024-04-19", - End = "Today" - }, - TemporalResolution = "1d", - TimeFormat = "YYYY-MM-DD", - Prototype = openspace.globebrowsing.createTemporalGibsGdalXml( - "VIIRS_NOAA21_CorrectedReflectance_TrueColor", - "250m", - "jpg" - ) - }, - PadTiles = false - } + TileProvider = noaa21.Layer }, { MaxLevel = 22, diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_snpp_combo.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_snpp_combo.asset new file mode 100644 index 0000000000..2ee2480dc3 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_snpp_combo.asset @@ -0,0 +1,52 @@ +local globe = asset.require("../../earth") +local snpp = asset.require("./definitions/snpp") + + + +local Layer = { + Identifier = "ESRI_VIIRS_Combo", + Name = "ESRI VIIRS Combo", + Enabled = asset.enabled, + ZIndex = 20, + Type = "TileProviderByLevel", + LevelTileProviders = { + { + MaxLevel = 4, + TileProvider = snpp.Layer + }, + { + MaxLevel = 22, + TileProvider = { + Identifier = "ESRI_World_Imagery", + Name = "ESRI World Imagery", + FilePath = asset.resource("esri_world_imagery.wms"), + PadTiles = false + } + } + }, + PadTiles = false, + Description = [[Level based layer combining "VIIRS SNPP (Temporal)" and ESRI World + Imagery. "VIIRS SNPP (Temporal)" is faded out at tile level 4]] +} + + +asset.onInitialize(function() + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", Layer) +end) + +asset.onDeinitialize(function() + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", Layer) +end) + +asset.export("layer", Layer) + + + +asset.meta = { + Name = "ESRI VIIRS Combo", + Description = [[Level based layer combining "VIIRS SNPP (Temporal)" and ESRI World + Imagery. "VIIRS SNPP (Temporal)" is faded out at tile level 4]], + Author = "OpenSpace Tem", + URL = "http://www.openspaceproject.com", + License = "MIT License" +} diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_viirs_combo.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_viirs_combo.asset index a8a1ca1b74..4c3e24bd9c 100644 --- a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_viirs_combo.asset +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_viirs_combo.asset @@ -1,4 +1,7 @@ local globe = asset.require("../../earth") +local snpp = asset.require("./definitions/snpp") +local noaa20 = asset.require("./definitions/noaa20") +local noaa21 = asset.require("./definitions/noaa21") @@ -12,24 +15,14 @@ local Layer = { { MaxLevel = 4, TileProvider = { - Identifier = "Temporal_VIIRS_SNPP", - Name = "Temporal VIIRS SNPP", - Type = "TemporalTileProvider", - Mode = "Prototyped", - Prototyped = { - Time = { - Start = "2015-11-24", - End = "2024-05-27" - }, - TemporalResolution = "1d", - TimeFormat = "YYYY-MM-DD", - Prototype = openspace.globebrowsing.createTemporalGibsGdalXml( - "VIIRS_SNPP_CorrectedReflectance_TrueColor", - "250m", - "jpg" - ) - }, - PadTiles = false + Identifier = "VIIRS_Joint_Layer", + Name = "VIIRS Joint Layer", + Type = "TileProviderByDate", + Providers = { + ["2015-11-24"] = snpp.Layer, + ["2018-01-05"] = noaa20.Layer, + ["2024-04-19"] = noaa21.Layer + } } }, { @@ -43,8 +36,8 @@ local Layer = { } }, PadTiles = false, - Description = [[Level based layer combining "VIIRS SNPP (Temporal)" and ESRI World - Imagery. "VIIRS SNPP (Temporal)" is faded out at tile level 4]] + Description = [[Level based layer combining different VIIRS layers and ESRI World + Imagery. VIIRS is faded out at tile level 4]] } diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_noaa20_temporal.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_noaa20_temporal.asset index 4f75667c4d..4380875f21 100644 --- a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_noaa20_temporal.asset +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_noaa20_temporal.asset @@ -1,42 +1,16 @@ local globe = asset.require("../../earth") +local noaa20 = asset.require("./definitions/noaa20") -local Layer = { - Identifier = "VIIRS_NOAA20_Temporal", - Name = "VIIRS NOAA20 (Temporal)", - Enabled = asset.enabled, - ZIndex = 30, - Type = "TemporalTileProvider", - Mode = "Prototyped", - Prototyped = { - Time = { - Start = "2020-04-25", - End = "Yesterday" - }, - TemporalResolution = "1d", - TimeFormat = "YYYY-MM-DD", - Prototype = openspace.globebrowsing.createTemporalGibsGdalXml( - "VIIRS_NOAA20_CorrectedReflectance_TrueColor", - "250m", - "jpg" - ) - }, - Description = [[Temporal coverage: 11 November 2015 - Present. The imagery resolution - is 0.25 km, and the temporal resolution is daily]] -} - - asset.onInitialize(function() - openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", Layer) + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", noaa20.Layer) end) asset.onDeinitialize(function() - openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", Layer) + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", noaa20.Layer) end) -asset.export("layer", Layer) - asset.meta = { diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_noaa21_temporal.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_noaa21_temporal.asset new file mode 100644 index 0000000000..e74851f857 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_noaa21_temporal.asset @@ -0,0 +1,23 @@ +local globe = asset.require("../../earth") +local noaa21 = asset.require("./definitions/noaa21") + + + +asset.onInitialize(function() + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", noaa21.Layer) +end) + +asset.onDeinitialize(function() + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", noaa21.Layer) +end) + + + +asset.meta = { + Name = "VIIRS NOAA21 (Temporal)", + Description = "This layer has the best daily Earth Image", + Author = "NASA EOSDIS Global Imagery Browse Services", + URL = + "https://earthdata.nasa.gov/eosdis/science-system-description/eosdis-components/gibs", + License = "NASA" +} diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_snpp_temporal.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_snpp_temporal.asset index e9888466e6..bf07ec7483 100644 --- a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_snpp_temporal.asset +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_snpp_temporal.asset @@ -1,42 +1,16 @@ local globe = asset.require("../../earth") +local snpp = asset.require("./definitions/snpp") -local Layer = { - Identifier = "VIIRS_SNPP_Temporal", - Name = "VIIRS SNPP (Temporal)", - Enabled = asset.enabled, - ZIndex = 30, - Type = "TemporalTileProvider", - Mode = "Prototyped", - Prototyped = { - Time = { - Start = "2015-11-24", - End = "Today" - }, - TemporalResolution = "1d", - TimeFormat = "YYYY-MM-DD", - Prototype = openspace.globebrowsing.createTemporalGibsGdalXml( - "VIIRS_SNPP_CorrectedReflectance_TrueColor", - "250m", - "jpg" - ) - }, - Description = [[Temporal coverage: 11 November 2015 - Present. The imagery resolution - is 0.25 km, and the temporal resolution is daily]] -} - - asset.onInitialize(function() - openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", Layer) + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", snpp.Layer) end) asset.onDeinitialize(function() - openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", Layer) + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", snpp.Layer) end) -asset.export("layer", Layer) - asset.meta = { diff --git a/modules/globebrowsing/CMakeLists.txt b/modules/globebrowsing/CMakeLists.txt index 75ec1e9e24..bb1e85d6b6 100644 --- a/modules/globebrowsing/CMakeLists.txt +++ b/modules/globebrowsing/CMakeLists.txt @@ -74,6 +74,7 @@ set(HEADER_FILES src/tileprovider/texttileprovider.h src/tileprovider/tileindextileprovider.h src/tileprovider/tileprovider.h + src/tileprovider/tileproviderbydate.h src/tileprovider/tileproviderbyindex.h src/tileprovider/tileproviderbylevel.h ) @@ -120,6 +121,7 @@ set(SOURCE_FILES src/tileprovider/texttileprovider.cpp src/tileprovider/tileindextileprovider.cpp src/tileprovider/tileprovider.cpp + src/tileprovider/tileproviderbydate.cpp src/tileprovider/tileproviderbyindex.cpp src/tileprovider/tileproviderbylevel.cpp ) diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index c6c4ffa7f4..6a9eafccb9 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -310,6 +311,7 @@ void GlobeBrowsingModule::internalInitialize(const ghoul::Dictionary& dict) { fTileProvider->registerClass("TemporalTileProvider"); fTileProvider->registerClass("TileIndexTileProvider"); fTileProvider->registerClass("SizeReferenceTileProvider"); + fTileProvider->registerClass("TileProviderByDate"); fTileProvider->registerClass("TileProviderByLevel"); fTileProvider->registerClass("TileProviderByIndex"); @@ -338,6 +340,7 @@ std::vector GlobeBrowsingModule::documentations() globebrowsing::SizeReferenceTileProvider::Documentation(), globebrowsing::TemporalTileProvider::Documentation(), globebrowsing::TileIndexTileProvider::Documentation(), + globebrowsing::TileProviderByDate::Documentation(), globebrowsing::TileProviderByIndex::Documentation(), globebrowsing::TileProviderByLevel::Documentation(), globebrowsing::GeoJsonManager::Documentation(), diff --git a/modules/globebrowsing/shaders/texturetilemapping.glsl b/modules/globebrowsing/shaders/texturetilemapping.glsl index 9ede2085c0..5ae7ae60c0 100644 --- a/modules/globebrowsing/shaders/texturetilemapping.glsl +++ b/modules/globebrowsing/shaders/texturetilemapping.glsl @@ -151,15 +151,17 @@ vec4 getSample#{layerGroup}#{i}(vec2 uv, vec3 levelWeights, c = getTexVal(#{layerGroup}[#{i}].pile, levelWeights, uv); #elif (#{#{layerGroup}#{i}LayerType} == 5) // TileIndexTileProvider c = getTexVal(#{layerGroup}[#{i}].pile, levelWeights, uv); -#elif (#{#{layerGroup}#{i}LayerType} == 6) // TileProviderByIndex +#elif (#{#{layerGroup}#{i}LayerType} == 6) // TileProviderByDate c = getTexVal(#{layerGroup}[#{i}].pile, levelWeights, uv); -#elif (#{#{layerGroup}#{i}LayerType} == 7) // TileProviderByLevel +#elif (#{#{layerGroup}#{i}LayerType} == 7) // TileProviderByIndex c = getTexVal(#{layerGroup}[#{i}].pile, levelWeights, uv); -#elif (#{#{layerGroup}#{i}LayerType} == 8) // SolidColor +#elif (#{#{layerGroup}#{i}LayerType} == 8) // TileProviderByLevel + c = getTexVal(#{layerGroup}[#{i}].pile, levelWeights, uv); +#elif (#{#{layerGroup}#{i}LayerType} == 9) // SolidColor c.rgb = #{layerGroup}[#{i}].color; -#elif (#{#{layerGroup}#{i}LayerType} == 9) // SpoutImageProvider +#elif (#{#{layerGroup}#{i}LayerType} == 10) // SpoutImageProvider c = getTexVal(#{layerGroup}[#{i}].pile, levelWeights, uv); -#elif (#{#{layerGroup}#{i}LayerType} == 10) // VideoTileProvider +#elif (#{#{layerGroup}#{i}LayerType} == 11) // VideoTileProvider c = getTexVal(#{layerGroup}[#{i}].pile, levelWeights, uv); #endif diff --git a/modules/globebrowsing/src/gpulayergroup.cpp b/modules/globebrowsing/src/gpulayergroup.cpp index 319ae6ea7c..fff16af0e9 100644 --- a/modules/globebrowsing/src/gpulayergroup.cpp +++ b/modules/globebrowsing/src/gpulayergroup.cpp @@ -74,6 +74,7 @@ void GPULayerGroup::setValue(ghoul::opengl::ProgramObject& program, case layers::Layer::ID::SizeReferenceTileProvider: case layers::Layer::ID::TemporalTileProvider: case layers::Layer::ID::TileIndexTileProvider: + case layers::Layer::ID::TileProviderByDate: case layers::Layer::ID::TileProviderByIndex: case layers::Layer::ID::TileProviderByLevel: { const ChunkTilePile& ctp = al.chunkTilePile( @@ -146,6 +147,7 @@ void GPULayerGroup::bind(ghoul::opengl::ProgramObject& p, const LayerGroup& laye case layers::Layer::ID::SizeReferenceTileProvider: case layers::Layer::ID::TemporalTileProvider: case layers::Layer::ID::TileIndexTileProvider: + case layers::Layer::ID::TileProviderByDate: case layers::Layer::ID::TileProviderByIndex: case layers::Layer::ID::TileProviderByLevel: { gal.gpuChunkTiles.resize(pileSize); diff --git a/modules/globebrowsing/src/layer.cpp b/modules/globebrowsing/src/layer.cpp index cd73fa70e3..7c30f94048 100644 --- a/modules/globebrowsing/src/layer.cpp +++ b/modules/globebrowsing/src/layer.cpp @@ -130,8 +130,8 @@ namespace { std::optional type [[codegen::inlist("DefaultTileProvider", "SingleImageProvider", "ImageSequenceTileProvider", "SizeReferenceTileProvider", "TemporalTileProvider", "TileIndexTileProvider", - "TileProviderByIndex", "TileProviderByLevel", "SolidColor", - "SpoutImageProvider", "VideoTileProvider")]]; + "TileProviderByDate", "TileProviderByIndex", "TileProviderByLevel", + "SolidColor", "SpoutImageProvider", "VideoTileProvider")]]; // Determine whether the layer is enabled or not. If this value is not specified, // the layer is disabled @@ -342,6 +342,7 @@ Layer::Layer(layers::Group::ID id, const ghoul::Dictionary& layerDict, LayerGrou case layers::Layer::ID::SizeReferenceTileProvider: case layers::Layer::ID::TemporalTileProvider: case layers::Layer::ID::TileIndexTileProvider: + case layers::Layer::ID::TileProviderByDate: case layers::Layer::ID::TileProviderByIndex: case layers::Layer::ID::TileProviderByLevel: case layers::Layer::ID::VideoTileProvider: @@ -513,6 +514,7 @@ void Layer::initializeBasedOnType(layers::Layer::ID id, ghoul::Dictionary initDi case layers::Layer::ID::SizeReferenceTileProvider: case layers::Layer::ID::TemporalTileProvider: case layers::Layer::ID::TileIndexTileProvider: + case layers::Layer::ID::TileProviderByDate: case layers::Layer::ID::TileProviderByIndex: case layers::Layer::ID::TileProviderByLevel: case layers::Layer::ID::VideoTileProvider: @@ -546,6 +548,7 @@ void Layer::addVisibleProperties() { case layers::Layer::ID::SizeReferenceTileProvider: case layers::Layer::ID::TemporalTileProvider: case layers::Layer::ID::TileIndexTileProvider: + case layers::Layer::ID::TileProviderByDate: case layers::Layer::ID::TileProviderByIndex: case layers::Layer::ID::TileProviderByLevel: case layers::Layer::ID::VideoTileProvider: diff --git a/modules/globebrowsing/src/layergroupid.h b/modules/globebrowsing/src/layergroupid.h index a1d5f159fd..c11fbacc7b 100644 --- a/modules/globebrowsing/src/layergroupid.h +++ b/modules/globebrowsing/src/layergroupid.h @@ -84,6 +84,7 @@ struct Layer { SizeReferenceTileProvider, TemporalTileProvider, TileIndexTileProvider, + TileProviderByDate, TileProviderByIndex, TileProviderByLevel, SolidColor, @@ -95,7 +96,7 @@ struct Layer { std::string_view identifier; }; -constexpr std::array Layers = { +constexpr std::array Layers = { Layer { .id = Layer::ID::DefaultTileProvider, .identifier = "DefaultTileProvider" @@ -120,6 +121,10 @@ constexpr std::array Layers = { .id = Layer::ID::TileIndexTileProvider, .identifier = "TileIndexTileProvider" }, + Layer { + .id = Layer::ID::TileProviderByDate, + .identifier = "TileProviderByDate" + }, Layer { .id = Layer::ID::TileProviderByIndex, .identifier = "TileProviderByIndex" diff --git a/modules/globebrowsing/src/tileprovider/tileproviderbydate.cpp b/modules/globebrowsing/src/tileprovider/tileproviderbydate.cpp new file mode 100644 index 0000000000..968f51bb1f --- /dev/null +++ b/modules/globebrowsing/src/tileprovider/tileproviderbydate.cpp @@ -0,0 +1,190 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2024 * + * * + * 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. * + ****************************************************************************************/ + +#include + +#include +#include +#include +#include +#include + +namespace { + struct [[codegen::Dictionary(TileProviderByDate)]] Parameters { + // Specifies the list of tile providers and for which times they are used for. The + // tile provider with the earliest time will be used for all dates prior to that + // date and the provider with the latest time will be used for all dates + // afterwards. In between, a provider is used from the specified time until the + // time of the next provider + std::map providers; + }; +#include "tileproviderbydate_codegen.cpp" +} // namespace + +namespace openspace::globebrowsing { + +documentation::Documentation TileProviderByDate::Documentation() { + return codegen::doc("globebrowsing_tileproviderbydate"); +} + +TileProviderByDate::TileProviderByDate(const ghoul::Dictionary& dictionary) { + ZoneScoped; + + Parameters p = codegen::bake(dictionary); + + // For now we need to inject the LayerGroupID this way. We don't want it to be part of + // the parameters struct as that would mean it would be visible to the end user, which + // we don't want since this value just comes from whoever creates it, not the user + ghoul_assert(dictionary.hasValue("LayerGroupID"), "No Layer Group ID provided"); + const layers::Group::ID group = static_cast( + dictionary.value("LayerGroupID") + ); + + for (std::pair& prov : p.providers) { + prov.second.setValue("LayerGroupID", static_cast(group)); + + // Pass down the caching information from the enclosing dictionary + if (dictionary.hasValue("GlobeName")) { + prov.second.setValue("GlobeName", dictionary.value("GlobeName")); + } + layers::Layer::ID typeID = layers::Layer::ID::DefaultTileProvider; + + if (prov.second.hasValue("Type")) { + const std::string type = prov.second.value("Type"); + typeID = ghoul::from_string(type); + } + + std::unique_ptr tp = createFromDictionary(typeID, prov.second); + const std::string provId = prov.second.value("Identifier"); + tp->setIdentifier(provId); + const std::string providerName = prov.second.value("Name"); + tp->setGuiName(providerName); + addPropertySubOwner(tp.get()); + + const double time = SpiceManager::ref().ephemerisTimeFromDate(prov.first); + _tileProviders.emplace_back(time, std::move(tp)); + } + + // After we added all tile providers, we need to sort them as they might have been + // given in an arbitrary order + std::sort( + _tileProviders.begin(), + _tileProviders.end(), + [](const Provider& lhs, const Provider& rhs) { + return lhs.startTime < rhs.startTime; + } + ); +} + +void TileProviderByDate::internalInitialize() { + for (const Provider& p : _tileProviders) { + p.tileProvider->initialize(); + } +} + +void TileProviderByDate::internalDeinitialize() { + for (const Provider& p : _tileProviders) { + p.tileProvider->deinitialize(); + } +} + +Tile TileProviderByDate::tile(const TileIndex& tileIndex) { + ZoneScoped; + + return _currentTileProvider ? _currentTileProvider->tile(tileIndex) : Tile(); +} + +Tile::Status TileProviderByDate::tileStatus(const TileIndex& index) { + return + _currentTileProvider ? + _currentTileProvider->tileStatus(index) : + Tile::Status::Unavailable; +} + + +TileDepthTransform TileProviderByDate::depthTransform() { + return _currentTileProvider ? + _currentTileProvider->depthTransform() : + TileDepthTransform(0.f, 1.f); +} + +void TileProviderByDate::update() { + if (_tileProviders.empty()) { + // If there are no tile providers, then there is no work to be done + _currentTileProvider = nullptr; + return; + } + + // First update all tile providers + for (const Provider& p : _tileProviders) { + p.tileProvider->update(); + } + + // Then check update our current tile provider pointer + const double time = global::timeManager->time().j2000Seconds(); + ghoul_assert(!_tileProviders.empty(), "There should be tile providers at this point"); + + // We use the first tileprovider for all times before the beginning start + if (time < _tileProviders.begin()->startTime) { + _currentTileProvider = _tileProviders.begin()->tileProvider.get(); + return; + } + + // And the last tileprovider for all times after the end + if (time > _tileProviders.back().startTime) { + _currentTileProvider = _tileProviders.back().tileProvider.get(); + return; + } + + _currentTileProvider = _tileProviders.begin()->tileProvider.get(); + for (const Provider& p : _tileProviders) { + if (p.startTime > time) { + // We have found the first entry that is larger than the current time, which + // means that we are done + return; + } + + _currentTileProvider = p.tileProvider.get(); + } +} + +void TileProviderByDate::reset() { + for (const Provider& p : _tileProviders) { + p.tileProvider->reset(); + } +} + +int TileProviderByDate::minLevel() { + return _currentTileProvider ? _currentTileProvider->minLevel() : 1; +} + +int TileProviderByDate::maxLevel() { + return _currentTileProvider ? _currentTileProvider->maxLevel() : 1; +} + +float TileProviderByDate::noDataValueAsFloat() { + return _currentTileProvider ? _currentTileProvider->noDataValueAsFloat() : 1; +} + +} // namespace openspace::globebrowsing diff --git a/modules/globebrowsing/src/tileprovider/tileproviderbydate.h b/modules/globebrowsing/src/tileprovider/tileproviderbydate.h new file mode 100644 index 0000000000..9c2f29179b --- /dev/null +++ b/modules/globebrowsing/src/tileprovider/tileproviderbydate.h @@ -0,0 +1,65 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2024 * + * * + * 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_MODULE_GLOBEBROWSING___TILEPROVIDER__TILEPROVIDERBYDATE___H__ +#define __OPENSPACE_MODULE_GLOBEBROWSING___TILEPROVIDER__TILEPROVIDERBYDATE___H__ + +#include + +#include + +namespace openspace::globebrowsing { + +class TileProviderByDate : public TileProvider { +public: + TileProviderByDate(const ghoul::Dictionary& dictionary); + + Tile tile(const TileIndex& tileIndex) override final; + Tile::Status tileStatus(const TileIndex& index) override final; + TileDepthTransform depthTransform() override final; + void update() override final; + void reset() override final; + int minLevel() override final; + int maxLevel() override final; + float noDataValueAsFloat() override final; + + static documentation::Documentation Documentation(); + +private: + struct Provider { + // The time at which this provider becomes valid + double startTime = 0.0; + std::unique_ptr tileProvider; + }; + + std::vector _tileProviders; + TileProvider* _currentTileProvider = nullptr; + + void internalInitialize() override final; + void internalDeinitialize() override final; +}; + +} // namespace openspace::globebrowsing + +#endif // __OPENSPACE_MODULE_GLOBEBROWSING___TILEPROVIDER__TILEPROVIDERBYDATE___H__ From 4a3e8524e2975c5c10ec6884b93b7d371cd8ccf1 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 18 Jul 2024 11:59:08 +0200 Subject: [PATCH 12/99] Remove Git Status from on-screen message --- CMakeLists.txt | 12 ------------ support/cmake/openspace_header.template | 3 +-- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5b4a10d4b..ea84b63827 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,18 +88,6 @@ execute_process( OUTPUT_STRIP_TRAILING_WHITESPACE ) -# See if working directory is clean or not -execute_process( - COMMAND git diff-index --quiet HEAD -- - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - RESULT_VARIABLE OPENSPACE_GIT_STATUS_RETURN -) -if (NOT OPENSPACE_GIT_STATUS_RETURN EQUAL 0) - set(OPENSPACE_GIT_STATUS "uncommitted changes") -else () - set(OPENSPACE_GIT_STATUS "") -endif () - if (MSVC) option(OPENSPACE_BREAK_ON_FLOATING_POINT_EXCEPTION "Raise exceptions when encountering Inf's or Nan's in floating point numbers" OFF) diff --git a/support/cmake/openspace_header.template b/support/cmake/openspace_header.template index bae418ab74..c8369ab938 100644 --- a/support/cmake/openspace_header.template +++ b/support/cmake/openspace_header.template @@ -43,8 +43,7 @@ constexpr std::string_view OPENSPACE_VERSION_STRING_FULL = "@OPENSPACE_VERSION_M constexpr std::string_view OPENSPACE_GIT_BRANCH = "@OPENSPACE_GIT_BRANCH@"; constexpr std::string_view OPENSPACE_GIT_COMMIT = "@OPENSPACE_GIT_COMMIT@"; -constexpr std::string_view OPENSPACE_GIT_STATUS = "@OPENSPACE_GIT_STATUS@"; -constexpr std::string_view OPENSPACE_GIT_FULL = "@OPENSPACE_GIT_BRANCH@@@OPENSPACE_GIT_COMMIT@ @OPENSPACE_GIT_STATUS@"; +constexpr std::string_view OPENSPACE_GIT_FULL = "@OPENSPACE_GIT_BRANCH@@@OPENSPACE_GIT_COMMIT@"; } // namespace openspace From aa99f9d6cbdd52efd23ec6bc34a8cd8fe570a80e Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 18 Jul 2024 12:01:47 +0200 Subject: [PATCH 13/99] No longer enforce a scale of 1 for screenspacedashboards --- modules/base/rendering/screenspacedashboard.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/base/rendering/screenspacedashboard.cpp b/modules/base/rendering/screenspacedashboard.cpp index e6ad767d9a..736e8555be 100644 --- a/modules/base/rendering/screenspacedashboard.cpp +++ b/modules/base/rendering/screenspacedashboard.cpp @@ -85,9 +85,6 @@ ScreenSpaceDashboard::ScreenSpaceDashboard(const ghoul::Dictionary& dictionary) _useMainDashboard = p.useMainDashboard.value_or(_useMainDashboard); addProperty(_useMainDashboard); - _scale = 1.f; - _scale.setMaxValue(15.f); - if (_useMainDashboard && p.items.has_value()) { throw ghoul::RuntimeError("Cannot specify items when using the main dashboard"); } @@ -97,7 +94,7 @@ ScreenSpaceDashboard::ScreenSpaceDashboard(const ghoul::Dictionary& dictionary) } if (p.items.has_value()) { - ghoul_assert(_useMainDashboard, "Cannot add items to the main dashboard"); + ghoul_assert(!_useMainDashboard, "Cannot add items to the main dashboard"); for (const ghoul::Dictionary& item : *p.items) { std::unique_ptr i = DashboardItem::createFromDictionary(item); _dashboard.addDashboardItem(std::move(i)); From 99a976a53cde1c29c129cacfc023c9ccec8a0302 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 18 Jul 2024 12:02:09 +0200 Subject: [PATCH 14/99] Add an example to show the current in-game time in a screenspace object (closes #3312) --- data/assets/examples/screenspacedate.asset | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 data/assets/examples/screenspacedate.asset diff --git a/data/assets/examples/screenspacedate.asset b/data/assets/examples/screenspacedate.asset new file mode 100644 index 0000000000..4b3b154ce6 --- /dev/null +++ b/data/assets/examples/screenspacedate.asset @@ -0,0 +1,44 @@ +local Dashboard = { + Identifier = "ScreenSpaceTime", + Name = "Time", + Type = "ScreenSpaceDashboard", + FaceCamera = false, + Scale = 3.0, + Items = { + { + Type = "DashboardItemDate", + Identifier = "Date", + GuiName = "Date", + FontSize = 72, + FormatString = "{}", + TimeFormat = "YYYY MON DD HR:MN:SC.### ::RND" + } + } +} + + +asset.onInitialize(function() + openspace.addScreenSpaceRenderable(Dashboard) + + openspace.setPropertyValueSingle("ScreenSpace.ScreenSpaceTime.Size", {0.000000,0.000000,640.000000,320.000000}) + +end) + +asset.onDeinitialize(function() + openspace.addScreenSpaceRenderable(Dashboard) +end) + +asset.export(Dashboard) + + + +asset.meta = { + Name = "ScreenSpace - Date", + Description = [[ + This asset provides a Date dashboard item that is shown on a screen space object. + This can be place on a dome surface to show the current time to the audience. + ]], + Author = "OpenSpace Team", + URL = "http://openspaceproject.com", + License = "MIT license" +} From 91cf916321626a8672d458f1931e86a8c576a894 Mon Sep 17 00:00:00 2001 From: Andreas Engberg Date: Fri, 5 Jul 2024 14:49:27 +0200 Subject: [PATCH 15/99] Add server name to parallelpeer authentication, used as unique identifier on wormhole server --- .../openspace/network/parallelconnection.h | 2 +- include/openspace/network/parallelpeer.h | 2 ++ src/network/parallelpeer.cpp | 31 ++++++++++++++++++- src/network/parallelpeer_lua.inl | 4 ++- 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/include/openspace/network/parallelconnection.h b/include/openspace/network/parallelconnection.h index 60f67b7172..b17ef6ae21 100644 --- a/include/openspace/network/parallelconnection.h +++ b/include/openspace/network/parallelconnection.h @@ -86,7 +86,7 @@ public: ParallelConnection::Message receiveMessage(); // Gonna do some UTF-like magic once we reach 255 to introduce a second byte or so - static constexpr uint8_t ProtocolVersion = 6; + static constexpr uint8_t ProtocolVersion = 7; private: std::unique_ptr _socket; diff --git a/include/openspace/network/parallelpeer.h b/include/openspace/network/parallelpeer.h index 734ba6e8f2..6fa11ea13c 100644 --- a/include/openspace/network/parallelpeer.h +++ b/include/openspace/network/parallelpeer.h @@ -52,6 +52,7 @@ public: void connect(); void setPort(std::string port); void setAddress(std::string address); + void setServerName(std::string name); void setName(std::string name); bool isHost(); const std::string& hostName(); @@ -97,6 +98,7 @@ private: properties::StringProperty _password; properties::StringProperty _hostPassword; + properties::StringProperty _serverName; // While the port should in theory be an int, // we use a StringProperty to avoid a slider in the GUI. diff --git a/src/network/parallelpeer.cpp b/src/network/parallelpeer.cpp index 6fbda61212..1fbd36d470 100644 --- a/src/network/parallelpeer.cpp +++ b/src/network/parallelpeer.cpp @@ -85,6 +85,13 @@ namespace { openspace::properties::Property::Visibility::AdvancedUser }; + constexpr openspace::properties::Property::PropertyInfo ServerNameInfo = { + "ServerName", + "Server Name", + "The name of the server instance to join.", + openspace::properties::Property::Visibility::AdvancedUser + }; + constexpr openspace::properties::Property::PropertyInfo BufferTimeInfo = { "BufferTime", "Buffer Time", @@ -123,6 +130,7 @@ ParallelPeer::ParallelPeer() , _port(PortInfo) , _address(AddressInfo) , _name(NameInfo) + , _serverName(ServerNameInfo) , _bufferTime(BufferTimeInfo, 0.2f, 0.01f, 5.0f) , _timeKeyframeInterval(TimeKeyFrameInfo, 0.1f, 0.f, 1.f) , _cameraKeyframeInterval(CameraKeyFrameInfo, 0.1f, 0.f, 1.f) @@ -130,6 +138,7 @@ ParallelPeer::ParallelPeer() , _connection(nullptr) { addProperty(_name); + addProperty(_serverName); addProperty(_port); addProperty(_address); addProperty(_bufferTime); @@ -190,6 +199,12 @@ void ParallelPeer::sendAuthentication() { } const uint16_t hostPasswordSize = static_cast(hostPassword.size()); + std::string serverName = _serverName; + if (serverName.size() > std::numeric_limits::max()) { + serverName.resize(std::numeric_limits::max()); + } + const uint8_t serverNameSize = static_cast(serverName.size()); + std::string name = _name; if (name.size() > std::numeric_limits::max()) { name.resize(std::numeric_limits::max()); @@ -200,9 +215,11 @@ void ParallelPeer::sendAuthentication() { // Total size of the buffer const size_t size = sizeof(uint16_t) + // password length - passwordSize + // password + passwordSize + // password sizeof(uint16_t) + // host password length hostPasswordSize + // host password + sizeof(uint8_t) + // server name length + serverNameSize + // server name sizeof(uint8_t) + // name length nameLength; // name @@ -226,6 +243,14 @@ void ParallelPeer::sendAuthentication() { ); buffer.insert(buffer.end(), hostPassword.begin(), hostPassword.end()); + // Write the server name to the buffer + buffer.insert( + buffer.end(), + reinterpret_cast(&serverNameSize), + reinterpret_cast(&serverNameSize) + sizeof(uint8_t) + ); + buffer.insert(buffer.end(), serverName.begin(), serverName.end()); + // Write the length of the nodes name to buffer buffer.insert( buffer.end(), @@ -485,6 +510,10 @@ void ParallelPeer::setAddress(std::string address) { _address = std::move(address); } +void ParallelPeer::setServerName(std::string name) { + _serverName = std::move(name); +} + void ParallelPeer::setName(std::string name) { _name = std::move(name); } diff --git a/src/network/parallelpeer_lua.inl b/src/network/parallelpeer_lua.inl index 00be96d35a..279fe057fc 100644 --- a/src/network/parallelpeer_lua.inl +++ b/src/network/parallelpeer_lua.inl @@ -25,7 +25,8 @@ namespace { [[codegen::luawrap]] void joinServer(std::string port, std::string address, - std::string password, std::string hostpassword = "", + std::string serverName, std::string password, + std::string hostpassword = "", std::string name = "Anonymous") { using namespace openspace; if (global::windowDelegate->isMaster()) { @@ -34,6 +35,7 @@ namespace { peer->setAddress(std::move(address)); peer->setPassword(std::move(password)); peer->setHostPassword(std::move(hostpassword)); + peer->setServerName(std::move(serverName)); peer->setName(std::move(name)); peer->connect(); } From e46cb269d03d5c91660c99cccab89f28eafeb612 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 18 Jul 2024 13:59:05 +0200 Subject: [PATCH 16/99] Update WebGUI hash --- data/assets/default_keybindings.asset | 4 ++-- data/assets/util/webgui.asset | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/assets/default_keybindings.asset b/data/assets/default_keybindings.asset index f12f872467..9e14ea494c 100644 --- a/data/assets/default_keybindings.asset +++ b/data/assets/default_keybindings.asset @@ -274,10 +274,10 @@ asset.onDeinitialize(function() openspace.action.removeAction(ReloadGui) openspace.clearKey("Shift+Up") - openspace.actiion.removeAction(DateToNowImmediate) + openspace.action.removeAction(DateToNowImmediate) openspace.clearKey("Up") - openspace.actiion.removeAction(DateToNowInterpolate) + openspace.action.removeAction(DateToNowInterpolate) openspace.clearKey("Shift+Down") openspace.action.removeAction(RealTimeDeltaStepImmediate) diff --git a/data/assets/util/webgui.asset b/data/assets/util/webgui.asset index 36dae8ce95..6b757eb07d 100644 --- a/data/assets/util/webgui.asset +++ b/data/assets/util/webgui.asset @@ -4,7 +4,7 @@ local guiCustomization = asset.require("customization/gui") -- Select which commit hashes to use for the frontend and backend -local frontendHash = "654c79e7f30e61249b93be509758ac675022e5f3" +local frontendHash = "95ed7fb5853d27d2b879f6f409f3101a018e03ce" local frontend = asset.resource({ Identifier = "WebGuiFrontend", From 79dce8acfac120abf4597992ca854890d9146be0 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Thu, 18 Jul 2024 14:09:30 +0200 Subject: [PATCH 17/99] Fix broken light pollution update Broke in DU Update #3335 due to updated identifiers --- data/assets/nightsky/light_pollution.asset | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/data/assets/nightsky/light_pollution.asset b/data/assets/nightsky/light_pollution.asset index 4dba3318bf..c8f7269839 100644 --- a/data/assets/nightsky/light_pollution.asset +++ b/data/assets/nightsky/light_pollution.asset @@ -62,7 +62,7 @@ local SetLightPollutionLevel1 = { openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0) - openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.9, 0.3) + openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.9, 0.3) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.01, 0.5) openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 6.1, 0.3) ]], @@ -78,7 +78,7 @@ local SetLightPollutionLevel2 = { openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0) - openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.8, 0.3) + openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.8, 0.3) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.02, 0.5) openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 6.0, 0.3) ]], @@ -94,7 +94,7 @@ local SetLightPollutionLevel3 = { openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0) - openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.7, 0.3) + openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.7, 0.3) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.03, 0.5) openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 5.9, 0.3) ]], @@ -110,7 +110,7 @@ local SetLightPollutionLevel4 = { openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0) - openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.6, 0.3) + openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.6, 0.3) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.04, 0.5) openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 5.8, 0.3) ]], @@ -126,7 +126,7 @@ local SetLightPollutionLevel5 = { openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0) - openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.5, 0.3) + openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.5, 0.3) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.05, 0.5) openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 5.8, 0.4) ]], @@ -142,7 +142,7 @@ local SetLightPollutionLevel6 = { openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0) - openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.4, 0.3) + openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.4, 0.3) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.06, 0.5) openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 5.7, 0.4) ]], @@ -158,7 +158,7 @@ local SetLightPollutionLevel7 = { openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0) - openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.3, 0.3) + openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.3, 0.3) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.07, 0.5) openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 5.6, 0.4) ]], @@ -174,7 +174,7 @@ local SetLightPollutionLevel8 = { openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0) - openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.2, 0.3) + openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.2, 0.3) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.08, 0.5) openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 5.5, 0.4) ]], @@ -191,7 +191,7 @@ local SetLightPollutionLevel9 = { openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0) openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.09, 0.5) - openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.1, 0.3) + openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.1, 0.3) openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 5.4, 0.4) ]], Documentation = "Adds a light pollution sphere and lowers the level of the stars by 0.9", @@ -205,7 +205,7 @@ local UndoLightPollution = { Command = [[ openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 0.0, 0.3) openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 6.2, 0.3) - openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 1.0, 0.3) + openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 1.0, 0.3) ]], Documentation = "Hides the light pollution sphere and resets the stars", GuiPath = "/Night Sky/Light Pollution", From 3566296f202bb2e4d3fc86a0487203549c1d9526 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 18 Jul 2024 14:35:42 +0200 Subject: [PATCH 18/99] Only provide a single Lua function for creating debug axes --- modules/debugging/debuggingmodule.cpp | 3 +- modules/debugging/debuggingmodule_lua.inl | 55 ----------------------- modules/debugging/scripts/axes.lua | 36 ++++++++++----- 3 files changed, 25 insertions(+), 69 deletions(-) diff --git a/modules/debugging/debuggingmodule.cpp b/modules/debugging/debuggingmodule.cpp index 5781dc60f2..1a38bf8cb0 100644 --- a/modules/debugging/debuggingmodule.cpp +++ b/modules/debugging/debuggingmodule.cpp @@ -161,8 +161,7 @@ scripting::LuaLibrary DebuggingModule::luaLibrary() const { codegen::lua::RenderCameraPath, codegen::lua::RemoveRenderedCameraPath, codegen::lua::RenderPathControlPoints, - codegen::lua::RemovePathControlPoints, - codegen::lua::AddCartesianAxes + codegen::lua::RemovePathControlPoints }, .scripts = { absPath("${MODULE_DEBUGGING}/scripts/axes.lua") diff --git a/modules/debugging/debuggingmodule_lua.inl b/modules/debugging/debuggingmodule_lua.inl index 06d543cc1e..63c5b9c106 100644 --- a/modules/debugging/debuggingmodule_lua.inl +++ b/modules/debugging/debuggingmodule_lua.inl @@ -247,61 +247,6 @@ constexpr glm::vec3 OrientationLineColor = glm::vec3(0.0, 1.0, 1.0); ); } -/** - * Adds a set of Cartesian axes to the scene graph node identified by the first string, to - * illustrate its local coordinate system. The second (optional) argument is a scale - * value, in meters. - */ -[[codegen::luawrap]] void addCartesianAxes(std::string nodeIdentifier, - std::optional scale) -{ - using namespace openspace; - SceneGraphNode* n = global::renderEngine->scene()->sceneGraphNode(nodeIdentifier); - if (!n) { - throw ghoul::lua::LuaError("Unknown scene graph node: " + nodeIdentifier); - } - - if (!scale.has_value()) { - scale = 2.0 * n->boundingSphere(); - if (n->boundingSphere() <= 0.0) { - LWARNINGC( - "Debugging: Cartesian Axes", - "Using zero bounding sphere for scale of created axes. You need to set " - "the scale manually for them to be visible" - ); - scale = 1.0; - } - } - - const std::string identifier = makeIdentifier(nodeIdentifier + "_AxesXYZ"); - const std::string& axes = "{" - "Identifier = '" + identifier + "'," - "Parent = '" + nodeIdentifier + "'," - "Transform = { " - "Scale = {" - "Type = 'StaticScale'," - "Scale = " + std::to_string(*scale) + "" - "}" - "}," - "Renderable = {" - "Type = 'RenderableCartesianAxes'," - "Enabled = true," - "XColor = { 1.0, 0.0, 0.0 }," - "YColor = { 0.0, 1.0, 0.0 }," - "ZColor = { 0.0, 0.0, 1.0 }" - "}," - "GUI = {" - "Name = '" + identifier + "'," - "Path = '" + DebuggingGuiPath + "/Coordiante Systems'" - "}" - "}"; - - global::scriptEngine->queueScript( - std::format("openspace.addSceneGraphNode({});", axes), - scripting::ScriptEngine::ShouldBeSynchronized::Yes, - scripting::ScriptEngine::ShouldSendToRemote::Yes - ); -} #include "debuggingmodule_lua_codegen.cpp" diff --git a/modules/debugging/scripts/axes.lua b/modules/debugging/scripts/axes.lua index 4fa5dac1f1..d6fbda714d 100644 --- a/modules/debugging/scripts/axes.lua +++ b/modules/debugging/scripts/axes.lua @@ -1,35 +1,47 @@ openspace.debugging.documentation = { { Name = "createCoordinateAxes", - Arguments = {}, + Arguments = { + { "nodeIdentifier", "String?" }, + { "scale", "Number?" } + }, Documentation = [[ Creates a new scene graph node that show the coordinate system used for the - currently selected focus node. + currently selected focus node. The first argument specifies the name of the + scene graph node for which the axes should be added. If this parameter is + not specified, the current focus node is used instead. The second argument + provides the length of the coordinate axis in meters. If this value is not + specified 2.5 times the interaction sphere of the selected node is used + instead. ]] } } -openspace.debugging.createCoordinateAxes = function () - local anchor = openspace.navigation.getNavigationState().Anchor - local radius = openspace.propertyValue("Scene." .. anchor .. ".EvaluatedInteractionSphere") +openspace.debugging.createCoordinateAxes = function (nodeIdentifier, scale) + local node = nodeIdentifier or openspace.navigation.getNavigationState().Anchor + local sphere = openspace.propertyValue("Scene." .. node .. ".EvaluatedInteractionSphere") + if sphere == -1 then + sphere = 1 + end + local size = scale or sphere * 2.5 - local node = { - Identifier = anchor .. "_DebugAxes", - Parent = anchor, + local nodespec = { + Identifier = node .. "_DebugAxes", + Parent = node, Transform = { Scale = { Type = "StaticScale", - Scale = radius * 2.5 + Scale = size } }, Renderable = { Type = "RenderableCartesianAxes" }, GUI = { - Name = anchor .. " (Debug Axes)", - Path = openspace.propertyValue("Scene." .. anchor .. ".GuiPath") + Name = node .. " (Debug Axes)", + Path = openspace.propertyValue("Scene." .. node .. ".GuiPath") } } - openspace.addSceneGraphNode(node) + openspace.addSceneGraphNode(nodespec) end From c0b4103d46f951243a2a29f25eaa5f5c935cf989 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Thu, 18 Jul 2024 15:26:27 +0200 Subject: [PATCH 19/99] Change default value for IsLocal for actions to false (closes #3194) --- include/openspace/interaction/action.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/openspace/interaction/action.h b/include/openspace/interaction/action.h index 50e34439c3..6a69dfcf87 100644 --- a/include/openspace/interaction/action.h +++ b/include/openspace/interaction/action.h @@ -63,7 +63,7 @@ struct Action { /// current OpenSpace instance. If it is `No`, it is synchronized to other OpenSpace /// instances, for example other nodes in a cluster environment, or to other OpenSpace /// instances using a parallel connection - IsLocal isLocal = IsLocal::Yes; + IsLocal isLocal = IsLocal::No; }; } // namespace openspace::interaction From ca823e1bb05777cbd32b5bf1512d2a42544a054f Mon Sep 17 00:00:00 2001 From: Malin E Date: Thu, 18 Jul 2024 15:46:02 +0200 Subject: [PATCH 20/99] Update Ghoul * Fix uniform warning for model projections --- ext/ghoul | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ghoul b/ext/ghoul index bb3695cc14..2dad49f3c1 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit bb3695cc14b12e26d46bc06914715200417c879e +Subproject commit 2dad49f3c127e16dd3fd14964b2761147bfd1d6f From 04fc890879b54975cec7893307c7abb5801c7830 Mon Sep 17 00:00:00 2001 From: Malin E Date: Thu, 18 Jul 2024 17:33:05 +0200 Subject: [PATCH 21/99] Update Ghoul (Temporary hack to fix osmodel reader) --- ext/ghoul | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ghoul b/ext/ghoul index 2dad49f3c1..6907aaf116 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 2dad49f3c127e16dd3fd14964b2761147bfd1d6f +Subproject commit 6907aaf116b3b571760a8fec00f68263f514f6b1 From 77a84be5ab64cfbef2717f8099bf82b86f069ecc Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 27 Jul 2024 11:33:01 +0200 Subject: [PATCH 22/99] Update deploy script to also build Tracy version --- deploy.bat => support/deploy.bat | 112 ++++++++++++++++++++++++------- 1 file changed, 86 insertions(+), 26 deletions(-) rename deploy.bat => support/deploy.bat (55%) diff --git a/deploy.bat b/support/deploy.bat similarity index 55% rename from deploy.bat rename to support/deploy.bat index 6f05c1eb1a..edd2eb85dc 100644 --- a/deploy.bat +++ b/support/deploy.bat @@ -1,43 +1,106 @@ @echo off +setlocal +:: This script might have been executed from the support folder +if NOT exist openspace.cfg cd .. + +call :RemoveFolders + +call :VSRedist + +:: Build with tracy +echo ## Build with Tracy +call :RunCMake build-deploy-tracy, 1 +call :Build build-deploy-tracy + +:: Save the OpenSpace.exe with Tracy +move bin\RelWithDebInfo\OpenSpace.exe . +ren OpenSpace.exe OpenSpace-Tracy.exe +rmdir /S /Q bin + +:: Build without tracy +echo ## Build without Tracy +call :RunCMake build-deploy +call :Build build-deploy + +echo ### Save the PDB files +"C:\Program Files\7-Zip\7z.exe" a pdbs.zip bin/RelWithDebInfo/*.pdb + +call :PostBuildCleanup + +move OpenSpace-Tracy.exe bin + +call :ZipDistributable OpenSpace-minimal +if exist sync call :ZipDistributable OpenSpace, 1 + +echo ### Clean up +rmdir /S /Q bin +del vc_redist.x64.exe +if exist bin-old move bin-old bin +if exist build-deploy rmdir /S /Q build-deploy +if exist build-deploy-tracy rmdir /S /Q build-deploy-tracy +exit /b 0 + + + +:RemoveFolders echo ### Removing old folders if exist bin-old rmdir /S /Q bin-old if exist build-deploy rmdir /S /Q build-deploy +if exist build-deploy-tracy rmdir /S /Q build-deploy-tracy if exist pdbs.zip del pdbs.zip if exist OpenSpace.zip del OpenSpace.zip if exist OpenSpace-minimal.zip del OpenSpace-minimal.zip echo ### Moving existing folders out of the way if exist bin move bin bin-old +exit /b 0 -echo ### Run CMake into the 'build-deploy' folder +:VSRedist +echo ### Download the Microsoft redistributable +curl "http://aka.ms/vs/17/release/vc_redist.x64.exe" --output vc_redist.x64.exe -L +exit /b 0 + + + +:RunCMake +:: The first parameter is the destination folder where we want to build +:: If the second parameter to this subroutine is defined, we want to build with Tracy +echo ### Run CMake into the %~1 folder +if "%~2"=="" ( + set "param=" +) else ( + set "param=-D TRACY_ENABLE=ON -DSGCT_TRACY_SUPPORT=ON" +) cmake^ -D SGCT_BUILD_TESTS=OFF^ -D GHOUL_HIGH_DEBUG_MODE=OFF^ -D GHOUL_HAVE_TESTS=OFF^ -D OPENSPACE_HAVE_TESTS=OFF^ -D OPENSPACE_ENABLE_ALL_MODULES=ON^ + %param%^ -S .^ - -B build-deploy + -B %~1 +exit /b 0 +:Build +:: The first parameter is the destination folder where we want to build echo ### Build OpenSpace in RelWithDebInfo mode cmake^ - --build build-deploy^ + --build %~1^ --config RelWithDebInfo^ --target OpenSpace^ --parallel^ -- /p:CL_MPcount=16 - -if %ERRORLEVEL% NEQ 0 EXIT /B - -echo ### Save the PDB files -"C:\Program Files\7-Zip\7z.exe" a pdbs.zip bin/RelWithDebInfo/*.pdb +exit /b 0 + +:PostBuildCleanup echo ### Dealing with some files :: Remove unnecessary files of our own making del bin\RelWithDebInfo\*.pdb @@ -49,23 +112,25 @@ rmdir /S /Q bin\RelWithDebInfo\iconengines rmdir /S /Q bin\RelWithDebInfo\imageformats rmdir /S /Q bin\RelWithDebInfo\networkinformation -:: Reset the documentation back to the master as it will have been updated locally -cd documentation -copy documentationData.js .. -git checkout HEAD -- documentationData.js -cd .. - :: The binary files are created in the RelWithDebInfo subdirectory and we want them in bin robocopy bin\\RelWithDebInfo bin /E /MOV rmdir /S /Q bin\\RelWithDebInfo - -:: Download the Microsoft redistributable -curl "http://aka.ms/vs/17/release/vc_redist.x64.exe" --output vc_redist.x64.exe -L +exit /b 0 -echo ### Create main zip file + +:ZipDistributable +:: The first parameter specifies the output file +:: If the second parameter to this subroutine is defined, we want to include the sync folder +echo ### Create minimal zip file +if "%~2"=="" ( + set "sync=" +) else ( + set "sync=sync" +) + :: Need to manually add any new weird paths that don't match the wildcards below -"C:\Program Files\7-Zip\7z.exe" a -tzip -mx=9 -mfb=257 -mpass=15 OpenSpace.zip^ +"C:\Program Files\7-Zip\7z.exe" a -tzip -mx=9 -mfb=257 -mpass=15 %~1.zip^ bin/*^ config/*^ data/*^ @@ -87,12 +152,7 @@ echo ### Create main zip file modules/globebrowsing/gdal_data/*^ modules/webgui/ext/nodejs/node.exe^ ^ + %sync%^ -x!documentation/.git - -echo ### Clean up -rmdir /S /Q bin -del vc_redist.x64.exe -if exist bin-old move bin-old bin -if exist build-deploy rmdir /S /Q build-deploy -move documentationData.js documentation +exit /b 0 From 9c71ba2f4263fdd7a5444d798f675d702a7cc499 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Mon, 29 Jul 2024 09:49:31 +0200 Subject: [PATCH 23/99] Apply opacity to screenspace border (closes #3355) --- modules/base/shaders/screenspace_fs.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/base/shaders/screenspace_fs.glsl b/modules/base/shaders/screenspace_fs.glsl index cf4f9b721a..88be411afb 100644 --- a/modules/base/shaders/screenspace_fs.glsl +++ b/modules/base/shaders/screenspace_fs.glsl @@ -53,7 +53,7 @@ Fragment getFragment() { if (vs_st.x < borderWidth.x || vs_st.x > 1 - borderWidth.x || vs_st.y < borderWidth.y || vs_st.y > 1 - borderWidth.y) { - frag.color = vec4(borderColor, 1.0); + frag.color = vec4(borderColor, opacity); } if (frag.color.a == 0.0) { From 664c1c951e677662844646cebcf737dec7f6b921 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Mon, 29 Jul 2024 09:53:13 +0200 Subject: [PATCH 24/99] Change "on-screen version" setting visiblity level to User To be consistent with the other settings for things that are shown on screen. It was confusing that these were different. Now Users can hide that, but still include the camera information, for example. --- src/rendering/renderengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 60d8b580d2..cdfa5c3908 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -109,7 +109,7 @@ namespace { "Shows the version on-screen information", "This value determines whether the Git version information (branch and commit) " "hash are shown on the screen.", - openspace::properties::Property::Visibility::AdvancedUser + openspace::properties::Property::Visibility::User }; constexpr openspace::properties::Property::PropertyInfo ShowCameraInfo = { From c2f7712c4ad8f7557f727818e20d75f9783b60df Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Mon, 29 Jul 2024 11:33:28 +0200 Subject: [PATCH 25/99] Add a Label for Exoplanet Systems (Issue #3318) (#3352) * Add a disables label for the star for all added exoplanet systems * Refactor queue script code a bit, to reduce duplicate code * Apply suggestions from code review Co-authored-by: Alexander Bock --------- Co-authored-by: Alexander Bock --- modules/exoplanets/exoplanetsmodule_lua.inl | 87 +++++++++++---------- 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index 18c123f164..1c829d0ed4 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -105,6 +105,17 @@ openspace::exoplanets::ExoplanetSystem findExoplanetSystemInData( return system; } +void queueAddSceneGraphNodeScript(const std::string& sgnTableAsString) { + using namespace openspace; + // No sync or send because this will already be called inside a Lua script, + // therefor it has already been synced and sent to the connected nodes and peers + global::scriptEngine->queueScript( + std::format("openspace.addSceneGraphNode({})", sgnTableAsString), + scripting::ScriptEngine::ShouldBeSynchronized::No, + scripting::ScriptEngine::ShouldSendToRemote::No + ); +} + void createExoplanetSystem(const std::string& starName, openspace::exoplanets::ExoplanetSystem system) { @@ -211,13 +222,33 @@ void createExoplanetSystem(const std::string& starName, "}" "}"; - // No sync or send because this is already inside a Lua script, therefor it has - // already been synced and sent to the connected nodes and peers - global::scriptEngine->queueScript( - "openspace.addSceneGraphNode(" + starParent + ");", - scripting::ScriptEngine::ShouldBeSynchronized::No, - scripting::ScriptEngine::ShouldSendToRemote::No - ); + queueAddSceneGraphNodeScript(starParent); + + // Add a label for the star. + // The fade values are set based on the values for the Sun label + const std::string starLabel = "{" + "Identifier = '" + starIdentifier + "_Label'," + "Parent = '" + starIdentifier + "'," + "Renderable = {" + "Type = 'RenderableLabel'," + "Enabled = false," + "Text = '" + sanitizedStarName + "'," + "FontSize = 70.0," + "Size = 14.17," + "MinMaxSize = { 1, 50 }," + "EnableFading = true," + "FadeUnit = 'pc'," + "FadeDistances = { 1.33, 15.0 }," + "FadeWidths = {1.0, 20.0}" + "}," + "Tag = {'exoplanet_system_labels'}," + "GUI = {" + "Name = '" + sanitizedStarName + " Label'," + "Path = '" + guiPath + "'" + "}" + "}"; + + queueAddSceneGraphNodeScript(starLabel); // Planets for (size_t i = 0; i < system.planetNames.size(); i++) { @@ -330,14 +361,8 @@ void createExoplanetSystem(const std::string& starName, "}" "}"; - // No sync or send because this is already inside a Lua script, therefor it has - // already been synced and sent to the connected nodes and peers - global::scriptEngine->queueScript( - "openspace.addSceneGraphNode(" + planetTrailNode + ");" - "openspace.addSceneGraphNode(" + planetNode + ");", - scripting::ScriptEngine::ShouldBeSynchronized::No, - scripting::ScriptEngine::ShouldSendToRemote::No - ); + queueAddSceneGraphNodeScript(planetTrailNode); + queueAddSceneGraphNodeScript(planetNode); bool hasUpperAUncertainty = !std::isnan(planet.aUpper); bool hasLowerAUncertainty = !std::isnan(planet.aLower); @@ -387,13 +412,7 @@ void createExoplanetSystem(const std::string& starName, "}" "}"; - // No sync or send because this is already inside a Lua script, therefor it - // has already been synced and sent to the connected nodes and peers - global::scriptEngine->queueScript( - "openspace.addSceneGraphNode(" + discNode + ");", - scripting::ScriptEngine::ShouldBeSynchronized::No, - scripting::ScriptEngine::ShouldSendToRemote::No - ); + queueAddSceneGraphNodeScript(discNode); } } @@ -437,13 +456,7 @@ void createExoplanetSystem(const std::string& starName, "}" "}"; - // No sync or send because this is already inside a Lua script, therefor it has - // already been synced and sent to the connected nodes and peers - global::scriptEngine->queueScript( - "openspace.addSceneGraphNode(" + circle + ");", - scripting::ScriptEngine::ShouldBeSynchronized::No, - scripting::ScriptEngine::ShouldSendToRemote::No - ); + queueAddSceneGraphNodeScript(circle); // Habitable Zone bool hasTeff = !std::isnan(system.starData.teff); @@ -491,13 +504,7 @@ void createExoplanetSystem(const std::string& starName, "}" "}"; - // No sync or send because this is already inside a Lua script, therefor it has - // already been synced and sent to the connected nodes and peers - global::scriptEngine->queueScript( - "openspace.addSceneGraphNode(" + zoneDiscNode + ");", - scripting::ScriptEngine::ShouldBeSynchronized::No, - scripting::ScriptEngine::ShouldSendToRemote::No - ); + queueAddSceneGraphNodeScript(zoneDiscNode); // Star glare if (starColor.has_value()) { @@ -535,13 +542,7 @@ void createExoplanetSystem(const std::string& starName, "}" "}"; - // No sync or send because this is already inside a Lua script, therefor it - // has already been synced and sent to the connected nodes and peers - global::scriptEngine->queueScript( - "openspace.addSceneGraphNode(" + starGlare + ");", - scripting::ScriptEngine::ShouldBeSynchronized::No, - scripting::ScriptEngine::ShouldSendToRemote::No - ); + queueAddSceneGraphNodeScript(starGlare); } } } From 9ea69d6b1a0a33984df82a1b345f845ab2db97b4 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Tue, 30 Jul 2024 09:05:40 +0200 Subject: [PATCH 26/99] Add option to specify a default texture for added exoplanets (#3353) * Add possibility to specify a default texture for added exoplanets * Warn if exoplanet texture does not exists and provide more user friendly warnings * Address review comments --- modules/exoplanets/exoplanetsmodule.cpp | 22 +++++++++++++++ modules/exoplanets/exoplanetsmodule.h | 2 ++ modules/exoplanets/exoplanetsmodule_lua.inl | 31 ++++++++++++++++++++- 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/modules/exoplanets/exoplanetsmodule.cpp b/modules/exoplanets/exoplanetsmodule.cpp index 454b89fbcc..5884d7426c 100644 --- a/modules/exoplanets/exoplanetsmodule.cpp +++ b/modules/exoplanets/exoplanetsmodule.cpp @@ -94,6 +94,15 @@ namespace { openspace::properties::Property::Visibility::AdvancedUser }; + constexpr openspace::properties::Property::PropertyInfo PlanetDefaultTextureInfo = { + "PlanetDefaultTexture", + "Planet Default Texture", + "The path to an image that should be used by default for the planets in all " + "added exoplanet systems. If not specified, the planets are rendered without a " + "texture when added.", + openspace::properties::Property::Visibility::AdvancedUser + }; + constexpr openspace::properties::Property::PropertyInfo OrbitDiscTextureInfo = { "OrbitDiscTexture", "Orbit Disc Texture", @@ -182,6 +191,9 @@ namespace { // [[codegen::verbatim(NoDataTextureInfo.description)]] std::optional noDataTexture; + // [[codegen::verbatim(PlanetDefaultTextureInfo.description)]] + std::optional planetDefaultTexture; + // [[codegen::verbatim(OrbitDiscTextureInfo.description)]] std::optional orbitDiscTexture; @@ -221,6 +233,7 @@ ExoplanetsModule::ExoplanetsModule() , _starTexturePath(StarTextureInfo) , _starGlareTexturePath(StarGlareTextureInfo) , _noDataTexturePath(NoDataTextureInfo) + , _planetDefaultTexturePath(PlanetDefaultTextureInfo) , _orbitDiscTexturePath(OrbitDiscTextureInfo) , _habitableZoneTexturePath(HabitableZoneTextureInfo) , _comparisonCircleColor( @@ -244,6 +257,7 @@ ExoplanetsModule::ExoplanetsModule() addProperty(_starTexturePath); addProperty(_starGlareTexturePath); addProperty(_noDataTexturePath); + addProperty(_planetDefaultTexturePath); addProperty(_orbitDiscTexturePath); addProperty(_habitableZoneTexturePath); @@ -301,6 +315,10 @@ std::filesystem::path ExoplanetsModule::noDataTexturePath() const { return _noDataTexturePath.value(); } +std::filesystem::path ExoplanetsModule::planetDefaultTexturePath() const { + return _planetDefaultTexturePath.value(); +} + std::filesystem::path ExoplanetsModule::orbitDiscTexturePath() const { return _orbitDiscTexturePath.value(); } @@ -354,6 +372,10 @@ void ExoplanetsModule::internalInitialize(const ghoul::Dictionary& dict) { _starGlareTexturePath = p.starGlareTexture->string(); } + if (p.planetDefaultTexture.has_value()) { + _planetDefaultTexturePath = p.planetDefaultTexture->string(); + } + if (p.noDataTexture.has_value()) { _noDataTexturePath = p.noDataTexture->string(); } diff --git a/modules/exoplanets/exoplanetsmodule.h b/modules/exoplanets/exoplanetsmodule.h index c1ff4a787a..10de1c5f77 100644 --- a/modules/exoplanets/exoplanetsmodule.h +++ b/modules/exoplanets/exoplanetsmodule.h @@ -51,6 +51,7 @@ public: std::filesystem::path starTexturePath() const; std::filesystem::path starGlareTexturePath() const; std::filesystem::path noDataTexturePath() const; + std::filesystem::path planetDefaultTexturePath() const; std::filesystem::path orbitDiscTexturePath() const; std::filesystem::path habitableZoneTexturePath() const; glm::vec3 comparisonCircleColor() const; @@ -72,6 +73,7 @@ protected: properties::StringProperty _starTexturePath; properties::StringProperty _starGlareTexturePath; properties::StringProperty _noDataTexturePath; + properties::StringProperty _planetDefaultTexturePath; properties::StringProperty _orbitDiscTexturePath; properties::StringProperty _habitableZoneTexturePath; diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index 1c829d0ed4..60d5a56f6d 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -166,6 +166,14 @@ void createExoplanetSystem(const std::string& starName, if (!std::isnan(bv)) { starColor = computeStarColor(bv); const std::filesystem::path starTexture = module->starTexturePath(); + + if (!starTexture.empty() && !std::filesystem::is_regular_file(starTexture)) { + LWARNING(std::format( + "Could not find specified star texture set in {} module: '{}'", + module->guiName(), starTexture + )); + } + colorLayers = "{" "Identifier = 'StarColor'," @@ -251,6 +259,15 @@ void createExoplanetSystem(const std::string& starName, queueAddSceneGraphNodeScript(starLabel); // Planets + + const std::filesystem::path planetTexture = module->planetDefaultTexturePath(); + if (!planetTexture.empty() && !std::filesystem::is_regular_file(planetTexture)) { + LWARNING(std::format( + "Could not find specified planet default texture set in {} module: '{}'", + module->guiName(), planetTexture + )); + } + for (size_t i = 0; i < system.planetNames.size(); i++) { // Note that we are here overriding some invalid parameters in the planet data. // Use a reference, so that it is changed down the line @@ -317,6 +334,16 @@ void createExoplanetSystem(const std::string& starName, "Period = " + std::to_string(periodInSeconds) + "" "}"; + std::string planetLayers = ""; + if (!planetTexture.empty()) { + planetLayers = "{" + "Identifier = 'PlanetTexture'," + "FilePath = openspace.absPath('" + formatPathToLua(planetTexture) + "')," + "BlendMode = 'Color'," + "Enabled = true" + "}"; + } + const std::string planetNode = "{" "Identifier = '" + planetIdentifier + "'," "Parent = '" + starIdentifier + "'," @@ -325,7 +352,9 @@ void createExoplanetSystem(const std::string& starName, "Enabled = " + enabled + "," "Radii = " + std::to_string(planetRadius) + "," // in meters "PerformShading = true," - "Layers = {}," + "Layers = {" + "ColorLayers = {" + planetLayers + "}" + "}," "LightSourceNode = '" + starIdentifier + "'" "}," "Transform = { " From 97e455f7aff78befcb591871993f16819327159b Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 29 Jul 2024 12:49:08 +0200 Subject: [PATCH 27/99] Update kernel data for Rosetta --- .../missions/rosetta/kernels.asset | 88 +++++++++++-------- .../missions/rosetta/rosetta.asset | 4 + src/scene/rotation.cpp | 2 + src/scene/scale.cpp | 2 + src/scene/translation.cpp | 2 + 5 files changed, 61 insertions(+), 37 deletions(-) diff --git a/data/assets/scene/solarsystem/missions/rosetta/kernels.asset b/data/assets/scene/solarsystem/missions/rosetta/kernels.asset index 1c3b9f0f67..3d4766270f 100644 --- a/data/assets/scene/solarsystem/missions/rosetta/kernels.asset +++ b/data/assets/scene/solarsystem/missions/rosetta/kernels.asset @@ -2,57 +2,71 @@ local data = asset.resource({ Name = "Rosetta Kernels", Type = "HttpSynchronization", Identifier = "rosetta_kernels", - Version = 1 + Version = 2 }) local Kernels = { - data .. "ROS_160718_STEP.TSC", - data .. "ros_triv.tsc", + data .. "ROS_160929_STEP.TSC", - data .. "CORB_DV_243_01___T19_00325.BSP", - data .. "CORB_DV_223_01___T19_00302.BSP", - data .. "CORB_DV_145_01___T19_00216.BSP", + data .. "RORB_DV_257_03___T19_00345.BSP", + data .. "CORB_DV_257_03___T19_00345.BSP", + data .. "LORB_C_G_FIXED_RBD_7_V2_0.BSP", + data .. "LORB_ROS_SC_PRESEP_V1_0.BSP", - data .. "LORB_DV_236_01___T19_00318.BSP", - data .. "LORB_DV_223_01___T19_00302.BSP", - data .. "LORB_DV_145_01___T19_00216.BSP", + data .. "ATNR_P040302093352_T6_00127.BC", - data .. "RORB_DV_243_01___T19_00325.BSP", - data .. "RORB_DV_223_01___T19_00302.BSP", - data .. "RORB_DV_145_01___T19_00216.BSP", + data .. "ROS_STRUCT_V8.BSP", - data .. "ATNR_P040302093352_00127.BC", + data .. "ROS_ALICE_V17.TI", + data .. "ROS_CIVA_V11.TI", + data .. "ROS_CONSERT_V11.TI", + data .. "ROS_COSIMA_V15.TI", + data .. "ROS_DIM_V11.TI", + data .. "ROS_GIADA_V12.TI", + data .. "ROS_MIDAS_V11.TI", + data .. "ROS_MIRO_V11.TI", + data .. "ROS_NAVCAM_V03.TI", + data .. "ROS_OSIRIS_V17.TI", + data .. "ROS_ROLIS_V03.TI", + data .. "ROS_ROSINA_V12.TI", + data .. "ROS_RPC_V20.TI", - data .. "ROS_STRUCT_V5.BSP", + data .. "ROS_V38.TF", - data .. "ROS_NAVCAM_V01.TI", + data .. "RATT_DV_257_02_01_T6_00344.BC", + data .. "RATT_DV_223_01_01_T6_00302.BC", + data .. "RATT_DV_145_01_01_T6_00216.BC", - data .. "ROS_CHURYUMOV_V01.TF", - data .. "ROS_V26.TF", + data .. "CATT_DV_257_03_______00344.BC", + data .. "CATT_DV_223_02_______00302.BC", + data .. "CATT_DV_145_02_______00216.BC", - -- CK - -- Rosetta attitude - data .. "RATT_DV_243_01_01____00325.BC", - data .. "RATT_DV_223_01_01____00302.BC", - data .. "RATT_DV_145_01_01____00216.BC", + data .. "ROS_HGA_2004_V0002.BC", + data .. "ROS_HGA_2005_V0002.BC", + data .. "ROS_HGA_2006_V0002.BC", + data .. "ROS_HGA_2007_V0002.BC", + data .. "ROS_HGA_2008_V0020.BC", + data .. "ROS_HGA_2009_V0053.BC", + data .. "ROS_HGA_2010_V0047.BC", + data .. "ROS_HGA_2011_V0019.BC", + data .. "ROS_HGA_2014_V0045.BC", + data .. "ROS_HGA_2015_V0054.BC", + data .. "ROS_HGA_2016_V0043.BC", - -- Comet attitude - data .. "CATT_DV_243_01_______00325.BC", - data .. "CATT_DV_223_01_______00302.BC", - data .. "CATT_DV_145_01_______00216.BC", + data .. "ROS_SA_2004_V0002.BC", + data .. "ROS_SA_2005_V0002.BC", + data .. "ROS_SA_2006_V0002.BC", + data .. "ROS_SA_2007_V0002.BC", + data .. "ROS_SA_2008_V0039.BC", + data .. "ROS_SA_2009_V0055.BC", + data .. "ROS_SA_2010_V0053.BC", + data .. "ROS_SA_2011_V0021.BC", + data .. "ROS_SA_2014_V0048.BC", + data .. "ROS_SA_2015_V0043.BC", + data .. "ROS_SA_2016_V0042.BC", - -- High gain antenna - data .. "ROS_HGA_2016_V0035.BC", - data .. "ROS_HGA_2015_V0053.BC", - data .. "ROS_HGA_2014_V0044.BC", - - -- Solar arrays - data .. "ROS_SA_2016_V0034.BC", - data .. "ROS_SA_2015_V0042.BC", - data .. "ROS_SA_2014_V0047.BC", - - data .. "ROS_CGS_RSOC_V03.TPC" + data .. "ROS_CG_RAD_V10.TPC" } local ID = { diff --git a/data/assets/scene/solarsystem/missions/rosetta/rosetta.asset b/data/assets/scene/solarsystem/missions/rosetta/rosetta.asset index a531ac30a0..c11f985565 100644 --- a/data/assets/scene/solarsystem/missions/rosetta/rosetta.asset +++ b/data/assets/scene/solarsystem/missions/rosetta/rosetta.asset @@ -97,6 +97,10 @@ local Philae = { Identifier = "Philae", Parent = PhilaePosition.Identifier, Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 1.0, 0.0, -1.25 } + }, Rotation = { Type = "StaticRotation", Rotation = { 0.0, math.pi / 2.0, 0.0 } diff --git a/src/scene/rotation.cpp b/src/scene/rotation.cpp index 2ba4a76e3e..6ca29ae3c1 100644 --- a/src/scene/rotation.cpp +++ b/src/scene/rotation.cpp @@ -82,6 +82,8 @@ const glm::dmat3& Rotation::matrix() const { } void Rotation::update(const UpdateData& data) { + ZoneScoped; + if (!_needsUpdate && (data.time.j2000Seconds() == _cachedTime)) { return; } diff --git a/src/scene/scale.cpp b/src/scene/scale.cpp index 812a029fd5..21fe1441dd 100644 --- a/src/scene/scale.cpp +++ b/src/scene/scale.cpp @@ -83,6 +83,8 @@ glm::dvec3 Scale::scaleValue() const { } void Scale::update(const UpdateData& data) { + ZoneScoped; + if (!_needsUpdate && data.time.j2000Seconds() == _cachedTime) { return; } diff --git a/src/scene/translation.cpp b/src/scene/translation.cpp index 717242f402..923026bd54 100644 --- a/src/scene/translation.cpp +++ b/src/scene/translation.cpp @@ -72,6 +72,8 @@ bool Translation::initialize() { } void Translation::update(const UpdateData& data) { + ZoneScoped; + if (!_needsUpdate && data.time.j2000Seconds() == _cachedTime) { return; } From 202e598415372817cf11f0517946df72e8440b3b Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 30 Jul 2024 13:30:06 +0200 Subject: [PATCH 28/99] Update SGCT repository --- apps/OpenSpace/ext/sgct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index c68e7cf398..7b08cda0ed 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit c68e7cf398dbdeb181724f39787887623a9e5946 +Subproject commit 7b08cda0ed002bda77f82a96ad721f34e7caa0a0 From 90d05187b4bbfe406113fcfe91fbae2b3a43d4b2 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 30 Jul 2024 13:51:18 +0200 Subject: [PATCH 29/99] Instead of deleting layers directly through the property, schedule them to delete in the next frame instead (closes #3357) --- modules/globebrowsing/src/layer.cpp | 4 +++- modules/globebrowsing/src/layergroup.cpp | 9 +++++++++ modules/globebrowsing/src/layergroup.h | 5 +++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/globebrowsing/src/layer.cpp b/modules/globebrowsing/src/layer.cpp index 7c30f94048..91f263208e 100644 --- a/modules/globebrowsing/src/layer.cpp +++ b/modules/globebrowsing/src/layer.cpp @@ -26,6 +26,8 @@ #include #include +#include +#include #include #include #include @@ -320,7 +322,7 @@ Layer::Layer(layers::Group::ID id, const ghoul::Dictionary& layerDict, LayerGrou _remove.onChange([this]() { if (_tileProvider) { _tileProvider->reset(); - _parent.deleteLayer(identifier()); + _parent.scheduleDeleteLayer(identifier()); } }); diff --git a/modules/globebrowsing/src/layergroup.cpp b/modules/globebrowsing/src/layergroup.cpp index e85439fbc8..0b8ae03134 100644 --- a/modules/globebrowsing/src/layergroup.cpp +++ b/modules/globebrowsing/src/layergroup.cpp @@ -89,6 +89,11 @@ void LayerGroup::deinitialize() { void LayerGroup::update() { ZoneScoped; + for (const std::string& layer : _layersToDelete) { + deleteLayer(layer); + } + _layersToDelete.clear(); + _activeLayers.clear(); for (const std::unique_ptr& layer : _layers) { @@ -217,6 +222,10 @@ void LayerGroup::deleteLayer(const std::string& layerName) { LERROR("Could not find layer " + layerName); } +void LayerGroup::scheduleDeleteLayer(const std::string& layerName) { + _layersToDelete.push_back(layerName); +} + void LayerGroup::moveLayer(int oldPosition, int newPosition) { if (_layers.size() == 1) { ghoul_assert( diff --git a/modules/globebrowsing/src/layergroup.h b/modules/globebrowsing/src/layergroup.h index 91609612b0..1844178662 100644 --- a/modules/globebrowsing/src/layergroup.h +++ b/modules/globebrowsing/src/layergroup.h @@ -53,6 +53,9 @@ struct LayerGroup : public properties::PropertyOwner { Layer* addLayer(const ghoul::Dictionary& layerDict); void deleteLayer(const std::string& layerName); + + // The same as `deleteLayer` but executed later before the next frame + void scheduleDeleteLayer(const std::string& layerName); void moveLayer(int oldPosition, int newPosition); /** @@ -81,6 +84,8 @@ private: std::vector> _layers; std::vector _activeLayers; + std::vector _layersToDelete; + properties::BoolProperty _levelBlendingEnabled; std::function _onChangeCallback; }; From b27eae7051a120b8774d73823355981424a08da7 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 30 Jul 2024 14:10:21 +0200 Subject: [PATCH 30/99] Correctly generate the mipmap for text tiles after rerendering them (closes #3356) --- modules/globebrowsing/src/tileprovider/texttileprovider.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/globebrowsing/src/tileprovider/texttileprovider.cpp b/modules/globebrowsing/src/tileprovider/texttileprovider.cpp index bef9727ad1..ec4563080f 100644 --- a/modules/globebrowsing/src/tileprovider/texttileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/texttileprovider.cpp @@ -97,6 +97,8 @@ Tile TextTileProvider::renderTile(const TileIndex& tileIndex, const std::string& fontRenderer->render(*font, position, text, color); + texture->setFilter(ghoul::opengl::Texture::FilterMode::LinearMipMap); + tile = Tile{ texture, std::nullopt, Tile::Status::OK }; tileCache->put(key, initData.hashKey, tile); From c4c82483e003c26e688488fc8aace2d07bb05519 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 31 Jul 2024 10:57:10 +0200 Subject: [PATCH 31/99] Update copyright header in CMakeLists files --- CMakeLists.txt | 2 +- apps/CMakeLists.txt | 2 +- apps/OpenSpace/CMakeLists.txt | 2 +- apps/OpenSpace/ext/launcher/CMakeLists.txt | 2 +- ext/CMakeLists.txt | 2 +- modules/CMakeLists.txt | 2 +- modules/atmosphere/CMakeLists.txt | 2 +- modules/audio/CMakeLists.txt | 2 +- modules/base/CMakeLists.txt | 2 +- modules/cefwebgui/CMakeLists.txt | 2 +- modules/debugging/CMakeLists.txt | 2 +- modules/digitaluniverse/CMakeLists.txt | 2 +- modules/exoplanets/CMakeLists.txt | 2 +- modules/fieldlines/CMakeLists.txt | 2 +- modules/fieldlinessequence/CMakeLists.txt | 2 +- modules/fitsfilereader/CMakeLists.txt | 2 +- modules/gaia/CMakeLists.txt | 2 +- modules/galaxy/CMakeLists.txt | 2 +- modules/globebrowsing/CMakeLists.txt | 2 +- modules/imgui/CMakeLists.txt | 2 +- modules/imgui/ext/imgui/CMakeLists.txt | 2 +- modules/iswa/CMakeLists.txt | 2 +- modules/kameleon/CMakeLists.txt | 2 +- modules/kameleonvolume/CMakeLists.txt | 2 +- modules/multiresvolume/CMakeLists.txt | 2 +- modules/server/CMakeLists.txt | 2 +- modules/skybrowser/CMakeLists.txt | 2 +- modules/space/CMakeLists.txt | 2 +- modules/spacecraftinstruments/CMakeLists.txt | 2 +- modules/spout/CMakeLists.txt | 2 +- modules/statemachine/CMakeLists.txt | 2 +- modules/sync/CMakeLists.txt | 2 +- modules/touch/CMakeLists.txt | 2 +- modules/touch/ext/CMakeLists.txt | 2 +- modules/toyvolume/CMakeLists.txt | 2 +- modules/video/CMakeLists.txt | 2 +- modules/vislab/CMakeLists.txt | 2 +- modules/volume/CMakeLists.txt | 2 +- modules/webbrowser/CMakeLists.txt | 2 +- modules/webbrowser/cmake/cef_support.cmake | 2 +- modules/webbrowser/cmake/webbrowser_helpers.cmake | 2 +- modules/webgui/CMakeLists.txt | 2 +- modules/webgui/cmake/nodejs_support.cmake | 2 +- src/CMakeLists.txt | 2 +- support/cmake/application_definition.cmake | 2 +- support/cmake/global_variables.cmake | 2 +- support/cmake/module_common.cmake | 2 +- support/cmake/module_definition.cmake | 2 +- support/cmake/packaging.cmake | 2 +- support/cmake/set_openspace_compile_settings.cmake | 2 +- tests/CMakeLists.txt | 2 +- 51 files changed, 51 insertions(+), 51 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea84b63827..1ac09c4647 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index d28a99f874..6d7931f159 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/apps/OpenSpace/CMakeLists.txt b/apps/OpenSpace/CMakeLists.txt index f79ee8f174..c4a1234cd0 100644 --- a/apps/OpenSpace/CMakeLists.txt +++ b/apps/OpenSpace/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/apps/OpenSpace/ext/launcher/CMakeLists.txt b/apps/OpenSpace/ext/launcher/CMakeLists.txt index 42b1c0f042..3fe59b0c89 100644 --- a/apps/OpenSpace/ext/launcher/CMakeLists.txt +++ b/apps/OpenSpace/ext/launcher/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt index be0d33f15d..f33aeb676a 100644 --- a/ext/CMakeLists.txt +++ b/ext/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index c4e0bc5b6f..0450d19af1 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/atmosphere/CMakeLists.txt b/modules/atmosphere/CMakeLists.txt index b49ac4af6c..ef9be6bff5 100644 --- a/modules/atmosphere/CMakeLists.txt +++ b/modules/atmosphere/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/audio/CMakeLists.txt b/modules/audio/CMakeLists.txt index 76129785b6..f176e75e03 100644 --- a/modules/audio/CMakeLists.txt +++ b/modules/audio/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/base/CMakeLists.txt b/modules/base/CMakeLists.txt index 54bbd06ec7..fe79b952b8 100644 --- a/modules/base/CMakeLists.txt +++ b/modules/base/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/cefwebgui/CMakeLists.txt b/modules/cefwebgui/CMakeLists.txt index 531702b264..f5fd6fc5eb 100644 --- a/modules/cefwebgui/CMakeLists.txt +++ b/modules/cefwebgui/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/debugging/CMakeLists.txt b/modules/debugging/CMakeLists.txt index b72d237135..c9868b3c3f 100644 --- a/modules/debugging/CMakeLists.txt +++ b/modules/debugging/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/digitaluniverse/CMakeLists.txt b/modules/digitaluniverse/CMakeLists.txt index 0815b5df8e..2ee49f6062 100644 --- a/modules/digitaluniverse/CMakeLists.txt +++ b/modules/digitaluniverse/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/exoplanets/CMakeLists.txt b/modules/exoplanets/CMakeLists.txt index a803fa179b..169beb4215 100644 --- a/modules/exoplanets/CMakeLists.txt +++ b/modules/exoplanets/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/fieldlines/CMakeLists.txt b/modules/fieldlines/CMakeLists.txt index 8951237b92..5e9c15f8e2 100644 --- a/modules/fieldlines/CMakeLists.txt +++ b/modules/fieldlines/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/fieldlinessequence/CMakeLists.txt b/modules/fieldlinessequence/CMakeLists.txt index e04a63f744..e7ccdae21b 100644 --- a/modules/fieldlinessequence/CMakeLists.txt +++ b/modules/fieldlinessequence/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/fitsfilereader/CMakeLists.txt b/modules/fitsfilereader/CMakeLists.txt index 72613a82ae..640ec48106 100644 --- a/modules/fitsfilereader/CMakeLists.txt +++ b/modules/fitsfilereader/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/gaia/CMakeLists.txt b/modules/gaia/CMakeLists.txt index dae14a125a..679ee5d378 100644 --- a/modules/gaia/CMakeLists.txt +++ b/modules/gaia/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/galaxy/CMakeLists.txt b/modules/galaxy/CMakeLists.txt index 0aeb7134cc..6466650d9c 100644 --- a/modules/galaxy/CMakeLists.txt +++ b/modules/galaxy/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/globebrowsing/CMakeLists.txt b/modules/globebrowsing/CMakeLists.txt index bb1e85d6b6..c4d06db4c3 100644 --- a/modules/globebrowsing/CMakeLists.txt +++ b/modules/globebrowsing/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/imgui/CMakeLists.txt b/modules/imgui/CMakeLists.txt index 4cb0a0b834..181d6c9e49 100644 --- a/modules/imgui/CMakeLists.txt +++ b/modules/imgui/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/imgui/ext/imgui/CMakeLists.txt b/modules/imgui/ext/imgui/CMakeLists.txt index b5e6d70d94..be5458c86a 100644 --- a/modules/imgui/ext/imgui/CMakeLists.txt +++ b/modules/imgui/ext/imgui/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/iswa/CMakeLists.txt b/modules/iswa/CMakeLists.txt index 6031ea4eff..20b143e009 100644 --- a/modules/iswa/CMakeLists.txt +++ b/modules/iswa/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/kameleon/CMakeLists.txt b/modules/kameleon/CMakeLists.txt index be25d7dc12..5933965c9c 100644 --- a/modules/kameleon/CMakeLists.txt +++ b/modules/kameleon/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/kameleonvolume/CMakeLists.txt b/modules/kameleonvolume/CMakeLists.txt index e4931f2065..da6b16bdc2 100644 --- a/modules/kameleonvolume/CMakeLists.txt +++ b/modules/kameleonvolume/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/multiresvolume/CMakeLists.txt b/modules/multiresvolume/CMakeLists.txt index 33414e7b08..5a9fcbfae3 100644 --- a/modules/multiresvolume/CMakeLists.txt +++ b/modules/multiresvolume/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/server/CMakeLists.txt b/modules/server/CMakeLists.txt index 6b278b6984..6979a06d7e 100644 --- a/modules/server/CMakeLists.txt +++ b/modules/server/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/skybrowser/CMakeLists.txt b/modules/skybrowser/CMakeLists.txt index 7673e2f661..1bf961321e 100644 --- a/modules/skybrowser/CMakeLists.txt +++ b/modules/skybrowser/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/space/CMakeLists.txt b/modules/space/CMakeLists.txt index dcd096bbb4..9a5eb1dd58 100644 --- a/modules/space/CMakeLists.txt +++ b/modules/space/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/spacecraftinstruments/CMakeLists.txt b/modules/spacecraftinstruments/CMakeLists.txt index a45da7f0fc..7e01cfcd96 100644 --- a/modules/spacecraftinstruments/CMakeLists.txt +++ b/modules/spacecraftinstruments/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/spout/CMakeLists.txt b/modules/spout/CMakeLists.txt index 8cbb806213..78fcac90f6 100644 --- a/modules/spout/CMakeLists.txt +++ b/modules/spout/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/statemachine/CMakeLists.txt b/modules/statemachine/CMakeLists.txt index 55b3d8aa31..cc60bd2089 100644 --- a/modules/statemachine/CMakeLists.txt +++ b/modules/statemachine/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/sync/CMakeLists.txt b/modules/sync/CMakeLists.txt index fd88a89ebb..18b7e60c63 100644 --- a/modules/sync/CMakeLists.txt +++ b/modules/sync/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/touch/CMakeLists.txt b/modules/touch/CMakeLists.txt index 778c756fda..9ad65d48eb 100644 --- a/modules/touch/CMakeLists.txt +++ b/modules/touch/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/touch/ext/CMakeLists.txt b/modules/touch/ext/CMakeLists.txt index 4013ffb0c8..78f58433ca 100644 --- a/modules/touch/ext/CMakeLists.txt +++ b/modules/touch/ext/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/toyvolume/CMakeLists.txt b/modules/toyvolume/CMakeLists.txt index 03ab3be8c4..7e901c6840 100644 --- a/modules/toyvolume/CMakeLists.txt +++ b/modules/toyvolume/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/video/CMakeLists.txt b/modules/video/CMakeLists.txt index af48257537..b1da87faf3 100644 --- a/modules/video/CMakeLists.txt +++ b/modules/video/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/vislab/CMakeLists.txt b/modules/vislab/CMakeLists.txt index 05e583dfb5..32e5457636 100644 --- a/modules/vislab/CMakeLists.txt +++ b/modules/vislab/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/volume/CMakeLists.txt b/modules/volume/CMakeLists.txt index f997e0a719..4a7fdf6941 100644 --- a/modules/volume/CMakeLists.txt +++ b/modules/volume/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/webbrowser/CMakeLists.txt b/modules/webbrowser/CMakeLists.txt index 241d8bfd21..9d4674f4e5 100644 --- a/modules/webbrowser/CMakeLists.txt +++ b/modules/webbrowser/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/webbrowser/cmake/cef_support.cmake b/modules/webbrowser/cmake/cef_support.cmake index 305bfc6485..057a24de16 100644 --- a/modules/webbrowser/cmake/cef_support.cmake +++ b/modules/webbrowser/cmake/cef_support.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/webbrowser/cmake/webbrowser_helpers.cmake b/modules/webbrowser/cmake/webbrowser_helpers.cmake index b57f41db26..0a2feb9ffc 100644 --- a/modules/webbrowser/cmake/webbrowser_helpers.cmake +++ b/modules/webbrowser/cmake/webbrowser_helpers.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/webgui/CMakeLists.txt b/modules/webgui/CMakeLists.txt index 94b5a7c2cd..9e6f93a234 100644 --- a/modules/webgui/CMakeLists.txt +++ b/modules/webgui/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/modules/webgui/cmake/nodejs_support.cmake b/modules/webgui/cmake/nodejs_support.cmake index bb1a3d6c5d..1baba0e9c1 100644 --- a/modules/webgui/cmake/nodejs_support.cmake +++ b/modules/webgui/cmake/nodejs_support.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1faaebc1b9..b80cad0304 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/support/cmake/application_definition.cmake b/support/cmake/application_definition.cmake index caeb2666bd..b2464a3ba0 100644 --- a/support/cmake/application_definition.cmake +++ b/support/cmake/application_definition.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/support/cmake/global_variables.cmake b/support/cmake/global_variables.cmake index e6dfa7e593..1a05eb8d3d 100644 --- a/support/cmake/global_variables.cmake +++ b/support/cmake/global_variables.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/support/cmake/module_common.cmake b/support/cmake/module_common.cmake index a2306feda5..8cef114230 100644 --- a/support/cmake/module_common.cmake +++ b/support/cmake/module_common.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/support/cmake/module_definition.cmake b/support/cmake/module_definition.cmake index 30a2b412d4..11a33eed04 100644 --- a/support/cmake/module_definition.cmake +++ b/support/cmake/module_definition.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/support/cmake/packaging.cmake b/support/cmake/packaging.cmake index 528309880a..d3000e8231 100644 --- a/support/cmake/packaging.cmake +++ b/support/cmake/packaging.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/support/cmake/set_openspace_compile_settings.cmake b/support/cmake/set_openspace_compile_settings.cmake index 8d44f0b44e..31c578c582 100644 --- a/support/cmake/set_openspace_compile_settings.cmake +++ b/support/cmake/set_openspace_compile_settings.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 434608d6e0..3fc2ce772a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2023 # +# Copyright (c) 2014-2024 # # # # 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 # From dd73978fa22ea6c50b00b54aad7ec1d40a632c0f Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 2 Aug 2024 14:57:13 +0200 Subject: [PATCH 32/99] Use correct UTC time string in Pluto trail --- .../solarsystem/dwarf_planets/pluto/pluto_trail_kepler.asset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail_kepler.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail_kepler.asset index f354e963c0..37406804ca 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail_kepler.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail_kepler.asset @@ -19,7 +19,7 @@ local PlutoKeplerianTrail = { AscendingNode = 110.2099981996057, ArgumentOfPeriapsis = 114.2248569189779, MeanAnomaly = 14.53, - Epoch = "2000 01 01 00:00", + Epoch = "2000 JAN 01 00:00:00", Period = 7824380000 }, Color = { 0.2, 0.8, 0.3 }, From ca40f173b5cdfd7ef180102d30c2c97ea2f05304 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 2 Aug 2024 15:36:41 +0200 Subject: [PATCH 33/99] Don't try to convert "Today" or "Yesterday" using SPICE --- modules/globebrowsing/src/tileprovider/temporaltileprovider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/globebrowsing/src/tileprovider/temporaltileprovider.cpp b/modules/globebrowsing/src/tileprovider/temporaltileprovider.cpp index 82982310eb..fe66bba7be 100644 --- a/modules/globebrowsing/src/tileprovider/temporaltileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/temporaltileprovider.cpp @@ -200,11 +200,11 @@ TemporalTileProvider::TemporalTileProvider(const ghoul::Dictionary& dictionary) const Time start = Time(p.prototyped->time.start); Time end = Time::now(); _prototyped.startTimeJ2000 = start.j2000Seconds(); - _prototyped.endTimeJ2000 = Time(p.prototyped->time.end).j2000Seconds(); if (p.prototyped->time.end == "Yesterday") { end.advanceTime(-60.0 * 60.0 * 24.0); // Go back one day } else if (p.prototyped->time.end != "Today") { + _prototyped.endTimeJ2000 = Time(p.prototyped->time.end).j2000Seconds(); end.setTime(p.prototyped->time.end); } From 952f177c544856fdfd553f4ce8f8f62f1c364ccd Mon Sep 17 00:00:00 2001 From: Ylva Selling Date: Fri, 2 Aug 2024 16:30:07 +0200 Subject: [PATCH 34/99] UI updates (#3358) * Remove events for scenegraphnodes and screenspacerenderables * Add events for updating the property tree * Remove duplicate function calls * Update src/properties/propertyowner.cpp Co-authored-by: Emma Broman * Address PR comments and make helper functions with better comments * Make uri function not return the identifier if the uri is not valid * Rename fullyQualifiedIdentifier to uri * Update gui hash --------- Co-authored-by: Ylva Selling Co-authored-by: Emma Broman --- data/assets/util/webgui.asset | 2 +- include/openspace/events/event.h | 107 ++----------- .../properties/numericalproperty.inl | 2 +- include/openspace/properties/property.h | 10 +- .../renderableinterpolatedpoints.cpp | 8 +- modules/globebrowsing/src/layergroup.cpp | 20 +-- modules/imgui/src/renderproperties.cpp | 48 +++--- src/documentation/documentationengine.cpp | 2 +- src/events/event.cpp | 147 +++--------------- src/interaction/sessionrecording.cpp | 2 +- src/properties/property.cpp | 8 +- src/properties/propertyowner.cpp | 37 ++++- src/rendering/renderengine.cpp | 3 - src/scene/profile.cpp | 2 +- src/scene/scene.cpp | 2 - src/scene/scene_lua.inl | 6 +- 16 files changed, 125 insertions(+), 281 deletions(-) diff --git a/data/assets/util/webgui.asset b/data/assets/util/webgui.asset index 6b757eb07d..b58de5162b 100644 --- a/data/assets/util/webgui.asset +++ b/data/assets/util/webgui.asset @@ -4,7 +4,7 @@ local guiCustomization = asset.require("customization/gui") -- Select which commit hashes to use for the frontend and backend -local frontendHash = "95ed7fb5853d27d2b879f6f409f3101a018e03ce" +local frontendHash = "c607523e86ab29c573b157c956dcf0b0e4492395" local frontend = asset.resource({ Identifier = "WebGuiFrontend", diff --git a/include/openspace/events/event.h b/include/openspace/events/event.h index c1f685fa12..e1ce7c0ad1 100644 --- a/include/openspace/events/event.h +++ b/include/openspace/events/event.h @@ -58,21 +58,17 @@ struct Event { // if they are triggered by events // 6. Add the new enum entry into the `toString` and `fromString` methods enum class Type : uint8_t { - SceneGraphNodeAdded, - SceneGraphNodeRemoved, ParallelConnection, ProfileLoadingFinished, ApplicationShutdown, - ScreenSpaceRenderableAdded, - ScreenSpaceRenderableRemoved, CameraFocusTransition, TimeOfInterestReached, MissionEventReached, PlanetEclipsed, InterpolationFinished, FocusNodeChanged, - LayerAdded, - LayerRemoved, + PropertyTreeUpdated, + PropertyTreePruned, ActionAdded, ActionRemoved, SessionRecordingPlayback, @@ -114,43 +110,6 @@ void logAllEvents(const Event* e); // Events // -/** - * This event is created whenever a new scene graph node is added to the system. By the - * time this event is signalled, the scene graph node has already been created and added - * to the scene. - */ -struct EventSceneGraphNodeAdded : public Event { - static constexpr Type Type = Event::Type::SceneGraphNodeAdded; - - /** - * Creates an instance of an EventSceneGraphNodeAdded event. - * - * \param node_ A pointer to the node that was added - * - * \pre node_ must not be nullptr - */ - explicit EventSceneGraphNodeAdded(const SceneGraphNode* node_); - const tstring uri; -}; - -/** - * This event is created whenever a scene graph node was removed. By the time this event - * is signalled, the scene graph node has already been removed. - */ -struct EventSceneGraphNodeRemoved : public Event { - static constexpr Type Type = Event::Type::SceneGraphNodeRemoved; - - /** - * Creates an instance of an EventSceneGraphNodeRemoved event. - * - * \param node_ A pointer to the node that was removed - * - * \pre node_ must not be nullptr - */ - explicit EventSceneGraphNodeRemoved(const SceneGraphNode* node_); - const tstring uri; -}; - /** * This event is created whenever something in the parallel connection subsystem changes. * The new state is sent as an argument with this event. @@ -212,43 +171,6 @@ struct EventApplicationShutdown : public Event { const State state; }; -/** - * This event is created when a new screenspace renderable has been created. By the time - * this event is created, the screenspace renderable is already registered and available. - */ -struct EventScreenSpaceRenderableAdded : public Event { - static constexpr Type Type = Event::Type::ScreenSpaceRenderableAdded; - - /** - * Creates an instance of an EventScreenSpaceRenderableAdded event. - * - * \param renderable_ The the new screenspace renderable that was added to the system - * - * \pre renderable_ must not be nullptr - */ - explicit EventScreenSpaceRenderableAdded(const ScreenSpaceRenderable* renderable_); - const tstring uri; -}; - -/** - * This event is created when a screenspace renderable has been removed from the system. - * When this event is created, the screenspace renderable has already been removed and is - * no longer available. - */ -struct EventScreenSpaceRenderableRemoved : public Event { - static constexpr Type Type = Event::Type::ScreenSpaceRenderableRemoved; - - /** - * Creates an instance of an EventScreenSpaceRenderableRemoved event. - * - * \param renderable_ The the new screenspace renderable that was removed - * - * \pre renderable_ must not be nullptr - */ - explicit EventScreenSpaceRenderableRemoved(const ScreenSpaceRenderable* renderable_); - const tstring uri; -}; - /** * This event is created when the camera transitions between different interaction sphere * distances. Right now, only movement relative to camera's focus node is considered. @@ -393,37 +315,38 @@ struct EventFocusNodeChanged : public Event { }; /** - * This event is created when a layer is added to to a globe. + * This event is created a property owner or property has been added or has changed. */ -struct EventLayerAdded : public Event { - static constexpr Type Type = Event::Type::LayerAdded; +struct EventPropertyTreeUpdated : public Event { + static constexpr Type Type = Event::Type::PropertyTreeUpdated; /** - * Creates an instance of an EventLayerAdded event. + * Creates an instance of an EventPropertyTreeUpdated event. * - * \param uri_ A string with the uri of the layer that was added + * \param uri_ A string with the uri of the property or property owner that was added * * \pre uri_ must be a valid uri */ - explicit EventLayerAdded(std::string_view uri_); + explicit EventPropertyTreeUpdated(std::string_view uri_); const tstring uri; }; /** - * This event is created when a layer is removed from a globe. + * This event is created when a property owner or property is removed from a the property + * tree. */ -struct EventLayerRemoved : public Event { - static constexpr Type Type = Event::Type::LayerRemoved; +struct EventPropertyTreePruned : public Event { + static constexpr Type Type = Event::Type::PropertyTreePruned; /** - * Creates an instance of an EventLayerRemoved event. + * Creates an instance of an EventPropertyTreePruned event. * - * \param uri_ The uri of the layer that was removed + * \param uri_ The uri of the property or property owner that was removed * * \pre uri_ must be a valid uri */ - explicit EventLayerRemoved(std::string_view uri_); + explicit EventPropertyTreePruned(std::string_view uri_); const tstring uri; }; diff --git a/include/openspace/properties/numericalproperty.inl b/include/openspace/properties/numericalproperty.inl index 284b821e35..d687449650 100644 --- a/include/openspace/properties/numericalproperty.inl +++ b/include/openspace/properties/numericalproperty.inl @@ -113,7 +113,7 @@ void NumericalProperty::setExponent(float exponent) { std::format( "Setting exponent for properties with negative values in " "[min, max] range is not yet supported. Property: {}", - this->fullyQualifiedIdentifier() + this->uri() ) ); _exponent = 1.f; diff --git a/include/openspace/properties/property.h b/include/openspace/properties/property.h index 2d1e6721e1..e2e66d940b 100644 --- a/include/openspace/properties/property.h +++ b/include/openspace/properties/property.h @@ -294,13 +294,15 @@ public: const std::string& identifier() const; /** - * Returns the fully qualified name for this Property that uniquely identifies this - * Property within OpenSpace. It consists of the identifier preceded by all levels of - * PropertyOwner%s separated with `.`; for example: `owner1.owner2.identifier`. + * Returns the URI for this Property that uniquely identifies this Property within + * OpenSpace. It consists of the identifier preceded by all levels of PropertyOwner%s + * separated with `.`; for example: `owner1.owner2.identifier`. If the URI is invalid + * (the Property hasn't been added to the property tree yet), it returns an empty + * string. * * \return The fully qualified identifier for this Property */ - std::string fullyQualifiedIdentifier() const; + std::string uri() const; /** * Returns the PropertyOwner of this Property or `nullptr`, if it does not have an diff --git a/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp b/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp index 8cc051be28..c499192fbe 100644 --- a/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp +++ b/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp @@ -198,7 +198,7 @@ RenderableInterpolatedPoints::Interpolation::Interpolation() float remaining = value.maxValue() - value; float duration = remaining / speed; triggerInterpolation( - value.fullyQualifiedIdentifier(), + value.uri(), value.maxValue(), duration ); @@ -206,21 +206,21 @@ RenderableInterpolatedPoints::Interpolation::Interpolation() interpolateToStart.onChange([triggerInterpolation, this]() { float duration = value / speed; - triggerInterpolation(value.fullyQualifiedIdentifier(), 0.f, duration); + triggerInterpolation(value.uri(), 0.f, duration); }); interpolateToNextStep.onChange([triggerInterpolation, this]() { float prevValue = glm::floor(value); float newValue = glm::min(prevValue + 1.f, value.maxValue()); float duration = 1.f / speed; - triggerInterpolation(value.fullyQualifiedIdentifier(), newValue, duration); + triggerInterpolation(value.uri(), newValue, duration); }); interpolateToPrevStep.onChange([triggerInterpolation, this]() { float prevValue = glm::ceil(value); float newValue = glm::max(prevValue - 1.f, value.minValue()); float duration = 1.f / speed; - triggerInterpolation(value.fullyQualifiedIdentifier(), newValue, duration); + triggerInterpolation(value.uri(), newValue, duration); }); addProperty(interpolateToEnd); diff --git a/modules/globebrowsing/src/layergroup.cpp b/modules/globebrowsing/src/layergroup.cpp index 0b8ae03134..1e14b80063 100644 --- a/modules/globebrowsing/src/layergroup.cpp +++ b/modules/globebrowsing/src/layergroup.cpp @@ -168,19 +168,6 @@ Layer* LayerGroup::addLayer(const ghoul::Dictionary& layerDict) { properties::PropertyOwner* layerGroup = ptr->owner(); properties::PropertyOwner* layerManager = layerGroup->owner(); - // @TODO (emmbr, 2021-11-03) If the layer is added as part of the globe's - // dictionary during construction this function is called in the LayerManager's - // initialize function. This means that the layerManager does not exists yet, and - // we cannot find which SGN it belongs to... Want to avoid doing this check, so - // this should be fixed (probably as part of a cleanup/rewite of the LayerManager) - if (layerManager) { - properties::PropertyOwner* globe = layerManager->owner(); - properties::PropertyOwner* sceneGraphNode = globe->owner(); - global::eventEngine->publishEvent( - ptr->uri() - ); - } - return ptr; } @@ -198,9 +185,7 @@ void LayerGroup::deleteLayer(const std::string& layerName) { properties::PropertyOwner* layerManager = layerGroup->owner(); properties::PropertyOwner* globe = layerManager->owner(); properties::PropertyOwner* sceneGraphNode = globe->owner(); - global::eventEngine->publishEvent( - it->get()->uri() - ); + // We need to keep the name of the layer since we only get it as a reference // and the name needs to survive the deletion const std::string lName = layerName; @@ -301,6 +286,9 @@ void LayerGroup::moveLayer(int oldPosition, int newPosition) { RenderableGlobe* renderable = dynamic_cast(manager->owner()); ghoul_assert(manager, "Hierarchy error: LayerManager. Owner is not RenderableGlobe"); renderable->invalidateShader(); + + // Notify that the layers are in a different order + global::eventEngine->publishEvent(uri()); } std::vector LayerGroup::layers() const { diff --git a/modules/imgui/src/renderproperties.cpp b/modules/imgui/src/renderproperties.cpp index 4e1b285951..c748be1f94 100644 --- a/modules/imgui/src/renderproperties.cpp +++ b/modules/imgui/src/renderproperties.cpp @@ -65,7 +65,7 @@ void renderTooltip(Property* prop, double delay) { } ImGui::Text( "%s", - (std::string("Identifier: ") + prop->fullyQualifiedIdentifier()).c_str() + (std::string("Identifier: ") + prop->uri()).c_str() ); ImGui::EndTooltip(); } @@ -95,7 +95,7 @@ void renderBoolProperty(Property* prop, const std::string& ownerName, } if (value != p->value()) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), value ? "true" : "false"); + executeSetPropertyScript(p->uri(), value ? "true" : "false"); } ImGui::PopID(); } @@ -158,7 +158,7 @@ void renderOptionProperty(Property* prop, const std::string& ownerName, } } if (value != p->value() && !isReadOnly) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), std::to_string(value)); + executeSetPropertyScript(p->uri(), std::to_string(value)); } ImGui::PopID(); } @@ -200,7 +200,7 @@ void renderSelectionProperty(Property* prop, const std::string& ownerName, parameters.pop_back(); } parameters += "}"; - executeSetPropertyScript(p->fullyQualifiedIdentifier(), parameters); + executeSetPropertyScript(p->uri(), parameters); } ImGui::TreePop(); } @@ -231,7 +231,7 @@ void renderStringProperty(Property* prop, const std::string& ownerName, if (hasNewValue) { executeSetPropertyScript( - p->fullyQualifiedIdentifier(), + p->uri(), "[[" + std::string(buffer.data()) + "]]" ); } @@ -283,7 +283,7 @@ void renderDoubleListProperty(Property* prop, const std::string& ownerName, ImGui::PushID((ownerName + '.' + name).c_str()); const std::string value = p->stringValue(); - renderListProperty(name, p->fullyQualifiedIdentifier(), value); + renderListProperty(name, p->uri(), value); if (showTooltip) { renderTooltip(prop, tooltipDelay); @@ -301,7 +301,7 @@ void renderIntListProperty(Property* prop, const std::string& ownerName, ImGui::PushID((ownerName + '.' + name).c_str()); const std::string value = p->stringValue(); - renderListProperty(name, p->fullyQualifiedIdentifier(), value); + renderListProperty(name, p->uri(), value); if (showTooltip) { renderTooltip(prop, tooltipDelay); @@ -319,7 +319,7 @@ void renderStringListProperty(Property* prop, const std::string& ownerName, ImGui::PushID((ownerName + '.' + name).c_str()); const std::string value = p->stringValue(); - renderListProperty(name, p->fullyQualifiedIdentifier(), value); + renderListProperty(name, p->uri(), value); if (showTooltip) { renderTooltip(prop, tooltipDelay); @@ -358,7 +358,7 @@ void renderDoubleProperty(properties::Property* prop, const std::string& ownerNa } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), std::to_string(value)); + executeSetPropertyScript(p->uri(), std::to_string(value)); } ImGui::PopID(); @@ -382,7 +382,7 @@ void renderIntProperty(Property* prop, const std::string& ownerName, } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), std::to_string(value)); + executeSetPropertyScript(p->uri(), std::to_string(value)); } ImGui::PopID(); @@ -405,7 +405,7 @@ void renderIVec2Property(Property* prop, const std::string& ownerName, } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), ghoul::to_string(value)); + executeSetPropertyScript(p->uri(), ghoul::to_string(value)); } ImGui::PopID(); @@ -428,7 +428,7 @@ void renderIVec3Property(Property* prop, const std::string& ownerName, } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), ghoul::to_string(value)); + executeSetPropertyScript(p->uri(), ghoul::to_string(value)); } ImGui::PopID(); } @@ -450,7 +450,7 @@ void renderIVec4Property(Property* prop, const std::string& ownerName, } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), ghoul::to_string(value)); + executeSetPropertyScript(p->uri(), ghoul::to_string(value)); } ImGui::PopID(); } @@ -479,7 +479,7 @@ void renderFloatProperty(Property* prop, const std::string& ownerName, } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), std::to_string(value)); + executeSetPropertyScript(p->uri(), std::to_string(value)); } ImGui::PopID(); @@ -509,7 +509,7 @@ void renderVec2Property(Property* prop, const std::string& ownerName, } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), ghoul::to_string(value)); + executeSetPropertyScript(p->uri(), ghoul::to_string(value)); } ImGui::PopID(); @@ -545,7 +545,7 @@ void renderVec3Property(Property* prop, const std::string& ownerName, } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), ghoul::to_string(value)); + executeSetPropertyScript(p->uri(), ghoul::to_string(value)); } ImGui::PopID(); @@ -581,7 +581,7 @@ void renderVec4Property(Property* prop, const std::string& ownerName, } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), ghoul::to_string(value)); + executeSetPropertyScript(p->uri(), ghoul::to_string(value)); } ImGui::PopID(); @@ -611,7 +611,7 @@ void renderDVec2Property(Property* prop, const std::string& ownerName, } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), ghoul::to_string(value)); + executeSetPropertyScript(p->uri(), ghoul::to_string(value)); } ImGui::PopID(); @@ -641,7 +641,7 @@ void renderDVec3Property(Property* prop, const std::string& ownerName, } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), ghoul::to_string(value)); + executeSetPropertyScript(p->uri(), ghoul::to_string(value)); } ImGui::PopID(); @@ -671,7 +671,7 @@ void renderDVec4Property(Property* prop, const std::string& ownerName, } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), ghoul::to_string(value)); + executeSetPropertyScript(p->uri(), ghoul::to_string(value)); } ImGui::PopID(); @@ -723,7 +723,7 @@ void renderDMat2Property(Property* prop, const std::string& ownerName, } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), ghoul::to_string(value)); + executeSetPropertyScript(p->uri(), ghoul::to_string(value)); } ImGui::PopID(); @@ -785,7 +785,7 @@ void renderDMat3Property(Property* prop, const std::string& ownerName, } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), ghoul::to_string(value)); + executeSetPropertyScript(p->uri(), ghoul::to_string(value)); } ImGui::PopID(); @@ -857,7 +857,7 @@ void renderDMat4Property(Property* prop, const std::string& ownerName, } if (changed) { - executeSetPropertyScript(p->fullyQualifiedIdentifier(), ghoul::to_string(value)); + executeSetPropertyScript(p->uri(), ghoul::to_string(value)); } ImGui::PopID(); @@ -872,7 +872,7 @@ void renderTriggerProperty(Property* prop, const std::string& ownerName, const bool pressed = ImGui::Button(name.c_str()); if (pressed) { - executeSetPropertyScript(prop->fullyQualifiedIdentifier(), "nil"); + executeSetPropertyScript(prop->uri(), "nil"); } if (showTooltip) { renderTooltip(prop, tooltipDelay); diff --git a/src/documentation/documentationengine.cpp b/src/documentation/documentationengine.cpp index 044ab77bb8..6dc5de0afa 100644 --- a/src/documentation/documentationengine.cpp +++ b/src/documentation/documentationengine.cpp @@ -206,7 +206,7 @@ namespace { std::string name = !p->guiName().empty() ? p->guiName() : p->identifier(); propertyJson[NameKey] = name; propertyJson[TypeKey] = p->className(); - propertyJson[UriKey] = p->fullyQualifiedIdentifier(); + propertyJson[UriKey] = p->uri(); propertyJson[IdentifierKey] = p->identifier(); propertyJson[DescriptionKey] = p->description(); diff --git a/src/events/event.cpp b/src/events/event.cpp index d6d59fbb3c..b3b2e4311b 100644 --- a/src/events/event.cpp +++ b/src/events/event.cpp @@ -43,16 +43,6 @@ using namespace std::string_literals; namespace openspace::events { -void log(int i, const EventSceneGraphNodeAdded& e) { - ghoul_assert(e.type == EventSceneGraphNodeAdded::Type, "Wrong type"); - LINFO(std::format("[{}] SceneGraphNodeAdded: {}", i, e.uri)); -} - -void log(int i, const EventSceneGraphNodeRemoved& e) { - ghoul_assert(e.type == EventSceneGraphNodeRemoved::Type, "Wrong type"); - LINFO(std::format("[{}] SceneGraphNodeRemoved: {}", i, e.uri)); -} - void log(int i, const EventParallelConnection& e) { ghoul_assert(e.type == EventParallelConnection::Type, "Wrong type"); std::string_view state = [](EventParallelConnection::State s) { @@ -85,16 +75,6 @@ void log(int i, const EventApplicationShutdown& e) { LINFO(std::format("[{}] ApplicationShutdown", i)); } -void log(int i, const EventScreenSpaceRenderableAdded& e) { - ghoul_assert(e.type == EventScreenSpaceRenderableAdded::Type, "Wrong type"); - LINFO(std::format("[{}] ScreenSpaceRenderableAdded: {}", i, e.uri)); -} - -void log(int i, const EventScreenSpaceRenderableRemoved& e) { - ghoul_assert(e.type == EventScreenSpaceRenderableRemoved::Type, "Wrong type"); - LINFO(std::format("[{}] ScreenSpaceRenderableRemoved: {}", i, e.uri)); -} - void log(int i, const EventCameraFocusTransition& e) { ghoul_assert(e.type == EventCameraFocusTransition::Type, "Wrong type"); std::string_view t = [](EventCameraFocusTransition::Transition transition) { @@ -146,14 +126,14 @@ void log(int i, const EventFocusNodeChanged& e) { LINFO(std::format("[{}] FocusNodeChanged: {} -> {}", i, e.oldNode, e.newNode)); } -void log(int i, const EventLayerAdded& e) { - ghoul_assert(e.type == EventLayerAdded::Type, "Wrong type"); - LINFO(std::format("[{}] LayerAdded: {}", i, e.uri)); +void log(int i, const EventPropertyTreeUpdated& e) { + ghoul_assert(e.type == EventPropertyTreeUpdated::Type, "Wrong type"); + LINFO(std::format("[{}] PropertyTreeUpdated: {}", i, e.uri)); } -void log(int i, const EventLayerRemoved& e) { - ghoul_assert(e.type == EventLayerRemoved::Type, "Wrong type"); - LINFO(std::format("[{}] LayerRemoved: {}", i, e.uri)); +void log(int i, const EventPropertyTreePruned& e) { + ghoul_assert(e.type == EventPropertyTreePruned::Type, "Wrong type"); + LINFO(std::format("[{}] PropertyTreePruned: {}", i, e.uri)); } void log(int i, const EventActionAdded& e) { @@ -233,22 +213,17 @@ void log(int i, const CustomEvent& e) { std::string_view toString(Event::Type type) { switch (type) { - case Event::Type::SceneGraphNodeAdded: return "SceneGraphNodeAdded"; - case Event::Type::SceneGraphNodeRemoved: return "SceneGraphNodeRemoved"; case Event::Type::ParallelConnection: return "ParallelConnection"; case Event::Type::ProfileLoadingFinished: return "ProfileLoadingFinished"; case Event::Type::ApplicationShutdown: return "ApplicationShutdown"; - case Event::Type::ScreenSpaceRenderableAdded: return "ScreenSpaceRenderableAdded"; - case Event::Type::ScreenSpaceRenderableRemoved: - return "ScreenSpaceRenderableRemoved"; case Event::Type::CameraFocusTransition: return "CameraFocusTransition"; case Event::Type::TimeOfInterestReached: return "TimeOfInterestReached"; case Event::Type::MissionEventReached: return "MissionEventReached"; case Event::Type::PlanetEclipsed: return "PlanetEclipsed"; case Event::Type::InterpolationFinished: return "InterpolationFinished"; case Event::Type::FocusNodeChanged: return "FocusNodeChanged"; - case Event::Type::LayerAdded: return "LayerAdded"; - case Event::Type::LayerRemoved: return "LayerRemoved"; + case Event::Type::PropertyTreeUpdated: return "PropertyTreeUpdated"; + case Event::Type::PropertyTreePruned: return "PropertyTreePruned"; case Event::Type::ActionAdded: return "ActionAdded"; case Event::Type::ActionRemoved: return "ActionRemoved"; case Event::Type::SessionRecordingPlayback: return "SessionRecordingPlayback"; @@ -266,13 +241,7 @@ std::string_view toString(Event::Type type) { } Event::Type fromString(std::string_view str) { - if (str == "SceneGraphNodeAdded") { - return Event::Type::SceneGraphNodeAdded; - } - else if (str == "SceneGraphNodeRemoved") { - return Event::Type::SceneGraphNodeRemoved; - } - else if (str == "ParallelConnection") { + if (str == "ParallelConnection") { return Event::Type::ParallelConnection; } else if (str == "ProfileLoadingFinished") { @@ -281,12 +250,6 @@ Event::Type fromString(std::string_view str) { else if (str == "ApplicationShutdown") { return Event::Type::ApplicationShutdown; } - else if (str == "ScreenSpaceRenderableAdded") { - return Event::Type::ScreenSpaceRenderableAdded; - } - else if (str == "ScreenSpaceRenderableRemoved") { - return Event::Type::ScreenSpaceRenderableRemoved; - } else if (str == "CameraFocusTransition") { return Event::Type::CameraFocusTransition; } @@ -305,11 +268,11 @@ Event::Type fromString(std::string_view str) { else if (str == "FocusNodeChanged") { return Event::Type::FocusNodeChanged; } - else if (str == "LayerAdded") { - return Event::Type::LayerAdded; + else if (str == "PropertyTreeUpdated") { + return Event::Type::PropertyTreeUpdated; } - else if (str == "LayerRemoved") { - return Event::Type::LayerRemoved; + else if (str == "PropertyTreePruned") { + return Event::Type::PropertyTreePruned; } else if (str == "ActionAdded") { return Event::Type::ActionAdded; @@ -351,18 +314,6 @@ Event::Type fromString(std::string_view str) { ghoul::Dictionary toParameter(const Event& e) { ghoul::Dictionary d; switch (e.type) { - case Event::Type::SceneGraphNodeAdded: - d.setValue( - "Uri", - std::string(static_cast(e).uri) - ); - break; - case Event::Type::SceneGraphNodeRemoved: - d.setValue( - "Uri", - std::string(static_cast(e).uri) - ); - break; case Event::Type::ParallelConnection: switch (static_cast(e).state) { case EventParallelConnection::State::Established: @@ -392,22 +343,6 @@ ghoul::Dictionary toParameter(const Event& e) { break; } break; - case Event::Type::ScreenSpaceRenderableAdded: - d.setValue( - "Uri", - std::string( - static_cast(e).uri - ) - ); - break; - case Event::Type::ScreenSpaceRenderableRemoved: - d.setValue( - "Uri", - std::string( - static_cast(e).uri - ) - ); - break; case Event::Type::CameraFocusTransition: d.setValue( "Node", @@ -454,16 +389,16 @@ ghoul::Dictionary toParameter(const Event& e) { std::string(static_cast(e).newNode) ); break; - case Event::Type::LayerAdded: + case Event::Type::PropertyTreeUpdated: d.setValue( "Uri", - std::string(static_cast(e).uri) + std::string(static_cast(e).uri) ); break; - case Event::Type::LayerRemoved: + case Event::Type::PropertyTreePruned: d.setValue( "Uri", - std::string(static_cast(e).uri) + std::string(static_cast(e).uri) ); break; case Event::Type::ActionAdded: @@ -555,12 +490,6 @@ void logAllEvents(const Event* e) { int i = 0; while (e) { switch (e->type) { - case Event::Type::SceneGraphNodeAdded: - log(i, *static_cast(e)); - break; - case Event::Type::SceneGraphNodeRemoved: - log(i, *static_cast(e)); - break; case Event::Type::ParallelConnection: log(i, *static_cast(e)); break; @@ -570,12 +499,6 @@ void logAllEvents(const Event* e) { case Event::Type::ApplicationShutdown: log(i, *static_cast(e)); break; - case Event::Type::ScreenSpaceRenderableAdded: - log(i, *static_cast(e)); - break; - case Event::Type::ScreenSpaceRenderableRemoved: - log(i, *static_cast(e)); - break; case Event::Type::CameraFocusTransition: log(i, *static_cast(e)); break; @@ -594,11 +517,11 @@ void logAllEvents(const Event* e) { case Event::Type::FocusNodeChanged: log(i, *static_cast(e)); break; - case Event::Type::LayerAdded: - log(i, *static_cast(e)); + case Event::Type::PropertyTreeUpdated: + log(i, *static_cast(e)); break; - case Event::Type::LayerRemoved: - log(i, *static_cast(e)); + case Event::Type::PropertyTreePruned: + log(i, *static_cast(e)); break; case Event::Type::ActionAdded: log(i, *static_cast(e)); @@ -642,16 +565,6 @@ void logAllEvents(const Event* e) { } } -EventSceneGraphNodeAdded::EventSceneGraphNodeAdded(const SceneGraphNode* node_) - : Event(Type) - , uri(temporaryString(node_->uri())) -{} - -EventSceneGraphNodeRemoved::EventSceneGraphNodeRemoved(const SceneGraphNode* node_) - : Event(Type) - , uri(temporaryString(node_->uri())) -{} - EventParallelConnection::EventParallelConnection(State state_) : Event(Type) , state(state_) @@ -666,18 +579,6 @@ EventApplicationShutdown::EventApplicationShutdown(State state_) , state(state_) {} -EventScreenSpaceRenderableAdded::EventScreenSpaceRenderableAdded( - const ScreenSpaceRenderable* renderable_) - : Event(Type) - , uri(temporaryString(renderable_->uri())) -{} - -EventScreenSpaceRenderableRemoved::EventScreenSpaceRenderableRemoved( - const ScreenSpaceRenderable* renderable_) - : Event(Type) - , uri(temporaryString(renderable_->uri())) -{} - EventCameraFocusTransition::EventCameraFocusTransition(const Camera* camera_, const SceneGraphNode* node_, Transition transition_) @@ -708,7 +609,7 @@ EventPlanetEclipsed::EventPlanetEclipsed(const SceneGraphNode* eclipsee_, EventInterpolationFinished::EventInterpolationFinished( const properties::Property* property_) : Event(Type) - , property(temporaryString(property_->fullyQualifiedIdentifier())) + , property(temporaryString(property_->uri())) {} EventFocusNodeChanged::EventFocusNodeChanged(const SceneGraphNode* oldNode_, @@ -720,12 +621,12 @@ EventFocusNodeChanged::EventFocusNodeChanged(const SceneGraphNode* oldNode_, ghoul_assert(newNode_, "There must be a new node"); } -EventLayerAdded::EventLayerAdded(std::string_view uri_) +EventPropertyTreeUpdated::EventPropertyTreeUpdated(std::string_view uri_) : Event(Type) , uri(temporaryString(uri_)) {} -EventLayerRemoved::EventLayerRemoved(std::string_view uri_) +EventPropertyTreePruned::EventPropertyTreePruned(std::string_view uri_) : Event(Type) , uri(temporaryString(uri_)) {} diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index 2237ade442..7c5af56778 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -976,7 +976,7 @@ void SessionRecording::saveScriptKeyframeAscii(Timestamps& times, } void SessionRecording::savePropertyBaseline(properties::Property& prop) { - const std::string propIdentifier = prop.fullyQualifiedIdentifier(); + const std::string propIdentifier = prop.uri(); if (isPropertyAllowedForBaseline(propIdentifier)) { const bool isPropAlreadySaved = ( std::find( diff --git a/src/properties/property.cpp b/src/properties/property.cpp index d48b505d73..b47286d512 100644 --- a/src/properties/property.cpp +++ b/src/properties/property.cpp @@ -76,11 +76,11 @@ const std::string& Property::identifier() const { return _identifier; } -std::string Property::fullyQualifiedIdentifier() const { - std::string identifier = _identifier; +std::string Property::uri() const { + std::string identifier = ""; const std::string& ownerUri = owner()->uri(); if (!ownerUri.empty()) { - identifier = std::format("{}.{}", ownerUri, identifier); + identifier = std::format("{}.{}", ownerUri, _identifier); } return identifier; } @@ -264,7 +264,7 @@ void Property::resetToUnchanged() { std::string Property::generateJsonDescription() const { const std::string cName = escapedJson(std::string(className())); - const std::string identifier = fullyQualifiedIdentifier(); + const std::string identifier = uri(); const std::string identifierSan = escapedJson(identifier); const std::string gName = guiName(); const std::string gNameSan = escapedJson(gName); diff --git a/src/properties/propertyowner.cpp b/src/properties/propertyowner.cpp index 945eafad6d..cae9dca8a4 100644 --- a/src/properties/propertyowner.cpp +++ b/src/properties/propertyowner.cpp @@ -38,6 +38,25 @@ namespace { constexpr std::string_view _loggerCat = "PropertyOwner"; + using namespace openspace; + + // The URIs have to be validated because it is not known in what order things are + // constructed. For example, a SceneGraphNode can be created before its Renderable, + // and vice versa. Invalid URIs are empty. The reason this works even though we don't + // know what is created first is because if the child is created first, it has not + // been added to the property tree so URI will be invalid and not sent. But the parent + // will be added later, which will include the child in it's subowners + void publishPropertyTreeUpdatedEvent(const std::string& uri) { + if (!uri.empty()) { + global::eventEngine->publishEvent(uri); + } + } + + void publishPropertyTreePrunedEvent(const std::string& uri) { + if (!uri.empty()) { + global::eventEngine->publishEvent(uri); + } + } } // namespace namespace openspace::properties { @@ -137,13 +156,18 @@ std::string PropertyOwner::uri() const { std::string identifier = _identifier; PropertyOwner* currentOwner = owner(); while (currentOwner) { + // We have reached the top of the property tree and the uri is finished + if (currentOwner == global::rootPropertyOwner) { + return identifier; + } const std::string& ownerId = currentOwner->identifier(); if (!ownerId.empty()) { identifier = std::format("{}.{}", ownerId, identifier); } currentOwner = currentOwner->owner(); } - return identifier; + // If the uri hasn't been sent at this point it is not valid, so send an empty string + return ""; } bool PropertyOwner::hasProperty(const std::string& uri) const { @@ -235,6 +259,9 @@ void PropertyOwner::addProperty(Property* prop) { else { _properties.push_back(prop); prop->setPropertyOwner(this); + + // Notify change so we can update the UI + publishPropertyTreeUpdatedEvent(prop->uri()); } } } @@ -282,6 +309,9 @@ void PropertyOwner::addPropertySubOwner(openspace::properties::PropertyOwner* ow else { _subOwners.push_back(owner); owner->setPropertyOwner(this); + + // Notify change so UI gets updated + publishPropertyTreeUpdatedEvent(owner->uri()); } } } @@ -302,6 +332,9 @@ void PropertyOwner::removeProperty(Property* prop) { // If we found the property identifier, we can delete it if (it != _properties.end() && (*it)->identifier() == prop->identifier()) { + // Notify change so we can update the UI + publishPropertyTreePrunedEvent(prop->uri()); + (*it)->setPropertyOwner(nullptr); _properties.erase(it); } @@ -330,6 +363,8 @@ void PropertyOwner::removePropertySubOwner(openspace::properties::PropertyOwner* // If we found the propertyowner, we can delete it if (it != _subOwners.end() && (*it)->identifier() == owner->identifier()) { + // Notify the change so the UI can update + publishPropertyTreePrunedEvent(owner->uri()); _subOwners.erase(it); } else { diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index cdfa5c3908..8fcafb9932 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -1069,8 +1069,6 @@ void RenderEngine::addScreenSpaceRenderable(std::unique_ptraddPropertySubOwner(ssr); global::screenSpaceRenderables->push_back(std::move(s)); - - global::eventEngine->publishEvent(ssr); } void RenderEngine::removeScreenSpaceRenderable(ScreenSpaceRenderable* s) { @@ -1081,7 +1079,6 @@ void RenderEngine::removeScreenSpaceRenderable(ScreenSpaceRenderable* s) { ); if (it != global::screenSpaceRenderables->end()) { - global::eventEngine->publishEvent(s); s->deinitializeGL(); s->deinitialize(); global::screenSpaceRootPropertyOwner->removePropertySubOwner(s); diff --git a/src/scene/profile.cpp b/src/scene/profile.cpp index 29f2516531..3bcf72b006 100644 --- a/src/scene/profile.cpp +++ b/src/scene/profile.cpp @@ -640,7 +640,7 @@ void Profile::saveCurrentSettingsToProfile(const properties::PropertyOwner& root for (properties::Property* prop : ps) { Property p; p.setType = Property::SetType::SetPropertyValueSingle; - p.name = prop->fullyQualifiedIdentifier(); + p.name = prop->uri(); p.value = prop->stringValue(); properties.push_back(std::move(p)); } diff --git a/src/scene/scene.cpp b/src/scene/scene.cpp index 2987fa8ed2..ac5062e4aa 100644 --- a/src/scene/scene.cpp +++ b/src/scene/scene.cpp @@ -166,7 +166,6 @@ void Scene::registerNode(SceneGraphNode* node) { _nodesByIdentifier[node->identifier()] = node; addPropertySubOwner(node); _dirtyNodeRegistry = true; - global::eventEngine->publishEvent(node); } void Scene::unregisterNode(SceneGraphNode* node) { @@ -186,7 +185,6 @@ void Scene::unregisterNode(SceneGraphNode* node) { } removePropertySubOwner(node); _dirtyNodeRegistry = true; - global::eventEngine->publishEvent(node); } void Scene::markNodeRegistryDirty() { diff --git a/src/scene/scene_lua.inl b/src/scene/scene_lua.inl index f49a254de3..519ffdd7a4 100644 --- a/src/scene/scene_lua.inl +++ b/src/scene/scene_lua.inl @@ -141,7 +141,7 @@ std::vector findMatchesInAllProperties( // of the loop, the property name regex was probably misspelled. for (properties::Property* prop : properties) { // Check the regular expression for all properties - const std::string id = prop->fullyQualifiedIdentifier(); + const std::string id = prop->uri(); if (isLiteral && id != propertyName) { continue; @@ -227,7 +227,7 @@ void applyRegularExpression(lua_State* L, const std::string& regex, std::format( "{}: Property '{}' does not accept input of type '{}'. Requested " "type: {}", - errorLocation(L), prop->fullyQualifiedIdentifier(), + errorLocation(L), prop->uri(), luaTypeToString(type), luaTypeToString(prop->typeLua()) ) ); @@ -544,7 +544,7 @@ namespace { std::vector res; for (properties::Property* prop : props) { // Check the regular expression for all properties - const std::string& id = prop->fullyQualifiedIdentifier(); + const std::string& id = prop->uri(); if (isLiteral && id != propertyName) { continue; From 0973d2421a00e893149b473d11d58f5b627add03 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Mon, 5 Aug 2024 13:52:09 +0200 Subject: [PATCH 35/99] Add STB texture writer functionality (#2912) --- ext/ghoul | 2 +- src/engine/openspaceengine_lua.inl | 72 ++++++++++++++++++++---------- src/rendering/renderengine.cpp | 10 ++++- 3 files changed, 57 insertions(+), 27 deletions(-) diff --git a/ext/ghoul b/ext/ghoul index 6907aaf116..8bf9b6bc91 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 6907aaf116b3b571760a8fec00f68263f514f6b1 +Subproject commit 8bf9b6bc91b4690a5803f252bd1ad7538024f14a diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index 616e64446b..43cf0c4550 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -22,8 +22,22 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include namespace { @@ -136,40 +150,50 @@ namespace { ); } - std::filesystem::path fileName = FileSys.cacheManager()->cachedFilename( - name + ".ppm", - "" - ); + const std::string namePng = std::format("{}.png", name); + std::filesystem::path fileName = FileSys.cacheManager()->cachedFilename(namePng, ""); + const bool hasCachedFile = std::filesystem::is_regular_file(fileName); if (hasCachedFile) { LDEBUGC("OpenSpaceEngine", std::format("Cached file '{}' used", fileName)); return fileName; } else { - // Write the color to a ppm file - static std::mutex fileMutex; - std::lock_guard guard(fileMutex); - std::ofstream ppmFile(fileName, std::ofstream::binary | std::ofstream::trunc); + // Write the color to a new file + constexpr unsigned int Width = 1; + constexpr unsigned int Height = 1; + constexpr unsigned int Size = Width * Height; + std::array img = { + static_cast(255 * color.r), + static_cast(255 * color.g), + static_cast(255 * color.b) + }; - unsigned int width = 1; - unsigned int height = 1; - unsigned int size = width * height; - std::vector img(size * 3); - img[0] = static_cast(255 * color.r); - img[1] = static_cast(255 * color.g); - img[2] = static_cast(255 * color.b); + using Texture = ghoul::opengl::Texture; + Texture textureFromData = Texture( + reinterpret_cast(img.data()), + glm::uvec3(Width, Height, 1), + GL_TEXTURE_2D, + Texture::Format::RGB + ); + textureFromData.setDataOwnership(Texture::TakeOwnership::No); - if (!ppmFile.is_open()) { - throw ghoul::lua::LuaError("Could not open ppm file for writing"); + try { + ghoul::io::TextureWriter::ref().saveTexture( + textureFromData, + fileName.string() + ); + } + catch (const ghoul::io::TextureWriter::MissingWriterException& e) { + // This should not happen, as we know .png is a supported format + throw ghoul::lua::LuaError(e.message); + } + catch (const std::filesystem::filesystem_error& e) { + LERRORC("Exception: {}", e.what()); } - - ppmFile << "P6" << std::endl; - ppmFile << width << " " << height << std::endl; - ppmFile << 255 << std::endl; - ppmFile.write(reinterpret_cast(img.data()), size * 3); - ppmFile.close(); - return fileName; } + + return fileName; } /** diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 8fcafb9932..970ba6acc6 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -53,12 +53,14 @@ #include #include #include -#include -#include #include #include #include +#include +#include #include +#include +#include #include #include #include @@ -452,6 +454,10 @@ void RenderEngine::initialize() { std::make_unique() ); + ghoul::io::TextureWriter::ref().addWriter( + std::make_unique() + ); + ghoul::io::ModelReader::ref().addReader( std::make_unique() ); From aec4f473dcdf8aefd24251fab2226f8976749c1b Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 6 Aug 2024 10:51:26 +0200 Subject: [PATCH 36/99] No longer specify an inaccurate version number on the master branch. --- CMakeLists.txt | 9 ++-- include/openspace/rendering/renderengine.h | 2 - src/CMakeLists.txt | 4 +- src/engine/openspaceengine_lua.inl | 6 +-- src/rendering/renderengine.cpp | 60 +++++++++++++--------- support/cmake/openspace_header.template | 28 ++++++++-- 6 files changed, 69 insertions(+), 40 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ac09c4647..65ac51bcc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,10 +27,11 @@ cmake_policy(VERSION 3.25) project(OpenSpace) -set(OPENSPACE_VERSION_MAJOR 0) -set(OPENSPACE_VERSION_MINOR 20) -set(OPENSPACE_VERSION_PATCH 0) -set(OPENSPACE_VERSION_STRING "Beta-13") +set(OPENSPACE_RELEASE_BUILD OFF) +set(OPENSPACE_VERSION_MAJOR) +set(OPENSPACE_VERSION_MINOR) +set(OPENSPACE_VERSION_PATCH) +set(OPENSPACE_VERSION_STRING) include(${PROJECT_SOURCE_DIR}/support/cmake/module_common.cmake) include(${PROJECT_SOURCE_DIR}/ext/ghoul/support/cmake/message_macros.cmake) diff --git a/include/openspace/rendering/renderengine.h b/include/openspace/rendering/renderengine.h index 6047fbc961..d64c689fd1 100644 --- a/include/openspace/rendering/renderengine.h +++ b/include/openspace/rendering/renderengine.h @@ -226,8 +226,6 @@ private: glm::ivec4 roll = glm::ivec4(0); } _cameraButtonLocations; - std::string _versionString; - properties::Vec4Property _enabledFontColor; properties::Vec4Property _disabledFontColor; }; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b80cad0304..5ea8e03999 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -488,13 +488,13 @@ add_dependencies(openspace-core run_codegen) configure_file( ${PROJECT_SOURCE_DIR}/support/cmake/openspace_header.template ${CMAKE_BINARY_DIR}/_generated/include/openspace/openspace.h - @ONLY IMMEDIATE + @ONLY ) configure_file( ${PROJECT_SOURCE_DIR}/support/cmake/commit.template ${PROJECT_SOURCE_DIR}/COMMIT.md - @ONLY IMMEDIATE + @ONLY ) if (APPLE) diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index 43cf0c4550..f4d5efd5f8 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -222,9 +222,9 @@ namespace { ghoul::Dictionary res; ghoul::Dictionary version; - version.setValue("Major", openspace::OPENSPACE_VERSION_MAJOR); - version.setValue("Minor", openspace::OPENSPACE_VERSION_MINOR); - version.setValue("Patch", openspace::OPENSPACE_VERSION_PATCH); + version.setValue("Major", static_cast(openspace::OPENSPACE_VERSION_MAJOR)); + version.setValue("Minor", static_cast(openspace::OPENSPACE_VERSION_MINOR)); + version.setValue("Patch", static_cast(openspace::OPENSPACE_VERSION_PATCH)); res.setValue("Version", std::move(version)); res.setValue("Commit", std::string(openspace::OPENSPACE_GIT_COMMIT)); diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 970ba6acc6..960b893f8f 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -465,22 +465,6 @@ void RenderEngine::initialize() { ghoul::io::ModelReader::ref().addReader( std::make_unique() ); - - _versionString = OPENSPACE_VERSION_STRING_FULL; - if (global::versionChecker->hasLatestVersionInfo()) { - VersionChecker::SemanticVersion latest = global::versionChecker->latestVersion(); - - const VersionChecker::SemanticVersion current { - OPENSPACE_VERSION_MAJOR, - OPENSPACE_VERSION_MINOR, - OPENSPACE_VERSION_PATCH - }; - if (current < latest) { - _versionString += std::format( - " [Available: {}.{}.{}]", latest.major, latest.minor, latest.patch - ); - } - } } void RenderEngine::initializeGL() { @@ -1203,15 +1187,43 @@ void RenderEngine::renderVersionInformation() { } using FR = ghoul::fontrendering::FontRenderer; - const glm::vec2 versionBox = _fontVersionInfo->boundingBox(_versionString); - const glm::vec2 commitBox = _fontVersionInfo->boundingBox(OPENSPACE_GIT_FULL); + glm::vec2 versionBox = glm::vec2(0.f, 0.f); + if (OPENSPACE_IS_RELEASE_BUILD) { + if (global::versionChecker->hasLatestVersionInfo()) { + VersionChecker::SemanticVersion ver = global::versionChecker->latestVersion(); - FR::defaultRenderer().render( - *_fontVersionInfo, - glm::vec2(fontResolution().x - versionBox.x - 10.f, 5.f), - _versionString, - glm::vec4(0.5f, 0.5f, 0.5f, 1.f) - ); + std::string versionString = std::string(OPENSPACE_VERSION_STRING_FULL); + const VersionChecker::SemanticVersion current { + OPENSPACE_VERSION_MAJOR, + OPENSPACE_VERSION_MINOR, + OPENSPACE_VERSION_PATCH + }; + if (current < ver) { + versionString += std::format( + " [Available: {}.{}.{}]", ver.major, ver.minor, ver.patch + ); + } + + versionBox = _fontVersionInfo->boundingBox(versionString); + FR::defaultRenderer().render( + *_fontVersionInfo, + glm::vec2(fontResolution().x - versionBox.x - 10.f, 5.f), + versionString, + glm::vec4(0.5f, 0.5f, 0.5f, 1.f) + ); + } + else { + versionBox = _fontVersionInfo->boundingBox(OPENSPACE_VERSION_STRING_FULL); + FR::defaultRenderer().render( + *_fontVersionInfo, + glm::vec2(fontResolution().x - versionBox.x - 10.f, 5.f), + OPENSPACE_VERSION_STRING_FULL, + glm::vec4(0.5f, 0.5f, 0.5f, 1.f) + ); + } + } + + const glm::vec2 commitBox = _fontVersionInfo->boundingBox(OPENSPACE_GIT_FULL); // If a developer hasn't placed the Git command in the path, this variable will be // empty diff --git a/support/cmake/openspace_header.template b/support/cmake/openspace_header.template index c8369ab938..7e1814a580 100644 --- a/support/cmake/openspace_header.template +++ b/support/cmake/openspace_header.template @@ -27,20 +27,38 @@ #include +#cmakedefine OPENSPACE_RELEASE_BUILD + namespace openspace { std::string licenseText(); -constexpr int OPENSPACE_VERSION_MAJOR = @OPENSPACE_VERSION_MAJOR@; -constexpr int OPENSPACE_VERSION_MINOR = @OPENSPACE_VERSION_MINOR@; -constexpr int OPENSPACE_VERSION_PATCH = @OPENSPACE_VERSION_PATCH@; +#ifdef OPENSPACE_RELEASE_BUILD + +constexpr bool OPENSPACE_IS_RELEASE_BUILD = true; + +constexpr uint8_t OPENSPACE_VERSION_MAJOR = @OPENSPACE_VERSION_MAJOR@; +constexpr uint8_t OPENSPACE_VERSION_MINOR = @OPENSPACE_VERSION_MINOR@; +constexpr uint8_t OPENSPACE_VERSION_PATCH = @OPENSPACE_VERSION_PATCH@; constexpr std::string_view OPENSPACE_VERSION_NUMBER = "@OPENSPACE_VERSION_MAJOR@.@OPENSPACE_VERSION_MINOR@.@OPENSPACE_VERSION_PATCH@"; - constexpr std::string_view OPENSPACE_VERSION_STRING = "@OPENSPACE_VERSION_STRING@"; - constexpr std::string_view OPENSPACE_VERSION_STRING_FULL = "@OPENSPACE_VERSION_MAJOR@.@OPENSPACE_VERSION_MINOR@.@OPENSPACE_VERSION_PATCH@ (@OPENSPACE_VERSION_STRING@)"; +#else // ^^^^ OPENSPACE_RELEASE_BUILD || !OPENSPACE_RELEASE_BUILD vvvv + +constexpr bool OPENSPACE_IS_RELEASE_BUILD = false; + +constexpr uint8_t OPENSPACE_VERSION_MAJOR = std::numeric_limits::max(); +constexpr uint8_t OPENSPACE_VERSION_MINOR = std::numeric_limits::max(); +constexpr uint8_t OPENSPACE_VERSION_PATCH = std::numeric_limits::max(); + +constexpr std::string_view OPENSPACE_VERSION_NUMBER = ""; +constexpr std::string_view OPENSPACE_VERSION_STRING = ""; +constexpr std::string_view OPENSPACE_VERSION_STRING_FULL = ""; + +#endif // OPENSPACE_RELEASE_BUILD + constexpr std::string_view OPENSPACE_GIT_BRANCH = "@OPENSPACE_GIT_BRANCH@"; constexpr std::string_view OPENSPACE_GIT_COMMIT = "@OPENSPACE_GIT_COMMIT@"; constexpr std::string_view OPENSPACE_GIT_FULL = "@OPENSPACE_GIT_BRANCH@@@OPENSPACE_GIT_COMMIT@"; From 9109918955daddb90415072b40551f9ad6432d1f Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 6 Aug 2024 10:56:56 +0200 Subject: [PATCH 37/99] Remove warnings --- modules/globebrowsing/src/layergroup.cpp | 4 ---- src/util/time_lua.inl | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/globebrowsing/src/layergroup.cpp b/modules/globebrowsing/src/layergroup.cpp index 1e14b80063..037f038df4 100644 --- a/modules/globebrowsing/src/layergroup.cpp +++ b/modules/globebrowsing/src/layergroup.cpp @@ -164,10 +164,6 @@ Layer* LayerGroup::addLayer(const ghoul::Dictionary& layerDict) { std::stable_sort(_subOwners.begin(), _subOwners.end(), compareZIndexSubOwners); _levelBlendingEnabled.setVisibility(properties::Property::Visibility::User); - - properties::PropertyOwner* layerGroup = ptr->owner(); - properties::PropertyOwner* layerManager = layerGroup->owner(); - return ptr; } diff --git a/src/util/time_lua.inl b/src/util/time_lua.inl index 3a0536105a..a7a79f4a2d 100644 --- a/src/util/time_lua.inl +++ b/src/util/time_lua.inl @@ -394,14 +394,14 @@ namespace { * Returns the number of seconds per day where a day in this case is exactly 24 hours. * The total number of seconds is equal to 86400. */ -[[codegen::luawrap]] int secondsPerDay() { +[[codegen::luawrap]] double secondsPerDay() { return openspace::SecondsPerDay; } /** * Returns the number of seconds in a Julian year, which is equal to 31557600. */ -[[codegen::luawrap]] int secondsPerYear() { +[[codegen::luawrap]] double secondsPerYear() { // We could use a call to SPICE here, but the value is a constant anyway return openspace::SecondsPerYear; } From 19bb1c5d912b452bfa89a957cf7246f1d5f10096 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 6 Aug 2024 11:45:25 +0200 Subject: [PATCH 38/99] Update Rosetta kernels to extend coverage (#3370) --- data/assets/scene/solarsystem/missions/rosetta/67p.asset | 5 +++++ data/assets/scene/solarsystem/missions/rosetta/rosetta.asset | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/data/assets/scene/solarsystem/missions/rosetta/67p.asset b/data/assets/scene/solarsystem/missions/rosetta/67p.asset index 09770c0aa8..11b67b441f 100644 --- a/data/assets/scene/solarsystem/missions/rosetta/67p.asset +++ b/data/assets/scene/solarsystem/missions/rosetta/67p.asset @@ -33,6 +33,11 @@ local imagesDestination = images .. "images" local Barycenter = { Identifier = "67PBarycenter", Parent = transforms.SolarSystemBarycenter.Identifier, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "2014 JAN 01 00:00:00.000", + End = "2017 JAN 01 00:00:00.000" + }, Transform = { Translation = { Type = "SpiceTranslation", diff --git a/data/assets/scene/solarsystem/missions/rosetta/rosetta.asset b/data/assets/scene/solarsystem/missions/rosetta/rosetta.asset index c11f985565..cd03949867 100644 --- a/data/assets/scene/solarsystem/missions/rosetta/rosetta.asset +++ b/data/assets/scene/solarsystem/missions/rosetta/rosetta.asset @@ -23,6 +23,11 @@ local RotationMatrix = { local RosettaPosition = { Identifier = "RosettaPosition", Parent = sunTransforms.SolarSystemBarycenter.Identifier, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "2014 JAN 01 00:00:00.000", + End = "2016 OCT 01 00:00:00.000" + }, Transform = { Translation = { Type = "SpiceTranslation", From d0ca4c836bb6e323d335a54f215c008d23e7a175 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 6 Aug 2024 16:44:48 +0200 Subject: [PATCH 39/99] Prevent illegal memory access when creating globals (closes #1657) --- src/engine/globals.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/engine/globals.cpp b/src/engine/globals.cpp index 70874bec4d..20be3a5305 100644 --- a/src/engine/globals.cpp +++ b/src/engine/globals.cpp @@ -92,6 +92,7 @@ namespace { sizeof(Configuration) + sizeof(interaction::ActionManager) + sizeof(interaction::InteractionMonitor) + + sizeof(interaction::JoystickInputStates) + sizeof(interaction::WebsocketInputStates) + sizeof(interaction::KeybindingManager) + sizeof(interaction::NavigationHandler) + From 2b64f2445873d58f1764a8a28826f3ae725168b8 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 6 Aug 2024 16:55:37 +0200 Subject: [PATCH 40/99] Build Lua as a static library to benefit from LTO --- ext/ghoul | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ghoul b/ext/ghoul index 8bf9b6bc91..3aab5f1879 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 8bf9b6bc91b4690a5803f252bd1ad7538024f14a +Subproject commit 3aab5f18796393e18815cf1fe287d6c86aad6fbc From ca6c14e9b503e32b7ad55d2f69162df6f83a3cdb Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 7 Aug 2024 06:53:05 +0200 Subject: [PATCH 41/99] Make the SampleInterval for RenderableTrailTrajectory optional and use a sample per 2 days by default --- .../missions/pioneer/pioneer10.asset | 12 +++------ .../missions/pioneer/pioneer11.asset | 12 +++------ .../missions/voyager/voyager1.asset | 16 +++--------- .../missions/voyager/voyager2.asset | 25 ++++--------------- .../rendering/renderabletrailtrajectory.cpp | 18 ++++++++++--- 5 files changed, 29 insertions(+), 54 deletions(-) diff --git a/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset b/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset index f1d9fabd52..57ed722850 100644 --- a/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset +++ b/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset @@ -32,9 +32,6 @@ local Pioneer10 = { } } -local StartTime = "1972 MAR 03 02:04:00" -local EndTime = "1990 JAN 02 00:00:00" - local Pioneer10Trail = { Identifier = "Pioneer_10Trail", Parent = sunTransforms.SolarSystemBarycenter.Identifier, @@ -46,12 +43,9 @@ local Pioneer10Trail = { Observer = coreKernels.ID.SolarSystemBarycenter }, Color = { 0.70, 0.50, 0.20 }, - StartTime = StartTime, - EndTime = EndTime, - EnableFade = false, - -- 1 sample every 2d - SampleInterval = - openspace.time.duration(StartTime, EndTime) / openspace.time.secondsPerYear() * 2 + StartTime = "1972 MAR 03 02:04:00", + EndTime = "1990 JAN 02 00:00:00", + EnableFade = false }, GUI = { Name = "Pioneer 10 Trail (SPICE)", diff --git a/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset b/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset index 5d841c3873..4db1484673 100644 --- a/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset +++ b/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset @@ -37,9 +37,6 @@ local Pioneer11 = { } } -local StartTime = "1973 APR 06 02:25:00.000" -local EndTime = "1990 JAN 02 00:00:00.000" - local Pioneer11Trail = { Identifier = "Pioneer_11Trail", Parent = sunTransforms.SolarSystemBarycenter.Identifier, @@ -51,12 +48,9 @@ local Pioneer11Trail = { Observer = coreKernels.ID.SolarSystemBarycenter }, Color = { 0.70, 0.50, 0.20 }, - StartTime = StartTime, - EndTime = EndTime, - EnableFade = false, - -- 1 sample every 2d - SampleInterval = - openspace.time.duration(StartTime, EndTime) / openspace.time.secondsPerYear() * 2 + StartTime = "1973 APR 06 02:25:00.000", + EndTime = "1990 JAN 02 00:00:00.000", + EnableFade = false }, GUI = { Name = "Pioneer 11 Trail (SPICE)", diff --git a/data/assets/scene/solarsystem/missions/voyager/voyager1.asset b/data/assets/scene/solarsystem/missions/voyager/voyager1.asset index 0d7660639b..c328d4a974 100644 --- a/data/assets/scene/solarsystem/missions/voyager/voyager1.asset +++ b/data/assets/scene/solarsystem/missions/voyager/voyager1.asset @@ -94,10 +94,7 @@ local VoyagerTrailCruiseEarthJupiter = { }, Color = { 0.70, 0.50, 0.20 }, StartTime = "1977 SEP 05", - EndTime = "1979 MAR 04", - -- 1 sample every 2d - SampleInterval = openspace.time.duration("1977 SEP 05", "1979 MAR 04") / - openspace.time.secondsPerYear() * 2 + EndTime = "1979 MAR 04" }, Tag = { "voyager1_trail" }, GUI = { @@ -145,10 +142,7 @@ local VoyagerTrailCruiseJupiterSaturn = { EnableFade = false, Color = { 0.70, 0.50, 0.20 }, StartTime = "1979 MAR 09", - EndTime = "1980 NOV 11", - -- 1 sample every 2d - SampleInterval = openspace.time.duration("1979 MAR 09", "1980 NOV 11") / - openspace.time.secondsPerYear() * 2 + EndTime = "1980 NOV 11" }, Tag = { "voyager1_trail" }, GUI = { @@ -196,11 +190,7 @@ local VoyagerTrailCruiseSaturnInf = { EnableFade = false, Color = { 0.70, 0.50, 0.20 }, StartTime = "1980 NOV 16", - EndTime = "2100 JAN 01", - -- 1 sample every 2d - SampleInterval = openspace.time.duration("1980 NOV 16", "2100 JAN 01") / - openspace.time.secondsPerYear() * 2 - + EndTime = "2100 JAN 01" }, Tag = { "voyager1_trail" }, GUI = { diff --git a/data/assets/scene/solarsystem/missions/voyager/voyager2.asset b/data/assets/scene/solarsystem/missions/voyager/voyager2.asset index 884865df88..178428d12c 100644 --- a/data/assets/scene/solarsystem/missions/voyager/voyager2.asset +++ b/data/assets/scene/solarsystem/missions/voyager/voyager2.asset @@ -97,10 +97,7 @@ local VoyagerTrailCruiseEarthJupiter = { }, Color = { 0.70, 0.50, 0.20 }, StartTime = "1977-AUG-20 16:07:06.535", - EndTime = "1979 JUL 06", - -- 1 sample every 2d - SampleInterval = openspace.time.duration("1977-AUG-20 16:07:06.535", "1979 JUL 06") / - openspace.time.secondsPerYear() * 2 + EndTime = "1979 JUL 06" }, Tag = { "voyager2_trail" }, GUI = { @@ -148,10 +145,7 @@ local VoyagerTrailCruiseJupiterSaturn = { EnableFade = false, Color = { 0.70, 0.50, 0.20 }, StartTime = "1979 JUL 15", - EndTime = "1981 AUG 23", - -- 1 sample every 2d - SampleInterval = openspace.time.duration("1979 JUL 15", "1981 AUG 23") / - openspace.time.secondsPerYear() * 2 + EndTime = "1981 AUG 23" }, Tag = { "voyager2_trail" }, GUI = { @@ -199,10 +193,7 @@ local VoyagerTrailCruiseSaturnUranus = { EnableFade = false, Color = { 0.70, 0.50, 0.20 }, StartTime = "1981 AUG 30", - EndTime = "1986 JAN 22", - -- 1 sample every 2d - SampleInterval = openspace.time.duration("1981 AUG 30", "1986 JAN 22") / - openspace.time.secondsPerYear() * 2 + EndTime = "1986 JAN 22" }, Tag = { "voyager2_trail" }, GUI = { @@ -250,10 +241,7 @@ local VoyagerTrailCruiseUranusNeptune = { EnableFade = false, Color = { 0.70, 0.50, 0.20 }, StartTime = "1986 JAN 27", - EndTime = "1989 AUG 24", - -- 1 sample every 2d - SampleInterval = openspace.time.duration("1986 JAN 27", "1989 AUG 24") / - openspace.time.secondsPerYear() * 2 + EndTime = "1989 AUG 24" }, Tag = { "voyager2_trail" }, GUI = { @@ -301,10 +289,7 @@ local VoyagerTrailCruiseNeptuneInf = { EnableFade = false, Color = { 0.70, 0.50, 0.20 }, StartTime = "1989 AUG 26", - EndTime = "2100 JAN 01", - -- 1 sample every 2d - SampleInterval = openspace.time.duration("1989 AUG 26", "2100 JAN 01") / - openspace.time.secondsPerYear() * 2 + EndTime = "2100 JAN 01" }, Tag = { "voyager2_trail" }, GUI = { diff --git a/modules/base/rendering/renderabletrailtrajectory.cpp b/modules/base/rendering/renderabletrailtrajectory.cpp index f664d8dbc2..4d8eb67e92 100644 --- a/modules/base/rendering/renderabletrailtrajectory.cpp +++ b/modules/base/rendering/renderabletrailtrajectory.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -124,8 +125,13 @@ namespace { // [[codegen::verbatim(EndTimeInfo.description)]] std::string endTime [[codegen::annotation("A valid date in ISO 8601 format")]]; - // [[codegen::verbatim(SampleIntervalInfo.description)]] - double sampleInterval; + // The interval between samples of the trajectory. This value (together with + // 'TimeStampSubsampleFactor') determines how far apart (in time) the samples are + // spaced along the trajectory. The time interval between 'StartTime' and + // 'EndTime' is split into 'SampleInterval' * 'TimeStampSubsampleFactor' segments. + // If this value is not specified, it will be automatically calculated to produce + // one sample every two day between the 'StartTime' and 'EndTime'. + std::optional sampleInterval; // [[codegen::verbatim(TimeSubSampleInfo.description)]] std::optional timeStampSubsampleFactor; @@ -182,7 +188,13 @@ RenderableTrailTrajectory::RenderableTrailTrajectory(const ghoul::Dictionary& di _endTime.onChange([this] { reset(); }); addProperty(_endTime); - _sampleInterval = p.sampleInterval; + if (p.sampleInterval.has_value()) { + _sampleInterval = *p.sampleInterval; + } + else { + const double delta = Time::convertTime(_endTime) - Time::convertTime(_startTime); + _sampleInterval = delta / (openspace::SecondsPerYear * 2); + } _sampleInterval.onChange([this] { reset(); }); addProperty(_sampleInterval); From d07edbdc7733fd6d9bc3c846bb3d7f17e22c21de Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 7 Aug 2024 06:58:50 +0200 Subject: [PATCH 42/99] Fixing arrangement for TimeFrames in assets --- .../solarsystem/missions/apollo/15/apollo15.asset | 10 +++++----- .../scene/solarsystem/missions/insight/edl.asset | 10 +++++----- data/assets/scene/solarsystem/sun/transforms.asset | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset b/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset index acfae57516..5c52ec3b03 100644 --- a/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset +++ b/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset @@ -17,6 +17,11 @@ local models = asset.resource({ local Apollo15 = { Identifier = "Apollo15", Parent = moonTransforms.Moon.Identifier, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "1971-07-30T02:22:00.00", + End = "1971-08-01T18:05:00.00" + }, Transform = { Translation = { Type = "SpiceTranslation", @@ -39,11 +44,6 @@ local Apollo15 = { }, PerformShading = true }, - TimeFrame = { - Type = "TimeFrameInterval", - Start = "1971-07-30T02:22:00.00", - End = "1971-08-01T18:05:00.00" - }, GUI = { Name = "Apollo 15", Path = "/Solar System/Missions/Apollo/15" diff --git a/data/assets/scene/solarsystem/missions/insight/edl.asset b/data/assets/scene/solarsystem/missions/insight/edl.asset index 039f473695..c8f8314147 100644 --- a/data/assets/scene/solarsystem/missions/insight/edl.asset +++ b/data/assets/scene/solarsystem/missions/insight/edl.asset @@ -133,6 +133,11 @@ local RotationKeyframes = { local InsightParent = { Identifier = "InsightParent", Parent = mars.Mars.Identifier, + -- TimeFrame = { + -- Type = "TimeFrameInterval", + -- Start = EntryTimeStart, + -- End = SpiceRotationEndTime + -- }, Transform = { Translation = { Type = "TimelineTranslation", @@ -143,11 +148,6 @@ local InsightParent = { Keyframes = RotationKeyframes } }, - -- TimeFrame = { - -- Type = "TimeFrameInterval", - -- Start = EntryTimeStart, - -- End = SpiceRotationEndTime - -- }, GUI = { Name = "InsightParent", Path = "/Solar System/Missions/Insight", diff --git a/data/assets/scene/solarsystem/sun/transforms.asset b/data/assets/scene/solarsystem/sun/transforms.asset index 82d7b9a60e..4cd42b86e9 100644 --- a/data/assets/scene/solarsystem/sun/transforms.asset +++ b/data/assets/scene/solarsystem/sun/transforms.asset @@ -6,7 +6,7 @@ local coreKernels = asset.require("spice/core") local SolarSystemBarycenter = { Identifier = "SolarSystemBarycenter", -- No parent; this node is attached to the scene graph root - TimeFrame = { -- Using Spice kernels for 1850-2150 + TimeFrame = { Type = "TimeFrameInterval", Start = "1550-JAN-01", End = "2650-JAN-22" From 7f3482b5b6abf075bc5b7c9da02c5bdc991547f6 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 7 Aug 2024 08:55:03 +0200 Subject: [PATCH 43/99] Update Lua to 5.4.7 --- ext/ghoul | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ghoul b/ext/ghoul index 3aab5f1879..7eb3d942c4 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 3aab5f18796393e18815cf1fe287d6c86aad6fbc +Subproject commit 7eb3d942c48f8678519ffcd57c325db35bd192d8 From 75b4609c52083d1ab0b472314b6f01be78f03030 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 7 Aug 2024 11:34:57 +0200 Subject: [PATCH 44/99] Remove explicitly specifying LuaState constructors --- modules/base/rotation/luarotation.cpp | 4 ---- modules/base/scale/luascale.cpp | 4 ---- modules/base/translation/luatranslation.cpp | 4 ---- src/engine/openspaceengine.cpp | 2 +- src/scene/scene.cpp | 2 +- 5 files changed, 2 insertions(+), 14 deletions(-) diff --git a/modules/base/rotation/luarotation.cpp b/modules/base/rotation/luarotation.cpp index 2e6124db18..c33215f63a 100644 --- a/modules/base/rotation/luarotation.cpp +++ b/modules/base/rotation/luarotation.cpp @@ -64,10 +64,6 @@ documentation::Documentation LuaRotation::Documentation() { LuaRotation::LuaRotation(const ghoul::Dictionary& dictionary) : _luaScriptFile(ScriptInfo) - , _state( - ghoul::lua::LuaState::IncludeStandardLibrary::Yes, - ghoul::lua::LuaState::StrictState::No - ) { const Parameters p = codegen::bake(dictionary); diff --git a/modules/base/scale/luascale.cpp b/modules/base/scale/luascale.cpp index f5ee885472..7058eca845 100644 --- a/modules/base/scale/luascale.cpp +++ b/modules/base/scale/luascale.cpp @@ -63,10 +63,6 @@ documentation::Documentation LuaScale::Documentation() { LuaScale::LuaScale(const ghoul::Dictionary& dictionary) : _luaScriptFile(ScriptInfo) - , _state( - ghoul::lua::LuaState::IncludeStandardLibrary::Yes, - ghoul::lua::LuaState::StrictState::No - ) { const Parameters p = codegen::bake(dictionary); diff --git a/modules/base/translation/luatranslation.cpp b/modules/base/translation/luatranslation.cpp index cd74c7c103..603205bf1e 100644 --- a/modules/base/translation/luatranslation.cpp +++ b/modules/base/translation/luatranslation.cpp @@ -64,10 +64,6 @@ documentation::Documentation LuaTranslation::Documentation() { LuaTranslation::LuaTranslation(const ghoul::Dictionary& dictionary) : _luaScriptFile(ScriptInfo) - , _state( - ghoul::lua::LuaState::IncludeStandardLibrary::Yes, - ghoul::lua::LuaState::StrictState::No - ) { const Parameters p = codegen::bake(dictionary); diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index acd97af002..ff8bbbb243 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -1383,7 +1383,7 @@ void OpenSpaceEngine::touchExitCallback(TouchInput input) { } void OpenSpaceEngine::handleDragDrop(std::filesystem::path file) { - const ghoul::lua::LuaState s(ghoul::lua::LuaState::IncludeStandardLibrary::Yes); + const ghoul::lua::LuaState s; const std::filesystem::path path = absPath("${SCRIPTS}/drag_drop_handler.lua"); const std::string p = path.string(); int status = luaL_loadfile(s, p.c_str()); diff --git a/src/scene/scene.cpp b/src/scene/scene.cpp index ac5062e4aa..7c1072ac64 100644 --- a/src/scene/scene.cpp +++ b/src/scene/scene.cpp @@ -576,7 +576,7 @@ void Scene::updateInterpolations() { } void Scene::setPropertiesFromProfile(const Profile& p) { - ghoul::lua::LuaState L(ghoul::lua::LuaState::IncludeStandardLibrary::Yes); + ghoul::lua::LuaState L; for (const Profile::Property& prop : p.properties) { if (prop.name.empty()) { From d25d3072d8f712b07cc857ee61fa631fd14e2e3b Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 7 Aug 2024 11:35:15 +0200 Subject: [PATCH 45/99] Add new Lua function to read files by lines --- src/scripting/scriptengine.cpp | 1 + src/scripting/scriptengine_lua.inl | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/scripting/scriptengine.cpp b/src/scripting/scriptengine.cpp index 1c44e9e149..57cd2c42fb 100644 --- a/src/scripting/scriptengine.cpp +++ b/src/scripting/scriptengine.cpp @@ -654,6 +654,7 @@ void ScriptEngine::addBaseLibrary() { codegen::lua::SetPathToken, codegen::lua::FileExists, codegen::lua::ReadFile, + codegen::lua::ReadFileLines, codegen::lua::DirectoryExists, codegen::lua::CreateDirectory, codegen::lua::WalkDirectory, diff --git a/src/scripting/scriptengine_lua.inl b/src/scripting/scriptengine_lua.inl index 1d9ca9c630..c1c130f480 100644 --- a/src/scripting/scriptengine_lua.inl +++ b/src/scripting/scriptengine_lua.inl @@ -103,6 +103,24 @@ namespace { return contents; } +// Reads a file from disk and return its as a list of lines. +[[codegen::luawrap]] std::vector readFileLines(std::filesystem::path file) { + std::filesystem::path p = absPath(file); + if (!std::filesystem::is_regular_file(p)) { + throw ghoul::lua::LuaError(std::format("Could not open file '{}'", file)); + } + + std::ifstream f = std::ifstream(p); + std::vector contents; + while (f.good()) { + std::string line; + ghoul::getline(f, line); + contents.push_back(std::move(line)); + } + + return contents; +} + // Checks whether the provided directory exists. [[codegen::luawrap]] bool directoryExists(std::filesystem::path file) { const bool e = std::filesystem::is_directory(absPath(std::move(file))); From 2ee18b6862e1b384c1053e6bba24c7854ed5dd2b Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 7 Aug 2024 11:36:19 +0200 Subject: [PATCH 46/99] No longer report OpenSpace version explicitly if it is the current version --- src/util/versionchecker.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/util/versionchecker.cpp b/src/util/versionchecker.cpp index ecdfff0504..5d7ae63c8e 100644 --- a/src/util/versionchecker.cpp +++ b/src/util/versionchecker.cpp @@ -111,14 +111,6 @@ void VersionChecker::cancel() { currentVersion.patch )); } - else { - LINFO(std::format( - "OpenSpace version {}.{}.{} is up to date", - currentVersion.major, - currentVersion.minor, - currentVersion.patch - )); - } return true; } if (_request->hasFailed()) { From 845724b7886b241c49f08a6181a365f3d1ee25e6 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 10 Aug 2024 16:48:00 +0200 Subject: [PATCH 47/99] Add the ability to drag and drop WMS files and add them to the current Anchor --- scripts/drag_drop_handler.lua | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/scripts/drag_drop_handler.lua b/scripts/drag_drop_handler.lua index 7104ca0880..569da1ff0a 100644 --- a/scripts/drag_drop_handler.lua +++ b/scripts/drag_drop_handler.lua @@ -47,28 +47,43 @@ local is_geojson_file = function(extension) return extension == ".geojson" end +local is_wms_file = function(extension) + return extension == ".wms" +end + if is_image_file(extension) then return [[ openspace.addScreenSpaceRenderable({ Identifier = openspace.makeIdentifier("]] .. basename_without_extension .. [["), Type = "ScreenSpaceImageLocal", TexturePath = "]] .. filename .. [[" - });]] + });]] elseif is_video_file(extension) then return [[ openspace.addScreenSpaceRenderable({ Identifier = openspace.makeIdentifier("]] .. basename_without_extension .. [["), Type = "ScreenSpaceVideo", Video = "]] .. filename .. [[" - });]] + });]] elseif is_asset_file(extension) then return [[ if openspace.asset.isLoaded("]] .. filename .. [[") ~= true then openspace.printInfo("Adding asset: ']] .. filename .. [[' (drag-and-drop)"); end - openspace.asset.add("]] .. filename .. '");' + openspace.asset.add("]] .. filename .. '");' elseif is_recording_file(extension) then return 'openspace.sessionRecording.startPlayback("' .. filename .. '")' elseif is_geojson_file(extension) then - return 'openspace.globebrowsing.addGeoJsonFromFile("' .. filename .. '")' + return 'openspace.globebrowsing.addGeoJsonFromFile("' .. filename .. '")' +elseif is_wms_file(extension) then + return [[ + openspace.globebrowsing.addLayer( + openspace.navigation.getNavigationState().Anchor, + "ColorLayers", + { + Identifier = openspace.makeIdentifier("]] .. basename_without_extension .. [["), + FilePath = ']] .. filename .. [[' + } + ) + ]] end From 414c050330b35c8c6a61d3d462599636bcbbc2ac Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 10 Aug 2024 23:26:46 +0200 Subject: [PATCH 48/99] Update to newer Qt version (#3369) --- apps/OpenSpace/CMakeLists.txt | 3 +-- apps/OpenSpace/ext/launcher/src/launcherwindow.cpp | 2 +- apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/OpenSpace/CMakeLists.txt b/apps/OpenSpace/CMakeLists.txt index c4a1234cd0..8e41455eca 100644 --- a/apps/OpenSpace/CMakeLists.txt +++ b/apps/OpenSpace/CMakeLists.txt @@ -147,10 +147,9 @@ if (WIN32) # Find the windeployqt application get_target_property(_qmake_executable Qt6::qmake IMPORTED_LOCATION) get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY) - find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}") add_custom_command( TARGET OpenSpace POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E env PATH="${_qt_bin_dir}" "${WINDEPLOYQT_EXECUTABLE}" --verbose 0 --no-compiler-runtime --no-translations \"$\" + COMMAND "${CMAKE_COMMAND}" -E env PATH="${_qt_bin_dir}" "${_qt_bin_dir}/windeployqt6.exe" --verbose 0 --no-compiler-runtime --no-translations \"$\" COMMENT "Deploying Qt libraries" ) endif () diff --git a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp index 162d11b0d9..e9db214d84 100644 --- a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp +++ b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp @@ -224,7 +224,7 @@ LauncherWindow::LauncherWindow(bool profileEnabled, qInstallMessageHandler( [](QtMsgType type, const QMessageLogContext&, const QString& msg) { - if (type == QtCriticalMsg || type == QtFatalMsg || type == QtSystemMsg) { + if (type == QtCriticalMsg || type == QtFatalMsg || type == QtCriticalMsg) { std::cerr << msg.toStdString() << '\n'; } } diff --git a/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp b/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp index 15a9b69e08..67690c8b33 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp @@ -151,7 +151,7 @@ bool AssetTreeItem::insertColumns(int position, int columns) { _itemData.insert(_itemData.begin() + position, QVariant()); } - for (AssetTreeItem* child : qAsConst(_childItems)) { + for (AssetTreeItem* child : _childItems) { child->insertColumns(position, columns); } From 0ec3d5e2842bf23a3152f36c38718ef05e8029e6 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 12 Aug 2024 09:55:03 +0200 Subject: [PATCH 49/99] Add Sweden caching server to Earth map layer --- .../colorlayers/esri_viirs_combo_sweden.asset | 63 +++++++++++++++++++ .../esri_world_imagery_sweden.asset | 42 +++++++++++++ .../colorlayers/esri_world_imagery_sweden.wms | 21 +++++++ 3 files changed, 126 insertions(+) create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_viirs_combo_sweden.asset create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_sweden.asset create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_sweden.wms diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_viirs_combo_sweden.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_viirs_combo_sweden.asset new file mode 100644 index 0000000000..ec96772a81 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_viirs_combo_sweden.asset @@ -0,0 +1,63 @@ +local globe = asset.require("../../earth") +local snpp = asset.require("./definitions/snpp") +local noaa20 = asset.require("./definitions/noaa20") +local noaa21 = asset.require("./definitions/noaa21") + + + +local Layer = { + Identifier = "ESRI_VIIRS_Combo_UsSweden", + Name = "ESRI VIIRS Combo [US/Sweden]", + Enabled = asset.enabled, + ZIndex = 20, + Type = "TileProviderByLevel", + LevelTileProviders = { + { + MaxLevel = 4, + TileProvider = { + Identifier = "VIIRS_Joint_Layer", + Name = "VIIRS Joint Layer", + Type = "TileProviderByDate", + Providers = { + ["2015-11-24"] = snpp.Layer, + ["2018-01-05"] = noaa20.Layer, + ["2024-04-19"] = noaa21.Layer + } + } + }, + { + MaxLevel = 22, + TileProvider = { + Identifier = "ESRI_World_Imagery_Sweden", + Name = "ESRI World Imagery [Sweden]", + FilePath = asset.resource("esri_world_imagery_sweden.wms"), + PadTiles = false + } + } + }, + PadTiles = false, + Description = [[Level based layer combining different VIIRS layers and ESRI World + Imagery. VIIRS is faded out at tile level 4]] +} + + +asset.onInitialize(function() + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", Layer) +end) + +asset.onDeinitialize(function() + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", Layer) +end) + +asset.export("layer", Layer) + + + +asset.meta = { + Name = "ESRI VIIRS Combo", + Description = [[Level based layer combining "VIIRS SNPP (Temporal)" and ESRI World + Imagery. "VIIRS SNPP (Temporal)" is faded out at tile level 4]], + Author = "OpenSpace Tem", + URL = "http://www.openspaceproject.com", + License = "MIT License" +} diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_sweden.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_sweden.asset new file mode 100644 index 0000000000..b0f95b6f82 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_sweden.asset @@ -0,0 +1,42 @@ +local globe = asset.require("../../earth") + + + +local Layer = { + Identifier = "ESRI_World_Imagery_Sweden", + Name = "ESRI World Imagery [Sweden]", + Enabled = asset.enabled, + ZIndex = 10, + FilePath = asset.resource("esri_world_imagery_sweden.wms"), + Description = [[World Imagery provides one meter or better satellite and aerial + imagery in many parts of the world and lower resolution satellite imagery + worldwide. The map includes 15m TerraColor imagery at small and mid-scales + (~1:591M down to ~1:72k) and 2.5m SPOT Imagery (~1:288k to ~1:72k) for the world. + The map features 0.5m resolution imagery in the continental United States and + parts of Western Europe from Maxar. Additional Maxar sub-meter imagery is + featured in many parts of the world. In other parts of the world, imagery at + different resolutions has been contributed by the GIS User Community. In select + communities, very high resolution imagery (down to 0.03m) is available down to + ~1:280 scale. (Description from URL)]] +} + + +asset.onInitialize(function() + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", Layer) +end) + +asset.onDeinitialize(function() + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", Layer) +end) + +asset.export("layer", Layer) + + + +asset.meta = { + Name = "ESRI World Imagery", + Description = "Main web loaded map layer for Earth. This layer is hosted by ESRI", + Author = "ESRI", + URL = "https://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9", + License = "Esri Master License Agreement" +} diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_sweden.wms b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_sweden.wms new file mode 100644 index 0000000000..01cf55ef13 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_sweden.wms @@ -0,0 +1,21 @@ + + + http://liu-se.wms.openspaceproject.com/Earth/Esri_World_Imagery/tile/${z}/${y}/${x}.jpg + + + -180.0 + 90 + 180 + -90 + 19 + 2 + 1 + top + + EPSG:4326 + 256 + 256 + 3 + 5 + 5 + From 5d2186f11dbe567cf1dd434e6b6b05a007e4b5df Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 12 Aug 2024 21:20:39 +0200 Subject: [PATCH 50/99] Add Esri Wayback layers (#3382) --- .../esri_world_imagery_wayback.asset | 155 ++++++++++++++++++ .../esri_world_imagery_wayback/20140220.wms | 21 +++ .../esri_world_imagery_wayback/20150430.wms | 21 +++ .../esri_world_imagery_wayback/20160613.wms | 21 +++ .../esri_world_imagery_wayback/20180108.wms | 21 +++ .../esri_world_imagery_wayback/20180627.wms | 21 +++ .../esri_world_imagery_wayback/20190626.wms | 21 +++ .../esri_world_imagery_wayback/20200610.wms | 21 +++ .../esri_world_imagery_wayback/20210408.wms | 21 +++ .../esri_world_imagery_wayback/20211221.wms | 21 +++ .../esri_world_imagery_wayback/20221012.wms | 21 +++ .../esri_world_imagery_wayback/20230613.wms | 21 +++ .../esri_world_imagery_wayback/20231207.wms | 21 +++ 13 files changed, 407 insertions(+) create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback.asset create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20140220.wms create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20150430.wms create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20160613.wms create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20180108.wms create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20180627.wms create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20190626.wms create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20200610.wms create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20210408.wms create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20211221.wms create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20221012.wms create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20230613.wms create mode 100644 data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20231207.wms diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback.asset new file mode 100644 index 0000000000..27fa8892d4 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback.asset @@ -0,0 +1,155 @@ +local globe = asset.require("../../earth") + + + +local WaybackLayer20140220 = { + Identifier = "ESRI_World_Imagery_Wayback_20140220", + ZIndex = 10, + FilePath = asset.resource("esri_world_imagery_wayback/20140220.wms"), + Description = [[The ESRI World Imagery dataset from the wayback feature showing the + Earth how it looked like in 2014 FEB 20. https://livingatlas.arcgis.com/wayback]] +} + +local WaybackLayer20150430 = { + Identifier = "ESRI_World_Imagery_Wayback_20150430", + ZIndex = 10, + FilePath = asset.resource("esri_world_imagery_wayback/20150430.wms"), + Description = [[The ESRI World Imagery dataset from the wayback feature showing the + Earth how it looked like in 2015 APR 30. https://livingatlas.arcgis.com/wayback]] +} + +local WaybackLayer20160613 = { + Identifier = "ESRI_World_Imagery_Wayback_20160613", + ZIndex = 10, + FilePath = asset.resource("esri_world_imagery_wayback/20160613.wms"), + Description = [[The ESRI World Imagery dataset from the wayback feature showing the + Earth how it looked like in 2016 JUN 13. https://livingatlas.arcgis.com/wayback]] +} + +local WaybackLayer20180108 = { + Identifier = "ESRI_World_Imagery_Wayback_20180108", + ZIndex = 10, + FilePath = asset.resource("esri_world_imagery_wayback/20180108.wms"), + Description = [[The ESRI World Imagery dataset from the wayback feature showing the + Earth how it looked like in 2018 JAN 08. https://livingatlas.arcgis.com/wayback]] +} + +local WaybackLayer20180627 = { + Identifier = "ESRI_World_Imagery_Wayback_20180627", + ZIndex = 10, + FilePath = asset.resource("esri_world_imagery_wayback/20180627.wms"), + Description = [[The ESRI World Imagery dataset from the wayback feature showing the + Earth how it looked like in 2018 JUN 27. https://livingatlas.arcgis.com/wayback]] +} + +local WaybackLayer20190626 = { + Identifier = "ESRI_World_Imagery_Wayback_20190626", + ZIndex = 10, + FilePath = asset.resource("esri_world_imagery_wayback/20190626.wms"), + Description = [[The ESRI World Imagery dataset from the wayback feature showing the + Earth how it looked like in 2019 JUN 26. https://livingatlas.arcgis.com/wayback]] +} + +local WaybackLayer20200610 = { + Identifier = "ESRI_World_Imagery_Wayback_20200610", + ZIndex = 10, + FilePath = asset.resource("esri_world_imagery_wayback/20200610.wms"), + Description = [[The ESRI World Imagery dataset from the wayback feature showing the + Earth how it looked like in 2020 JUN 10. https://livingatlas.arcgis.com/wayback]] +} + +local WaybackLayer20210408 = { + Identifier = "ESRI_World_Imagery_Wayback_20210408", + ZIndex = 10, + FilePath = asset.resource("esri_world_imagery_wayback/20210408.wms"), + Description = [[The ESRI World Imagery dataset from the wayback feature showing the + Earth how it looked like in 2021 APR 08. https://livingatlas.arcgis.com/wayback]] +} + +local WaybackLayer20211221 = { + Identifier = "ESRI_World_Imagery_Wayback_20211221", + ZIndex = 10, + FilePath = asset.resource("esri_world_imagery_wayback/20211221.wms"), + Description = [[The ESRI World Imagery dataset from the wayback feature showing the + Earth how it looked like in 2021 DEC 21. https://livingatlas.arcgis.com/wayback]] +} + +local WaybackLayer20221012 = { + Identifier = "ESRI_World_Imagery_Wayback_20221012", + ZIndex = 10, + FilePath = asset.resource("esri_world_imagery_wayback/20221012.wms"), + Description = [[The ESRI World Imagery dataset from the wayback feature showing the + Earth how it looked like in 2022 OCT 12. https://livingatlas.arcgis.com/wayback]] +} + +local WaybackLayer20230613 = { + Identifier = "ESRI_World_Imagery_Wayback_20230613", + ZIndex = 10, + FilePath = asset.resource("esri_world_imagery_wayback/20230613.wms"), + Description = [[The ESRI World Imagery dataset from the wayback feature showing the + Earth how it looked like in 2023 JUN 13. https://livingatlas.arcgis.com/wayback]] +} + +local WaybackLayer20231207 = { + Identifier = "ESRI_World_Imagery_Wayback_20231207", + ZIndex = 10, + FilePath = asset.resource("esri_world_imagery_wayback/20231207.wms"), + Description = [[The ESRI World Imagery dataset from the wayback feature showing the + Earth how it looked like in 2023 DEC 07. https://livingatlas.arcgis.com/wayback]] +} + + + +asset.onInitialize(function() + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20140220) + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20150430) + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20160613) + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20180108) + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20180627) + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20190626) + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20200610) + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20210408) + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20211221) + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20221012) + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20230613) + openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20231207) +end) + +asset.onDeinitialize(function() + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20231207) + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20230613) + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20221012) + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20211221) + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20210408) + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20200610) + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20190626) + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20180627) + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20180108) + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20160613) + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20150430) + openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20140220) +end) + +asset.export("layer20140220", WaybackLayer20140220) +asset.export("layer20150430", WaybackLayer20150430) +asset.export("layer20160613", WaybackLayer20160613) +asset.export("layer20180108", WaybackLayer20180108) +asset.export("layer20180627", WaybackLayer20180627) +asset.export("layer20190626", WaybackLayer20190626) +asset.export("layer20200610", WaybackLayer20200610) +asset.export("layer20210408", WaybackLayer20210408) +asset.export("layer20211221", WaybackLayer20211221) +asset.export("layer20221012", WaybackLayer20221012) +asset.export("layer20230613", WaybackLayer20230613) +asset.export("layer20231207", WaybackLayer20231207) + + + +asset.meta = { + Name = "ESRI World Imagery Wayback machine", + Description = [[Access to the ESRI World Imagery Wayback machine layers ranging from + 2014 to 2023]], + Author = "ESRI", + URL = "https://livingatlas.arcgis.com/wayback", + License = "Esri Master License Agreement" +} diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20140220.wms b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20140220.wms new file mode 100644 index 0000000000..b2a2bfa18a --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20140220.wms @@ -0,0 +1,21 @@ + + + http://liu-se.wms.openspaceproject.com/Earth/Esri_Wayback/tile/10/${z}/${y}/${x} + + + -180.0 + 90 + 180 + -90 + 19 + 2 + 1 + top + + EPSG:4326 + 256 + 256 + 3 + 5 + 5 + diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20150430.wms b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20150430.wms new file mode 100644 index 0000000000..e4cabf068f --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20150430.wms @@ -0,0 +1,21 @@ + + + http://liu-se.wms.openspaceproject.com/Earth/Esri_Wayback/tile/23880/${z}/${y}/${x} + + + -180.0 + 90 + 180 + -90 + 19 + 2 + 1 + top + + EPSG:4326 + 256 + 256 + 3 + 5 + 5 + diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20160613.wms b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20160613.wms new file mode 100644 index 0000000000..86ea70aef5 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20160613.wms @@ -0,0 +1,21 @@ + + + http://liu-se.wms.openspaceproject.com/Earth/Esri_Wayback/tile/11509/${z}/${y}/${x} + + + -180.0 + 90 + 180 + -90 + 19 + 2 + 1 + top + + EPSG:4326 + 256 + 256 + 3 + 5 + 5 + diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20180108.wms b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20180108.wms new file mode 100644 index 0000000000..38f9de5ba0 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20180108.wms @@ -0,0 +1,21 @@ + + + http://liu-se.wms.openspaceproject.com/Earth/Esri_Wayback/tile/13161/${z}/${y}/${x} + + + -180.0 + 90 + 180 + -90 + 19 + 2 + 1 + top + + EPSG:4326 + 256 + 256 + 3 + 5 + 5 + diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20180627.wms b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20180627.wms new file mode 100644 index 0000000000..9bfdfefc00 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20180627.wms @@ -0,0 +1,21 @@ + + + http://liu-se.wms.openspaceproject.com/Earth/Esri_Wayback/tile/11334/${z}/${y}/${x} + + + -180.0 + 90 + 180 + -90 + 19 + 2 + 1 + top + + EPSG:4326 + 256 + 256 + 3 + 5 + 5 + diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20190626.wms b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20190626.wms new file mode 100644 index 0000000000..272eb62d4e --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20190626.wms @@ -0,0 +1,21 @@ + + + http://liu-se.wms.openspaceproject.com/Earth/Esri_Wayback/tile/645/${z}/${y}/${x} + + + -180.0 + 90 + 180 + -90 + 19 + 2 + 1 + top + + EPSG:4326 + 256 + 256 + 3 + 5 + 5 + diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20200610.wms b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20200610.wms new file mode 100644 index 0000000000..e289c32548 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20200610.wms @@ -0,0 +1,21 @@ + + + http://liu-se.wms.openspaceproject.com/Earth/Esri_Wayback/tile/11135/${z}/${y}/${x} + + + -180.0 + 90 + 180 + -90 + 19 + 2 + 1 + top + + EPSG:4326 + 256 + 256 + 3 + 5 + 5 + diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20210408.wms b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20210408.wms new file mode 100644 index 0000000000..ae992e75f1 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20210408.wms @@ -0,0 +1,21 @@ + + + http://liu-se.wms.openspaceproject.com/Earth/Esri_Wayback/tile/6863/${z}/${y}/${x} + + + -180.0 + 90 + 180 + -90 + 19 + 2 + 1 + top + + EPSG:4326 + 256 + 256 + 3 + 5 + 5 + diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20211221.wms b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20211221.wms new file mode 100644 index 0000000000..628fbf81b4 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20211221.wms @@ -0,0 +1,21 @@ + + + http://liu-se.wms.openspaceproject.com/Earth/Esri_Wayback/tile/26120/${z}/${y}/${x} + + + -180.0 + 90 + 180 + -90 + 19 + 2 + 1 + top + + EPSG:4326 + 256 + 256 + 3 + 5 + 5 + diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20221012.wms b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20221012.wms new file mode 100644 index 0000000000..44aafcf12f --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20221012.wms @@ -0,0 +1,21 @@ + + + http://liu-se.wms.openspaceproject.com/Earth/Esri_Wayback/tile/44988/${z}/${y}/${x} + + + -180.0 + 90 + 180 + -90 + 19 + 2 + 1 + top + + EPSG:4326 + 256 + 256 + 3 + 5 + 5 + diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20230613.wms b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20230613.wms new file mode 100644 index 0000000000..ae41d06d4e --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20230613.wms @@ -0,0 +1,21 @@ + + + http://liu-se.wms.openspaceproject.com/Earth/Esri_Wayback/tile/25982/${z}/${y}/${x} + + + -180.0 + 90 + 180 + -90 + 19 + 2 + 1 + top + + EPSG:4326 + 256 + 256 + 3 + 5 + 5 + diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20231207.wms b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20231207.wms new file mode 100644 index 0000000000..9a6388ad64 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback/20231207.wms @@ -0,0 +1,21 @@ + + + http://liu-se.wms.openspaceproject.com/Earth/Esri_Wayback/tile/56102/${z}/${y}/${x} + + + -180.0 + 90 + 180 + -90 + 19 + 2 + 1 + top + + EPSG:4326 + 256 + 256 + 3 + 5 + 5 + From 43ada7fa1feddd7a8422cadd8ad0e0982e140e85 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 13 Aug 2024 13:37:39 +0200 Subject: [PATCH 51/99] Add the ability to feather borders of screenspace renderables --- include/openspace/rendering/screenspacerenderable.h | 3 ++- modules/base/shaders/screenspace_fs.glsl | 8 ++++++++ src/rendering/screenspacerenderable.cpp | 13 +++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/include/openspace/rendering/screenspacerenderable.h b/include/openspace/rendering/screenspacerenderable.h index ae37a25c30..47f5af91dd 100644 --- a/include/openspace/rendering/screenspacerenderable.h +++ b/include/openspace/rendering/screenspacerenderable.h @@ -140,6 +140,7 @@ protected: // Border properties::FloatProperty _borderWidth; properties::Vec3Property _borderColor; + properties::BoolProperty _borderFeather; properties::FloatProperty _scale; properties::FloatProperty _gammaOffset; @@ -149,7 +150,7 @@ protected: glm::ivec2 _objectSize = glm::ivec2(0); UniformCache(color, opacity, blackoutFactor, hue, value, saturation, mvpMatrix, tex, - backgroundColor, gamma, borderColor, borderWidth) _uniformCache; + backgroundColor, gamma, borderColor, borderWidth, borderFeather) _uniformCache; std::unique_ptr _shader; }; diff --git a/modules/base/shaders/screenspace_fs.glsl b/modules/base/shaders/screenspace_fs.glsl index 88be411afb..68402103a1 100644 --- a/modules/base/shaders/screenspace_fs.glsl +++ b/modules/base/shaders/screenspace_fs.glsl @@ -40,6 +40,7 @@ uniform float saturation; uniform float gamma = 1.0; uniform vec2 borderWidth = vec2(0.1); uniform vec3 borderColor = vec3(0.0); +uniform int borderFeather = 0; Fragment getFragment() { @@ -54,6 +55,13 @@ Fragment getFragment() { vs_st.y < borderWidth.y || vs_st.y > 1 - borderWidth.y) { frag.color = vec4(borderColor, opacity); + if (borderFeather == 1) { + vec2 f1 = vs_st / borderWidth; + float g1 = min(f1.x, f1.y); + vec2 f2 = (vec2(1) - vs_st) / borderWidth; + float g2 = min(f2.x, f2.y); + frag.color *= min(g1, g2); + } } if (frag.color.a == 0.0) { diff --git a/src/rendering/screenspacerenderable.cpp b/src/rendering/screenspacerenderable.cpp index 5e7e7ccb78..c2fc14d38a 100644 --- a/src/rendering/screenspacerenderable.cpp +++ b/src/rendering/screenspacerenderable.cpp @@ -169,6 +169,13 @@ namespace { openspace::properties::Property::Visibility::NoviceUser }; + constexpr openspace::properties::Property::PropertyInfo BorderFeatherInfo = { + "BorderFeather", + "Border Feather", + "If this value is enabled and a border width is set, the border will be rendered " + "as a feathered border rather than a hard corner." + }; + float wrap(float value, float min, float max) { return glm::mod(value - min, max - min) + min; } @@ -222,6 +229,9 @@ namespace { // [[codegen::verbatim(BorderColorInfo.description)]] std::optional borderColor [[codegen::color()]]; + // [[codegen::verbatim(BorderFeatherInfo.description)]] + std::optional borderFeather; + // [[codegen::verbatim(ScaleInfo.description)]] std::optional scale; @@ -318,6 +328,7 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary ) , _borderWidth(BorderWidthInfo, 0.f, 0.f, 1000.f) , _borderColor(BorderColorInfo, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(1.f)) + , _borderFeather(BorderFeatherInfo, false) , _scale(ScaleInfo, 0.25f, 0.f, 2.f) , _gammaOffset(GammaOffsetInfo, 0.f, -1.f, 10.f) , _multiplyColor(MultiplyColorInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) @@ -368,6 +379,7 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary addProperty(_borderColor); addProperty(_borderWidth); + addProperty(_borderFeather); _borderWidth = p.borderWidth.value_or(_borderWidth); @@ -667,6 +679,7 @@ void ScreenSpaceRenderable::draw(const glm::mat4& modelTransform, _shader->setUniform(_uniformCache.backgroundColor, _backgroundColor); _shader->setUniform(_uniformCache.borderWidth, borderUV); _shader->setUniform(_uniformCache.borderColor, _borderColor); + _shader->setUniform(_uniformCache.borderFeather, _borderFeather); _shader->setUniform( _uniformCache.mvpMatrix, global::renderEngine->scene()->camera()->viewProjectionMatrix() * modelTransform From 0b91fd26421f4ad526c4a3956ff481bf541e12be Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 14 Aug 2024 10:22:20 +0200 Subject: [PATCH 52/99] Global cleanup pass over asset files - Lua style guides - FrameConversions - unloadMission, Add mission identifiers --- data/assets/base_keybindings.asset | 1 + data/assets/default_keybindings.asset | 32 ++-- .../educational/scale/burj_khalifa.asset | 7 +- data/assets/examples/dashboarditems.asset | 1 + .../assets/examples/debugcoordinateaxes.asset | 1 + data/assets/examples/discs.asset | 1 + .../geojson/geojson_multiple_polygons.asset | 1 + data/assets/examples/globerotation.asset | 1 + data/assets/examples/globetranslation.asset | 1 + data/assets/examples/grids.asset | 9 +- data/assets/examples/joystickproperty.asset | 1 + data/assets/examples/navigationstate.asset | 2 +- data/assets/examples/nodeline.asset | 2 +- data/assets/examples/primitives.asset | 1 + .../pointcloud_colormappingsettings.asset | 1 - .../advanced/pointcloud_datamapping.asset | 1 - .../advanced/pointcloud_fading.asset | 1 - data/assets/examples/screenspacebrowser.asset | 1 + data/assets/examples/screenspacedate.asset | 1 - data/assets/examples/spheres.asset | 1 + data/assets/examples/statemachine.asset | 1 + .../assets/examples/terra_texture_spout.asset | 1 - data/assets/examples/urlsynchronization.asset | 8 +- data/assets/examples/video/videosphere.asset | 2 +- .../volume/generated/cartesiansequence.asset | 12 +- data/assets/global/localbookmarks.asset | 3 + data/assets/global/openspacebookmarks.asset | 4 + .../modules/skybrowser/hover_circle.asset | 2 + data/assets/nightsky/altaz.asset | 2 +- .../assets/nightsky/cardinal_directions.asset | 1 + data/assets/nightsky/ecliptic_band.asset | 6 +- data/assets/nightsky/equatorial_band.asset | 6 +- data/assets/nightsky/galactic_band.asset | 41 ++--- data/assets/nightsky/light_pollution.asset | 1 + data/assets/nightsky/meridian.asset | 1 - data/assets/nightsky/planets.asset | 2 +- data/assets/nightsky/zenith.asset | 1 + .../constellations/constellation_art.asset | 3 +- .../ceres/layers/colorlayers/lamo.asset | 1 + .../dwarf_planets/eris/trail.asset | 3 +- .../dwarf_planets/eris/transforms.asset | 4 +- .../dwarf_planets/gonggong/planet.asset | 3 +- .../dwarf_planets/gonggong/trail.asset | 3 +- .../dwarf_planets/makemake/trail.asset | 3 +- .../dwarf_planets/makemake/transforms.asset | 4 +- .../dwarf_planets/orcus/planet.asset | 3 +- .../dwarf_planets/orcus/trail.asset | 3 +- .../dwarf_planets/orcus/transforms.asset | 4 +- .../pluto/pluto_trail_kepler.asset | 1 - .../2012/sun_earth_2012_fieldlines_pfss.asset | 7 - .../bastille_day/fluxnodescutplane.asset | 1 + .../missions/apollo/11/apollo11.asset | 3 - .../missions/apollo/11/lem_flipbook.asset | 2 - .../missions/apollo/15/apollo15.asset | 1 + .../missions/apollo/17/bouldersstation2.asset | 1 + .../missions/apollo/17/bouldersstation6.asset | 3 - .../apollo/apollo_globebrowsing.asset | 2 + .../missions/apollo/insignias_map.asset | 19 +-- .../missions/artemis/kernels.asset | 1 - .../missions/artemis/mission.asset | 3 +- .../missions/bepicolombo/fov/bela.asset | 9 +- .../missions/bepicolombo/fov/hga.asset | 3 +- .../missions/bepicolombo/fov/mertis.asset | 9 +- .../missions/bepicolombo/fov/mgns.asset | 3 +- .../missions/bepicolombo/fov/mixs.asset | 6 +- .../missions/bepicolombo/fov/phebus.asset | 12 +- .../missions/bepicolombo/fov/serena.asset | 3 +- .../bepicolombo/fov/serena_anodes.asset | 97 ++++-------- .../missions/bepicolombo/fov/sibbiosys.asset | 42 ++---- .../missions/bepicolombo/fov/sixs.asset | 9 +- .../bepicolombo/fov/startracker.asset | 9 +- .../missions/bepicolombo/kernels.asset | 83 +---------- .../solarsystem/missions/dawn/dawn.asset | 1 - .../solarsystem/missions/insight/edl.asset | 1 + .../missions/juice/dashboard.asset | 1 + .../solarsystem/missions/juice/fov/gala.asset | 4 +- .../missions/juice/fov/janus.asset | 3 +- .../solarsystem/missions/juice/fov/jmc.asset | 6 +- .../missions/juice/fov/majis.asset | 21 +-- .../missions/juice/fov/navcam.asset | 3 +- .../solarsystem/missions/juice/fov/rime.asset | 6 +- .../missions/juice/fov/startracker.asset | 9 +- .../solarsystem/missions/juice/fov/swi.asset | 9 +- .../solarsystem/missions/juice/fov/uvs.asset | 3 +- .../solarsystem/missions/juno/kernels.asset | 3 +- .../missions/messenger/messenger.asset | 1 + .../missions/osirisrex/actions.asset | 1 + .../missions/osirisrex/model.asset | 1 + .../solarsystem/missions/rosetta/67p.asset | 1 - .../missions/voyager/mission.asset | 2 +- .../solarsystem/planets/base_layers.asset | 1 + .../solarsystem/planets/default_layers.asset | 1 - .../planets/earth/eclipse_shadow.asset | 3 + .../eclipses/corona/corona20170821.asset | 4 +- .../grid/earth_ecliptic_radial_grid.asset | 2 +- .../eclipses/grid/moon_radial_grid.asset | 2 +- .../planets/earth/lagrange_points/l4.asset | 1 - .../planets/earth/lagrange_points/l5.asset | 1 - .../colorlayers/definitions/noaa20.asset | 1 - .../colorlayers/definitions/noaa21.asset | 1 - .../layers/colorlayers/definitions/snpp.asset | 1 - .../esri_world_imagery_wayback.asset | 1 - .../earth/magnetosphere/magnetosphere.asset | 1 + .../transforms_magnetosphere.asset | 1 + .../nasa-treks/Apollo_15_Metric_Cam_DEM.asset | 4 + .../nasa-treks/Apollo_15_Pan_Cam_DEM.asset | 4 + .../Apollo_15_Pan_Cam_Image_Mosaic.asset | 4 + .../nasa-treks/Apollo_16_Metric_Cam_DEM.asset | 4 + .../nasa-treks/Apollo_17_Metric_Cam_DEM.asset | 4 + .../nasa-treks/Apollo_Zone_Metric_Cam.asset | 4 + .../Apollo_Zone_Metric_Cam_DEM.asset | 4 + .../earth/moon/nasa-treks/Global.asset | 4 + .../Kaguya_LGM2011_Freeair_Gravity.asset | 4 + .../Kaguya_LGM2011_Surface_Gravity.asset | 4 + .../nasa-treks/LOLA_Roughness_16ppd.asset | 4 + .../moon/nasa-treks/LOLA_Slope_16ppd.asset | 4 + .../LOLA_Slope_Northpole_120m.asset | 4 + .../LOLA_Slope_Southpole_120m.asset | 4 + .../LOLA_and_TC_Stereo_DEM_Merge_512ppd.asset | 4 + ..._of_Region_Inside_Schrodinger_Crater.asset | 4 + ...trolled_Mosaic_of_Schrodinger_Crater.asset | 4 + .../nasa-treks/LRO_Diviner_CF_Mosaic.asset | 4 + .../LRO_Diviner_CF_Mosaic_128ppd.asset | 4 + .../LRO_Diviner_Surface_Temp_Avg.asset | 4 + .../LRO_Diviner_Surface_Temp_Normal_Avg.asset | 4 + ...er_Surface_Temperature_Mosaic_128ppd.asset | 4 + .../earth/moon/nasa-treks/LRO_LOLA_DEM.asset | 4 + .../LRO_LROC_Crater_Abundance.asset | 4 + .../LRO_LROC_Crater_Abundance_Hazard.asset | 4 + .../nasa-treks/LRO_LROC_Crater_Density.asset | 4 + .../LRO_LROC_Crater_Density_Hazard.asset | 4 + .../earth/moon/nasa-treks/LRO_LROC_DEM.asset | 4 + .../nasa-treks/LRO_LROC_Image_Mosaic.asset | 4 + .../LRO_LROC_Image_Mosaic_26cm.asset | 4 + .../LRO_LROC_Image_Mosaic_28cm.asset | 4 + .../moon/nasa-treks/LRO_LROC_Mosaic.asset | 4 + .../LRO_LROC_NAC_Image_Mosaic.asset | 4 + .../nasa-treks/LRO_LROC_Rock_Abundance.asset | 4 + .../LRO_LROC_Rock_Abundance_Hazard.asset | 4 + .../nasa-treks/LRO_LROC_Rock_Density.asset | 4 + .../LRO_LROC_Rock_Density_Hazard.asset | 4 + .../moon/nasa-treks/LRO_Laser_Altimeter.asset | 4 + ..._Mini-RF_Circular_Polarization_Ratio.asset | 4 + .../nasa-treks/LRO_NAC_ColorHillshade.asset | 4 + .../moon/nasa-treks/LRO_NAC_Mosaic.asset | 4 + .../nasa-treks/LRO_NAC_Mosaic_0.5mpp.asset | 4 + .../moon/nasa-treks/LRO_NAC_Mosaic_1mpp.asset | 4 + .../nasa-treks/LRO_NAC_PSR_Mosaic_20mpp.asset | 4 + .../LRO_NAC_and_CE-2_CCD_Mosaic_1mpp.asset | 4 + .../nasa-treks/LRO_Narrow_Angle_Camera.asset | 4 + .../moon/nasa-treks/LRO_WAC-GLD100_DEM.asset | 4 + .../moon/nasa-treks/LRO_WAC_GLD100_DEM.asset | 4 + ..._Kaguya_Multi_Instruments_1895.21mpp.asset | 4 + .../communications/other_comm.asset | 1 + .../earth/satellites/weather/planet.asset | 1 + .../planets/jupiter/default_layers.asset | 1 + .../jupiter/europa/default_layers.asset | 1 - .../voyager_global_mosaic_local.asset | 1 + .../jupiter/europa/layers/local_layers.asset | 1 - .../europa/layers/newyork_layers.asset | 1 - .../jupiter/europa/layers/sweden_layers.asset | 1 - .../solarsystem/planets/jupiter/kernels.asset | 1 + .../planets/jupiter/minor/ananke_group.asset | 1 + .../jupiter/minor/pasiphae_group.asset | 1 + .../mars/layers/nasa-treks/MEX_HRSC.asset | 4 + .../layers/nasa-treks/MGS_MOC_Atlas.asset | 4 + .../mars/layers/nasa-treks/MGS_MOLA.asset | 4 + .../MGS_MOLA_and_Mars_Express_HRSC.asset | 4 + .../mars/layers/nasa-treks/MGS_TES.asset | 4 + .../layers/nasa-treks/MO_THEMIS-IR_Day.asset | 4 + .../nasa-treks/MO_THEMIS-IR_Night.asset | 4 + .../mars/layers/nasa-treks/MRO_CTX.asset | 4 + .../mars/layers/nasa-treks/MRO_HiRISE.asset | 4 + .../planets/mars/layers/nasa-treks/MSL.asset | 4 + .../layers/nasa-treks/Mars_Express_HRSC.asset | 4 + .../Mars_Reconnaissance_Orbiter_CTX.asset | 4 + .../planets/mars/layers/newyork_layers.asset | 1 - .../planets/mars/layers/sweden_layers.asset | 1 - .../planets/mars/layers/utah_layers.asset | 1 - .../planets/mercury/default_layers.asset | 1 - .../layers/colorlayers/mercury_texture.asset | 2 +- .../colorlayers/messenger_bdr_utah.asset | 6 +- .../heightlayers/messenger_dem_utah.asset | 2 + .../mercury/layers/nasa-treks/MSGR_MDIS.asset | 4 + .../layers/nasa-treks/MSGR_MDIS_Mosaic.asset | 4 + .../layers/nasa-treks/MSGR_MDIS_Slope.asset | 4 + .../mercury/layers/newyork_layers.asset | 1 - .../mercury/layers/sweden_layers.asset | 1 - .../planets/mercury/layers/utah_layers.asset | 1 - .../planets/neptune/nereid/nereid.asset | 7 +- .../neptune/triton/default_layers.asset | 1 + ...n_voyager2_clrmosaic_globalfill_600m.asset | 10 +- .../planets/neptune/triton/triton.asset | 7 +- .../solarsystem/planets/newyork_layers.asset | 1 - .../planets/saturn/dione/dione.asset | 1 - .../saturn/enceladus/default_layers.asset | 1 - .../planets/saturn/enceladus/enceladus.asset | 3 +- .../enceladus/layers/newyork_layers.asset | 1 - .../enceladus/layers/sweden_layers.asset | 1 - .../planets/saturn/hyperion/trail.asset | 7 +- .../planets/saturn/iapetus/iapetus.asset | 6 +- .../solarsystem/planets/saturn/kernels.asset | 1 + .../planets/saturn/kernels415.asset | 1 + .../planets/saturn/minor/gallic_group.asset | 12 +- .../planets/saturn/minor/inuit_group.asset | 24 +-- .../planets/saturn/minor/norse_group.asset | 141 ++++++------------ .../planets/saturn/minor/other_group.asset | 27 ++-- .../planets/saturn/minor/shepherd_group.asset | 23 +-- .../planets/saturn/rhea/rhea.asset | 3 +- .../planets/saturn/rhea/trail.asset | 7 +- .../planets/saturn/tethys/tethys.asset | 3 +- .../planets/saturn/tethys/trail.asset | 7 +- .../planets/saturn/titan/trail.asset | 7 +- .../solarsystem/planets/sweden_layers.asset | 1 - .../planets/uranus/inner_moons.asset | 40 ++--- .../uranus/irregular_prograde_moons.asset | 3 +- .../uranus/irregular_retrograde_moons.asset | 25 ++-- .../solarsystem/planets/uranus/kernels.asset | 1 + .../planets/uranus/major_moons.asset | 92 +++++++++--- .../solarsystem/planets/uranus/uranus.asset | 6 +- .../solarsystem/planets/utah_layers.asset | 1 - .../planets/venus/default_layers.asset | 1 - .../planets/venus/layers/newyork_layers.asset | 1 - .../planets/venus/layers/utah_layers.asset | 1 - .../solarsystem/planets/venus/trail.asset | 3 +- .../planets/venus/trail_barycenter.asset | 3 +- .../solarsystem/planets/venus/venus.asset | 6 +- .../telescopes/jwst/targets/crab.asset | 4 +- .../telescopes/jwst/targets/hh212.asset | 4 +- .../telescopes/jwst/targets/orion.asset | 4 +- .../jwst/targets/sn1987a_image.asset | 5 +- .../telescopes/jwst/timelapse.asset | 2 + .../solarsystem/telescopes/jwst/trail.asset | 21 +-- data/assets/util/debug_helper.asset | 1 + data/assets/util/joysticks/any-joystick.asset | 2 + .../joysticks/microsoft-xbox-360-pad.asset | 2 + data/assets/util/joysticks/ps4.asset | 2 + data/assets/util/joysticks/ps5.asset | 2 + .../space-mouse-compact-wireless.asset | 2 + .../util/joysticks/space-mouse-compact.asset | 2 + .../space-mouse-enterprise-wireless.asset | 2 + .../joysticks/space-mouse-enterprise.asset | 2 + .../assets/util/joysticks/xbox-wireless.asset | 2 + data/assets/util/joysticks/xbox.asset | 2 + 244 files changed, 752 insertions(+), 700 deletions(-) diff --git a/data/assets/base_keybindings.asset b/data/assets/base_keybindings.asset index 2339db9862..ce49ac2117 100644 --- a/data/assets/base_keybindings.asset +++ b/data/assets/base_keybindings.asset @@ -18,6 +18,7 @@ local TogglePlanetLabels = { IsLocal = false } + asset.onInitialize(function() openspace.action.registerAction(TogglePlanetLabels) openspace.bindKey("L", TogglePlanetLabels.Identifier) diff --git a/data/assets/default_keybindings.asset b/data/assets/default_keybindings.asset index 9e14ea494c..7137dfe9ff 100644 --- a/data/assets/default_keybindings.asset +++ b/data/assets/default_keybindings.asset @@ -15,7 +15,9 @@ local ToggleShutdown = { Identifier = "os.ToggleShutdown", Name = "Toggle shutdown", Command = "openspace.toggleShutdown()", - Documentation = "Toggles the shutdown that will stop OpenSpace after a grace period. Press again to cancel the shutdown during this period", + Documentation = [[ + Toggles the shutdown that will stop OpenSpace after a grace period. Press again to + cancel the shutdown during this period]], GuiPath = "/System", IsLocal = true } @@ -24,7 +26,8 @@ local TakeScreenshot = { Identifier = "os.TakeScreenshot", Name = "Take screenshot", Command = "openspace.takeScreenshot()", - Documentation = "Saves the contents of the screen to a file in the ${SCREENSHOTS} directory", + Documentation = [[Saves the contents of the screen to a file in the ${SCREENSHOTS} + directory]], GuiPath = "/System/Rendering", IsLocal = true } @@ -51,7 +54,8 @@ local ToggleRotationFriction = { Identifier = "os.ToggleRotationFriction", Name = "Toggle rotation friction", Command = propertyHelper.invert("NavigationHandler.OrbitalNavigator.Friction.RotationalFriction"), - Documentation = "Toggles the rotational friction of the camera. If it is disabled, the camera rotates around the focus object indefinitely", + Documentation = [[Toggles the rotational friction of the camera. If it is disabled, the + camera rotates around the focus object indefinitely]], GuiPath = "/Navigation", IsLocal = true } @@ -60,7 +64,8 @@ local ToggleZoomFriction = { Identifier = "os.ToggleZoomFriction", Name = "Toggle zoom friction", Command = propertyHelper.invert("NavigationHandler.OrbitalNavigator.Friction.ZoomFriction"), - Documentation = "Toggles the zoom friction of the camera. If it is disabled, the camera rises up from or closes in towards the focus object indefinitely", + Documentation = [[Toggles the zoom friction of the camera. If it is disabled, the camera + rises up from or closes in towards the focus object indefinitely]], GuiPath = "/Navigation", IsLocal = true } @@ -69,7 +74,8 @@ local ToggleRollFriction = { Identifier = "os.ToggleRollFriction", Name = "Toggle roll friction", Command = propertyHelper.invert("NavigationHandler.OrbitalNavigator.Friction.RollFriction"), - Documentation = "Toggles the roll friction of the camera. If it is disabled, the camera rolls around its own axis indefinitely", + Documentation = [[Toggles the roll friction of the camera. If it is disabled, the camera + rolls around its own axis indefinitely]], GuiPath = "/Navigation", IsLocal = true } @@ -84,7 +90,8 @@ local FadeToBlack = { openspace.setPropertyValueSingle("RenderEngine.BlackoutFactor", 1.0, 3) end ]], - Documentation = "Toggles the fade to black within 3 seconds or shows the rendering after 3 seconds", + Documentation = [[Toggles the fade to black within 3 seconds or shows the rendering + after 3 seconds]], GuiPath = "/Rendering", IsLocal = false } @@ -126,7 +133,8 @@ local NextDeltaStepInterpolate = { Identifier = "os.NextDeltaStepInterpolate", Name = "Next simulation time step (interpolate)", Command = "openspace.time.interpolateNextDeltaTimeStep()", - Documentation = "Smoothly interpolates the simulation speed to the next simulation time step, if one exists", + Documentation = [[Smoothly interpolates the simulation speed to the next simulation time + step, if one exists]], GuiPath = "/Time/Simulation Speed", IsLocal = true } @@ -135,7 +143,8 @@ local NextDeltaStepImmediate = { Identifier = "os.NextDeltaStepImmediate", Name = "Next simulation time step (immediate)", Command = "openspace.time.setNextDeltaTimeStep()", - Documentation = "Immediately set the simulation speed to the next simulation time step, if one exists", + Documentation = [[Immediately set the simulation speed to the next simulation time step, + if one exists]], GuiPath = "/Time/Simulation Speed", IsLocal = true } @@ -144,7 +153,8 @@ local PreviousDeltaStepInterpolate = { Identifier = "os.PreviousDeltaStepInterpolate", Name = "Previous simulation time step (interpolate)", Command = "openspace.time.interpolatePreviousDeltaTimeStep()", - Documentation = "Smoothly interpolates the simulation speed to the previous simulation time step, if one exists", + Documentation = [[Smoothly interpolates the simulation speed to the previous simulation + time step, if one exists]], GuiPath = "/Time/Simulation Speed", IsLocal = true } @@ -153,7 +163,8 @@ local PreviousDeltaStepImmediate = { Identifier = "os.PreviousDeltaStepImmediate", Name = "Previous simulation time step (immediate)", Command = "openspace.time.setPreviousDeltaTimeStep()", - Documentation = "Immediately set the simulation speed to the previous simulation time step, if one exists", + Documentation = [[Immediately set the simulation speed to the previous simulation time + step, if one exists]], GuiPath = "/Time/Simulation Speed", IsLocal = true } @@ -203,6 +214,7 @@ local ReloadGui = { IsLocal = true } + asset.onInitialize(function() openspace.action.registerAction(ToggleNativeUi) openspace.bindKey("F1", ToggleNativeUi.Identifier) diff --git a/data/assets/educational/scale/burj_khalifa.asset b/data/assets/educational/scale/burj_khalifa.asset index de8caf9ec4..5fee28a602 100644 --- a/data/assets/educational/scale/burj_khalifa.asset +++ b/data/assets/educational/scale/burj_khalifa.asset @@ -4,11 +4,10 @@ local sunAsset = asset.require("scene/solarsystem/sun/transforms") local modelFolder = asset.resource({ - Name = "Scale Burj Khalifa", - Type = "UrlSynchronization", + Name = "Scale Model Burj Khalifa", + Type = "HttpSynchronization", Identifier = "scale_model_burj_khalifa", - Url = "https://wms.openspace.amnh.org/static/sync/url/scalemodels/Burj_Khalifa.osmodel", - Filename = "Burj_Khalifa.osmodel" + Version = 1 }) diff --git a/data/assets/examples/dashboarditems.asset b/data/assets/examples/dashboarditems.asset index 14009061c1..0a9bee3b09 100644 --- a/data/assets/examples/dashboarditems.asset +++ b/data/assets/examples/dashboarditems.asset @@ -186,6 +186,7 @@ asset.export(ElapsedTime) asset.export(InputState) + asset.meta = { Name = "Dashboard Items Example", Description = [[Examples of different types of dashboard items. These are dynamic diff --git a/data/assets/examples/debugcoordinateaxes.asset b/data/assets/examples/debugcoordinateaxes.asset index 9300904891..c74c4628d4 100644 --- a/data/assets/examples/debugcoordinateaxes.asset +++ b/data/assets/examples/debugcoordinateaxes.asset @@ -121,6 +121,7 @@ asset.export(SunIAUAxes) asset.export(SolarSystemBarycenterAxes) + asset.meta = { Name = "Debug Coordinates", Description = [[A set of coordinate axes demonstrating different XYZ coordinate diff --git a/data/assets/examples/discs.asset b/data/assets/examples/discs.asset index 623312f3d0..f24420bd08 100644 --- a/data/assets/examples/discs.asset +++ b/data/assets/examples/discs.asset @@ -53,6 +53,7 @@ asset.export(BasicDisc) asset.export(FullEllipticDisc) + asset.meta = { Name = "Example Discs", Description = [[Examples of different types of rendered discs.]], diff --git a/data/assets/examples/geojson/geojson_multiple_polygons.asset b/data/assets/examples/geojson/geojson_multiple_polygons.asset index 1858e7b0af..5a55511cb7 100644 --- a/data/assets/examples/geojson/geojson_multiple_polygons.asset +++ b/data/assets/examples/geojson/geojson_multiple_polygons.asset @@ -51,6 +51,7 @@ asset.export(ExamplePolygon) asset.export(ExamplePolygonDiffHeights) + asset.meta = { Name = "GeoJson Example - Multiple Polygons", Description = [[GeoJson example asset with multiple polygons]], diff --git a/data/assets/examples/globerotation.asset b/data/assets/examples/globerotation.asset index d3a09f2d7a..58f7ab0dfc 100644 --- a/data/assets/examples/globerotation.asset +++ b/data/assets/examples/globerotation.asset @@ -58,6 +58,7 @@ end) asset.export(ExampleGlobeRotation) + asset.meta = { Name = "GlobeRotation Example", Description = [[An example that demonstrates how to load a 3D model from a geometry diff --git a/data/assets/examples/globetranslation.asset b/data/assets/examples/globetranslation.asset index 781294a543..ec71e979d7 100644 --- a/data/assets/examples/globetranslation.asset +++ b/data/assets/examples/globetranslation.asset @@ -76,6 +76,7 @@ asset.export(ExampleFixedHeight) asset.export(ExampleAdaptiveHeight) + asset.meta = { Name = "GlobeTranslation Example", Description = [[An example that demonstrates how to place an object on a planet surface diff --git a/data/assets/examples/grids.asset b/data/assets/examples/grids.asset index 66d7a91941..4c51b3d8c5 100644 --- a/data/assets/examples/grids.asset +++ b/data/assets/examples/grids.asset @@ -19,7 +19,7 @@ local RadialGrid = { }, GUI = { Name = "Example Radial Grid", - Description = [[A circular 2D grid, with segments based on the radius and angle.]], + Description = "A circular 2D grid, with segments based on the radius and angle.", Path = "/Examples/Grids" } } @@ -44,7 +44,7 @@ local PlanarGrid = { }, GUI = { Name = "Example Grid", - Description = [[A basic 2D grid, with a given size and number of segments.]], + Description = "A basic 2D grid, with a given size and number of segments.", Path = "/Examples/Grids" } } @@ -65,7 +65,7 @@ local SphericalGrid = { }, GUI = { Name = "Example Spherical Grid", - Description = [[A grid in the form of a 3D sphere.]], + Description = "A grid in the form of a 3D sphere.", Path = "/Examples/Grids" } } @@ -87,7 +87,7 @@ local BoxGrid = { }, GUI = { Name = "Example Box Grid", - Description = [[A grid in the form of a 3D box.]], + Description = "A grid in the form of a 3D box.", Path = "/Examples/Grids" } } @@ -113,6 +113,7 @@ asset.export(SphericalGrid) asset.export(BoxGrid) + asset.meta = { Name = "Example Grids", Description = [[Examples of different types of rendered grids.]], diff --git a/data/assets/examples/joystickproperty.asset b/data/assets/examples/joystickproperty.asset index 1d4db7ae37..9090545b14 100644 --- a/data/assets/examples/joystickproperty.asset +++ b/data/assets/examples/joystickproperty.asset @@ -96,6 +96,7 @@ asset.onInitialize(function() end) + asset.meta = { Name = "Joystick example", Description = [[Example asset that binds a joystick to use for input and navigation. diff --git a/data/assets/examples/navigationstate.asset b/data/assets/examples/navigationstate.asset index da04d88241..4fc351ee27 100644 --- a/data/assets/examples/navigationstate.asset +++ b/data/assets/examples/navigationstate.asset @@ -18,7 +18,7 @@ local FlipUpsideDown = { Up = {0.0, 0.0, -1.0} } -- Set the navigation state with the new navigation state variable - openspace.navigation.setNavigationState(newNavState) + openspace.navigation.setNavigationState(newNavState) ]], GUI = { Name = "Basic", diff --git a/data/assets/examples/nodeline.asset b/data/assets/examples/nodeline.asset index e1f5887291..91f8319822 100644 --- a/data/assets/examples/nodeline.asset +++ b/data/assets/examples/nodeline.asset @@ -15,7 +15,7 @@ local RenderableNodeLineExample = { GUI = { Name = "RenderableNodeLine - Basic", Path = "/Examples", - Description = [[Draws a line between two nodes in the scene.]] + Description = "Draws a line between two nodes in the scene." } } diff --git a/data/assets/examples/primitives.asset b/data/assets/examples/primitives.asset index fb2c77c00e..3e2cb1432f 100644 --- a/data/assets/examples/primitives.asset +++ b/data/assets/examples/primitives.asset @@ -59,6 +59,7 @@ asset.export(Circle) asset.export(Ellipse) + asset.meta = { Name = "Primitives Example", Description = [[Examples of different simple rendered primitives, such as circles diff --git a/data/assets/examples/renderable/renderablepointcloud/advanced/pointcloud_colormappingsettings.asset b/data/assets/examples/renderable/renderablepointcloud/advanced/pointcloud_colormappingsettings.asset index a2403cde01..b706e69db2 100644 --- a/data/assets/examples/renderable/renderablepointcloud/advanced/pointcloud_colormappingsettings.asset +++ b/data/assets/examples/renderable/renderablepointcloud/advanced/pointcloud_colormappingsettings.asset @@ -60,7 +60,6 @@ local Node = { } } - asset.onInitialize(function() openspace.addSceneGraphNode(Node) end) diff --git a/data/assets/examples/renderable/renderablepointcloud/advanced/pointcloud_datamapping.asset b/data/assets/examples/renderable/renderablepointcloud/advanced/pointcloud_datamapping.asset index c2a5d8e213..dbdefec9c8 100644 --- a/data/assets/examples/renderable/renderablepointcloud/advanced/pointcloud_datamapping.asset +++ b/data/assets/examples/renderable/renderablepointcloud/advanced/pointcloud_datamapping.asset @@ -43,7 +43,6 @@ local Node = { } } - asset.onInitialize(function() openspace.addSceneGraphNode(Node) end) diff --git a/data/assets/examples/renderable/renderablepointcloud/advanced/pointcloud_fading.asset b/data/assets/examples/renderable/renderablepointcloud/advanced/pointcloud_fading.asset index 82ac22be0d..48d3aa493a 100644 --- a/data/assets/examples/renderable/renderablepointcloud/advanced/pointcloud_fading.asset +++ b/data/assets/examples/renderable/renderablepointcloud/advanced/pointcloud_fading.asset @@ -57,7 +57,6 @@ local Node_Invert = { } } - asset.onInitialize(function() openspace.addSceneGraphNode(Node) openspace.addSceneGraphNode(Node_Invert) diff --git a/data/assets/examples/screenspacebrowser.asset b/data/assets/examples/screenspacebrowser.asset index c378622c86..651c905055 100644 --- a/data/assets/examples/screenspacebrowser.asset +++ b/data/assets/examples/screenspacebrowser.asset @@ -17,6 +17,7 @@ end) asset.export(Browser) + asset.meta = { Name = "ScreenSpaceBrowser Example", Description = [[Example of how to load and show a webpage in the rendering. The loaded diff --git a/data/assets/examples/screenspacedate.asset b/data/assets/examples/screenspacedate.asset index 4b3b154ce6..1411707622 100644 --- a/data/assets/examples/screenspacedate.asset +++ b/data/assets/examples/screenspacedate.asset @@ -21,7 +21,6 @@ asset.onInitialize(function() openspace.addScreenSpaceRenderable(Dashboard) openspace.setPropertyValueSingle("ScreenSpace.ScreenSpaceTime.Size", {0.000000,0.000000,640.000000,320.000000}) - end) asset.onDeinitialize(function() diff --git a/data/assets/examples/spheres.asset b/data/assets/examples/spheres.asset index 1231b6dcdd..4c7b834604 100644 --- a/data/assets/examples/spheres.asset +++ b/data/assets/examples/spheres.asset @@ -51,6 +51,7 @@ for _, n in ipairs(spheres) do end + asset.meta = { Name = "Spheres Example", Description = [[Example showing how to render textured spheres in 3D space. Some diff --git a/data/assets/examples/statemachine.asset b/data/assets/examples/statemachine.asset index 9d42e605c8..46253d3957 100644 --- a/data/assets/examples/statemachine.asset +++ b/data/assets/examples/statemachine.asset @@ -73,6 +73,7 @@ asset.onInitialize(function() end) + asset.meta = { Name = "State Machine", Description = [[Example of how to create a state machine in OpenSpace, where each diff --git a/data/assets/examples/terra_texture_spout.asset b/data/assets/examples/terra_texture_spout.asset index 74c0d97754..a026a0b1cc 100644 --- a/data/assets/examples/terra_texture_spout.asset +++ b/data/assets/examples/terra_texture_spout.asset @@ -14,7 +14,6 @@ asset.onInitialize(function() openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", Layer) end) - asset.onDeinitialize(function() openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", Layer) end) diff --git a/data/assets/examples/urlsynchronization.asset b/data/assets/examples/urlsynchronization.asset index cddb53ee19..e2139a84bf 100644 --- a/data/assets/examples/urlsynchronization.asset +++ b/data/assets/examples/urlsynchronization.asset @@ -20,17 +20,12 @@ asset.resource({ Type = "UrlSynchronization", Identifier = "example_large", Url = { - "http://speedtest.tele2.net/1GB.zip", "http://speedtest.tele2.net/100MB.zip", - "https://proof.ovh.net/files/1Gb.dat", "https://proof.ovh.net/files/100Mb.dat", - "https://speed.hetzner.de/1GB.bin", "https://speed.hetzner.de/100MB.bin", - "http://ipv4.download.thinkbroadband.com/1GB.zip", - "http://ipv4.download.thinkbroadband.com/512MB.zip", "http://ipv4.download.thinkbroadband.com/200MB.zip", "http://ipv4.download.thinkbroadband.com/100MB.zip", "http://ipv4.download.thinkbroadband.com/50MB.zip", @@ -56,11 +51,12 @@ asset.resource({ Name = "Example No Hash", Type = "UrlSynchronization", Identifier = "no_hash", - Url = "http://wms.itn.liu.se/Mercury/Messenger_Mosaic/Messenger_Mosaic.wms", + Url = "http://liu-se.wms.openspaceproject.com/Mercury/Messenger_Mosaic/Messenger_Mosaic.wms", UseHash = false }) + asset.meta = { Name = "UrlSynchronization", Description = [[Example showing how to load resources (any type of data file) from diff --git a/data/assets/examples/video/videosphere.asset b/data/assets/examples/video/videosphere.asset index 6278994676..2e658633d8 100644 --- a/data/assets/examples/video/videosphere.asset +++ b/data/assets/examples/video/videosphere.asset @@ -18,7 +18,7 @@ local Sphere = { asset.onInitialize(function() - openspace.addSceneGraphNode(Sphere) + openspace.addSceneGraphNode(Sphere) end) asset.onDeinitialize(function() diff --git a/data/assets/examples/volume/generated/cartesiansequence.asset b/data/assets/examples/volume/generated/cartesiansequence.asset index b45e1cc17f..406ed9c387 100644 --- a/data/assets/examples/volume/generated/cartesiansequence.asset +++ b/data/assets/examples/volume/generated/cartesiansequence.asset @@ -11,6 +11,12 @@ local SunRadius = 695508000 local Volume = { Identifier = "GeneratedVolumeCartesianSequence", Parent = transforms.SolarSystemBarycenter.Identifier, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 1000 * SunRadius + } + }, Renderable = { Type = "RenderableTimeVaryingVolume", SourceDirectory = asset.resource("cartesiansequence"), @@ -24,12 +30,6 @@ local Volume = { }, GUI = { Path = "/Examples" - }, - Transform = { - Scale = { - Type = "StaticScale", - Scale = 1000 * SunRadius - } } } diff --git a/data/assets/global/localbookmarks.asset b/data/assets/global/localbookmarks.asset index f616ff2d76..93888ace92 100644 --- a/data/assets/global/localbookmarks.asset +++ b/data/assets/global/localbookmarks.asset @@ -4,6 +4,8 @@ local bookmarkHelper = asset.require("util/generate_bookmarks") -- ensure that it is loaded first asset.require("scene/solarsystem/planets/earth/earth") + + local localBookmarks = openspace.absPath("${USER}/bookmarks/localbookmarks.csv") local bookmarksDirectory = openspace.absPath("${USER}/bookmarks") @@ -29,6 +31,7 @@ local nodes = bookmarkHelper.loadBookmarks( "${USER}/bookmarks/localbookmarks.csv" ) + asset.onInitialize(function() for _, n in ipairs(nodes) do local success, error = pcall(openspace.addSceneGraphNode, n) diff --git a/data/assets/global/openspacebookmarks.asset b/data/assets/global/openspacebookmarks.asset index 5cc6ec1214..18d615397d 100644 --- a/data/assets/global/openspacebookmarks.asset +++ b/data/assets/global/openspacebookmarks.asset @@ -1,5 +1,7 @@ local bookmarkHelper = asset.require("util/generate_bookmarks") + + local dataProvider = "http://data.openspaceproject.com/files/bookmarks/v3/bookmarks.csv" local bookmarksCSV = asset.resource({ @@ -11,8 +13,10 @@ local bookmarksCSV = asset.resource({ Url = dataProvider }) + local nodes = {} + asset.onInitialize(function() nodes = bookmarkHelper.loadBookmarks("OpenSpace Bookmarks", bookmarksCSV .. "bookmarks.csv") for _, n in ipairs(nodes) do diff --git a/data/assets/modules/skybrowser/hover_circle.asset b/data/assets/modules/skybrowser/hover_circle.asset index 2ee4e00790..bd1123c9a9 100644 --- a/data/assets/modules/skybrowser/hover_circle.asset +++ b/data/assets/modules/skybrowser/hover_circle.asset @@ -1,5 +1,7 @@ local transforms = asset.require("scene/solarsystem/sun/transforms") + + local imageFolder = asset.resource({ Name = "Hover Circle Image", Type = "HttpSynchronization", diff --git a/data/assets/nightsky/altaz.asset b/data/assets/nightsky/altaz.asset index 9c6fe16962..1ec3c7f65b 100644 --- a/data/assets/nightsky/altaz.asset +++ b/data/assets/nightsky/altaz.asset @@ -62,7 +62,6 @@ local AltAzGrid = { } } - local ShowAltaz = { Identifier = "os.nightsky.ShowAltaz", Name = "Show Alt/Az grid", @@ -102,6 +101,7 @@ local ToggleAltaz = { IsLocal = false } + asset.onInitialize(function() openspace.addSceneGraphNode(AltAzGridPosition) openspace.addSceneGraphNode(AltAzGrid) diff --git a/data/assets/nightsky/cardinal_directions.asset b/data/assets/nightsky/cardinal_directions.asset index a8c0afb512..026bc3ca2c 100644 --- a/data/assets/nightsky/cardinal_directions.asset +++ b/data/assets/nightsky/cardinal_directions.asset @@ -129,6 +129,7 @@ local HideNesw = { IsLocal = false } + asset.onInitialize(function() openspace.addSceneGraphNode(CardinalDirectionsPosition) openspace.addSceneGraphNode(CardinalDirectionSphere) diff --git a/data/assets/nightsky/ecliptic_band.asset b/data/assets/nightsky/ecliptic_band.asset index b67dd33c4a..f2f268c274 100644 --- a/data/assets/nightsky/ecliptic_band.asset +++ b/data/assets/nightsky/ecliptic_band.asset @@ -11,9 +11,9 @@ local textures = asset.resource({ local EclipticRotationMatrix = { - -0.05487554, 0.4941095, -0.8676661, - -0.9938214, -0.1109906, -0.0003515167, - -0.09647644, 0.8622859, 0.4971472 + -0.05487554, 0.4941095, -0.8676661, + -0.9938214, -0.1109906, -0.0003515167, + -0.09647644, 0.8622859, 0.4971472 } local EclipticLine = { diff --git a/data/assets/nightsky/equatorial_band.asset b/data/assets/nightsky/equatorial_band.asset index 1fb892ddea..b72e01e5df 100644 --- a/data/assets/nightsky/equatorial_band.asset +++ b/data/assets/nightsky/equatorial_band.asset @@ -3,9 +3,9 @@ local transforms = asset.require("scene/solarsystem/sun/transforms") local EquatorialRotationMatrix = { - -0.05487554, 0.4941095, -0.8676661, - -0.8734371, -0.4448296, -0.1980764, - -0.483835, 0.7469823, 0.4559838 + -0.05487554, 0.4941095, -0.8676661, + -0.8734371, -0.4448296, -0.1980764, + -0.483835, 0.7469823, 0.4559838 } diff --git a/data/assets/nightsky/galactic_band.asset b/data/assets/nightsky/galactic_band.asset index 14a36db686..79752a29aa 100644 --- a/data/assets/nightsky/galactic_band.asset +++ b/data/assets/nightsky/galactic_band.asset @@ -3,27 +3,27 @@ local transforms = asset.require("scene/solarsystem/sun/transforms") local GalacticLine = { - Identifier = "GalacticLine", - Parent = transforms.SolarSystemBarycenter.Name, - Transform = { - Scale = { - Type = "StaticScale", - Scale = 9.46377307652E18 - } - }, - Renderable = { - Type = "RenderableRadialGrid", - Opacity = 0.8, - Color = { 0.08, 0.40, 0.40 }, - LineWidth = 4.0, - GridSegments = { 1, 1 }, - Enabled = asset.enabled - }, - GUI = { - Name = "Galactic Equator", - Description = "A line representation of the Galactic Equator plane.", - Path = "/Night Sky/Coordinate Systems/Galactic" + Identifier = "GalacticLine", + Parent = transforms.SolarSystemBarycenter.Name, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 9.46377307652E18 } + }, + Renderable = { + Type = "RenderableRadialGrid", + Opacity = 0.8, + Color = { 0.08, 0.40, 0.40 }, + LineWidth = 4.0, + GridSegments = { 1, 1 }, + Enabled = asset.enabled + }, + GUI = { + Name = "Galactic Equator", + Description = "A line representation of the Galactic Equator plane.", + Path = "/Night Sky/Coordinate Systems/Galactic" + } } @@ -58,6 +58,7 @@ local ToggleGalacticBand = { IsLocal = false } + asset.onInitialize(function() openspace.addSceneGraphNode(GalacticLine) openspace.action.registerAction(ShowGalacticBand) diff --git a/data/assets/nightsky/light_pollution.asset b/data/assets/nightsky/light_pollution.asset index c8f7269839..e4f502c0c8 100644 --- a/data/assets/nightsky/light_pollution.asset +++ b/data/assets/nightsky/light_pollution.asset @@ -254,6 +254,7 @@ asset.export("SetLightPollutionLevel9", SetLightPollutionLevel9.Identifier) asset.export("UndoLightPollution", UndoLightPollution.Identifier) + asset.meta = { Name = "Light Pollution", Description = [[Includes a sphere used to simulate the effect of light pollution on diff --git a/data/assets/nightsky/meridian.asset b/data/assets/nightsky/meridian.asset index e855406882..df007e1367 100644 --- a/data/assets/nightsky/meridian.asset +++ b/data/assets/nightsky/meridian.asset @@ -80,7 +80,6 @@ local HideMeridian = { IsLocal = false } - local ToggleMeridian = { Identifier = "os.nightsky.ToggleMeridian", Name = "Toggle local meridian", diff --git a/data/assets/nightsky/planets.asset b/data/assets/nightsky/planets.asset index 13d88df45f..5d44a0328a 100644 --- a/data/assets/nightsky/planets.asset +++ b/data/assets/nightsky/planets.asset @@ -154,7 +154,6 @@ local HideNightSkyPlanets = { IsLocal = false } - local ToggleNightSkyPlanets = { Identifier = "os.nightsky.ToggleNightSkyPlanets", Name = "Toggle night sky planets", @@ -176,6 +175,7 @@ local ToggleNightSkyPlanets = { IsLocal = false } + asset.onInitialize(function() openspace.addSceneGraphNode(Mercury) openspace.addSceneGraphNode(Venus) diff --git a/data/assets/nightsky/zenith.asset b/data/assets/nightsky/zenith.asset index ddbdd3a760..1104c34124 100644 --- a/data/assets/nightsky/zenith.asset +++ b/data/assets/nightsky/zenith.asset @@ -106,6 +106,7 @@ local ToggleZenith = { IsLocal = false } + asset.onInitialize(function() openspace.addSceneGraphNode(ZenithPosition) openspace.addSceneGraphNode(ZenithDot) diff --git a/data/assets/scene/milkyway/constellations/constellation_art.asset b/data/assets/scene/milkyway/constellations/constellation_art.asset index f9f4e25d66..efc0cef81e 100644 --- a/data/assets/scene/milkyway/constellations/constellation_art.asset +++ b/data/assets/scene/milkyway/constellations/constellation_art.asset @@ -97,7 +97,6 @@ local function createConstellations(baseIdentifier, guiPath, constellationfile) return genConstellations end - local ShowArt = { Identifier = "os.constellation_art.ShowArt", Name = "Show all", @@ -192,6 +191,8 @@ asset.export("DisableArtAction", DisableArt.Identifier) asset.export("ShowZodiacArt", ShowZodiacArt.Identifier) asset.export("HideZodiacArt", HideZodiacArt.Identifier) + + asset.meta = { Name = "Constellation Images", Description = "Artistic images depicting the constellations", diff --git a/data/assets/scene/solarsystem/dwarf_planets/ceres/layers/colorlayers/lamo.asset b/data/assets/scene/solarsystem/dwarf_planets/ceres/layers/colorlayers/lamo.asset index af497bcfd3..e661aaba8f 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/ceres/layers/colorlayers/lamo.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/ceres/layers/colorlayers/lamo.asset @@ -22,6 +22,7 @@ end) asset.export("layer", Layer) + asset.meta = { Name = "LAMO [Sweden]", Description = [[]], diff --git a/data/assets/scene/solarsystem/dwarf_planets/eris/trail.asset b/data/assets/scene/solarsystem/dwarf_planets/eris/trail.asset index 0f9b20b8ee..418a202e70 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/eris/trail.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/eris/trail.asset @@ -18,8 +18,7 @@ local Trail = { Tag = { "planetTrail_dwarf" }, GUI = { Name = "Eris Trail", - Path = "/Solar System/Dwarf Planets/Eris", - Description = "Trail of Eris" + Path = "/Solar System/Dwarf Planets/Eris" } } diff --git a/data/assets/scene/solarsystem/dwarf_planets/eris/transforms.asset b/data/assets/scene/solarsystem/dwarf_planets/eris/transforms.asset index 6837a7d0ff..4370649bc3 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/eris/transforms.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/eris/transforms.asset @@ -30,11 +30,11 @@ local Position = { asset.onInitialize(function() - openspace.addSceneGraphNode(Position) + openspace.addSceneGraphNode(Position) end) asset.onDeinitialize(function() - openspace.removeSceneGraphNode(Position) + openspace.removeSceneGraphNode(Position) end) asset.export("Translation", Translation) diff --git a/data/assets/scene/solarsystem/dwarf_planets/gonggong/planet.asset b/data/assets/scene/solarsystem/dwarf_planets/gonggong/planet.asset index b7fd1f842c..85699046f8 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/gonggong/planet.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/gonggong/planet.asset @@ -18,8 +18,7 @@ local Planet = { }, GUI = { Name = "Gonggong", - Path = "/Solar System/Dwarf Planets/Gonggong", - Description = "Globe of Gonggong" + Path = "/Solar System/Dwarf Planets/Gonggong" } } diff --git a/data/assets/scene/solarsystem/dwarf_planets/gonggong/trail.asset b/data/assets/scene/solarsystem/dwarf_planets/gonggong/trail.asset index 5ad73424fb..940fde7b9e 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/gonggong/trail.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/gonggong/trail.asset @@ -18,8 +18,7 @@ local Trail = { Tag = { "planetTrail_dwarf" }, GUI = { Name = "Gonggong Trail", - Path = "/Solar System/Dwarf Planets/Gonggong", - Description = "Trail of Gonggong" + Path = "/Solar System/Dwarf Planets/Gonggong" } } diff --git a/data/assets/scene/solarsystem/dwarf_planets/makemake/trail.asset b/data/assets/scene/solarsystem/dwarf_planets/makemake/trail.asset index 2f2fa27da4..d9f8506ee1 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/makemake/trail.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/makemake/trail.asset @@ -18,8 +18,7 @@ local Trail = { Tag = { "planetTrail_dwarf" }, GUI = { Name = "Makemake Trail", - Path = "/Solar System/Dwarf Planets/Makemake", - Description = "Trail of Makemake" + Path = "/Solar System/Dwarf Planets/Makemake" } } diff --git a/data/assets/scene/solarsystem/dwarf_planets/makemake/transforms.asset b/data/assets/scene/solarsystem/dwarf_planets/makemake/transforms.asset index 54d44a56d2..ebc89a82d6 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/makemake/transforms.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/makemake/transforms.asset @@ -31,11 +31,11 @@ local Position = { asset.onInitialize(function() - openspace.addSceneGraphNode(Position) + openspace.addSceneGraphNode(Position) end) asset.onDeinitialize(function() - openspace.removeSceneGraphNode(Position) + openspace.removeSceneGraphNode(Position) end) asset.export("Translation", Translation) diff --git a/data/assets/scene/solarsystem/dwarf_planets/orcus/planet.asset b/data/assets/scene/solarsystem/dwarf_planets/orcus/planet.asset index 5b88e83636..97aeb7abc6 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/orcus/planet.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/orcus/planet.asset @@ -19,8 +19,7 @@ local Planet = { }, GUI = { Name = "Orcus", - Path = "/Solar System/Dwarf Planets/Orcus", - Description = "Globe of Orcus" + Path = "/Solar System/Dwarf Planets/Orcus" } } diff --git a/data/assets/scene/solarsystem/dwarf_planets/orcus/trail.asset b/data/assets/scene/solarsystem/dwarf_planets/orcus/trail.asset index a2a57f1733..185e661178 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/orcus/trail.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/orcus/trail.asset @@ -18,8 +18,7 @@ local Trail = { Tag = { "planetTrail_dwarf" }, GUI = { Name = "Orcus Trail", - Path = "/Solar System/Dwarf Planets/Orcus", - Description = "Trail of Orcus" + Path = "/Solar System/Dwarf Planets/Orcus" } } diff --git a/data/assets/scene/solarsystem/dwarf_planets/orcus/transforms.asset b/data/assets/scene/solarsystem/dwarf_planets/orcus/transforms.asset index 72c414270f..388d13f9e9 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/orcus/transforms.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/orcus/transforms.asset @@ -31,11 +31,11 @@ local Position = { asset.onInitialize(function() - openspace.addSceneGraphNode(Position) + openspace.addSceneGraphNode(Position) end) asset.onDeinitialize(function() - openspace.removeSceneGraphNode(Position) + openspace.removeSceneGraphNode(Position) end) asset.export("Translation", Translation) diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail_kepler.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail_kepler.asset index 37406804ca..e0ff0f1342 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail_kepler.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail_kepler.asset @@ -4,7 +4,6 @@ local transforms = asset.require("scene/solarsystem/sun/transforms") local AU = 1.496e+8 - local PlutoKeplerianTrail = { Identifier = "PlutoKeplerianTrail", Parent = transforms.SunEclipJ2000.Identifier, diff --git a/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_pfss.asset b/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_pfss.asset index 844f5f0207..9c3d4b2d67 100644 --- a/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_pfss.asset +++ b/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_pfss.asset @@ -78,14 +78,7 @@ local PFSS = { asset.onInitialize(function() openspace.action.registerAction(DarkSun) - openspace.addSceneGraphNode(PFSS) - - -- openspace.setPropertyValueSingle("Scene.FL_PFSS.Renderable.FlowEnabled", true) - -- openspace.setPropertyValueSingle("Scene.FL_PFSS.Renderable.Flow.Reversed", true) - --openspace.setPropertyValueSingle("Scene.FL_PFSS.Renderable.Flow.particleSize", 5) - --openspace.setPropertyValueSingle("Scene.FL_PFSS.Renderable.Flow.particleSpacing", 250) - --openspace.setPropertyValueSingle("Scene.FL_PFSS.Renderable.Flow.speed", 75.0) end) asset.onDeinitialize(function() diff --git a/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodescutplane.asset b/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodescutplane.asset index 37893aad5a..5746496ed9 100644 --- a/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodescutplane.asset +++ b/data/assets/scene/solarsystem/heliosphere/bastille_day/fluxnodescutplane.asset @@ -100,6 +100,7 @@ local ToggleEquatorial = { GuiPath = "/Bastille-Day 2000", IsLocal = false } + local ToggleMeridial = { Identifier = "os.bastilleday.fluxnodescutplane.ToggleMeridial", Name = "Toggle meridial cutplane", diff --git a/data/assets/scene/solarsystem/missions/apollo/11/apollo11.asset b/data/assets/scene/solarsystem/missions/apollo/11/apollo11.asset index aa059a69ba..f41ca6553d 100644 --- a/data/assets/scene/solarsystem/missions/apollo/11/apollo11.asset +++ b/data/assets/scene/solarsystem/missions/apollo/11/apollo11.asset @@ -105,7 +105,6 @@ local Apollo11MoonTrail = { } } - local lemTranslation = { Type = "TimelineTranslation", Keyframes = { @@ -130,8 +129,6 @@ local lemRotation = { Keyframes = descentRotationKeyframes.keyframes } - - local Apollo11LemTrail = { Identifier = "Apollo11LemTrail", Parent = moonTransforms.Moon.Identifier, diff --git a/data/assets/scene/solarsystem/missions/apollo/11/lem_flipbook.asset b/data/assets/scene/solarsystem/missions/apollo/11/lem_flipbook.asset index 58f1aba6c4..bedc3c2b69 100644 --- a/data/assets/scene/solarsystem/missions/apollo/11/lem_flipbook.asset +++ b/data/assets/scene/solarsystem/missions/apollo/11/lem_flipbook.asset @@ -17,7 +17,6 @@ local vrts = asset.resource({ }) - asset.onInitialize(function() openspace.globebrowsing.addBlendingLayersFromDirectory(vrts, assetGlobe) flipbook = helper.createFlipbook(assetPrefix, assetGlobe, 19) @@ -43,7 +42,6 @@ asset.onInitialize(function() }) end) - asset.onDeinitialize(function() flipbook = nil diff --git a/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset b/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset index 5c52ec3b03..233a597e03 100644 --- a/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset +++ b/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset @@ -72,6 +72,7 @@ local Apollo15Trail = { } } + asset.onInitialize(function() openspace.addSceneGraphNode(Apollo15) openspace.addSceneGraphNode(Apollo15Trail) diff --git a/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation2.asset b/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation2.asset index c082eaac53..074b3dc905 100644 --- a/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation2.asset +++ b/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation2.asset @@ -158,6 +158,7 @@ local Station2Boulder3Model = { } } + asset.onInitialize(function() openspace.addSceneGraphNode(Station2Boulder1Holder) openspace.addSceneGraphNode(Station2Boulder1Model) diff --git a/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation6.asset b/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation6.asset index b971c3dbe2..5cbe8f72f5 100644 --- a/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation6.asset +++ b/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation6.asset @@ -68,8 +68,6 @@ local Station6Frag1Model = { } } - - local Station6Frag23Holder = { Identifier = "Station_6_Fragments_2_3", Parent = moonAsset.Moon.Identifier, @@ -79,7 +77,6 @@ local Station6Frag23Holder = { } } - local Station6Frag2Model = { Identifier = "A17S6F5", Parent = Station6Frag23Holder.Identifier, diff --git a/data/assets/scene/solarsystem/missions/apollo/apollo_globebrowsing.asset b/data/assets/scene/solarsystem/missions/apollo/apollo_globebrowsing.asset index e5333e8134..a32046950d 100644 --- a/data/assets/scene/solarsystem/missions/apollo/apollo_globebrowsing.asset +++ b/data/assets/scene/solarsystem/missions/apollo/apollo_globebrowsing.asset @@ -5,6 +5,7 @@ local moon = asset.require("scene/solarsystem/planets/earth/moon/moon") asset.require("scene/solarsystem/planets/earth/moon/default_layers") + local heightmaps = asset.resource({ Name = "Apollo Globebrowsing Heightmaps", Type = "HttpSynchronization", @@ -64,6 +65,7 @@ local DisableApolloSites = { IsLocal = false } + asset.onInitialize(function() openspace.globebrowsing.addBlendingLayersFromDirectory(heightmaps, moon.Moon.Identifier) openspace.globebrowsing.addBlendingLayersFromDirectory(basemaps, moon.Moon.Identifier) diff --git a/data/assets/scene/solarsystem/missions/apollo/insignias_map.asset b/data/assets/scene/solarsystem/missions/apollo/insignias_map.asset index e6771b3c80..ab1828e639 100644 --- a/data/assets/scene/solarsystem/missions/apollo/insignias_map.asset +++ b/data/assets/scene/solarsystem/missions/apollo/insignias_map.asset @@ -1,6 +1,4 @@ -- Apollo mission insignias on their locations on the Lunar surface. --- The insignias are invisible by default, but can be enabled using shown or hidden using --- the exported functions `showInsignias(interpolationDuration)` and `hideInsignias(interpolationDuration)`. local moon = asset.require("scene/solarsystem/planets/earth/moon/moon") @@ -194,6 +192,7 @@ local HideInsignias = { IsLocal = false } + asset.onInitialize(function() openspace.addSceneGraphNode(Apollo11) openspace.addSceneGraphNode(Apollo12) @@ -223,19 +222,3 @@ asset.export(Apollo12) asset.export(Apollo14) asset.export(Apollo15) asset.export(Apollo16) - -asset.export("showInsignia", function (missionNumber, interpolationDuration) - openspace.setPropertyValue("Scene.Apollo" .. missionNumber .. "Insignia.Renderable.Opacity", 1, interpolationDuration) -end) - -asset.export("hideInsignia", function (missionNumber, interpolationDuration) - openspace.setPropertyValue("Scene.Apollo" .. missionNumber .. "Insignia.Renderable.Opacity", 0, interpolationDuration) -end) - -asset.export("showInsignias", function (interpolationDuration) - openspace.setPropertyValue("Scene.Apollo*Insignia.Renderable.Opacity", 1, interpolationDuration) -end) - -asset.export("hideInsignias", function (interpolationDuration) - openspace.setPropertyValue("Scene.Apollo*Insignia.Renderable.Opacity", 0, interpolationDuration) -end) diff --git a/data/assets/scene/solarsystem/missions/artemis/kernels.asset b/data/assets/scene/solarsystem/missions/artemis/kernels.asset index 6572ce320c..278e26b502 100644 --- a/data/assets/scene/solarsystem/missions/artemis/kernels.asset +++ b/data/assets/scene/solarsystem/missions/artemis/kernels.asset @@ -5,7 +5,6 @@ local data = asset.resource({ Version = 1 }) - local ID = { Artemis = -1023 } diff --git a/data/assets/scene/solarsystem/missions/artemis/mission.asset b/data/assets/scene/solarsystem/missions/artemis/mission.asset index 676a92cc15..44bcce8503 100644 --- a/data/assets/scene/solarsystem/missions/artemis/mission.asset +++ b/data/assets/scene/solarsystem/missions/artemis/mission.asset @@ -1,6 +1,7 @@ -- Source: https://solarsystem.nasa.gov/missions/rosetta-philae/in-depth/ local Mission = { + Identifier = "Artemis", Name = "Artemis", TimeRange = { Start = "2022 NOV 16 06:47:00", End = "2022 DEC 11 17:40:30" }, Image = "https://www.nasa.gov/sites/default/files/thumbnails/image/em1_patch_final.png", @@ -74,5 +75,5 @@ asset.onInitialize(function() end) asset.onDeinitialize(function() - openspace.unloadMission(Mission.Name) + openspace.unloadMission(Mission) end) diff --git a/data/assets/scene/solarsystem/missions/bepicolombo/fov/bela.asset b/data/assets/scene/solarsystem/missions/bepicolombo/fov/bela.asset index d06d82348b..d60f6f2658 100644 --- a/data/assets/scene/solarsystem/missions/bepicolombo/fov/bela.asset +++ b/data/assets/scene/solarsystem/missions/bepicolombo/fov/bela.asset @@ -17,8 +17,7 @@ local BelaReceiver = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO BELA Receiver", @@ -40,8 +39,7 @@ local BelaTransmitterMain = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO BELA Transmitter Main", @@ -63,8 +61,7 @@ local BelaTransmitterRed = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO BELA Transmitter Main", diff --git a/data/assets/scene/solarsystem/missions/bepicolombo/fov/hga.asset b/data/assets/scene/solarsystem/missions/bepicolombo/fov/hga.asset index 8b1f13b8a2..730c2841ae 100644 --- a/data/assets/scene/solarsystem/missions/bepicolombo/fov/hga.asset +++ b/data/assets/scene/solarsystem/missions/bepicolombo/fov/hga.asset @@ -17,8 +17,7 @@ local HGA = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO HGA", diff --git a/data/assets/scene/solarsystem/missions/bepicolombo/fov/mertis.asset b/data/assets/scene/solarsystem/missions/bepicolombo/fov/mertis.asset index 0f8fa5c52b..75e04598a6 100644 --- a/data/assets/scene/solarsystem/missions/bepicolombo/fov/mertis.asset +++ b/data/assets/scene/solarsystem/missions/bepicolombo/fov/mertis.asset @@ -17,8 +17,7 @@ local MertisTis = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO MERTIS TIS", @@ -40,8 +39,7 @@ local MertisTisPlanet = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO MERTIS TIS Planet", @@ -63,8 +61,7 @@ local MertisTisSpace = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO MERTIS TIS Space", diff --git a/data/assets/scene/solarsystem/missions/bepicolombo/fov/mgns.asset b/data/assets/scene/solarsystem/missions/bepicolombo/fov/mgns.asset index b825943c8a..836712e892 100644 --- a/data/assets/scene/solarsystem/missions/bepicolombo/fov/mgns.asset +++ b/data/assets/scene/solarsystem/missions/bepicolombo/fov/mgns.asset @@ -17,8 +17,7 @@ local MGNS = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO MGNS", diff --git a/data/assets/scene/solarsystem/missions/bepicolombo/fov/mixs.asset b/data/assets/scene/solarsystem/missions/bepicolombo/fov/mixs.asset index 660fbf0011..1286f23bfe 100644 --- a/data/assets/scene/solarsystem/missions/bepicolombo/fov/mixs.asset +++ b/data/assets/scene/solarsystem/missions/bepicolombo/fov/mixs.asset @@ -17,8 +17,7 @@ local MIXS_C = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO MIXS-C", @@ -40,8 +39,7 @@ local MIXS_T = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO MIXS-T", diff --git a/data/assets/scene/solarsystem/missions/bepicolombo/fov/phebus.asset b/data/assets/scene/solarsystem/missions/bepicolombo/fov/phebus.asset index 99774fd548..18fe04b1c5 100644 --- a/data/assets/scene/solarsystem/missions/bepicolombo/fov/phebus.asset +++ b/data/assets/scene/solarsystem/missions/bepicolombo/fov/phebus.asset @@ -17,8 +17,7 @@ local PhebusSlit75 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Phebus Slit 75", @@ -40,8 +39,7 @@ local PhebusSlit100 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Phebus Slit 100", @@ -63,8 +61,7 @@ local Phebus75 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Phebus 75", @@ -86,8 +83,7 @@ local Phebus100 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Phebus 100", diff --git a/data/assets/scene/solarsystem/missions/bepicolombo/fov/serena.asset b/data/assets/scene/solarsystem/missions/bepicolombo/fov/serena.asset index b65a60d545..d2c303524a 100644 --- a/data/assets/scene/solarsystem/missions/bepicolombo/fov/serena.asset +++ b/data/assets/scene/solarsystem/missions/bepicolombo/fov/serena.asset @@ -17,8 +17,7 @@ local SerenaElena = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena", diff --git a/data/assets/scene/solarsystem/missions/bepicolombo/fov/serena_anodes.asset b/data/assets/scene/solarsystem/missions/bepicolombo/fov/serena_anodes.asset index 37dc6226ec..a10d997bf1 100644 --- a/data/assets/scene/solarsystem/missions/bepicolombo/fov/serena_anodes.asset +++ b/data/assets/scene/solarsystem/missions/bepicolombo/fov/serena_anodes.asset @@ -17,8 +17,7 @@ local SerenaElenaAN01 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN01", @@ -40,8 +39,7 @@ local SerenaElenaAN02 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN02", @@ -63,8 +61,7 @@ local SerenaElenaAN03 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN03", @@ -86,8 +83,7 @@ local SerenaElenaAN04 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN04", @@ -109,8 +105,7 @@ local SerenaElenaAN05 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN05", @@ -132,8 +127,7 @@ local SerenaElenaAN06 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN06", @@ -155,8 +149,7 @@ local SerenaElenaAN07 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN07", @@ -178,8 +171,7 @@ local SerenaElenaAN08 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN08", @@ -201,8 +193,7 @@ local SerenaElenaAN09 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN09", @@ -224,8 +215,7 @@ local SerenaElenaAN10 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN10", @@ -247,8 +237,7 @@ local SerenaElenaAN11 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN11", @@ -270,8 +259,7 @@ local SerenaElenaAN12 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN12", @@ -293,8 +281,7 @@ local SerenaElenaAN13 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN13", @@ -316,8 +303,7 @@ local SerenaElenaAN14 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN14", @@ -339,8 +325,7 @@ local SerenaElenaAN15 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN15", @@ -362,8 +347,7 @@ local SerenaElenaAN16 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN16", @@ -385,8 +369,7 @@ local SerenaElenaAN17 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN17", @@ -408,8 +391,7 @@ local SerenaElenaAN18 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN18", @@ -431,8 +413,7 @@ local SerenaElenaAN19 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN19", @@ -454,8 +435,7 @@ local SerenaElenaAN20 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN20", @@ -477,8 +457,7 @@ local SerenaElenaAN21 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN21", @@ -500,8 +479,7 @@ local SerenaElenaAN22 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN22", @@ -523,8 +501,7 @@ local SerenaElenaAN23 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN23", @@ -546,8 +523,7 @@ local SerenaElenaAN24 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN24", @@ -569,8 +545,7 @@ local SerenaElenaAN25 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN25", @@ -592,8 +567,7 @@ local SerenaElenaAN26 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN26", @@ -615,8 +589,7 @@ local SerenaElenaAN27 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN27", @@ -638,8 +611,7 @@ local SerenaElenaAN28 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN28", @@ -661,8 +633,7 @@ local SerenaElenaAN29 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN29", @@ -684,8 +655,7 @@ local SerenaElenaAN30 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN30", @@ -707,8 +677,7 @@ local SerenaElenaAN31 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN31", @@ -730,8 +699,7 @@ local SerenaElenaAN32 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Serena Elena AN32", @@ -740,7 +708,6 @@ local SerenaElenaAN32 = { } - asset.onInitialize(function() openspace.addSceneGraphNode(SerenaElenaAN01) openspace.addSceneGraphNode(SerenaElenaAN02) diff --git a/data/assets/scene/solarsystem/missions/bepicolombo/fov/sibbiosys.asset b/data/assets/scene/solarsystem/missions/bepicolombo/fov/sibbiosys.asset index 7227b9a4ad..1f00714adf 100644 --- a/data/assets/scene/solarsystem/missions/bepicolombo/fov/sibbiosys.asset +++ b/data/assets/scene/solarsystem/missions/bepicolombo/fov/sibbiosys.asset @@ -17,8 +17,7 @@ local SimbioSys_HRIC_FPA = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Simbio-Sys HRIC FPA", @@ -40,8 +39,7 @@ local SimbioSys_HRIC_F550 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Simbio-Sys HRIC F550", @@ -63,8 +61,7 @@ local SimbioSys_HRIC_FPAN = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Simbio-Sys HRIC FPAN", @@ -86,8 +83,7 @@ local SimbioSys_HRIC_F750 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Simbio-Sys HRIC F750", @@ -109,8 +105,7 @@ local SimbioSys_HRIC_F880 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Simbio-Sys HRIC F880", @@ -132,8 +127,7 @@ local SimbioSys_STC_L = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Simbio-Sys STC L", @@ -155,8 +149,7 @@ local SimbioSys_STC_H = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Simbio-Sys STC H", @@ -178,8 +171,7 @@ local SimbioSys_STC_L_F920 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Simbio-Sys STC L F920", @@ -201,8 +193,7 @@ local SimbioSys_STC_L_F550 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Simbio-Sys STC L F550", @@ -224,8 +215,7 @@ local SimbioSys_STC_L_P700 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Simbio-Sys STC L P700", @@ -247,8 +237,7 @@ local SimbioSys_STC_H_P700 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Simbio-Sys STC H P700", @@ -270,8 +259,7 @@ local SimbioSys_STC_H_F420 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Simbio-Sys STC H F420", @@ -293,8 +281,7 @@ local SimbioSys_STC_H_F750 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Simbio-Sys STC H F750", @@ -316,8 +303,7 @@ local SimbioSys_VIHI = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Simbio-Sys VIHI", diff --git a/data/assets/scene/solarsystem/missions/bepicolombo/fov/sixs.asset b/data/assets/scene/solarsystem/missions/bepicolombo/fov/sixs.asset index ab08db5aad..78c81c9818 100644 --- a/data/assets/scene/solarsystem/missions/bepicolombo/fov/sixs.asset +++ b/data/assets/scene/solarsystem/missions/bepicolombo/fov/sixs.asset @@ -17,8 +17,7 @@ local SixsX1 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Sixs X1", @@ -40,8 +39,7 @@ local SixsX2 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Sixs X2", @@ -63,8 +61,7 @@ local SixsX3 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Sixs X3", diff --git a/data/assets/scene/solarsystem/missions/bepicolombo/fov/startracker.asset b/data/assets/scene/solarsystem/missions/bepicolombo/fov/startracker.asset index 9d2fec4234..f5afe6f213 100644 --- a/data/assets/scene/solarsystem/missions/bepicolombo/fov/startracker.asset +++ b/data/assets/scene/solarsystem/missions/bepicolombo/fov/startracker.asset @@ -17,8 +17,7 @@ local StarTracker1 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Star Tracker 1", @@ -40,8 +39,7 @@ local StarTracker2 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Star Tracker 2", @@ -63,8 +61,7 @@ local StarTracker3 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "MERCURY", "EARTH", "VENUS" }, - FrameConversions = {} + PotentialTargets = { "MERCURY", "EARTH", "VENUS" } }, GUI = { Name = "MPO Star Tracker 3", diff --git a/data/assets/scene/solarsystem/missions/bepicolombo/kernels.asset b/data/assets/scene/solarsystem/missions/bepicolombo/kernels.asset index c473ebb013..7963c2df11 100644 --- a/data/assets/scene/solarsystem/missions/bepicolombo/kernels.asset +++ b/data/assets/scene/solarsystem/missions/bepicolombo/kernels.asset @@ -120,82 +120,6 @@ local BepiColomboKernels = { kernels .. "bc_mpo_schulte_vector_v01.bsp", kernels .. "bc_mpo_prelaunch_v01.bsp", kernels .. "bc_mpo_fcp_00160_20181020_20260328_v01.bsp" - - --- kernels .. "bc_mpo_step_20240110.tsc", --- --- kernels .. "de432s.bsp", --- kernels .. "bc_mpo_fcp_00160_20181020_20260328_v01.bsp", --- kernels .. "bc_mmo_struct_v01.bsp", --- kernels .. "bc_mtm_struct_v06.bsp", --- kernels .. "bc_mpo_struct_v09.bsp", --- --- kernels .. "bc_mmo_mppe_v04.ti", --- kernels .. "bc_mmo_msasi_v03.ti", --- kernels .. "bc_mmo_ssas_v01.ti", --- kernels .. "bc_mpo_aux_v01.ti", --- kernels .. "bc_mpo_bela_v09.ti", --- kernels .. "bc_mpo_mertis_v08.ti", --- kernels .. "bc_mpo_mgns_v02.ti", --- kernels .. "bc_mpo_mixs_v06.ti", --- kernels .. "bc_mpo_phebus_v06.ti", --- kernels .. "bc_mpo_serena_v08.ti", --- kernels .. "bc_mpo_simbio-sys_v10.ti", --- kernels .. "bc_mpo_sixs_v08.ti", --- kernels .. "bc_mpo_str_v02.ti", --- kernels .. "bc_mtm_mcam_v05.ti", --- --- kernels .. "bc_sci_v12.tf", --- kernels .. "bc_mmo_v13.tf", --- kernels .. "bc_mpo_v34.tf", --- kernels .. "bc_mtm_v12.tf", --- kernels .. "bc_ops_v01.tf", --- --- kernels .. "bc_mpo_sc_fcp_00160_20181020_20240216_f20181127_v01.bc", --- -- kernels .. "bc_mpo_sc_scm_20240101_20240111_s20240110_v01.bc", --- -- kernels .. "bc_mpo_sc_scm_20230101_20240101_s20240104_v01.bc", --- -- kernels .. "bc_mpo_sc_scm_20220101_20230101_s20230309_v01.bc", --- -- kernels .. "bc_mpo_sc_scm_20210101_20220101_s20230309_v01.bc", --- -- kernels .. "bc_mpo_sc_scm_20200101_20210101_s20210618_v01.bc", --- -- kernels .. "bc_mpo_sc_scm_20190101_20200101_s20230309_v01.bc", --- -- kernels .. "bc_mpo_sc_scm_20181020_20190101_s20230309_v01.bc", --- --- kernels .. "bc_mpo_sc_scc_20240101_20240111_s20240110_v01.bc", --- kernels .. "bc_mpo_sc_scc_20230101_20240101_s20240104_v01.bc", --- kernels .. "bc_mpo_sc_scc_20220101_20230101_s20221229_v01.bc", --- kernels .. "bc_mpo_sc_scc_20210101_20220101_s20230309_v01.bc", --- kernels .. "bc_mpo_sc_scc_20200101_20210101_s20230309_v01.bc", --- kernels .. "bc_mpo_sc_scc_20190101_20200101_s20230309_v01.bc", --- kernels .. "bc_mpo_sc_scc_20181019_20190101_s20230309_v01.bc", --- --- kernels .. "bc_mpo_hga_scm_20240101_20240111_s20240110_v01.bc", --- kernels .. "bc_mpo_hga_scm_20181020_20190101_s20201020_v02.bc", --- kernels .. "bc_mpo_hga_scm_20190101_20200101_s20230309_v01.bc", --- kernels .. "bc_mpo_hga_scm_20200101_20210101_s20230309_v01.bc", --- kernels .. "bc_mpo_hga_scm_20210101_20220101_s20230309_v01.bc", --- kernels .. "bc_mpo_hga_scm_20220101_20230101_s20221229_v01.bc", --- kernels .. "bc_mpo_hga_scm_20230101_20240101_s20240104_v01.bc", --- kernels .. "bc_mpo_magboom_default_s20191107_v01.bc", --- kernels .. "bc_mpo_mertis_zero_s20191107_v02.bc", --- kernels .. "bc_mpo_mga_scm_20181020_20190101_s20200109_v02.bc", --- kernels .. "bc_mpo_mga_scm_20190101_20200101_s20230309_v01.bc", --- kernels .. "bc_mpo_mga_scm_20200101_20210101_s20230309_v01.bc", --- kernels .. "bc_mpo_mga_scm_20210101_20220101_s20230309_v01.bc", --- kernels .. "bc_mpo_mga_scm_20220101_20230101_s20221229_v01.bc", --- kernels .. "bc_mpo_mga_scm_20230101_20240101_s20240104_v01.bc", --- kernels .. "bc_mpo_mga_scm_20240101_20240111_s20240110_v01.bc", --- kernels .. "bc_mpo_mga_zero_s20191107_v02.bc", --- kernels .. "bc_mpo_phebus_zero_s20210408_v02.bc", --- kernels .. "bc_mpo_sa_scm_20181020_20190101_s20211202_v01.bc", --- kernels .. "bc_mpo_sa_scm_20190101_20200101_s20230309_v01.bc", --- kernels .. "bc_mpo_sa_scm_20200101_20210101_s20230309_v01.bc", --- kernels .. "bc_mpo_sa_scm_20210101_20220101_s20230309_v01.bc", --- kernels .. "bc_mpo_sa_scm_20220101_20230101_s20221229_v01.bc", --- kernels .. "bc_mpo_sa_scm_20230101_20240101_s20240104_v01.bc", --- kernels .. "bc_mpo_sa_scm_20240101_20240111_s20240110_v01.bc", --- kernels .. "bc_mpo_sa_zero_s20191107_v02.bc", --- kernels .. "bc_mpo_sa_zero_s20191107_v02.bc", --- kernels .. "bc_mpo_serena_zero_s20191207_v02.bc" } local ID = { @@ -271,12 +195,7 @@ local Frame = { Sixs_X3 = "MPO_SIXS-X-3", StarTracker1 = "MPO_STR-1", StarTracker2 = "MPO_STR-2", - StarTracker3 = "MPO_STR-3", - - - - - + StarTracker3 = "MPO_STR-3" } diff --git a/data/assets/scene/solarsystem/missions/dawn/dawn.asset b/data/assets/scene/solarsystem/missions/dawn/dawn.asset index b5aa5aa3de..d2096a1ac5 100644 --- a/data/assets/scene/solarsystem/missions/dawn/dawn.asset +++ b/data/assets/scene/solarsystem/missions/dawn/dawn.asset @@ -39,7 +39,6 @@ local DawnPosition = { Target = kernels.ID.Dawn, Observer = coreKernels.ID.SolarSystemBarycenter }, - -- Rotation for model version 2 Rotation = { Type = "StaticRotation", Rotation = { math.pi / 2.0, 0.0, math.pi / 2.0 } diff --git a/data/assets/scene/solarsystem/missions/insight/edl.asset b/data/assets/scene/solarsystem/missions/insight/edl.asset index c8f8314147..e37316b37f 100644 --- a/data/assets/scene/solarsystem/missions/insight/edl.asset +++ b/data/assets/scene/solarsystem/missions/insight/edl.asset @@ -770,6 +770,7 @@ local Insight_Trail = { } } + asset.onInitialize(function() openspace.addSceneGraphNode(InsightParent) openspace.addSceneGraphNode(Insight) diff --git a/data/assets/scene/solarsystem/missions/juice/dashboard.asset b/data/assets/scene/solarsystem/missions/juice/dashboard.asset index b334e828e8..fdd20f5580 100644 --- a/data/assets/scene/solarsystem/missions/juice/dashboard.asset +++ b/data/assets/scene/solarsystem/missions/juice/dashboard.asset @@ -3,6 +3,7 @@ local jupiter = asset.require("scene/solarsystem/planets/jupiter/jupiter") local ganymede = asset.require("scene/solarsystem/planets/jupiter/ganymede/ganymede") + local DistanceJuiceJupiter = { Type = "DashboardItemDistance", Identifier = "JuiceJupiterDistance", diff --git a/data/assets/scene/solarsystem/missions/juice/fov/gala.asset b/data/assets/scene/solarsystem/missions/juice/fov/gala.asset index 2bdb877dad..e1bf3b5373 100644 --- a/data/assets/scene/solarsystem/missions/juice/fov/gala.asset +++ b/data/assets/scene/solarsystem/missions/juice/fov/gala.asset @@ -22,8 +22,7 @@ local Gala = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "Gala FOV", @@ -33,7 +32,6 @@ local Gala = { } - asset.onInitialize(function() -- Circle shapes are currently not supported openspace.addSceneGraphNode(Gala) diff --git a/data/assets/scene/solarsystem/missions/juice/fov/janus.asset b/data/assets/scene/solarsystem/missions/juice/fov/janus.asset index 8b4d872e93..65d440a769 100644 --- a/data/assets/scene/solarsystem/missions/juice/fov/janus.asset +++ b/data/assets/scene/solarsystem/missions/juice/fov/janus.asset @@ -28,8 +28,7 @@ local Janus = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "Janus FOV", diff --git a/data/assets/scene/solarsystem/missions/juice/fov/jmc.asset b/data/assets/scene/solarsystem/missions/juice/fov/jmc.asset index cd8a82ae90..57e183f1e7 100644 --- a/data/assets/scene/solarsystem/missions/juice/fov/jmc.asset +++ b/data/assets/scene/solarsystem/missions/juice/fov/jmc.asset @@ -22,8 +22,7 @@ local JMC1 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "JUICE_JMC-1 FOV", @@ -51,8 +50,7 @@ local JMC2 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "JUICE_JMC-2 FOV", diff --git a/data/assets/scene/solarsystem/missions/juice/fov/majis.asset b/data/assets/scene/solarsystem/missions/juice/fov/majis.asset index 772c537e71..2802dbce6a 100644 --- a/data/assets/scene/solarsystem/missions/juice/fov/majis.asset +++ b/data/assets/scene/solarsystem/missions/juice/fov/majis.asset @@ -22,8 +22,7 @@ local MajisVisnir = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "Majis Visnir FOV", @@ -54,8 +53,7 @@ local MajisVisnirB2 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "Majis Visnir B2 FOV", @@ -82,8 +80,7 @@ local MajisVisnirB4 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "Majis Visnir B4 FOV", @@ -110,8 +107,7 @@ local MajisIr = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "Majis IR FOV", @@ -138,8 +134,7 @@ local MajisIrB2 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "Majis IR B2 FOV", @@ -166,8 +161,7 @@ local MajisIrB4 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "Majis IR B4 FOV", @@ -194,8 +188,7 @@ local Majis = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "Majis FOV", diff --git a/data/assets/scene/solarsystem/missions/juice/fov/navcam.asset b/data/assets/scene/solarsystem/missions/juice/fov/navcam.asset index f560ff49fc..1adead87e0 100644 --- a/data/assets/scene/solarsystem/missions/juice/fov/navcam.asset +++ b/data/assets/scene/solarsystem/missions/juice/fov/navcam.asset @@ -22,8 +22,7 @@ local NavCam = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "NavCam FOV", diff --git a/data/assets/scene/solarsystem/missions/juice/fov/rime.asset b/data/assets/scene/solarsystem/missions/juice/fov/rime.asset index 0cf595d298..185a8afc35 100644 --- a/data/assets/scene/solarsystem/missions/juice/fov/rime.asset +++ b/data/assets/scene/solarsystem/missions/juice/fov/rime.asset @@ -23,8 +23,7 @@ local RimeBase = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "Rime Base FOV", @@ -53,8 +52,7 @@ local Rime = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "Rime FOV", diff --git a/data/assets/scene/solarsystem/missions/juice/fov/startracker.asset b/data/assets/scene/solarsystem/missions/juice/fov/startracker.asset index 0919a57cb3..42a7fefc8e 100644 --- a/data/assets/scene/solarsystem/missions/juice/fov/startracker.asset +++ b/data/assets/scene/solarsystem/missions/juice/fov/startracker.asset @@ -22,8 +22,7 @@ local StarOh1 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "Star Tracker OH1 FOV", @@ -51,8 +50,7 @@ local StarOh2 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "Star Tracker OH2 FOV", @@ -80,8 +78,7 @@ local StarOh3 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "Star Tracker OH3 FOV", diff --git a/data/assets/scene/solarsystem/missions/juice/fov/swi.asset b/data/assets/scene/solarsystem/missions/juice/fov/swi.asset index a5e7f54196..8e06bff28e 100644 --- a/data/assets/scene/solarsystem/missions/juice/fov/swi.asset +++ b/data/assets/scene/solarsystem/missions/juice/fov/swi.asset @@ -23,8 +23,7 @@ local SwiCh2 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "SWI CH2 FOV", @@ -58,8 +57,7 @@ local SwiFull = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "SWI Full FOV", @@ -96,8 +94,7 @@ local SwiFullGCO500 = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "SWI Full GCO500 FOV", diff --git a/data/assets/scene/solarsystem/missions/juice/fov/uvs.asset b/data/assets/scene/solarsystem/missions/juice/fov/uvs.asset index 0190a72bea..e264b5b0fd 100644 --- a/data/assets/scene/solarsystem/missions/juice/fov/uvs.asset +++ b/data/assets/scene/solarsystem/missions/juice/fov/uvs.asset @@ -22,8 +22,7 @@ local UVS = { Aberration = "NONE" }, AlwaysDrawFov = true, - PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" }, - FrameConversions = {} + PotentialTargets = { "JUPITER", "CALLISTO", "EUROPA", "GANYMEDE", "IO" } }, GUI = { Name = "UVS FOV", diff --git a/data/assets/scene/solarsystem/missions/juno/kernels.asset b/data/assets/scene/solarsystem/missions/juno/kernels.asset index f660655afd..d2d03b78bf 100644 --- a/data/assets/scene/solarsystem/missions/juno/kernels.asset +++ b/data/assets/scene/solarsystem/missions/juno/kernels.asset @@ -115,7 +115,6 @@ local Kernels = { data .. "juno_sc_prl_230228_230407_jm0490rp_v01.bc" } - local ID = { Juno = "JUNO" } @@ -124,6 +123,7 @@ local Frame = { Juno = "JUNO_SPACECRAFT" } + asset.onInitialize(function() openspace.spice.loadKernel(Kernels) end) @@ -132,6 +132,5 @@ asset.onDeinitialize(function() openspace.spice.unloadKernel(Kernels) end) - asset.export("ID", ID) asset.export("Frame", Frame) diff --git a/data/assets/scene/solarsystem/missions/messenger/messenger.asset b/data/assets/scene/solarsystem/missions/messenger/messenger.asset index e779b7177c..04805ebcab 100644 --- a/data/assets/scene/solarsystem/missions/messenger/messenger.asset +++ b/data/assets/scene/solarsystem/missions/messenger/messenger.asset @@ -5,6 +5,7 @@ local kernels = asset.require("./kernels") local coreKernels = asset.require("spice/core") + local models = asset.resource({ Name = "Messenger Models", Type = "HttpSynchronization", diff --git a/data/assets/scene/solarsystem/missions/osirisrex/actions.asset b/data/assets/scene/solarsystem/missions/osirisrex/actions.asset index d11290c461..09f90f1fca 100644 --- a/data/assets/scene/solarsystem/missions/osirisrex/actions.asset +++ b/data/assets/scene/solarsystem/missions/osirisrex/actions.asset @@ -136,6 +136,7 @@ local LookImageCapture = { IsLocal = false } + asset.onInitialize(function() openspace.action.registerAction(FocusOsirisRex) openspace.action.registerAction(FocusBennu) diff --git a/data/assets/scene/solarsystem/missions/osirisrex/model.asset b/data/assets/scene/solarsystem/missions/osirisrex/model.asset index ac98b5bee2..647eea7f94 100644 --- a/data/assets/scene/solarsystem/missions/osirisrex/model.asset +++ b/data/assets/scene/solarsystem/missions/osirisrex/model.asset @@ -161,6 +161,7 @@ local PolyCamFov = { -- } -- } + asset.onInitialize(function() openspace.addSceneGraphNode(OsirisRex) openspace.addSceneGraphNode(PolyCam) diff --git a/data/assets/scene/solarsystem/missions/rosetta/67p.asset b/data/assets/scene/solarsystem/missions/rosetta/67p.asset index 11b67b441f..27c0dafd75 100644 --- a/data/assets/scene/solarsystem/missions/rosetta/67p.asset +++ b/data/assets/scene/solarsystem/missions/rosetta/67p.asset @@ -137,7 +137,6 @@ local Trail67P = { } } --- actions local Focus67p = { Identifier = "os.rosetta.Focus67p", Name = "Focus on 67P", diff --git a/data/assets/scene/solarsystem/missions/voyager/mission.asset b/data/assets/scene/solarsystem/missions/voyager/mission.asset index 4efd6cea00..5084e98480 100644 --- a/data/assets/scene/solarsystem/missions/voyager/mission.asset +++ b/data/assets/scene/solarsystem/missions/voyager/mission.asset @@ -108,7 +108,7 @@ local Mission = { { Name = "Voyager 2 Neptune Encounter", TimeRange = { Start = "1989 AUG 25 00:00:00", End = "1989 AUG 25 00:00:00" } - } + } } } } diff --git a/data/assets/scene/solarsystem/planets/base_layers.asset b/data/assets/scene/solarsystem/planets/base_layers.asset index 878844ac6b..b9203c6a45 100644 --- a/data/assets/scene/solarsystem/planets/base_layers.asset +++ b/data/assets/scene/solarsystem/planets/base_layers.asset @@ -26,6 +26,7 @@ asset.require("./uranus/default_layers") asset.require("./neptune/default_layers") + asset.meta = { Name = "Base Solar System Layers", Description = [[Adds base layers for all planets. Remove this asset and include diff --git a/data/assets/scene/solarsystem/planets/default_layers.asset b/data/assets/scene/solarsystem/planets/default_layers.asset index 13641ff86c..cf5dafcb95 100644 --- a/data/assets/scene/solarsystem/planets/default_layers.asset +++ b/data/assets/scene/solarsystem/planets/default_layers.asset @@ -10,7 +10,6 @@ asset.meta = { Description = [[Adds default layers for all planets. Remove this asset and include individual layers for planets to customize planet layers - Layers loaded from all servers ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/earth/eclipse_shadow.asset b/data/assets/scene/solarsystem/planets/earth/eclipse_shadow.asset index bc4cde4de6..6543fcc589 100644 --- a/data/assets/scene/solarsystem/planets/earth/eclipse_shadow.asset +++ b/data/assets/scene/solarsystem/planets/earth/eclipse_shadow.asset @@ -1,6 +1,8 @@ local transforms = asset.require("scene/solarsystem/planets/earth/moon/moon") local coreKernels = asset.require("spice/core") + + local EarthMoonShadow = { Identifier = "EarthMoonShadow", Parent = transforms.Moon.Identifier, @@ -22,6 +24,7 @@ local EarthMoonShadow = { } } + asset.onInitialize(function() openspace.addSceneGraphNode(EarthMoonShadow) end) diff --git a/data/assets/scene/solarsystem/planets/earth/eclipses/corona/corona20170821.asset b/data/assets/scene/solarsystem/planets/earth/eclipses/corona/corona20170821.asset index 982abdda01..02176e3200 100644 --- a/data/assets/scene/solarsystem/planets/earth/eclipses/corona/corona20170821.asset +++ b/data/assets/scene/solarsystem/planets/earth/eclipses/corona/corona20170821.asset @@ -31,12 +31,12 @@ local Plane = { Video = videos .. "corona20170821_0171.mp4", PlaybackMode = "MapToSimulationTime", StartTime = "2017 08 21 00:00:00", - EndTime = "2017 08 21 23:59:59", + EndTime = "2017 08 21 23:59:59" }, GUI = { Name = "Sun Corona", Path = "/Solar System/Sun" - }, + } } diff --git a/data/assets/scene/solarsystem/planets/earth/eclipses/grid/earth_ecliptic_radial_grid.asset b/data/assets/scene/solarsystem/planets/earth/eclipses/grid/earth_ecliptic_radial_grid.asset index 1b062f9d61..de490a5d80 100644 --- a/data/assets/scene/solarsystem/planets/earth/eclipses/grid/earth_ecliptic_radial_grid.asset +++ b/data/assets/scene/solarsystem/planets/earth/eclipses/grid/earth_ecliptic_radial_grid.asset @@ -32,7 +32,7 @@ local eclipticGrid = { }, GUI = { Name = "Earth Ecliptic Grid", - Path = "/Solar System/Planets/Earth", + Path = "/Solar System/Planets/Earth" } } diff --git a/data/assets/scene/solarsystem/planets/earth/eclipses/grid/moon_radial_grid.asset b/data/assets/scene/solarsystem/planets/earth/eclipses/grid/moon_radial_grid.asset index e0d23ad425..9b3ca56a3d 100644 --- a/data/assets/scene/solarsystem/planets/earth/eclipses/grid/moon_radial_grid.asset +++ b/data/assets/scene/solarsystem/planets/earth/eclipses/grid/moon_radial_grid.asset @@ -21,7 +21,7 @@ local orbitalPlaneGrid = { }, GUI = { Name = "Moon Ecliptic Grid", - Path = "/Solar System/Planets/Earth/Moon", + Path = "/Solar System/Planets/Earth/Moon" } } diff --git a/data/assets/scene/solarsystem/planets/earth/lagrange_points/l4.asset b/data/assets/scene/solarsystem/planets/earth/lagrange_points/l4.asset index e528314041..fc31d9a812 100644 --- a/data/assets/scene/solarsystem/planets/earth/lagrange_points/l4.asset +++ b/data/assets/scene/solarsystem/planets/earth/lagrange_points/l4.asset @@ -79,7 +79,6 @@ local L4Label = { } - asset.onInitialize(function() openspace.spice.loadKernel(kernels .. "L4_de431.bsp") diff --git a/data/assets/scene/solarsystem/planets/earth/lagrange_points/l5.asset b/data/assets/scene/solarsystem/planets/earth/lagrange_points/l5.asset index 7ea7f29b64..ac2902a3f8 100644 --- a/data/assets/scene/solarsystem/planets/earth/lagrange_points/l5.asset +++ b/data/assets/scene/solarsystem/planets/earth/lagrange_points/l5.asset @@ -79,7 +79,6 @@ local L5Label = { } - asset.onInitialize(function() openspace.spice.loadKernel(kernels .. "L5_de431.bsp") diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa20.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa20.asset index c948982e52..f65ff9e786 100644 --- a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa20.asset +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa20.asset @@ -19,7 +19,6 @@ local Layer = { PadTiles = false } - asset.export("Layer", Layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa21.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa21.asset index 200649673e..45f5807a23 100644 --- a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa21.asset +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/noaa21.asset @@ -19,7 +19,6 @@ local Layer = { PadTiles = false } - asset.export("Layer", Layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/snpp.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/snpp.asset index 50b9648d00..d6656ff70c 100644 --- a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/snpp.asset +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/definitions/snpp.asset @@ -19,7 +19,6 @@ local Layer = { PadTiles = false } - asset.export("Layer", Layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback.asset index 27fa8892d4..76e05aee71 100644 --- a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback.asset +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery_wayback.asset @@ -99,7 +99,6 @@ local WaybackLayer20231207 = { } - asset.onInitialize(function() openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20140220) openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", WaybackLayer20150430) diff --git a/data/assets/scene/solarsystem/planets/earth/magnetosphere/magnetosphere.asset b/data/assets/scene/solarsystem/planets/earth/magnetosphere/magnetosphere.asset index 13bf2172bc..6bf4588ed2 100644 --- a/data/assets/scene/solarsystem/planets/earth/magnetosphere/magnetosphere.asset +++ b/data/assets/scene/solarsystem/planets/earth/magnetosphere/magnetosphere.asset @@ -11,6 +11,7 @@ local fieldlinesDirectory = asset.resource({ Version = 1 }) + local EarthMagnetosphere = { Identifier = "EarthMagnetosphere", Parent = transforms.GSMReferenceFrame.Identifier, diff --git a/data/assets/scene/solarsystem/planets/earth/magnetosphere/transforms_magnetosphere.asset b/data/assets/scene/solarsystem/planets/earth/magnetosphere/transforms_magnetosphere.asset index fb5be33d4f..b169211d78 100644 --- a/data/assets/scene/solarsystem/planets/earth/magnetosphere/transforms_magnetosphere.asset +++ b/data/assets/scene/solarsystem/planets/earth/magnetosphere/transforms_magnetosphere.asset @@ -5,6 +5,7 @@ local coreKernels = asset.require("spice/core") local GSMKernel = asset.resource("../kernels/GSM.ti") + local Frame = { GSM = "GSM" -- Geocentric Solar Magnetospheric } diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_15_Metric_Cam_DEM.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_15_Metric_Cam_DEM.asset index e145e3b6ec..aea2431c0e 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_15_Metric_Cam_DEM.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_15_Metric_Cam_DEM.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_Apollo15_MetricCam_ClrShade_Global_1024ppd = { Identifier = "Apollo15_MetricCam_ClrShade_Global_1024ppd", Name = [[Apollo 15 Metric Cam DEM, ColorHillshade]], @@ -38,6 +40,7 @@ local treks_Apollo15_MetricCam_Shade_Global_1024ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Apollo15_MetricCam_ClrShade_Global_1024ppd) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Apollo15_MetricCam_ClrConf_Global_1024ppd) @@ -58,6 +61,7 @@ asset.export("Apollo15_MetricCam_Gray_Global_1024ppd", treks_Apollo15_MetricCam_ asset.export("Apollo15_MetricCam_Shade_Global_1024ppd", treks_Apollo15_MetricCam_Shade_Global_1024ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon Apollo_15_Metric_Cam_DEM]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_15_Pan_Cam_DEM.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_15_Pan_Cam_DEM.asset index be463708d6..8c08136de2 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_15_Pan_Cam_DEM.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_15_Pan_Cam_DEM.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_Apollo15_PanCam_ClrShade_25N311E_5mp = { Identifier = "Apollo15_PanCam_ClrShade_25N311E_5mp", Name = [[Apollo 15 Pan Cam DEM, Aristarchus Plateau 1, ColorHillshade]], @@ -30,6 +32,7 @@ local treks_Apollo15_PanCam_ClrShade_19S129E_5mp = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Apollo15_PanCam_ClrShade_25N311E_5mp) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Apollo15_PanCam_ClrShade_28N307E_3mp) @@ -47,6 +50,7 @@ asset.export("Apollo15_PanCam_ClrShade_28N307E_3mp", treks_Apollo15_PanCam_ClrSh asset.export("Apollo15_PanCam_ClrShade_19S129E_5mp", treks_Apollo15_PanCam_ClrShade_19S129E_5mp) + asset.meta = { Name = [[NASA Treks Layers for Moon Apollo_15_Pan_Cam_DEM]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_15_Pan_Cam_Image_Mosaic.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_15_Pan_Cam_Image_Mosaic.asset index b878c0589e..b5940572c1 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_15_Pan_Cam_Image_Mosaic.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_15_Pan_Cam_Image_Mosaic.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_Apollo15_PanCam_Mosaic_25N311E_150cmp = { Identifier = "Apollo15_PanCam_Mosaic_25N311E_150cmp", Name = [[Apollo 15 Pan Cam Image Mosaic, Aristarchus Plateau 1]], @@ -30,6 +32,7 @@ local treks_Apollo15_PanCam_Mosaic_19S129E_2mp = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Apollo15_PanCam_Mosaic_25N311E_150cmp) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Apollo15_PanCam_Mosaic_28N307E_1mp) @@ -47,6 +50,7 @@ asset.export("Apollo15_PanCam_Mosaic_28N307E_1mp", treks_Apollo15_PanCam_Mosaic_ asset.export("Apollo15_PanCam_Mosaic_19S129E_2mp", treks_Apollo15_PanCam_Mosaic_19S129E_2mp) + asset.meta = { Name = [[NASA Treks Layers for Moon Apollo_15_Pan_Cam_Image_Mosaic]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_16_Metric_Cam_DEM.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_16_Metric_Cam_DEM.asset index 62f6f338ba..9d74660154 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_16_Metric_Cam_DEM.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_16_Metric_Cam_DEM.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_Apollo16_MetricCam_ClrConf_Global_1024ppd = { Identifier = "Apollo16_MetricCam_ClrConf_Global_1024ppd", Name = [[Apollo 16 Metric Cam DEM, Colorized Confidence]], @@ -30,6 +32,7 @@ local treks_Apollo16_MetricCam_Shade_Global_1024ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Apollo16_MetricCam_ClrConf_Global_1024ppd) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Apollo16_MetricCam_Gray_Global_1024ppd) @@ -47,6 +50,7 @@ asset.export("Apollo16_MetricCam_Gray_Global_1024ppd", treks_Apollo16_MetricCam_ asset.export("Apollo16_MetricCam_Shade_Global_1024ppd", treks_Apollo16_MetricCam_Shade_Global_1024ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon Apollo_16_Metric_Cam_DEM]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_17_Metric_Cam_DEM.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_17_Metric_Cam_DEM.asset index 8ad4eb1b59..e517f41b13 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_17_Metric_Cam_DEM.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_17_Metric_Cam_DEM.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_Apollo17_MetricCam_ClrShade_Global_1024ppd = { Identifier = "Apollo17_MetricCam_ClrShade_Global_1024ppd", Name = [[Apollo 17 Metric Cam DEM, ColorHillshade]], @@ -22,6 +24,7 @@ local treks_Apollo17_MetricCam_Gray_Global_1024ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Apollo17_MetricCam_ClrShade_Global_1024ppd) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Apollo17_MetricCam_Gray_Global_1024ppd) @@ -36,6 +39,7 @@ asset.export("Apollo17_MetricCam_ClrShade_Global_1024ppd", treks_Apollo17_Metric asset.export("Apollo17_MetricCam_Gray_Global_1024ppd", treks_Apollo17_MetricCam_Gray_Global_1024ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon Apollo_17_Metric_Cam_DEM], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_Zone_Metric_Cam.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_Zone_Metric_Cam.asset index 40887e2587..8d456e27ad 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_Zone_Metric_Cam.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_Zone_Metric_Cam.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_ApolloZone_MetricCam_Shade_Global_1024ppd = { Identifier = "ApolloZone_MetricCam_Shade_Global_1024ppd", Name = [[Apollo Zone Metric Cam, Hillshade]], @@ -14,6 +16,7 @@ local treks_ApolloZone_MetricCam_Shade_Global_1024ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_ApolloZone_MetricCam_Shade_Global_1024ppd) end) @@ -25,6 +28,7 @@ end) asset.export("ApolloZone_MetricCam_Shade_Global_1024ppd", treks_ApolloZone_MetricCam_Shade_Global_1024ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon Apollo_Zone_Metric_Cam]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_Zone_Metric_Cam_DEM.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_Zone_Metric_Cam_DEM.asset index 59792e47d6..59fe56c6b0 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_Zone_Metric_Cam_DEM.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Apollo_Zone_Metric_Cam_DEM.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_ApolloZone_MetricCam_ClrShade_Global_1024ppd = { Identifier = "ApolloZone_MetricCam_ClrShade_Global_1024ppd", Name = [[Apollo Zone Metric Cam DEM, ColorHillshade]], @@ -14,6 +16,7 @@ local treks_ApolloZone_MetricCam_ClrShade_Global_1024ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_ApolloZone_MetricCam_ClrShade_Global_1024ppd) end) @@ -25,6 +28,7 @@ end) asset.export("ApolloZone_MetricCam_ClrShade_Global_1024ppd", treks_ApolloZone_MetricCam_ClrShade_Global_1024ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon Apollo_Zone_Metric_Cam_DEM]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Global.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Global.asset index 746e644fa2..123fc56510 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Global.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Global.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_Apollo15_MetricCam_Mosaic_Global_4096ppd = { Identifier = "Apollo15_MetricCam_Mosaic_Global_4096ppd", Name = [[Apollo 15 Metric Cam Image Mosaic]], @@ -164,6 +166,7 @@ local treks_LRO_LOLA_Illumination_SPole65S_240m_EQ = { Description = [[This data product is a map of the permanently shadowed regions (PSRs) in the lunar South Pole. The map resolution is 240m/pix by 240m/pix, true at the pole in polar stereographic (spherical) projection. The calculations are based on the LOLA elevation map LDEM_75S_240M and are described in. The values are binary, indicating whether a pixel is in permanent shadow (1) or not (0, NoDATA).]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Apollo15_MetricCam_Mosaic_Global_4096ppd) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Apollo17_MetricCam_Mosaic_Global_3033ppd) @@ -229,6 +232,7 @@ asset.export("LRO_LOLA_Illumination_NPole65N_240m_EQ", treks_LRO_LOLA_Illuminati asset.export("LRO_LOLA_Illumination_SPole65S_240m_EQ", treks_LRO_LOLA_Illumination_SPole65S_240m_EQ) + asset.meta = { Name = [[NASA Treks Layers for Moon Global]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Kaguya_LGM2011_Freeair_Gravity.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Kaguya_LGM2011_Freeair_Gravity.asset index e3575ecaac..a888bd697f 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Kaguya_LGM2011_Freeair_Gravity.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Kaguya_LGM2011_Freeair_Gravity.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_Kaguya_LGM2011_FreeairGravity_Colorized_Global_mgal3m_20ppd = { Identifier = "Kaguya_LGM2011_FreeairGravity_Colorized_Global_mgal3m_20ppd", Name = [[Kaguya LGM2011 Freeair Gravity, Colorized]], @@ -22,6 +24,7 @@ local treks_Kaguya_LGM2011_FreeairGravity_Gray_Global_mgal3m_20ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Kaguya_LGM2011_FreeairGravity_Colorized_Global_mgal3m_20ppd) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Kaguya_LGM2011_FreeairGravity_Gray_Global_mgal3m_20ppd) @@ -36,6 +39,7 @@ asset.export("Kaguya_LGM2011_FreeairGravity_Colorized_Global_mgal3m_20ppd", trek asset.export("Kaguya_LGM2011_FreeairGravity_Gray_Global_mgal3m_20ppd", treks_Kaguya_LGM2011_FreeairGravity_Gray_Global_mgal3m_20ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon Kaguya_LGM2011_Freeair_Gravity]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Kaguya_LGM2011_Surface_Gravity.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Kaguya_LGM2011_Surface_Gravity.asset index 6cfc20277a..8cfd6f674e 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Kaguya_LGM2011_Surface_Gravity.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/Kaguya_LGM2011_Surface_Gravity.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_Kaguya_LGM2011_SurfaceGravity_Colorized_Global_mgal3m_20ppd = { Identifier = "Kaguya_LGM2011_SurfaceGravity_Colorized_Global_mgal3m_20ppd", Name = [[Kaguya LGM2011 Surface Gravity, Colorized]], @@ -22,6 +24,7 @@ local treks_Kaguya_LGM2011_SurfaceGravity_Gray_Global_mgal3m_20ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Kaguya_LGM2011_SurfaceGravity_Colorized_Global_mgal3m_20ppd) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Kaguya_LGM2011_SurfaceGravity_Gray_Global_mgal3m_20ppd) @@ -36,6 +39,7 @@ asset.export("Kaguya_LGM2011_SurfaceGravity_Colorized_Global_mgal3m_20ppd", trek asset.export("Kaguya_LGM2011_SurfaceGravity_Gray_Global_mgal3m_20ppd", treks_Kaguya_LGM2011_SurfaceGravity_Gray_Global_mgal3m_20ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon Kaguya_LGM2011_Surface_Gravity]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Roughness_16ppd.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Roughness_16ppd.asset index 7df2bc27e8..af32c41ece 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Roughness_16ppd.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Roughness_16ppd.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_LOLA_ClrRoughness_Global_16ppd = { Identifier = "LRO_LOLA_ClrRoughness_Global_16ppd", Name = [[LOLA Roughness 16ppd, Colorized]], @@ -14,6 +16,7 @@ local treks_LRO_LOLA_ClrRoughness_Global_16ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_LOLA_ClrRoughness_Global_16ppd) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_LOLA_ClrRoughness_Global_16ppd", treks_LRO_LOLA_ClrRoughness_Global_16ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon LOLA_Roughness_16ppd]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Slope_16ppd.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Slope_16ppd.asset index fadff404ca..4098fe058a 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Slope_16ppd.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Slope_16ppd.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_LOLA_ClrSlope_Global_16ppd = { Identifier = "LRO_LOLA_ClrSlope_Global_16ppd", Name = [[LOLA Slope 16ppd, Colorized]], @@ -14,6 +16,7 @@ local treks_LRO_LOLA_ClrSlope_Global_16ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_LOLA_ClrSlope_Global_16ppd) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_LOLA_ClrSlope_Global_16ppd", treks_LRO_LOLA_ClrSlope_Global_16ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon LOLA_Slope_16ppd]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Slope_Northpole_120m.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Slope_Northpole_120m.asset index 6040f37c0e..e773fca8c6 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Slope_Northpole_120m.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Slope_Northpole_120m.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_LOLA_ClrSlope_NPole75N_120m_EQ = { Identifier = "LRO_LOLA_ClrSlope_NPole75N_120m_EQ", Name = [[LOLA Slope Northpole 120m, Colorized]], @@ -14,6 +16,7 @@ local treks_LRO_LOLA_ClrSlope_NPole75N_120m_EQ = { Description = [[This is a colorized map of the original north polar surface slope of the Moon at a resolution of 16 m/pix by 16 m/pix, based on altimetry data acquired by the LOLA instrument. The LOLA Laser 1 and 2 data through mission phase LRO_SM_17 are the source for this data set. The bi-directional slope was calculated from a plane fit to three successive laser shots requiring n=5 to 15 profile returns. Depending on orbital velocity, probability of detection, and spacecraft altitude, the slope baseline may vary from 30 to 120 meters.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_LOLA_ClrSlope_NPole75N_120m_EQ) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_LOLA_ClrSlope_NPole75N_120m_EQ", treks_LRO_LOLA_ClrSlope_NPole75N_120m_EQ) + asset.meta = { Name = [[NASA Treks Layers for Moon LOLA_Slope_Northpole_120m]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Slope_Southpole_120m.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Slope_Southpole_120m.asset index 94c4cc2340..61d77fc204 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Slope_Southpole_120m.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_Slope_Southpole_120m.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_LOLA_ClrSlope_SPole75S_120m_EQ = { Identifier = "LRO_LOLA_ClrSlope_SPole75S_120m_EQ", Name = [[LOLA Slope Southpole 120m, Colorized]], @@ -14,6 +16,7 @@ local treks_LRO_LOLA_ClrSlope_SPole75S_120m_EQ = { Description = [[This is a colorized map of the original south polar surface slope of the Moon at a resolution of 16 m/pix by 16 m/pix, based on altimetry data acquired by the LOLA instrument. The LOLA Laser 1 and 2 data through mission phase LRO_SM_17 are the source for this data set. The bi-directional slope was calculated from a plane fit to three successive laser shots requiring n=5 to 15 profile returns. Depending on orbital velocity, probability of detection, and spacecraft altitude, the slope baseline may vary from 30 to 120 meters.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_LOLA_ClrSlope_SPole75S_120m_EQ) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_LOLA_ClrSlope_SPole75S_120m_EQ", treks_LRO_LOLA_ClrSlope_SPole75S_120m_EQ) + asset.meta = { Name = [[NASA Treks Layers for Moon LOLA_Slope_Southpole_120m]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_and_TC_Stereo_DEM_Merge_512ppd.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_and_TC_Stereo_DEM_Merge_512ppd.asset index 5b129cd0a5..087b865b46 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_and_TC_Stereo_DEM_Merge_512ppd.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LOLA_and_TC_Stereo_DEM_Merge_512ppd.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_LrocKaguya_Shade_60N60S_512ppd = { Identifier = "LRO_LrocKaguya_Shade_60N60S_512ppd", Name = [[LOLA and TC Stereo DEM Merge 512ppd, Shade]], @@ -14,6 +16,7 @@ local treks_LRO_LrocKaguya_Shade_60N60S_512ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_LrocKaguya_Shade_60N60S_512ppd) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_LrocKaguya_Shade_60N60S_512ppd", treks_LRO_LrocKaguya_Shade_60N60S_512ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon LOLA_and_TC_Stereo_DEM_Merge_512ppd]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LROC_NAC_Uncontrolled_Mosaic_of_Region_Inside_Schrodinger_Crater.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LROC_NAC_Uncontrolled_Mosaic_of_Region_Inside_Schrodinger_Crater.asset index 5c7d5e370b..0f5a316a3d 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LROC_NAC_Uncontrolled_Mosaic_of_Region_Inside_Schrodinger_Crater.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LROC_NAC_Uncontrolled_Mosaic_of_Region_Inside_Schrodinger_Crater.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_SchrodingerMareNortheq = { Identifier = "SchrodingerMareNortheq", Name = [[LROC NAC Uncontrolled Mosaic of Region Inside Schrodinger Crater, 50cm/px]], @@ -14,6 +16,7 @@ local treks_SchrodingerMareNortheq = { Description = [[This is a 50cm/px uncontrolled visible image mosaic generated using Lunar Reconnaissance Orbiter Camera (LROC) Narrow Angle Camera (NAC) images from the Lunar Reconnaissance Orbiter mission. Each NAC image was registered horizontally to the LRO's Lunar Orbiter Laser Altimeter (LOLA) global DEM, and then mosaicked together and color balanced.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_SchrodingerMareNortheq) end) @@ -25,6 +28,7 @@ end) asset.export("SchrodingerMareNortheq", treks_SchrodingerMareNortheq) + asset.meta = { Name = [[NASA Treks Layers for Moon LROC_NAC_Uncontrolled_Mosaic_of_Region_Inside_Schrodinger_Crater]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LROC_NAC_Uncontrolled_Mosaic_of_Schrodinger_Crater.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LROC_NAC_Uncontrolled_Mosaic_of_Schrodinger_Crater.asset index 27488b71b4..79c92db21d 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LROC_NAC_Uncontrolled_Mosaic_of_Schrodinger_Crater.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LROC_NAC_Uncontrolled_Mosaic_of_Schrodinger_Crater.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_allSchrodinger_10mV10eq = { Identifier = "allSchrodinger_10mV10eq", Name = [[LROC NAC Uncontrolled Mosaic of Schrodinger Crater, 10m/px]], @@ -14,6 +16,7 @@ local treks_allSchrodinger_10mV10eq = { Description = [[This is a 10m/px uncontrolled visible image mosaic generated using Lunar Reconnaissance Orbiter Camera (LROC) Narrow Angle Camera (NAC) images from the Lunar Reconnaissance Orbiter mission. Each NAC image was registered horizontally to the LRO's Lunar Orbiter Laser Altimeter (LOLA) global DEM, and then mosaicked together and color balanced.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_allSchrodinger_10mV10eq) end) @@ -25,6 +28,7 @@ end) asset.export("allSchrodinger_10mV10eq", treks_allSchrodinger_10mV10eq) + asset.meta = { Name = [[NASA Treks Layers for Moon LROC_NAC_Uncontrolled_Mosaic_of_Schrodinger_Crater]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_CF_Mosaic.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_CF_Mosaic.asset index 6f9b0e1dee..0ca5945888 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_CF_Mosaic.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_CF_Mosaic.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_Diviner_CF_Filled_Global_8ppd = { Identifier = "LRO_Diviner_CF_Filled_Global_8ppd", Name = [[LRO Diviner CF Mosaic, Filled]], @@ -14,6 +16,7 @@ local treks_LRO_Diviner_CF_Filled_Global_8ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_Diviner_CF_Filled_Global_8ppd) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_Diviner_CF_Filled_Global_8ppd", treks_LRO_Diviner_CF_Filled_Global_8ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_Diviner_CF_Mosaic]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_CF_Mosaic_128ppd.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_CF_Mosaic_128ppd.asset index 956e457f5b..5efd441828 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_CF_Mosaic_128ppd.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_CF_Mosaic_128ppd.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_DIVINER_ClrCF_Global_128ppd = { Identifier = "LRO_DIVINER_ClrCF_Global_128ppd", Name = [[LRO Diviner CF Mosaic 128ppd, Colorized]], @@ -14,6 +16,7 @@ local treks_LRO_DIVINER_ClrCF_Global_128ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_DIVINER_ClrCF_Global_128ppd) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_DIVINER_ClrCF_Global_128ppd", treks_LRO_DIVINER_ClrCF_Global_128ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_Diviner_CF_Mosaic_128ppd]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_Surface_Temp_Avg.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_Surface_Temp_Avg.asset index 2d8c2bcce9..e28d43ba39 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_Surface_Temp_Avg.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_Surface_Temp_Avg.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_Diviner_ST_Avg_Clr_Global_32ppd = { Identifier = "LRO_Diviner_ST_Avg_Clr_Global_32ppd", Name = [[LRO Diviner Surface Temp Avg, Color]], @@ -14,6 +16,7 @@ local treks_LRO_Diviner_ST_Avg_Clr_Global_32ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_Diviner_ST_Avg_Clr_Global_32ppd) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_Diviner_ST_Avg_Clr_Global_32ppd", treks_LRO_Diviner_ST_Avg_Clr_Global_32ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_Diviner_Surface_Temp_Avg]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_Surface_Temp_Normal_Avg.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_Surface_Temp_Normal_Avg.asset index ee4d7da9af..61ef22e1d4 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_Surface_Temp_Normal_Avg.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_Surface_Temp_Normal_Avg.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_Diviner_STN_Avg_Clr_Global_32ppd = { Identifier = "LRO_Diviner_STN_Avg_Clr_Global_32ppd", Name = [[LRO Diviner Surface Temp Normal Avg, Color]], @@ -14,6 +16,7 @@ local treks_LRO_Diviner_STN_Avg_Clr_Global_32ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_Diviner_STN_Avg_Clr_Global_32ppd) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_Diviner_STN_Avg_Clr_Global_32ppd", treks_LRO_Diviner_STN_Avg_Clr_Global_32ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_Diviner_Surface_Temp_Normal_Avg]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_Surface_Temperature_Mosaic_128ppd.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_Surface_Temperature_Mosaic_128ppd.asset index e76af03887..52315d6b92 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_Surface_Temperature_Mosaic_128ppd.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Diviner_Surface_Temperature_Mosaic_128ppd.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_DIVINER_ClrRockFreeSurfaceTemp_Global_128ppd = { Identifier = "LRO_DIVINER_ClrRockFreeSurfaceTemp_Global_128ppd", Name = [[LRO Diviner Surface Temperature Mosaic 128ppd, Colorized]], @@ -14,6 +16,7 @@ local treks_LRO_DIVINER_ClrRockFreeSurfaceTemp_Global_128ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_DIVINER_ClrRockFreeSurfaceTemp_Global_128ppd) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_DIVINER_ClrRockFreeSurfaceTemp_Global_128ppd", treks_LRO_DIVINER_ClrRockFreeSurfaceTemp_Global_128ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_Diviner_Surface_Temperature_Mosaic_128ppd]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LOLA_DEM.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LOLA_DEM.asset index 4c5c65a4e1..11a67102de 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LOLA_DEM.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LOLA_DEM.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_LOLA_ClrShade_Global_128ppd_v04 = { Identifier = "LRO_LOLA_ClrShade_Global_128ppd_v04", Name = [[LRO LOLA DEM, ColorHillshade]], @@ -62,6 +64,7 @@ local treks_LRO_LOLA_ClrShade_SPole875_5mp_v04_EQ = { Description = [[This is version 4 of the LRO LOLA South Pole 87.5 deg DEM, ColorHillshade. This is a colorized shaded-relief of a original polar LOLA Digital Elevation Model (DEM). The DEM is a shape map (radius) of the Moon at a resolution 100 meters per pixel, based on altimetry data acquired through Spetember 2011 by the LOLA instrument. The ground tracks were interpolated using the Generic Mapping Tools programs "surface" and "grdblend". Map values are referred to a radius of 1737400 m.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_LOLA_ClrShade_Global_128ppd_v04) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_LOLA_ClrShade_Global_256ppd_v06) @@ -91,6 +94,7 @@ asset.export("LRO_LOLA_ClrShade_NPole875_5mp_v04_EQ", treks_LRO_LOLA_ClrShade_NP asset.export("LRO_LOLA_ClrShade_SPole875_5mp_v04_EQ", treks_LRO_LOLA_ClrShade_SPole875_5mp_v04_EQ) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LOLA_DEM]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Abundance.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Abundance.asset index fb7bcc4ac6..4761e4c52e 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Abundance.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Abundance.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_CratAbnd_17S173E_150cmp = { Identifier = "LRO_NAC_CratAbnd_17S173E_150cmp", Name = [[LRO LROC Crater Abundance, Aitken Crater]], @@ -190,6 +192,7 @@ local treks_LRO_NAC_CratAbnd_43S349E_150cmp = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_CratAbnd_17S173E_150cmp) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_CratAbnd_13S358E_2mp) @@ -267,6 +270,7 @@ asset.export("LRO_NAC_CratAbnd_20N010E_2mp", treks_LRO_NAC_CratAbnd_20N010E_2mp) asset.export("LRO_NAC_CratAbnd_43S349E_150cmp", treks_LRO_NAC_CratAbnd_43S349E_150cmp) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LROC_Crater_Abundance]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Abundance_Hazard.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Abundance_Hazard.asset index 283c649c11..aa6b876da6 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Abundance_Hazard.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Abundance_Hazard.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_CratAbndHaz_17S173E_150cmp = { Identifier = "LRO_NAC_CratAbndHaz_17S173E_150cmp", Name = [[LRO LROC Crater Abundance Hazard, Aitken Crater]], @@ -190,6 +192,7 @@ local treks_LRO_NAC_CratAbndHaz_43S349E_150cmp = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_CratAbndHaz_17S173E_150cmp) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_CratAbndHaz_13S358E_2mp) @@ -267,6 +270,7 @@ asset.export("LRO_NAC_CratAbndHaz_20N010E_2mp", treks_LRO_NAC_CratAbndHaz_20N010 asset.export("LRO_NAC_CratAbndHaz_43S349E_150cmp", treks_LRO_NAC_CratAbndHaz_43S349E_150cmp) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LROC_Crater_Abundance_Hazard]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Density.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Density.asset index d4c7b7accd..3eb1d16a1f 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Density.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Density.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_CratDen_17S173E_150cmp = { Identifier = "LRO_NAC_CratDen_17S173E_150cmp", Name = [[LRO LROC Crater Density, Aitken Crater]], @@ -190,6 +192,7 @@ local treks_LRO_NAC_CratDen_43S349E_150cmp = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_CratDen_17S173E_150cmp) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_CratDen_13S358E_2mp) @@ -267,6 +270,7 @@ asset.export("LRO_NAC_CratDen_20N010E_2mp", treks_LRO_NAC_CratDen_20N010E_2mp) asset.export("LRO_NAC_CratDen_43S349E_150cmp", treks_LRO_NAC_CratDen_43S349E_150cmp) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LROC_Crater_Density]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Density_Hazard.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Density_Hazard.asset index 43913b5d68..572af75530 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Density_Hazard.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Crater_Density_Hazard.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_CratDenHaz_17S173E_150cmp = { Identifier = "LRO_NAC_CratDenHaz_17S173E_150cmp", Name = [[LRO LROC Crater Density Hazard, Aitken Crater]], @@ -190,6 +192,7 @@ local treks_LRO_NAC_CratDenHaz_43S349E_150cmp = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_CratDenHaz_17S173E_150cmp) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_CratDenHaz_13S358E_2mp) @@ -267,6 +270,7 @@ asset.export("LRO_NAC_CratDenHaz_20N010E_2mp", treks_LRO_NAC_CratDenHaz_20N010E_ asset.export("LRO_NAC_CratDenHaz_43S349E_150cmp", treks_LRO_NAC_CratDenHaz_43S349E_150cmp) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LROC_Crater_Density_Hazard]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_DEM.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_DEM.asset index 7aff2c1b6a..6f036e2175 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_DEM.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_DEM.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_ClrRoughness_15m_17S173E_150cmp = { Identifier = "LRO_NAC_ClrRoughness_15m_17S173E_150cmp", Name = [[LRO LROC DEM, Aitken Crater, 15m Color Roughness]], @@ -350,6 +352,7 @@ local treks_LRO_NAC_ClrRoughness_15m_43S349E_150cmp = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_ClrRoughness_15m_17S173E_150cmp) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_ClrRoughness_15m_13S358E_2mp) @@ -487,6 +490,7 @@ asset.export("LRO_NAC_ClrRoughness_15m_19S129E_150cmp", treks_LRO_NAC_ClrRoughne asset.export("LRO_NAC_ClrRoughness_15m_43S349E_150cmp", treks_LRO_NAC_ClrRoughness_15m_43S349E_150cmp) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LROC_DEM]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Image_Mosaic.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Image_Mosaic.asset index 3d7d93f52e..15a593e4b1 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Image_Mosaic.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Image_Mosaic.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_Mosaic_17S173E_50cmp = { Identifier = "LRO_NAC_Mosaic_17S173E_50cmp", Name = [[LRO LROC Image Mosaic, Aitken Crater]], @@ -278,6 +280,7 @@ local treks_LRO_NAC_Mosaic_43S349E_50cmp = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_Mosaic_17S173E_50cmp) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_Mosaic_13S358E_50cmp) @@ -388,6 +391,7 @@ asset.export("LRO_NAC_Mosaic_19S129E_50cmp", treks_LRO_NAC_Mosaic_19S129E_50cmp) asset.export("LRO_NAC_Mosaic_43S349E_50cmp", treks_LRO_NAC_Mosaic_43S349E_50cmp) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LROC_Image_Mosaic]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Image_Mosaic_26cm.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Image_Mosaic_26cm.asset index 416f353f03..a6658993a5 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Image_Mosaic_26cm.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Image_Mosaic_26cm.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_apollo11_26cm_mosaic_byte_geo_1_2_highContrast = { Identifier = "apollo11_26cm_mosaic_byte_geo_1_2_highContrast", Name = [[LRO LROC Image Mosaic 26cm, Apollo 11]], @@ -14,6 +16,7 @@ local treks_apollo11_26cm_mosaic_byte_geo_1_2_highContrast = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_apollo11_26cm_mosaic_byte_geo_1_2_highContrast) end) @@ -25,6 +28,7 @@ end) asset.export("apollo11_26cm_mosaic_byte_geo_1_2_highContrast", treks_apollo11_26cm_mosaic_byte_geo_1_2_highContrast) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LROC_Image_Mosaic_26cm]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Image_Mosaic_28cm.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Image_Mosaic_28cm.asset index c3f0910886..86b7affc5d 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Image_Mosaic_28cm.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Image_Mosaic_28cm.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_apollo14_28cm_mosaic_byte_geo_1_2_highContrast = { Identifier = "apollo14_28cm_mosaic_byte_geo_1_2_highContrast", Name = [[LRO LROC Image Mosaic 28cm, Apollo 14]], @@ -14,6 +16,7 @@ local treks_apollo14_28cm_mosaic_byte_geo_1_2_highContrast = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_apollo14_28cm_mosaic_byte_geo_1_2_highContrast) end) @@ -25,6 +28,7 @@ end) asset.export("apollo14_28cm_mosaic_byte_geo_1_2_highContrast", treks_apollo14_28cm_mosaic_byte_geo_1_2_highContrast) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LROC_Image_Mosaic_28cm]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Mosaic.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Mosaic.asset index 63d579dd7b..3df8953539 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Mosaic.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Mosaic.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_Mosaic_03N280E_70cm = { Identifier = "LRO_NAC_Mosaic_03N280E_70cm", Name = [[LRO LROC Mosaic, Fresh Crater East of Lents]], @@ -14,6 +16,7 @@ local treks_LRO_NAC_Mosaic_03N280E_70cm = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_Mosaic_03N280E_70cm) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_NAC_Mosaic_03N280E_70cm", treks_LRO_NAC_Mosaic_03N280E_70cm) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LROC_Mosaic]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_NAC_Image_Mosaic.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_NAC_Image_Mosaic.asset index 6d47c51747..1448d2bfbc 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_NAC_Image_Mosaic.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_NAC_Image_Mosaic.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_AvgMosaic_NPole855_1mp_EQ = { Identifier = "LRO_NAC_AvgMosaic_NPole855_1mp_EQ", Name = [[LRO LROC NAC Image Mosaic, N Pole, Avg Merge]], @@ -22,6 +24,7 @@ local treks_LRO_NAC_AvgMosaic_SPole855_1mp_EQ = { Description = [[This is a visible image mosaic generated using Lunar Reconnaissance Orbiter Camera (LROC) Narrow Angle Camera (NAC) images from the Lunar Reconnaissance Orbiter mission. The images were orthorectified using LRO's Lunar Orbiter Laser Altimeter (LOLA) polar 5 meter/pixel DEM. The mosaic is generated at half the resolution at which the individual LROC NAC images were gathered, which is approximately 0.5 meters/pixel. The mosaic was registered horizontally to the LOLA global DEM.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_AvgMosaic_NPole855_1mp_EQ) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_AvgMosaic_SPole855_1mp_EQ) @@ -36,6 +39,7 @@ asset.export("LRO_NAC_AvgMosaic_NPole855_1mp_EQ", treks_LRO_NAC_AvgMosaic_NPole8 asset.export("LRO_NAC_AvgMosaic_SPole855_1mp_EQ", treks_LRO_NAC_AvgMosaic_SPole855_1mp_EQ) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LROC_NAC_Image_Mosaic]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Abundance.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Abundance.asset index 4240d25182..60b5b50712 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Abundance.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Abundance.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_RockAbnd_17S173E_150cmp = { Identifier = "LRO_NAC_RockAbnd_17S173E_150cmp", Name = [[LRO LROC Rock Abundance, Aitken Crater]], @@ -190,6 +192,7 @@ local treks_LRO_NAC_RockAbnd_43S349E_150cmp = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_RockAbnd_17S173E_150cmp) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_RockAbnd_13S358E_2mp) @@ -267,6 +270,7 @@ asset.export("LRO_NAC_RockAbnd_20N010E_2mp", treks_LRO_NAC_RockAbnd_20N010E_2mp) asset.export("LRO_NAC_RockAbnd_43S349E_150cmp", treks_LRO_NAC_RockAbnd_43S349E_150cmp) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LROC_Rock_Abundance]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Abundance_Hazard.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Abundance_Hazard.asset index 87b502da24..1adcbafd4d 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Abundance_Hazard.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Abundance_Hazard.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_RockAbndHaz_17S173E_150cmp = { Identifier = "LRO_NAC_RockAbndHaz_17S173E_150cmp", Name = [[LRO LROC Rock Abundance Hazard, Aitken Crater]], @@ -190,6 +192,7 @@ local treks_LRO_NAC_RockAbndHaz_43S349E_150cmp = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_RockAbndHaz_17S173E_150cmp) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_RockAbndHaz_13S358E_2mp) @@ -267,6 +270,7 @@ asset.export("LRO_NAC_RockAbndHaz_20N010E_2mp", treks_LRO_NAC_RockAbndHaz_20N010 asset.export("LRO_NAC_RockAbndHaz_43S349E_150cmp", treks_LRO_NAC_RockAbndHaz_43S349E_150cmp) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LROC_Rock_Abundance_Hazard]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Density.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Density.asset index 7212a13050..4f0a61c05c 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Density.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Density.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_RockDen_17S173E_150cmp = { Identifier = "LRO_NAC_RockDen_17S173E_150cmp", Name = [[LRO LROC Rock Density, Aitken Crater]], @@ -198,6 +200,7 @@ local treks_LRO_NAC_RockDen_43S349E_150cmp = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_RockDen_17S173E_150cmp) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_RockDen_13S358E_2mp) @@ -278,6 +281,7 @@ asset.export("LRO_NAC_RockDen_20N010E_2mp", treks_LRO_NAC_RockDen_20N010E_2mp) asset.export("LRO_NAC_RockDen_43S349E_150cmp", treks_LRO_NAC_RockDen_43S349E_150cmp) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LROC_Rock_Density]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Density_Hazard.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Density_Hazard.asset index c1066b99b7..5e004a06de 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Density_Hazard.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_LROC_Rock_Density_Hazard.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_RockDenHaz_13S358E_2mp = { Identifier = "LRO_NAC_RockDenHaz_13S358E_2mp", Name = [[LRO LROC Rock Density Hazard, Alphonsus Crater]], @@ -182,6 +184,7 @@ local treks_LRO_NAC_RockDenHaz_43S349E_150cmp = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_RockDenHaz_13S358E_2mp) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_RockDenHaz_73N350E_150cmp) @@ -256,6 +259,7 @@ asset.export("LRO_NAC_RockDenHaz_20N010E_2mp", treks_LRO_NAC_RockDenHaz_20N010E_ asset.export("LRO_NAC_RockDenHaz_43S349E_150cmp", treks_LRO_NAC_RockDenHaz_43S349E_150cmp) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_LROC_Rock_Density_Hazard]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Laser_Altimeter.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Laser_Altimeter.asset index 3e082882a9..d126e5599f 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Laser_Altimeter.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Laser_Altimeter.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_ldam_10 = { Identifier = "ldam_10", Name = [[LRO Laser Altimeter, Albedo Global]], @@ -14,6 +16,7 @@ local treks_ldam_10 = { Description = [[The Lunar Orbiter Laser Altimeter (LOLA) experiment on Lunar Reconnaissance Orbiter (LRO) is a laser altimeter that also measures the strength of the return pulse from the lunar surface. These data have been used to estimate the reflectance (albedo) of the lunar surface, including regions lacking direct solar illumination. A new calibration of these data was used to generate a 2016 albedo map that features lower uncertainties overall and more consistent results in the polar regions than the previous 2014 version. (Improved calibration of reflectance data from the LRO Lunar Orbiter Laser Altimeter (LOLA) and implications for space weathering; M. Lemelin, P.G. Lucey, G.A. Neumann, E.M. Mazarico, M.K. Barker, A. Kakazu, D. Trang, D.E. Smith, M.T. Zuber; Icarus, Volume 273, 15 July 2016, Pages 315-328)]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_ldam_10) end) @@ -25,6 +28,7 @@ end) asset.export("ldam_10", treks_ldam_10) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_Laser_Altimeter]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Mini-RF_Circular_Polarization_Ratio.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Mini-RF_Circular_Polarization_Ratio.asset index ec79095ba5..4441b6e064 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Mini-RF_Circular_Polarization_Ratio.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Mini-RF_Circular_Polarization_Ratio.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_MiniRF_CPR_Gray_Global_128ppd = { Identifier = "LRO_MiniRF_CPR_Gray_Global_128ppd", Name = [[LRO Mini-RF Circular Polarization Ratio, Grayscale]], @@ -14,6 +16,7 @@ local treks_LRO_MiniRF_CPR_Gray_Global_128ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_MiniRF_CPR_Gray_Global_128ppd) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_MiniRF_CPR_Gray_Global_128ppd", treks_LRO_MiniRF_CPR_Gray_Global_128ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_Mini-RF_Circular_Polarization_Ratio]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_ColorHillshade.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_ColorHillshade.asset index 662bec56db..a50a7f8fd3 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_ColorHillshade.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_ColorHillshade.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_20191118demmoseqccolorhillshade = { Identifier = "20191118demmoseqccolorhillshade", Name = [[LRO NAC ColorHillshade, Lacus Mortis]], @@ -14,6 +16,7 @@ local treks_20191118demmoseqccolorhillshade = { Description = [[TBD]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_20191118demmoseqccolorhillshade) end) @@ -25,6 +28,7 @@ end) asset.export("20191118demmoseqccolorhillshade", treks_20191118demmoseqccolorhillshade) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_NAC_ColorHillshade]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_Mosaic.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_Mosaic.asset index ac616fac1d..acd7264e32 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_Mosaic.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_Mosaic.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_20200415_lacusmortis_orthomos_filled_8bit_lzw = { Identifier = "20200415_lacusmortis_orthomos_filled_8bit_lzw", Name = [[LRO NAC Mosaic, Lacus Mortis, Extended Version]], @@ -14,6 +16,7 @@ local treks_20200415_lacusmortis_orthomos_filled_8bit_lzw = { Description = [[This is an orthoimage mosaic produced by combining LROC NAC images, for the southwestern area of Lacus Mortis, including Rimae Bürg and the Lacus Mortis Pit. The images are projected onto a DEM mosaic produced by stereo reconstructions in which each of the images is paired with another LROC NAC.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_20200415_lacusmortis_orthomos_filled_8bit_lzw) end) @@ -25,6 +28,7 @@ end) asset.export("20200415_lacusmortis_orthomos_filled_8bit_lzw", treks_20200415_lacusmortis_orthomos_filled_8bit_lzw) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_NAC_Mosaic]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_Mosaic_0.5mpp.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_Mosaic_0.5mpp.asset index 1d9dd3333b..e5871ce7ea 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_Mosaic_0.5mpp.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_Mosaic_0.5mpp.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_Mosaic_50cmpp_VonKarman_v2 = { Identifier = "LRO_NAC_Mosaic_50cmpp_VonKarman_v2", Name = [[LRO NAC Mosaic 0.5mpp, Von Karman]], @@ -14,6 +16,7 @@ local treks_LRO_NAC_Mosaic_50cmpp_VonKarman_v2 = { Description = [[This is an orthorectified NAC mosaic of the Von Karman Crater region for the south pole of the Moon. This mosaic includes a total of 370 orthorectified NAC images: 252 sampled at 0.5 m/px and 118 sampled at 1 m/px. NAC orthoimages have been constructed from EDRs downloaded from the Planetary Data System (PDS) and subsequent USGS-ISIS processing. This mosaic has been coaligned to Chang'e-2 20 m/px DEM which has been coaligned to the USGS 59 m/px LOLA-SELENE DEM using ENVI (v5.6.2) patented auto-coreg. Most of the area used stereo-photogrammetrically processing of LROC-NAC stereo-pairs with the UCL CASPGO 3D mapping system, CASP-GO is described in Tao, Y., Muller, J.-P. et al. (2018) Massive Stereo-based DTM Production for Mars on Cloud Computers. Planetary Space Science 154, 30-58 (2018). doi: 10.1016/j.pss.2018.02.012 and CASP-GO is now integrated into ASP (https://stereopipeline.readthedocs.io/en/latest/experimental.html?highlight=casp-go#the-casp-go-stereo-processing-system) as part of the NASA PDART program. Individual NAC orthoimages mosaicked together using ArcGIS Pro (v2.9.2). A color balancing algorithm has been applied to roughly correct for color differences at the seams of NAC images. This data has been made available by and should be credited to: Yu Tao and Jan-Peter Muller, Imaging Group, Mullard Space Science Laboratory, University College London.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_Mosaic_50cmpp_VonKarman_v2) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_NAC_Mosaic_50cmpp_VonKarman_v2", treks_LRO_NAC_Mosaic_50cmpp_VonKarman_v2) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_NAC_Mosaic_0.5mpp]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_Mosaic_1mpp.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_Mosaic_1mpp.asset index 594e5d20be..5b6d6f2fb3 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_Mosaic_1mpp.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_Mosaic_1mpp.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_Mosaic_1mpp = { Identifier = "LRO_NAC_Mosaic_1mpp", Name = [[LRO NAC Mosaic 1mpp, Von Karman]], @@ -14,6 +16,7 @@ local treks_LRO_NAC_Mosaic_1mpp = { Description = [[This is an orthorectified NAC mosaic of the Von Karman Crater region for the south pole of the Moon. This mosaic includes 118 individual orthorectified NAC images sampled at 1 m/px. NAC orthoimages have been constructed from EDRs downloaded from the Planetary Data System (PDS) and subsequent USGS-ISIS processing. This mosaic has been coaligned to Chang’e 2 20 m/px DEM which has been coaligned to the USGS 59 m/px LOLA-SELENE DEM using ENVI (v5.6.2) patented auto-coreg. Individual NAC orthoimages have been mosaicked together using ArcGIS Pro (v2.9.0). A color balancing algorithm has been applied to roughly correct for color differences at the seams of NAC images. This data has been made available by and should be credited to: Yu Tao and Jan-Peter Muller, Imaging Group, Mullard Space Science Laboratory, University College London.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_Mosaic_1mpp) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_NAC_Mosaic_1mpp", treks_LRO_NAC_Mosaic_1mpp) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_NAC_Mosaic_1mpp]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_PSR_Mosaic_20mpp.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_PSR_Mosaic_20mpp.asset index e8468a7ade..4d4ca5da2a 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_PSR_Mosaic_20mpp.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_PSR_Mosaic_20mpp.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_NAC_POLE_PSR_NORTH_STRETCH_EQ = { Identifier = "NAC_POLE_PSR_NORTH_STRETCH_EQ", Name = [[LRO NAC PSR Mosaic 20mpp, N Pole]], @@ -22,6 +24,7 @@ local treks_NAC_POLE_PSR_SOUTH_STRETCH_EQ = { Description = [[This is an uncontrolled mosaic generated from images taken by the Narrow Angle Camera (NAC) onboard the Lunar Reconnaissance Orbiter (LRO) for the South Pole region of the Moon. The NAC mosaics have been trimmed to the Permanently Shadowed Region (PSR) shapefile, providing visible NAC image coverage of the PSRs only. Acquisition of NAC PSR observations were optimized over several campaigns to maximize signal-to-noise ratio (SNR), resulting in a comprehensive dataset that is systematically reviewed and analyzed. Observations are acquired at a variety of pixel scales (2 to 20 m/px). The final PSR mosaics are assembled from re-sampled images to 20 m/px, and ordering of images is based on image quality and areal coverage of individual PSRs. A total of 550 NAC images were used to create a South Pole PSR mosaic at 20 m/px, 90° to 80° latitude, and -180° to 180° longitude. This mosaic has been merged with the existing LROC NAC South Pole RDR product to replace over-saturated illuminated polar areas.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_NAC_POLE_PSR_NORTH_STRETCH_EQ) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_NAC_POLE_PSR_SOUTH_STRETCH_EQ) @@ -36,6 +39,7 @@ asset.export("NAC_POLE_PSR_NORTH_STRETCH_EQ", treks_NAC_POLE_PSR_NORTH_STRETCH_E asset.export("NAC_POLE_PSR_SOUTH_STRETCH_EQ", treks_NAC_POLE_PSR_SOUTH_STRETCH_EQ) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_NAC_PSR_Mosaic_20mpp]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_and_CE-2_CCD_Mosaic_1mpp.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_and_CE-2_CCD_Mosaic_1mpp.asset index 28a4a8af70..072db19e9b 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_and_CE-2_CCD_Mosaic_1mpp.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_NAC_and_CE-2_CCD_Mosaic_1mpp.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_CE2_Mosaic_1mpp = { Identifier = "LRO_NAC_CE2_Mosaic_1mpp", Name = [[LRO NAC and CE-2 CCD Mosaic 1mpp, Von Karman]], @@ -14,6 +16,7 @@ local treks_LRO_NAC_CE2_Mosaic_1mpp = { Description = [[This is an orthorectified NAC and Chang’e-2 mosaic of the Von Karman Crater region for the south pole of the Moon. This mosaic includes 118 individual orthorectified NAC images sampled at 1 m/px and has been mosaicked on top of the respective Chang’e 7 m/px orthomosaic. NAC orthoimages have been constructed from EDRs downloaded from the Planetary Data System (PDS) and subsequent USGS-ISIS processing. This mosaic has been coaligned to Chang’e-2 20 m/px DEM which has been coaligned to the USGS 59 m/px LOLA-SELENE DEM using ENVI (v5.6.2) patented auto-coreg. Individual NAC orthoimages and the underlying Chang’e ortho product have been mosaicked together using ArcGIS Pro (v2.9.0). A color balancing algorithm has been applied to roughly correct for color differences at the seams of NAC images. This data has been made available by and should be credited to: Yu Tao and Jan-Peter Muller, Imaging Group, Mullard Space Science Laboratory, University College London.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_CE2_Mosaic_1mpp) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_NAC_CE2_Mosaic_1mpp", treks_LRO_NAC_CE2_Mosaic_1mpp) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_NAC_and_CE-2_CCD_Mosaic_1mpp]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Narrow_Angle_Camera.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Narrow_Angle_Camera.asset index b935c34b4e..4ca1d55652 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Narrow_Angle_Camera.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_Narrow_Angle_Camera.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_NAC_Apollo11_Mosaic_p = { Identifier = "LRO_NAC_Apollo11_Mosaic_p", Name = [[LRO Narrow Angle Camera, Apollo 11 Landing Site]], @@ -234,6 +236,7 @@ local treks_NAC_DTM_APOLLO17_SLOPE = { Description = [[This is a color slope map derived from a 5m Digital Terrain Model (DTM) of the Apollo 17 landing site created with Narrow Angle Camera (NAC) stereo image pairs from the Lunar Reconnaissance Orbiter Camera (LROC) aboard the Lunar Reconnaissance Orbiter (LRO). Image is 3-channel RGB TIFF, 8 bits/sample, 3 samples/pixel in single image plane configuration]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_Apollo11_Mosaic_p) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_NAC_Apollo12_Mosaic_p) @@ -317,6 +320,7 @@ asset.export("small_tranq_skylight_2", treks_small_tranq_skylight_2) asset.export("NAC_DTM_APOLLO17_SLOPE", treks_NAC_DTM_APOLLO17_SLOPE) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_Narrow_Angle_Camera]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_WAC-GLD100_DEM.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_WAC-GLD100_DEM.asset index a9d8553a85..78c5c10943 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_WAC-GLD100_DEM.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_WAC-GLD100_DEM.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_WACGLD100_Gray_79S79N_256ppd = { Identifier = "LRO_WACGLD100_Gray_79S79N_256ppd", Name = [[LRO WAC-GLD100 DEM, Grayscale]], @@ -14,6 +16,7 @@ local treks_LRO_WACGLD100_Gray_79S79N_256ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_WACGLD100_Gray_79S79N_256ppd) end) @@ -25,6 +28,7 @@ end) asset.export("LRO_WACGLD100_Gray_79S79N_256ppd", treks_LRO_WACGLD100_Gray_79S79N_256ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_WAC-GLD100_DEM]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_WAC_GLD100_DEM.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_WAC_GLD100_DEM.asset index f75243f26a..2ae126aa57 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_WAC_GLD100_DEM.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_WAC_GLD100_DEM.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_LRO_WACGLD100_ClrShade_79S79N_256ppd = { Identifier = "LRO_WACGLD100_ClrShade_79S79N_256ppd", Name = [[LRO WAC GLD100 DEM, ColorHillShade]], @@ -22,6 +24,7 @@ local treks_LRO_WACGLD100_Shade_79S79N_256ppd = { Description = [[]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_WACGLD100_ClrShade_79S79N_256ppd) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_LRO_WACGLD100_Shade_79S79N_256ppd) @@ -36,6 +39,7 @@ asset.export("LRO_WACGLD100_ClrShade_79S79N_256ppd", treks_LRO_WACGLD100_ClrShad asset.export("LRO_WACGLD100_Shade_79S79N_256ppd", treks_LRO_WACGLD100_Shade_79S79N_256ppd) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_WAC_GLD100_DEM]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_and_Kaguya_Multi_Instruments_1895.21mpp.asset b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_and_Kaguya_Multi_Instruments_1895.21mpp.asset index e63b500a19..1e1d93ef26 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_and_Kaguya_Multi_Instruments_1895.21mpp.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/nasa-treks/LRO_and_Kaguya_Multi_Instruments_1895.21mpp.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/earth/moon/moon").Moon.Identifier + + local treks_3He_Dig_Here_Layer = { Identifier = "3He_Dig_Here_Layer", Name = [[LRO and Kaguya Multi Instruments 1895.21mpp, 3He Dig Here]], @@ -46,6 +48,7 @@ local treks_3He_Very_Likely_Layer = { Description = [[This data represents potential Helium-3 deposits and other solar wind implanted volatiles on the Moon. This data layer has been generated by querying specific criteria from the following datasets: Titanium Oxide (TiO2) abundance from Lunar Reconnaissance Orbiter’s (LRO) Wide-Angle Camera (WAC), Optical Maturity Index (OMAT) from Kaguya Lunar Multiband Imager (MI), slope from LRO’s Lunar Orbital Laser Altimeter (LOLA), and Rock Abundance from LRO’s Lunar Radiometer Experiment (DIVINER). For this “Very Likely” layer, the following criteria has been applied: TiO2 > 6.0%, OMAT < 0.20, Slope < 12°, and rock abundance < 0.06%. The research on Helium-3 as a potential use for fuel for a fusion cell and the data presented as a result of this research culminated as an outcome of a group project at the Colorado School of Mines. The research for this data should be credited to: Stewart Ray, Colleen Olson, Lisa Robibero, Steven Coutts, and Maxwell Sissman of the Planetary and Terrestrial Mining Sciences Symposium and Space Resources Roundtable, Colorado School of Mines.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_3He_Dig_Here_Layer) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_3He_Likely_Layer) @@ -69,6 +72,7 @@ asset.export("3He_Most_Likely_Layer", treks_3He_Most_Likely_Layer) asset.export("3He_Very_Likely_Layer", treks_3He_Very_Likely_Layer) + asset.meta = { Name = [[NASA Treks Layers for Moon LRO_and_Kaguya_Multi_Instruments_1895.21mpp]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/other_comm.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/other_comm.asset index dd9d8a7180..ab09abef8a 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/other_comm.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/other_comm.asset @@ -32,6 +32,7 @@ local OtherCommunicationSatellites = { } } + asset.onInitialize(function() openspace.addSceneGraphNode(OtherCommunicationSatellites) end) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/planet.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/planet.asset index b28fe2cc53..c9148ea6a7 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/planet.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/planet.asset @@ -32,6 +32,7 @@ local PlanetSatellites = { } } + asset.onInitialize(function() openspace.addSceneGraphNode(PlanetSatellites) end) diff --git a/data/assets/scene/solarsystem/planets/jupiter/default_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/default_layers.asset index 31ad1ab6eb..6ba6b9bf7c 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/default_layers.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/default_layers.asset @@ -1,6 +1,7 @@ asset.require("./layers/colorlayers/jupiter_texture", true) + asset.meta = { Name = "Default Jupiter Layers", Description = "Default Jupiter layers are: Jupiter Texture", diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/default_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/default_layers.asset index a99800dbd1..b3f4f701d7 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/europa/default_layers.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/europa/default_layers.asset @@ -9,7 +9,6 @@ asset.meta = { Name = "Default Europa Layers", Description = [[Default Europa layers are: Europa Texture & Voyager Global Mosaic. - Layers loaded from all available servers ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/voyager_global_mosaic_local.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/voyager_global_mosaic_local.asset index c4f4c5244e..97781587b5 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/voyager_global_mosaic_local.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/voyager_global_mosaic_local.asset @@ -19,6 +19,7 @@ local Layer = { BlendMode = "Color" } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globe.Europa.Identifier, "ColorLayers", Layer) end) diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/layers/local_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/local_layers.asset index 4a2fe473f1..c043b14dd3 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/europa/layers/local_layers.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/local_layers.asset @@ -7,7 +7,6 @@ asset.meta = { Name = "Default Europa Layers (Local)", Description = [[Default Europa layers are: Europa Texture & Voyager Global Mosaic. - Layers only loaded locally ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/layers/newyork_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/newyork_layers.asset index bdba5d78d2..13bef07189 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/europa/layers/newyork_layers.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/newyork_layers.asset @@ -7,7 +7,6 @@ asset.meta = { Name = "Default Europa Layers (New York)", Description = [[Default Europa layers are: Europa Texture & Voyager Global Mosaic. - Layers only loaded from the New York server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/layers/sweden_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/sweden_layers.asset index 29809a8bb3..d1daae51d5 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/europa/layers/sweden_layers.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/sweden_layers.asset @@ -7,7 +7,6 @@ asset.meta = { Name = "Default Europa Layers (Sweden)", Description = [[Default Europa layers are: Europa Texture & Voyager Global Mosaic. - Layers only loaded from the Sweden server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/jupiter/kernels.asset b/data/assets/scene/solarsystem/planets/jupiter/kernels.asset index 11df00395a..da4665c9ba 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/kernels.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/kernels.asset @@ -36,6 +36,7 @@ asset.export("ID", ID) asset.export("Frame", Frame) + asset.meta = { Name = "Jupiter Spice Kernels", Description = "Generic SPICE kernels for Jupiter", diff --git a/data/assets/scene/solarsystem/planets/jupiter/minor/ananke_group.asset b/data/assets/scene/solarsystem/planets/jupiter/minor/ananke_group.asset index af343c41f8..7c6e31f410 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/minor/ananke_group.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/minor/ananke_group.asset @@ -1745,6 +1745,7 @@ local S2003J12Label = { } } + asset.onInitialize(function() openspace.addSceneGraphNode(S2010J2) openspace.addSceneGraphNode(S2010J2Trail) diff --git a/data/assets/scene/solarsystem/planets/jupiter/minor/pasiphae_group.asset b/data/assets/scene/solarsystem/planets/jupiter/minor/pasiphae_group.asset index 3737f36155..e31425a8f2 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/minor/pasiphae_group.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/minor/pasiphae_group.asset @@ -2288,6 +2288,7 @@ asset.export(S2003J23Trail) asset.export(S2003J23Label) + asset.meta = { Name = "Jupiter Pasiphae Group Moons", Description = [[Procedural Globe asset containing Jupiter's Pasiphae Group moons: diff --git a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MEX_HRSC.asset b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MEX_HRSC.asset index 361de68b0e..81d17e3e2f 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MEX_HRSC.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MEX_HRSC.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mars/mars").Mars.Identifier + + local treks_hrsc_dem_martian_east = { Identifier = "hrsc_dem_martian_east", Name = [[MEX HRSC, Martian Path Eastern Section DEM]], @@ -22,6 +24,7 @@ local treks_MC11E11_HRDTMAR_DA5 = { Description = [[This layer is a greyscale mosaic assembled using data from the High Resolution Stereo Camera aboard the European Space Agency's Mars Express orbiter. HRSC is being used to obtain color and stereo images that will map 100% of Mars' surface at resolution better than 30 m/pixel, and 50% of the surface at better than 15 m/pixel. Each of the nine CCD lines of HRSC, a linescan imager (pushbroom camera), contains 5184 pixels. The channels consist of red, green, blue, near-infrared, three stereo channels (backward, nadir, and forward) and two photometric channels. The digital elevation model used for this layer is a combination of data derived from the HRSC and the Mars Orbiter Laser Altimeter.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_hrsc_dem_martian_east) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_MC11E11_HRDTMAR_DA5) @@ -36,6 +39,7 @@ asset.export("hrsc_dem_martian_east", treks_hrsc_dem_martian_east) asset.export("MC11E11_HRDTMAR_DA5", treks_MC11E11_HRDTMAR_DA5) + asset.meta = { Name = [[NASA Treks Layers for Mars MEX_HRSC]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_MOC_Atlas.asset b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_MOC_Atlas.asset index 916faaca68..d90fc9ab41 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_MOC_Atlas.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_MOC_Atlas.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mars/mars").Mars.Identifier + + local treks_msss_atlas_simp_clon = { Identifier = "msss_atlas_simp_clon", Name = [[MGS MOC Atlas, Global Color Mosaic]], @@ -16,6 +18,7 @@ local treks_msss_atlas_simp_clon = { The Mars Orbiter Camera (MOC) consisted of 3 instruments. A black-and-white narrow angle camera captured high resolution images (typically 1.5 to 12 m per pixel) and red and blue wide angle cameras for context (240 m per pixel) and daily global imaging (7.5 km per pixel). This mosaic was assembled from Wide Angle red images (primarily those acquired in May-June 1999) from the Mars Orbiter Camera.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_msss_atlas_simp_clon) end) @@ -27,6 +30,7 @@ end) asset.export("msss_atlas_simp_clon", treks_msss_atlas_simp_clon) + asset.meta = { Name = [[NASA Treks Layers for Mars MGS_MOC_Atlas]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_MOLA.asset b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_MOLA.asset index fa2732925a..9f9f3a2682 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_MOLA.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_MOLA.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mars/mars").Mars.Identifier + + local treks_Mars_MGS_MOLA_ClrShade_merge_global_463m = { Identifier = "Mars_MGS_MOLA_ClrShade_merge_global_463m", Name = [[MGS MOLA, Global Color Hillshade]], @@ -36,6 +38,7 @@ local treks_mola_roughness = { Description = [[The Mars Orbiter Laser Altimeter (MOLA) aboard the Mars Global Surveyor (MGS) spacecraft, made precise altimetry measurements from orbit around Mars from September 1997 to June, 2001. The MOLA instrument transmitted infrared laser pulses towards Mars at a rate of 10 times per second, and measured the time of flight to determine the range (distance) of the MGS spacecraft to the Martian surface. The range measurements resulted in precise topographic maps of Mars. This kilometer-scale global roughness map is presented as an RGB composite image. The Blue, Green and Red channels contain roughness at 0.6 km, 2.4 km, and 9.2 km baselines. Brighter shades denote rougher surface. Thus, general brightness denotes general roughness, and color hue denotes the nature of the scale dependence of roughness. Map resolution/scale: 8 ppd/7.5km. Kreslavsky and Head, 2000, JGR, VOL. 105, NO. Ell, PAGES 26,695-26,711]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Mars_MGS_MOLA_ClrShade_merge_global_463m) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_mola128_mola64_merge_90Nto90S_SimpleC_clon0) @@ -53,6 +56,7 @@ asset.export("mola128_mola64_merge_90Nto90S_SimpleC_clon0", treks_mola128_mola64 asset.export("mola_roughness", treks_mola_roughness) + asset.meta = { Name = [[NASA Treks Layers for Mars MGS_MOLA]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_MOLA_and_Mars_Express_HRSC.asset b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_MOLA_and_Mars_Express_HRSC.asset index aa7cbe10e0..ad914beb2e 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_MOLA_and_Mars_Express_HRSC.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_MOLA_and_Mars_Express_HRSC.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mars/mars").Mars.Identifier + + local treks_Mars_MOLA_blend200ppx_HRSC_ClrShade_clon0dd_200mpp_lzw = { Identifier = "Mars_MOLA_blend200ppx_HRSC_ClrShade_clon0dd_200mpp_lzw", Name = [[MGS MOLA and Mars Express HRSC, Color Hillshade Blend]], @@ -34,6 +36,7 @@ HRSC, the only dedicated stereo camera orbiting Mars, is a multi-sensor push bro R. Jaumann, et al. (2007), The high-resolution stereo camera (HRSC) experiment on Mars Express: instrument aspects and experiment conduct from interplanetary cruise through the nominal mission, Planet. Space Sci., 55 (7-8) (2007), pp. 928-952]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Mars_MOLA_blend200ppx_HRSC_ClrShade_clon0dd_200mpp_lzw) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Mars_MOLA_blend200ppx_HRSC_Shade_clon0dd_200mpp_lzw) @@ -48,6 +51,7 @@ asset.export("Mars_MOLA_blend200ppx_HRSC_ClrShade_clon0dd_200mpp_lzw", treks_Mar asset.export("Mars_MOLA_blend200ppx_HRSC_Shade_clon0dd_200mpp_lzw", treks_Mars_MOLA_blend200ppx_HRSC_Shade_clon0dd_200mpp_lzw) + asset.meta = { Name = [[NASA Treks Layers for Mars MGS_MOLA_and_Mars_Express_HRSC]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_TES.asset b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_TES.asset index 6acec704b7..4138866f9b 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_TES.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MGS_TES.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mars/mars").Mars.Identifier + + local treks_TES_Dust = { Identifier = "TES_Dust", Name = [[MGS TES, Global Dust]], @@ -51,6 +53,7 @@ local treks_TES_Thermal_Inertia = { Description = [[The Thermal Emission Spectrometer (TES) is one of the instruments aboard the Mars Global Surveyor spacecraft. TES is designed to measure the thermal infrared energy (heat) emitted from Mars. This technique, called thermal emission spectroscopy, can tell us much about the geology and atmosphere of Mars. One of the objectives of the MGS TES instrument is the derivation of thermal inertia of the surface at 3-km spatial resolution. Thermal inertia represents the ability of a material to conduct and store heat, and in the context of planetary science, it is a measure of the subsurface's ability to store heat during the day and reradiate it during the night. While compositional differences (ie, mineralogy) will have some effect, for a terrestrial planetary surface such as that of Mars, thermal inertia will depend predominantly on the physical properties of the near surface materials such as particle size, degree of induration (ie, cementation of grains), rock abundance, and exposure of bedrock (rocks will have a much higher thermal inertia than sand or dust - that is, it takes longer to heat rocks up during the day and to cool them off at night). For example, on a visit to the desert you may notice that sandy areas are much hotter at midday than adjacent rocks, and the sand cools off quickly after sunset whereas the rocks remain warm well into the evening. Map resolution/scale: 20 ppd/3km. Putzig et al, 2005, Icarus 173, 325-341]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_TES_Dust) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_tes_ruffdust) @@ -77,6 +80,7 @@ asset.export("TES_Glass_Clay", treks_TES_Glass_Clay) asset.export("TES_Thermal_Inertia", treks_TES_Thermal_Inertia) + asset.meta = { Name = [[NASA Treks Layers for Mars MGS_TES]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MO_THEMIS-IR_Day.asset b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MO_THEMIS-IR_Day.asset index 6fe34d09d3..34b8d36adb 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MO_THEMIS-IR_Day.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MO_THEMIS-IR_Day.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mars/mars").Mars.Identifier + + local treks_THEMIS_DayIR_ControlledMosaics_100m_v2_oct2018 = { Identifier = "THEMIS_DayIR_ControlledMosaics_100m_v2_oct2018", Name = [[MO THEMIS-IR Day, Global Mosaic]], @@ -14,6 +16,7 @@ local treks_THEMIS_DayIR_ControlledMosaics_100m_v2_oct2018 = { Description = [[This data was acquired using the Thermal Emission Imaging System instrument aboard NASA's Mars Odyssey spacecraft. Odyssey was launched on April 7, 2001 and arrived at Mars on October 24, 2001. It maintains a polar orbit around Mars with an altitude of about 3,800 km or 2,400 miles. Odyssey's mission includes studying the mineralogy of Mars' surface (especially looking at minerals formed in the presence of water), detecting water and shallow buried ice, and studying the radiation environment. The Thermal Emission Imaging System (THEMIS) instrument is a camera system that gathers data in infrared and visible light. The infrared images sample nine different wavelengths allowing spectra to be constructed and compositions of imaged surfaces to be inferred. Daytime infrared Themis images typically emphasize topography, with warmer sunward slopes being brighter than cooler shaded slopes. Nighttime Themis images emphasize differences in thermal inertia between areas being observed, giving insights into the physical characteristics of the surfaces. This map is a THEMIS daytime infrared map. The 2017 release featured preliminary geodetically controlled mosaics tied to a known coordinate system (USGS Viking Orbiter MDIM 2.1), spatially adjusted to align feature boundaries, and orthoprojected at 100 m/pixel scale. Further adjustments have been processed for the 2018 release of this final mosaic.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_THEMIS_DayIR_ControlledMosaics_100m_v2_oct2018) end) @@ -25,6 +28,7 @@ end) asset.export("THEMIS_DayIR_ControlledMosaics_100m_v2_oct2018", treks_THEMIS_DayIR_ControlledMosaics_100m_v2_oct2018) + asset.meta = { Name = [[NASA Treks Layers for Mars MO_THEMIS-IR_Day]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MO_THEMIS-IR_Night.asset b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MO_THEMIS-IR_Night.asset index 803d9898f5..7cc37f22ef 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MO_THEMIS-IR_Night.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MO_THEMIS-IR_Night.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mars/mars").Mars.Identifier + + local treks_THEMIS_NightIR_ControlledMosaics_100m_v2_oct2018 = { Identifier = "THEMIS_NightIR_ControlledMosaics_100m_v2_oct2018", Name = [[MO THEMIS-IR Night, Global Mosaic]], @@ -14,6 +16,7 @@ local treks_THEMIS_NightIR_ControlledMosaics_100m_v2_oct2018 = { Description = [[This data was acquired using the Thermal Emission Imaging System instrument aboard NASA's Mars Odyssey spacecraft. Odyssey was launched on April 7, 2001 and arrived at Mars on October 24, 2001. It maintains a polar orbit around Mars with an altitude of about 3,800 km or 2,400 miles. Odyssey's mission includes studying the mineralogy of Mars' surface (especially looking at minerals formed in the presence of water), detecting water and shallow buried ice, and studying the radiation environment. The Thermal Emission Imaging System (THEMIS) instrument is a camera system that gathers data in infrared and visible light. The infrared images sample nine different wavelengths allowing spectra to be constructed and compositions of imaged surfaces to be inferred. Daytime infrared Themis images typically emphasize topography, with warmer sunward slopes being brighter than cooler shaded slopes. Nighttime Themis images emphasize differences in thermal inertia between areas being observed, giving insights into the physical characteristics of the surfaces. This map is a THEMIS nighttime infrared map. The 2017 release featured preliminary geodetically controlled mosaics tied to a known coordinate system (USGS Viking Orbiter MDIM 2.1), spatially adjusted to align feature boundaries, and orthoprojected at 100 m/pixel scale. Further adjustments have been processed for the 2018 release of this final mosaic.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_THEMIS_NightIR_ControlledMosaics_100m_v2_oct2018) end) @@ -25,6 +28,7 @@ end) asset.export("THEMIS_NightIR_ControlledMosaics_100m_v2_oct2018", treks_THEMIS_NightIR_ControlledMosaics_100m_v2_oct2018) + asset.meta = { Name = [[NASA Treks Layers for Mars MO_THEMIS-IR_Night]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MRO_CTX.asset b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MRO_CTX.asset index 0d3d4f13a0..4fb6cfd830 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MRO_CTX.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MRO_CTX.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mars/mars").Mars.Identifier + + local treks_b21_017819_2025_xn_22n048w = { Identifier = "b21_017819_2025_xn_22n048w", Name = [[MRO CTX, 22n048w Mosaic]], @@ -495,6 +497,7 @@ local treks_Zephyria_CTX_BlockAdj_dd = { The Context Camera (CTX) provides black-and-white images with resolutions up to 6 meters/pixel. It provides broader context maps for the higher resolution but narrower fields of view of the HiRISE camera, as well as for other instruments aboard MRO, and is useful for producing mosaicked images of larger areas on Mars' surface.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_b21_017819_2025_xn_22n048w) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Acheron_Fossae_CTX_BlockAdj_dd) @@ -650,6 +653,7 @@ asset.export("Noachis_CTX_BlockAdj_dd", treks_Noachis_CTX_BlockAdj_dd) asset.export("Zephyria_CTX_BlockAdj_dd", treks_Zephyria_CTX_BlockAdj_dd) + asset.meta = { Name = [[NASA Treks Layers for Mars MRO_CTX]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MRO_HiRISE.asset b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MRO_HiRISE.asset index e61d671e02..088c533a72 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MRO_HiRISE.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MRO_HiRISE.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mars/mars").Mars.Identifier + + local treks_DTEEC_001918_1735_001984_1735_U01_longlat = { Identifier = "DTEEC_001918_1735_001984_1735_U01_longlat", Name = [[MRO HiRISE, 001918_1735_001984_1735 DEM]], @@ -236,6 +238,7 @@ local treks_PSP_001501_2280_RED = { The High Resolution Imaging Science Experiment (HiRISE) camera utilizes a 0.5-meter telescope to obtain very high resolution images of Martian landforms and terrains. From an altitude of 300 km, HiRISE has a resolution of 0.3 meters per pixel. In addition to being used for getting very detailed images of surface features, pairs of slightly offset HiRISE images are combined to produce precise digital elevation models of Martian topography.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_DTEEC_001918_1735_001984_1735_U01_longlat) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_DTEED_042014_1760_042647_1760_A01) @@ -307,6 +310,7 @@ asset.export("PSP_001521_2025_RED", treks_PSP_001521_2025_RED) asset.export("PSP_001501_2280_RED", treks_PSP_001501_2280_RED) + asset.meta = { Name = [[NASA Treks Layers for Mars MRO_HiRISE]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MSL.asset b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MSL.asset index e8270d4d82..d1b1931272 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MSL.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/MSL.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mars/mars").Mars.Identifier + + local treks_mars_pahrump_patch_8k_256m = { Identifier = "mars_pahrump_patch_8k_256m", Name = [[MSL, Pahrump Hills]], @@ -14,6 +16,7 @@ local treks_mars_pahrump_patch_8k_256m = { Description = [[This layer is a greyscale mosaic assembled using data from the High Resolution Stereo Camera aboard the European Space Agency's Mars Express orbiter. HRSC is being used to obtain color and stereo images that will map 100% of Mars' surface at resolution better than 30 m/pixel, and 50% of the surface at better than 15 m/pixel. Each of the nine CCD lines of HRSC, a linescan imager (pushbroom camera), contains 5184 pixels. The channels consist of red, green, blue, near-infrared, three stereo channels (backward, nadir, and forward) and two photometric channels. The digital elevation model used for this layer is a combination of data derived from the HRSC and the Mars Orbiter Laser Altimeter.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_mars_pahrump_patch_8k_256m) end) @@ -25,6 +28,7 @@ end) asset.export("mars_pahrump_patch_8k_256m", treks_mars_pahrump_patch_8k_256m) + asset.meta = { Name = [[NASA Treks Layers for Mars MSL]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/Mars_Express_HRSC.asset b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/Mars_Express_HRSC.asset index 1ab311dfe0..26539e06ed 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/Mars_Express_HRSC.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/Mars_Express_HRSC.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mars/mars").Mars.Identifier + + local treks_HRSC_Martian_east = { Identifier = "HRSC_Martian_east", Name = [[Mars Express HRSC, Martian Path Eastern Section Color Mosaic]], @@ -62,6 +64,7 @@ local treks_h1394_0000_nd3 = { Description = [[This layer is a greyscale mosaic assembled using data from the High Resolution Stereo Camera aboard the European Space Agency's Mars Express orbiter. HRSC is being used to obtain color and stereo images that will map 100% of Mars' surface at resolution better than 30 m/pixel, and 50% of the surface at better than 15 m/pixel. Each of the nine CCD lines of HRSC, a linescan imager (pushbroom camera), contains 5184 pixels. The channels consist of red, green, blue, near-infrared, three stereo channels (backward, nadir, and forward) and two photometric channels. The digital elevation model used for this layer is a combination of data derived from the HRSC and the Mars Orbiter Laser Altimeter.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_HRSC_Martian_east) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_MC11E_HRMOSCO_COL) @@ -91,6 +94,7 @@ asset.export("h2942_0000_nd3", treks_h2942_0000_nd3) asset.export("h1394_0000_nd3", treks_h1394_0000_nd3) + asset.meta = { Name = [[NASA Treks Layers for Mars Mars_Express_HRSC]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/Mars_Reconnaissance_Orbiter_CTX.asset b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/Mars_Reconnaissance_Orbiter_CTX.asset index c8aa9d488b..6c4c1de974 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/Mars_Reconnaissance_Orbiter_CTX.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/nasa-treks/Mars_Reconnaissance_Orbiter_CTX.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mars/mars").Mars.Identifier + + local treks_CTX_ClrSlope_8bit_12S182E_24mp_P22_009609_1674_B02_010453_1675 = { Identifier = "CTX_ClrSlope_8bit_12S182E_24mp_P22_009609_1674_B02_010453_1675", Name = [[Mars Reconnaissance Orbiter CTX, Color Slope Apollinaris 12S182E]], @@ -871,6 +873,7 @@ Mayer, D. P., E. S. Kite, 2016, An Integrated Workflow for Producing Digital Ter Slopes were derived using the Python script called gdal_baseline_slope.py: https://github.com/USGS-Astrogeology/GDAL_scripts/blob/master/gdal_baseline_slope ]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_CTX_ClrSlope_8bit_12S182E_24mp_P22_009609_1674_B02_010453_1675) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_CTX_ClrSlope_8bit_13S182E_24mp_G15_024127_1673_G16_024483_1673) @@ -1068,6 +1071,7 @@ asset.export("CTX_Slope_13S182E_24mp_G15_024127_1673_G16_024483_1673", treks_CTX asset.export("CTX_Slope_14S184E_24mp_B01_009886_1658_P21_009385_1658", treks_CTX_Slope_14S184E_24mp_B01_009886_1658_P21_009385_1658) + asset.meta = { Name = [[NASA Treks Layers for Mars Mars_Reconnaissance_Orbiter_CTX]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mars/layers/newyork_layers.asset b/data/assets/scene/solarsystem/planets/mars/layers/newyork_layers.asset index 6ef0ec008c..20b3e5ed1e 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/newyork_layers.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/newyork_layers.asset @@ -19,7 +19,6 @@ asset.meta = { Themis IR Day, Themis IR Night, CTX Mosaic, MDEM200M (3D), HiRISE Local Set DEM (3D), Mola Elevation (3D), Tile Indicies, and Size Reference. - Layers only loaded from the New York server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/mars/layers/sweden_layers.asset b/data/assets/scene/solarsystem/planets/mars/layers/sweden_layers.asset index 70cfbc254b..cd48e088bb 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/sweden_layers.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/sweden_layers.asset @@ -18,7 +18,6 @@ asset.meta = { Themis IR Day, Themis IR Night, CTX Mosaic, MDEM200M (3D), HiRISE Local Set DEM (3D), Mola Elevation (3D), Tile Indicies, and Size Reference. - Layers only loaded from the Sweden server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/mars/layers/utah_layers.asset b/data/assets/scene/solarsystem/planets/mars/layers/utah_layers.asset index 6efcd06a09..32eb5201b1 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/utah_layers.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/utah_layers.asset @@ -18,7 +18,6 @@ asset.meta = { Themis IR Day, Themis IR Night, CTX Mosaic, MDEM200M (3D), HiRISE Local Set DEM (3D), Mola Elevation (3D), Tile Indicies, and Size Reference. - Layers only loaded from the Utah server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/mercury/default_layers.asset b/data/assets/scene/solarsystem/planets/mercury/default_layers.asset index d4b85a8fb1..d85dde8778 100644 --- a/data/assets/scene/solarsystem/planets/mercury/default_layers.asset +++ b/data/assets/scene/solarsystem/planets/mercury/default_layers.asset @@ -12,7 +12,6 @@ asset.meta = { Messenger Mosaic, Messenger Mosaic2, Messenger BDR, Messenger HIE, Messenger HIW, Messenger LOI, Messenger SHADE, Messenger MDR, Messenger MP3, and Messenger DEM (3D). - Layers loaded from all servers ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/mercury_texture.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/mercury_texture.asset index 0137fea10d..7a8a724054 100644 --- a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/mercury_texture.asset +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/mercury_texture.asset @@ -18,7 +18,7 @@ local Layer = { Description = [[The Map Projected Basemap RDR (BDR) data set consists of a global monochrome map of reflectance at a resolution of 256 pixels per degree (~166 m/p). This is an offline version with lower resoution than the Messenger BDR layer.]], - CacheSettings = { Enabled = false } + CacheSettings = { Enabled = false } } diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_bdr_utah.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_bdr_utah.asset index 7554ef87e1..b9e4470bf5 100644 --- a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_bdr_utah.asset +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_bdr_utah.asset @@ -14,9 +14,9 @@ local Layer = { This edition, version 1, was released May 6, 2016 to the Planetary Data System (PDS) MESSENGER archive. It is compiled using NAC or WAC 750-nm images from any campaign that best fit the intended illumination geometry or low emission angle and incidence angle - near 74 degrees. It is controlled and projected onto a global digital elevation model. It uses - a Kasseleinin-Shkuratov photometric model, whose parameters are the same for any given - wavelength band across all MESSENGER end-of-mission map data products]] + near 74 degrees. It is controlled and projected onto a global digital elevation model. + It uses a Kasseleinin-Shkuratov photometric model, whose parameters are the same for any + given wavelength band across all MESSENGER end-of-mission map data products]] } diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/heightlayers/messenger_dem_utah.asset b/data/assets/scene/solarsystem/planets/mercury/layers/heightlayers/messenger_dem_utah.asset index 64d2d8bc98..60649ccdc6 100644 --- a/data/assets/scene/solarsystem/planets/mercury/layers/heightlayers/messenger_dem_utah.asset +++ b/data/assets/scene/solarsystem/planets/mercury/layers/heightlayers/messenger_dem_utah.asset @@ -1,5 +1,7 @@ local globe = asset.require("../../mercury") + + local Layer = { Identifier = "Messenger_DEM_Utah", Name = "Messenger DEM [Utah]", diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/nasa-treks/MSGR_MDIS.asset b/data/assets/scene/solarsystem/planets/mercury/layers/nasa-treks/MSGR_MDIS.asset index e812df5031..3dd4d0da94 100644 --- a/data/assets/scene/solarsystem/planets/mercury/layers/nasa-treks/MSGR_MDIS.asset +++ b/data/assets/scene/solarsystem/planets/mercury/layers/nasa-treks/MSGR_MDIS.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mercury/mercury").Mercury.Identifier + + local treks_Mercury_Messenger_USGS_DEM_665m_v2_HillshadeColor = { Identifier = "Mercury_Messenger_USGS_DEM_665m_v2_HillshadeColor", Name = [[MSGR MDIS, ColorHillshade Global]], @@ -30,6 +32,7 @@ local treks_Mercury_Messenger_USGS_DEM_665m_v2_SlopeColor = { Description = [[This is a colorized slope data product of the USGS Astrogeology Science Center's Mercury MESSENGER Global DEM 665m v2 data product providing global coverage of Mercury. This slope data product was generated in ArcMap with the slope spatial analysis tool. The resolution of this product is 64 pixels/degree (665 m/pixel). The control network used for registration contains tie points that are sample/line coordinates with geometric locations (derived from SPICE) that are automatically measured across the overlapping image areas. Slope values are in degrees and referred to a radius of 2439400m. Slope values range from a minimum value of 0 to a maximum value of 71.0409. The legend conveys the mapping colors to slope values (degrees).]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Mercury_Messenger_USGS_DEM_665m_v2_HillshadeColor) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Mercury_Messenger_USGS_DEM_665m_v2_Hillshade) @@ -47,6 +50,7 @@ asset.export("Mercury_Messenger_USGS_DEM_665m_v2_Hillshade", treks_Mercury_Messe asset.export("Mercury_Messenger_USGS_DEM_665m_v2_SlopeColor", treks_Mercury_Messenger_USGS_DEM_665m_v2_SlopeColor) + asset.meta = { Name = [[NASA Treks Layers for Mercury MSGR_MDIS]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/nasa-treks/MSGR_MDIS_Mosaic.asset b/data/assets/scene/solarsystem/planets/mercury/layers/nasa-treks/MSGR_MDIS_Mosaic.asset index d736a30685..28a8ff539e 100644 --- a/data/assets/scene/solarsystem/planets/mercury/layers/nasa-treks/MSGR_MDIS_Mosaic.asset +++ b/data/assets/scene/solarsystem/planets/mercury/layers/nasa-treks/MSGR_MDIS_Mosaic.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mercury/mercury").Mercury.Identifier + + local treks_MSGR_Aksakov_Crater_Peak_Ring_Ortho_29m = { Identifier = "MSGR_Aksakov_Crater_Peak_Ring_Ortho_29m", Name = [[MSGR MDIS Mosaic, Aksakov Crater Peak Ring]], @@ -86,6 +88,7 @@ local treks_MSGR_Sholem_Aleichem_Crater_Wall_Ortho_8m = { Description = [[This is a visible orthoimage for the Sholem Aleichem Crater Wall region on Mercury. This data product class of this data is observational and has been constructed to examine the visible and topographic settings of landforms around Mercury's hollows. Observations of topography, specifically the relationships of hollows to their surroundings, can be used to investigate hollow formation. The visible image has been orthorectified using a digital elevation model (DEM) created from Mercury Dual Imaging System (MDIS) stereo pair images. The DEM used to generate the orthoimage has been aligned and controlled to Mercury Laser Altimeter (MLA) individual elevation points. The orthoimage was then projected onto the DEM and exported. This ortho image has been generated at a resolution of 8m/pixel.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_MSGR_Aksakov_Crater_Peak_Ring_Ortho_29m) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_MSGR_near_Dali_Crater_Ortho_20m) @@ -124,6 +127,7 @@ asset.export("MSGR_Sander_Crater_Ortho_22m", treks_MSGR_Sander_Crater_Ortho_22m) asset.export("MSGR_Sholem_Aleichem_Crater_Wall_Ortho_8m", treks_MSGR_Sholem_Aleichem_Crater_Wall_Ortho_8m) + asset.meta = { Name = [[NASA Treks Layers for Mercury MSGR_MDIS_Mosaic]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/nasa-treks/MSGR_MDIS_Slope.asset b/data/assets/scene/solarsystem/planets/mercury/layers/nasa-treks/MSGR_MDIS_Slope.asset index 8b6e226f65..770fc65708 100644 --- a/data/assets/scene/solarsystem/planets/mercury/layers/nasa-treks/MSGR_MDIS_Slope.asset +++ b/data/assets/scene/solarsystem/planets/mercury/layers/nasa-treks/MSGR_MDIS_Slope.asset @@ -6,6 +6,8 @@ local globeIdentifier = asset.require("scene/solarsystem//planets/mercury/mercury").Mercury.Identifier + + local treks_MSGR_Aksakov_Crater_Peak_Ring_Slope_100m = { Identifier = "MSGR_Aksakov_Crater_Peak_Ring_Slope_100m", Name = [[MSGR MDIS Slope, Aksakov Crater Peak Ring]], @@ -86,6 +88,7 @@ local treks_MSGR_Sholem_Aleichem_Crater_Wall_Slope_25m = { Description = [[This is a colorized slope product of the digital elevation model (DEM) for the Sholem Aleichem Crater Wall region on Mercury. This data product class of this data is observational and has been constructed to examine the topographic settings of landforms around Mercury's hollows. Observations of topography, specifically the relationships of hollows to their surroundings, can be used to investigate hollow formation. This DEM has been derived from Mercury Dual Imaging System (MDIS) data and has been generated at a resolution of 25m/pixel. The DEM has been aligned and controlled to Mercury Laser Altimeter (MLA) individual elevation points. Vertical offsets in this DEM have been roughly corrected relative to the USGS's 665m Global DEM of Mercury. DEM elevation values are in meters and referred to a radius of 2440000m. Slope values are in degrees with a minimum value of 0 and a maximum value of 40.746.]] } + asset.onInitialize(function() openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_MSGR_Aksakov_Crater_Peak_Ring_Slope_100m) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_MSGR_near_Dali_Crater_Slope_60m) @@ -124,6 +127,7 @@ asset.export("MSGR_Sander_Crater_Slope_80m", treks_MSGR_Sander_Crater_Slope_80m) asset.export("MSGR_Sholem_Aleichem_Crater_Wall_Slope_25m", treks_MSGR_Sholem_Aleichem_Crater_Wall_Slope_25m) + asset.meta = { Name = [[NASA Treks Layers for Mercury MSGR_MDIS_Slope]], Author = "NASA/Treks", diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/newyork_layers.asset b/data/assets/scene/solarsystem/planets/mercury/layers/newyork_layers.asset index 8b6e5cf72c..4c847f0c77 100644 --- a/data/assets/scene/solarsystem/planets/mercury/layers/newyork_layers.asset +++ b/data/assets/scene/solarsystem/planets/mercury/layers/newyork_layers.asset @@ -21,7 +21,6 @@ asset.meta = { Messenger Mosaic, Messenger Mosaic2, Messenger BDR, Messenger HIE, Messenger HIW, Messenger LOI, Messenger SHADE, Messenger MDR, Messenger MP3, and Messenger DEM (3D). - Layers only loaded from the New York server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/sweden_layers.asset b/data/assets/scene/solarsystem/planets/mercury/layers/sweden_layers.asset index 6f05c9dde1..022492bd4f 100644 --- a/data/assets/scene/solarsystem/planets/mercury/layers/sweden_layers.asset +++ b/data/assets/scene/solarsystem/planets/mercury/layers/sweden_layers.asset @@ -21,7 +21,6 @@ asset.meta = { Messenger Mosaic, Messenger Mosaic2, Messenger BDR, Messenger HIE, Messenger HIW, Messenger LOI, Messenger SHADE, Messenger MDR, Messenger MP3, and Messenger DEM (3D). - Layers only loaded from the Sweden server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/utah_layers.asset b/data/assets/scene/solarsystem/planets/mercury/layers/utah_layers.asset index 738ea253a4..d2afff19d1 100644 --- a/data/assets/scene/solarsystem/planets/mercury/layers/utah_layers.asset +++ b/data/assets/scene/solarsystem/planets/mercury/layers/utah_layers.asset @@ -19,7 +19,6 @@ asset.meta = { Messenger Mosaic, Messenger Mosaic2, Messenger BDR, Messenger HIE, Messenger HIW, Messenger LOI, Messenger SHADE, Messenger MDR, Messenger MP3, and Messenger DEM (3D). - Layers only loaded from the Utah server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/neptune/nereid/nereid.asset b/data/assets/scene/solarsystem/planets/neptune/nereid/nereid.asset index a68f4cf9e2..7db4b2e752 100644 --- a/data/assets/scene/solarsystem/planets/neptune/nereid/nereid.asset +++ b/data/assets/scene/solarsystem/planets/neptune/nereid/nereid.asset @@ -46,7 +46,12 @@ local NereidTrail = { Period = 360.13, Resolution = 1000 }, - Tag = { "moonTrail_solarSystem", "moonTrail_giants", "moonTrail_neptune", "moonTrail_major_neptune" }, + Tag = { + "moonTrail_solarSystem", + "moonTrail_giants", + "moonTrail_neptune", + "moonTrail_major_neptune" + }, GUI = { Name = "Nereid Trail", Path = "/Solar System/Planets/Neptune/Major Moons/Nereid" diff --git a/data/assets/scene/solarsystem/planets/neptune/triton/default_layers.asset b/data/assets/scene/solarsystem/planets/neptune/triton/default_layers.asset index 559f1969d2..b66160cca5 100644 --- a/data/assets/scene/solarsystem/planets/neptune/triton/default_layers.asset +++ b/data/assets/scene/solarsystem/planets/neptune/triton/default_layers.asset @@ -1,6 +1,7 @@ asset.require("./layers/colorlayers/triton_voyager2_clrmosaic_globalfill_600m", true) + asset.meta = { Name = "Default Triton Layers", Description = "Default Triton layers are: Voyager2 Mosaic", diff --git a/data/assets/scene/solarsystem/planets/neptune/triton/layers/colorlayers/triton_voyager2_clrmosaic_globalfill_600m.asset b/data/assets/scene/solarsystem/planets/neptune/triton/layers/colorlayers/triton_voyager2_clrmosaic_globalfill_600m.asset index f5c302c199..6873986135 100644 --- a/data/assets/scene/solarsystem/planets/neptune/triton/layers/colorlayers/triton_voyager2_clrmosaic_globalfill_600m.asset +++ b/data/assets/scene/solarsystem/planets/neptune/triton/layers/colorlayers/triton_voyager2_clrmosaic_globalfill_600m.asset @@ -16,11 +16,11 @@ local Layer = { Enabled = asset.enabled, ZIndex = 5, FilePath = texturesPath .. "Triton_Voyager2_ClrMosaic_GlobalFill_600m.png", - Description = [[Voyager 2 data was used to construct the best-ever global color map of Triton. - This map has a resolution of 1,970 feet (600 meters per pixel [m]). Color was synthesized by - combining high-resolution images taken through orange, violet, and ultraviolet filters; these - images were displayed as red, green, and blue images and combined to create this - color version (Smith et al., 1989).]], + Description = [[Voyager 2 data was used to construct the best-ever global color map of + Triton. This map has a resolution of 1,970 feet (600 meters per pixel [m]). Color was + synthesized by combining high-resolution images taken through orange, violet, and + ultraviolet filters; these images were displayed as red, green, and blue images and + combined to create this color version (Smith et al., 1989).]], CacheSettings = { Enabled = false } } diff --git a/data/assets/scene/solarsystem/planets/neptune/triton/triton.asset b/data/assets/scene/solarsystem/planets/neptune/triton/triton.asset index 426d7e65f9..f50ba6297a 100644 --- a/data/assets/scene/solarsystem/planets/neptune/triton/triton.asset +++ b/data/assets/scene/solarsystem/planets/neptune/triton/triton.asset @@ -51,7 +51,12 @@ local TritonTrail = { Period = 5.875, Resolution = 1000 }, - Tag = { "moonTrail_solarSystem", "moonTrail_giants", "moonTrail_neptune", "moonTrail_major_neptune" }, + Tag = { + "moonTrail_solarSystem", + "moonTrail_giants", + "moonTrail_neptune", + "moonTrail_major_neptune" + }, GUI = { Name = "Triton Trail", Path = "/Solar System/Planets/Neptune/Major Moons/Triton" diff --git a/data/assets/scene/solarsystem/planets/newyork_layers.asset b/data/assets/scene/solarsystem/planets/newyork_layers.asset index 6e1ac2db8b..0feae86a38 100644 --- a/data/assets/scene/solarsystem/planets/newyork_layers.asset +++ b/data/assets/scene/solarsystem/planets/newyork_layers.asset @@ -15,7 +15,6 @@ asset.meta = { Description = [[Adds default layers for all planets. Remove this asset and include individual layers for planets to customize planet layers - Layers only loaded from the New York server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset b/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset index 7bfa019f5a..0dd8f2b2aa 100644 --- a/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset +++ b/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset @@ -50,7 +50,6 @@ local Dione = { } } - local DioneLabel = { Identifier = "DioneLabel", Parent = Dione.Identifier, diff --git a/data/assets/scene/solarsystem/planets/saturn/enceladus/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/enceladus/default_layers.asset index 8c48efa562..17fe06b6c0 100644 --- a/data/assets/scene/solarsystem/planets/saturn/enceladus/default_layers.asset +++ b/data/assets/scene/solarsystem/planets/saturn/enceladus/default_layers.asset @@ -9,7 +9,6 @@ asset.meta = { Description = [[Default Enceladus layers are: Enceladus Texture, and Cassini Global Mosaic 100m HPF. - Layers loaded from all available servers ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset b/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset index ae7c0b62e4..b218e8066c 100644 --- a/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset +++ b/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset @@ -47,8 +47,7 @@ local Enceladus = { Tag = { "moon_solarSystem", "moon_giants", "moon_saturn", "moon_major_saturn" }, GUI = { Name = "Enceladus", - Path = "/Solar System/Planets/Saturn/Major Moons/Enceladus", - Description = "Enceladus globe with labels" + Path = "/Solar System/Planets/Saturn/Major Moons/Enceladus" } } diff --git a/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/newyork_layers.asset b/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/newyork_layers.asset index 50ddc4cb29..b9f0fc57fc 100644 --- a/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/newyork_layers.asset +++ b/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/newyork_layers.asset @@ -8,7 +8,6 @@ asset.meta = { Description = [[Default Enceladus layers are: Enceladus Texture, and Cassini Global Mosaic 100m HPF. - Layers only loaded from the New York server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/sweden_layers.asset b/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/sweden_layers.asset index d830102319..c8b293402c 100644 --- a/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/sweden_layers.asset +++ b/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/sweden_layers.asset @@ -8,7 +8,6 @@ asset.meta = { Description = [[Default Enceladus layers are: Enceladus Texture, and Cassini Global Mosaic 100m HPF. - Layers only loaded from the Sweden server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/saturn/hyperion/trail.asset b/data/assets/scene/solarsystem/planets/saturn/hyperion/trail.asset index 976ba140ac..29260a58e8 100644 --- a/data/assets/scene/solarsystem/planets/saturn/hyperion/trail.asset +++ b/data/assets/scene/solarsystem/planets/saturn/hyperion/trail.asset @@ -18,7 +18,12 @@ local HyperionTrail = { Period = 21.276, Resolution = 1000 }, - Tag = { "moonTrail_solarSystem", "moonTrail_giants", "moonTrail_saturn", "moonTrail_major_saturn" }, + Tag = { + "moonTrail_solarSystem", + "moonTrail_giants", + "moonTrail_saturn", + "moonTrail_major_saturn" + }, GUI = { Name = "Hyperion Trail", Path = "/Solar System/Planets/Saturn/Major Moons/Hyperion" diff --git a/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset b/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset index f1fbb1efc0..e9a51fc40a 100644 --- a/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset +++ b/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset @@ -47,8 +47,7 @@ local Iapetus = { Tag = { "moon_solarSystem", "moon_giants", "moon_saturn", "moon_major_saturn" }, GUI = { Name = "Iapetus", - Path = "/Solar System/Planets/Saturn/Major Moons/Iapetus", - Description = "Third largest moon of Saturn" + Path = "/Solar System/Planets/Saturn/Major Moons/Iapetus" } } @@ -72,8 +71,7 @@ local IapetusLabel = { Tag = { "solarsystem_labels", "moon_labels", "major_moon_labels" }, GUI = { Name = "Iapetus Label", - Path = "/Solar System/Planets/Saturn/Major Moons/Iapetus", - Description = "Label for Saturn's moon Iapetus" + Path = "/Solar System/Planets/Saturn/Major Moons/Iapetus" } } diff --git a/data/assets/scene/solarsystem/planets/saturn/kernels.asset b/data/assets/scene/solarsystem/planets/saturn/kernels.asset index 3185fe6eb1..f64cc6d7fd 100644 --- a/data/assets/scene/solarsystem/planets/saturn/kernels.asset +++ b/data/assets/scene/solarsystem/planets/saturn/kernels.asset @@ -49,6 +49,7 @@ asset.export("ID", ID) asset.export("Frame", Frame) + asset.meta = { Name = "Saturn Spice Kernels", Description = "Generic SPICE kernels for Saturn", diff --git a/data/assets/scene/solarsystem/planets/saturn/kernels415.asset b/data/assets/scene/solarsystem/planets/saturn/kernels415.asset index 8bdf08b953..7b0890c505 100644 --- a/data/assets/scene/solarsystem/planets/saturn/kernels415.asset +++ b/data/assets/scene/solarsystem/planets/saturn/kernels415.asset @@ -48,6 +48,7 @@ asset.export("ID", ID) asset.export("Frame", Frame) + asset.meta = { Name = "Saturn Spice Kernels", Description = "Generic SPICE kernels for Saturn", diff --git a/data/assets/scene/solarsystem/planets/saturn/minor/gallic_group.asset b/data/assets/scene/solarsystem/planets/saturn/minor/gallic_group.asset index 48485914da..3767e88daa 100644 --- a/data/assets/scene/solarsystem/planets/saturn/minor/gallic_group.asset +++ b/data/assets/scene/solarsystem/planets/saturn/minor/gallic_group.asset @@ -86,8 +86,7 @@ local AlbiorixLabel = { }, GUI = { Name = "Albiorix Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Gallic Group/Albiorix", - Description = "Label for Saturn's moon Albiorix (Gallic group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Gallic Group/Albiorix" } } @@ -173,8 +172,7 @@ local BebhionnLabel = { }, GUI = { Name = "Bebhionn Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Gallic Group/Bebhionn", - Description = "Label for Saturn's moon Bebhionn (Gallic group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Gallic Group/Bebhionn" } } @@ -260,8 +258,7 @@ local ErriapusLabel = { }, GUI = { Name = "Erriapus Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Gallic Group/Erriapus", - Description = "Label for Saturn's moon Erriapus (Gallic group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Gallic Group/Erriapus" } } @@ -347,8 +344,7 @@ local TarvosLabel = { }, GUI = { Name = "Tarvos Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Gallic Group/Tarvos", - Description = "Label for Saturn's moon Tarvos (Gallic group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Gallic Group/Tarvos" } } diff --git a/data/assets/scene/solarsystem/planets/saturn/minor/inuit_group.asset b/data/assets/scene/solarsystem/planets/saturn/minor/inuit_group.asset index dd8ca6a549..55403af79c 100644 --- a/data/assets/scene/solarsystem/planets/saturn/minor/inuit_group.asset +++ b/data/assets/scene/solarsystem/planets/saturn/minor/inuit_group.asset @@ -86,8 +86,7 @@ local KiviuqLabel = { }, GUI = { Name = "Kiviuq Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/Kiviuq", - Description = "Label for Saturn's moon Kiviuq (Inuit group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/Kiviuq" } } @@ -173,8 +172,7 @@ local IjiraqLabel = { }, GUI = { Name = "Ijiraq Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/Ijiraq", - Description = "Label for Saturn's moon Ijiraq (Inuit group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/Ijiraq" } } @@ -260,8 +258,7 @@ local PaaliaqLabel = { }, GUI = { Name = "Paaliaq Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/Paaliaq", - Description = "Label for Saturn's moon Paaliaq (Inuit group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/Paaliaq" } } @@ -347,8 +344,7 @@ local SiarnaqLabel = { }, GUI = { Name = "Siarnaq Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/Siarnaq", - Description = "Label for Saturn's moon Siarnaq (Inuit group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/Siarnaq" } } @@ -434,8 +430,7 @@ local TarqeqLabel = { }, GUI = { Name = "Tarqeq Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/Tarqeq", - Description = "Label for Saturn's moon Tarqeq (Inuit group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/Tarqeq" } } @@ -521,8 +516,7 @@ local S2004S29Label = { }, GUI = { Name = "S/2004 S 29 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/S2004S29", - Description = "Label for Saturn's moon S/2004 S 29 (Inuit group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/S2004S29" } } @@ -608,8 +602,7 @@ local S2004S31Label = { }, GUI = { Name = "S/2004 S 31 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/S2004S31", - Description = "Label for Saturn's moon S/2004 S 31 (Inuit group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/S2004S31" } } @@ -695,8 +688,7 @@ local S2019S01Label = { }, GUI = { Name = "S/2019 S 01 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/S2019S01", - Description = "Label for Saturn's moon S/2019 S 01 (Inuit group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Inuit Group/S2019S01" } } diff --git a/data/assets/scene/solarsystem/planets/saturn/minor/norse_group.asset b/data/assets/scene/solarsystem/planets/saturn/minor/norse_group.asset index 6c30ed7f07..9e0499b62f 100644 --- a/data/assets/scene/solarsystem/planets/saturn/minor/norse_group.asset +++ b/data/assets/scene/solarsystem/planets/saturn/minor/norse_group.asset @@ -87,8 +87,7 @@ local PhoebeLabel = { }, GUI = { Name = "Phoebe Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Phoebe", - Description = "Label for Saturn's moon Phoebe (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Phoebe" } } @@ -174,8 +173,7 @@ local SkathiLabel = { }, GUI = { Name = "Skathi Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Skathi", - Description = "Label for Saturn's moon Skathi (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Skathi" } } @@ -261,8 +259,7 @@ local S2007S2Label = { }, GUI = { Name = "S/2007 S 2 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2007S2", - Description = "Label for Saturn's moon S/2007 S 2 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2007S2" } } @@ -348,8 +345,7 @@ local SkollLabel = { }, GUI = { Name = "Skoll Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Skoll", - Description = "Label for Saturn's moon Skoll (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Skoll" } } @@ -435,8 +431,7 @@ local S2004S13Label = { }, GUI = { Name = "S/2004 S 13 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S13", - Description = "Label for Saturn's moon S/2004 S 13 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S13" } } @@ -522,8 +517,7 @@ local GreipLabel = { }, GUI = { Name = "Greip Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Greip", - Description = "Label for Saturn's moon Greip (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Greip" } } @@ -609,8 +603,7 @@ local HyrrokkinLabel = { }, GUI = { Name = "Hyrrokkin Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Hyrrokkin", - Description = "Label for Saturn's moon Hyrrokkin (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Hyrrokkin" } } @@ -696,8 +689,7 @@ local JarnsaxaLabel = { }, GUI = { Name = "Jarnsaxa Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Jarnsaxa", - Description = "Label for Saturn's moon Jarnsaxa (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Jarnsaxa" } } @@ -783,8 +775,7 @@ local MundilfariLabel = { }, GUI = { Name = "Mundilfari Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Mundilfari", - Description = "Label for Saturn's moon Mundilfari (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Mundilfari" } } @@ -870,8 +861,7 @@ local S2006S1Label = { }, GUI = { Name = "S/2006 S 1 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2006S1", - Description = "Label for Saturn's moon S/2006 S 1 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2006S1" } } @@ -957,8 +947,7 @@ local S2004S17Label = { }, GUI = { Name = "S/2004 S 17 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S17", - Description = "Label for Saturn's moon S/2004 S 17 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S17" } } @@ -1044,8 +1033,7 @@ local BergelmirLabel = { }, GUI = { Name = "Bergelmir Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Bergelmir", - Description = "Label for Saturn's moon Bergelmir (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Bergelmir" } } @@ -1131,8 +1119,7 @@ local NarviLabel = { }, GUI = { Name = "Narvi Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Narvi", - Description = "Label for Saturn's moon Narvi (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Narvi" } } @@ -1218,8 +1205,7 @@ local SuttungrLabel = { }, GUI = { Name = "Suttungr Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Suttungr", - Description = "Label for Saturn's moon Suttungr (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Suttungr" } } @@ -1305,8 +1291,7 @@ local HatiLabel = { }, GUI = { Name = "Hati Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Hati", - Description = "Label for Saturn's moon Hati (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Hati" } } @@ -1392,8 +1377,7 @@ local S2004S12Label = { }, GUI = { Name = "S/2004 S 12 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S12", - Description = "Label for Saturn's moon S/2004 S 12 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S12" } } @@ -1479,8 +1463,7 @@ local FarbautiLabel = { }, GUI = { Name = "Farbauti Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Farbauti", - Description = "Label for Saturn's moon Farbauti (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Farbauti" } } @@ -1566,8 +1549,7 @@ local ThrymrLabel = { }, GUI = { Name = "Thrymr Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Thrymr", - Description = "Label for Saturn's moon Thrymr (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Thrymr" } } @@ -1653,8 +1635,7 @@ local AegirLabel = { }, GUI = { Name = "Aegir Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Aegir", - Description = "Label for Saturn's moon Aegir (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Aegir" } } @@ -1740,8 +1721,7 @@ local S2007S3Label = { }, GUI = { Name = "S/2007 S 3 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2007S3", - Description = "Label for Saturn's moon S/2007 S 3 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2007S3" } } @@ -1827,8 +1807,7 @@ local BestlaLabel = { }, GUI = { Name = "Bestla Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Bestla", - Description = "Label for Saturn's moon Bestla (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Bestla" } } @@ -1914,8 +1893,7 @@ local S2004S7Label = { }, GUI = { Name = "S/2004 S 7 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S7", - Description = "Label for Saturn's moon S/2004 S 7 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S7" } } @@ -2001,8 +1979,7 @@ local S2006S3Label = { }, GUI = { Name = "S/2006 S 3 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2006S3", - Description = "Label for Saturn's moon S/2006 S 3 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2006S3" } } @@ -2088,8 +2065,7 @@ local FenrirLabel = { }, GUI = { Name = "Fenrir Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Fenrir", - Description = "Label for Saturn's moon Fenrir (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Fenrir" } } @@ -2175,8 +2151,7 @@ local SurturLabel = { }, GUI = { Name = "Surtur Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Surtur", - Description = "Label for Saturn's moon Surtur (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Surtur" } } @@ -2262,8 +2237,7 @@ local KariLabel = { }, GUI = { Name = "Kari Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Kari", - Description = "Label for Saturn's moon Kari (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Kari" } } @@ -2349,8 +2323,7 @@ local YmirLabel = { }, GUI = { Name = "Ymir Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Ymir", - Description = "Label for Saturn's moon Ymir (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Ymir" } } @@ -2436,8 +2409,7 @@ local LogeLabel = { }, GUI = { Name = "Loge Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Loge", - Description = "Label for Saturn's moon Loge (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Loge" } } @@ -2523,8 +2495,7 @@ local FornjotLabel = { }, GUI = { Name = "Fornjot Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Fornjot", - Description = "Label for Saturn's moon Fornjot (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Fornjot" } } @@ -2610,8 +2581,7 @@ local SkadiLabel = { }, GUI = { Name = "Skadi Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Skadi", - Description = "Label for Saturn's moon Skadi (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Skadi" } } @@ -2697,8 +2667,7 @@ local GridrLabel = { }, GUI = { Name = "Gridr Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Gridr", - Description = "Label for Saturn's moon Gridr (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Gridr" } } @@ -2784,8 +2753,7 @@ local AngrbodaLabel = { }, GUI = { Name = "Angrboda Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Angrboda", - Description = "Label for Saturn's moon Angrboda (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Angrboda" } } @@ -2871,8 +2839,7 @@ local SkrymirLabel = { }, GUI = { Name = "Skrymir Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Skrymir", - Description = "Label for Saturn's moon Skrymir (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Skrymir" } } @@ -2958,8 +2925,7 @@ local GerdLabel = { }, GUI = { Name = "Gerd Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Gerd", - Description = "Label for Saturn's moon Gerd (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Gerd" } } @@ -3045,8 +3011,7 @@ local S2004S26Label = { }, GUI = { Name = "S/2004 S 26 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S26", - Description = "Label for Saturn's moon S/2004 S 26 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S26" } } @@ -3132,8 +3097,7 @@ local EggtherLabel = { }, GUI = { Name = "Eggther Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Eggther", - Description = "Label for Saturn's moon Eggther (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Eggther" } } @@ -3219,8 +3183,7 @@ local BeliLabel = { }, GUI = { Name = "Beli Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Beli", - Description = "Label for Saturn's moon Beli (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Beli" } } @@ -3306,8 +3269,7 @@ local GunnlodLabel = { }, GUI = { Name = "Gunnlod Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Gunnlod", - Description = "Label for Saturn's moon Gunnlod (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Gunnlod" } } @@ -3393,8 +3355,7 @@ local ThiazziLabel = { }, GUI = { Name = "Thiazzi Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Thiazzi", - Description = "Label for Saturn's moon Thiazzi (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Thiazzi" } } @@ -3480,8 +3441,7 @@ local S2004S34Label = { }, GUI = { Name = "S/2004 S 34 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S34", - Description = "Label for Saturn's moon S/2004 S 34 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S34" } } @@ -3567,8 +3527,7 @@ local AlvaldiLabel = { }, GUI = { Name = "Alvaldi Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Alvaldi", - Description = "Label for Saturn's moon Alvaldi (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Alvaldi" } } @@ -3654,8 +3613,7 @@ local GeirrodLabel = { }, GUI = { Name = "Geirrod Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Geirrod", - Description = "Label for Saturn's moon Geirrod (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/Geirrod" } } @@ -3741,8 +3699,7 @@ local S2004S28Label = { }, GUI = { Name = "S/2004 S 28 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S28", - Description = "Label for Saturn's moon S/2004 S 28 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S28" } } @@ -3828,8 +3785,7 @@ local S2004S21Label = { }, GUI = { Name = "S/2004 S 21 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S21", - Description = "Label for Saturn's moon S/2004 S 21 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S21" } } @@ -3915,8 +3871,7 @@ local S2004S36Label = { }, GUI = { Name = "S/2004 S 36 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S36", - Description = "Label for Saturn's moon S/2004 S 36 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S36" } } @@ -4002,8 +3957,7 @@ local S2004S37Label = { }, GUI = { Name = "S/2004 S 37 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S37", - Description = "Label for Saturn's moon S/2004 S 37 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S37" } } @@ -4089,8 +4043,7 @@ local S2004S39Label = { }, GUI = { Name = "S/2004 S 39 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S39", - Description = "Label for Saturn's moon S/2004 S 39 (Norse group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Norse Group/S2004S39" } } diff --git a/data/assets/scene/solarsystem/planets/saturn/minor/other_group.asset b/data/assets/scene/solarsystem/planets/saturn/minor/other_group.asset index 710f33ada2..6a10e65078 100644 --- a/data/assets/scene/solarsystem/planets/saturn/minor/other_group.asset +++ b/data/assets/scene/solarsystem/planets/saturn/minor/other_group.asset @@ -88,8 +88,7 @@ local AegaeonLabel = { }, GUI = { Name = "Aegaeon Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Aegaeon", - Description = "Label for Saturn's moon Aegaeon (Other group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Aegaeon" } } @@ -175,8 +174,7 @@ local MethoneLabel = { }, GUI = { Name = "Methone Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Methone", - Description = "Label for Saturn's moon Methone (Other group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Methone" } } @@ -262,8 +260,7 @@ local AntheLabel = { }, GUI = { Name = "Anthe Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Anthe", - Description = "Label for Saturn's moon Anthe (Other group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Anthe" } } @@ -349,8 +346,7 @@ local PalleneLabel = { }, GUI = { Name = "Pallene Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Pallene", - Description = "Label for Saturn's moon Pallene (Other group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Pallene" } } @@ -436,8 +432,7 @@ local TelestoLabel = { }, GUI = { Name = "Telesto Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Telesto", - Description = "Label for Saturn's moon Telesto (Other group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Telesto" } } @@ -523,8 +518,7 @@ local CalypsoLabel = { }, GUI = { Name = "Calypso Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Calypso", - Description = "Label for Saturn's moon Calypso (Other group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Calypso" } } @@ -610,8 +604,7 @@ local HeleneLabel = { }, GUI = { Name = "Helene Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Helene", - Description = "Label for Saturn's moon Helene (Other group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Helene" } } @@ -697,8 +690,7 @@ local PolydeucesLabel = { }, GUI = { Name = "Polydeuces Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Polydeuces", - Description = "Label for Saturn's moon Polydeuces (Other group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/Polydeuces" } } @@ -784,8 +776,7 @@ local S2004S24Label = { }, GUI = { Name = "S/2004 S 24 Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/S2004S24", - Description = "Label for Saturn's moon S/2004 S 24 (Other group)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Other Group/S2004S24" } } diff --git a/data/assets/scene/solarsystem/planets/saturn/minor/shepherd_group.asset b/data/assets/scene/solarsystem/planets/saturn/minor/shepherd_group.asset index 410c15c741..b371212420 100644 --- a/data/assets/scene/solarsystem/planets/saturn/minor/shepherd_group.asset +++ b/data/assets/scene/solarsystem/planets/saturn/minor/shepherd_group.asset @@ -17,7 +17,6 @@ local kernels = { syncedKernels .. "sat393_daphnis.bsp" } - local Prometheus = { Identifier = "Prometheus", Parent = transforms.SaturnBarycenter.Identifier, @@ -100,8 +99,7 @@ local PrometheusLabel = { }, GUI = { Name = "Prometheus Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Shepherd Moons/Prometheus", - Description = "Label for Saturn's moon Prometheus (Shepherd Moons)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Shepherd Moons/Prometheus" } } @@ -187,8 +185,7 @@ local PandoraLabel = { }, GUI = { Name = "Pandora Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Shepherd Moons/Pandora", - Description = "Label for Saturn's moon Pandora (Shepherd Moons)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Shepherd Moons/Pandora" } } @@ -274,8 +271,7 @@ local AtlasLabel = { }, GUI = { Name = "Atlas Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Shepherd Moons/Atlas", - Description = "Label for Saturn's moon Atlas (Shepherd Moons)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Shepherd Moons/Atlas" } } @@ -361,8 +357,7 @@ local JanusLabel = { }, GUI = { Name = "Janus Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Shepherd Moons/Janus", - Description = "Label for Saturn's moon Janus (Shepherd Moons)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Shepherd Moons/Janus" } } @@ -448,8 +443,7 @@ local EpimetheusLabel = { }, GUI = { Name = "Epimetheus Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Shepherd Moons/Epimetheus", - Description = "Label for Saturn's moon Epimetheus (Shepherd Moons)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Shepherd Moons/Epimetheus" } } @@ -535,8 +529,7 @@ local DaphnisLabel = { }, GUI = { Name = "Daphnis Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Shepherd Moons/Daphnis", - Description = "Label for Saturn's moon Daphnis (Shepherd Moons)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Shepherd Moons/Daphnis" } } @@ -622,11 +615,11 @@ local PanLabel = { }, GUI = { Name = "Pan Label", - Path = "/Solar System/Planets/Saturn/Minor Moons/Shepherd Moons/Pan", - Description = "Label for Saturn's moon Pan (Shepherd Moons)" + Path = "/Solar System/Planets/Saturn/Minor Moons/Shepherd Moons/Pan" } } + asset.onInitialize(function() openspace.spice.loadKernel(syncedKernels .. "sat393_daphnis.bsp") openspace.spice.loadKernel(syncedKernels .. "sat415.bsp") diff --git a/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset b/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset index 67d9563193..0c7e8d1b64 100644 --- a/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset +++ b/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset @@ -72,8 +72,7 @@ local RheaLabel = { Tag = { "solarsystem_labels", "moon_labels", "major_moon_labels", "moon_major_saturn" }, GUI = { Name = "Rhea Label", - Path = "/Solar System/Planets/Saturn/Major Moons/Rhea", - Description = "Label for Saturn's moon Rhea" + Path = "/Solar System/Planets/Saturn/Major Moons/Rhea" } } diff --git a/data/assets/scene/solarsystem/planets/saturn/rhea/trail.asset b/data/assets/scene/solarsystem/planets/saturn/rhea/trail.asset index fa62a7f6a9..f439933392 100644 --- a/data/assets/scene/solarsystem/planets/saturn/rhea/trail.asset +++ b/data/assets/scene/solarsystem/planets/saturn/rhea/trail.asset @@ -18,7 +18,12 @@ local RheaTrail = { Period = 108.0 / 24.0, Resolution = 1000 }, - Tag = { "moonTrail_solarSystem", "moonTrail_giants", "moonTrail_saturn", "moonTrail_major_saturn" }, + Tag = { + "moonTrail_solarSystem", + "moonTrail_giants", + "moonTrail_saturn", + "moonTrail_major_saturn" + }, GUI = { Name = "Rhea Trail", Path = "/Solar System/Planets/Saturn/Major Moons/Rhea", diff --git a/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset b/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset index 8ad3a467a5..d895eb207a 100644 --- a/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset +++ b/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset @@ -70,8 +70,7 @@ local TethysLabel = { Tag = { "solarsystem_labels", "moon_labels", "major_moon_labels", "moon_major_saturn" }, GUI = { Name = "Tethys Label", - Path = "/Solar System/Planets/Saturn/Major Moons/Tethys", - Description = "Label for Saturn's moon Tethys" + Path = "/Solar System/Planets/Saturn/Major Moons/Tethys" } } diff --git a/data/assets/scene/solarsystem/planets/saturn/tethys/trail.asset b/data/assets/scene/solarsystem/planets/saturn/tethys/trail.asset index 911399eef1..1a9539d8f6 100644 --- a/data/assets/scene/solarsystem/planets/saturn/tethys/trail.asset +++ b/data/assets/scene/solarsystem/planets/saturn/tethys/trail.asset @@ -18,7 +18,12 @@ local TethysTrail = { Period = 45.0 / 24.0, Resolution = 1000 }, - Tag = { "moonTrail_solarSystem", "moonTrail_giants", "moonTrail_saturn", "moonTrail_major_saturn" }, + Tag = { + "moonTrail_solarSystem", + "moonTrail_giants", + "moonTrail_saturn", + "moonTrail_major_saturn" + }, GUI = { Name = "Tethys Trail", Path = "/Solar System/Planets/Saturn/Major Moons/Tethys", diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/trail.asset b/data/assets/scene/solarsystem/planets/saturn/titan/trail.asset index ad5bf68132..942716d5f0 100644 --- a/data/assets/scene/solarsystem/planets/saturn/titan/trail.asset +++ b/data/assets/scene/solarsystem/planets/saturn/titan/trail.asset @@ -18,7 +18,12 @@ local TitanTrail = { Period = 16.0, Resolution = 1000 }, - Tag = { "moonTrail_solarSystem", "moonTrail_giants", "moonTrail_saturn", "moonTrail_major_saturn" }, + Tag = { + "moonTrail_solarSystem", + "moonTrail_giants", + "moonTrail_saturn", + "moonTrail_major_saturn" + }, GUI = { Name = "Titan Trail", Path = "/Solar System/Planets/Saturn/Major Moons/Titan", diff --git a/data/assets/scene/solarsystem/planets/sweden_layers.asset b/data/assets/scene/solarsystem/planets/sweden_layers.asset index b7a584bab2..43cb383cf2 100644 --- a/data/assets/scene/solarsystem/planets/sweden_layers.asset +++ b/data/assets/scene/solarsystem/planets/sweden_layers.asset @@ -17,7 +17,6 @@ asset.meta = { Description = [[Adds default layers for all planets. Remove this asset and include individual layers for planets to customize planet layers - Layers only loaded from the Sweden server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/uranus/inner_moons.asset b/data/assets/scene/solarsystem/planets/uranus/inner_moons.asset index a04d610317..eecd6fbe4b 100644 --- a/data/assets/scene/solarsystem/planets/uranus/inner_moons.asset +++ b/data/assets/scene/solarsystem/planets/uranus/inner_moons.asset @@ -79,8 +79,7 @@ local CordeliaLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Cordelia Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Cordelia", - Description = "Label for Uranus' moon Cordelia (Inner Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Cordelia" } } @@ -159,8 +158,7 @@ local OpheliaLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Ophelia Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Ophelia", - Description = "Label for Uranus' moon Ophelia (Inner Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Ophelia" } } @@ -239,8 +237,7 @@ local BiancaLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Bianca Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Bianca", - Description = "Label for Uranus' moon Bianca (Inner Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Bianca" } } @@ -319,8 +316,7 @@ local CressidaLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Cressida Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Cressida", - Description = "Label for Uranus' moon Cressida (Inner Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Cressida" } } @@ -399,8 +395,7 @@ local DesdemonaLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Desdemona Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Desdemona", - Description = "Label for Uranus' moon Desdemona (Inner Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Desdemona" } } @@ -479,8 +474,7 @@ local JulietLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Juliet Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Juliet", - Description = "Label for Uranus' moon Juliet (Inner Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Juliet" } } @@ -559,8 +553,7 @@ local PortiaLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Portia Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Portia", - Description = "Label for Uranus' moon Portia (Inner Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Portia" } } @@ -639,8 +632,7 @@ local RosalindLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Rosalind Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Rosalind", - Description = "Label for Uranus' moon Rosalind (Inner Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Rosalind" } } @@ -719,8 +711,7 @@ local CupidLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Cupid Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Cupid", - Description = "Label for Uranus' moon Cupid (Inner Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Cupid" } } @@ -799,8 +790,7 @@ local BelindaLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Belinda Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Belinda", - Description = "Label for Uranus' moon Belinda (Inner Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Belinda" } } @@ -879,8 +869,7 @@ local PerditaLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Perdita Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Perdita", - Description = "Label for Uranus' moon Perdita (Inner Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Perdita" } } @@ -959,8 +948,7 @@ local PuckLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Puck Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Puck", - Description = "Label for Uranus' moon Puck (Inner Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Puck" } } @@ -1039,11 +1027,11 @@ local MabLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Mab Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Mab", - Description = "Label for Uranus' moon Mab (Inner Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Inner Moons/Mab" } } + asset.onInitialize(function() openspace.addSceneGraphNode(Cordelia) openspace.addSceneGraphNode(CordeliaTrail) diff --git a/data/assets/scene/solarsystem/planets/uranus/irregular_prograde_moons.asset b/data/assets/scene/solarsystem/planets/uranus/irregular_prograde_moons.asset index dd68a69582..3502dfc264 100644 --- a/data/assets/scene/solarsystem/planets/uranus/irregular_prograde_moons.asset +++ b/data/assets/scene/solarsystem/planets/uranus/irregular_prograde_moons.asset @@ -79,8 +79,7 @@ local MargaretLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Margaret Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Prograde Moons/Margaret", - Description = "Label for Uranus' moon Margaret (Irregular Prograde Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Prograde Moons/Margaret" } } diff --git a/data/assets/scene/solarsystem/planets/uranus/irregular_retrograde_moons.asset b/data/assets/scene/solarsystem/planets/uranus/irregular_retrograde_moons.asset index f60afa381f..15fbab936d 100644 --- a/data/assets/scene/solarsystem/planets/uranus/irregular_retrograde_moons.asset +++ b/data/assets/scene/solarsystem/planets/uranus/irregular_retrograde_moons.asset @@ -79,8 +79,7 @@ local FranciscoLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Francisco Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Francisco", - Description = "Label for Uranus' moon Francisco (Irregular Retrograde Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Francisco" } } @@ -159,8 +158,7 @@ local CalibanLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Caliban Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Caliban", - Description = "Label for Uranus' moon Caliban (Irregular Retrograde Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Caliban" } } @@ -239,8 +237,7 @@ local StephanoLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Stephano Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Stephano", - Description = "Label for Uranus' moon Stephano (Irregular Retrograde Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Stephano" } } @@ -319,8 +316,7 @@ local TrinculoLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Trinculo Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Trinculo", - Description = "Label for Uranus' moon Trinculo (Irregular Retrograde Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Trinculo" } } @@ -399,8 +395,7 @@ local SycoraxLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Sycorax Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Sycorax", - Description = "Label for Uranus' moon Sycorax (Irregular Retrograde Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Sycorax" } } @@ -479,8 +474,7 @@ local ProsperoLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Prospero Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Prospero", - Description = "Label for Uranus' moon Prospero (Irregular Retrograde Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Prospero" } } @@ -559,8 +553,7 @@ local SetebosLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Setebos Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Setebos", - Description = "Label for Uranus' moon Setebos (Irregular Retrograde Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Setebos" } } @@ -639,8 +632,7 @@ local FerdinandLabel = { Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" }, GUI = { Name = "Ferdinand Label", - Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Ferdinand", - Description = "Label for Uranus' moon Ferdinand (Irregular Retrograde Moons)" + Path = "/Solar System/Planets/Uranus/Minor Moons/Irregular Retrograde Moons/Ferdinand" } } @@ -746,6 +738,7 @@ asset.export(FerdinandTrail) asset.export(FerdinandLabel) + asset.meta = { Name = "Uranus Irregular Retrograde Moons", Description = [[Procedural Globe asset containing Uranus' irregular retrograde moons: diff --git a/data/assets/scene/solarsystem/planets/uranus/kernels.asset b/data/assets/scene/solarsystem/planets/uranus/kernels.asset index 2ce3e6350f..50ea5d8bb7 100644 --- a/data/assets/scene/solarsystem/planets/uranus/kernels.asset +++ b/data/assets/scene/solarsystem/planets/uranus/kernels.asset @@ -39,6 +39,7 @@ asset.export("ID", ID) asset.export("Frame", Frame) + asset.meta = { Name = "Uranus Spice Kernels", Description = "Generic SPICE kernels for Uranus", diff --git a/data/assets/scene/solarsystem/planets/uranus/major_moons.asset b/data/assets/scene/solarsystem/planets/uranus/major_moons.asset index 4764b2d179..771216c58f 100644 --- a/data/assets/scene/solarsystem/planets/uranus/major_moons.asset +++ b/data/assets/scene/solarsystem/planets/uranus/major_moons.asset @@ -18,7 +18,13 @@ local Miranda = { Type = "RenderableGlobe", Radii = { 471600, 468000, 466000 } }, - Tag = { "moon_solarSystem", "moon_giants", "moon_uranus", "moon_major", "moon_major_uranus" }, + Tag = { + "moon_solarSystem", + "moon_giants", + "moon_uranus", + "moon_major", + "moon_major_uranus" + }, GUI = { Name = "Miranda", Path = "/Solar System/Planets/Uranus/Major Moons/Miranda" @@ -39,7 +45,12 @@ local MirandaTrail = { Period = 1.413479, Resolution = 1000 }, - Tag = { "moonTrail_solarSystem", "moonTrail_giants", "moonTrail_uranus", "moonTrail_major_uranus" }, + Tag = { + "moonTrail_solarSystem", + "moonTrail_giants", + "moonTrail_uranus", + "moonTrail_major_uranus" + }, GUI = { Name = "Miranda Trail", Path = "/Solar System/Planets/Uranus/Major Moons/Miranda" @@ -66,8 +77,7 @@ local MirandaLabel = { Tag = { "solarsystem_labels", "moon_labels", "major_moon_labels" }, GUI = { Name = "Miranda Label", - Path = "/Solar System/Planets/Uranus/Major Moons/Miranda", - Description = "Label for Uranus' moon Miranda" + Path = "/Solar System/Planets/Uranus/Major Moons/Miranda" } } @@ -85,7 +95,13 @@ local Ariel = { Type = "RenderableGlobe", Radii = { 1162000, 1156000, 1155000 } }, - Tag = { "moon_solarSystem", "moon_giants", "moon_uranus", "moon_major", "moon_major_uranus" }, + Tag = { + "moon_solarSystem", + "moon_giants", + "moon_uranus", + "moon_major", + "moon_major_uranus" + }, GUI = { Name = "Ariel", Path = "/Solar System/Planets/Uranus/Major Moons/Ariel" @@ -106,7 +122,12 @@ local ArielTrail = { Period = 2.520379, Resolution = 1000 }, - Tag = { "moonTrail_solarSystem", "moonTrail_giants", "moonTrail_uranus", "moonTrail_major_uranus" }, + Tag = { + "moonTrail_solarSystem", + "moonTrail_giants", + "moonTrail_uranus", + "moonTrail_major_uranus" + }, GUI = { Name = "Ariel Trail", Path = "/Solar System/Planets/Uranus/Major Moons/Ariel" @@ -133,8 +154,7 @@ local ArielLabel = { Tag = { "solarsystem_labels", "moon_labels", "major_moon_labels" }, GUI = { Name = "Ariel Label", - Path = "/Solar System/Planets/Uranus/Major Moons/Ariel", - Description = "Label for Uranus' moon Ariel" + Path = "/Solar System/Planets/Uranus/Major Moons/Ariel" } } @@ -152,7 +172,13 @@ local Umbriel = { Type = "RenderableGlobe", Radii = { 1169400, 1169400, 1169400 } }, - Tag = { "moon_solarSystem", "moon_giants", "moon_uranus", "moon_major", "moon_major_uranus" }, + Tag = { + "moon_solarSystem", + "moon_giants", + "moon_uranus", + "moon_major", + "moon_major_uranus" + }, GUI = { Name = "Umbriel", Path = "/Solar System/Planets/Uranus/Major Moons/Umbriel" @@ -173,7 +199,12 @@ local UmbrielTrail = { Period = 4.144177, Resolution = 1000 }, - Tag = { "moonTrail_solarSystem", "moonTrail_giants", "moonTrail_uranus", "moonTrail_major_uranus" }, + Tag = { + "moonTrail_solarSystem", + "moonTrail_giants", + "moonTrail_uranus", + "moonTrail_major_uranus" + }, GUI = { Name = "Umbriel Trail", Path = "/Solar System/Planets/Uranus/Major Moons/Umbriel" @@ -200,8 +231,7 @@ local UmbrielLabel = { Tag = { "solarsystem_labels", "moon_labels", "major_moon_labels" }, GUI = { Name = "Umbriel Label", - Path = "/Solar System/Planets/Uranus/Major Moons/Umbriel", - Description = "Label for Uranus' moon Umbriel" + Path = "/Solar System/Planets/Uranus/Major Moons/Umbriel" } } @@ -219,7 +249,13 @@ local Titania = { Type = "RenderableGlobe", Radii = { 1576800, 1576800, 1576800 } }, - Tag = { "moon_solarSystem", "moon_giants", "moon_uranus", "moon_major", "moon_major_uranus" }, + Tag = { + "moon_solarSystem", + "moon_giants", + "moon_uranus", + "moon_major", + "moon_major_uranus" + }, GUI = { Name = "Titania", Path = "/Solar System/Planets/Uranus/Major Moons/Titania" @@ -240,7 +276,12 @@ local TitaniaTrail = { Period = 8.705872, Resolution = 1000 }, - Tag = { "moonTrail_solarSystem", "moonTrail_giants", "moonTrail_uranus", "moonTrail_major_uranus" }, + Tag = { + "moonTrail_solarSystem", + "moonTrail_giants", + "moonTrail_uranus", + "moonTrail_major_uranus" + }, GUI = { Name = "Titania Trail", Path = "/Solar System/Planets/Uranus/Major Moons/Titania" @@ -267,8 +308,7 @@ local TitaniaLabel = { Tag = { "solarsystem_labels", "moon_labels", "major_moon_labels" }, GUI = { Name = "Titania Label", - Path = "/Solar System/Planets/Uranus/Major Moons/Titania", - Description = "Label for Uranus' moon Titania" + Path = "/Solar System/Planets/Uranus/Major Moons/Titania" } } @@ -286,7 +326,13 @@ local Oberon = { Type = "RenderableGlobe", Radii = { 1522800, 1522800, 1522800 } }, - Tag = { "moon_solarSystem", "moon_giants", "moon_uranus", "moon_major", "moon_major_uranus" }, + Tag = { + "moon_solarSystem", + "moon_giants", + "moon_uranus", + "moon_major", + "moon_major_uranus" + }, GUI = { Name = "Oberon", Path = "/Solar System/Planets/Uranus/Major Moons/Oberon" @@ -307,7 +353,12 @@ local OberonTrail = { Period = 13.463239, Resolution = 1000 }, - Tag = { "moonTrail_solarSystem", "moonTrail_giants", "moonTrail_uranus", "moonTrail_major_uranus" }, + Tag = { + "moonTrail_solarSystem", + "moonTrail_giants", + "moonTrail_uranus", + "moonTrail_major_uranus" + }, GUI = { Name = "Oberon Trail", Path = "/Solar System/Planets/Uranus/Major Moons/Oberon" @@ -334,12 +385,10 @@ local OberonLabel = { Tag = { "solarsystem_labels", "moon_labels", "major_moon_labels" }, GUI = { Name = "Oberon Label", - Path = "/Solar System/Planets/Uranus/Major Moons/Oberon", - Description = "Label for Uranus' moon Oberon" + Path = "/Solar System/Planets/Uranus/Major Moons/Oberon" } } - local UranusMajorMoonsOn = { Identifier = "os.solarsystem.UranusMajorMoonsOn", Name = "Turn ON major moons and trails", @@ -470,6 +519,7 @@ asset.export("UranusMajorMoonsOn", UranusMajorMoonsOn.Identifier) asset.export("UranusMajorMoonsOff", UranusMajorMoonsOff.Identifier) + asset.meta = { Name = "Uranus Marjor Moons", Description = [[Procedural Globe asset containing Uranus' major moons: Miranda, Ariel, diff --git a/data/assets/scene/solarsystem/planets/uranus/uranus.asset b/data/assets/scene/solarsystem/planets/uranus/uranus.asset index 4b0fa6fc17..5bda3b2e01 100644 --- a/data/assets/scene/solarsystem/planets/uranus/uranus.asset +++ b/data/assets/scene/solarsystem/planets/uranus/uranus.asset @@ -26,8 +26,7 @@ local Uranus = { Tag = { "planet_solarSystem", "planet_giants" }, GUI = { Name = "Uranus", - Path = "/Solar System/Planets/Uranus", - Description = "Globe for Uranus" + Path = "/Solar System/Planets/Uranus" } } @@ -51,8 +50,7 @@ local UranusLabel = { Tag = { "solarsystem_labels" }, GUI = { Name = "Uranus Label", - Path = "/Solar System/Planets/Uranus", - Description = "Main planet label for Uranus" + Path = "/Solar System/Planets/Uranus" } } diff --git a/data/assets/scene/solarsystem/planets/utah_layers.asset b/data/assets/scene/solarsystem/planets/utah_layers.asset index 573c491653..741cd1188f 100644 --- a/data/assets/scene/solarsystem/planets/utah_layers.asset +++ b/data/assets/scene/solarsystem/planets/utah_layers.asset @@ -17,7 +17,6 @@ asset.meta = { Description = [[Adds default layers for all planets. Remove this asset and include individual layers for planets to customize planet layers - Layers only loaded from the Utah server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/venus/default_layers.asset b/data/assets/scene/solarsystem/planets/venus/default_layers.asset index 321479015f..401dccc331 100644 --- a/data/assets/scene/solarsystem/planets/venus/default_layers.asset +++ b/data/assets/scene/solarsystem/planets/venus/default_layers.asset @@ -9,7 +9,6 @@ asset.meta = { Description = [[Default Venus layers are: Venus Texture, Magellan Mosaic, Clouds Magellan Combo, and Magellan Elevation (3D). - Layers loaded from all available servers ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/venus/layers/newyork_layers.asset b/data/assets/scene/solarsystem/planets/venus/layers/newyork_layers.asset index cf107b8e8b..5513383ff4 100644 --- a/data/assets/scene/solarsystem/planets/venus/layers/newyork_layers.asset +++ b/data/assets/scene/solarsystem/planets/venus/layers/newyork_layers.asset @@ -11,7 +11,6 @@ asset.meta = { Description = [[Default Venus layers are: Venus Texture, Magellan Mosaic, Clouds Magellan Combo, and Magellan Elevation (3D). - Layers only loaded from the New York server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/venus/layers/utah_layers.asset b/data/assets/scene/solarsystem/planets/venus/layers/utah_layers.asset index 3bf8b4aa95..17e40ea29a 100644 --- a/data/assets/scene/solarsystem/planets/venus/layers/utah_layers.asset +++ b/data/assets/scene/solarsystem/planets/venus/layers/utah_layers.asset @@ -11,7 +11,6 @@ asset.meta = { Description = [[Default Venus layers are: Venus Texture, Magellan Mosaic, Clouds Magellan Combo, and Magellan Elevation (3D). - Layers only loaded from the Utah server ]], Author = "OpenSpace Team", diff --git a/data/assets/scene/solarsystem/planets/venus/trail.asset b/data/assets/scene/solarsystem/planets/venus/trail.asset index ebc7385bb1..5e8d0a37a9 100644 --- a/data/assets/scene/solarsystem/planets/venus/trail.asset +++ b/data/assets/scene/solarsystem/planets/venus/trail.asset @@ -20,8 +20,7 @@ local VenusTrail = { Tag = { "planetTrail_solarSystem", "planetTrail_terrestrial" }, GUI = { Name = "Venus Trail", - Path = "/Solar System/Planets/Venus", - Description = "Main trail for Venus" + Path = "/Solar System/Planets/Venus" } } diff --git a/data/assets/scene/solarsystem/planets/venus/trail_barycenter.asset b/data/assets/scene/solarsystem/planets/venus/trail_barycenter.asset index e79a48e0d8..ec46a030d9 100644 --- a/data/assets/scene/solarsystem/planets/venus/trail_barycenter.asset +++ b/data/assets/scene/solarsystem/planets/venus/trail_barycenter.asset @@ -21,8 +21,7 @@ local VenusBarycenterTrail = { Tag = { "planetTrail_solarSystem", "planetTrail_terrestrial" }, GUI = { Name = "Venus Barycenter Trail", - Path = "/Solar System/Planets/Venus", - Description = "Berycenter trail for Venus" + Path = "/Solar System/Planets/Venus" } } diff --git a/data/assets/scene/solarsystem/planets/venus/venus.asset b/data/assets/scene/solarsystem/planets/venus/venus.asset index 8f5ad01181..8d536081c5 100644 --- a/data/assets/scene/solarsystem/planets/venus/venus.asset +++ b/data/assets/scene/solarsystem/planets/venus/venus.asset @@ -47,8 +47,7 @@ local Venus = { Tag = { "planet_solarSystem", "planet_terrestrial" }, GUI = { Name = "Venus", - Path = "/Solar System/Planets/Venus", - Description = "Venus globe with labels and map layers" + Path = "/Solar System/Planets/Venus" } } @@ -72,8 +71,7 @@ local VenusLabel = { Tag = { "solarsystem_labels" }, GUI = { Name = "Venus Label", - Path = "/Solar System/Planets/Venus", - Description = "Label for Venus, viewable within the solar system" + Path = "/Solar System/Planets/Venus" } } diff --git a/data/assets/scene/solarsystem/telescopes/jwst/targets/crab.asset b/data/assets/scene/solarsystem/telescopes/jwst/targets/crab.asset index b1b31eac5c..d3d6c7f572 100644 --- a/data/assets/scene/solarsystem/telescopes/jwst/targets/crab.asset +++ b/data/assets/scene/solarsystem/telescopes/jwst/targets/crab.asset @@ -13,9 +13,7 @@ local CrabImage = { Opacity = 1.0, TexturePath = crab.image .. "crab-nebula.png", Tag = { "mission_jwst_target" }, - Description = [[ - Image of the Crab Nebula by NASA, ESA and Allison Loll/Jeff Hester. - ]] + Description = "Image of the Crab Nebula by NASA, ESA and Allison Loll/Jeff Hester." } diff --git a/data/assets/scene/solarsystem/telescopes/jwst/targets/hh212.asset b/data/assets/scene/solarsystem/telescopes/jwst/targets/hh212.asset index 744dc4755f..cdaa51e25c 100644 --- a/data/assets/scene/solarsystem/telescopes/jwst/targets/hh212.asset +++ b/data/assets/scene/solarsystem/telescopes/jwst/targets/hh212.asset @@ -13,9 +13,7 @@ local HH212Image = { Opacity = 1.0, TexturePath = hh212.image .. "hh212.png", Tag = { "mission_jwst_target" }, - Description = [[ - Image of HH 212 by ESO/M. McCaughrean. - ]] + Description = "Image of HH 212 by ESO/M. McCaughrean." } diff --git a/data/assets/scene/solarsystem/telescopes/jwst/targets/orion.asset b/data/assets/scene/solarsystem/telescopes/jwst/targets/orion.asset index 3c5eab468e..ce79b81ca0 100644 --- a/data/assets/scene/solarsystem/telescopes/jwst/targets/orion.asset +++ b/data/assets/scene/solarsystem/telescopes/jwst/targets/orion.asset @@ -13,9 +13,7 @@ local OrionImage = { Opacity = 1.0, TexturePath = orion.image .. "orion-nebula.png", Tag = { "mission_jwst_target" }, - Description = [[ - Image of the Orion Nebula by Bill Schoening/NOIRLab/NSF/AURA. - ]] + Description = "Image of the Orion Nebula by Bill Schoening/NOIRLab/NSF/AURA." } diff --git a/data/assets/scene/solarsystem/telescopes/jwst/targets/sn1987a_image.asset b/data/assets/scene/solarsystem/telescopes/jwst/targets/sn1987a_image.asset index 2dc660828a..b87ea56888 100644 --- a/data/assets/scene/solarsystem/telescopes/jwst/targets/sn1987a_image.asset +++ b/data/assets/scene/solarsystem/telescopes/jwst/targets/sn1987a_image.asset @@ -13,10 +13,7 @@ asset.export("image", image) asset.meta = { Name = "Supernova SN 1987a", Description = "Supernova SN 1987a Image", - Author = [[ - X-ray: NASA/CXC/PSU/S.Park & D.Burrows. - Optical: NASA/STScI/CfA/P.Challis - ]], + Author = "X-ray: NASA/CXC/PSU/S.Park & D.Burrows. Optical: NASA/STScI/CfA/P.Challis", URL = "https://chandra.harvard.edu/photo/2007/sn87a/", License = "https://chandra.harvard.edu/photo/image_use.html" } diff --git a/data/assets/scene/solarsystem/telescopes/jwst/timelapse.asset b/data/assets/scene/solarsystem/telescopes/jwst/timelapse.asset index 1aa47abf68..02ef78313d 100644 --- a/data/assets/scene/solarsystem/telescopes/jwst/timelapse.asset +++ b/data/assets/scene/solarsystem/telescopes/jwst/timelapse.asset @@ -1,6 +1,8 @@ asset.require("spice/core") -- openspace.time.advancedTime depends on SPICE asset.require("scene/solarsystem/planets/earth/atmosphere") + + -- Function to advance a time stamp in the given number of days, hours, minutes and -- seconds. returns the new time stamp local function advance(time, days, hours, minutes, seconds) diff --git a/data/assets/scene/solarsystem/telescopes/jwst/trail.asset b/data/assets/scene/solarsystem/telescopes/jwst/trail.asset index 478477024d..eccc987873 100644 --- a/data/assets/scene/solarsystem/telescopes/jwst/trail.asset +++ b/data/assets/scene/solarsystem/telescopes/jwst/trail.asset @@ -5,6 +5,7 @@ local kernels = asset.require("./kernels") local coreKernels = asset.require("spice/core") + local LaunchTime = "2021 DEC 25 12:20:00" local DetachTime = "2021 DEC 25 12:50:00" local L2orbitInsertionTime = "2022 JAN 25 00:00:00" @@ -36,9 +37,7 @@ local JWSTTrailLaunch = { GUI = { Name = "JWST Launch Trail", Path = "/Solar System/Telescopes/JWST/Trails", - Description = [[ - James Webb Space Telescope Launch Trail relative to Earth IAU. - ]] + Description = "James Webb Space Telescope Launch Trail relative to Earth IAU." } } @@ -68,9 +67,7 @@ local JWSTTrailCruise = { GUI = { Name = "JWST Cruise Trail", Path = "/Solar System/Telescopes/JWST/Trails", - Description = [[ - James Webb Space Telescope Cruise Trail relative to Earth. - ]] + Description = "James Webb Space Telescope Cruise Trail relative to Earth." } } @@ -100,9 +97,7 @@ local JWSTTrailOrbit = { GUI = { Name = "JWST Orbit Trail", Path = "/Solar System/Telescopes/JWST/Trails", - Description = [[ - James Webb Space Telescope Orbit Trail relative to L2. - ]] + Description = "James Webb Space Telescope Orbit Trail relative to L2." } } @@ -131,9 +126,7 @@ local JWSTTrailCoRevOrbit = { GUI = { Name = "JWST L2 Co-revolving Orbit Trail", Path = "/Solar System/Telescopes/JWST/Trails", - Description = [[ - James Webb Space Telescope Orbit Trail that Co-revolves with L2. - ]] + Description = "James Webb Space Telescope Orbit Trail that Co-revolves with L2." } } @@ -160,9 +153,7 @@ local JWSTSunTrail = { GUI = { Name = "JWST Sun Trail", Path = "/Solar System/Telescopes/JWST/Trails", - Description = [[ - James Webb Space Telescope Trail relative to the Sun. - ]] + Description = "James Webb Space Telescope Trail relative to the Sun." } } diff --git a/data/assets/util/debug_helper.asset b/data/assets/util/debug_helper.asset index 2c9d94db2d..2c5c242d3f 100644 --- a/data/assets/util/debug_helper.asset +++ b/data/assets/util/debug_helper.asset @@ -123,6 +123,7 @@ local function registerCartesianAxes(axesAsset, specification) registerNode(axesAsset, addCartesianAxes, generateAxesIdentifier, specification) end + asset.export("addGrid", addGrid) asset.export("registerGrid", registerGrid) diff --git a/data/assets/util/joysticks/any-joystick.asset b/data/assets/util/joysticks/any-joystick.asset index b25838aeeb..9e9ef66a9e 100644 --- a/data/assets/util/joysticks/any-joystick.asset +++ b/data/assets/util/joysticks/any-joystick.asset @@ -77,6 +77,8 @@ asset.onDeinitialize(function() end end) + + asset.meta = { Name = "Joystick controller: Any", Description = [[ diff --git a/data/assets/util/joysticks/microsoft-xbox-360-pad.asset b/data/assets/util/joysticks/microsoft-xbox-360-pad.asset index 07d2af220d..528c6b18f9 100644 --- a/data/assets/util/joysticks/microsoft-xbox-360-pad.asset +++ b/data/assets/util/joysticks/microsoft-xbox-360-pad.asset @@ -207,6 +207,8 @@ asset.onInitialize(function() ) end) + + asset.meta = { Name = "Joystick controller: Microsoft X-Box 360 pad", Description = "Joystick controller configuration for Microsoft X-Box 360 pad", diff --git a/data/assets/util/joysticks/ps4.asset b/data/assets/util/joysticks/ps4.asset index 599e0de9da..f8696079e8 100644 --- a/data/assets/util/joysticks/ps4.asset +++ b/data/assets/util/joysticks/ps4.asset @@ -229,6 +229,8 @@ asset.onInitialize(function() ) end) + + asset.meta = { Name = "Joystick controller: PS4", Description = "Joystick controller configuration for PS4", diff --git a/data/assets/util/joysticks/ps5.asset b/data/assets/util/joysticks/ps5.asset index e4398c7767..f2c55bc0e0 100644 --- a/data/assets/util/joysticks/ps5.asset +++ b/data/assets/util/joysticks/ps5.asset @@ -242,6 +242,8 @@ asset.onInitialize(function() ) end) + + asset.meta = { Name = "Joystick controller: PS5", Description = "Joystick controller configuration for PS5", diff --git a/data/assets/util/joysticks/space-mouse-compact-wireless.asset b/data/assets/util/joysticks/space-mouse-compact-wireless.asset index b17426cec4..3ef46d306c 100644 --- a/data/assets/util/joysticks/space-mouse-compact-wireless.asset +++ b/data/assets/util/joysticks/space-mouse-compact-wireless.asset @@ -70,6 +70,8 @@ asset.onInitialize(function() ) end) + + asset.meta = { Name = "Joystick controller: SpaceMouse compact wireless", Description = "Joystick controller configuration for SpaceMouse compact wireless", diff --git a/data/assets/util/joysticks/space-mouse-compact.asset b/data/assets/util/joysticks/space-mouse-compact.asset index 4a79cf9881..77b911effe 100644 --- a/data/assets/util/joysticks/space-mouse-compact.asset +++ b/data/assets/util/joysticks/space-mouse-compact.asset @@ -70,6 +70,8 @@ asset.onInitialize(function() ) end) + + asset.meta = { Name = "Joystick controller: SpaceMouse compact (wired)", Description = "Joystick controller configuration for SpaceMouse compact (wired)", diff --git a/data/assets/util/joysticks/space-mouse-enterprise-wireless.asset b/data/assets/util/joysticks/space-mouse-enterprise-wireless.asset index 4687d42fa0..279a8c3cd2 100644 --- a/data/assets/util/joysticks/space-mouse-enterprise-wireless.asset +++ b/data/assets/util/joysticks/space-mouse-enterprise-wireless.asset @@ -64,6 +64,8 @@ asset.onInitialize(function() openspace.navigation.bindJoystickAxis(name, controller.Tilt.LeftRight, "LocalRoll") end) + + asset.meta = { Name = "Joystick controller: SpaceMouse enterprise wireless", Description = "Joystick controller configuration for SpaceMouse enterprise wireless", diff --git a/data/assets/util/joysticks/space-mouse-enterprise.asset b/data/assets/util/joysticks/space-mouse-enterprise.asset index 74731d2e33..b3ee78bf1c 100644 --- a/data/assets/util/joysticks/space-mouse-enterprise.asset +++ b/data/assets/util/joysticks/space-mouse-enterprise.asset @@ -64,6 +64,8 @@ asset.onInitialize(function() openspace.navigation.bindJoystickAxis(name, controller.Tilt.LeftRight, "LocalRoll") end) + + asset.meta = { Name = "Joystick controller: SpaceMouse enterprise (wired)", Description = "Joystick controller configuration for SpaceMouse enterprise (wired)", diff --git a/data/assets/util/joysticks/xbox-wireless.asset b/data/assets/util/joysticks/xbox-wireless.asset index f5c8cafc78..699dc1eb6a 100644 --- a/data/assets/util/joysticks/xbox-wireless.asset +++ b/data/assets/util/joysticks/xbox-wireless.asset @@ -207,6 +207,8 @@ asset.onInitialize(function() ) end) + + asset.meta = { Name = "Joystick controller: Xbox wireless", Description = "Joystick controller configuration for Xbox wireless", diff --git a/data/assets/util/joysticks/xbox.asset b/data/assets/util/joysticks/xbox.asset index 40efb93d89..a31b8cb5db 100644 --- a/data/assets/util/joysticks/xbox.asset +++ b/data/assets/util/joysticks/xbox.asset @@ -207,6 +207,8 @@ asset.onInitialize(function() ) end) + + asset.meta = { Name = "Joystick controller: Xbox (wired)", Description = "Joystick controller configuration for Xbox (wired)", From 1cef84ca7438c88a5bf573dcd1ad50c22679d2e3 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 14 Aug 2024 10:22:41 +0200 Subject: [PATCH 53/99] Add an identifier to mission files and use that instead of the name --- .../solarsystem/missions/apollo/mission.asset | 3 +- .../missions/bepicolombo/mission.asset | 3 +- .../solarsystem/missions/dawn/mission.asset | 3 +- .../solarsystem/missions/juice/mission.asset | 3 +- .../solarsystem/missions/juno/mission.asset | 3 +- .../missions/newhorizons/mission.asset | 3 +- .../missions/osirisrex/mission.asset | 3 +- .../missions/perseverance/mission.asset | 3 +- .../missions/rosetta/mission.asset | 3 +- .../missions/voyager/mission.asset | 3 +- .../planets/earth/eclipses/timeline.asset | 3 +- .../telescopes/euclid/mission.asset | 3 +- .../solarsystem/telescopes/jwst/mission.asset | 3 +- src/mission/missionmanager_lua.inl | 42 +++++++++++++------ 14 files changed, 55 insertions(+), 26 deletions(-) diff --git a/data/assets/scene/solarsystem/missions/apollo/mission.asset b/data/assets/scene/solarsystem/missions/apollo/mission.asset index 6c1e4543d7..804cf3e4fa 100644 --- a/data/assets/scene/solarsystem/missions/apollo/mission.asset +++ b/data/assets/scene/solarsystem/missions/apollo/mission.asset @@ -1,4 +1,5 @@ local Mission = { + Identifier = "Apollo", Name = "The Apollo Missions", Image = "https://solarsystem.nasa.gov/system/downloadable_items/2962_s65-55202.jpg", Description = "Apollo was the NASA program that resulted in American astronauts' making a total of 11 spaceflights and walking on the moon. The first four flights tested the equipment used in the Apollo Program. Six of the other seven flights landed on the moon. The first Apollo flight happened in 1968. The first moon landing took place in 1969. The last moon landing was in 1972. A total of 12 astronauts walked on the moon. The astronauts conducted scientific research there. They studied the lunar surface. They collected moon rocks to bring back to Earth.", @@ -54,5 +55,5 @@ asset.onInitialize(function() end) asset.onDeinitialize(function() - openspace.unloadMission(Mission.Name) + openspace.unloadMission(Mission) end) diff --git a/data/assets/scene/solarsystem/missions/bepicolombo/mission.asset b/data/assets/scene/solarsystem/missions/bepicolombo/mission.asset index e3c7ad03c7..c108ec8b8a 100644 --- a/data/assets/scene/solarsystem/missions/bepicolombo/mission.asset +++ b/data/assets/scene/solarsystem/missions/bepicolombo/mission.asset @@ -1,4 +1,5 @@ local Mission = { + Identifier = "BepiColombo", Name = "BepiColombo", Image = "https://scifleet.esa.int/downloads/bepi_mcs/bepicolombo.png", Description = [[BepiColombo is Europe's first mission to Mercury. It launched in October 2018 on a journey to the smallest and least explored terrestrial planet in our Solar System. Arriving at Mercury in December 2025, it will endure temperatures in excess of 350°C and gather data during a 1 year nominal mission. The mission comprises two spacecraft: 1. Mercury Planetary Orbiter (MPO), 2. Mercury Magnetospheric Orbiter (MMO). BepiColombo is a joint mission between ESA and the Japan Aerospace Exploration Agency (JAXA), executed under ESA leadership.]], @@ -73,7 +74,7 @@ asset.onInitialize(function() end) asset.onDeinitialize(function() - openspace.unloadMission(Mission.Name) + openspace.unloadMission(Mission) end) diff --git a/data/assets/scene/solarsystem/missions/dawn/mission.asset b/data/assets/scene/solarsystem/missions/dawn/mission.asset index cf1e6f2dac..5843ccea24 100644 --- a/data/assets/scene/solarsystem/missions/dawn/mission.asset +++ b/data/assets/scene/solarsystem/missions/dawn/mission.asset @@ -1,4 +1,5 @@ local Mission = { + Identifier = "Dawn", Name = "Dawn", Image = "https://photojournal.jpl.nasa.gov/jpegMod/PIA19375_modest.jpg", TimeRange = { Start = "2007 SEP 07 11:34:00", End = "2018 OCT 30 00:00:00" }, @@ -38,5 +39,5 @@ asset.onInitialize(function() end) asset.onDeinitialize(function() - openspace.unloadMission(Mission.Name) + openspace.unloadMission(Mission) end) diff --git a/data/assets/scene/solarsystem/missions/juice/mission.asset b/data/assets/scene/solarsystem/missions/juice/mission.asset index 87306365ac..3554bc5c5f 100644 --- a/data/assets/scene/solarsystem/missions/juice/mission.asset +++ b/data/assets/scene/solarsystem/missions/juice/mission.asset @@ -1,4 +1,5 @@ local Mission = { + Identifier = "Juice", Name = "Juice", Image = "https://www.esa.int/var/esa/storage/images/science_exploration/space_science/juice/23388092-2-eng-GB/Juice_pillars.jpg", Description = "ESA's Jupiter Icy Moons Explorer, Juice, will make detailed observations of the giant gas planet and its three large ocean-bearing moons - Ganymede, Callisto and Europa - with a suite of remote sensing, geophysical, and in situ instruments. The mission will characterize these moons as both planetary objects and possible habitats, explore Jupiter's complex environment in depth, and study the wider Jupiter system as an archetype for gas giants across the Universe.", @@ -63,5 +64,5 @@ asset.onInitialize(function() end) asset.onDeinitialize(function() - openspace.unloadMission(Mission.Name) + openspace.unloadMission(Mission) end) diff --git a/data/assets/scene/solarsystem/missions/juno/mission.asset b/data/assets/scene/solarsystem/missions/juno/mission.asset index 2d09c4a3f9..b823e46e3f 100644 --- a/data/assets/scene/solarsystem/missions/juno/mission.asset +++ b/data/assets/scene/solarsystem/missions/juno/mission.asset @@ -1,4 +1,5 @@ local Mission = { + Identifier = "Juno", Name = "Juno", Image = "https://upload.wikimedia.org/wikipedia/commons/3/32/Juno_mission_insignia.svg", Description = "On August 5, 2011, NASA's Juno spacecraft embarked on a 5-year journey to our solar system's largest planet - the gas giant Jupiter. Its mission: to probe beneath the planet's dense clouds and answer questions about the origin and evolution of Jupiter, our solar system, and giant planets in general across the cosmos. Juno arrived at Jupiter on July 4, 2016, after a 5-year, 1.7-billion-mile journey, and settled into a 53-day polar orbit stretching from just above Jupiter's cloud tops to the outer reaches of the Jovian magnetosphere.", @@ -43,5 +44,5 @@ asset.onInitialize(function() end) asset.onDeinitialize(function() - openspace.unloadMission(Mission.Name) + openspace.unloadMission(Mission) end) diff --git a/data/assets/scene/solarsystem/missions/newhorizons/mission.asset b/data/assets/scene/solarsystem/missions/newhorizons/mission.asset index 2450233836..99dff527e6 100644 --- a/data/assets/scene/solarsystem/missions/newhorizons/mission.asset +++ b/data/assets/scene/solarsystem/missions/newhorizons/mission.asset @@ -3,6 +3,7 @@ -- are approximate and need fixing local Mission = { + Identifier = "NewHorizons", Name = "New Horizons", Phases = { { @@ -126,5 +127,5 @@ asset.onInitialize(function() end) asset.onDeinitialize(function() - openspace.unloadMission(Mission.Name) + openspace.unloadMission(Mission) end) diff --git a/data/assets/scene/solarsystem/missions/osirisrex/mission.asset b/data/assets/scene/solarsystem/missions/osirisrex/mission.asset index 5ddde1a336..d2d3e229d6 100644 --- a/data/assets/scene/solarsystem/missions/osirisrex/mission.asset +++ b/data/assets/scene/solarsystem/missions/osirisrex/mission.asset @@ -30,6 +30,7 @@ https://www.asteroidmission.org/wp-content/uploads/2018/10/SPP-Approach-Poster-1 --]] local Mission = { + Identifier = "OsirisRex", Name = "OSIRIS-REx", Description = "Launched on Sept. 8, 2016, the Origins, Spectral Interpretation, Resource Identification, Security-Regolith Explorer (OSIRIS-REx) spacecraft traveled to a near-Earth asteroid called Bennu (formerly 1999 RQ36), and collected a sample of the of rocks and material from the surface that it will return to Earth in 2023. The mission will help scientists investigate how planets formed and how life began, as well as improve our understanding of asteroids that could impact Earth.", Image = "https://www.nasa.gov/sites/default/files/styles/full_width_feature/public/thumbnails/image/osiris-rex-mission-logo12_copy.png", @@ -308,5 +309,5 @@ asset.onInitialize(function() end) asset.onDeinitialize(function() - openspace.unloadMission(Mission.Name) + openspace.unloadMission(Mission) end) diff --git a/data/assets/scene/solarsystem/missions/perseverance/mission.asset b/data/assets/scene/solarsystem/missions/perseverance/mission.asset index 6a27ddc505..db45229dae 100644 --- a/data/assets/scene/solarsystem/missions/perseverance/mission.asset +++ b/data/assets/scene/solarsystem/missions/perseverance/mission.asset @@ -1,4 +1,5 @@ local Mission = { + Identifier = "Perseverance", Name = "Mars 2020 Perseverance Events on Mars", Phases = { { @@ -34,5 +35,5 @@ asset.onInitialize(function() end) asset.onDeinitialize(function() - openspace.unloadMission(Mission.Name) + openspace.unloadMission(Mission) end) diff --git a/data/assets/scene/solarsystem/missions/rosetta/mission.asset b/data/assets/scene/solarsystem/missions/rosetta/mission.asset index d2e87043f5..3ee1cbb585 100644 --- a/data/assets/scene/solarsystem/missions/rosetta/mission.asset +++ b/data/assets/scene/solarsystem/missions/rosetta/mission.asset @@ -1,6 +1,7 @@ -- Source: https://solarsystem.nasa.gov/missions/rosetta-philae/in-depth/ local Mission = { + Identifier = "Rosetta", Name = "Rosetta", TimeRange = { Start = "2004 MAR 02 00:00:00", End = "2016 SEP 30 00:00:00" }, Image = "https://www.cosmos.esa.int/documents/522118/522182/Rosetta_logo.png/cd85878d-2fac-e086-e32a-df0eaee5e505?t=1614026031720", @@ -113,5 +114,5 @@ asset.onInitialize(function() end) asset.onDeinitialize(function() - openspace.unloadMission(Mission.Name) + openspace.unloadMission(Mission) end) diff --git a/data/assets/scene/solarsystem/missions/voyager/mission.asset b/data/assets/scene/solarsystem/missions/voyager/mission.asset index 5084e98480..23b712834d 100644 --- a/data/assets/scene/solarsystem/missions/voyager/mission.asset +++ b/data/assets/scene/solarsystem/missions/voyager/mission.asset @@ -5,6 +5,7 @@ -- are approximate and need fixing local Mission = { + Identifier = "Voyager", Name = "Voyager", Image = "https://upload.wikimedia.org/wikipedia/commons/8/87/Voyager_-_mission_logo.png", Description = "The twin Voyager 1 and 2 spacecraft are exploring where nothing from Earth has flown before. Continuing on their more-than-40-year journey since their 1977 launches, they each are much farther away from Earth and the sun than Pluto. In August 2012, Voyager 1 made the historic entry into interstellar space, the region between stars, filled with material ejected by the death of nearby stars millions of years ago. Voyager 2 entered interstellar space on November 5, 2018 and scientists hope to learn more about this region. Both spacecraft are still sending scientific information about their surroundings through the Deep Space Network, or DSN. The primary mission was the exploration of Jupiter and Saturn. After making a string of discoveries there — such as active volcanoes on Jupiter's moon Io and intricacies of Saturn's rings — the mission was extended. Voyager 2 went on to explore Uranus and Neptune, and is still the only spacecraft to have visited those outer planets. The adventurers' current mission, the Voyager Interstellar Mission (VIM), will explore the outermost edge of the Sun's domain. And beyond.", @@ -120,5 +121,5 @@ asset.onInitialize(function() end) asset.onDeinitialize(function() - openspace.unloadMission(Mission.Name) + openspace.unloadMission(Mission) end) diff --git a/data/assets/scene/solarsystem/planets/earth/eclipses/timeline.asset b/data/assets/scene/solarsystem/planets/earth/eclipses/timeline.asset index d263f2d1bd..a94559e606 100644 --- a/data/assets/scene/solarsystem/planets/earth/eclipses/timeline.asset +++ b/data/assets/scene/solarsystem/planets/earth/eclipses/timeline.asset @@ -1,4 +1,5 @@ local Timeline = { + Identifier = "Eclipses", Name = "Eclipses", Image = "https://www.esa.int/var/esa/storage/images/esa_multimedia/images/2019/07/stages_of_a_total_solar_eclipse/19468511-1-eng-GB/Stages_of_a_total_solar_eclipse_pillars.jpg", Description = "An eclipse is an awe-inspiring celestial event that drastically changes the appearance of the two biggest objects we see in our sky: our Sun and Moon. On Earth, people can experience solar eclipses when Earth, the Moon, and the Sun line up. There are four types of solar eclipses: total, partial, hybrid, and annular. The type of eclipse that people get to see depends on how the Moon aligns with Earth and the Sun, and how far away the Moon is from Earth. In addition to inspiring artists and musicians, eclipses have driven numerous scientific discoveries. For over a century, solar eclipses helped scientists decipher the Sun's structure and explosive events, find evidence for the theory of general relativity, discover a new element, and much more. Scientists still study eclipses to make new discoveries about the Sun, Earth, and our space environment. Total solar eclipses are particularly important because they allow scientists to see a part of the Sun's atmosphere - known as the corona - which is too faint to see except when the bright light of the Sun's surface is blocked.", @@ -2275,7 +2276,7 @@ asset.onInitialize(function() end) asset.onDeinitialize(function() - openspace.unloadMission(Timeline.Name) + openspace.unloadMission(Timeline) end) diff --git a/data/assets/scene/solarsystem/telescopes/euclid/mission.asset b/data/assets/scene/solarsystem/telescopes/euclid/mission.asset index a9b2ba0c43..a5379df34a 100644 --- a/data/assets/scene/solarsystem/telescopes/euclid/mission.asset +++ b/data/assets/scene/solarsystem/telescopes/euclid/mission.asset @@ -1,4 +1,5 @@ local Mission = { + Identifier = "Euclid", Name = "Euclid", Image = "https://www.esa.int/var/esa/storage/images/esa_multimedia/images/2013/01/euclid_logo/12493233-3-eng-GB/Euclid_logo_pillars.png", Description = [[Euclid is designed to explore the evolution of the dark universe. It will make a 3D-map of the universe (with time as the third dimension) by observing billions of galaxies out to 10 billion light-years, across more than a third of the sky. @@ -74,7 +75,7 @@ asset.onInitialize(function() end) asset.onDeinitialize(function() - openspace.unloadMission(Mission.Name) + openspace.unloadMission(Mission) end) diff --git a/data/assets/scene/solarsystem/telescopes/jwst/mission.asset b/data/assets/scene/solarsystem/telescopes/jwst/mission.asset index 9224b52ff4..f04eba7452 100644 --- a/data/assets/scene/solarsystem/telescopes/jwst/mission.asset +++ b/data/assets/scene/solarsystem/telescopes/jwst/mission.asset @@ -5,6 +5,7 @@ -- are approximate and need fixing local Mission = { + Identifier = "JWST", Name = "James Webb Space Telescope", Image = "https://www.esa.int/var/esa/storage/images/esa_multimedia/images/2016/12/jwst_mission_logo/16561412-4-eng-GB/JWST_mission_logo_pillars.png", Description = "The James Webb Space Telescope (sometimes called JWST or Webb) is an orbiting infrared observatory that will complement and extend the discoveries of the Hubble Space Telescope, with longer wavelength coverage and greatly improved sensitivity. The longer wavelengths enable Webb to look much closer to the beginning of time and to hunt for the unobserved formation of the first galaxies, as well as to look inside dust clouds where stars and planetary systems are forming today.", @@ -96,5 +97,5 @@ asset.onInitialize(function() end) asset.onDeinitialize(function() - openspace.unloadMission(Mission.Name) + openspace.unloadMission(Mission) end) diff --git a/src/mission/missionmanager_lua.inl b/src/mission/missionmanager_lua.inl index 3f31ff869f..528ef24f94 100644 --- a/src/mission/missionmanager_lua.inl +++ b/src/mission/missionmanager_lua.inl @@ -31,36 +31,52 @@ } // Unloads a previously loaded mission. -[[codegen::luawrap]] void unloadMission(std::string missionName) { +[[codegen::luawrap]] void unloadMission( + std::variant identifierOrMission) +{ using namespace openspace; - if (missionName.empty()) { - throw ghoul::lua::LuaError("Mission name is empty"); + std::string identifier; + if (std::holds_alternative(identifierOrMission)) { + identifier = std::move(std::get(identifierOrMission)); + } + else { + ghoul::Dictionary dict = std::get(identifierOrMission); + if (!dict.hasValue("Identifier")) { + throw ghoul::lua::LuaError("Mission table needs 'Identifier'"); + } + + identifier = dict.value("Identifier"); } - if (!global::missionManager->hasMission(missionName)) { + + if (identifier.empty()) { + throw ghoul::lua::LuaError("Mission identifier is empty"); + } + + if (!global::missionManager->hasMission(identifier)) { throw ghoul::lua::LuaError("Mission was not previously loaded"); } - global::missionManager->unloadMission(missionName); + global::missionManager->unloadMission(identifier); } // Returns whether a mission with the provided name has been loaded. -[[codegen::luawrap]] bool hasMission(std::string missionName) { - if (missionName.empty()) { - throw ghoul::lua::LuaError("Missing name is empty"); +[[codegen::luawrap]] bool hasMission(std::string identifier) { + if (identifier.empty()) { + throw ghoul::lua::LuaError("Mission identifier is empty"); } - bool hasMission = openspace::global::missionManager->hasMission(missionName); + bool hasMission = openspace::global::missionManager->hasMission(identifier); return hasMission; } // Set the currnet mission. -[[codegen::luawrap]] void setCurrentMission(std::string missionName) { - if (missionName.empty()) { - throw ghoul::lua::LuaError("Mission name is empty"); +[[codegen::luawrap]] void setCurrentMission(std::string identifier) { + if (identifier.empty()) { + throw ghoul::lua::LuaError("Mission identifier is empty"); } - openspace::global::missionManager->setCurrentMission(missionName); + openspace::global::missionManager->setCurrentMission(identifier); } #include "missionmanager_lua_codegen.cpp" From ab4023b9fd90448fb35912cab4e5fbd45fd94f50 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 14 Aug 2024 14:38:46 +0200 Subject: [PATCH 54/99] No longer send the script source of shortcuts via the topic. Don't scripts into the log that are binary blobs --- modules/server/src/topics/shortcuttopic.cpp | 2 -- src/scripting/scriptengine.cpp | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/server/src/topics/shortcuttopic.cpp b/modules/server/src/topics/shortcuttopic.cpp index 83bf4a47eb..2884869a35 100644 --- a/modules/server/src/topics/shortcuttopic.cpp +++ b/modules/server/src/topics/shortcuttopic.cpp @@ -58,7 +58,6 @@ std::vector ShortcutTopic::shortcutsJson() const { const nlohmann::json shortcutJson = { { "identifier", action.identifier }, { "name", action.name }, - { "script", action.command }, { "synchronization", static_cast(!action.isLocal) }, { "documentation", action.documentation }, { "guiPath", action.guiPath }, @@ -121,7 +120,6 @@ nlohmann::json ShortcutTopic::shortcutJson(const std::string& identifier) const json.push_back({ { "identifier", action.identifier }, { "name", action.name }, - { "script", action.command }, { "synchronization", static_cast(!action.isLocal) }, { "documentation", action.documentation }, { "guiPath", action.guiPath }, diff --git a/src/scripting/scriptengine.cpp b/src/scripting/scriptengine.cpp index 57cd2c42fb..faa268c8dc 100644 --- a/src/scripting/scriptengine.cpp +++ b/src/scripting/scriptengine.cpp @@ -170,8 +170,9 @@ bool ScriptEngine::runScript(const std::string& script, const ScriptCallback& ca ghoul_assert(!script.empty(), "Script must not be empty"); - if (_logScripts) { - // Write command to log before it's executed + if (_logScripts && script[0] != '\x1b') { + // \x1b = A byte in the beginning that Lua uses to represent whether a string is + // an ASCII or a binary blob. We don't want to print binary blobs into the log writeLog(script); } From c7f2ab1a438dcc554c9d73fc07b3fcf835c89869 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 14 Aug 2024 15:10:44 +0200 Subject: [PATCH 55/99] Define the supergalactic transformation matrix only once and reuse in other assets --- data/assets/scene/digitaluniverse/abell.asset | 15 ++++++--------- .../digitaluniverse/galaxy_clusters.asset | 15 ++++++--------- .../scene/digitaluniverse/galaxy_groups.asset | 15 ++++++--------- .../digitaluniverse/milkyway_label.asset | 13 +++++-------- .../scene/digitaluniverse/transforms.asset | 19 +++++++++++++++++++ data/assets/scene/digitaluniverse/tully.asset | 17 +++++++---------- 6 files changed, 49 insertions(+), 45 deletions(-) create mode 100644 data/assets/scene/digitaluniverse/transforms.asset diff --git a/data/assets/scene/digitaluniverse/abell.asset b/data/assets/scene/digitaluniverse/abell.asset index dce457d151..a7282aaac8 100644 --- a/data/assets/scene/digitaluniverse/abell.asset +++ b/data/assets/scene/digitaluniverse/abell.asset @@ -1,3 +1,7 @@ +local transforms = asset.require("./transforms") + + + local textures = asset.resource({ Name = "Point Textures", Type = "HttpSynchronization", @@ -13,13 +17,6 @@ local speck = asset.resource({ }) -local TransformMatrix = { - -0.7357425748, 0.67726129641, 0.0, 0.0, - -0.074553778365, -0.080991471307, 0.9939225904, 0.0, - 0.67314530211, 0.73127116582, 0.11008126223, 0.0, - 0.0, 0.0, 0.0, 1.0 -} - local Object = { Identifier = "Abell", Renderable = { @@ -33,7 +30,7 @@ local Object = { Size = 21.2, MinMaxSize = { 10, 12 }, Unit = "Mpc", - TransformationMatrix = TransformMatrix + TransformationMatrix = transforms.Supergalactic }, Opacity = 1.0, Coloring = { @@ -44,7 +41,7 @@ local Object = { File = textures .. "point3A.png", }, Unit = "Mpc", - TransformationMatrix = TransformMatrix, + TransformationMatrix = transforms.Supergalactic, SizeSettings = { ScaleExponent = 23.2, MaxSize = 0.27, diff --git a/data/assets/scene/digitaluniverse/galaxy_clusters.asset b/data/assets/scene/digitaluniverse/galaxy_clusters.asset index 82ca6b29c9..bd7fda1509 100644 --- a/data/assets/scene/digitaluniverse/galaxy_clusters.asset +++ b/data/assets/scene/digitaluniverse/galaxy_clusters.asset @@ -1,3 +1,7 @@ +local transforms = asset.require("./transforms") + + + local speck = asset.resource({ Name = "Clusters Speck Files", Type = "HttpSynchronization", @@ -6,13 +10,6 @@ local speck = asset.resource({ }) -local TransformMatrix = { - -0.7357425748, 0.67726129641, 0.0, 0.0, - -0.074553778365, -0.080991471307, 0.9939225904, 0.0, - 0.67314530211, 0.73127116582, 0.11008126223, 0.0, - 0.0, 0.0, 0.0, 1.0 -} - local Object = { Identifier = "GalaxyClusterLabels", Renderable = { @@ -25,11 +22,11 @@ local Object = { Size = 22, MinMaxSize = { 8, 15 }, Unit = "Mpc", - TransformationMatrix = TransformMatrix + TransformationMatrix = transforms.Supergalactic }, Opacity = 0.65, Unit = "Mpc", - TransformationMatrix = TransformMatrix + TransformationMatrix = transforms.Supergalactic }, GUI = { Name = "Galaxy Cluster Labels", diff --git a/data/assets/scene/digitaluniverse/galaxy_groups.asset b/data/assets/scene/digitaluniverse/galaxy_groups.asset index e56532083a..e051227eee 100644 --- a/data/assets/scene/digitaluniverse/galaxy_groups.asset +++ b/data/assets/scene/digitaluniverse/galaxy_groups.asset @@ -1,3 +1,7 @@ +local transforms = asset.require("./transforms") + + + local speck = asset.resource({ Name = "Galaxy Groups Speck Files", Type = "HttpSynchronization", @@ -6,13 +10,6 @@ local speck = asset.resource({ }) -local TransformMatrix = { - -0.7357425748, 0.67726129641, 0.0, 0.0, - -0.074553778365, -0.080991471307, 0.9939225904, 0.0, - 0.67314530211, 0.73127116582, 0.11008126223, 0.0, - 0.0, 0.0, 0.0, 1.0 -} - local Object = { Identifier = "NearbyGalaxyGroups", Renderable = { @@ -25,11 +22,11 @@ local Object = { Size = 20.4, MinMaxSize = { 8, 20 }, Unit = "Mpc", - TransformationMatrix = TransformMatrix + TransformationMatrix = transforms.Supergalactic }, Opacity = 0.65, Unit = "Mpc", - TransformationMatrix = TransformMatrix + TransformationMatrix = transforms.Supergalactic }, GUI = { Name = "Galaxy Group Labels", diff --git a/data/assets/scene/digitaluniverse/milkyway_label.asset b/data/assets/scene/digitaluniverse/milkyway_label.asset index 41a7752969..5393556afc 100644 --- a/data/assets/scene/digitaluniverse/milkyway_label.asset +++ b/data/assets/scene/digitaluniverse/milkyway_label.asset @@ -1,3 +1,7 @@ +local transforms = asset.require("./transforms") + + + local homespeck = asset.resource({ Name = "Home Speck File", Type = "HttpSynchronization", @@ -5,13 +9,6 @@ local homespeck = asset.resource({ Version = 1 }) -local TransformMatrix = { - -0.7357425748, 0.67726129641, 0.0, 0.0, - -0.074553778365, -0.080991471307, 0.9939225904, 0.0, - 0.67314530211, 0.73127116582, 0.11008126223, 0.0, - 0.0, 0.0, 0.0, 1.0 -} - local Object = { Identifier = "HomeLabel", @@ -25,7 +22,7 @@ local Object = { Size = 20.50, MinMaxSize = { 16, 20 }, Unit = "Mpc", - TransformationMatrix = TransformMatrix + TransformationMatrix = transforms.Supergalactic } }, GUI = { diff --git a/data/assets/scene/digitaluniverse/transforms.asset b/data/assets/scene/digitaluniverse/transforms.asset new file mode 100644 index 0000000000..7276eb0083 --- /dev/null +++ b/data/assets/scene/digitaluniverse/transforms.asset @@ -0,0 +1,19 @@ +local Supergalactic = { + -0.7357425748, 0.67726129641, 0.0, 0.0, + -0.074553778365, -0.080991471307, 0.9939225904, 0.0, + 0.67314530211, 0.73127116582, 0.11008126223, 0.0, + 0.0, 0.0, 0.0, 1.0 +} + +asset.export("Supergalactic", Supergalactic) + + + +asset.meta = { + Name = "Supergalactic Transformation", + Description = [[This asset defines the transformation matrix to convert supergalactic + coordinates into galactic coordinates.]], + Author = "OpenSpace Team", + URL = "https://openspaceproject.com", + License = "MIT license" +} diff --git a/data/assets/scene/digitaluniverse/tully.asset b/data/assets/scene/digitaluniverse/tully.asset index 44d72b1a50..ba74452a65 100644 --- a/data/assets/scene/digitaluniverse/tully.asset +++ b/data/assets/scene/digitaluniverse/tully.asset @@ -1,3 +1,7 @@ +local transforms = asset.require("./transforms") + + + local textures = asset.resource({ Name = "Tully Textures", Type = "HttpSynchronization", @@ -13,13 +17,6 @@ local speck = asset.resource({ }) -local TransformMatrix = { - -0.7357425748, 0.67726129641, 0.0, 0.0, - -0.074553778365, -0.080991471307, 0.9939225904, 0.0, - 0.67314530211, 0.73127116582, 0.11008126223, 0.0, - 0.0, 0.0, 0.0, 1.0 -} - local TullyGalaxies = { Identifier = "TullyGalaxies", Renderable = { @@ -31,7 +28,7 @@ local TullyGalaxies = { Size = 19.36, MinMaxSize = { 8, 20 }, Unit = "Mpc", - TransformationMatrix = TransformMatrix + TransformationMatrix = transforms.Supergalactic }, Opacity = 0.99, File = speck .. "tully.speck", @@ -49,7 +46,7 @@ local TullyGalaxies = { } }, Unit = "Mpc", - TransformationMatrix = TransformMatrix, + TransformationMatrix = transforms.Supergalactic, Fading = { FadeInDistances = { 0.001, 1.0 } -- Fade in value in the same unit as "Unit" }, @@ -86,7 +83,7 @@ local TullyGalaxiesImages = { Texture = { Folder = textures }, - TransformationMatrix = TransformMatrix, + TransformationMatrix = transforms.Supergalactic, -- Use fixed orientation, and rotate planes based on orientation information in -- the dataset OrientationRenderOption = "Fixed Rotation", From 39dc3a4dcf79024c4e675af7b632d3bf4175324e Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 15 Aug 2024 22:50:41 +0200 Subject: [PATCH 56/99] Don't enforce resolution in single.json configuration --- config/single.json | 1 - 1 file changed, 1 deletion(-) diff --git a/config/single.json b/config/single.json index 38004b58c5..f36ad5b290 100644 --- a/config/single.json +++ b/config/single.json @@ -18,7 +18,6 @@ "stereo": "none", "pos": { "x": 50, "y": 50 }, "size": { "x": 1280, "y": 720 }, - "res": { "x": 2560, "y": 1440 }, "viewports": [ { "tracked": true, From f72e0af2f1b074e357156c092127fb3751db081d Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 16 Aug 2024 13:39:48 +0200 Subject: [PATCH 57/99] Don't delete the autogenerated kernel files as they need to be available when unloading a text kernel --- src/util/spicemanager.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index 8bb87c8b3b..ee8d07f769 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -1388,8 +1388,7 @@ glm::dmat3 SpiceManager::getEstimatedTransformMatrix(const std::string& fromFram } void SpiceManager::loadLeapSecondsSpiceKernel() { - constexpr std::string_view Naif00012tlsSource = R"( -KPL/LSK + constexpr std::string_view Naif00012tlsSource = R"(KPL/LSK LEAPSECONDS KERNEL FILE @@ -1549,12 +1548,10 @@ const std::filesystem::path path = std::filesystem::temp_directory_path(); f << Naif00012tlsSource; } loadKernel(file); - std::filesystem::remove(file); } void SpiceManager::loadGeophysicalConstantsKernel() { - constexpr std::string_view GeoPhysicalConstantsKernelSource = R"( -KPL/PCK + constexpr std::string_view GeoPhysicalConstantsKernelSource = R"(KPL/PCK The SPK creations applications (mkspk, mkspk_c) require the data in this kernel to produce Type 10 SPK segments based upon the Two-Line @@ -1683,7 +1680,6 @@ References: f << GeoPhysicalConstantsKernelSource; } loadKernel(file); - std::filesystem::remove(file); } void SpiceManager::setExceptionHandling(UseException useException) { From 7ec6b6cfb53e5411534de71540738ae80d34d642 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 16 Aug 2024 13:45:24 +0200 Subject: [PATCH 58/99] Add examples for GlobeRotation (#3377) * Add examples for GlobeRotation and make the longitude and latitude defintion non-optional * Remove old GlobeRotation example --- data/assets/examples/globerotation.asset | 71 ------------------- .../rotation/globerotation/angle.asset | 57 +++++++++++++++ .../rotation/globerotation/globe.asset | 55 ++++++++++++++ .../rotation/globerotation/usecamera.asset | 61 ++++++++++++++++ modules/globebrowsing/src/globerotation.cpp | 20 +++--- 5 files changed, 183 insertions(+), 81 deletions(-) delete mode 100644 data/assets/examples/globerotation.asset create mode 100644 data/assets/examples/rotation/globerotation/angle.asset create mode 100644 data/assets/examples/rotation/globerotation/globe.asset create mode 100644 data/assets/examples/rotation/globerotation/usecamera.asset diff --git a/data/assets/examples/globerotation.asset b/data/assets/examples/globerotation.asset deleted file mode 100644 index 58f7ab0dfc..0000000000 --- a/data/assets/examples/globerotation.asset +++ /dev/null @@ -1,71 +0,0 @@ -local sun = asset.require("scene/solarsystem/sun/transforms") -local earth = asset.require("scene/solarsystem/planets/earth/earth") - - - -local models = asset.resource({ - Name = "New Horizons Model", - Type = "HttpSynchronization", - Identifier = "newhorizons_model", - Version = 2 -}) - - -local ExampleGlobeRotation = { - Identifier = "ExampleGlobeRotation", - Parent = earth.Earth.Identifier, - Transform = { - Translation = { - Type = "GlobeTranslation", - Globe = earth.Earth.Identifier, - Latitude = 40.7306, - Longitude = -73.9352, - Altitude = 6, - UseHeightmap = true - }, - Rotation = { - Type = "GlobeRotation", - Globe = earth.Earth.Identifier, - Latitude = 40.7306, - Longitude = -73.9352 - -- Can be used to to put flat on leaning surfaces, but also leads to updating - -- the rotation every frame - --UseHeightmap = true - } - }, - Renderable = { - Type = "RenderableModel", - GeometryFile = models .. "NewHorizonsCleanModel.obj", - LightSources = { - sun.LightSource - } - }, - GUI = { - Name = "GlobeRotation", - Path = "/Examples" - } -} - - -asset.onInitialize(function() - openspace.addSceneGraphNode(ExampleGlobeRotation) -end) - -asset.onDeinitialize(function() - openspace.removeSceneGraphNode(ExampleGlobeRotation) -end) - -asset.export(ExampleGlobeRotation) - - - -asset.meta = { - Name = "GlobeRotation Example", - Description = [[An example that demonstrates how to load a 3D model from a geometry - file, placing it on a planetary surface and rotate it to align with the surface - normal using a "GlobeRotation" transform. Note that "GlobeTranslation" is needed to - put the model in the correct location.]], - Author = "OpenSpace Team", - URL = "http://openspaceproject.com", - License = "MIT license" -} diff --git a/data/assets/examples/rotation/globerotation/angle.asset b/data/assets/examples/rotation/globerotation/angle.asset new file mode 100644 index 0000000000..03aa39e050 --- /dev/null +++ b/data/assets/examples/rotation/globerotation/angle.asset @@ -0,0 +1,57 @@ +-- Angle +-- This asset creates a rotation that places a coordinate axes on the surface of a +-- planetary body. The rotation causes the coordinate axes to remain fixed to the surface +-- of the globe. Additionally, the coordinate axes are rotated around the up-axis by a +-- fixed amount. +-- +-- In order for this feature to work properly, the coordinate axes need to be located at +-- the same place as well, so this example also needs a `GlobeTranslation` applied. + +-- The example needs a `RenderableGlobe` as a parent to function +local Globe = { + Identifier = "GlobeRotation_Example_Angle_Globe", + Renderable = { + Type = "RenderableGlobe" + }, + GUI = { + Name = "GlobeRotation - Angle (Globe)", + Path = "/Examples" + } +} + +local Node = { + Identifier = "GlobeRotation_Example_Angle", + Parent = "GlobeRotation_Example_Angle_Globe", + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = "GlobeRotation_Example_Angle_Globe", + Latitude = 20.0, + Longitude = -45.0 + }, + Rotation = { + Type = "GlobeRotation", + Globe = "GlobeRotation_Example_Angle_Globe", + Latitude = 20.0, + Longitude = -45.0, + Angle = 45.0 + } + }, + Renderable = { + Type = "RenderableCartesianAxes" + }, + GUI = { + Name = "GlobeRotation - Angle", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Globe) + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) + openspace.removeSceneGraphNode(Globe) +end) diff --git a/data/assets/examples/rotation/globerotation/globe.asset b/data/assets/examples/rotation/globerotation/globe.asset new file mode 100644 index 0000000000..b85209bfcb --- /dev/null +++ b/data/assets/examples/rotation/globerotation/globe.asset @@ -0,0 +1,55 @@ +-- Basic +-- This asset creates a rotation that places a coordinate axes on the surface of a +-- planetary body. The rotation causes the coordinate axes to remain fixed to the surface +-- of the globe. +-- +-- In order for this feature to work properly, the coordinate axes need to be located at +-- the same place as well, so this example also needs a `GlobeTranslation` applied. + +-- The example needs a `RenderableGlobe` as a parent to function +local Globe = { + Identifier = "GlobeRotation_Example_Globe", + Renderable = { + Type = "RenderableGlobe" + }, + GUI = { + Name = "GlobeRotation - Basic (Globe)", + Path = "/Examples" + } +} + +local Node = { + Identifier = "GlobeRotation_Example", + Parent = "GlobeRotation_Example_Globe", + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = "GlobeRotation_Example_Globe", + Latitude = 20.0, + Longitude = -45.0 + }, + Rotation = { + Type = "GlobeRotation", + Globe = "GlobeRotation_Example_Globe", + Latitude = 20.0, + Longitude = -45.0 + } + }, + Renderable = { + Type = "RenderableCartesianAxes" + }, + GUI = { + Name = "GlobeRotation - Basic", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Globe) + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) + openspace.removeSceneGraphNode(Globe) +end) diff --git a/data/assets/examples/rotation/globerotation/usecamera.asset b/data/assets/examples/rotation/globerotation/usecamera.asset new file mode 100644 index 0000000000..ceb2b3e156 --- /dev/null +++ b/data/assets/examples/rotation/globerotation/usecamera.asset @@ -0,0 +1,61 @@ +-- UseCamera +-- This asset creates a rotation that places a coordinate axes on the surface of a +-- planetary body. The rotation causes the coordinate axes to remain fixed to the surface +-- of the globe. In this example, the rotation of the object will be updated based on the +-- location of the camera. When loading this example, make sure to focus the camera on +-- the Globe object for the follow-function to work. +-- +-- In order for this feature to work properly, the coordinate axes need to be located at +-- the same place as well, so this example also needs a `GlobeTranslation` applied, which +-- in this case also updated based on the camera location. + +-- The example needs a `RenderableGlobe` as a parent to function +local Globe = { + Identifier = "GlobeRotation_Example_UseCamera_Globe", + Renderable = { + Type = "RenderableGlobe" + }, + GUI = { + Name = "GlobeRotation - UseCamera (Globe)", + Path = "/Examples" + } +} + +local Node = { + Identifier = "GlobeRotation_Example_UseCamera", + Parent = "GlobeRotation_Example_UseCamera_Globe", + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = "GlobeRotation_Example_UseCamera_Globe", + Latitude = 20.0, + Longitude = -45.0, + UseCamera = true + }, + Rotation = { + Type = "GlobeRotation", + Globe = "GlobeRotation_Example_UseCamera_Globe", + Latitude = 20.0, + Longitude = -45.0, + Angle = 45.0, + UseCamera = true + } + }, + Renderable = { + Type = "RenderableCartesianAxes" + }, + GUI = { + Name = "GlobeRotation - UseCamera", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Globe) + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) + openspace.removeSceneGraphNode(Globe) +end) diff --git a/modules/globebrowsing/src/globerotation.cpp b/modules/globebrowsing/src/globerotation.cpp index 0dbe8ae0d4..bc2ea848bf 100644 --- a/modules/globebrowsing/src/globerotation.cpp +++ b/modules/globebrowsing/src/globerotation.cpp @@ -49,7 +49,7 @@ namespace { "Latitude", "The latitude of the location on the globe's surface. The value can range from " "-90 to 90, with negative values representing the southern hemisphere of the " - "globe. The default value is 0.0.", + "globe.", openspace::properties::Property::Visibility::User }; @@ -58,15 +58,15 @@ namespace { "Longitude", "The longitude of the location on the globe's surface. The value can range from " "-180 to 180, with negative values representing the western hemisphere of the " - "globe. The default value is 0.0.", + "globe.", openspace::properties::Property::Visibility::User }; constexpr openspace::properties::Property::PropertyInfo AngleInfo = { "Angle", "Angle", - "A rotation angle that can be used to rotate the object around its own y-axis, " - "which will be pointing out of the globe's surface.", + "A rotation angle (in degrees) that can be used to rotate the object around its " + "own y-axis, which will be pointing out of the globe's surface.", openspace::properties::Property::Visibility::AdvancedUser }; @@ -82,7 +82,8 @@ namespace { constexpr openspace::properties::Property::PropertyInfo UseCameraInfo = { "UseCamera", "Use Camera", - "If this value is 'true', the lat and lon are updated to match the camera.", + "If this value is 'true', the latitute and longitude are updated each frame " + "to match the location of the camera.", openspace::properties::Property::Visibility::AdvancedUser }; @@ -92,10 +93,10 @@ namespace { [[codegen::annotation("A valid scene graph node with a RenderableGlobe")]]; // [[codegen::verbatim(LatitudeInfo.description)]] - std::optional latitude; + double latitude [[codegen::inrange(-90.0, 90.0)]]; // [[codegen::verbatim(LongitudeInfo.description)]] - std::optional longitude; + double longitude [[codegen::inrange(-180.0, 180.0)]]; // [[codegen::verbatim(AngleInfo.description)]] std::optional angle; @@ -132,11 +133,11 @@ GlobeRotation::GlobeRotation(const ghoul::Dictionary& dictionary) }); addProperty(_globe); - _latitude = p.latitude.value_or(_latitude); + _latitude = p.latitude; _latitude.onChange([this]() { setUpdateVariables(); }); addProperty(_latitude); - _longitude = p.longitude.value_or(_longitude); + _longitude = p.longitude; _longitude.onChange([this]() { setUpdateVariables(); }); addProperty(_longitude); @@ -151,7 +152,6 @@ GlobeRotation::GlobeRotation(const ghoul::Dictionary& dictionary) _useCamera = p.useCamera.value_or(_useCamera); _useCamera.onChange([this]() { setUpdateVariables(); }); addProperty(_useCamera); - } void GlobeRotation::findGlobe() { From 9decd9aad22e59fd2f647e6574e209d2a2bbb99c Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 16 Aug 2024 13:45:40 +0200 Subject: [PATCH 59/99] Add examples for SpiceTranslation (#3376) --- .../rotation/spicerotation/fixeddate.asset | 36 ++++++++++++++++ .../rotation/spicerotation/spice.asset | 34 +++++++++++++++ .../rotation/spicerotation/timeframe.asset | 41 +++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 data/assets/examples/rotation/spicerotation/fixeddate.asset create mode 100644 data/assets/examples/rotation/spicerotation/spice.asset create mode 100644 data/assets/examples/rotation/spicerotation/timeframe.asset diff --git a/data/assets/examples/rotation/spicerotation/fixeddate.asset b/data/assets/examples/rotation/spicerotation/fixeddate.asset new file mode 100644 index 0000000000..d3c580a656 --- /dev/null +++ b/data/assets/examples/rotation/spicerotation/fixeddate.asset @@ -0,0 +1,36 @@ +-- Fixed Date +-- This asset creates a rotation provided by a SPICE kernel and applies it to a +-- SceneGraphNode that only displays coordinate axes. The rotation of the coordinate axes +-- are determined by SPICE, in this case pretending that the coordinate axes are rotating +-- at the same rate as Earth. In this specific example, the orientation is independent of +-- the actual in-game time in OpenSpace and only uses a fixed date of 2000 JAN 01 instead. + +-- Load the default SPICE kernels, which is the planetary constants and the DE430 kernel +asset.require("spice/core") + +local Node = { + Identifier = "SpiceRotation_Example_FixedDate", + Transform = { + Rotation = { + Type = "SpiceRotation", + SourceFrame = "IAU_EARTH", + DestinationFrame = "GALACTIC", + FixedDate = "2000 JAN 01 00:00:00.000" + } + }, + Renderable = { + Type = "RenderableCartesianAxes" + }, + GUI = { + Name = "SpiceRotation - Fixed Date", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/rotation/spicerotation/spice.asset b/data/assets/examples/rotation/spicerotation/spice.asset new file mode 100644 index 0000000000..e084dde9bb --- /dev/null +++ b/data/assets/examples/rotation/spicerotation/spice.asset @@ -0,0 +1,34 @@ +-- Basic +-- This asset creates a rotation provided by a SPICE kernel and applies it to a +-- SceneGraphNode that only displays coordinate axes. The rotation of the coordinate axes +-- are determined by SPICE, in this case pretending that the coordinate axes are rotating +-- at the same rate as Earth. + +-- Load the default SPICE kernels, which is the planetary constants and the DE430 kernel +asset.require("spice/core") + +local Node = { + Identifier = "SpiceRotation_Example", + Transform = { + Rotation = { + Type = "SpiceRotation", + SourceFrame = "IAU_EARTH", + DestinationFrame = "GALACTIC" + } + }, + Renderable = { + Type = "RenderableCartesianAxes" + }, + GUI = { + Name = "SpiceRotation - Basic", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/data/assets/examples/rotation/spicerotation/timeframe.asset b/data/assets/examples/rotation/spicerotation/timeframe.asset new file mode 100644 index 0000000000..6eb7eb3f90 --- /dev/null +++ b/data/assets/examples/rotation/spicerotation/timeframe.asset @@ -0,0 +1,41 @@ +-- TimeFrame +-- This asset creates a rotation provided by a SPICE kernel and applies it to a +-- SceneGraphNode that only displays coordinate axes. The rotation of the coordinate axes +-- are determined by SPICE, in this case pretending that the coordinate axes are rotating +-- at the same rate as Earth. In this example, the rotation is only calculated between +-- 2000 JAN 01 and 2002 JAN 01 to exemplify a use-case in which the data from the SPICE +-- kernel is not available for the whole duration. + +-- Load the default SPICE kernels, which is the planetary constants and the DE430 kernel +asset.require("spice/core") + +local Node = { + Identifier = "SpiceRotation_Example_TimeFrame", + Transform = { + Rotation = { + Type = "SpiceRotation", + SourceFrame = "IAU_EARTH", + DestinationFrame = "GALACTIC", + TimeFrame = { + Type = "TimeFrameInterval", + Start = "2000 JAN 01", + End = "2002 JAN 01" + } + } + }, + Renderable = { + Type = "RenderableCartesianAxes" + }, + GUI = { + Name = "SpiceRotation - TimeFrame", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) From f2a9477eb5353943cec6ff6f44fb618a45730af8 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 16 Aug 2024 13:46:39 +0200 Subject: [PATCH 60/99] Lua Securty Sandboxing (#3378) * Add Lua sandboxing * Convert existing files to use custom functions instead of now-prohibited library functions --- data/assets/global/localbookmarks.asset | 12 +- .../constellations/constellation_art.asset | 118 +++++++++--------- data/assets/util/constellations_helper.asset | 9 +- ext/ghoul | 2 +- include/openspace/engine/configuration.h | 2 + include/openspace/scripting/scriptengine.h | 2 +- openspace.cfg | 2 + src/engine/configuration.cpp | 11 ++ src/engine/openspaceengine.cpp | 15 ++- src/scripting/scriptengine.cpp | 7 +- 10 files changed, 101 insertions(+), 79 deletions(-) diff --git a/data/assets/global/localbookmarks.asset b/data/assets/global/localbookmarks.asset index 93888ace92..dadea5c098 100644 --- a/data/assets/global/localbookmarks.asset +++ b/data/assets/global/localbookmarks.asset @@ -15,15 +15,11 @@ end -- Create bookmarks file if it does not exist if not openspace.fileExists(localBookmarks) then - local file = io.open(localBookmarks, "w") - file:write( - "Group (optional),Name (required),Globe (optional),Lat (required if globe)," .. - "Lon (required if globe),Altitude (optional if globe),x (required if not globe)," .. - "y (required if not globe),z (required if not globe),Scale (optional)," .. - "LineWidth (optional)\n" .. - "NASA,Kennedy Space Center,Earth,28.6658276,-80.70282839,,,,,,\n" + openspace.downloadFile( + "http://liu-se.cdn.openspaceproject.com/files/misc/localbookmarks.csv", + openspace.absPath("${USER}/bookmarks/localbookmarks.csv"), + true ) - file:close() end local nodes = bookmarkHelper.loadBookmarks( diff --git a/data/assets/scene/milkyway/constellations/constellation_art.asset b/data/assets/scene/milkyway/constellations/constellation_art.asset index efc0cef81e..9a0ec35623 100644 --- a/data/assets/scene/milkyway/constellations/constellation_art.asset +++ b/data/assets/scene/milkyway/constellations/constellation_art.asset @@ -22,8 +22,6 @@ local data = asset.resource({ --function that reads the file local function createConstellations(baseIdentifier, guiPath, constellationfile) local genConstellations = {} - --skip the first line - local notFirstLine = false -- define parsec to meters local PARSEC_CONSTANT = 3.0856776E16 -- how many parsecs away do you want the images to be? @@ -31,68 +29,74 @@ local function createConstellations(baseIdentifier, guiPath, constellationfile) -- but they can really be anywhere since the billboard size will scale with distance. local distanceMultiplier = 3.2 local baseScale = 1e17 - for line in io.lines(openspace.absPath(constellationfile)) do - if (notFirstLine) then - -- describes the data - local matchstring = "(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-)$" - local group, abbreviation, name, x, y, z, scale, imageName, rotX, rotY, rotZ, centerStar = line:match(matchstring) - local magVec = math.sqrt(x*x + y*y + z*z) - local normx = x / magVec - local normy = y / magVec - local normz = z / magVec + local lines = openspace.readCSVFile(openspace.absPath(constellationfile)) + for _, line in ipairs(lines) do + -- describes the data + local group = line[1] + local abbreviation = line[2] + local name = line[3] + local x = tonumber(line[4]) + local y = tonumber(line[5]) + local z = tonumber(line[6]) + local scale = tonumber(line[7]) + local imageName = line[8] + local rotX = tonumber(line[9]) + local rotY = tonumber(line[10]) + local rotZ = tonumber(line[11]) + local centerStar = line[12] + local magVec = math.sqrt(x*x + y*y + z*z) + local normx = x / magVec + local normy = y / magVec + local normz = z / magVec - -- Use the full name in the data constellations.dat if possible - -- Otherwise, use the given name in the constellation_data.csv file - local foundName = constellations_helper.findFullName(abbreviation) - if foundName ~= nil then - name = foundName - end + -- Use the full name in the data constellations.dat if possible + -- Otherwise, use the given name in the constellation_data.csv file + local foundName = constellations_helper.findFullName(abbreviation) + if foundName ~= nil then + name = foundName + end - group = (group == "" and globe or group) + group = (group == "" and globe or group) - local aconstellation = { - -- Identifier = guiPath .. "-" .. name, - Identifier = baseIdentifier .. "-" .. abbreviation, - Parent = transforms.SolarSystemBarycenter.Identifier, - Transform = { - Translation = { - Type = "StaticTranslation", - -- position is in parsecs from the SolarSystemBarycenter, so convert to meters - Position = { - normx * PARSEC_CONSTANT * distanceMultiplier, - normy * PARSEC_CONSTANT * distanceMultiplier, - normz * PARSEC_CONSTANT * distanceMultiplier - } - }, - Rotation = { - Type = "StaticRotation", - Rotation = { tonumber(rotX), tonumber(rotY), tonumber(rotZ) } + local aconstellation = { + -- Identifier = guiPath .. "-" .. name, + Identifier = baseIdentifier .. "-" .. abbreviation, + Parent = transforms.SolarSystemBarycenter.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + -- position is in parsecs from the SolarSystemBarycenter, so convert to meters + Position = { + normx * PARSEC_CONSTANT * distanceMultiplier, + normy * PARSEC_CONSTANT * distanceMultiplier, + normz * PARSEC_CONSTANT * distanceMultiplier } }, - Renderable = { - Type = "RenderablePlaneImageLocal", - Enabled = false, - Size = tonumber(baseScale * scale * distanceMultiplier / 10), - Origin = "Center", - Billboard = false, - LazyLoading = true, - Texture = images .. imageName, - BlendMode = "Additive", - Opacity = 0.1, - DimInAtmosphere = true - }, - Tag = { "ImageConstellation", group, "daytime_hidden" }, - GUI = { - Name = name .. " Image", - Path = "/Milky Way/Constellations/" .. guiPath, - Description = name .. " Image" + Rotation = { + Type = "StaticRotation", + Rotation = { tonumber(rotX), tonumber(rotY), tonumber(rotZ) } } + }, + Renderable = { + Type = "RenderablePlaneImageLocal", + Enabled = false, + Size = tonumber(baseScale * scale * distanceMultiplier / 10), + Origin = "Center", + Billboard = false, + LazyLoading = true, + Texture = images .. imageName, + BlendMode = "Additive", + Opacity = 0.1, + DimInAtmosphere = true + }, + Tag = { "ImageConstellation", group, "daytime_hidden" }, + GUI = { + Name = name .. " Image", + Path = "/Milky Way/Constellations/" .. guiPath, + Description = name .. " Image" } - table.insert(genConstellations, aconstellation) - - else - notFirstLine = true - end + } + table.insert(genConstellations, aconstellation) end return genConstellations end diff --git a/data/assets/util/constellations_helper.asset b/data/assets/util/constellations_helper.asset index ffbce5157c..69975b7a99 100644 --- a/data/assets/util/constellations_helper.asset +++ b/data/assets/util/constellations_helper.asset @@ -11,14 +11,10 @@ local data = asset.resource({ -- If the file does not exist or if a match could not be found, it returns nil local function findFullName(abbreviation) local namesFile = data .. "constellations.dat" - local file = io.open(namesFile, "r") local fullName = "" - if file == nil then - return nil - end - - for line in io.lines(namesFile) do + local lines = openspace.readFileLines(namesFile) + for _, line in ipairs(lines) do -- Try and find the identifier in the file local index, length = line:find(abbreviation) if index ~= nil and index < 4 then @@ -37,7 +33,6 @@ local function findFullName(abbreviation) end end - file:close() if fullName == "" then openspace.printError( "Error when calling function 'findFullName' in file 'util/constellations_helper': " .. diff --git a/ext/ghoul b/ext/ghoul index 7eb3d942c4..b0517f0be9 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 7eb3d942c48f8678519ffcd57c325db35bd192d8 +Subproject commit b0517f0be9d4087328c6ebb5811141c801864089 diff --git a/include/openspace/engine/configuration.h b/include/openspace/engine/configuration.h index 7bb5abeacc..2c6a624001 100644 --- a/include/openspace/engine/configuration.h +++ b/include/openspace/engine/configuration.h @@ -105,6 +105,8 @@ struct Configuration { bool shouldUseScreenshotDate = false; + bool sandboxedLua = true; + std::string onScreenTextScaling = "window"; bool usePerProfileCache = false; diff --git a/include/openspace/scripting/scriptengine.h b/include/openspace/scripting/scriptengine.h index 8776856ec4..ff6c37e976 100644 --- a/include/openspace/scripting/scriptengine.h +++ b/include/openspace/scripting/scriptengine.h @@ -62,7 +62,7 @@ public: static constexpr std::string_view OpenSpaceLibraryName = "openspace"; - ScriptEngine(); + explicit ScriptEngine(bool sandboxedLua = true); /** * Initializes the internal Lua state and registers a common set of library functions. diff --git a/openspace.cfg b/openspace.cfg index 042913cfe5..4de0cbfe0b 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -226,6 +226,8 @@ LogEachOpenGLCall = false PrintEvents = false ConsoleKey = "GRAVEACCENT" +SandboxedLua = true + ShutdownCountdown = 3 ScreenshotUseDate = true BypassLauncher = false diff --git a/src/engine/configuration.cpp b/src/engine/configuration.cpp index cd2d26d9e4..ff22ad6ae7 100644 --- a/src/engine/configuration.cpp +++ b/src/engine/configuration.cpp @@ -191,6 +191,12 @@ namespace { // pass beyond local midnight std::optional screenshotUseDate; + // Toggles whether the Lua states used inside OpenSpace are sandboxed which + // prevents potentially unsafe malicious code to run on the system. Only turn this + // setting to `false` if you are sure that no external code from asset files, + // session recordings, or parallel connections can be executed on this machine. + std::optional sandboxedLua; + struct HttpProxy { // Determines whether the proxy is being used std::optional activate; @@ -405,6 +411,7 @@ ghoul::Dictionary Configuration::createDictionary() { res.setValue("ConsoleKey", ghoul::to_string(consoleKey)); res.setValue("ShutdownCountdown", static_cast(shutdownCountdown)); res.setValue("shouldUseScreenshotDate", shouldUseScreenshotDate); + res.setValue("sandboxedLua", sandboxedLua); res.setValue("OnScreenTextScaling", onScreenTextScaling); res.setValue("UsePerProfileCache", usePerProfileCache); res.setValue("IsRenderingOnMasterDisabled", isRenderingOnMasterDisabled); @@ -562,6 +569,7 @@ void parseLuaState(Configuration& configuration) { c.shutdownCountdown = p.shutdownCountdown.value_or(c.shutdownCountdown); c.shouldUseScreenshotDate = p.screenshotUseDate.value_or(c.shouldUseScreenshotDate); + c.sandboxedLua = p.sandboxedLua.value_or(c.sandboxedLua); c.onScreenTextScaling = p.onScreenTextScaling.value_or(c.onScreenTextScaling); c.usePerProfileCache = p.perProfileCache.value_or(c.usePerProfileCache); c.isRenderingOnMasterDisabled = @@ -705,6 +713,9 @@ Configuration loadConfigurationFromFile(const std::filesystem::path& configurati ghoul_assert(std::filesystem::is_regular_file(configurationFile), "File must exist"); Configuration result; + // Having the configuration not sandboxed is safe as there is no way for a third-party + // file to have any input this early in the loading phase + result.state = ghoul::lua::LuaState(ghoul::lua::LuaState::Sandboxed::No); // Injecting the resolution of the primary screen into the Lua state const std::string script = std::format( diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index ff8bbbb243..3f04d62077 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -389,6 +389,17 @@ void OpenSpaceEngine::initialize() { // Register the provided shader directories ghoul::opengl::ShaderPreprocessor::addIncludePath(absPath("${SHADERS}")); + if (!global::configuration->sandboxedLua) { + // The Lua state is sandboxed by default, so if the user wants an unsandboxed one, + // we have to recreate it here. + // @TODO (2024-08-07, abock) It's not pretty, but doing it differently would + // require a bigger rewrite of how we handle the ScriptEngine + global::scriptEngine->~ScriptEngine(); + global::scriptEngine = new (global::scriptEngine) scripting::ScriptEngine( + global::configuration->sandboxedLua + ); + } + // Register Lua script functions LDEBUG("Registering Lua libraries"); registerCoreClasses(*global::scriptEngine); @@ -906,7 +917,9 @@ void OpenSpaceEngine::runGlobalCustomizationScripts() { ZoneScoped; LINFO("Running Global initialization scripts"); - const ghoul::lua::LuaState state; + const ghoul::lua::LuaState state = ghoul::lua::LuaState( + ghoul::lua::LuaState::Sandboxed::No + ); global::scriptEngine->initializeLuaState(state); for (const std::string& script : global::configuration->globalCustomizationScripts) { diff --git a/src/scripting/scriptengine.cpp b/src/scripting/scriptengine.cpp index faa268c8dc..636ce6f750 100644 --- a/src/scripting/scriptengine.cpp +++ b/src/scripting/scriptengine.cpp @@ -80,15 +80,14 @@ namespace { return result; } - - - #include "scriptengine_codegen.cpp" } // namespace namespace openspace::scripting { -ScriptEngine::ScriptEngine() {} +ScriptEngine::ScriptEngine(bool sandboxedLua) + : _state(ghoul::lua::LuaState::Sandboxed(sandboxedLua)) +{} void ScriptEngine::initialize() { ZoneScoped; From e7533ba6a5298c724463b02763f4691cdd769583 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 16 Aug 2024 16:00:54 +0200 Subject: [PATCH 61/99] Update Ghoul submodule --- ext/ghoul | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ghoul b/ext/ghoul index b0517f0be9..a88d75e2cc 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit b0517f0be9d4087328c6ebb5811141c801864089 +Subproject commit a88d75e2cc564ca12d8295b8282d9798ed5dd1db From a01760a3caeacecca64dc1d6c5710cb9ae34e84b Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sun, 18 Aug 2024 12:55:55 +0200 Subject: [PATCH 62/99] Remove remains of visibility voting --- modules/base/translation/statictranslation.cpp | 1 - .../kameleonvolume/rendering/renderablekameleonvolume.cpp | 2 -- .../multiresvolume/rendering/renderablemultiresvolume.cpp | 5 ----- 3 files changed, 8 deletions(-) diff --git a/modules/base/translation/statictranslation.cpp b/modules/base/translation/statictranslation.cpp index 894c0f68e7..58f89177e0 100644 --- a/modules/base/translation/statictranslation.cpp +++ b/modules/base/translation/statictranslation.cpp @@ -33,7 +33,6 @@ namespace { "Position", "This value is used as a static offset (in meters) that is applied to the scene " "graph node that this transformation is attached to relative to its parent.", - // @VISIBILITY(2.25) openspace::properties::Property::Visibility::User }; diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp index 96b948be76..5ee8b4e9b4 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp @@ -104,7 +104,6 @@ namespace { "LowerValueBound", "Lower Value Bound", "", // @TODO Missing documentation - // @VISIBILITY(?) openspace::properties::Property::Visibility::AdvancedUser }; @@ -112,7 +111,6 @@ namespace { "UpperValueBound", "Upper Value Bound", "", // @TODO Missing documentation - // @VISIBILITY(?) openspace::properties::Property::Visibility::AdvancedUser }; diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp index 805e8f8fe0..3f8ee49dfa 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp @@ -79,7 +79,6 @@ namespace { "CurrentTime", "Current Time", "", // @TODO Missing documentation - // @VISIBILITY(2.5) openspace::properties::Property::Visibility::User }; @@ -87,7 +86,6 @@ namespace { "MemoryBudget", "Memory Budget", "", // @TODO Missing documentation - // @VISIBILITY(3.5) openspace::properties::Property::Visibility::AdvancedUser }; @@ -95,7 +93,6 @@ namespace { "StreamingBudget", "Streaming Budget", "", // @TODO Missing documentation - // @VISIBILITY(3.5) openspace::properties::Property::Visibility::AdvancedUser }; @@ -103,7 +100,6 @@ namespace { "UseGlobalTime", "Global Time", "", // @TODO Missing documentation - // @VISIBILITY(2.5) openspace::properties::Property::Visibility::User }; @@ -118,7 +114,6 @@ namespace { "Selector", "Brick Selector", "", // @TODO Missing documentation - // @VISIBILITY(3.5) openspace::properties::Property::Visibility::AdvancedUser }; From a75c6f3c9e3f3d105de8ca6e6c9cd6580815bf47 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sun, 18 Aug 2024 13:46:17 +0200 Subject: [PATCH 63/99] Adapt core scripts to Lua style guide --- scripts/core_scripts.lua | 516 +++++++++++++++++++-------------------- 1 file changed, 251 insertions(+), 265 deletions(-) diff --git a/scripts/core_scripts.lua b/scripts/core_scripts.lua index 91884ac3d0..21ab69f942 100644 --- a/scripts/core_scripts.lua +++ b/scripts/core_scripts.lua @@ -1,319 +1,305 @@ openspace.documentation = { - { - Name = "markInterestingNodes", - Arguments = {{ "sceneGraphNodes", "String[]" }}, - Documentation = "This function marks the scene graph nodes identified by name " .. - "as interesting, which will provide shortcut access to focus buttons and " .. - "featured properties" + { + Name = "markInterestingNodes", + Arguments = {{ "sceneGraphNodes", "String[]" }}, + Documentation = [[This function marks the scene graph nodes identified by name as + interesting, which will provide shortcut access to focus buttons and featured + properties]] + }, + { + Name = "markInterestingTimes", + Arguments = {{ "times", "Table[]" }}, + Documentation = [[This function marks interesting times for the current scene, which + will create shortcuts for a quick access]] + }, + { + Name = "removeInterestingNodes", + Arguments = {{ "sceneGraphNodes", "String[]" }}, + Documentation = [[This function removes unmarks the scene graph nodes identified by + name as interesting, thus removing the shortcuts from the features properties list]] + }, + { + Name = "setDefaultGuiSorting", + Arguments = {}, + Documentation = [[This function sets the default GUI sorting for the space environment + to increasing size, from solar system, through Milky Way, Universe and finishing + with other elements]] + }, + { + Name = "setDefaultDashboard", + Arguments = {}, + Documentation = [[This function sets the default values for the dashboard consisting + of 'DashboardItemDate', 'DashboardItemSimulationIncrement', 'DashboardItemDistance', + 'DashboardItemFramerate', and 'DashboardItemParallelConnection']] + }, + { + Name = "rebindKey", + Arguments = {{ "oldKey", "String" }, { "newKey", "String" }}, + Documentation = [[Rebinds all scripts from the old key (first argument) to the new + key (second argument)]] + }, + { + Name = "appendToListProperty", + Arguments = {{ "identifier","String" }, { "value", "any" }}, + Documentation = [[Add a value to the list property with the given identifier. The + value can be any type, as long as it is the correct type for the given property. + Note that a number will be converted to a string automatically.]] + }, + { + Name = "addToPropertyValue", + Arguments = {{ "identifier", "String" } , { "value", "String | Number" }}, + Documentation = [[Add a value to the property with the given identifier. Works on both + numerical and string properties, where adding to a string property means appending + the given string value to the existing string value.]] + }, + { + Name = "invertBooleanProperty", + Arguments = {{ "identifier", "String" }}, + Documentation = "Inverts the value of a boolean property with the given identifier" + }, + { + Name = "fadeIn", + Arguments = { + { "identifier", "String" }, + { "fadeTime", "Number?" }, + { "endScript", "String?" } }, - { - Name = "markInterestingTimes", - Arguments = {{ "times", "Table[]" }}, - Documentation = "This function marks interesting times for the current scene, " .. - "which will create shortcuts for a quick access" + Documentation = [[Fades in the node(s) with the given identifier over the given time + in seconds. The identifier can contain a tag and/or a wildcard to target several + nodes. If the fade time is not provided then the 'OpenSpaceEngine.FadeDuration' + property will be used instead. If the third argument (endScript) is provided then + that script will be run after the fade is finished.]] + }, + { + Name = "fadeOut", + Arguments = { + { "identifier", "String" }, + { "fadeTime", "Number?" }, + { "endScript", "String?" } }, - { - Name = "removeInterestingNodes", - Arguments = {{ "sceneGraphNodes", "String[]" }}, - Documentation = "This function removes unmarks the scene graph nodes " .. - "identified by name as interesting, thus removing the shortcuts from the " .. - "features properties list" + Documentation = [[Fades out the node(s) with the given identifier over the given time + in seconds. The identifier can contain a tag and/or a wildcard to target several + nodes. If the fade time is not provided then the 'OpenSpaceEngine.FadeDuration' + property will be used instead. If the third argument (endScript) is provided then + that script will be run after the fade is finished.]] + }, + { + Name = "toggleFade", + Arguments = { + { "identifier", "String" }, + { "fadeTime", "Number?" }, + { "endScript", "String?" } }, - { - Name = "setDefaultGuiSorting", - Arguments = {}, - Documentation = "This function sets the default GUI sorting for the space " .. - "environment to increasing size, from solar system, through Milky Way, " .. - "Universe and finishing with other elements" - }, - { - Name = "setDefaultDashboard", - Arguments = {}, - Documentation = "This function sets the default values for the dashboard " .. - "consisting of 'DashboardItemDate', 'DashboardItemSimulationIncrement', " .. - "'DashboardItemDistance', 'DashboardItemFramerate', and " .. - "'DashboardItemParallelConnection'" - }, - { - Name = "rebindKey", - Arguments = {{ "oldKey", "String" }, { "newKey", "String" }}, - Documentation = "Rebinds all scripts from the old key (first argument) to the " .. - "new key (second argument)" - }, - { - Name = "appendToListProperty", - Arguments = {{ "identifier","String" }, { "value", "any" }}, - Documentation = "Add a value to the list property with the given identifier. " .. - "The value can be any type, as long as it is the correct type for the given " .. - "property. Note that a number will be converted to a string automatically." - }, - { - Name = "addToPropertyValue", - Arguments = {{ "identifier", "String" } , { "value", "String | Number" }}, - Documentation = "Add a value to the property with the given identifier. " .. - "Works on both numerical and string properties, where adding to a string " .. - "property means appending the given string value to the existing string value." - }, - { - Name = "invertBooleanProperty", - Arguments = {{ "identifier", "String" }}, - Documentation = "Inverts the value of a boolean property with the given ".. - "identifier" - }, - { - Name = "fadeIn", - Arguments = { - { "identifier", "String" }, - { "fadeTime", "Number?" }, - { "endScript", "String?" } - }, - Documentation = "Fades in the node(s) with the given identifier over the given " .. - "time in seconds. The identifier can contain a tag and/or a wildcard to target " .. - "several nodes. If the fade time is not provided then the " .. - "'OpenSpaceEngine.FadeDuration' property will be used instead. If the third " .. - "argument (endScript) is provided then that script will be run after the fade " .. - "is finished." - }, - { - Name = "fadeOut", - Arguments = { - { "identifier", "String" }, - { "fadeTime", "Number?" }, - { "endScript", "String?" } - }, - Documentation = "Fades out the node(s) with the given identifier over the given " .. - "time in seconds. The identifier can contain a tag and/or a wildcard to target " .. - "several nodes. If the fade time is not provided then the " .. - "'OpenSpaceEngine.FadeDuration' property will be used instead. If the third " .. - "argument (endScript) is provided then that script will be run after the fade " .. - "is finished." - }, - { - Name = "toggleFade", - Arguments = { - { "identifier", "String" }, - { "fadeTime", "Number?" }, - { "endScript", "String?" } - }, - Documentation = [[Toggles the fade state of the node(s) with the given identifier over the given - time in seconds. The identifier can contain a tag and/or a wildcard to target - several nodes. If the fade time is not provided then the - "OpenSpaceEngine.FadeDuration" property will be used instead. If the third - argument (endScript) is provided then that script will be run after the fade - is finished.]] - } + Documentation = [[Toggles the fade state of the node(s) with the given identifier over + the given time in seconds. The identifier can contain a tag and/or a wildcard to + target several nodes. If the fade time is not provided then the + "OpenSpaceEngine.FadeDuration" property will be used instead. If the third argument + (endScript) is provided then that script will be run after the fade is finished.]] + } } openspace.markInterestingNodes = function(nodes) - for _, n in pairs(nodes) do - if openspace.hasSceneGraphNode(n) then - openspace.addTag(n, "GUI.Interesting") - end + for _, n in pairs(nodes) do + if openspace.hasSceneGraphNode(n) then + openspace.addTag(n, "GUI.Interesting") end + end end openspace.markInterestingTimes = function(times) - for _, n in pairs(times) do - local name = n["Name"] or n[1] - local time = n["Time"] or n[2] - openspace.addInterestingTime(name, time) - end + for _, n in pairs(times) do + local name = n["Name"] or n[1] + local time = n["Time"] or n[2] + openspace.addInterestingTime(name, time) + end end openspace.removeInterestingNodes = function(nodes) - for _, n in pairs(nodes) do - if openspace.hasSceneGraphNode(n) then - openspace.removeTag(n, "GUI.Interesting") - end + for _, n in pairs(nodes) do + if openspace.hasSceneGraphNode(n) then + openspace.removeTag(n, "GUI.Interesting") end + end end openspace.setDefaultGuiSorting = function() - openspace.setPropertyValueSingle( - 'Modules.ImGUI.Scene.Ordering', - { - "Solar System", "Milky Way", "Universe", "Other" - } - ) + openspace.setPropertyValueSingle( + "Modules.ImGUI.Scene.Ordering", + { "Solar System", "Milky Way", "Universe", "Other" } + ) end openspace.rebindKey = function(oldKey, newKey) - local t = openspace.keyBindings(oldKey) - openspace.clearKey(oldKey) - for _, v in pairs(t) do - openspace.bindKey(newKey, v) - end + local t = openspace.keyBindings(oldKey) + openspace.clearKey(oldKey) + for _, v in pairs(t) do + openspace.bindKey(newKey, v) + end end openspace.appendToListProperty = function(propertyIdentifier, newItem) - local list = openspace.propertyValue(propertyIdentifier) - if type(list) ~= 'table' then - openspace.printError( - "Error when calling script 'openspace.appendToListProperty': " .. - "Could not append to non-list property '" .. propertyIdentifier .. "'" - ) - return; - end - table.insert(list, newItem) - openspace.setPropertyValueSingle(propertyIdentifier, list) + local list = openspace.propertyValue(propertyIdentifier) + if type(list) ~= "table" then + openspace.printError( + "Error when calling script 'openspace.appendToListProperty': " .. + "Could not append to non-list property '" .. propertyIdentifier .. "'" + ) + return; + end + table.insert(list, newItem) + openspace.setPropertyValueSingle(propertyIdentifier, list) end openspace.addToPropertyValue = function(propertyIdentifier, valueToAdd) - local value = openspace.propertyValue(propertyIdentifier) - if type(value) == 'string' then - value = value .. valueToAdd; - else - value = value + valueToAdd; - end - openspace.setPropertyValueSingle(propertyIdentifier, value) + local value = openspace.propertyValue(propertyIdentifier) + if type(value) == "string" then + value = value .. valueToAdd; + else + value = value + valueToAdd; + end + openspace.setPropertyValueSingle(propertyIdentifier, value) end openspace.invertBooleanProperty = function(propertyIdentifier) - local value = openspace.propertyValue(propertyIdentifier) - if type(value) ~= 'boolean' then - openspace.printError( - "Error when calling script 'openspace.invertBooleanProperty': " .. - "Could not invert non-boolean property '" .. propertyIdentifier .. "'" - ) - return; - end - openspace.setPropertyValueSingle(propertyIdentifier, not value) + local value = openspace.propertyValue(propertyIdentifier) + if type(value) ~= "boolean" then + openspace.printError( + "Error when calling script 'openspace.invertBooleanProperty': " .. + "Could not invert non-boolean property '" .. propertyIdentifier .. "'" + ) + return; + end + openspace.setPropertyValueSingle(propertyIdentifier, not value) end openspace.fadeIn = function(identifier, fadeTime, endScript) - -- Set default values for optional arguments - endScript = endScript or "" - fadeTime = fadeTime or openspace.propertyValue("OpenSpaceEngine.FadeDuration") + -- Set default values for optional arguments + endScript = endScript or "" + fadeTime = fadeTime or openspace.propertyValue("OpenSpaceEngine.FadeDuration") - local enabledProperty = identifier .. ".Enabled" - local fadeProperty = identifier .. ".Fade" + local enabledProperty = identifier .. ".Enabled" + local fadeProperty = identifier .. ".Fade" - -- Assume that we need to enable the node(s) as we fade it/them in - local isEnabled = false + -- Assume that we need to enable the node(s) as we fade it/them in + local isEnabled = false - -- Check if the identifier is a single node or a regex for several nodes - local hasTag, _ = identifier:find('{') - local hasWild, _ = identifier:find('*') + -- Check if the identifier is a single node or a regex for several nodes + local hasTag, _ = identifier:find("{") + local hasWild, _ = identifier:find("*") - if hasTag ~= nil or hasWild ~= nil then - -- Regex, several nodes - local enabledPropertyList = openspace.property(enabledProperty) - if next(enabledPropertyList) == nil then - -- List is empty, no matches found - openspace.printError( - "Error when calling script 'openspace.fadeIn': " .. - "Could not find any property matching '" .. enabledProperty .. "'" - ) - return - end + if hasTag ~= nil or hasWild ~= nil then + -- Regex, several nodes + local enabledPropertyList = openspace.property(enabledProperty) + if next(enabledPropertyList) == nil then + -- List is empty, no matches found + openspace.printError( + "Error when calling script 'openspace.fadeIn': " .. + "Could not find any property matching '" .. enabledProperty .. "'" + ) + return + end - local fadePropertyList = openspace.property(fadeProperty) - if next(fadePropertyList) == nil then - -- List is empty, no matches found - openspace.printError( - "Error when calling script 'openspace.fadeIn': " .. - "Could not find any property matching '" .. fadeProperty .. "'" - ) - return - end + local fadePropertyList = openspace.property(fadeProperty) + if next(fadePropertyList) == nil then + -- List is empty, no matches found + openspace.printError( + "Error when calling script 'openspace.fadeIn': " .. + "Could not find any property matching '" .. fadeProperty .. "'" + ) + return + end + else + -- Literal, single node + local hasEnabled = openspace.hasProperty(enabledProperty) + local hasFade = openspace.hasProperty(fadeProperty) + + if not hasEnabled then + openspace.printError( + "Error when calling script 'openspace.fadeIn': " .. + "Could not find property '" .. enabledProperty .. "'" + ) + return + elseif not hasFade then + openspace.printError( + "Error when calling script 'openspace.fadeIn': " .. + "Could not find property '" .. fadeProperty .. "'" + ) + return else - -- Literal, single node - local hasEnabled = openspace.hasProperty(enabledProperty) - local hasFade = openspace.hasProperty(fadeProperty) - - if not hasEnabled then - openspace.printError( - "Error when calling script 'openspace.fadeIn': " .. - "Could not find property '" .. enabledProperty .. "'" - ) - return - elseif not hasFade then - openspace.printError( - "Error when calling script 'openspace.fadeIn': " .. - "Could not find property '" .. fadeProperty .. "'" - ) - return - else - isEnabled = openspace.propertyValue(enabledProperty) - end + isEnabled = openspace.propertyValue(enabledProperty) end + end - -- If node is already enabled we only have to fade it - if not isEnabled then - openspace.setPropertyValue(fadeProperty, 0.0) - openspace.setPropertyValue(enabledProperty, true) - end + -- If node is already enabled we only have to fade it + if not isEnabled then + openspace.setPropertyValue(fadeProperty, 0.0) + openspace.setPropertyValue(enabledProperty, true) + end - openspace.setPropertyValue(fadeProperty, 1.0, fadeTime, "Linear", endScript) + openspace.setPropertyValue(fadeProperty, 1.0, fadeTime, "Linear", endScript) end openspace.fadeOut = function(identifier, fadeTime, endScript) - -- Set default values for optional arguments - endScript = endScript or "" - fadeTime = fadeTime or openspace.propertyValue("OpenSpaceEngine.FadeDuration") + -- Set default values for optional arguments + endScript = endScript or "" + fadeTime = fadeTime or openspace.propertyValue("OpenSpaceEngine.FadeDuration") - local enabledProperty = identifier .. ".Enabled" - local fadeProperty = identifier .. ".Fade" + local enabledProperty = identifier .. ".Enabled" + local fadeProperty = identifier .. ".Fade" - -- Assume that the node(s) are enabled and that we need to fade it/them out - local isEnabled = true + -- Assume that the node(s) are enabled and that we need to fade it/them out + local isEnabled = true - -- Is the identifier a single node or a regex for several nodes - local hasTag, _ = identifier:find('{') - local hasWild, _ = identifier:find('*') + -- Is the identifier a single node or a regex for several nodes + local hasTag, _ = identifier:find("{") + local hasWild, _ = identifier:find("*") - if hasTag ~= nil or hasWild ~= nil then - -- Regex, several nodes - local enabledPropertyList = openspace.property(enabledProperty) - if next(enabledPropertyList) == nil then - -- List is empty, no matches found - openspace.printError( - "Error when calling script 'openspace.fadeIn': " .. - "Could not find any property matching '" .. enabledProperty .. "'" - ) - return - end - - local fadePropertyList = openspace.property(fadeProperty) - if next(fadePropertyList) == nil then - -- List is empty, no matches found - openspace.printError( - "Error when calling script 'openspace.fadeIn': " .. - "Could not find any property matching '" .. fadeProperty .. "'" - ) - return - end - else - -- Literal, single node - local hasEnabled = openspace.hasProperty(enabledProperty) - local hasFade = openspace.hasProperty(fadeProperty) - - if not hasEnabled then - openspace.printError( - "Error when calling script 'openspace.fadeIn': " .. - "Could not find property '" .. enabledProperty .. "'" - ) - return - elseif not hasFade then - openspace.printError( - "Error when calling script 'openspace.fadeIn': " .. - "Could not find property '" .. fadeProperty .. "'" - ) - return - else - isEnabled = openspace.propertyValue(enabledProperty) - end + if hasTag ~= nil or hasWild ~= nil then + -- Regex, several nodes + local enabledPropertyList = openspace.property(enabledProperty) + if next(enabledPropertyList) == nil then + -- List is empty, no matches found + openspace.printError( + "Error when calling script 'openspace.fadeIn': " .. + "Could not find any property matching '" .. enabledProperty .. "'" + ) + return end - -- If node is already disabled we don't have to do anything - if isEnabled then - openspace.setPropertyValue( - fadeProperty, - 0.0, - fadeTime, - "Linear", - endScript - ) + local fadePropertyList = openspace.property(fadeProperty) + if next(fadePropertyList) == nil then + -- List is empty, no matches found + openspace.printError( + "Error when calling script 'openspace.fadeIn': " .. + "Could not find any property matching '" .. fadeProperty .. "'" + ) + return + end + else + -- Literal, single node + local hasEnabled = openspace.hasProperty(enabledProperty) + local hasFade = openspace.hasProperty(fadeProperty) + + if not hasEnabled then + openspace.printError( + "Error when calling script 'openspace.fadeIn': " .. + "Could not find property '" .. enabledProperty .. "'" + ) + return + elseif not hasFade then + openspace.printError( + "Error when calling script 'openspace.fadeIn': " .. + "Could not find property '" .. fadeProperty .. "'" + ) + return + else + isEnabled = openspace.propertyValue(enabledProperty) + end + end + + -- If node is already disabled we don't have to do anything + if isEnabled then + openspace.setPropertyValue(fadeProperty, 0.0, fadeTime, "Linear", endScript) end end From b5114658e66d76cb34338ffe0e933829ad717616 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sun, 18 Aug 2024 22:19:44 +0200 Subject: [PATCH 64/99] Update required CMake version to 3.26 --- CMakeLists.txt | 4 ++-- apps/OpenSpace/CMakeLists.txt | 2 +- ext/ghoul | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 65ac51bcc3..85e125850e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,8 +22,8 @@ # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # ########################################################################################## -cmake_minimum_required(VERSION 3.25 FATAL_ERROR) -cmake_policy(VERSION 3.25) +cmake_minimum_required(VERSION 3.26 FATAL_ERROR) +cmake_policy(VERSION 3.26) project(OpenSpace) diff --git a/apps/OpenSpace/CMakeLists.txt b/apps/OpenSpace/CMakeLists.txt index 8e41455eca..fe166610db 100644 --- a/apps/OpenSpace/CMakeLists.txt +++ b/apps/OpenSpace/CMakeLists.txt @@ -190,7 +190,7 @@ endif () if (WIN32) add_custom_command(TARGET OpenSpace POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy $ $ + COMMAND ${CMAKE_COMMAND} -E copy -t $ $ COMMAND_EXPAND_LISTS ) endif () diff --git a/ext/ghoul b/ext/ghoul index a88d75e2cc..eaeb5a304c 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit a88d75e2cc564ca12d8295b8282d9798ed5dd1db +Subproject commit eaeb5a304c7d28229b331a747891fc9839f9f84d From 38e20403a1dd2a203dbba74e6a0ee6b0cf6be80b Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 19 Aug 2024 13:25:13 +0200 Subject: [PATCH 65/99] Revert "Update required CMake version to 3.26" This reverts commit b5114658e66d76cb34338ffe0e933829ad717616. --- CMakeLists.txt | 4 ++-- apps/OpenSpace/CMakeLists.txt | 2 +- ext/ghoul | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 85e125850e..65ac51bcc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,8 +22,8 @@ # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # ########################################################################################## -cmake_minimum_required(VERSION 3.26 FATAL_ERROR) -cmake_policy(VERSION 3.26) +cmake_minimum_required(VERSION 3.25 FATAL_ERROR) +cmake_policy(VERSION 3.25) project(OpenSpace) diff --git a/apps/OpenSpace/CMakeLists.txt b/apps/OpenSpace/CMakeLists.txt index fe166610db..8e41455eca 100644 --- a/apps/OpenSpace/CMakeLists.txt +++ b/apps/OpenSpace/CMakeLists.txt @@ -190,7 +190,7 @@ endif () if (WIN32) add_custom_command(TARGET OpenSpace POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy -t $ $ + COMMAND ${CMAKE_COMMAND} -E copy $ $ COMMAND_EXPAND_LISTS ) endif () diff --git a/ext/ghoul b/ext/ghoul index eaeb5a304c..a88d75e2cc 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit eaeb5a304c7d28229b331a747891fc9839f9f84d +Subproject commit a88d75e2cc564ca12d8295b8282d9798ed5dd1db From 3eaa3cb593aa73d7c2193c7166d38f3944f5d814 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 19 Aug 2024 13:35:12 +0200 Subject: [PATCH 66/99] Update ghoul repository --- ext/ghoul | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ghoul b/ext/ghoul index a88d75e2cc..eb64096b7e 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit a88d75e2cc564ca12d8295b8282d9798ed5dd1db +Subproject commit eb64096b7e50b0f2a6d5208574ad2cc2b98bfefd From 351ee0f82be7a5b659fd9e5241b91c31325c4e64 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Mon, 19 Aug 2024 15:41:50 +0200 Subject: [PATCH 67/99] Use Cmake provided variable for windeployqt file Instead of path to a speicific file that might not exists for the currently installed version --- apps/OpenSpace/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/OpenSpace/CMakeLists.txt b/apps/OpenSpace/CMakeLists.txt index 8e41455eca..729f4bf4fe 100644 --- a/apps/OpenSpace/CMakeLists.txt +++ b/apps/OpenSpace/CMakeLists.txt @@ -149,7 +149,7 @@ if (WIN32) get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY) add_custom_command( TARGET OpenSpace POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E env PATH="${_qt_bin_dir}" "${_qt_bin_dir}/windeployqt6.exe" --verbose 0 --no-compiler-runtime --no-translations \"$\" + COMMAND "${WINDEPLOYQT_EXECUTABLE}" --verbose 0 --no-compiler-runtime --no-translations \"$\" COMMENT "Deploying Qt libraries" ) endif () From 09c192f46e2a2598a6374ab46bf38b21f083c8f3 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Mon, 19 Aug 2024 17:47:03 +0200 Subject: [PATCH 68/99] Fix TravelSpeed uniform variables not being set correctly (closes #3381) --- modules/space/rendering/renderabletravelspeed.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/space/rendering/renderabletravelspeed.cpp b/modules/space/rendering/renderabletravelspeed.cpp index d143d8d264..f1bad6e7a5 100644 --- a/modules/space/rendering/renderabletravelspeed.cpp +++ b/modules/space/rendering/renderabletravelspeed.cpp @@ -287,9 +287,6 @@ void RenderableTravelSpeed::update(const UpdateData& data) { else { // in case we've reached the target reinitiateTravel(); } - - _shaderProgram->setUniform("lineColor", _lineColor); - _shaderProgram->setUniform("opacity", opacity()); } void RenderableTravelSpeed::render(const RenderData& data, RendererTasks&) { @@ -304,6 +301,9 @@ void RenderableTravelSpeed::render(const RenderData& data, RendererTasks&) { ); _shaderProgram->setUniform("projectionTransform", data.camera.projectionMatrix()); + _shaderProgram->setUniform("lineColor", _lineColor); + _shaderProgram->setUniform("opacity", opacity()); + #ifndef __APPLE__ glLineWidth(_lineWidth); #else From 1fa4b3fd37d5cdcf207dce94c818ab67e2483825 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 21 Aug 2024 10:32:49 +0200 Subject: [PATCH 69/99] Update Ghoul submodule to fix WMI crash (closes #3330) --- ext/ghoul | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ghoul b/ext/ghoul index eb64096b7e..448f5b9b8d 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit eb64096b7e50b0f2a6d5208574ad2cc2b98bfefd +Subproject commit 448f5b9b8d0dada956fd5ef2393f1f6473695200 From a138be3f9208e1607cadeef7178d68eb4e784aea Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 21 Aug 2024 10:33:59 +0200 Subject: [PATCH 70/99] Add example for StaticTranslation (#3385) --- .../statictranslation/static.asset | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 data/assets/examples/translation/statictranslation/static.asset diff --git a/data/assets/examples/translation/statictranslation/static.asset b/data/assets/examples/translation/statictranslation/static.asset new file mode 100644 index 0000000000..c5f0e40b50 --- /dev/null +++ b/data/assets/examples/translation/statictranslation/static.asset @@ -0,0 +1,29 @@ +-- Basic +-- This asset creates a set of coordinate axes that are offset from their original +-- position by a fixed and static amount. In this specific example, the axes are offset +-- by 50 meters along the y-axis and 10 meters along the negative z-axis. + +local Node = { + Identifier = "StaticTranslation_Example", + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, 50.0, -10.0 } + } + }, + Renderable = { + Type = "RenderableCartesianAxes" + }, + GUI = { + Name = "StaticTranslation - Basic", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) From d0b3cd6e8903ae55d1d918b35cb67231a85296f1 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 21 Aug 2024 10:34:08 +0200 Subject: [PATCH 71/99] Add example for ConstantRotation (#3384) --- .../rotation/constantrotation/constant.asset | 29 +++++++++++++++++++ modules/base/rotation/constantrotation.cpp | 9 ++++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 data/assets/examples/rotation/constantrotation/constant.asset diff --git a/data/assets/examples/rotation/constantrotation/constant.asset b/data/assets/examples/rotation/constantrotation/constant.asset new file mode 100644 index 0000000000..e4da3360b4 --- /dev/null +++ b/data/assets/examples/rotation/constantrotation/constant.asset @@ -0,0 +1,29 @@ +-- Basic +-- This asset applies a rotation to a set of coordinate axes that makes them rotate at a +-- constant rate of one revolution around the z-axis every 2 seconds. + +local Node = { + Identifier = "ConstantRotation_Example", + Transform = { + Rotation = { + Type = "ConstantRotation", + RotationAxis = { 0.0, 0.0, 1.0 }, + RotationRate = 0.5 + } + }, + Renderable = { + Type = "RenderableCartesianAxes" + }, + GUI = { + Name = "ConstantRotation - Basic", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end) diff --git a/modules/base/rotation/constantrotation.cpp b/modules/base/rotation/constantrotation.cpp index 0a14cbd1f3..292012ad04 100644 --- a/modules/base/rotation/constantrotation.cpp +++ b/modules/base/rotation/constantrotation.cpp @@ -47,7 +47,9 @@ namespace { struct [[codegen::Dictionary(ConstantRotation)]] Parameters { // [[codegen::verbatim(RotationInfo.description)]] - std::optional rotationAxis; + std::optional rotationAxis + [[codegen::inrange(glm::dvec3(-1.0), glm::dvec3(1.0))]]; + // [[codegen::verbatim(RotationRateInfo.description)]] std::optional rotationRate; }; @@ -100,7 +102,10 @@ glm::dmat3 ConstantRotation::matrix(const UpdateData& data) const { _accumulatedRotation += glm::tau(); } - const glm::dquat q = glm::angleAxis(_accumulatedRotation, _rotationAxis.value()); + const glm::dquat q = glm::angleAxis( + _accumulatedRotation, + glm::normalize(_rotationAxis.value()) + ); return glm::toMat3(q); } From 67965e8844912ed8b643709bd522cfaa91b454ee Mon Sep 17 00:00:00 2001 From: Ylva Selling Date: Wed, 21 Aug 2024 11:16:17 +0200 Subject: [PATCH 72/99] Issue/3174 update cef (#3383) * Update CEF version number * Set OpenSpace_Helper version of C++ to 20 * Update C++ syntax to v 20 * Remove deprecated function (now default) * Set the cache folder for cef * Update modules/webbrowser/src/cefhost.cpp Co-authored-by: Alexander Bock * Update version number --------- Co-authored-by: Ylva Selling Co-authored-by: Alexander Bock --- modules/webbrowser/CMakeLists.txt | 4 +++- modules/webbrowser/src/cefhost.cpp | 9 ++++----- modules/webbrowser/src/eventhandler.cpp | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/modules/webbrowser/CMakeLists.txt b/modules/webbrowser/CMakeLists.txt index 9d4674f4e5..10ff587420 100644 --- a/modules/webbrowser/CMakeLists.txt +++ b/modules/webbrowser/CMakeLists.txt @@ -48,7 +48,7 @@ set_property(GLOBAL PROPERTY OS_FOLDERS ON) cmake_policy(SET CMP0074 NEW) # Specify the CEF distribution version. -set(CEF_VERSION "102.0.10+gf249b2e+chromium-102.0.5005.115") +set(CEF_VERSION "127.3.5+g114ea2a+chromium-127.0.6533.120") # CEF Sandbox is not working with the latest Visual Studio, so we disable it for now. if (WIN32 OR UNIX) @@ -219,6 +219,7 @@ else() endif () set_target_properties(${CEF_HELPER_TARGET} PROPERTIES FOLDER "Helper") +set_openspace_compile_settings(${CEF_HELPER_TARGET}) ########################################################################################## # Create OpenSpace module. @@ -266,6 +267,7 @@ target_precompile_headers(${webbrowser_module} PRIVATE ) set_target_properties(libcef_dll_wrapper PROPERTIES FOLDER "Helper") +set_openspace_compile_settings(libcef_dll_wrapper) # Display CEF configuration settings. # PRINT_CEF_CONFIG() diff --git a/modules/webbrowser/src/cefhost.cpp b/modules/webbrowser/src/cefhost.cpp index 2c6e7870a4..4995f841bd 100644 --- a/modules/webbrowser/src/cefhost.cpp +++ b/modules/webbrowser/src/cefhost.cpp @@ -44,6 +44,10 @@ CefHost::CefHost([[maybe_unused]] const std::string& helperLocation) { LDEBUG("Initializing CEF..."); CefSettings settings; + const std::filesystem::path root = + std::filesystem::path(helperLocation).parent_path(); + const std::filesystem::path cefcache = std::format("{}/cefcache", root); + CefString(&settings.root_cache_path).FromString(cefcache.string()); #ifndef __APPLE__ // Apple will always look for helper in a fixed location @@ -53,11 +57,6 @@ CefHost::CefHost([[maybe_unused]] const std::string& helperLocation) { settings.windowless_rendering_enabled = true; attachDebugSettings(settings); -#ifdef WIN32 - // Enable High-DPI support on Windows 7 or newer - CefEnableHighDPISupport(); -#endif // WIN32 - #ifdef __APPLE__ // Load the CEF framework library at runtime instead of linking directly as required // by the macOS sandbox implementation diff --git a/modules/webbrowser/src/eventhandler.cpp b/modules/webbrowser/src/eventhandler.cpp index cff278d280..726576edee 100644 --- a/modules/webbrowser/src/eventhandler.cpp +++ b/modules/webbrowser/src/eventhandler.cpp @@ -406,7 +406,7 @@ bool EventHandler::charCallback(unsigned int charCode, KeyModifier modifier) { keyEvent.windows_key_code = mapFromGlfwToWindows(Key(charCode)); keyEvent.character = mapFromGlfwToCharacter(Key(charCode)); keyEvent.native_key_code = mapFromGlfwToNative(Key(charCode)); - keyEvent.modifiers = static_cast(modifier); + keyEvent.modifiers = static_cast(modifier); keyEvent.type = KEYEVENT_CHAR; return _browserInstance->sendKeyEvent(keyEvent); @@ -443,7 +443,7 @@ bool EventHandler::specialKeyEvent(Key key, KeyModifier mod, KeyAction action) { keyEvent.windows_key_code = mapFromGlfwToWindows(Key(45)); keyEvent.character = mapFromGlfwToCharacter(Key(45)); keyEvent.native_key_code = mapFromGlfwToNative(Key(45)); - keyEvent.modifiers = static_cast(mod); + keyEvent.modifiers = static_cast(mod); keyEvent.type = keyEventType(action); _browserInstance->sendKeyEvent(keyEvent); return true; @@ -454,7 +454,7 @@ bool EventHandler::specialKeyEvent(Key key, KeyModifier mod, KeyAction action) { keyEvent.windows_key_code = mapFromGlfwToWindows(Key::KeypadDecimal); keyEvent.character = mapFromGlfwToCharacter(Key::KeypadDecimal); keyEvent.native_key_code = mapFromGlfwToNative(Key::KeypadDecimal); - keyEvent.modifiers = static_cast(mod); + keyEvent.modifiers = static_cast(mod); keyEvent.type = keyEventType(action); _browserInstance->sendKeyEvent(keyEvent); return true; From 423d409dc8ac21196e5ce0399e9dc18a417d71a6 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 22 Aug 2024 14:00:51 +0200 Subject: [PATCH 73/99] Always use the alpha blending independent of the renderbin (closes #3304) It wasn't really clear why the check for the PreDeferredTransparent bin was in here in the first place --- modules/base/rendering/renderablesphere.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp index 0ef11b65b6..e63803cfa1 100644 --- a/modules/base/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -330,10 +330,7 @@ void RenderableSphere::render(const RenderData& data, RendererTasks&) { glDisable(GL_CULL_FACE); } - if (renderBin() == Renderable::RenderBin::PreDeferredTransparent) { - glBlendFunc(GL_SRC_ALPHA, GL_ONE); - glDepthMask(false); - } + glBlendFunc(GL_SRC_ALPHA, GL_ONE); _sphere->render(); From 1f202339c803616f3128004e94ef7dceab5a9187 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 22 Aug 2024 14:26:03 +0200 Subject: [PATCH 74/99] Update SGCT repository (closes #2655) --- apps/OpenSpace/ext/sgct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index 7b08cda0ed..b6171ab0a0 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit 7b08cda0ed002bda77f82a96ad721f34e7caa0a0 +Subproject commit b6171ab0a0df76a44ad53be41bdfd08ea39e4249 From 2e4b99787f9d4bdaa227321f59163ee77a4bf7f5 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 22 Aug 2024 15:20:02 +0200 Subject: [PATCH 75/99] Resolve ShellLink files before passing them to the drag/drop handler (closes #2544). Add new Lua function to resolve Shell links --- ext/ghoul | 2 +- scripts/drag_drop_handler.lua | 1 + src/engine/openspaceengine.cpp | 10 +++++++++- src/engine/openspaceengine_lua.inl | 15 +++++++++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/ext/ghoul b/ext/ghoul index 448f5b9b8d..e5ebfd2288 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 448f5b9b8d0dada956fd5ef2393f1f6473695200 +Subproject commit e5ebfd228894448ab15e9be9bac9a7ba274c2355 diff --git a/scripts/drag_drop_handler.lua b/scripts/drag_drop_handler.lua index 569da1ff0a..e15db99429 100644 --- a/scripts/drag_drop_handler.lua +++ b/scripts/drag_drop_handler.lua @@ -51,6 +51,7 @@ local is_wms_file = function(extension) return extension == ".wms" end + if is_image_file(extension) then return [[ openspace.addScreenSpaceRenderable({ diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 3f04d62077..17a7e5f5f7 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -1406,6 +1406,13 @@ void OpenSpaceEngine::handleDragDrop(std::filesystem::path file) { return; } +#ifdef WIN32 + if (file.extension() == ".lnk") { + LDEBUG(std::format("Replacing shell link path '{}'", file)); + file = FileSys.resolveShellLink(file); + } +#endif // WIN32 + ghoul::lua::push(s, file); lua_setglobal(s, "filename"); @@ -1548,7 +1555,8 @@ scripting::LuaLibrary OpenSpaceEngine::luaLibrary() { codegen::lua::ResetCamera, codegen::lua::Configuration, codegen::lua::LayerServer, - codegen::lua::LoadJson + codegen::lua::LoadJson, + codegen::lua::ResolveShortcut, }, { absPath("${SCRIPTS}/core_scripts.lua") diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index f4d5efd5f8..866d11159a 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -293,4 +293,19 @@ namespace { return openspace::jsonToDictionary(json); } +/** + * Returns the target path for a Windows shortcut file. This function will produce an + * error on non-Windows operating systems. The `path` has to be a valid Windows Shell link + * file. + */ +[[codegen::luawrap]] std::filesystem::path resolveShortcut(std::filesystem::path path) { +#ifdef WIN32 + return FileSys.resolveShellLink(std::move(path)); +#else // ^^^^ WIN32 // !WIN32 vvvv + throw ghoul::lua::LuaError(std::format( + "Tried to resolve shortcut file '{}' on unsupported non-Windows platform", path + )); +#endif // WIN32 +} + #include "openspaceengine_lua_codegen.cpp" From f962a10e036adfedade8d7f55cedd35d9b74c4cf Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 22 Aug 2024 16:38:04 +0200 Subject: [PATCH 76/99] Add new maps for the Globe representation of Phobos (closes #1397) --- .../colorlayers/phobos_mars_express.asset | 52 +++++++++++++++++++ .../layers/colorlayers/phobos_viking.asset | 41 +++++++++++---- 2 files changed, 83 insertions(+), 10 deletions(-) create mode 100644 data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_mars_express.asset diff --git a/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_mars_express.asset b/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_mars_express.asset new file mode 100644 index 0000000000..083b569074 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_mars_express.asset @@ -0,0 +1,52 @@ +local globe = asset.require("../../phobos_globe") + + + +local maps = asset.resource({ + Name = "Phobos Maps", + Type = "HttpSynchronization", + Identifier = "phobos_maps", + Version = 1 +}) + + +local Layer = { + Identifier = "Mars_Express_HRSC_100m", + Name = "Mars Express HRCS 100m", + Enabled = asset.enabled, + ZIndex = 10, + FilePath = maps .. "mex_hrsc_100m_dem.vrt", + Description = [[Images from the European Space Agency's High Resolution Stereo Camera + (HRSC) aboard the Mars Express were used to obtain 3-dimensional coordinates of + surface points of Phobos. As currently the HRSC could not gain global coverage yet, + the data was complimented by Viking orbiter image data to be able to provide the + digital elevation model (DEM) globally (Willner et al., 2010). Resolution of this DEM + is 100 meters per pixel (m). + + The research leading to the data products has received funding from the European + Community's Seventh Framework Programme ([FP7/2007-2013]) under grant agreement number + 263466 for the FP7-ESPaCE program. + + Willner, K., Oberst, J., Hussmann, H., Giese, B., Hoffman, H., Matz, K.-D., + Roatsch, T., & Duxbury, T. (2010). Phobos control point network, rotation, and shape. + Earth and Planetary Science Letters, 294(3–4), 541-546. + https://doi.org/10.1016/j.epsl.2009.07.033]] +} + + +asset.onInitialize(function() + openspace.globebrowsing.addLayer(globe.Phobos_Globe.Identifier, "HeightLayers", Layer) +end) + +asset.onDeinitialize(function() + openspace.globebrowsing.deleteLayer(globe.Phobos_Globe.Identifier, "HeightLayers", Layer) +end) + + + +asset.meta = { + Name = "Phobos Mars Express HRSC DEM Global 100m", + Author = "OpenSpace Team", + URL = "https://astrogeology.usgs.gov/search/map/phobos_mars_express_hrsc_dem_global_100m", + License = "Please cite authors" +} diff --git a/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_viking.asset b/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_viking.asset index 8f7c8f1408..877033922c 100644 --- a/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_viking.asset +++ b/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_viking.asset @@ -2,13 +2,35 @@ local globe = asset.require("../../phobos_globe") +local maps = asset.resource({ + Name = "Phobos Maps", + Type = "HttpSynchronization", + Identifier = "phobos_maps", + Version = 1 +}) + + local Layer = { - Identifier = "Phobos_Global_Shaded_Relief_USGS", - Name = "Phobos Global Shaded Relief [USGS]", + Identifier = "Viking_5m", + Name = "Viking 5m", Enabled = asset.enabled, ZIndex = 10, - FilePath = "WMS:https://wms.wr.usgs.gov/cgi-bin/mapserv?map=/maps/mars/phobos_simp_cyl.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Phobos_Simple_Cylindrical_Rasters&SRS=EPSG:4326&BBOX=-180,-90,360,90", - Description = "Viking-base Phobos shaded relief created by USGS" + FilePath = maps .. "viking_5m.vrt", + Description = [[This mosaic of Phobos was created by compiling updated versions of + Viking high-resolution mosaics and selecting the best high-resolution images from + other spacecraft to construct an entirely new mosaic. The process of compiling this + mosaic significantly improved areas of poor control. Where images with reverse + lighting meet, artistic effects are necessary to create satisfactory appearance, but + this affects the appearance only and not the map geometry. This global mosaic has a + pixel resolution of five meters per pixel (m). + + References: + Stooke, P. (2012). Stooke Small Bodies Maps V2.0. MULTI-SA-MULTI-6-STOOKEMAPS-V2.0. + NASA Planetary Data System. https://sbn.psi.edu/pds/resource/stookemaps.html + + Simonelli, D. P., Thomas, P. C., Carcich, B. T., & Veverka, J. (1993). The generation + and use of numerical shape models for irregular solar system objects. Icarus, 103, + 49-61. https://doi.org/10.1006/icar.1993.1057]] } @@ -20,13 +42,12 @@ asset.onDeinitialize(function() openspace.globebrowsing.deleteLayer(globe.Phobos_Globe.Identifier, "ColorLayers", Layer) end) -asset.export("layer", Layer) - +asset.export(Layer) asset.meta = { - Name = "Phobos Global Shaded Relief [USGS]", - Author = "USGS/NASA", - URL = "https://astrowebmaps.wr.usgs.gov/webmapatlas/Layers/maps.html", - License = "NASA/PDS" + Name = "Phobos Viking Global Mosaic 5m", + Author = "OpenSpace Team", + URL = "https://astrogeology.usgs.gov/search/map/phobos_viking_global_mosaic_5m", + License = "Please cite authors" } From 6e6f425a0a655d14bc5bfe4b734831194d355cf5 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Thu, 22 Aug 2024 16:51:28 +0200 Subject: [PATCH 77/99] Issue/3337 Custom UI group ordering (#3363) * remove code for controlling group sorting in ImGui We only use this for debug and the sorting here is no longer relevant * Add feature to add custom ordering to UI groups * Tiny cleanup * Add numerical ordering for night sky planets * Update Lua function name and create an event when ordering updated * Set top-level ordering * Add function documentation * Add a custom ordering that previously was hardcoded in UI * Apply suggestions from code review Co-authored-by: Alexander Bock * Rename GUI ordering function * Update GUI hash --------- Co-authored-by: Alexander Bock --- data/assets/base.asset | 9 ++++ data/assets/base_blank.asset | 1 - data/assets/nightsky/planets.asset | 15 ++++-- .../scene/solarsystem/planets/planets.asset | 7 +++ data/assets/util/webgui.asset | 2 +- include/openspace/events/event.h | 14 +++++ include/openspace/scene/scene.h | 23 ++++++++- modules/imgui/include/guipropertycomponent.h | 1 - modules/imgui/src/guipropertycomponent.cpp | 51 ++----------------- scripts/core_scripts.lua | 14 ----- src/events/event.cpp | 16 ++++++ src/scene/scene.cpp | 21 +++++++- src/scene/scene_lua.inl | 24 +++++++++ 13 files changed, 125 insertions(+), 73 deletions(-) diff --git a/data/assets/base.asset b/data/assets/base.asset index ff5967475c..b82a1f30e6 100644 --- a/data/assets/base.asset +++ b/data/assets/base.asset @@ -87,4 +87,13 @@ asset.onInitialize(function() openspace.globebrowsing.loadWMSServersFromFile( openspace.absPath("${DATA}/globebrowsing_servers.lua") ) + + openspace.setGuiOrder( + "/", + { "Solar System", "Milky Way", "Universe", "Night Sky", "Examples" } + ) + openspace.setGuiOrder( + "/Solar System", + { "Planets", "Dwarf Planets", "Sun", "Solar System Barycenter" } + ) end) diff --git a/data/assets/base_blank.asset b/data/assets/base_blank.asset index 12f43b97ed..e4ec936782 100644 --- a/data/assets/base_blank.asset +++ b/data/assets/base_blank.asset @@ -22,6 +22,5 @@ asset.require("modules/touch/default_settings") asset.onInitialize(function() webGui.setCefRoute("onscreen") - openspace.setDefaultGuiSorting() openspace.setPropertyValueSingle("RenderEngine.VerticalLogOffset", 0.100000) end) diff --git a/data/assets/nightsky/planets.asset b/data/assets/nightsky/planets.asset index 5d44a0328a..8239d168e8 100644 --- a/data/assets/nightsky/planets.asset +++ b/data/assets/nightsky/planets.asset @@ -32,7 +32,8 @@ local Mercury = { Name = "Night Sky Mercury", Description = [[A night sky version of the planet Mercury, making it visible as a bright object on the sky (textured representation).]], - Path = "/Night Sky/Planets" + Path = "/Night Sky/Planets", + OrderingNumber = 1 } } @@ -54,7 +55,8 @@ local Venus = { Name = "Night Sky Venus", Description = [[A night sky version of the planet Venus, making it visible as a bright object on the sky (textured representation).]], - Path = "/Night Sky/Planets" + Path = "/Night Sky/Planets", + OrderingNumber = 2 } } @@ -74,7 +76,8 @@ local Mars = { Tag = { "nightsky_billboard" }, GUI = { Name = "Night Sky Mars", - Path = "/Night Sky/Planets" + Path = "/Night Sky/Planets", + OrderingNumber = 4 } } @@ -96,7 +99,8 @@ local Jupiter = { Name = "Night Sky Jupiter", Description = [[A night sky version of the planet Jupiter, making it visible as a bright object on the sky (textured representation).]], - Path = "/Night Sky/Planets" + Path = "/Night Sky/Planets", + OrderingNumber = 5 } } @@ -118,7 +122,8 @@ local Saturn = { Name = "Night Sky Saturn", Description = [[A night sky version of the planet Saturn, making it visible as a bright object on the sky (textured representation).]], - Path = "/Night Sky/Planets" + Path = "/Night Sky/Planets", + OrderingNumber = 6 } } diff --git a/data/assets/scene/solarsystem/planets/planets.asset b/data/assets/scene/solarsystem/planets/planets.asset index 2263756812..ed6e79e3e1 100644 --- a/data/assets/scene/solarsystem/planets/planets.asset +++ b/data/assets/scene/solarsystem/planets/planets.asset @@ -30,6 +30,13 @@ asset.require("./neptune/neptune") asset.require("./neptune/major_moons") +asset.onInitialize(function() + openspace.setGuiOrder( + "/Solar System/Planets", + { "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune" } + ) +end) + asset.meta = { Name = "Planets", diff --git a/data/assets/util/webgui.asset b/data/assets/util/webgui.asset index b58de5162b..f8ae2d62fa 100644 --- a/data/assets/util/webgui.asset +++ b/data/assets/util/webgui.asset @@ -4,7 +4,7 @@ local guiCustomization = asset.require("customization/gui") -- Select which commit hashes to use for the frontend and backend -local frontendHash = "c607523e86ab29c573b157c956dcf0b0e4492395" +local frontendHash = "cb4c80198d15caf410f5f8bb2c310339793d5747" local frontend = asset.resource({ Identifier = "WebGuiFrontend", diff --git a/include/openspace/events/event.h b/include/openspace/events/event.h index e1ce7c0ad1..58c48c39e9 100644 --- a/include/openspace/events/event.h +++ b/include/openspace/events/event.h @@ -79,6 +79,7 @@ struct Event { CameraPathFinished, CameraMovedPosition, ScheduledScriptExecuted, + GuiTreeUpdated, Custom, Last // sentinel value }; @@ -538,6 +539,19 @@ struct EventScheduledScriptExecuted : public Event { const tstring script; }; +/** + * This event is created when the custom ordering for a specific branch in the Scene + * GUI tree is changed. It signals to the UI that the tree should be updated. + */ +struct EventGuiTreeUpdated : public Event { + static constexpr Type Type = Event::Type::GuiTreeUpdated; + + /** + * Creates an instance of an EventGuiTreeUpdated event. + */ + EventGuiTreeUpdated(); +}; + /** * A custom event type that can be used in a pinch when no explicit event type is * available. This should only be used in special circumstances and it should be diff --git a/include/openspace/scene/scene.h b/include/openspace/scene/scene.h index e7c10db589..38d77c931d 100644 --- a/include/openspace/scene/scene.h +++ b/include/openspace/scene/scene.h @@ -248,7 +248,26 @@ public: * * \return A list of all unique tags that are used in the currently loaded scene. */ - std::vector allTags(); + std::vector allTags() const; + + /** + * Set a custom order for items in a given branch in the Scene GUI tree. + * + * \param guiPath The GUI path for which to set the order + * \param list A list of names of scene graph nodes or subgroups in the GUI, in the + * order of which they should appear in the tree. + */ + void setGuiTreeOrder(const std::string& guiPath, + const std::vector& list); + + /** + * Returns a dictionary containing all the currently set custom orderings for the + * Scene GUI tree. + * + * \return A dictionary containing key value pairs with custom item orderings for + * specific paths in the Scene GUI tree + */ + ghoul::Dictionary guiTreeOrder() const; private: /** @@ -333,6 +352,8 @@ private: std::vector _propertyInterpolationInfos; ghoul::MemoryPool<4096> _memoryPool; + + std::unordered_map> _guiTreeOrderMap; }; // Convert the input string to a format that is valid as an identifier diff --git a/modules/imgui/include/guipropertycomponent.h b/modules/imgui/include/guipropertycomponent.h index 1b380d3f11..33d4da7eb7 100644 --- a/modules/imgui/include/guipropertycomponent.h +++ b/modules/imgui/include/guipropertycomponent.h @@ -62,7 +62,6 @@ protected: std::function()> _propertyOwnerFunction; properties::BoolProperty _useTreeLayout; - properties::StringListProperty _treeOrdering; }; } // namespace openspace::gui diff --git a/modules/imgui/src/guipropertycomponent.cpp b/modules/imgui/src/guipropertycomponent.cpp index b91884463d..41c01cdcc6 100644 --- a/modules/imgui/src/guipropertycomponent.cpp +++ b/modules/imgui/src/guipropertycomponent.cpp @@ -46,15 +46,6 @@ namespace { openspace::properties::Property::Visibility::AdvancedUser }; - constexpr openspace::properties::Property::PropertyInfo OrderingInfo = { - "Ordering", - "Tree Ordering", - "This list determines the order of the first tree layer if it is used. Elements " - "present in this list will be shown first, with an alphabetical ordering for " - "elements not listed.", - openspace::properties::Property::Visibility::AdvancedUser - }; - int nVisibleProperties(const std::vector& props) { using namespace openspace; @@ -185,10 +176,8 @@ GuiPropertyComponent::GuiPropertyComponent(std::string identifier, std::string g UseTreeLayout useTree) : GuiComponent(std::move(identifier), std::move(guiName)) , _useTreeLayout(UseTreeInfo, useTree) - , _treeOrdering(OrderingInfo) { addProperty(_useTreeLayout); - addProperty(_treeOrdering); } void GuiPropertyComponent::setPropertyOwners( @@ -303,14 +292,11 @@ void GuiPropertyComponent::render() { (void)owner; // using [[maybe_unused]] in the for loop gives an error } - // Sort: - // if guigrouping, sort by name and shortest first, but respect the user specified - // ordering then all w/o guigroup - const std::vector& ordering = _treeOrdering; + // Sort: by name and shortest first std::stable_sort( owners.begin(), owners.end(), - [&ordering](PropertyOwner* lhs, PropertyOwner* rhs) { + [](PropertyOwner* lhs, PropertyOwner* rhs) { const std::string lhsGrp = dynamic_cast(lhs)->guiPath(); const std::string rhsGrp = dynamic_cast(rhs)->guiPath(); @@ -321,38 +307,7 @@ void GuiPropertyComponent::render() { return true; } - if (ordering.empty()) { - return lhsGrp < rhsGrp; - } - - std::vector lhsToken = ghoul::tokenizeString(lhsGrp, '/'); - // The first token is always empty - auto lhsIt = std::find(ordering.begin(), ordering.end(), lhsToken[1]); - - std::vector rhsToken = ghoul::tokenizeString(rhsGrp, '/'); - // The first token is always empty - auto rhsIt = std::find(ordering.begin(), ordering.end(), rhsToken[1]); - - if (lhsIt != ordering.end() && rhsIt != ordering.end()) { - if (lhsToken[1] != rhsToken[1]) { - // If both top-level groups are in the ordering list, the - // order of the iterators gives us the order of the groups - return lhsIt < rhsIt; - } - else { - return lhsGrp < rhsGrp; - } - } - else if (lhsIt != ordering.end() && rhsIt == ordering.end()) { - // If only one of them is in the list, we have a sorting - return true; - } - else if (lhsIt == ordering.end() && rhsIt != ordering.end()) { - return false; - } - else { - return lhsGrp < rhsGrp; - } + return lhsGrp < rhsGrp; } ); } diff --git a/scripts/core_scripts.lua b/scripts/core_scripts.lua index 21ab69f942..89a4bd0ad6 100644 --- a/scripts/core_scripts.lua +++ b/scripts/core_scripts.lua @@ -18,13 +18,6 @@ openspace.documentation = { Documentation = [[This function removes unmarks the scene graph nodes identified by name as interesting, thus removing the shortcuts from the features properties list]] }, - { - Name = "setDefaultGuiSorting", - Arguments = {}, - Documentation = [[This function sets the default GUI sorting for the space environment - to increasing size, from solar system, through Milky Way, Universe and finishing - with other elements]] - }, { Name = "setDefaultDashboard", Arguments = {}, @@ -122,13 +115,6 @@ openspace.removeInterestingNodes = function(nodes) end end -openspace.setDefaultGuiSorting = function() - openspace.setPropertyValueSingle( - "Modules.ImGUI.Scene.Ordering", - { "Solar System", "Milky Way", "Universe", "Other" } - ) -end - openspace.rebindKey = function(oldKey, newKey) local t = openspace.keyBindings(oldKey) openspace.clearKey(oldKey) diff --git a/src/events/event.cpp b/src/events/event.cpp index b3b2e4311b..dac24c8aea 100644 --- a/src/events/event.cpp +++ b/src/events/event.cpp @@ -206,6 +206,11 @@ void log(int i, const EventScheduledScriptExecuted& e) { LINFO(std::format("[{}] ScheduledScriptExecuted: Script '{}'", i, e.script)); } +void log(int i, const EventGuiTreeUpdated& e) { + ghoul_assert(e.type == EventGuiTreeUpdated::Type, "Wrong type"); + LINFO(std::format("[{}] EventGuiTreeUpdated", i)); +} + void log(int i, const CustomEvent& e) { ghoul_assert(e.type == CustomEvent::Type, "Wrong type"); LINFO(std::format("[{}] CustomEvent: {} ({})", i, e.subtype, e.payload)); @@ -234,6 +239,7 @@ std::string_view toString(Event::Type type) { case Event::Type::CameraPathFinished: return "CameraPathFinished"; case Event::Type::CameraMovedPosition: return "CameraMovedPosition"; case Event::Type::ScheduledScriptExecuted: return "ScheduledScriptExecuted"; + case Event::Type::GuiTreeUpdated: return "GuiTreeUpdated"; case Event::Type::Custom: return "Custom"; default: throw ghoul::MissingCaseException(); @@ -304,6 +310,9 @@ Event::Type fromString(std::string_view str) { else if (str == "ScheduledScriptExecuted") { return Event::Type::ScheduledScriptExecuted; } + else if (str == "GuiTreeUpdated") { + return Event::Type::GuiTreeUpdated; + } else if (str == "Custom") { return Event::Type::Custom; } @@ -553,6 +562,9 @@ void logAllEvents(const Event* e) { case Event::Type::ScheduledScriptExecuted: log(i, *static_cast(e)); break; + case Event::Type::GuiTreeUpdated: + log(i, *static_cast(e)); + break; case Event::Type::Custom: log(i, *static_cast(e)); break; @@ -686,6 +698,10 @@ EventScheduledScriptExecuted::EventScheduledScriptExecuted(std::string_view scri , script(temporaryString(script_)) {} +EventGuiTreeUpdated::EventGuiTreeUpdated() + : Event(Type) +{} + CustomEvent::CustomEvent(std::string_view subtype_, std::string_view payload_) : Event(Type) , subtype(subtype_) diff --git a/src/scene/scene.cpp b/src/scene/scene.cpp index 7c1072ac64..2204e0929e 100644 --- a/src/scene/scene.cpp +++ b/src/scene/scene.cpp @@ -779,7 +779,7 @@ std::vector Scene::propertiesMatchingRegex( return findMatchesInAllProperties(propertyString, allProperties(), ""); } -std::vector Scene::allTags() { +std::vector Scene::allTags() const { std::set result; for (SceneGraphNode* node : _topologicallySortedNodes) { const std::vector& tags = node->tags(); @@ -789,6 +789,21 @@ std::vector Scene::allTags() { return std::vector(result.begin(), result.end()); } +void Scene::setGuiTreeOrder(const std::string& guiPath, + const std::vector& list) +{ + _guiTreeOrderMap[guiPath] = list; + global::eventEngine->publishEvent(); +} + +ghoul::Dictionary Scene::guiTreeOrder() const { + ghoul::Dictionary dict; + for (const auto& [key, list] : _guiTreeOrderMap) { + dict.setValue(key, list); + } + return dict; +} + scripting::LuaLibrary Scene::luaLibrary() { return { "", @@ -877,7 +892,9 @@ scripting::LuaLibrary Scene::luaLibrary() { codegen::lua::SetParent, codegen::lua::BoundingSphere, codegen::lua::InteractionSphere, - codegen::lua::MakeIdentifier + codegen::lua::MakeIdentifier, + codegen::lua::SetGuiOrder, + codegen::lua::GuiOrder } }; } diff --git a/src/scene/scene_lua.inl b/src/scene/scene_lua.inl index 519ffdd7a4..180956ad17 100644 --- a/src/scene/scene_lua.inl +++ b/src/scene/scene_lua.inl @@ -1234,6 +1234,30 @@ enum class [[codegen::enum]] CustomPropertyType { return openspace::makeIdentifier(input); } +/** + * Set a custom ordering of the items in a specific branch in the Scene GUI tree, i.e. + * for a specific GUI path. + * + * \param guiPath The GUI path for which the order should be set. + * \param list A list of names of scene graph nodes or subgroups in the GUI, in the order + * of which they should appear in the tree. The list does not have to include + * all items in the given GUI path. Any excluded items will be placed after + * the ones in the list. + */ +[[codegen::luawrap]] void setGuiOrder(std::string guiPath, std::vector list) +{ + return openspace::global::renderEngine->scene()->setGuiTreeOrder(guiPath, list); +} + +/** + * Get a dictionary containing the current map with custom orderings for the Scene GUI + * tree. Each key in the dictionary corresponds to a branch in the tree, i.e. a specific + * GUI path. + */ +[[codegen::luawrap]] ghoul::Dictionary guiOrder() { + return openspace::global::renderEngine->scene()->guiTreeOrder(); +} + } // namespace #include "scene_lua_codegen.cpp" From 11bb8e7ac50a840d07ab7b1fee8d7a776d937b64 Mon Sep 17 00:00:00 2001 From: Ylva Selling Date: Fri, 23 Aug 2024 09:37:01 +0200 Subject: [PATCH 78/99] GPU accelerate CEF (#3386) * Update CEF version number * Set OpenSpace_Helper version of C++ to 20 * Update C++ syntax to v 20 * Remove deprecated function (now default) * Set the cache folder for cef * Make static function in webbrowsermodule that determines if we can use accelerated rendering * Add flag for accelerated rendering to webrenderhandler * Use accelerated rendering * Implement function to see if gui should absorb click * Adhere to 80 char linewidth * Make only the UI GPU accelerated * Use dirty rects size for the texture to remove crash * Better comments * Make has content function work for GPU acceleration * Make it so all browsers can be accelerated Tried making it so only the gui was accelerated for simplicity. Performance plummeted, so reverted that * Tidy up * Add accelerated rendering flag to the screenspacerenderable shader * Add temporary fix to make the sky browser work * Remove flag from gui render handler * Enable webgl in a nicer way * Unbind texture in screenspacerenderable * Add better comments for error handling * Tidy up * Address PR comments * Make the acceleration Windows only * Remove unnecessary setting of shader dictionary * Allow web dev tools to connect to CEF * Update modules/webbrowser/include/browserinstance.h Co-authored-by: Emma Broman * Update modules/webbrowser/include/webrenderhandler.h Co-authored-by: Emma Broman * Apply suggestions from code review Co-authored-by: Emma Broman --------- Co-authored-by: Ylva Selling Co-authored-by: Emma Broman --- .../rendering/screenspacerenderable.h | 2 +- modules/base/shaders/screenspace_fs.glsl | 12 +- modules/cefwebgui/cefwebguimodule.cpp | 18 ++- modules/cefwebgui/shaders/gui_fs.glsl | 10 +- modules/cefwebgui/src/guirenderhandler.cpp | 7 +- modules/skybrowser/include/browser.h | 3 + modules/skybrowser/src/browser.cpp | 3 +- modules/webbrowser/include/browserinstance.h | 9 +- .../webbrowser/include/screenspacebrowser.h | 1 - modules/webbrowser/include/webrenderhandler.h | 18 ++- modules/webbrowser/src/browserinstance.cpp | 11 +- modules/webbrowser/src/screenspacebrowser.cpp | 28 ++-- modules/webbrowser/src/webbrowserapp.cpp | 5 +- modules/webbrowser/src/webrenderhandler.cpp | 148 +++++++++++++++++- modules/webbrowser/webbrowsermodule.cpp | 20 +++ modules/webbrowser/webbrowsermodule.h | 2 + src/rendering/screenspacerenderable.cpp | 8 +- 17 files changed, 256 insertions(+), 49 deletions(-) diff --git a/include/openspace/rendering/screenspacerenderable.h b/include/openspace/rendering/screenspacerenderable.h index 47f5af91dd..28f262f61d 100644 --- a/include/openspace/rendering/screenspacerenderable.h +++ b/include/openspace/rendering/screenspacerenderable.h @@ -98,7 +98,7 @@ public: static documentation::Documentation Documentation(); protected: - void createShaders(); + void createShaders(ghoul::Dictionary dict = ghoul::Dictionary()); std::string makeUniqueIdentifier(std::string name); virtual glm::mat4 scaleMatrix(); diff --git a/modules/base/shaders/screenspace_fs.glsl b/modules/base/shaders/screenspace_fs.glsl index 68402103a1..5d0b7fea8a 100644 --- a/modules/base/shaders/screenspace_fs.glsl +++ b/modules/base/shaders/screenspace_fs.glsl @@ -42,11 +42,21 @@ uniform vec2 borderWidth = vec2(0.1); uniform vec3 borderColor = vec3(0.0); uniform int borderFeather = 0; +// Accelerated rendering can be used for the CEF browser +#define USE_ACCELERATED_RENDERING #{useAcceleratedRendering} Fragment getFragment() { Fragment frag; + vec4 originalColor; + #if USE_ACCELERATED_RENDERING + vec2 flippedTexCoords = vec2(vs_st.x, 1.0 - vs_st.y); + // Correcting both orientation and color channels + originalColor = texture(tex, flippedTexCoords).bgra; + #else + originalColor = texture(tex, vs_st); + #endif - vec4 texColor = texture(tex, vs_st) * vec4(color, opacity); + vec4 texColor = originalColor * vec4(color, opacity); frag.color = texColor.a * texColor + (1.0 - texColor.a) * backgroundColor; diff --git a/modules/cefwebgui/cefwebguimodule.cpp b/modules/cefwebgui/cefwebguimodule.cpp index 308aa07347..e809d47350 100644 --- a/modules/cefwebgui/cefwebguimodule.cpp +++ b/modules/cefwebgui/cefwebguimodule.cpp @@ -216,6 +216,17 @@ void CefWebGuiModule::internalInitialize(const ghoul::Dictionary& configuration) startOrStopGui(); }); + global::callback::postDraw->emplace_back([this]() { + bool windowChanged = global::windowDelegate->windowHasResized(); + if (_instance && (windowChanged || _instance->_shouldReshape)){ + const glm::ivec2 res = global::windowDelegate->guiWindowResolution(); + _instance->reshape(static_cast( + glm::vec2(res) * global::windowDelegate->dpiScaling() + )); + _instance->_shouldReshape = false; + } + }); + global::callback::draw2D->emplace_back([this](){ ZoneScopedN("CefWebGuiModule"); @@ -227,13 +238,6 @@ void CefWebGuiModule::internalInitialize(const ghoul::Dictionary& configuration) const bool isMaster = global::windowDelegate->isMaster(); if (isGuiWindow && isMaster && _instance) { - if (global::windowDelegate->windowHasResized() || _instance->_shouldReshape) { - const glm::ivec2 csws = global::windowDelegate->guiWindowResolution(); - _instance->reshape(static_cast( - static_cast(csws) * global::windowDelegate->dpiScaling() - )); - _instance->_shouldReshape = false; - } if (_visible) { _instance->draw(); } diff --git a/modules/cefwebgui/shaders/gui_fs.glsl b/modules/cefwebgui/shaders/gui_fs.glsl index 288018f598..7e40d3ce72 100644 --- a/modules/cefwebgui/shaders/gui_fs.glsl +++ b/modules/cefwebgui/shaders/gui_fs.glsl @@ -29,8 +29,14 @@ in vec2 vs_st; out vec4 outputColor; uniform sampler2D tex; - +#define USE_ACCELERATED_RENDERING #{useAcceleratedRendering} void main() { - outputColor = texture(tex, vs_st); + #if USE_ACCELERATED_RENDERING + vec2 flippedTexCoords = vec2(vs_st.x, 1.0 - vs_st.y); + vec4 texColor = texture(tex, flippedTexCoords); + outputColor = texColor.bgra; // Correcting both orientation and color channels + #else + outputColor = texture(tex, vs_st); + #endif } diff --git a/modules/cefwebgui/src/guirenderhandler.cpp b/modules/cefwebgui/src/guirenderhandler.cpp index 4853fcc30a..836908f9f4 100644 --- a/modules/cefwebgui/src/guirenderhandler.cpp +++ b/modules/cefwebgui/src/guirenderhandler.cpp @@ -38,10 +38,14 @@ namespace openspace { GUIRenderHandler::GUIRenderHandler() { LDEBUG("Initializing CEF GL environment..."); + ghoul::Dictionary define; + define.setValue("useAcceleratedRendering", _acceleratedRendering); + _programObject = ghoul::opengl::ProgramObject::Build( "WebGUICEFProgram", absPath("${MODULE_CEFWEBGUI}/shaders/gui_vs.glsl"), - absPath("${MODULE_CEFWEBGUI}/shaders/gui_fs.glsl") + absPath("${MODULE_CEFWEBGUI}/shaders/gui_fs.glsl"), + define ); constexpr std::array Vtx = { -1.f, -1.f, -1.f, @@ -53,7 +57,6 @@ GUIRenderHandler::GUIRenderHandler() { glGenVertexArrays(1, &_vao); glBindVertexArray(_vao); glGenBuffers(1, &_vbo); - glGenTextures(1, &_texture); glBindBuffer(GL_ARRAY_BUFFER, _vbo); glBufferData(GL_ARRAY_BUFFER, Vtx.size() * sizeof(float), Vtx.data(), GL_STATIC_DRAW); glEnableVertexAttribArray(0); diff --git a/modules/skybrowser/include/browser.h b/modules/skybrowser/include/browser.h index 900afc2ae9..5a5235bf11 100644 --- a/modules/skybrowser/include/browser.h +++ b/modules/skybrowser/include/browser.h @@ -94,6 +94,9 @@ protected: private: class RenderHandler : public WebRenderHandler { public: + RenderHandler() + : WebRenderHandler(false) + {} void draw() override; void render() override; diff --git a/modules/skybrowser/src/browser.cpp b/modules/skybrowser/src/browser.cpp index 7cd47925cc..bb6edbfc6e 100644 --- a/modules/skybrowser/src/browser.cpp +++ b/modules/skybrowser/src/browser.cpp @@ -109,7 +109,8 @@ Browser::Browser(const ghoul::Dictionary& dictionary) // Create browser and render handler _browserInstance = std::make_unique( _renderHandler.get(), - _keyboardHandler.get() + _keyboardHandler.get(), + false ); WebBrowserModule* webBrowser = global::moduleEngine->module(); diff --git a/modules/webbrowser/include/browserinstance.h b/modules/webbrowser/include/browserinstance.h index 0e29b93c49..b5a0dfd221 100644 --- a/modules/webbrowser/include/browserinstance.h +++ b/modules/webbrowser/include/browserinstance.h @@ -57,8 +57,13 @@ class WebKeyboardHandler; class BrowserInstance { public: static constexpr int SingleClick = 1; - - BrowserInstance(WebRenderHandler* renderer, WebKeyboardHandler* keyboardHandler); + // @TODO (ylvse 2024-08-20): remove third argument when the sky browser rewrite is done. + // The browser instance should always accelerate the rendering if possible but for + // now the skybrowser is not accelerated. Will be when the rewrite is done. + BrowserInstance(WebRenderHandler* renderer, + WebKeyboardHandler* keyboardHandler, + bool accelerateRendering = true + ); ~BrowserInstance(); void loadUrl(const std::string& url); diff --git a/modules/webbrowser/include/screenspacebrowser.h b/modules/webbrowser/include/screenspacebrowser.h index f08e371308..a2d6d5cfad 100644 --- a/modules/webbrowser/include/screenspacebrowser.h +++ b/modules/webbrowser/include/screenspacebrowser.h @@ -77,7 +77,6 @@ public: protected: properties::UVec2Property _dimensions; std::unique_ptr _browserInstance; - std::unique_ptr _texture; private: class ScreenSpaceRenderHandler : public WebRenderHandler { diff --git a/modules/webbrowser/include/webrenderhandler.h b/modules/webbrowser/include/webrenderhandler.h index 10e374e43d..b58044d2ee 100644 --- a/modules/webbrowser/include/webrenderhandler.h +++ b/modules/webbrowser/include/webrenderhandler.h @@ -50,6 +50,9 @@ namespace openspace { class WebRenderHandler : public CefRenderHandler { public: + // @TODO (ylvse 2024-08-20): Remove this argument when the skybrowser rewrite is done. + // It is necessary atm for making the skybrowser work. + WebRenderHandler(bool accelerate = true); using Pixel = glm::tvec4; virtual void draw(void) = 0; @@ -58,15 +61,28 @@ public: void reshape(int, int); void GetViewRect(CefRefPtr browser, CefRect &rect) override; + + // Regular OnPaint method. Uses CPU allocation void OnPaint(CefRefPtr browser, PaintElementType type, const RectList &dirtyRects, const void* buffer, int width, int height) override; + + // Used when the "shared_texture" flag is set to true for CEF. Uses a shared texture + // from CEF that is allocated on another part of the GPU. Skip CPU allocationn for + // better performance. Needs OpenGl 4.5 or higher. + void OnAcceleratedPaint(CefRefPtr browser, PaintElementType type, + const RectList& dirtyRects, const CefAcceleratedPaintInfo& info) override; + + // Determines if the alpha value is > 0 at the specified pixel coordinates. Used in + // the GUI to determine if the click is consumed bool hasContent(int x, int y); bool isTextureReady() const; - void updateTexture(); + void updateTexture(); + void bindTexture(); protected: GLuint _texture = 0; + const bool _acceleratedRendering; private: glm::ivec2 _windowSize = glm::ivec2(0); diff --git a/modules/webbrowser/src/browserinstance.cpp b/modules/webbrowser/src/browserinstance.cpp index f62d5aec0e..41c66294da 100644 --- a/modules/webbrowser/src/browserinstance.cpp +++ b/modules/webbrowser/src/browserinstance.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -44,7 +45,8 @@ namespace { namespace openspace { BrowserInstance::BrowserInstance(WebRenderHandler* renderer, - WebKeyboardHandler* keyboardHandler) + WebKeyboardHandler* keyboardHandler, + bool accelerateRendering) : _renderHandler(renderer) , _keyboardHandler(keyboardHandler) , _client(new BrowserClient(_renderHandler.get(), _keyboardHandler.get())) @@ -54,8 +56,15 @@ BrowserInstance::BrowserInstance(WebRenderHandler* renderer, // requires this to be a long unsigned int, so we can't use nullptr here windowInfo.SetAsWindowless(0); + // Use accelerated rendering if possible + if (WebBrowserModule::canUseAcceleratedRendering() && accelerateRendering) { + windowInfo.shared_texture_enabled = true; + LINFO("Enabling shared texture mode for CEF"); + } + CefBrowserSettings browserSettings; browserSettings.windowless_frame_rate = 60; + browserSettings.webgl = cef_state_t::STATE_ENABLED; _browser = CefBrowserHost::CreateBrowserSync( windowInfo, diff --git a/modules/webbrowser/src/screenspacebrowser.cpp b/modules/webbrowser/src/screenspacebrowser.cpp index 6fbb0f303b..8ee054ba11 100644 --- a/modules/webbrowser/src/screenspacebrowser.cpp +++ b/modules/webbrowser/src/screenspacebrowser.cpp @@ -96,9 +96,9 @@ documentation::Documentation ScreenSpaceBrowser::Documentation() { ScreenSpaceBrowser::ScreenSpaceBrowser(const ghoul::Dictionary& dictionary) : ScreenSpaceRenderable(dictionary) , _dimensions(DimensionsInfo, glm::uvec2(0), glm::uvec2(0), glm::uvec2(3000)) - , _renderHandler(new ScreenSpaceRenderHandler) , _url(UrlInfo) , _reload(ReloadInfo) + , _renderHandler(new ScreenSpaceRenderHandler) , _keyboardHandler(new WebKeyboardHandler) { const Parameters p = codegen::bake(dictionary); @@ -109,8 +109,7 @@ ScreenSpaceBrowser::ScreenSpaceBrowser(const ghoul::Dictionary& dictionary) _url = p.url.value_or(_url); - const glm::vec2 windowDimensions = global::windowDelegate->currentSubwindowSize(); - _dimensions = p.dimensions.value_or(windowDimensions); + _dimensions = p.dimensions.value_or(global::windowDelegate->currentSubwindowSize()); _browserInstance = std::make_unique( _renderHandler.get(), @@ -132,14 +131,13 @@ ScreenSpaceBrowser::ScreenSpaceBrowser(const ghoul::Dictionary& dictionary) } bool ScreenSpaceBrowser::initializeGL() { - _texture = std::make_unique( - glm::uvec3(_dimensions.value(), 1), - GL_TEXTURE_2D + ghoul::Dictionary dict = ghoul::Dictionary(); + + dict.setValue( + "useAcceleratedRendering", + WebBrowserModule::canUseAcceleratedRendering() ); - - _renderHandler->setTexture(*_texture); - - createShaders(); + createShaders(dict); _browserInstance->initialize(); _browserInstance->loadUrl(_url); @@ -147,9 +145,6 @@ bool ScreenSpaceBrowser::initializeGL() { } bool ScreenSpaceBrowser::deinitializeGL() { - _renderHandler->setTexture(0); - _texture = nullptr; - LDEBUG(std::format("Deinitializing ScreenSpaceBrowser: {}", _url.value())); _browserInstance->close(true); @@ -172,6 +167,7 @@ void ScreenSpaceBrowser::render(const RenderData& renderData) { } _renderHandler->updateTexture(); + const glm::mat4 mat = globalRotationMatrix() * translationMatrix() * @@ -181,7 +177,7 @@ void ScreenSpaceBrowser::render(const RenderData& renderData) { } void ScreenSpaceBrowser::update() { - _objectSize = _texture->dimensions(); + _objectSize = _dimensions.value(); if (_isUrlDirty) { _browserInstance->loadUrl(_url); @@ -195,11 +191,11 @@ void ScreenSpaceBrowser::update() { } bool ScreenSpaceBrowser::isReady() const { - return _shader && _texture; + return _shader != nullptr; } void ScreenSpaceBrowser::bindTexture() { - _texture->bind(); + _renderHandler->bindTexture(); } } // namespace openspace diff --git a/modules/webbrowser/src/webbrowserapp.cpp b/modules/webbrowser/src/webbrowserapp.cpp index 8867954074..817118ba1f 100644 --- a/modules/webbrowser/src/webbrowserapp.cpp +++ b/modules/webbrowser/src/webbrowserapp.cpp @@ -42,9 +42,8 @@ void WebBrowserApp::OnContextCreated(CefRefPtr, CefRefPtr, void WebBrowserApp::OnBeforeCommandLineProcessing(const CefString&, CefRefPtr commandline) { - commandline->AppendSwitch("--enable-gpu-rasterization"); - commandline->AppendSwitch("--use-gl=desktop"); - commandline->AppendSwitch("--enable-webgl2-compute-context"); + // This is to allow dev tools to connect + commandline->AppendSwitchWithValue("remote-allow-origins", "http://localhost:8088"); commandline->AppendSwitch("log-gpu-control-list-decisions"); commandline->AppendSwitch("use-mock-keychain"); commandline->AppendSwitch("enable-begin-frame-scheduling"); diff --git a/modules/webbrowser/src/webrenderhandler.cpp b/modules/webbrowser/src/webrenderhandler.cpp index 0bdccd183b..658f0c6417 100644 --- a/modules/webbrowser/src/webrenderhandler.cpp +++ b/modules/webbrowser/src/webrenderhandler.cpp @@ -23,16 +23,33 @@ ****************************************************************************************/ #include - +#include #include #include +namespace { + constexpr std::string_view _loggerCat = "WebRenderHandler"; +} // namespace + + namespace openspace { +WebRenderHandler::WebRenderHandler(bool accelerate) + : _acceleratedRendering(WebBrowserModule::canUseAcceleratedRendering() && accelerate) +{ + if (_acceleratedRendering) { + glCreateTextures(GL_TEXTURE_2D, 1, &_texture); + } + else { + glGenTextures(1, &_texture); + } +} + void WebRenderHandler::reshape(int w, int h) { if (w == _windowSize.x && h == _windowSize.y) { return; } + ghoul_assert(w > 0 && h > 0, std::format("Reshaped browser to {} x {}", w, h)); _windowSize = glm::ivec2(w, h); _needsRepaint = true; } @@ -45,6 +62,11 @@ void WebRenderHandler::OnPaint(CefRefPtr, CefRenderHandler::PaintEle const CefRenderHandler::RectList& dirtyRects, const void* buffer, int w, int h) { + // This should never happen - if accelerated rendering is on the OnAcceleratePaint + // method should be called. But we instatiate the web render handler and the browser + // instance in different places so room for error + ghoul_assert(!_acceleratedRendering, "Accelerated rendering flag is turned on"); + const size_t bufferSize = static_cast(w * h); glm::ivec2 upperUpdatingRectBound = glm::ivec2(0, 0); @@ -94,8 +116,70 @@ void WebRenderHandler::OnPaint(CefRefPtr, CefRenderHandler::PaintEle _needsRepaint = false; } +void WebRenderHandler::OnAcceleratedPaint(CefRefPtr browser, + PaintElementType type, + const RectList& dirtyRects, + const CefAcceleratedPaintInfo& info) +{ + // This should never happen - if accelerated rendering is off the OnPaint method + // should be called. But we instatiate the web render handler and the browser instance + // in different places so room for error + ghoul_assert(_acceleratedRendering, "Accelerated rendering flag is turned off"); + + if (dirtyRects.empty()) { + return; + } + // When the window is minimized the texture is 1x1. + // This prevents a hard crash when minimizing the window or when you resize the window + // so that only the top bar is visible. + // @TODO (ylvse 2024-08-20): minimizing window should be handled with the appropriate + // function in the CefBrowser called WasHidden + if (dirtyRects[0].height <= 1 || dirtyRects[0].width <= 1) { + return; + } + // This function is called asynchronously after a reshape which means we have to check + // for what we request. Validate the size. This prevents rendering a texture with the + // wrong size (the look will be deformed) + int newWidth = dirtyRects[0].width; + int newHeight = dirtyRects[0].height; + if (newWidth != _windowSize.x || newHeight != _windowSize.y) { + return; + } + + GLuint sharedTexture; + GLuint memObj; + // Create new texture that we can copy the shared texture into. Unfortunately + // textures are immutable so we have to create a new one + glCreateTextures(GL_TEXTURE_2D, 1, &sharedTexture); + + // Create the memory object handle + glCreateMemoryObjectsEXT(1, &memObj); + + // The size of the texture we get from CEF. The CEF format is CEF_COLOR_TYPE_BGRA_8888 + // It has 4 bytes per pixel. The mem object requires this to be multiplied with 2 + int size = newWidth * newHeight * 8; + + // Cef uses the GL_HANDLE_TYPE_D3D11_IMAGE_EXT handle for their shared texture + // Import the shared texture to the memory object + glImportMemoryWin32HandleEXT( + memObj, size, GL_HANDLE_TYPE_D3D11_IMAGE_EXT, info.shared_texture_handle + ); + + // Allocate immutable storage for the texture for the data from the memory object + // Use GL_RGBA8 since it is 4 bytes + glTextureStorageMem2DEXT(sharedTexture, 1, GL_RGBA8, newWidth, newHeight, memObj, 0); + + // Clean up the temporary allocations + glDeleteTextures(1, &_texture); + + glDeleteMemoryObjectsEXT(1, &memObj); + // Set the updated texture + _texture = sharedTexture; + _needsRepaint = false; +} + void WebRenderHandler::updateTexture() { - if (_needsRepaint) { + if (_acceleratedRendering || _needsRepaint) { return; } @@ -149,16 +233,66 @@ void WebRenderHandler::updateTexture() { } bool WebRenderHandler::hasContent(int x, int y) { - if (_browserBuffer.empty()) { - return false; + if (_acceleratedRendering) { + // To see the alpha value of the pixel we first have to get the texture from the + // GPU. Use a PBO for better performance + bool hasContent = false; + GLuint pbo = 0; + glGenBuffers(1, &pbo); + glBindBuffer(GL_PIXEL_PACK_BUFFER, pbo); + + // Allocate memory for the PBO (width * height * 4 bytes for RGBA) + glBufferData( + GL_PIXEL_PACK_BUFFER, + _windowSize.x * _windowSize.y * 4, + nullptr, + GL_STREAM_READ + ); + + glBindTexture(GL_TEXTURE_2D, _texture); + + // Read the texture data into the PBO + glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); + + // Map the PBO to the CPU memory space + GLubyte* pixels = reinterpret_cast( + glMapBuffer(GL_PIXEL_PACK_BUFFER, GL_READ_ONLY) + ); + + ghoul_assert(pixels, "Could not read pixels from the GPU for the cef gui."); + if (pixels) { + // Access the specific pixel data + int index = (y * _windowSize.x + x) * 4; + if (index < _windowSize.x* _windowSize.y * 4) { + // The alpha value is at the fourth place (rgba) + GLubyte a = pixels[index + 3]; + hasContent = a > 0; + } + } + // Unmap the buffer + glUnmapBuffer(GL_PIXEL_PACK_BUFFER); + + // Unbind and delete the PBO + glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); + glDeleteBuffers(1, &pbo); + return hasContent; + } + else { + if (_browserBuffer.empty()) { + return false; + } + int index = x + _browserBufferSize.x * (_browserBufferSize.y - y - 1); + index = glm::clamp(index, 0, static_cast(_browserBuffer.size() - 1)); + return _browserBuffer[index].a; } - int index = x + _browserBufferSize.x * (_browserBufferSize.y - y - 1); - index = glm::clamp(index, 0, static_cast(_browserBuffer.size() - 1)); - return _browserBuffer[index].a; } bool WebRenderHandler::isTextureReady() const { return !_needsRepaint; } +void WebRenderHandler::bindTexture() { + glBindTexture(GL_TEXTURE_2D, _texture); +} + } // namespace openspace diff --git a/modules/webbrowser/webbrowsermodule.cpp b/modules/webbrowser/webbrowsermodule.cpp index 2e5cadddea..7628edc62a 100644 --- a/modules/webbrowser/webbrowsermodule.cpp +++ b/modules/webbrowser/webbrowsermodule.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include namespace { @@ -225,6 +226,25 @@ bool WebBrowserModule::isEnabled() const { return _enabled; } +bool WebBrowserModule::canUseAcceleratedRendering() { +// Linux doesn't have a problem with the rendering, Apple doesn't support OpenGL 4.5 +#ifdef WIN32 + ghoul::systemcapabilities::Version acceleratedVersion = { + .major = 4, .minor = 5, .release = 0 + }; + auto it = std::find( + OpenGLCap.extensions().begin(), + OpenGLCap.extensions().end(), + "GL_EXT_memory_object_win32" + ); + bool isVersionOk = OpenGLCap.openGLVersion() >= acceleratedVersion; + bool isExtensionsOk = it != OpenGLCap.extensions().end(); + return isVersionOk && isExtensionsOk; +#else + return false; +#endif +} + std::vector WebBrowserModule::documentations() const { return { ScreenSpaceBrowser::Documentation() diff --git a/modules/webbrowser/webbrowsermodule.h b/modules/webbrowser/webbrowsermodule.h index a65a81a2f8..7d595c5497 100644 --- a/modules/webbrowser/webbrowsermodule.h +++ b/modules/webbrowser/webbrowsermodule.h @@ -58,6 +58,8 @@ public: void detachEventHandler(); bool isEnabled() const; + static bool canUseAcceleratedRendering(); + std::vector documentations() const override; protected: diff --git a/src/rendering/screenspacerenderable.cpp b/src/rendering/screenspacerenderable.cpp index c2fc14d38a..422a509fc1 100644 --- a/src/rendering/screenspacerenderable.cpp +++ b/src/rendering/screenspacerenderable.cpp @@ -510,9 +510,7 @@ float ScreenSpaceRenderable::scale() const { return _scale; } -void ScreenSpaceRenderable::createShaders() { - ghoul::Dictionary dict = ghoul::Dictionary(); - +void ScreenSpaceRenderable::createShaders(ghoul::Dictionary dict) { auto res = global::windowDelegate->currentDrawBufferResolution(); ghoul::Dictionary rendererData; rendererData.setValue( @@ -699,7 +697,9 @@ void ScreenSpaceRenderable::draw(const glm::mat4& modelTransform, unbindTexture(); } -void ScreenSpaceRenderable::unbindTexture() {} +void ScreenSpaceRenderable::unbindTexture() { + glBindTexture(GL_TEXTURE_2D, 0); +} glm::vec3 ScreenSpaceRenderable::sanitizeSphericalCoordinates(glm::vec3 spherical) const { const float r = spherical.x; From bf8c2bbe130e24212f7a1ff9d42dc7938b99d0dc Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 23 Aug 2024 10:30:15 +0200 Subject: [PATCH 79/99] Add missing information about color-enhancement for the Viking image --- .../planets/mars/moons/layers/colorlayers/phobos_viking.asset | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_viking.asset b/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_viking.asset index 877033922c..903484d6a3 100644 --- a/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_viking.asset +++ b/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_viking.asset @@ -24,6 +24,9 @@ local Layer = { this affects the appearance only and not the map geometry. This global mosaic has a pixel resolution of five meters per pixel (m). + This image was further color-enhanced based on data from the Mars Reconnaissance + Orbiter: https://www.planetary.org/space-images/color-view-of-phobos-from-mars-reconnaissance-orbiter#:~:text=The%20color%20view%20shows%20that + References: Stooke, P. (2012). Stooke Small Bodies Maps V2.0. MULTI-SA-MULTI-6-STOOKEMAPS-V2.0. NASA Planetary Data System. https://sbn.psi.edu/pds/resource/stookemaps.html From fd586e30a345f4364ab2a112e36a2c0d917eda31 Mon Sep 17 00:00:00 2001 From: Ylva Selling Date: Fri, 23 Aug 2024 16:46:36 +0200 Subject: [PATCH 80/99] Set useAcceleratedRendering flag in skybrowser --- modules/skybrowser/src/screenspaceskybrowser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/skybrowser/src/screenspaceskybrowser.cpp b/modules/skybrowser/src/screenspaceskybrowser.cpp index 388fe3fb6f..16307ebdd7 100644 --- a/modules/skybrowser/src/screenspaceskybrowser.cpp +++ b/modules/skybrowser/src/screenspaceskybrowser.cpp @@ -193,7 +193,10 @@ ScreenSpaceSkyBrowser::~ScreenSpaceSkyBrowser() { bool ScreenSpaceSkyBrowser::initializeGL() { WwtCommunicator::initializeGL(); - ScreenSpaceRenderable::initializeGL(); + // @TODO (ylvse, 2024-08-23) Remove this once the skybrowser has been rewritten + ghoul::Dictionary dict; + dict.setValue("useAcceleratedRendering", false); + createShaders(dict); return true; } From aed2c0b0c8f4f51d154d5ba95fa162d37371fee9 Mon Sep 17 00:00:00 2001 From: Ylva Selling Date: Wed, 28 Aug 2024 10:44:17 +0200 Subject: [PATCH 81/99] Issue/2244 different mouse cursors (#3388) * Update CEF version number * Set OpenSpace_Helper version of C++ to 20 * Update C++ syntax to v 20 * Remove deprecated function (now default) * Set the cache folder for cef * Make static function in webbrowsermodule that determines if we can use accelerated rendering * Add flag for accelerated rendering to webrenderhandler * Use accelerated rendering * Implement function to see if gui should absorb click * Adhere to 80 char linewidth * Make only the UI GPU accelerated * Use dirty rects size for the texture to remove crash * Better comments * Make has content function work for GPU acceleration * Make it so all browsers can be accelerated Tried making it so only the gui was accelerated for simplicity. Performance plummeted, so reverted that * Tidy up * Add accelerated rendering flag to the screenspacerenderable shader * Add temporary fix to make the sky browser work * Remove flag from gui render handler * Enable webgl in a nicer way * Unbind texture in screenspacerenderable * Add better comments for error handling * Tidy up * Address PR comments * Make the acceleration Windows only * Remove unnecessary setting of shader dictionary * Add display handler to browser client * Make glfw change mouse cursor depending on cef cursor * formatting * Add switch to main * Update modules/webbrowser/src/browserclient.cpp Co-authored-by: Alexander Bock * Address comments on PR * Update again * Update modules/webbrowser/src/browserclient.cpp Co-authored-by: Emma Broman * Address PR comments --------- Co-authored-by: Ylva Selling Co-authored-by: Alexander Bock Co-authored-by: Emma Broman --- apps/OpenSpace/main.cpp | 48 +++++++++++++++ include/openspace/engine/windowdelegate.h | 5 ++ modules/webbrowser/include/browserclient.h | 9 +++ modules/webbrowser/include/browserinstance.h | 7 ++- modules/webbrowser/include/webrenderhandler.h | 1 + modules/webbrowser/src/browserclient.cpp | 61 +++++++++++++++++++ 6 files changed, 128 insertions(+), 3 deletions(-) diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index 1528a1c0c8..2f731bede4 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -995,6 +995,54 @@ void setSgctDelegateFunctions() { sgctDelegate.setStatisticsGraphScale = [](float scale) { sgct::Engine::instance().setStatsGraphScale(scale); }; + sgctDelegate.setMouseCursor = [](WindowDelegate::Cursor mouse) { + static std::unordered_map Cursors = { + { + WindowDelegate::Cursor::Arrow, + glfwCreateStandardCursor(GLFW_ARROW_CURSOR) + }, + { + WindowDelegate::Cursor::IBeam, + glfwCreateStandardCursor(GLFW_IBEAM_CURSOR) + }, + { + WindowDelegate::Cursor::CrossHair, + glfwCreateStandardCursor(GLFW_CROSSHAIR_CURSOR) + }, + { + WindowDelegate::Cursor::PointingHand, + glfwCreateStandardCursor(GLFW_POINTING_HAND_CURSOR) + }, + { + WindowDelegate::Cursor::ResizeEW, + glfwCreateStandardCursor(GLFW_RESIZE_EW_CURSOR) + }, + { + WindowDelegate::Cursor::ResizeNS, + glfwCreateStandardCursor(GLFW_RESIZE_NS_CURSOR) + }, + { + WindowDelegate::Cursor::ResizeNWSE, + glfwCreateStandardCursor(GLFW_RESIZE_NWSE_CURSOR) + }, + { + WindowDelegate::Cursor::ResizeNESW, + glfwCreateStandardCursor(GLFW_RESIZE_NESW_CURSOR) + }, + { + WindowDelegate::Cursor::ResizeAll, + glfwCreateStandardCursor(GLFW_RESIZE_ALL_CURSOR) + }, + { + WindowDelegate::Cursor::NotAllowed, + glfwCreateStandardCursor(GLFW_NOT_ALLOWED_CURSOR) + }, + }; + ghoul_assert( + Cursors.find(mouse) != Cursors.end(), "Tried to create non-existent cursor" + ); + glfwSetCursor(glfwGetCurrentContext(), Cursors[mouse]); + }; } std::string setWindowConfigPresetForGui(const std::string& labelFromCfgFile, diff --git a/include/openspace/engine/windowdelegate.h b/include/openspace/engine/windowdelegate.h index f81be481cd..2a44e55528 100644 --- a/include/openspace/engine/windowdelegate.h +++ b/include/openspace/engine/windowdelegate.h @@ -34,6 +34,9 @@ namespace openspace { struct WindowDelegate { enum class Frustum { Mono, LeftEye, RightEye }; + enum class Cursor { Arrow, IBeam, CrossHair, PointingHand, ResizeEW, ResizeNS, + ResizeNWSE, ResizeNESW, ResizeAll, NotAllowed }; + void (*terminate)() = [](){}; void (*setBarrier)(bool enabled) = [](bool) {}; @@ -126,6 +129,8 @@ struct WindowDelegate { [](const glm::vec2&) { return glm::vec2(0); }; void (*setStatisticsGraphScale)(float scale) = [](float) {}; + + void (*setMouseCursor)(Cursor cursor) = [](Cursor) {}; }; } // namespace openspace diff --git a/modules/webbrowser/include/browserclient.h b/modules/webbrowser/include/browserclient.h index 07d1ba459b..ef637f4048 100644 --- a/modules/webbrowser/include/browserclient.h +++ b/modules/webbrowser/include/browserclient.h @@ -51,6 +51,13 @@ public: IMPLEMENT_REFCOUNTING(NoContextMenuHandler); }; + class DisplayHandler : public CefDisplayHandler { + bool OnCursorChange(CefRefPtr browser, + CefCursorHandle cursor, + cef_cursor_type_t type, + const CefCursorInfo& custom_cursor_info) override; + IMPLEMENT_REFCOUNTING(DisplayHandler); + }; BrowserClient(WebRenderHandler* handler, WebKeyboardHandler* keyboardHandler); CefRefPtr GetRenderHandler() override; @@ -58,6 +65,7 @@ public: CefRefPtr GetRequestHandler() override; CefRefPtr GetKeyboardHandler() override; CefRefPtr GetContextMenuHandler() override; + CefRefPtr GetDisplayHandler() override; private: CefRefPtr _renderHandler; @@ -65,6 +73,7 @@ private: CefRefPtr _lifeSpanHandler; CefRefPtr _requestHandler; CefRefPtr _contextMenuHandler; + CefRefPtr _displayHandler; IMPLEMENT_REFCOUNTING(BrowserClient); }; diff --git a/modules/webbrowser/include/browserinstance.h b/modules/webbrowser/include/browserinstance.h index b5a0dfd221..050db97b22 100644 --- a/modules/webbrowser/include/browserinstance.h +++ b/modules/webbrowser/include/browserinstance.h @@ -57,9 +57,10 @@ class WebKeyboardHandler; class BrowserInstance { public: static constexpr int SingleClick = 1; - // @TODO (ylvse 2024-08-20): remove third argument when the sky browser rewrite is done. - // The browser instance should always accelerate the rendering if possible but for - // now the skybrowser is not accelerated. Will be when the rewrite is done. + // @TODO (ylvse 2024-08-20): remove third argument when the sky browser rewrite is + // done. + // The browser instance should always accelerate the rendering if possible but for + // now the skybrowser is not accelerated. Will be when the rewrite is done. BrowserInstance(WebRenderHandler* renderer, WebKeyboardHandler* keyboardHandler, bool accelerateRendering = true diff --git a/modules/webbrowser/include/webrenderhandler.h b/modules/webbrowser/include/webrenderhandler.h index b58044d2ee..6274fce02d 100644 --- a/modules/webbrowser/include/webrenderhandler.h +++ b/modules/webbrowser/include/webrenderhandler.h @@ -37,6 +37,7 @@ #endif // _MSC_VER #include +#include #ifdef _MSC_VER #pragma warning (pop) diff --git a/modules/webbrowser/src/browserclient.cpp b/modules/webbrowser/src/browserclient.cpp index 688a71a449..18d4f69f31 100644 --- a/modules/webbrowser/src/browserclient.cpp +++ b/modules/webbrowser/src/browserclient.cpp @@ -28,6 +28,8 @@ #include #include #include +#include +#include namespace openspace { @@ -43,6 +45,7 @@ BrowserClient::BrowserClient(WebRenderHandler* handler, _lifeSpanHandler = browserLauncher; _requestHandler = browserLauncher; _contextMenuHandler = new BrowserClient::NoContextMenuHandler; + _displayHandler = new BrowserClient::DisplayHandler; } CefRefPtr BrowserClient::GetContextMenuHandler() { @@ -65,6 +68,10 @@ CefRefPtr BrowserClient::GetKeyboardHandler() { return _keyboardHandler; } +CefRefPtr BrowserClient::GetDisplayHandler() { + return _displayHandler; +} + bool BrowserClient::NoContextMenuHandler::RunContextMenu(CefRefPtr, CefRefPtr, CefRefPtr, @@ -75,4 +82,58 @@ bool BrowserClient::NoContextMenuHandler::RunContextMenu(CefRefPtr, return true; } +bool BrowserClient::DisplayHandler::OnCursorChange(CefRefPtr browser, + CefCursorHandle cursor, + cef_cursor_type_t type, + const CefCursorInfo& custom_cursor_info) +{ + WindowDelegate::Cursor newCursor; + switch (type) { + case cef_cursor_type_t::CT_POINTER: + newCursor = WindowDelegate::Cursor::Arrow; + break; + case cef_cursor_type_t::CT_IBEAM: + newCursor = WindowDelegate::Cursor::IBeam; + break; + case cef_cursor_type_t::CT_CROSS: + newCursor = WindowDelegate::Cursor::CrossHair; + break; + case cef_cursor_type_t::CT_HAND: + newCursor = WindowDelegate::Cursor::PointingHand; + break; + case cef_cursor_type_t::CT_EASTWESTRESIZE: + case cef_cursor_type_t::CT_COLUMNRESIZE: + case cef_cursor_type_t::CT_EASTRESIZE: + case cef_cursor_type_t::CT_WESTRESIZE: + newCursor = WindowDelegate::Cursor::ResizeEW; + break; + case cef_cursor_type_t::CT_NORTHSOUTHRESIZE: + case cef_cursor_type_t::CT_ROWRESIZE: + case cef_cursor_type_t::CT_NORTHRESIZE: + case cef_cursor_type_t::CT_SOUTHRESIZE: + newCursor = WindowDelegate::Cursor::ResizeNS; + break; + case cef_cursor_type_t::CT_NORTHWESTSOUTHEASTRESIZE: + case cef_cursor_type_t::CT_SOUTHEASTRESIZE: + case cef_cursor_type_t::CT_NORTHWESTRESIZE: + newCursor = WindowDelegate::Cursor::ResizeNWSE; + break; + case cef_cursor_type_t::CT_NORTHEASTSOUTHWESTRESIZE: + case cef_cursor_type_t::CT_SOUTHWESTRESIZE: + case cef_cursor_type_t::CT_NORTHEASTRESIZE: + newCursor = WindowDelegate::Cursor::ResizeNESW; + break; + case cef_cursor_type_t::CT_MOVE: + newCursor = WindowDelegate::Cursor::ResizeAll; + break; + case cef_cursor_type_t::CT_NOTALLOWED: + newCursor = WindowDelegate::Cursor::NotAllowed; + break; + default: + newCursor = WindowDelegate::Cursor::Arrow; + break; + } + global::windowDelegate->setMouseCursor(newCursor); + return false; +} } // namespace openspace From 16484dc295913d26123f74ab28b2101353a6b127 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 28 Aug 2024 11:50:39 +0200 Subject: [PATCH 82/99] Doxygen cleanup and moving functions in SceneGraphNodes --- apps/OpenSpace/ext/launcher/include/filesystemaccess.h | 2 +- apps/OpenSpace/ext/launcher/include/launcherwindow.h | 4 ++-- .../ext/launcher/include/profile/assettreemodel.h | 8 ++++---- .../ext/launcher/include/profile/cameradialog.h | 4 ++-- .../ext/launcher/include/profile/deltatimesdialog.h | 4 ++-- .../ext/launcher/include/profile/marknodesdialog.h | 4 ++-- .../ext/launcher/include/profile/metadialog.h | 4 ++-- .../ext/launcher/include/profile/modulesdialog.h | 2 +- .../ext/launcher/include/sgctedit/displaywindowunion.h | 6 +++--- ext/ghoul | 2 +- include/openspace/scene/scenegraphnode.h | 7 ++++--- modules/audio/audiomodule.h | 5 +++-- modules/digitaluniverse/digitaluniversemodule.cpp | 2 -- modules/digitaluniverse/digitaluniversemodule.h | 2 -- src/scene/scenegraphnode.cpp | 10 ++-------- 15 files changed, 29 insertions(+), 37 deletions(-) diff --git a/apps/OpenSpace/ext/launcher/include/filesystemaccess.h b/apps/OpenSpace/ext/launcher/include/filesystemaccess.h index 3113335234..5f5d593598 100644 --- a/apps/OpenSpace/ext/launcher/include/filesystemaccess.h +++ b/apps/OpenSpace/ext/launcher/include/filesystemaccess.h @@ -44,7 +44,7 @@ public: bool useCheckboxes); /** - * Function that uses the #QtFileSystemModel class to search the given directory. + * Function that uses the QtFileSystemModel class to search the given directory. * * \param dir The directory from which to start the search from */ diff --git a/apps/OpenSpace/ext/launcher/include/launcherwindow.h b/apps/OpenSpace/ext/launcher/include/launcherwindow.h index 6ea2a689f7..c622fa325f 100644 --- a/apps/OpenSpace/ext/launcher/include/launcherwindow.h +++ b/apps/OpenSpace/ext/launcher/include/launcherwindow.h @@ -51,8 +51,8 @@ public: * \param sgctConfigEnabled `true` if window selection combo box will be enabled * \param sgctConfigName The name of the sgct configuration function used to generate * window config (blank if file is used) - * \param parentItem The parent that contains this (and possibly other) children - * in the tree structure. + * \param parent The parent that contains this (and possibly other) children in the + * tree structure. */ LauncherWindow(bool profileEnabled, const openspace::Configuration& globalConfig, bool sgctConfigEnabled, std::string sgctConfigName, QWidget* parent); diff --git a/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h b/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h index f3317192e5..3e01675759 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h @@ -59,7 +59,7 @@ public: int role = Qt::DisplayRole) const final; /** - * Returns the index of item in #QModelIndex object form. + * Returns the index of item in QModelIndex object form. * * \param row The row number * \param column The column number @@ -116,7 +116,7 @@ public: * Return the Qt flags of the item specified by index, which can include * Qt::ItemIsEnabled, Qt::ItemIsSelectable. * - * \param index The index specified by the #QModelIndex index + * \param index The index specified by the QModelIndex index * \return The Qt flags */ Qt::ItemFlags flags(const QModelIndex& index) const final; @@ -125,7 +125,7 @@ public: * Set data at index \p index. * * \param index Location of the item to set - * \param value The #QVariant data element to store at column \p column + * \param value The QVariant data element to store at column \p column * \param role Qt-specific role to define context of the call * \return `true` if the data set was successful */ @@ -133,7 +133,7 @@ public: int role = Qt::EditRole) final; /** - * Returns a vector of all #Assets selected in the tree view. + * Returns a vector of all #Asset%s selected in the tree view. * * \param outputPaths The vector of paths that were selected * \param outputItems The vector of AssetTreeItem that were selected diff --git a/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h b/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h index 79e20b661e..54fb9cb2b1 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h @@ -41,8 +41,8 @@ public: * Constructor for camera gui class * * \param parent Pointer to parent Qt widget - * \param profile The #openspace::Profile::CameraType object containing all data of - * the new or imported profile + * \param camera The #openspace::Profile::CameraType object containing all data of the + * new or imported profile */ CameraDialog(QWidget* parent, std::optional* camera); diff --git a/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h index d6fd44fa1f..ed5b57e66d 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h @@ -40,8 +40,8 @@ public: * Constructor for deltaTimes class. * * \param parent Pointer to parent Qt widget - * \param profile The list of delta times containing all data of the new or imported - * profile + * \param deltaTimes The list of delta times containing all data of the new or + * imported profile */ DeltaTimesDialog(QWidget* parent, std::vector* deltaTimes); diff --git a/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h index 35e3fff8e0..963631e4f1 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h @@ -39,8 +39,8 @@ public: * Constructor for markNodes class. * * \param parent Pointer to parent Qt widget - * \param profile The list of marked nodes containing all data of the new or imported - * profile + * \param markedNodes The list of marked nodes containing all data of the new or + * imported profile */ MarkNodesDialog(QWidget* parent, std::vector* markedNodes); diff --git a/apps/OpenSpace/ext/launcher/include/profile/metadialog.h b/apps/OpenSpace/ext/launcher/include/profile/metadialog.h index 600d79f399..40d151e978 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/metadialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/metadialog.h @@ -40,8 +40,8 @@ public: * Constructor for meta class. * * \param parent Pointer to parent Qt widget - * \param profile The #openspace::Profile::Meta object containing all data of the - * new or imported profile + * \param meta The #openspace::Profile::Meta object containing all data of the new or + * imported profile */ MetaDialog(QWidget* parent, std::optional* meta); diff --git a/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h index 45b232e97b..14002476b8 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h @@ -42,7 +42,7 @@ public: * Constructor for modules class. * * \param parent Pointer to parent Qt widget - * \param profile The #openspace::Profile::Module object containing all data of the + * \param modules The #openspace::Profile::Module object containing all data of the * new or imported profile */ ModulesDialog(QWidget* parent, std::vector* modules); diff --git a/apps/OpenSpace/ext/launcher/include/sgctedit/displaywindowunion.h b/apps/OpenSpace/ext/launcher/include/sgctedit/displaywindowunion.h index 2d41e61039..19311f452f 100644 --- a/apps/OpenSpace/ext/launcher/include/sgctedit/displaywindowunion.h +++ b/apps/OpenSpace/ext/launcher/include/sgctedit/displaywindowunion.h @@ -45,9 +45,9 @@ public: * each monitor * \param nMaxWindows The maximum number of windows allowed (depends on the number of * monitors in the system) - * \param winColors An array of QColor objects for window colors. The indexing of this - * array matches the window indexing used elsewhere in the class. This allows - * for a unique color for each window + * \param windowColors An array of QColor objects for window colors. The indexing of + * this array matches the window indexing used elsewhere in the class. This + * allows for a unique color for each window * \param resetToDefault If set to true, all display and window settings will be * initialized to their default values * \param parent The parent to which this widget belongs diff --git a/ext/ghoul b/ext/ghoul index e5ebfd2288..47565ecda4 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit e5ebfd228894448ab15e9be9bac9a7ba274c2355 +Subproject commit 47565ecda4877077831b80eb9c16a38ad9f7e18b diff --git a/include/openspace/scene/scenegraphnode.h b/include/openspace/scene/scenegraphnode.h index edb3a9558f..7e35625d82 100644 --- a/include/openspace/scene/scenegraphnode.h +++ b/include/openspace/scene/scenegraphnode.h @@ -90,8 +90,6 @@ public: void deinitialize(); void deinitializeGL(); - void traversePreOrder(const std::function& fn); - void traversePostOrder(const std::function& fn); void update(const UpdateData& data); void render(const RenderData& data, RendererTasks& tasks); @@ -152,6 +150,9 @@ public: static documentation::Documentation Documentation(); private: + void traversePreOrder(const std::function& fn); + void traversePostOrder(const std::function& fn); + glm::dvec3 calculateWorldPosition() const; glm::dmat3 calculateWorldRotation() const; glm::dvec3 calculateWorldScale() const; @@ -179,8 +180,8 @@ private: properties::StringProperty _guiPath; properties::StringProperty _guiDisplayName; properties::StringProperty _guiDescription; - properties::FloatProperty _guiOrderingNumber; properties::BoolProperty _useGuiOrdering; + properties::FloatProperty _guiOrderingNumber; // Transformation defined by translation, rotation and scale struct { diff --git a/modules/audio/audiomodule.h b/modules/audio/audiomodule.h index 7ff817124c..943abfe08e 100644 --- a/modules/audio/audiomodule.h +++ b/modules/audio/audiomodule.h @@ -219,7 +219,8 @@ public: * The \p identifier must be a name for a sound that was started through the * #playAudio3d function. * - * \param handle A valid handle for a track started through the #playAudio3d function + * \param identifier The identifier of a track started through the #playAudio3d + * function * \param position The new position from which the track originates */ void set3dSourcePosition(const std::string& identifier, @@ -272,7 +273,7 @@ public: /** * Sets the position of the speaker for the provided \p channel to the provided - * \position. In general, this is considered an advanced feature to accommodate + * \p position. In general, this is considered an advanced feature to accommodate * non-standard audio environments. * * \param channel The channel whose speaker's position should be changed diff --git a/modules/digitaluniverse/digitaluniversemodule.cpp b/modules/digitaluniverse/digitaluniversemodule.cpp index 03d69f996e..818ef9a7d1 100644 --- a/modules/digitaluniverse/digitaluniversemodule.cpp +++ b/modules/digitaluniverse/digitaluniversemodule.cpp @@ -34,7 +34,6 @@ namespace openspace { ghoul::opengl::ProgramObjectManager DigitalUniverseModule::ProgramObjectManager; -ghoul::opengl::TextureManager DigitalUniverseModule::TextureManager; DigitalUniverseModule::DigitalUniverseModule() : OpenSpaceModule(DigitalUniverseModule::Name) @@ -50,7 +49,6 @@ void DigitalUniverseModule::internalInitialize(const ghoul::Dictionary&) { void DigitalUniverseModule::internalDeinitializeGL() { ProgramObjectManager.releaseAll(ghoul::opengl::ProgramObjectManager::Warnings::Yes); - TextureManager.releaseAll(ghoul::opengl::TextureManager::Warnings::Yes); } std::vector DigitalUniverseModule::documentations() const { diff --git a/modules/digitaluniverse/digitaluniversemodule.h b/modules/digitaluniverse/digitaluniversemodule.h index 51b17d457e..0734edb0f4 100644 --- a/modules/digitaluniverse/digitaluniversemodule.h +++ b/modules/digitaluniverse/digitaluniversemodule.h @@ -28,7 +28,6 @@ #include #include -#include namespace openspace { @@ -41,7 +40,6 @@ public: std::vector documentations() const override; static ghoul::opengl::ProgramObjectManager ProgramObjectManager; - static ghoul::opengl::TextureManager TextureManager; protected: void internalInitialize(const ghoul::Dictionary&) override; diff --git a/src/scene/scenegraphnode.cpp b/src/scene/scenegraphnode.cpp index 55f8064813..e74ea97172 100644 --- a/src/scene/scenegraphnode.cpp +++ b/src/scene/scenegraphnode.cpp @@ -456,9 +456,6 @@ ghoul::mm_unique_ptr SceneGraphNode::createFromDictionary( ghoul_assert(result->_renderable, "Failed to create Renderable"); result->_renderable->_parent = result.get(); result->addPropertySubOwner(result->_renderable.get()); - //LDEBUG(std::format( - // "Successfully created renderable for '{}'", result->identifier() - //)); } // Extracting the actions from the dictionary @@ -512,16 +509,13 @@ ghoul::mm_unique_ptr SceneGraphNode::createFromDictionary( if (std::holds_alternative(*p.tag)) { result->addTag(std::get(*p.tag)); } - else if (std::holds_alternative>(*p.tag)) { + else { for (const std::string& tag : std::get>(*p.tag)) { if (!tag.empty()) { result->addTag(tag); } } } - else { - throw ghoul::MissingCaseException(); - } } LDEBUG(std::format("Successfully created SceneGraphNode '{}'", result->identifier())); @@ -543,8 +537,8 @@ SceneGraphNode::SceneGraphNode() , _guiPath(GuiPathInfo, "/") , _guiDisplayName(GuiNameInfo) , _guiDescription(GuiDescriptionInfo) - , _guiOrderingNumber(GuiOrderInfo, 0.f) , _useGuiOrdering(UseGuiOrderInfo, false) + , _guiOrderingNumber(GuiOrderInfo, 0.f) , _transform { ghoul::mm_unique_ptr( global::memoryManager->PersistentMemory.alloc() From a7c11b4de9cad0241e2b1f055b538a5517530bc6 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Thu, 29 Aug 2024 09:30:33 +0200 Subject: [PATCH 83/99] Make empty dictionary convert into an empty json object and not undefined Fixes a crash in the GUI when no gui order was set, e.g. in the empty profile --- modules/server/src/jsonconverters.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/server/src/jsonconverters.cpp b/modules/server/src/jsonconverters.cpp index 37065ed7f8..174ae80140 100644 --- a/modules/server/src/jsonconverters.cpp +++ b/modules/server/src/jsonconverters.cpp @@ -72,7 +72,7 @@ void to_json(json& j, const PropertyOwner* p) { namespace ghoul { void to_json(json& j, const Dictionary& d) { - json object; + json object = json::object(); for (const std::string_view k : d.keys()) { const std::string key = std::string(k); if (d.hasValue(key)) { From 311c69cc7a5d11fb3efeb674cd0a3a3b8b9f8b56 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Thu, 29 Aug 2024 09:41:58 +0200 Subject: [PATCH 84/99] Update GUI hash For a couple of small fixes. Non-breaking --- 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 f8ae2d62fa..5c2318946f 100644 --- a/data/assets/util/webgui.asset +++ b/data/assets/util/webgui.asset @@ -4,7 +4,7 @@ local guiCustomization = asset.require("customization/gui") -- Select which commit hashes to use for the frontend and backend -local frontendHash = "cb4c80198d15caf410f5f8bb2c310339793d5747" +local frontendHash = "5a58a3ca0215b6dc264e985ab321a75d51e4a8e5" local frontend = asset.resource({ Identifier = "WebGuiFrontend", From ed39d4fc68c18f4ed363308afe0d508fb3b91b9a Mon Sep 17 00:00:00 2001 From: Joakim Kilby Date: Fri, 30 Aug 2024 10:25:38 +0200 Subject: [PATCH 85/99] Add possibility to capture, edit & replay camera-keyframes (#2785) * Add possibility to capture, edit & replay camera-keyframes * fix compilation on non-windows systems * use cbegin/cend instead of std::views * Coding style adaptions * Member variable names * add Keyframe struct, fix pr suggestions * add function to remove keyframes * add lua function to fetch keyframes * Update lua documentation * add constexpr keys for json entries * Add log info messages, input checks and general pr suggestions * update comments to doxygen style * batch of pr suggestions * add jump to keyframe function * update docs --------- Co-authored-by: Alexander Bock Co-authored-by: Alexander Bock Co-authored-by: Andreas Engberg --- include/openspace/engine/globals.h | 2 + .../openspace/interaction/keyframerecording.h | 84 ++++ src/CMakeLists.txt | 3 + src/documentation/core_registration.cpp | 2 + src/engine/globals.cpp | 18 + src/engine/openspaceengine.cpp | 2 + src/interaction/keyframerecording.cpp | 430 ++++++++++++++++++ src/interaction/keyframerecording_lua.inl | 190 ++++++++ 8 files changed, 731 insertions(+) create mode 100644 include/openspace/interaction/keyframerecording.h create mode 100644 src/interaction/keyframerecording.cpp create mode 100644 src/interaction/keyframerecording_lua.inl diff --git a/include/openspace/engine/globals.h b/include/openspace/engine/globals.h index e94c3caeab..df8fa1f578 100644 --- a/include/openspace/engine/globals.h +++ b/include/openspace/engine/globals.h @@ -57,6 +57,7 @@ namespace interaction { class ActionManager; class InteractionMonitor; class KeybindingManager; + class KeyframeRecording; class NavigationHandler; class SessionRecording; } // namespace interaction @@ -93,6 +94,7 @@ inline interaction::InteractionMonitor* interactionMonitor; inline interaction::JoystickInputStates* joystickInputStates; inline interaction::WebsocketInputStates* websocketInputStates; inline interaction::KeybindingManager* keybindingManager; +inline interaction::KeyframeRecording* keyframeRecording; inline interaction::NavigationHandler* navigationHandler; inline interaction::SessionRecording* sessionRecording; inline properties::PropertyOwner* rootPropertyOwner; diff --git a/include/openspace/interaction/keyframerecording.h b/include/openspace/interaction/keyframerecording.h new file mode 100644 index 0000000000..48adef6542 --- /dev/null +++ b/include/openspace/interaction/keyframerecording.h @@ -0,0 +1,84 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2024 * + * * + * 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___KEYFRAMERECORDING___H__ +#define __OPENSPACE_CORE___KEYFRAMERECORDING___H__ + +#include +#include +#include +#include +#include +#include + +namespace openspace::interaction { + +class KeyframeRecording : public properties::PropertyOwner { +public: + struct Keyframe { + struct TimeStamp { + double application; + double sequenceTime; + double simulation; + }; + + KeyframeNavigator::CameraPose camera; + TimeStamp timestamp; + }; + + KeyframeRecording(); + + void newSequence(); + void addKeyframe(double sequenceTime); + void removeKeyframe(int index); + void updateKeyframe(int index); + void moveKeyframe(int index, double sequenceTime); + bool saveSequence(std::optional filename); + void loadSequence(std::string filename); + void preSynchronization(double dt); + void play(); + void pause(); + void setSequenceTime(double sequenceTime); + void jumpToKeyframe(int index); + bool hasKeyframeRecording() const; + std::vector keyframes() const; + + static openspace::scripting::LuaLibrary luaLibrary(); + +private: + void sortKeyframes(); + + Keyframe newKeyframe(double sequenceTime); + bool isInRange(int index) const; + + std::vector _keyframes; + std::string _filename; + bool _isPlaying = false; + bool _hasStateChanged = false; + double _sequenceTime = 0.0; +}; + +} // namespace openspace + +#endif // __OPENSPACE_CORE___KEYFRAMERECORDING___H__ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5ea8e03999..5e7829ba07 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -58,6 +58,8 @@ set(OPENSPACE_SOURCE interaction/joystickcamerastates.cpp interaction/keybindingmanager.cpp interaction/keybindingmanager_lua.inl + interaction/keyframerecording.cpp + interaction/keyframerecording_lua.inl interaction/keyboardinputstate.cpp interaction/mousecamerastates.cpp interaction/scriptcamerastates.cpp @@ -250,6 +252,7 @@ set(OPENSPACE_HEADER ${PROJECT_SOURCE_DIR}/include/openspace/interaction/joystickcamerastates.h ${PROJECT_SOURCE_DIR}/include/openspace/interaction/keybindingmanager.h ${PROJECT_SOURCE_DIR}/include/openspace/interaction/keyboardinputstate.h + ${PROJECT_SOURCE_DIR}/include/openspace/interaction/keyframerecording.h ${PROJECT_SOURCE_DIR}/include/openspace/interaction/mousecamerastates.h ${PROJECT_SOURCE_DIR}/include/openspace/interaction/scriptcamerastates.h ${PROJECT_SOURCE_DIR}/include/openspace/interaction/sessionrecording.h diff --git a/src/documentation/core_registration.cpp b/src/documentation/core_registration.cpp index 3c0138453c..ff209ccca3 100644 --- a/src/documentation/core_registration.cpp +++ b/src/documentation/core_registration.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -106,6 +107,7 @@ void registerCoreClasses(scripting::ScriptEngine& engine) { engine.addLibrary(Time::luaLibrary()); engine.addLibrary(interaction::ActionManager::luaLibrary()); engine.addLibrary(interaction::KeybindingManager::luaLibrary()); + engine.addLibrary(interaction::KeyframeRecording::luaLibrary()); engine.addLibrary(interaction::NavigationHandler::luaLibrary()); engine.addLibrary(interaction::OrbitalNavigator::luaLibrary()); engine.addLibrary(interaction::PathNavigator::luaLibrary()); diff --git a/src/engine/globals.cpp b/src/engine/globals.cpp index 20be3a5305..d9be116dc5 100644 --- a/src/engine/globals.cpp +++ b/src/engine/globals.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -95,6 +96,7 @@ namespace { sizeof(interaction::JoystickInputStates) + sizeof(interaction::WebsocketInputStates) + sizeof(interaction::KeybindingManager) + + sizeof(interaction::KeyframeRecording) + sizeof(interaction::NavigationHandler) + sizeof(interaction::SessionRecording) + sizeof(properties::PropertyOwner) + @@ -314,6 +316,14 @@ void create() { keybindingManager = new interaction::KeybindingManager; #endif // WIN32 +#ifdef WIN32 + keyframeRecording = new (currentPos) interaction::KeyframeRecording; + ghoul_assert(keyframeRecording, "No keyframeRecording"); + currentPos += sizeof(interaction::KeyframeRecording); +#else // ^^^ WIN32 / !WIN32 vvv + keyframeRecording = new interaction::KeyframeRecording; +#endif // WIN32 + #ifdef WIN32 navigationHandler = new (currentPos) interaction::NavigationHandler; ghoul_assert(navigationHandler, "No navigationHandler"); @@ -387,6 +397,7 @@ void initialize() { // New property subowners also have to be added to the ImGuiModule callback! rootPropertyOwner->addPropertySubOwner(global::navigationHandler); + rootPropertyOwner->addPropertySubOwner(global::keyframeRecording); rootPropertyOwner->addPropertySubOwner(global::interactionMonitor); rootPropertyOwner->addPropertySubOwner(global::sessionRecording); rootPropertyOwner->addPropertySubOwner(global::timeManager); @@ -459,6 +470,13 @@ void destroy() { delete navigationHandler; #endif // WIN32 + LDEBUGC("Globals", "Destroying 'KeyframeRecording'"); +#ifdef WIN32 + keyframeRecording->~KeyframeRecording(); +#else // ^^^ WIN32 / !WIN32 vvv + delete keyframeRecording; +#endif // WIN32 + LDEBUGC("Globals", "Destroying 'KeybindingManager'"); #ifdef WIN32 keybindingManager->~KeybindingManager(); diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 17a7e5f5f7..a8aa17ce70 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -1036,6 +1037,7 @@ void OpenSpaceEngine::preSynchronization() { } } global::sessionRecording->preSynchronization(); + global::keyframeRecording->preSynchronization(dt); global::parallelPeer->preSynchronization(); global::interactionMonitor->updateActivityState(); } diff --git a/src/interaction/keyframerecording.cpp b/src/interaction/keyframerecording.cpp new file mode 100644 index 0000000000..bdc3919dc3 --- /dev/null +++ b/src/interaction/keyframerecording.cpp @@ -0,0 +1,430 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2024 * + * * + * 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. * + ****************************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "keyframerecording_lua.inl" + +namespace { + constexpr std::string_view _loggerCat = "KeyframeRecording"; +} // namespace + +namespace openspace::interaction::keys { + // These keys are const char* since nlohmann::json do not support string_view in .at() + constexpr const char* Camera = "camera"; + constexpr const char* Position = "position"; + constexpr const char* Rotation = "rotation"; + constexpr const char* Scale = "scale"; + constexpr const char* FollowFocusNodeRotation = "followFocusNodeRotation"; + constexpr const char* FocusNode = "focusNode"; + + constexpr const char* Timestamp = "timestamp"; + constexpr const char* Application = "application"; + constexpr const char* Sequence = "sequence"; + constexpr const char* Simulation = "simulation"; + constexpr const char* X = "x"; + constexpr const char* Y = "y"; + constexpr const char* Z = "z"; + constexpr const char* W = "w"; +} + +namespace openspace::interaction { + +void to_json(nlohmann::json& j, const KeyframeRecording::Keyframe& keyframe) { + nlohmann::json position = { + { keys::X, keyframe.camera.position.x }, + { keys::Y, keyframe.camera.position.y }, + { keys::Z, keyframe.camera.position.z }, + }; + nlohmann::json rotation = { + { keys::X, keyframe.camera.rotation.x }, + { keys::Y, keyframe.camera.rotation.y }, + { keys::Z, keyframe.camera.rotation.z }, + { keys::W, keyframe.camera.rotation.w }, + }; + nlohmann::json camera = { + { keys::Position, position }, + { keys::Rotation, rotation }, + { keys::Scale, keyframe.camera.scale }, + { keys::FollowFocusNodeRotation, keyframe.camera.followFocusNodeRotation }, + { keys::FocusNode, keyframe.camera.focusNode } + }; + + nlohmann::json timestamp = { + { keys::Application, keyframe.timestamp.application }, + { keys::Sequence, keyframe.timestamp.sequenceTime }, + { keys::Simulation, keyframe.timestamp.simulation } + }; + + j = { + { keys::Camera, camera }, + { keys::Timestamp, timestamp } + }; +} + +void from_json(const nlohmann::json& j, KeyframeRecording::Keyframe::TimeStamp& ts) { + j.at(keys::Application).get_to(ts.application); + j.at(keys::Sequence).get_to(ts.sequenceTime); + j.at(keys::Simulation).get_to(ts.simulation); +} + +void from_json(const nlohmann::json& j, KeyframeNavigator::CameraPose& pose) { + j.at(keys::Position).at(keys::X).get_to(pose.position.x); + j.at(keys::Position).at(keys::Y).get_to(pose.position.y); + j.at(keys::Position).at(keys::Z).get_to(pose.position.z); + + j.at(keys::Rotation).at(keys::X).get_to(pose.rotation.x); + j.at(keys::Rotation).at(keys::Y).get_to(pose.rotation.y); + j.at(keys::Rotation).at(keys::Z).get_to(pose.rotation.z); + j.at(keys::Rotation).at(keys::W).get_to(pose.rotation.w); + + j.at(keys::FocusNode).get_to(pose.focusNode); + j.at(keys::Scale).get_to(pose.scale); + j.at(keys::FollowFocusNodeRotation).get_to(pose.followFocusNodeRotation); +} + +void from_json(const nlohmann::json& j, KeyframeRecording::Keyframe& keyframe) { + j.at(keys::Camera).get_to(keyframe.camera); + j.at(keys::Timestamp).get_to(keyframe.timestamp); +} + +KeyframeRecording::KeyframeRecording() + : properties::PropertyOwner({ "KeyframeRecording", "Keyframe Recording" }) +{} + +void KeyframeRecording::newSequence() { + _keyframes.clear(); + _filename.clear(); + LINFO("Created new sequence"); +} + +void KeyframeRecording::addKeyframe(double sequenceTime) { + ghoul_assert(sequenceTime >= 0, "Sequence time must be positive"); + + Keyframe keyframe = newKeyframe(sequenceTime); + + auto it = std::find_if( + _keyframes.begin(), + _keyframes.end(), + [&sequenceTime](const Keyframe& entry) { + return sequenceTime < entry.timestamp.sequenceTime; + } + ); + _keyframes.insert(it, keyframe); + LINFO(std::format( + "Added new keyframe {} at time: {}", + _keyframes.size() - 1 , sequenceTime + )); +} + +void KeyframeRecording::removeKeyframe(int index) { + ghoul_assert(hasKeyframeRecording(), "Can't remove keyframe on empty sequence"); + + if (!isInRange(index)) { + LERROR(std::format("Index {} out of range", index)); + return; + } + _keyframes.erase(_keyframes.begin() + index); + LINFO(std::format("Removed keyframe with index {}", index)); +} + +void KeyframeRecording::updateKeyframe(int index) { + ghoul_assert(hasKeyframeRecording(), "Can't update keyframe on empty sequence"); + + if (!isInRange(index)) { + LERROR(std::format("Index {} out of range", index)); + return; + } + Keyframe old = _keyframes[index]; + _keyframes[index] = newKeyframe(old.timestamp.sequenceTime); + LINFO(std::format("Update camera position of keyframe {}", index)); +} + +void KeyframeRecording::moveKeyframe(int index, double sequenceTime) { + ghoul_assert(hasKeyframeRecording(), "can't move keyframe on empty sequence"); + ghoul_assert(sequenceTime >= 0, "Sequence time must be positive"); + + if (!isInRange(index)) { + LERROR(std::format("Index {} out of range", index)); + return; + } + double oldSequenceTime = _keyframes[index].timestamp.sequenceTime; + _keyframes[index].timestamp.sequenceTime = sequenceTime; + sortKeyframes(); + LINFO(std::format( + "Moved keyframe {} from sequence time: {} to {}", + index, oldSequenceTime, sequenceTime + )); +} + +bool KeyframeRecording::saveSequence(std::optional filename) { + ghoul_assert(hasKeyframeRecording(), "Keyframe sequence can't be empty"); + + // If we didn't specify any filename we save the one we currently have stored + if (filename.has_value()) { + _filename = filename.value(); + } + + if (_filename.empty()) { + LERROR("Failed to save file, reason: Invalid empty file name"); + return false; + } + + nlohmann::json sequence = _keyframes; + std::filesystem::path path = absPath( + std::format("${{RECORDINGS}}/{}.json", _filename) + ); + std::ofstream ofs(path); + ofs << sequence.dump(2); + LINFO(std::format("Saved keyframe sequence to '{}'", path.string())); + return true; +} + +void KeyframeRecording::loadSequence(std::string filename) { + std::filesystem::path path = absPath( + std::format("${{RECORDINGS}}/{}.json", filename) + ); + if (!std::filesystem::exists(path)) { + LERROR(std::format("File '{}' does not exist", path)); + return; + } + + LINFO(std::format("Loading keyframe sequence from '{}'", path)); + _keyframes.clear(); + std::ifstream file(path); + std::vector jsonKeyframes = + nlohmann::json::parse(file).get>(); + + for (const nlohmann::json& keyframeJson : jsonKeyframes) { + Keyframe keyframe = keyframeJson; + _keyframes.push_back(keyframe); + } + _filename = filename; +} + +void KeyframeRecording::play() { + ghoul_assert(hasKeyframeRecording(), "Keyframe sequence can't be empty"); + + LINFO("Keyframe sequence playing"); + _isPlaying = true; +} + +void KeyframeRecording::pause() { + LINFO("Keyframe sequence paused"); + _isPlaying = false; +} + +void KeyframeRecording::setSequenceTime(double sequenceTime) { + ghoul_assert(sequenceTime >= 0, "Sequence time must be positive"); + + _sequenceTime = sequenceTime; + _hasStateChanged = true; + LINFO(std::format("Set sequence time to {}", sequenceTime)); +} + +void KeyframeRecording::jumpToKeyframe(int index) { + if (!isInRange(index)) { + LERROR(std::format("Index {} out of range", index)); + return; + } + const double time = _keyframes[index].timestamp.sequenceTime; + LINFO(std::format("Jumped to keyframe {}", index)); + setSequenceTime(time); +} + +bool KeyframeRecording::hasKeyframeRecording() const { + return !_keyframes.empty(); +} + +std::vector KeyframeRecording::keyframes() const { + std::vector result; + for (const auto& keyframe : _keyframes) { + ghoul::Dictionary camera; + ghoul::Dictionary timestamp; + ghoul::Dictionary entry; + ghoul::Dictionary position; + ghoul::Dictionary rotation; + + // Add each entry to position & rotation to avoid ambiguity on the client side + position.setValue(keys::X, keyframe.camera.position.x); + position.setValue(keys::Y, keyframe.camera.position.y); + position.setValue(keys::Z, keyframe.camera.position.z); + camera.setValue(keys::Position, position); + + rotation.setValue(keys::X, static_cast(keyframe.camera.rotation.x)); + rotation.setValue(keys::Y, static_cast(keyframe.camera.rotation.y)); + rotation.setValue(keys::Z, static_cast(keyframe.camera.rotation.z)); + rotation.setValue(keys::W, static_cast(keyframe.camera.rotation.w)); + camera.setValue(keys::Rotation, rotation); + + camera.setValue(keys::Scale, static_cast(keyframe.camera.scale)); + camera.setValue(keys::FocusNode, keyframe.camera.focusNode); + camera.setValue(keys::FollowFocusNodeRotation, keyframe.camera.followFocusNodeRotation); + + timestamp.setValue(keys::Application, keyframe.timestamp.application); + timestamp.setValue(keys::Sequence, keyframe.timestamp.sequenceTime); + timestamp.setValue(keys::Simulation, keyframe.timestamp.simulation); + + entry.setValue(keys::Camera, camera); + entry.setValue(keys::Timestamp, timestamp); + result.push_back(entry); + } + return result; +} + +void KeyframeRecording::preSynchronization(double dt) { + if (_hasStateChanged) { + auto it = std::find_if( + _keyframes.rbegin(), + _keyframes.rend(), + [timestamp = _sequenceTime](const Keyframe& entry) { + return timestamp >= entry.timestamp.sequenceTime; + } + ); + + Keyframe currKeyframe; + Keyframe nextKeyframe; + double factor = 0.0; + + // Before first keyframe + if (it == _keyframes.rend()) { + currKeyframe = nextKeyframe = _keyframes.front(); + } + // At or after last keyframe + else if (it == _keyframes.rbegin()) { + currKeyframe = nextKeyframe = _keyframes.back(); + _isPlaying = false; + } + else { + currKeyframe = *it; + nextKeyframe = *(--it); + double t0 = currKeyframe.timestamp.sequenceTime; + double t1 = nextKeyframe.timestamp.sequenceTime; + factor = (_sequenceTime - t0) / (t1 - t0); + } + + interaction::KeyframeNavigator::CameraPose curr = currKeyframe.camera; + interaction::KeyframeNavigator::CameraPose next = nextKeyframe.camera; + + Camera* camera = global::navigationHandler->camera(); + Scene* scene = camera->parent()->scene(); + SceneGraphNode* node = scene->sceneGraphNode(curr.focusNode); + + global::navigationHandler->orbitalNavigator().setFocusNode(node); + bool success = interaction::KeyframeNavigator::updateCamera( + global::navigationHandler->camera(), + curr, + next, + factor, + false + ); + + _hasStateChanged = false; + } + + if (_isPlaying) { + _sequenceTime += dt; + _hasStateChanged = true; + } +} + +scripting::LuaLibrary KeyframeRecording::luaLibrary() { + return { + "keyframeRecording", + { + codegen::lua::NewSequence, + codegen::lua::AddKeyframe, + codegen::lua::RemoveKeyframe, + codegen::lua::UpdateKeyframe, + codegen::lua::MoveKeyframe, + codegen::lua::SaveSequence, + codegen::lua::LoadSequence, + codegen::lua::Play, + codegen::lua::Pause, + codegen::lua::Resume, + codegen::lua::SetTime, + codegen::lua::JumpToKeyframe, + codegen::lua::HasKeyframeRecording, + codegen::lua::Keyframes + } + }; +} + +void KeyframeRecording::sortKeyframes() { + std::sort( + _keyframes.begin(), + _keyframes.end(), + [](Keyframe lhs, Keyframe rhs) { + return lhs.timestamp.sequenceTime < rhs.timestamp.sequenceTime; + } + ); +} + +KeyframeRecording::Keyframe KeyframeRecording::newKeyframe(double sequenceTime) { + interaction::NavigationHandler& handler = *global::navigationHandler; + interaction::OrbitalNavigator& navigator = handler.orbitalNavigator(); + const SceneGraphNode* node = navigator.anchorNode(); + + glm::dvec3 position = navigator.anchorNodeToCameraVector(); + glm::dquat rotation = handler.camera()->rotationQuaternion(); + float scale = handler.camera()->scaling(); + bool followNodeRotation = navigator.followingAnchorRotation(); + + if (followNodeRotation) { + position = glm::inverse(node->worldRotationMatrix()) * position; + rotation = navigator.anchorNodeToCameraRotation(); + } + + Keyframe keyframe; + keyframe.camera.position = position; + keyframe.camera.rotation = rotation; + keyframe.camera.focusNode = navigator.anchorNode()->identifier(); + keyframe.camera.scale = scale; + keyframe.camera.followFocusNodeRotation = followNodeRotation; + + keyframe.timestamp.application = global::windowDelegate->applicationTime(); + keyframe.timestamp.sequenceTime = sequenceTime; + keyframe.timestamp.simulation = global::timeManager->time().j2000Seconds(); + + return keyframe; +} + +bool KeyframeRecording::isInRange(int index) const { + return index >= 0 && index < _keyframes.size(); +} + +} // namespace openspace::interaction diff --git a/src/interaction/keyframerecording_lua.inl b/src/interaction/keyframerecording_lua.inl new file mode 100644 index 0000000000..94c8e37378 --- /dev/null +++ b/src/interaction/keyframerecording_lua.inl @@ -0,0 +1,190 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2024 * + * * + * 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. * + ****************************************************************************************/ + +#include +#include + +namespace { + +/** + * Starts a new sequence of keyframes. Any previously loaded sequence is discarded. + */ +[[codegen::luawrap]] void newSequence() { + openspace::global::keyframeRecording->newSequence(); +} + +/** + * Adds a keyframe at the specified time in the sequence. + * + * \param sequenceTime The time at which to add the new keyframe in the sequence given in + * seconds + */ +[[codegen::luawrap]] void addKeyframe(double sequenceTime) { + if (sequenceTime < 0) { + throw ghoul::lua::LuaError("Error can't add keyframe with negative time value"); + } + openspace::global::keyframeRecording->addKeyframe(sequenceTime); +} + +/** + * Removes a keyframe at the specified index. + * + * \param index The 0-based index of the keyframe to remove + */ +[[codegen::luawrap]] void removeKeyframe(int index) { + if (!openspace::global::keyframeRecording->hasKeyframeRecording()) { + throw ghoul::lua::LuaError("Can't remove keyframe on empty sequence"); + } + if (index < 0) { + throw ghoul::lua::LuaError("Index value must be positive"); + } + openspace::global::keyframeRecording->removeKeyframe(index); +} + +/** + * Update the camera position of a keyframe at the specified index. + * + * \param index The 0-based index of the keyframe to update + */ +[[codegen::luawrap]] void updateKeyframe(int index) { + if (!openspace::global::keyframeRecording->hasKeyframeRecording()) { + throw ghoul::lua::LuaError("Can't update keyframe on empty sequence"); + } + if (index < 0) { + throw ghoul::lua::LuaError("Index value must be positive"); + } + openspace::global::keyframeRecording->updateKeyframe(index); +} + +/** + * Move an existing keyframe in time. + * + * \param index The index of the keyframe to move + * \param sequenceTime The new time in seconds to update the keyframe to + */ +[[codegen::luawrap]] void moveKeyframe(int index, double sequenceTime) { + if (!openspace::global::keyframeRecording->hasKeyframeRecording()) { + throw ghoul::lua::LuaError("Can't move keyframe on empty sequence"); + } + if (index < 0) { + throw ghoul::lua::LuaError("Index value must be positive"); + } + if (sequenceTime < 0) { + throw ghoul::lua::LuaError("Error can't add keyframe with negative time value"); + } + openspace::global::keyframeRecording->moveKeyframe(index, sequenceTime); +} + +/** + * Saves the current sequence of keyframes to disk by the optionally specified `filename`. + * `filename` can be omitted if the sequence was previously saved or loaded from file. + * + * \param filename The name of the file to save + */ +[[codegen::luawrap]] void saveSequence(std::optional filename) { + if (!openspace::global::keyframeRecording->hasKeyframeRecording()) { + throw ghoul::lua::LuaError("No keyframe sequence to save"); + } + openspace::global::keyframeRecording->saveSequence(filename); +} + +/** + * Loads a keyframe recording sequence from the specified file. + * + * \param filename The name of the file to load + */ +[[codegen::luawrap]] void loadSequence(std::string filename) { + openspace::global::keyframeRecording->loadSequence(std::move(filename)); +} + +/** + * Playback keyframe recording sequence optionally from the specified `sequenceTime` or if + * not specified starts playing from the beginning. + * + * \param sequenceTime The time in seconds at which to start playing the sequence. If + * omitted, the playback starts at the beginning of the sequence. + */ +[[codegen::luawrap]] void play(std::optional sequenceTime) { + if (!openspace::global::keyframeRecording->hasKeyframeRecording()) { + throw ghoul::lua::LuaError("No keyframe sequence to play"); + } + openspace::global::keyframeRecording->setSequenceTime(sequenceTime.value_or(0.0)); + openspace::global::keyframeRecording->play(); +} + +/** + * Pauses a playing keyframe recording sequence. + */ +[[codegen::luawrap]] void pause() { + openspace::global::keyframeRecording->pause(); +} + +/** + * Resume playing a keyframe recording sequence that has been paused. + */ +[[codegen::luawrap]] void resume() { + openspace::global::keyframeRecording->play(); +} + +/** + * Jumps to a specified time within the keyframe recording sequence. + * + * \param sequenceTime The time in seconds to jump to + */ +[[codegen::luawrap]] void setTime(double sequenceTime) { + if (sequenceTime < 0) { + throw ghoul::lua::LuaError("Sequence time must be greater or equal than 0"); + } + openspace::global::keyframeRecording->setSequenceTime(sequenceTime); +} + +/** + * Jumps to a specified keyframe within the keyframe recording sequence. + * + * \param index The index of the keyframe to jump to + */ +[[codegen::luawrap]] void jumpToKeyframe(int index) { + if (index < 0) { + throw ghoul::lua::LuaError("Index must be positive"); + } + openspace::global::keyframeRecording->jumpToKeyframe(index); +} + +/** + * Returns true if there currently is a sequence loaded, otherwise false. + */ +[[codegen::luawrap]] bool hasKeyframeRecording() { + return openspace::global::keyframeRecording->hasKeyframeRecording(); +} + +/** + * Fetches the sequence keyframes as a JSON object. + */ +[[codegen::luawrap]] std::vector keyframes() { + return openspace::global::keyframeRecording->keyframes(); +} + +#include "keyframerecording_lua_codegen.cpp" + +} // namespace From ddbf155e8b47623f25951af468eb6b189b5889ce Mon Sep 17 00:00:00 2001 From: Andreas Engberg Date: Wed, 4 Sep 2024 09:21:59 +0200 Subject: [PATCH 86/99] fixed return type to tuple --- modules/space/scripts/spice.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/space/scripts/spice.lua b/modules/space/scripts/spice.lua index 09c12aa05d..cd326b588e 100644 --- a/modules/space/scripts/spice.lua +++ b/modules/space/scripts/spice.lua @@ -4,7 +4,7 @@ openspace.space.documentation = { Arguments = { { "tlePath", "String" } }, - Return = "{ Translation, SpiceKernel }", + Return = "( Translation, SpiceKernel )", Documentation = [[ Takes the provided TLE file, converts it into a SPICE kernel and returns a SpiceTranslation instance that can be used to access the information in the TLE From fd64fe7c9658899ef7db6a74d883e868f6913333 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 9 Sep 2024 21:16:57 +0200 Subject: [PATCH 87/99] Improvements to the ScriptLog logging (#3389) * Restructuring the queueScript function * Don't log the contents of actions that are triggered. Add the ability to do verbose logging in the scriptlog --- include/openspace/engine/configuration.h | 1 + include/openspace/interaction/actionmanager.h | 4 +- include/openspace/scripting/scriptengine.h | 59 ++++-- .../renderableinterpolatedpoints.cpp | 10 +- modules/debugging/debuggingmodule_lua.inl | 39 ++-- modules/exoplanets/exoplanetsmodule_lua.inl | 20 +- .../src/geojson/geojsoncomponent.cpp | 22 +-- modules/imgui/src/guiactioncomponent.cpp | 6 +- modules/imgui/src/guigibscomponent.cpp | 6 +- .../imgui/src/guiglobebrowsingcomponent.cpp | 19 +- modules/imgui/src/guispacetimecomponent.cpp | 181 ++++++------------ modules/imgui/src/renderproperties.cpp | 4 +- modules/iswa/rendering/iswacygnet.cpp | 12 +- modules/iswa/rendering/iswakameleongroup.cpp | 14 +- modules/iswa/rendering/kameleonplane.cpp | 7 +- modules/iswa/rendering/screenspacecygnet.cpp | 7 +- modules/iswa/util/iswamanager.cpp | 31 +-- modules/iswa/util/iswamanager_lua.inl | 14 +- .../src/topics/flightcontrollertopic.cpp | 6 +- modules/server/src/topics/luascripttopic.cpp | 16 +- .../server/src/topics/setpropertytopic.cpp | 11 +- .../src/topics/triggerpropertytopic.cpp | 9 +- modules/skybrowser/skybrowsermodule.cpp | 21 +- modules/skybrowser/skybrowsermodule_lua.inl | 74 +++---- modules/skybrowser/src/targetbrowserpair.cpp | 12 +- modules/statemachine/src/state.cpp | 12 +- modules/statemachine/src/transition.cpp | 6 +- openspace.cfg | 1 + src/engine/configuration.cpp | 10 + src/engine/openspaceengine.cpp | 36 +--- src/interaction/actionmanager.cpp | 23 +-- src/interaction/joystickcamerastates.cpp | 22 ++- src/interaction/keybindingmanager.cpp | 3 +- src/interaction/sessionrecording.cpp | 6 +- src/navigation/navigationhandler.cpp | 10 +- src/navigation/pathnavigator.cpp | 16 +- src/network/parallelpeer.cpp | 10 +- src/rendering/luaconsole.cpp | 11 +- src/rendering/renderengine.cpp | 18 +- src/rendering/screenspacerenderable.cpp | 10 +- src/scene/scene.cpp | 11 +- src/scripting/scriptengine.cpp | 120 +++++------- src/scripting/scriptscheduler.cpp | 6 +- 43 files changed, 365 insertions(+), 571 deletions(-) diff --git a/include/openspace/engine/configuration.h b/include/openspace/engine/configuration.h index 2c6a624001..537872502e 100644 --- a/include/openspace/engine/configuration.h +++ b/include/openspace/engine/configuration.h @@ -78,6 +78,7 @@ struct Configuration { Logging logging; std::string scriptLog; + bool verboseScriptLog = false; int scriptLogRotation = 3; struct DocumentationInfo { diff --git a/include/openspace/interaction/actionmanager.h b/include/openspace/interaction/actionmanager.h index b8c37637ad..009ba8f8f3 100644 --- a/include/openspace/interaction/actionmanager.h +++ b/include/openspace/interaction/actionmanager.h @@ -36,6 +36,7 @@ namespace openspace::interaction { class ActionManager { public: BooleanType(ShouldBeSynchronized); + BooleanType(ShouldBeLogged); bool hasAction(const std::string& identifier) const; void registerAction(Action action); @@ -44,7 +45,8 @@ public: std::vector actions() const; void triggerAction(const std::string& identifier, const ghoul::Dictionary& arguments, - ShouldBeSynchronized shouldBeSynchronized) const; + ShouldBeSynchronized shouldBeSynchronized, + ShouldBeLogged shouldBeLogged = ShouldBeLogged::No) const; static scripting::LuaLibrary luaLibrary(); private: diff --git a/include/openspace/scripting/scriptengine.h b/include/openspace/scripting/scriptengine.h index ff6c37e976..7ad56ca38a 100644 --- a/include/openspace/scripting/scriptengine.h +++ b/include/openspace/scripting/scriptengine.h @@ -41,23 +41,42 @@ namespace openspace::scripting { /** * The ScriptEngine is responsible for handling the execution of custom Lua functions and - * executing scripts (#runScript and #runScriptFile). Before usage, it has to be - * #initialize%d and #deinitialize%d. New ScriptEngine::Library%s consisting of - * Library::Function%s have to be added which can then be called using the - * `openspace` namespace prefix in Lua. The same functions can be exposed to other Lua - * states by passing them to the #initializeLuaState method. + * executing scripts (#runScript). Before usage, it has to be #initialize%d and + * #deinitialize%d. New ScriptEngine::Library%s consisting of Library::Function%s have to + * be added which can then be called using the `openspace` namespace prefix in Lua. The + * same functions can be exposed to other Lua states by passing them to the + * #initializeLuaState method. */ class ScriptEngine : public Syncable { public: - using ScriptCallback = std::function; - BooleanType(ShouldBeSynchronized); - BooleanType(ShouldSendToRemote); + struct Script { + BooleanType(ShouldBeSynchronized); + BooleanType(ShouldSendToRemote); + BooleanType(ShouldBeLogged); + using Callback = std::function; - struct QueueItem { - std::string script; - ShouldBeSynchronized shouldBeSynchronized; - ShouldSendToRemote shouldSendToRemote; - ScriptCallback callback; + /// The Lua script that should be executed + std::string code; + + /// Determines whether a script should be sent to computers that are in the same + /// _cluster_ as the master machine that the user is interacting with. These are + /// usually different computers that tile a bigger display area and that need to + /// be tightly locked + ShouldBeSynchronized synchronized = ShouldBeSynchronized::Yes; + + /// Determines whether a script should be send to a distant OpenSpace instance + /// that is not part of the same cluster. This is used in the ParallelConnection + /// feature that can connect OpenSpace instances in a connection that does not + /// require instantaneous synchronization + ShouldSendToRemote sendToRemote = ShouldSendToRemote::Yes; + + /// Determines whether the script should be logged to a local script log file. + /// Note that this might be overwritten if the user requested a verbose log file + ShouldBeLogged addToLog = ShouldBeLogged::Yes; + + /// A callback that will be called when the script finishes executing and that + /// provides access to the return value of the script + Callback callback; }; static constexpr std::string_view OpenSpaceLibraryName = "openspace"; @@ -83,18 +102,14 @@ public: void addLibrary(LuaLibrary library); bool hasLibrary(const std::string& name); - bool runScript(const std::string& script, - const ScriptCallback& callback = ScriptCallback()); - bool runScriptFile(const std::filesystem::path& filename); virtual void preSync(bool isMaster) override; virtual void encode(SyncBuffer* syncBuffer) override; virtual void decode(SyncBuffer* syncBuffer) override; virtual void postSync(bool isMaster) override; - void queueScript(std::string script, ShouldBeSynchronized shouldBeSynchronized, - ShouldSendToRemote shouldSendToRemote, - ScriptCallback callback = ScriptCallback()); + void queueScript(Script script); + void queueScript(std::string script); std::vector allLuaFunctions() const; const std::vector& allLuaLibraries() const; @@ -111,16 +126,18 @@ private: void addBaseLibrary(); + bool runScript(const Script& script); + ghoul::lua::LuaState _state; std::vector _registeredLibraries; - std::queue _incomingScripts; + std::queue