mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-09 06:48:35 -05:00
Merge branch 'master' into feature/jwst-spice-update
This commit is contained in:
89
data/assets/actions/planets/mars_layers.asset
Normal file
89
data/assets/actions/planets/mars_layers.asset
Normal file
@@ -0,0 +1,89 @@
|
||||
local ctx_enable_action = {
|
||||
Identifier = "os.mars.ctx.fadein",
|
||||
Name = "Fade in CTX",
|
||||
Command = [[
|
||||
openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.ColorLayers.CTX_blended_01.Enabled", true)
|
||||
openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.ColorLayers.CTX_blended_01.Settings.Opacity", 0)
|
||||
openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.ColorLayers.CTX_blended_01.Settings.Opacity", 1, 2.0)]],
|
||||
Documentation = "Enables and fades in CTX layer for Mars",
|
||||
GuiPath = "/Solar System/Mars",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("ctx_enable_action", ctx_enable_action.Identifier)
|
||||
|
||||
local ctx_disable_action = {
|
||||
Identifier = "os.mars.ctx.fadedout",
|
||||
Name = "Fade out CTX Layer",
|
||||
Command = [[openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.ColorLayers.CTX_blended_01.Settings.Opacity", 0, 2.0)]],
|
||||
Documentation = "Fade out CTX",
|
||||
GuiPath = "/Solar System/Mars",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("ctx_disable_action", ctx_disable_action.Identifier)
|
||||
|
||||
local hirise_enable_action = {
|
||||
Identifier = "os.mars.hirise.fadein",
|
||||
Name = "Fade in HiRISE",
|
||||
Command = [[
|
||||
openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-PSP.Enabled", true)
|
||||
openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-PSP.Settings.Opacity", 0)
|
||||
openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-PSP.Settings.Opacity", 1, 2.0)]],
|
||||
Documentation = "Enables and fades in HiRise layer for Mars",
|
||||
GuiPath = "/Solar System/Mars",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("hirise_enable_action", hirise_enable_action.Identifier)
|
||||
|
||||
local hirise_disable_action = {
|
||||
Identifier = "os.mars.hirise.fadedout",
|
||||
Name = "Fade out HiRISE",
|
||||
Command = [[openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-PSP.Settings.Opacity", 0, 2.0)]],
|
||||
Documentation = "Fade out HiRISE layer for Mars",
|
||||
GuiPath = "/Solar System/Mars",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("hirise_disable_action", hirise_disable_action.Identifier)
|
||||
|
||||
local lshirise_enable_action = {
|
||||
Identifier = "os.mars.lshirise.fadein",
|
||||
Name = "Fade in HiRISE Local Set",
|
||||
Command = [[
|
||||
openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled", true)
|
||||
openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled", true)
|
||||
openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Settings.Opacity", 0)
|
||||
openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Settings.Opacity", 1, 2.0)]],
|
||||
Documentation = "Enables and fades in HiRise local set layers for Mars (including height)",
|
||||
GuiPath = "/Solar System/Mars",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("lshirise_enable_action", lshirise_enable_action.Identifier)
|
||||
|
||||
local lshirise_disable_action = {
|
||||
Identifier = "os.mars.lshirise.fadedout",
|
||||
Name = "Fade out HiRISE Local Set",
|
||||
Command = [[openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Settings.Opacity", 0, 2.0)
|
||||
openspace.setPropertyValueSingle("Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled", false)]],
|
||||
Documentation = "Fade out HiRISE local set layer for Mars",
|
||||
GuiPath = "/Solar System/Mars",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("lshirise_disable_action", lshirise_disable_action.Identifier)
|
||||
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.action.registerAction(ctx_enable_action)
|
||||
openspace.action.registerAction(ctx_disable_action)
|
||||
openspace.action.registerAction(hirise_enable_action)
|
||||
openspace.action.registerAction(hirise_disable_action)
|
||||
openspace.action.registerAction(lshirise_enable_action)
|
||||
openspace.action.registerAction(lshirise_disable_action)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.action.removeAction(lshirise_disable_action)
|
||||
openspace.action.removeAction(lshirise_enable_action)
|
||||
openspace.action.removeAction(hirise_disable_action)
|
||||
openspace.action.removeAction(hirise_enable_action)
|
||||
openspace.action.removeAction(ctx_disable_action)
|
||||
openspace.action.removeAction(ctx_enable_action)
|
||||
end)
|
||||
126
data/assets/actions/planets/planet_lighting.asset
Normal file
126
data/assets/actions/planets/planet_lighting.asset
Normal file
@@ -0,0 +1,126 @@
|
||||
local function getIlluminationCommand(node, global)
|
||||
local commandString = "local node = \"" .. node .. "\"\n"
|
||||
if (node == "Current Focus") then
|
||||
commandString = "local node = openspace.navigation.getNavigationState().Anchor\n"
|
||||
end
|
||||
if (global) then
|
||||
commandString = commandString .. [[
|
||||
if (openspace.hasProperty("Scene."..node..".Renderable.UseAccurateNormals")) then
|
||||
local list = openspace.getProperty("Scene." .. node .. ".Renderable.Layers.NightLayers.*.Enabled")
|
||||
if (#list > 0) then
|
||||
openspace.setPropertyValue("Scene." .. node .. ".Renderable.Layers.NightLayers.*.Enabled", false)
|
||||
else
|
||||
openspace.setPropertyValueSingle("Scene." .. node .. ".Renderable.PerformShading", false)
|
||||
end
|
||||
if openspace.hasSceneGraphNode(node .. "Atmosphere") then
|
||||
openspace.setPropertyValueSingle("Scene." .. node .. "Atmosphere.Renderable.SunFollowingCamera", true)
|
||||
end
|
||||
if openspace.hasProperty("Scene." .. node .. ".Renderable.ShadowsComponent.DistanceFraction") then
|
||||
openspace.setPropertyValueSingle("Scene." .. node .. ".Renderable.ShadowsComponent.DistanceFraction", 3000)
|
||||
end
|
||||
else
|
||||
openspace.printWarning("Illumination action only available for globes")
|
||||
end]]
|
||||
else
|
||||
--todo @micahnyc this 40 wont do once we have more rings
|
||||
commandString = commandString .. [[if (openspace.hasProperty("Scene."..node..".Renderable.UseAccurateNormals")) then
|
||||
local list = openspace.getProperty("Scene." .. node .. ".Renderable.Layers.NightLayers.*.Enabled")
|
||||
if (#list > 0) then
|
||||
openspace.setPropertyValue(list[1], true)
|
||||
else
|
||||
openspace.setPropertyValueSingle("Scene." .. node .. ".Renderable.PerformShading", true)
|
||||
end
|
||||
if openspace.hasSceneGraphNode(node .. "Atmosphere") then
|
||||
openspace.setPropertyValueSingle("Scene." .. node .. "Atmosphere.Renderable.SunFollowingCamera", false)
|
||||
end
|
||||
if openspace.hasProperty("Scene." .. node .. ".Renderable.ShadowsComponent.DistanceFraction") then
|
||||
openspace.setPropertyValueSingle("Scene." .. node .. ".Renderable.ShadowsComponent.DistanceFraction", 40)
|
||||
end
|
||||
else
|
||||
openspace.printWarning("Illumination action only available for globes")
|
||||
end]]
|
||||
end
|
||||
return commandString
|
||||
end
|
||||
|
||||
local function getIlluminationAction(node, global)
|
||||
local actionString = "_standard_illumination"
|
||||
local actionName = "Standard Illumination"
|
||||
local actionCommand = getIlluminationCommand(node, global)
|
||||
if (global) then
|
||||
actionString = "_global_illumination"
|
||||
actionName = "Global Illumination"
|
||||
actionCommand = getIlluminationCommand(node, global)
|
||||
end
|
||||
|
||||
local action = {
|
||||
Identifier = "os." .. string.gsub(node, "%s+", "") .. actionString,
|
||||
Name = node .. " " .. actionName,
|
||||
Command = actionCommand,
|
||||
Documentation = "Enables " .. string.lower(actionName) .. " for" .. node,
|
||||
GuiPath = "/Solar System/" .. node,
|
||||
IsLocal = true
|
||||
}
|
||||
return action
|
||||
end
|
||||
|
||||
local current_focus_global = getIlluminationAction("Current Focus", true)
|
||||
asset.export("current_focus_global", current_focus_global.Identifier)
|
||||
local current_focus_standard = getIlluminationAction("Current Focus", false)
|
||||
asset.export("current_focus_standard", current_focus_standard.Identifier)
|
||||
|
||||
local earth_global = getIlluminationAction("Earth", true)
|
||||
asset.export("earth_global", earth_global.Identifier)
|
||||
local earth_standard = getIlluminationAction("Earth", false)
|
||||
asset.export("earth_standard", earth_standard.Identifier)
|
||||
|
||||
local mars_global = getIlluminationAction("Mars", true)
|
||||
asset.export("mars_global", mars_global.Identifier)
|
||||
local mars_standard = getIlluminationAction("Mars", false)
|
||||
asset.export("mars_standard", mars_standard.Identifier)
|
||||
|
||||
local venus_global = getIlluminationAction("Venus", true)
|
||||
asset.export("venus_global", venus_global.Identifier)
|
||||
local venus_standard = getIlluminationAction("Venus", false)
|
||||
asset.export("venus_standard", venus_standard.Identifier)
|
||||
|
||||
local titan_global = getIlluminationAction("Titan", true)
|
||||
asset.export("titan_global", titan_global.Identifier)
|
||||
local titan_standard = getIlluminationAction("Titan", false)
|
||||
asset.export("titan_standard", titan_standard.Identifier)
|
||||
|
||||
local saturn_global = getIlluminationAction("Saturn", true)
|
||||
asset.export("saturn_global", saturn_global.Identifier)
|
||||
local saturn_standard = getIlluminationAction("Saturn", false)
|
||||
asset.export("titan_standard", saturn_standard.Identifier)
|
||||
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.action.registerAction(current_focus_global)
|
||||
openspace.action.registerAction(current_focus_standard)
|
||||
openspace.action.registerAction(earth_global)
|
||||
openspace.action.registerAction(earth_standard)
|
||||
openspace.action.registerAction(mars_global)
|
||||
openspace.action.registerAction(mars_standard)
|
||||
openspace.action.registerAction(venus_global)
|
||||
openspace.action.registerAction(venus_standard)
|
||||
openspace.action.registerAction(titan_global)
|
||||
openspace.action.registerAction(titan_standard)
|
||||
openspace.action.registerAction(saturn_global)
|
||||
openspace.action.registerAction(saturn_standard)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.action.removeAction(saturn_standard)
|
||||
openspace.action.removeAction(saturn_global)
|
||||
openspace.action.removeAction(titan_standard)
|
||||
openspace.action.removeAction(titan_global)
|
||||
openspace.action.removeAction(venus_standard)
|
||||
openspace.action.removeAction(venus_global)
|
||||
openspace.action.removeAction(mars_standard)
|
||||
openspace.action.removeAction(mars_global)
|
||||
openspace.action.removeAction(earth_standard)
|
||||
openspace.action.removeAction(earth_global)
|
||||
openspace.action.removeAction(current_focus_standard)
|
||||
openspace.action.removeAction(current_focus_global)
|
||||
end)
|
||||
127
data/assets/actions/planets/scale_planets_and_moons.asset
Normal file
127
data/assets/actions/planets/scale_planets_and_moons.asset
Normal file
@@ -0,0 +1,127 @@
|
||||
local function getScaleCommand(identifier, scale, speed)
|
||||
local command = 'openspace.setPropertyValue("' .. identifier .. '.Scale.Scale", '
|
||||
command = command .. scale .. ", " .. speed
|
||||
if (scale == 1) then
|
||||
command = command .. ")"
|
||||
else
|
||||
command = command .. ', "CubicEaseOut")'
|
||||
end
|
||||
return command
|
||||
end
|
||||
|
||||
local function getScaleAction(identifier, scale, name, speed)
|
||||
local actionString = "Grow"
|
||||
if (scale == 1) then
|
||||
actionString = "Shrink"
|
||||
end
|
||||
local action = {
|
||||
Identifier = "os." .. actionString .. "_" .. identifier,
|
||||
Name = actionString .. " " .. name,
|
||||
Command = getScaleCommand(identifier, scale, speed),
|
||||
Documentation = "Scales " .. name .. " to " .. scale .. "x",
|
||||
GuiPath = "/Solar System/Scale",
|
||||
IsLocal = true
|
||||
}
|
||||
return action
|
||||
end
|
||||
|
||||
local function getToggleScaleAction(identifier, scale, name, speedup, speedown)
|
||||
local action = {
|
||||
Identifier = "os.toggle_" .. string.gsub(name, "%s+", "") .. "_scale",
|
||||
Name = "Toggle " .. name .. " Scale",
|
||||
Command = [[
|
||||
local list = openspace.getProperty("]] .. identifier .. [[.Scale.Scale");
|
||||
if #list == 0 then
|
||||
openspace.printWarning("No planets to resize");
|
||||
else
|
||||
local prop = list[1];
|
||||
local currentScale = openspace.getPropertyValue(prop);
|
||||
local newScale = 1;
|
||||
if (currentScale == 1) then
|
||||
]] .. getScaleCommand(identifier, scale, speedup) .. [[
|
||||
else
|
||||
]] .. getScaleCommand(identifier, 1, speedown) .. [[
|
||||
end
|
||||
end
|
||||
]],
|
||||
GuiPath = "/Solar System/Scale",
|
||||
Documentation = "Toggle the scale of " .. name,
|
||||
IsLocal = true
|
||||
}
|
||||
return action
|
||||
end
|
||||
|
||||
local grow_planets = getScaleAction("{planet_solarSystem}", 3400, "Planets", 3)
|
||||
asset.export("grow_planets", grow_planets.Identifier)
|
||||
local shrink_planets = getScaleAction("{planet_solarSystem}", 1, "Planets", 2)
|
||||
asset.export("shrink_planets", shrink_planets.Identifier)
|
||||
local toggle_planet_scale = getToggleScaleAction("{planet_solarSystem}", 3400, "Planets", 3, 2)
|
||||
asset.export("toggle_planet_scale", toggle_planet_scale.Identifier)
|
||||
|
||||
local grow_inner_planets = getScaleAction("{planet_terrestrial}", 3400, "Inner Planets", 3)
|
||||
asset.export("grow_inner_planets", grow_inner_planets.Identifier)
|
||||
local shrink_inner_planets = getScaleAction("{planet_terrestrial}", 1, "Inner Planets", 2)
|
||||
asset.export("shrink_inner_planets", shrink_inner_planets.Identifier)
|
||||
local toggle_inner_planet_scale = getToggleScaleAction("{planet_terrestrial}", 3400, "Inner Planets", 3, 2)
|
||||
asset.export("toggle_inner_planet_scale", toggle_inner_planet_scale.Identifier)
|
||||
|
||||
local grow_outter_planets = getScaleAction("{planet_giants}", 3400, "Outter Planets", 3)
|
||||
asset.export("grow_outter_planets", grow_outter_planets.Identifier)
|
||||
local shrink_outter_planets = getScaleAction("{planet_giants}", 1, "Outter Planets", 2)
|
||||
asset.export("shrink_outter_planets", shrink_outter_planets.Identifier)
|
||||
local toggle_outter_planet_scale = getToggleScaleAction("{planet_giants}", 3400, "Outter Planets", 3, 2)
|
||||
asset.export("toggle_outter_planet_scale", toggle_outter_planet_scale.Identifier)
|
||||
|
||||
local grow_jupiter_moons = getScaleAction("{moon_jupiter}", 50, "Jupiter Moons", 3)
|
||||
asset.export("grow_jupiter_moons", grow_jupiter_moons.Identifier)
|
||||
local shrink_jupiter_moons = getScaleAction("{moon_jupiter}", 1, "Jupiter Moons", 2)
|
||||
asset.export("shrink_jupiter_moons", shrink_jupiter_moons.Identifier)
|
||||
local toggle_jupiter_moon_scales = getToggleScaleAction("{moon_jupiter}", 50, "Jupiter Moons", 3, 2)
|
||||
asset.export("toggle_jupiter_moon_scales", toggle_jupiter_moon_scales.Identifier)
|
||||
|
||||
local grow_moon = getScaleAction("Scene.Moon", 25, "Moon", 3)
|
||||
asset.export("grow_moon", grow_moon.Identifier)
|
||||
local shrink_moon = getScaleAction("Scene.Moon", 1, "Moon", 2)
|
||||
asset.export("shrink_moon", shrink_moon.Identifier)
|
||||
local toggle_moon_scale = getToggleScaleAction("Scene.Moon", 25, "Moon", 3, 2)
|
||||
asset.export("toggle_moon_scale", toggle_moon_scale.Identifier)
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.action.registerAction(grow_planets)
|
||||
openspace.action.registerAction(shrink_planets)
|
||||
openspace.action.registerAction(toggle_planet_scale)
|
||||
|
||||
openspace.action.registerAction(grow_inner_planets)
|
||||
openspace.action.registerAction(shrink_inner_planets)
|
||||
openspace.action.registerAction(toggle_inner_planet_scale)
|
||||
|
||||
openspace.action.registerAction(grow_outter_planets)
|
||||
openspace.action.registerAction(shrink_outter_planets)
|
||||
openspace.action.registerAction(toggle_outter_planet_scale)
|
||||
|
||||
openspace.action.registerAction(grow_jupiter_moons)
|
||||
openspace.action.registerAction(shrink_jupiter_moons)
|
||||
openspace.action.registerAction(toggle_jupiter_moon_scales)
|
||||
|
||||
openspace.action.registerAction(grow_moon)
|
||||
openspace.action.registerAction(shrink_moon)
|
||||
openspace.action.registerAction(toggle_moon_scale)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.action.removeAction(toggle_moon_scale)
|
||||
openspace.action.removeAction(shrink_moon)
|
||||
openspace.action.removeAction(grow_moon)
|
||||
|
||||
openspace.action.removeAction(toggle_outter_planet_scale)
|
||||
openspace.action.removeAction(shrink_outter_planets)
|
||||
openspace.action.removeAction(grow_outter_planets)
|
||||
|
||||
openspace.action.removeAction(toggle_inner_planet_scale)
|
||||
openspace.action.removeAction(shrink_inner_planets)
|
||||
openspace.action.removeAction(grow_inner_planets)
|
||||
|
||||
openspace.action.removeAction(toggle_planet_scale)
|
||||
openspace.action.removeAction(shrink_planets)
|
||||
openspace.action.removeAction(grow_planets)
|
||||
end)
|
||||
67
data/assets/actions/trails/toggle_all_trails.asset
Normal file
67
data/assets/actions/trails/toggle_all_trails.asset
Normal file
@@ -0,0 +1,67 @@
|
||||
local fade_up_trails = {
|
||||
Identifier = "os.fade_up_trails",
|
||||
Name = "Show All Trails",
|
||||
Command = [[
|
||||
openspace.setPropertyValue("Scene.*Trail.Renderable.Fade", 1, 2);
|
||||
openspace.setPropertyValue("Scene.*trail.Renderable.Fade", 1, 2);
|
||||
]],
|
||||
Documentation = "Fade up all enabled trails in the Scene",
|
||||
GuiPath = "/Trails",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("fade_up_trails", fade_up_trails.Identifier)
|
||||
|
||||
local fade_down_trails = {
|
||||
Identifier = "os.fade_down_trails",
|
||||
Name = "Hide All Trails",
|
||||
Command = [[
|
||||
openspace.setPropertyValue("Scene.*Trail.Renderable.Fade", 0, 2);
|
||||
openspace.setPropertyValue("Scene.*trail.Renderable.Fade", 0, 2);
|
||||
]],
|
||||
Documentation = "Fade down all enabled trails in the Scene",
|
||||
GuiPath = "/Trails",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("fade_down_trails", fade_down_trails.Identifier)
|
||||
|
||||
local toggle_trails = {
|
||||
Identifier = "os.toggle_trails",
|
||||
Name = "Toggle All Trails",
|
||||
Command = [[
|
||||
local capList = openspace.getProperty("*Trail.Renderable.Fade");
|
||||
local list = openspace.getProperty("*trail.Renderable.Fade");
|
||||
if (#capList == 0) and (#list == 0) then
|
||||
openspace.printWarning("No trails to toggle");
|
||||
else
|
||||
local prop;
|
||||
if #capList > 0 then
|
||||
prop = capList[1];
|
||||
else
|
||||
prop = list[1];
|
||||
end
|
||||
local currentFade = openspace.getPropertyValue(prop);
|
||||
local newFade = 0;
|
||||
if currentFade < 1 then
|
||||
newFade = 1;
|
||||
end
|
||||
openspace.setPropertyValue("Scene.*Trail.Renderable.Fade", newFade, 2);
|
||||
openspace.setPropertyValue("Scene.*trail.Renderable.Fade", newFade, 2);
|
||||
end
|
||||
]],
|
||||
Documentation = "Toggle fade for all trails in the Scene",
|
||||
GuiPath = "/Trails",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("toggle_trails", toggle_trails.Identifier)
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.action.registerAction(fade_up_trails)
|
||||
openspace.action.registerAction(fade_down_trails)
|
||||
openspace.action.registerAction(toggle_trails)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.action.removeAction(toggle_trails)
|
||||
openspace.action.removeAction(fade_down_trails)
|
||||
openspace.action.removeAction(fade_up_trails)
|
||||
end)
|
||||
@@ -0,0 +1,24 @@
|
||||
local toggle_trails = {
|
||||
Identifier = "os_default.toggle_trails",
|
||||
Name = "Toggle Planet and Moon Trails (Instant)",
|
||||
Command = [[
|
||||
local list = openspace.getProperty("{planetTrail_solarSystem}.Renderable.Enabled");
|
||||
for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end
|
||||
|
||||
local moonlist = openspace.getProperty("{moonTrail_solarSystem}.Renderable.Enabled");
|
||||
for _,v in pairs(moonlist) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end
|
||||
]],
|
||||
Documentation = "Toggles the visibility of planet and moon trails",
|
||||
GuiPath = "/Solar System",
|
||||
IsLocal = false,
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.action.registerAction(toggle_trails)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.action.removeAction(toggle_trails)
|
||||
end)
|
||||
|
||||
asset.export(toggle_trails)
|
||||
67
data/assets/actions/trails/toggle_trails_planets_moons.asset
Normal file
67
data/assets/actions/trails/toggle_trails_planets_moons.asset
Normal file
@@ -0,0 +1,67 @@
|
||||
local fade_up_trails = {
|
||||
Identifier = "os.fade_up_trails_planets_moon",
|
||||
Name = "Show Planet and Moon Trails",
|
||||
Command = [[
|
||||
openspace.setPropertyValue("{planetTrail_solarSystem}.Renderable.Fade", 1, 2);
|
||||
openspace.setPropertyValue("{moonTrail_solarSystem}.Renderable.Fade", 1, 2);
|
||||
]],
|
||||
Documentation = "Fade up all planet and moon trails in the Scene",
|
||||
GuiPath = "/Trails",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("fade_up_trails", fade_up_trails.Identifier)
|
||||
|
||||
local fade_down_trails = {
|
||||
Identifier = "os.fade_down_trails_planets_moon",
|
||||
Name = "Hide Planet and Moon Trails",
|
||||
Command = [[
|
||||
openspace.setPropertyValue("{planetTrail_solarSystem}.Renderable.Fade", 0, 2);
|
||||
openspace.setPropertyValue("{moonTrail_solarSystem}.Renderable.Fade", 0, 2);
|
||||
]],
|
||||
Documentation = "Fade down all planet and moon trails in the Scene",
|
||||
GuiPath = "/Trails",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("fade_down_trails", fade_down_trails.Identifier)
|
||||
|
||||
local toggle_trails = {
|
||||
Identifier = "os.toggle_trails_planets_moon",
|
||||
Name = "Toggle Planet and Moon Trails",
|
||||
Command = [[
|
||||
local capList = openspace.getProperty("{planetTrail_solarSystem}.Renderable.Fade");
|
||||
local list = openspace.getProperty("{moonTrail_solarSystem}.Renderable.Fade");
|
||||
if (#capList == 0) and (#list == 0) then
|
||||
openspace.printWarning("No trails to toggle");
|
||||
else
|
||||
local prop;
|
||||
if (#capList > 0) then
|
||||
prop = capList[1];
|
||||
else
|
||||
prop = list[1];
|
||||
end
|
||||
local currentFade = openspace.getPropertyValue(prop);
|
||||
local newFade = 0;
|
||||
if currentFade < 1 then
|
||||
newFade = 1;
|
||||
end
|
||||
openspace.setPropertyValue("{planetTrail_solarSystem}.Renderable.Fade", newFade, 2);
|
||||
openspace.setPropertyValue("{moonTrail_solarSystem}.Renderable.Fade", newFade, 2);
|
||||
end
|
||||
]],
|
||||
Documentation = "Toggle fade for planet and moon trails in the Scene",
|
||||
GuiPath = "/Trails",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("toggle_trails", toggle_trails)
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.action.registerAction(fade_up_trails)
|
||||
openspace.action.registerAction(fade_down_trails)
|
||||
openspace.action.registerAction(toggle_trails)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.action.removeAction(toggle_trails)
|
||||
openspace.action.removeAction(fade_down_trails)
|
||||
openspace.action.removeAction(fade_up_trails)
|
||||
end)
|
||||
163
data/assets/actions/trails/trail_appearance.asset
Normal file
163
data/assets/actions/trails/trail_appearance.asset
Normal file
@@ -0,0 +1,163 @@
|
||||
local enable_trail_fading = {
|
||||
Identifier = "os.enable_trail_fading",
|
||||
Name = "Enable Trail Fading",
|
||||
Command = [[
|
||||
openspace.setPropertyValue("Scene.*Trail.Renderable.Appearance.EnableFade", true);
|
||||
openspace.setPropertyValue("Scene.*trail.Renderable.Appearance.EnableFade", true);
|
||||
]],
|
||||
Documentation = "Set orbits to fade out towards the end",
|
||||
GuiPath = "/Trails/Appearance",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("enable_trail_fading", enable_trail_fading.Identifier)
|
||||
|
||||
local disable_trail_fading = {
|
||||
Identifier = "os.disable_trail_fading",
|
||||
Name = "Disable Trail Fading",
|
||||
Command = [[
|
||||
openspace.setPropertyValue("Scene.*Trail.Renderable.Appearance.EnableFade", false);
|
||||
openspace.setPropertyValue("Scene.*trail.Renderable.Appearance.EnableFade", false);
|
||||
]],
|
||||
Documentation = "Sets trails not to fade out torwards end",
|
||||
GuiPath = "/Trails/Appearance",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("disable_trail_fading", disable_trail_fading.Identifier)
|
||||
|
||||
local toggle_trail_fading = {
|
||||
Identifier = "os.toggle_trail_fading",
|
||||
Name = "Toggle Trail Fading",
|
||||
Command = [[
|
||||
local capList = openspace.getProperty("*Trail.Renderable.Appearance.EnableFade")
|
||||
local list = openspace.getProperty("*trail.Renderable.Appearance.EnableFade")
|
||||
if (#capList == 0) and (#list == 0) then
|
||||
openspace.printWarning("No trails to toggle");
|
||||
else
|
||||
local prop;
|
||||
if #capList > 0 then
|
||||
prop = capList[1];
|
||||
else
|
||||
prop = list[1];
|
||||
end
|
||||
local currentFade = openspace.getPropertyValue(prop);
|
||||
local newFade = not currentFade;
|
||||
openspace.setPropertyValue("Scene.*Trail.Renderable.Appearance.EnableFade", newFade);
|
||||
openspace.setPropertyValue("Scene.*trail.Renderable.Appearance.EnableFade", newFade);
|
||||
end
|
||||
]],
|
||||
Documentation = "Toggle trails to fade out towards the end for all trails in the Scene",
|
||||
GuiPath = "/Trails/Appearance",
|
||||
IsLocal = true
|
||||
}
|
||||
asset.export("toggle_trail_fading", toggle_trail_fading.Identifier)
|
||||
|
||||
local function getHightlightCommand(identifierString, value)
|
||||
local easeFunction = "QuinticEaseOut"
|
||||
if value > 1 then
|
||||
easeFunction = "QuinticEaseIn"
|
||||
end
|
||||
local command = 'openspace.setPropertyValue("'
|
||||
command = command .. identifierString .. '.Renderable.Appearance.Fade", '
|
||||
command = command .. value .. ', 2, "' .. easeFunction .. '")'
|
||||
return command;
|
||||
end
|
||||
|
||||
local function getHighlightAction(identifierString, value, nameString)
|
||||
local actionString = 'Dehighlight'
|
||||
if value > 1 then
|
||||
actionString = 'Highlight'
|
||||
end
|
||||
local action = {
|
||||
Identifier = "os." .. actionString .. identifierString .. "_trail",
|
||||
Name = actionString .. " " .. nameString .. " Trail",
|
||||
Command = getHightlightCommand(identifierString, value),
|
||||
Documentation = "Animates the trail fade of " .. nameString .. "'s Trail",
|
||||
GuiPath = "/Trails/Appearance",
|
||||
IsLocal = true
|
||||
}
|
||||
return action
|
||||
end
|
||||
|
||||
local function getToggleHighlightAction(identifierString, value, nameString)
|
||||
local action = {
|
||||
Identifier = "os.toggle_" .. identifierString .. "_trail_highlight",
|
||||
Name = "Toggle " .. nameString .. " Trail Highlight",
|
||||
Command = [[
|
||||
local list = openspace.getProperty("]] .. identifierString .. [[.Renderable.Appearance.Fade");
|
||||
if #list == 0 then
|
||||
openspace.printWarning("No planets to resize");
|
||||
else
|
||||
local prop = list[1];
|
||||
local fadeValue = openspace.getPropertyValue(prop)
|
||||
if fadeValue > 1 then
|
||||
]] .. getHightlightCommand(identifierString, 1, nameString) .. "\n" .. [[
|
||||
else
|
||||
]] .. getHightlightCommand(identifierString, value, nameString) .. "\n" .. [[
|
||||
end
|
||||
end]],
|
||||
Documentation = "Animates the trail fade of " .. nameString .. "'s trail",
|
||||
GuiPath = "/Trails/Appearance",
|
||||
IsLocal = true
|
||||
}
|
||||
return action
|
||||
end
|
||||
|
||||
local earthTrailIdentifer = "Scene.EarthTrail"
|
||||
|
||||
local highlight_earth_trail = getHighlightAction(earthTrailIdentifer, 10, "Earth")
|
||||
asset.export("highlight_earth_trail", highlight_earth_trail.Identifier)
|
||||
local dehighlight_earth_trail = getHighlightAction(earthTrailIdentifer, 1, "Earth")
|
||||
asset.export("dehighlight_earth_trail", dehighlight_earth_trail.Identifier)
|
||||
local toggle_earth_trail_highlight = getToggleHighlightAction(earthTrailIdentifer, 10, "Earth")
|
||||
asset.export("toggle_earth_trail_highlight", toggle_earth_trail_highlight.Identifier)
|
||||
|
||||
local highlight_inner_trails = getHighlightAction("{planetTrail_terrestrial}", 50, "Inner Planet")
|
||||
asset.export("highlight_inner_trails", highlight_inner_trails.Identifier)
|
||||
local dehighlight_inner_trails = getHighlightAction("{planetTrail_terrestrial}", 1, "Inner Planet")
|
||||
asset.export("dehighlight_inner_trails", dehighlight_inner_trails.Identifier)
|
||||
local toggle_inner_trail_highlight = getToggleHighlightAction("{planetTrail_terrestrial}", 50, "Inner Planet")
|
||||
asset.export("toggle_inner_trail_highlight", toggle_inner_trail_highlight.Identifier)
|
||||
|
||||
local highlight_outter_trails = getHighlightAction("{planetTrail_giants}", 100, "Outter Planet")
|
||||
asset.export("highlight_outter_trails", highlight_outter_trails.Identifier)
|
||||
local dehighlight_outter_trails = getHighlightAction("{planetTrail_giants}", 1, "Outter Planet")
|
||||
asset.export("dehighlight_outter_trails", dehighlight_outter_trails.Identifier)
|
||||
local toggle_outter_trail_highlight = getToggleHighlightAction("{planetTrail_giants}", 100, "Outter Planet")
|
||||
asset.export("toggle_outter_trail_highlight", toggle_outter_trail_highlight.Identifier)
|
||||
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.action.registerAction(enable_trail_fading)
|
||||
openspace.action.registerAction(disable_trail_fading)
|
||||
openspace.action.registerAction(toggle_trail_fading)
|
||||
|
||||
openspace.action.registerAction(highlight_earth_trail)
|
||||
openspace.action.registerAction(dehighlight_earth_trail)
|
||||
openspace.action.registerAction(toggle_earth_trail_highlight)
|
||||
|
||||
openspace.action.registerAction(highlight_inner_trails)
|
||||
openspace.action.registerAction(dehighlight_inner_trails)
|
||||
openspace.action.registerAction(toggle_inner_trail_highlight)
|
||||
|
||||
openspace.action.registerAction(highlight_outter_trails)
|
||||
openspace.action.registerAction(dehighlight_outter_trails)
|
||||
openspace.action.registerAction(toggle_outter_trail_highlight)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.action.removeAction(toggle_outter_trail_highlight)
|
||||
openspace.action.removeAction(dehighlight_outter_trails)
|
||||
openspace.action.removeAction(highlight_outter_trails)
|
||||
|
||||
openspace.action.removeAction(highlight_inner_trails)
|
||||
openspace.action.removeAction(dehighlight_inner_trails)
|
||||
openspace.action.removeAction(toggle_inner_trail_highlight)
|
||||
|
||||
openspace.action.removeAction(highlight_earth_trail)
|
||||
openspace.action.removeAction(dehighlight_earth_trail)
|
||||
openspace.action.removeAction(toggle_earth_trail_highlight)
|
||||
|
||||
openspace.action.removeAction(toggle_trail_fading)
|
||||
openspace.action.removeAction(disable_trail_fading)
|
||||
openspace.action.removeAction(enable_trail_fading)
|
||||
end)
|
||||
@@ -60,6 +60,7 @@ asset.require("scene/digitaluniverse/tully")
|
||||
asset.require("scene/digitaluniverse/voids")
|
||||
|
||||
asset.require("customization/globebrowsing")
|
||||
asset.require("util/default_actions")
|
||||
|
||||
local toggle_trails = {
|
||||
Identifier = "os_default.toggle_trails",
|
||||
@@ -92,10 +93,10 @@ local toggle_planet_labels = {
|
||||
Key = "l"
|
||||
}
|
||||
|
||||
local trailAction = asset.require("actions/trails/toggle_trails_planets_moons").toggle_trails
|
||||
|
||||
asset.onInitialize(function ()
|
||||
openspace.action.registerAction(toggle_trails)
|
||||
openspace.bindKey(toggle_trails.Key, toggle_trails.Identifier)
|
||||
openspace.bindKey("h", trailAction.Identifier)
|
||||
|
||||
openspace.action.registerAction(toggle_planet_labels)
|
||||
openspace.bindKey(toggle_planet_labels.Key, toggle_planet_labels.Identifier)
|
||||
@@ -106,7 +107,6 @@ asset.onInitialize(function ()
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function ()
|
||||
openspace.action.removeAction(toggle_trails)
|
||||
openspace.clearKey(toggle_trails.Key)
|
||||
|
||||
openspace.action.removeAction(toggle_planet_labels)
|
||||
|
||||
27
data/assets/events/toggle_all_trails.asset
Normal file
27
data/assets/events/toggle_all_trails.asset
Normal file
@@ -0,0 +1,27 @@
|
||||
local action = asset.require("actions/trails/toggle_all_trails")
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.event.registerEventAction(
|
||||
"CameraFocusTransition",
|
||||
action.fade_up_trails,
|
||||
{ Transition = "Exiting" }
|
||||
)
|
||||
openspace.event.registerEventAction(
|
||||
"CameraFocusTransition",
|
||||
action.fade_down_trails,
|
||||
{ Transition = "Approaching" }
|
||||
)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.event.unregisterEventAction(
|
||||
"CameraFocusTransition",
|
||||
action.fade_up_trails,
|
||||
{ Transition = "Exiting" }
|
||||
)
|
||||
openspace.event.unregisterEventAction(
|
||||
"CameraFocusTransition",
|
||||
action.fade_down_trails,
|
||||
{ Transition = "Approaching" }
|
||||
)
|
||||
end)
|
||||
@@ -22,7 +22,7 @@ local toggle_sun = {
|
||||
Documentation = [[Toggles the visibility of the Sun glare and the Sun globe when the
|
||||
camera is approaching either so that from far away the Sun Glare is rendered and when
|
||||
close up, the globe is rendered instead.]],
|
||||
GuiPath = "/Sun",
|
||||
GuiPath = "/Solar System/Sun",
|
||||
IsLocal = false
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local action = asset.require("actions/toggle_trail")
|
||||
local action = asset.require("actions/trails/toggle_trail")
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.event.registerEventAction(
|
||||
|
||||
27
data/assets/events/toggle_trails_planets_moons.asset
Normal file
27
data/assets/events/toggle_trails_planets_moons.asset
Normal file
@@ -0,0 +1,27 @@
|
||||
local action = asset.require("actions/trails/toggle_trails_planets_moons")
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.event.registerEventAction(
|
||||
"CameraFocusTransition",
|
||||
action.fade_up_trails,
|
||||
{ Transition = "Exiting" }
|
||||
)
|
||||
openspace.event.registerEventAction(
|
||||
"CameraFocusTransition",
|
||||
action.fade_down_trails,
|
||||
{ Transition = "Approaching" }
|
||||
)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.event.unregisterEventAction(
|
||||
"CameraFocusTransition",
|
||||
action.fade_up_trails,
|
||||
{ Transition = "Exiting" }
|
||||
)
|
||||
openspace.event.unregisterEventAction(
|
||||
"CameraFocusTransition",
|
||||
action.fade_down_trails,
|
||||
{ Transition = "Approaching" }
|
||||
)
|
||||
end)
|
||||
@@ -9,7 +9,7 @@ local colormaps = asset.syncedResource({
|
||||
Name = "Stars Color Table",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "stars_colormap",
|
||||
Version = 2
|
||||
Version = 3
|
||||
})
|
||||
|
||||
asset.onInitialize(function ()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
asset.onInitialize(function ()
|
||||
openspace.setPropertyValueSingle("Modules.SkyBrowser.Enabled", true)
|
||||
openspace.setPropertyValueSingle("Modules.SkyBrowser.ShowTitleInGuiBrowser", false)
|
||||
-- More settings are available, but for now using the default values
|
||||
end)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ local colormaps = asset.syncedResource({
|
||||
Name = "Stars Color Table",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "stars_colormap",
|
||||
Version = 2
|
||||
Version = 3
|
||||
})
|
||||
|
||||
local textures = asset.syncedResource({
|
||||
|
||||
@@ -9,7 +9,7 @@ local colormaps = asset.syncedResource({
|
||||
Name = "Stars Color Table",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "stars_colormap",
|
||||
Version = 2
|
||||
Version = 3
|
||||
})
|
||||
|
||||
local textures = asset.syncedResource({
|
||||
@@ -27,13 +27,14 @@ local gaia_abundance_apogee = {
|
||||
File = speck .. "GaiaAbundApogee.speck",
|
||||
ColorOption = "Other Data",
|
||||
OtherData = "FeH",
|
||||
MagnitudeExponent = 6.2,
|
||||
MagnitudeExponent = 7.25,
|
||||
SizeComposition = "Distance Modulus",
|
||||
RenderMethod = "Texture Based",
|
||||
Texture = textures .. "halo.png",
|
||||
ColorRange = { { -0.8, 0.6 } },
|
||||
-- ShapeTexture = textures .. "disc.png",
|
||||
ColorMap = colormaps .. "colorbv.cmap",
|
||||
OtherDataColorMap = colormaps .. "viridis.cmap",
|
||||
OtherDataColorMap = colormaps .. "RainbowGradient.cmap",
|
||||
StaticFilter = -9999,
|
||||
StaticFilterReplacement = 0.0,
|
||||
DataMapping = {
|
||||
|
||||
@@ -16,7 +16,7 @@ local colormaps = asset.syncedResource({
|
||||
Name = "Stars Color Table",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "stars_colormap",
|
||||
Version = 2
|
||||
Version = 3
|
||||
})
|
||||
|
||||
local textures = asset.syncedResource({
|
||||
@@ -32,7 +32,7 @@ local GaiaStars = {
|
||||
Type = "RenderableGaiaStars",
|
||||
File = starsFolder,
|
||||
FileReaderOption = "StreamOctree",
|
||||
RenderOption = "Motion",
|
||||
RenderMode = "Motion",
|
||||
ShaderOption = "Point_SSBO",
|
||||
Texture = textures .. "halo.png",
|
||||
ColorMap = colormaps .. "colorbv.cmap",
|
||||
|
||||
@@ -9,7 +9,7 @@ local colormaps = asset.syncedResource({
|
||||
Name = "Stars Color Table",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "stars_colormap",
|
||||
Version = 2
|
||||
Version = 3
|
||||
})
|
||||
|
||||
local textures = asset.syncedResource({
|
||||
@@ -27,13 +27,14 @@ local gaia_abundance_galah = {
|
||||
File = speck .. "GaiaAbundGalah.speck",
|
||||
Texture = textures .. "halo.png",
|
||||
-- ShapeTexture = textures .. "disc.png",
|
||||
MagnitudeExponent = 6.2,
|
||||
MagnitudeExponent = 7.25,
|
||||
SizeComposition = "Distance Modulus",
|
||||
RenderMethod = "Texture Based",
|
||||
ColorOption = "Other Data",
|
||||
OtherData = "FeH",
|
||||
ColorMap = colormaps .. "colorbv.cmap",
|
||||
OtherDataColorMap = colormaps .. "viridis.cmap",
|
||||
OtherDataColorMap = colormaps .. "RainbowGradient.cmap",
|
||||
ColorRange = { { -0.8, 0.6 } },
|
||||
StaticFilter = -9999,
|
||||
StaticFilterReplacement = 0.0,
|
||||
DataMapping = {
|
||||
|
||||
@@ -151,7 +151,7 @@ local RotationKeyframes = {
|
||||
|
||||
local InsightParent = {
|
||||
Identifier = "InsightParent",
|
||||
Parent = mars.Identifier,
|
||||
Parent = mars.Mars.Identifier,
|
||||
Transform = {
|
||||
Translation ={
|
||||
Type = "TimelineTranslation",
|
||||
|
||||
@@ -3,7 +3,7 @@ local marsTransforms = asset.require("scene/solarsystem/planets/mars/transforms"
|
||||
local sun = asset.require("scene/solarsystem/sun/sun")
|
||||
|
||||
local models = asset.syncedResource({
|
||||
Name = "Mars 2020 Kernels",
|
||||
Name = "Perseverance Model",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "perseverance_models",
|
||||
Version = 2
|
||||
|
||||
@@ -48,7 +48,7 @@ local PerseveranceNode = {
|
||||
TimeFrame = {
|
||||
Type = "TimeFrameInterval",
|
||||
Start = "2020 JUL 30 12:52:43.643",
|
||||
End = "2021 FEB 18 20:44:58.828"
|
||||
End = "2021 FEB 18 20:43:48"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,12 +83,12 @@ local PerseveranceTrailMars = {
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = perseverance_id,
|
||||
Observer = "MARS",
|
||||
Observer = "MARS BARYCENTER",
|
||||
Kernels = m2020_kernels
|
||||
},
|
||||
Color = { 0.7, 0.9, 0.6 },
|
||||
StartTime = approachMars,
|
||||
EndTime = endTime,
|
||||
EndTime = "2021 FEB 18 20:43:48",
|
||||
SampleInterval = 100,
|
||||
Enabled = false
|
||||
},
|
||||
|
||||
@@ -18,8 +18,8 @@ asset.require("./layers/heightlayers/blue_marble_height")
|
||||
local heightLayer = asset.require("./layers/heightlayers/terrain_tileset")
|
||||
|
||||
-- Night layers
|
||||
asset.require("./layers/nightlayers/earth_night_texture")
|
||||
local nightLayer = asset.require("./layers/nightlayers/earth_at_night_2012")
|
||||
asset.require("./layers/nightlayers/earth_night_texture")
|
||||
asset.require("./layers/nightlayers/earth_at_night_temporal")
|
||||
|
||||
-- Overlays
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
local globeIdentifier = asset.require("../../earth").Earth.Identifier
|
||||
|
||||
local layer = {
|
||||
Identifier = "VIIRS_NOAA20_Temporal",
|
||||
Name = "VIIRS NOAA20 (Temporal)",
|
||||
Type = "TemporalTileLayer",
|
||||
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(globeIdentifier, "ColorLayers", layer)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", layer)
|
||||
end)
|
||||
|
||||
asset.export("layer", layer)
|
||||
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "VIIRS NOAA20 (Temporal)",
|
||||
Version = "1.1",
|
||||
Description = [[ This layer has the best daily Earth Image. GIBS hosted layer created
|
||||
with openspace.globebrowsing.createTemporalGibsGdalXml ]],
|
||||
Author = "NASA EOSDIS Global Imagery Browse Services",
|
||||
URL = "https://earthdata.nasa.gov/eosdis/science-system-description/" ..
|
||||
"eosdis-components/gibs",
|
||||
License = "NASA"
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
local globeIdentifier = asset.require("../../earth").Earth.Identifier
|
||||
|
||||
local layer = {
|
||||
Identifier = "Earth_at_Night_Temporal_Blue_Yellow",
|
||||
Name = "Earth at Night Blue Yellow (Temporal)",
|
||||
Type = "TemporalTileLayer",
|
||||
Mode = "Prototyped",
|
||||
Prototyped = {
|
||||
Time = {
|
||||
Start = "2021-04-30",
|
||||
End = "Yesterday"
|
||||
},
|
||||
TemporalResolution = "1d",
|
||||
TimeFormat = "YYYY-MM-DD",
|
||||
Prototype = openspace.globebrowsing.createTemporalGibsGdalXml(
|
||||
"VIIRS_SNPP_DayNightBand_AtSensor_M15",
|
||||
"500m",
|
||||
"jpg"
|
||||
)
|
||||
},
|
||||
Description = [[ The VIIRS Nighttime Imagery (Day/Night Band, Enhanced Near Constant
|
||||
Contrast) layer shows the Earth's surface and atmosphere using a sensor designed
|
||||
to capture low-light emission sources, under varying illumination conditions. It
|
||||
is displayed as a grey-scale image. Sources of illumination include both natural
|
||||
and anthropogenic sources of light emissions. Lunar reflection can be used to
|
||||
highlight the location and features of clouds and other terrestrial features such
|
||||
as sea ice and snow cover when there is partial to full moon conditions. When
|
||||
there is no moonlight, natural and anthropogenic night time light emissions are
|
||||
highlighted such as city lights, lightning, auroras, fires, gas flares, and
|
||||
fishing fleets. This layer is useful for showing patterns of human activity and
|
||||
energy behaviors such as cities and highways, the holiday periods, the tracking
|
||||
of shipping and fishing fleets at night and, the burning of waste natural gas
|
||||
(gas flares) from on and offshore oil/gas production sites. <br><br>The VIIRS
|
||||
Nighttime Imagery (Day/Night Band, Enhanced Near Constant Contrast) layer is
|
||||
available from the Visible Infrared Imaging Radiometer Suite (VIIRS) on the joint
|
||||
NASA/NOAA Suomi National Polar orbiting Partnership (Suomi NPP) satellite.
|
||||
The sensor resolution is 750 m at nadir, imagery resolution is 500 m, and the
|
||||
temporal resolution is daily. (Description from NASA Worldview)]],
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.globebrowsing.addLayer(globeIdentifier, "NightLayers", layer)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.globebrowsing.deleteLayer(globeIdentifier, "NightLayers", layer)
|
||||
end)
|
||||
|
||||
asset.export("layer", layer)
|
||||
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Earth at Night Blue Yellow(Temporal)",
|
||||
Version = "1.1",
|
||||
Description = [[Temporal layer for earth with daily night image. This layer is a GIBS
|
||||
hosted layer created with openspace.globebrowsing.createTemporalGibsGdalXml ]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "https://worldview.earthdata.nasa.gov/?l=VIIRS_SNPP_DayNightBand_ENCC",
|
||||
License = "NASA"
|
||||
}
|
||||
@@ -4,13 +4,13 @@ local texturesPath = asset.syncedResource({
|
||||
Name = "Earth Textures",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "earth_textures",
|
||||
Version = 2
|
||||
Version = 3
|
||||
})
|
||||
|
||||
local layer = {
|
||||
Identifier = "Earth_Night_Texture",
|
||||
Name = "Earth Night Texture",
|
||||
FilePath = texturesPath .. "earth_night.jpg",
|
||||
FilePath = texturesPath .. "earth_night.png",
|
||||
Description = [[ Earth's city lights are clearly visible from space ]]
|
||||
}
|
||||
|
||||
|
||||
@@ -41,36 +41,36 @@ local initializeAndAddNodes = function()
|
||||
},
|
||||
Tag = { "earth_satellite", "ISS" },
|
||||
GUI = {
|
||||
Path = "/Solar System/Planets/Earth/Satellites/ISS"
|
||||
Path = "/Solar System/Planets/Earth/Satellites/ISS"
|
||||
}
|
||||
}
|
||||
|
||||
local parentNode = {
|
||||
Identifier = "ISSModel",
|
||||
Parent = iss.Identifier,
|
||||
Transform = {
|
||||
Rotation = {
|
||||
Type = "FixedRotation",
|
||||
Attached = "ISSModel",
|
||||
XAxis = { 0.01, -1.0, 0.56 },
|
||||
XAxisOrthogonal = true,
|
||||
YAxis = transforms.EarthInertial.Identifier
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
GeometryFile = models .. "ISS.fbx",
|
||||
ModelScale = "Centimeter",
|
||||
LightSources = {
|
||||
sun.LightSource
|
||||
},
|
||||
PerformShading = true,
|
||||
DisableFaceCulling = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "ISS Model",
|
||||
Path = "/Solar System/Planets/Earth/Satellites/ISS"
|
||||
Identifier = "ISSModel",
|
||||
Parent = iss.Identifier,
|
||||
Transform = {
|
||||
Rotation = {
|
||||
Type = "FixedRotation",
|
||||
Attached = "ISSModel",
|
||||
XAxis = { 0.01, -1.0, 0.56 },
|
||||
XAxisOrthogonal = true,
|
||||
YAxis = transforms.EarthInertial.Identifier
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
GeometryFile = models .. "ISS.fbx",
|
||||
ModelScale = "Centimeter",
|
||||
LightSources = {
|
||||
sun.LightSource
|
||||
},
|
||||
PerformShading = true,
|
||||
DisableFaceCulling = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "ISS Model",
|
||||
Path = "/Solar System/Planets/Earth/Satellites/ISS"
|
||||
}
|
||||
}
|
||||
|
||||
local issTrail = {
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
local transforms = asset.require("scene/solarsystem/sun/transforms")
|
||||
asset.require("spice/base")
|
||||
|
||||
|
||||
|
||||
local EarthBarycenterTrail = {
|
||||
Identifier = "EarthBarycenterTrail",
|
||||
Parent = transforms.SolarSystemBarycenter.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableTrailOrbit",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "EARTH BARYCENTER",
|
||||
Observer = "SSB"
|
||||
},
|
||||
Color = { 0.5, 0.8, 1.0 },
|
||||
Period = 365.242,
|
||||
Resolution = 1000,
|
||||
Enabled = false
|
||||
},
|
||||
Tag = { "planetTrail_solarSystem", "planetTrail_terrestrial" },
|
||||
GUI = {
|
||||
Name = "Earth Barycenter Trail",
|
||||
Path = "/Solar System/Planets/Earth"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(EarthBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(EarthBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.export(EarthBarycenterTrail)
|
||||
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Earth Trail",
|
||||
Version = "1.1",
|
||||
Description = [[ Trail of Earth's Barycenter as observed by the Sun. Data from NASA Spice (see
|
||||
base spice asset)]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
local transforms = asset.require("scene/solarsystem/sun/transforms")
|
||||
asset.require("spice/base")
|
||||
|
||||
|
||||
|
||||
local JupiterBarycenterTrail = {
|
||||
Identifier = "JupiterBarycenterTrail",
|
||||
Parent = transforms.SolarSystemBarycenter.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableTrailOrbit",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "JUPITER BARYCENTER",
|
||||
Observer = "SSB"
|
||||
},
|
||||
Color = { 0.8, 0.7, 0.7 },
|
||||
Period = 4330.595,
|
||||
Resolution = 1000,
|
||||
Enabled = false
|
||||
},
|
||||
Tag = { "planetTrail_solarSystem", "planetTrail_giants" },
|
||||
GUI = {
|
||||
Name = "Jupiter Barycenter Trail",
|
||||
Path = "/Solar System/Planets/Jupiter"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(JupiterBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(JupiterBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.export(JupiterBarycenterTrail)
|
||||
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Jupiter Trail",
|
||||
Version = "1.1",
|
||||
Description = [[ Trail of Jupiter's Barycenter as observed by the Sun. Data from NASA Spice (see
|
||||
base spice asset)]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
local transforms = asset.require("scene/solarsystem/sun/transforms")
|
||||
asset.require("spice/base")
|
||||
|
||||
|
||||
|
||||
local MarsBarycenterTrail = {
|
||||
Identifier = "MarsBarycenterTrail",
|
||||
Parent = transforms.SolarSystemBarycenter.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableTrailOrbit",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "MARS BARYCENTER",
|
||||
Observer = "SSB"
|
||||
},
|
||||
Color = { 0.814, 0.305, 0.220 },
|
||||
Period = 686.973,
|
||||
Resolution = 1000,
|
||||
Enabled = false
|
||||
},
|
||||
Tag = { "planetTrail_solarSystem", "planetTrail_terrestrial" },
|
||||
GUI = {
|
||||
Name = "Mars Barycenter Trail",
|
||||
Path = "/Solar System/Planets/Mars",
|
||||
Description = [[ Trail of Mars' Barycenter as observed by the Sun. Data from NASA Spice (see
|
||||
base spice asset)]],
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(MarsBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(MarsBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.export(MarsBarycenterTrail)
|
||||
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Mars Trail",
|
||||
Version = "1.1",
|
||||
Description = [[ Barycenter Mars trail from SPICE.]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
local transforms = asset.require("scene/solarsystem/sun/transforms")
|
||||
asset.require("spice/base")
|
||||
|
||||
|
||||
|
||||
local MercuryBarycenterTrail = {
|
||||
Identifier = "MercuryBarycenterTrail",
|
||||
Parent = transforms.SolarSystemBarycenter.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableTrailOrbit",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "MERCURY BARYCENTER",
|
||||
Observer = "SSB"
|
||||
},
|
||||
Color = { 0.6, 0.5, 0.5 },
|
||||
Period = 87.968,
|
||||
Resolution = 1000,
|
||||
Enabled = false
|
||||
},
|
||||
Tag = { "planetTrail_solarSystem", "planetTrail_terrestrial" },
|
||||
GUI = {
|
||||
Name = "Mercury Barycenter Trail",
|
||||
Path = "/Solar System/Planets/Mercury",
|
||||
Description = [[ Barycenter Trail of Mercury as observed by the Sun.]],
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(MercuryBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(MercuryBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.export(MercuryBarycenterTrail)
|
||||
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Mercury Trail",
|
||||
Version = "1.1",
|
||||
Description = [[ Trail for Mercury's Barycenter. Data from NASA Spice (see
|
||||
base spice asset)]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
local transforms = asset.require("scene/solarsystem/sun/transforms")
|
||||
asset.require("spice/base")
|
||||
|
||||
|
||||
|
||||
local NeptuneBarycenterTrail = {
|
||||
Identifier = "NeptuneBarycenterTrail",
|
||||
Parent = transforms.SolarSystemBarycenter.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableTrailOrbit",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "NEPTUNE BARYCENTER",
|
||||
Observer = "SSB"
|
||||
},
|
||||
Color = { 0.2, 0.5, 1.0 },
|
||||
Period = 60266,
|
||||
Resolution = 1000,
|
||||
Enabled = false
|
||||
},
|
||||
Tag = { "planetTrail_solarSystem", "planetTrail_giants" },
|
||||
GUI = {
|
||||
Name = "Neptune Barycenter Trail",
|
||||
Path = "/Solar System/Planets/Neptune",
|
||||
Description = [[ BarycenterTrail of Neptune as observed by the Sun.]]
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(NeptuneBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(NeptuneBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.export(NeptuneBarycenterTrail)
|
||||
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Neptune Trail",
|
||||
Version = "1.1",
|
||||
Description = [[ Trail of Neptune's Barycenter. Data from NASA Spice (see base spice asset)]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
local transforms = asset.require("scene/solarsystem/sun/transforms")
|
||||
|
||||
|
||||
|
||||
local SaturnBarycenterTrail = {
|
||||
Identifier = "SaturnBarycenterTrail",
|
||||
Parent = transforms.SolarSystemBarycenter.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableTrailOrbit",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "SATURN BARYCENTER",
|
||||
Observer = "SSB"
|
||||
},
|
||||
Color = { 0.85, 0.75, 0.51 },
|
||||
Period = 10746.94,
|
||||
Resolution = 1000,
|
||||
Enabled = false
|
||||
},
|
||||
Tag = { "planetTrail_solarSystem", "planetTrail_giants" },
|
||||
GUI = {
|
||||
Name = "Saturn Barycenter Trail",
|
||||
Path = "/Solar System/Planets/Saturn",
|
||||
Description = [[ Trail of Saturn's Barycenter as observed by the Sun.]]
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(SaturnBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(SaturnBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.export(SaturnBarycenterTrail)
|
||||
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Saturn Trail",
|
||||
Version = "1.1",
|
||||
Description = [[ Trail of Saturn's Barycenter. Data from NASA Spice (see base spice asset)]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
local transforms = asset.require("scene/solarsystem/sun/transforms")
|
||||
|
||||
|
||||
|
||||
local UranusBarycenterTrail = {
|
||||
Identifier = "UranusBarycenterTrail",
|
||||
Parent = transforms.SolarSystemBarycenter.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableTrailOrbit",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "URANUS BARYCENTER",
|
||||
Observer = "SSB"
|
||||
},
|
||||
Color = { 0.60, 0.95, 1.00 },
|
||||
Period = 30588.740,
|
||||
Resolution = 1000,
|
||||
Enabled = false
|
||||
},
|
||||
Tag = { "planetTrail_solarSystem", "planetTrail_giants" },
|
||||
GUI = {
|
||||
Name = "Uranus Barycenter Trail",
|
||||
Path = "/Solar System/Planets/Uranus",
|
||||
Description = [[ Trail of Uranus as observed by the Sun.]],
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(UranusBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(UranusBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.export(UranusBarycenterTrail)
|
||||
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Uranus Trail",
|
||||
Version = "1.1",
|
||||
Description = [[ Trail of Uranus' Barycenter. Data from NASA Spice (see base spice asset)]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
local transforms = asset.require("scene/solarsystem/sun/transforms")
|
||||
asset.require("spice/base")
|
||||
|
||||
local VenusBarycenterTrail = {
|
||||
Identifier = "VenusBarycenterTrail",
|
||||
Parent = transforms.SolarSystemBarycenter.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableTrailOrbit",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "VENUS BARYCENTER",
|
||||
Observer = "SSB"
|
||||
},
|
||||
Color = { 1.0, 0.5, 0.2 },
|
||||
Period = 224.695,
|
||||
Resolution = 1000,
|
||||
Enabled = false
|
||||
},
|
||||
Tag = { "planetTrail_solarSystem", "planetTrail_terrestrial" },
|
||||
GUI = {
|
||||
Name = "Venus Barycenter Trail",
|
||||
Path = "/Solar System/Planets/Venus",
|
||||
Description = "Berycenter trail for Venus",
|
||||
Hidden = false
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(VenusBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(VenusBarycenterTrail)
|
||||
end)
|
||||
|
||||
asset.export(VenusBarycenterTrail)
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Venus Trail",
|
||||
Version = "1.1",
|
||||
Description = [[ Barycenter Trail of Venus as observed by the Sun. Data from NASA Spice (see
|
||||
base spice asset)]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -8,8 +8,8 @@ local SolarSystemBarycenter = {
|
||||
-- No parent; this node is attached to the scene graph root
|
||||
TimeFrame = { -- Using Spice kernels for 1850-2150
|
||||
Type = "TimeFrameInterval",
|
||||
Start = "1850-JAN-01",
|
||||
End = "2150-JAN-01"
|
||||
Start = "1550-JAN-01",
|
||||
End = "2650-JAN-22"
|
||||
},
|
||||
GUI = {
|
||||
Name = "Solar System Barycenter",
|
||||
|
||||
@@ -2,14 +2,14 @@ local syncedDirectory = asset.syncedResource({
|
||||
Name = "General SPK Kernels",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "general_spk",
|
||||
Version = 1
|
||||
Version = 2
|
||||
})
|
||||
|
||||
local kernels = {
|
||||
asset.localResource("naif0012.tls"),
|
||||
-- Leapseconds:
|
||||
asset.localResource("pck00010.tpc"),
|
||||
syncedDirectory .. "de430_1850-2150.bsp"
|
||||
syncedDirectory .. "de430.bsp"
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
|
||||
3
data/assets/util/default_actions.asset
Normal file
3
data/assets/util/default_actions.asset
Normal file
@@ -0,0 +1,3 @@
|
||||
asset.require("actions/trails/toggle_all_trails");
|
||||
asset.require("actions/trails/toggle_trails_planets_moons");
|
||||
asset.require("actions/planets/planet_lighting");
|
||||
@@ -5,7 +5,7 @@ local toggle_native_ui = {
|
||||
Name = "Show Native GUI",
|
||||
Command = propertyHelper.invert("Modules.ImGUI.Enabled"),
|
||||
Documentation = "Shows or hides the native UI",
|
||||
GuiPath = "/Native GUI",
|
||||
GuiPath = "/System/GUI",
|
||||
IsLocal = true,
|
||||
|
||||
Key = "F1"
|
||||
@@ -26,7 +26,7 @@ local take_screenshot = {
|
||||
Name = "Take Screenshot",
|
||||
Command = "openspace.takeScreenshot()",
|
||||
Documentation = "Saves the contents of the screen to a file in the ${SCREENSHOTS} directory.",
|
||||
GuiPath = "/Rendering",
|
||||
GuiPath = "/System/Rendering",
|
||||
IsLocal = true,
|
||||
|
||||
Key = "F12"
|
||||
@@ -37,7 +37,7 @@ local toggle_pause_interpolated = {
|
||||
Name = "Toggle Pause (Interpolated)",
|
||||
Command = "openspace.time.pauseToggleViaKeyboard()",
|
||||
Documentation = "Smoothly starts and stops the simulation time.",
|
||||
GuiPath = "/Simulation Speed",
|
||||
GuiPath = "/Time/Simulation Speed",
|
||||
IsLocal = true,
|
||||
|
||||
Key = "SPACE"
|
||||
@@ -48,7 +48,7 @@ local toggle_pause_immediate = {
|
||||
Name = "Toggle Pause (Immediate)",
|
||||
Command = "openspace.time.togglePause()",
|
||||
Documentation = "Immediately starts and stops the simulation time.",
|
||||
GuiPath = "/Simulation Speed",
|
||||
GuiPath = "/Time/Simulation Speed",
|
||||
IsLocal = true,
|
||||
|
||||
Key = "Shift+SPACE"
|
||||
@@ -109,7 +109,7 @@ local toggle_main_gui = {
|
||||
Name = "Toggle main GUI",
|
||||
Command = propertyHelper.invert("Modules.CefWebGui.Visible"),
|
||||
Documentation = "Toggles the main GUI",
|
||||
GuiPath = "/GUI",
|
||||
GuiPath = "/System/GUI",
|
||||
IsLocal = true,
|
||||
|
||||
Key = "Tab"
|
||||
@@ -125,7 +125,7 @@ openspace.setPropertyValueSingle("RenderEngine.ShowLog", not isEnabled);
|
||||
openspace.setPropertyValueSingle("RenderEngine.ShowVersion", not isEnabled);
|
||||
openspace.setPropertyValueSingle("RenderEngine.ShowCamera", not isEnabled)]],
|
||||
Documentation = "Toggles the dashboard and overlays",
|
||||
GuiPath = "/GUI",
|
||||
GuiPath = "/System/GUI",
|
||||
IsLocal = true,
|
||||
|
||||
Key = "Shift+Tab"
|
||||
@@ -136,7 +136,7 @@ local toggle_master_rendering = {
|
||||
Name = "Toggle rendering on master",
|
||||
Command = propertyHelper.invert("RenderEngine.DisableMasterRendering"),
|
||||
Documentation = "Toggles the rendering on master",
|
||||
GuiPath = "/Rendering",
|
||||
GuiPath = "/System/Rendering",
|
||||
IsLocal = true,
|
||||
|
||||
Key = "Alt+R"
|
||||
@@ -147,7 +147,7 @@ local next_delta_step_interpolate = {
|
||||
Name = "Next Delta Time Step (Interpolate)",
|
||||
Command = "openspace.time.interpolateNextDeltaTimeStep()",
|
||||
Documentation = "Smoothly interpolates the simulation speed to the next delta time step, if one exists.",
|
||||
GuiPath = "/Simulation Speed",
|
||||
GuiPath = "/Time/Simulation Speed",
|
||||
IsLocal = true,
|
||||
|
||||
Key = "Right"
|
||||
@@ -158,7 +158,7 @@ local next_delta_step_immediate = {
|
||||
Name = "Next Delta Time Step (Immediate)",
|
||||
Command = "openspace.time.setNextDeltaTimeStep()",
|
||||
Documentation = "Immediately set the simulation speed to the next delta time step, if one exists.",
|
||||
GuiPath = "/Simulation Speed",
|
||||
GuiPath = "/Time/Simulation Speed",
|
||||
IsLocal = true,
|
||||
|
||||
Key = "Shift+Right"
|
||||
@@ -169,7 +169,7 @@ local previous_delta_step_interpolate = {
|
||||
Name = "Previous Delta Time Step (Interpolate)",
|
||||
Command = "openspace.time.interpolatePreviousDeltaTimeStep()",
|
||||
Documentation = "Smoothly interpolates the simulation speed to the previous delta time step, if one exists.",
|
||||
GuiPath = "/Simulation Speed",
|
||||
GuiPath = "/Time/Simulation Speed",
|
||||
IsLocal = true,
|
||||
|
||||
Key = "Left"
|
||||
@@ -180,12 +180,27 @@ local previous_delta_step_immediate = {
|
||||
Name = "Previous Delta Time Step (Immediate)",
|
||||
Command = "openspace.time.setPreviousDeltaTimeStep()",
|
||||
Documentation = "Immediately set the simulation speed to the previous delta time step, if one exists.",
|
||||
GuiPath = "/Simulation Speed",
|
||||
GuiPath = "/Time/Simulation Speed",
|
||||
IsLocal = true,
|
||||
|
||||
Key = "Shift+Left"
|
||||
}
|
||||
|
||||
local toggle_planet_labels = {
|
||||
Identifier = "os_default.toggle_planet_labels",
|
||||
Name = "Toggle planet labels",
|
||||
Command = [[
|
||||
local list = openspace.getProperty("{solarsystem_labels}.Renderable.Enabled");
|
||||
for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end
|
||||
]],
|
||||
Documentation = "Turns on visibility for all solar system labels",
|
||||
GuiPath = "/Solar System",
|
||||
IsLocal = false,
|
||||
Key = "l"
|
||||
}
|
||||
|
||||
|
||||
|
||||
local Actions = {
|
||||
toggle_native_ui,toggle_shutdown,take_screenshot,toggle_pause_interpolated,toggle_pause_immediate,
|
||||
toggle_rotation_friction,toggle_zoom_friction,toggle_roll_friction,fade_to_black,
|
||||
@@ -198,7 +213,6 @@ asset.onInitialize(function()
|
||||
openspace.action.registerAction(action)
|
||||
openspace.bindKey(action.Key, action.Identifier)
|
||||
end
|
||||
|
||||
-- The take screenshot function is a bit special since we want to bind two keys to that action
|
||||
openspace.bindKey("PRINT_SCREEN", take_screenshot.Identifier)
|
||||
end)
|
||||
|
||||
@@ -3,7 +3,7 @@ asset.require("./static_server")
|
||||
local guiCustomization = asset.require("customization/gui")
|
||||
|
||||
-- Select which commit hashes to use for the frontend and backend
|
||||
local frontendHash = "cf0c64cfac2642fb05e7d2a076550161f2a112aa"
|
||||
local frontendHash = "edaa282c626e0417ce7d6c0a8267349f7d40f6c2"
|
||||
local dataProvider = "data.openspaceproject.com/files/webgui"
|
||||
|
||||
local frontend = asset.syncedResource({
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"actions": [
|
||||
{
|
||||
"documentation": "Toggle trails on or off for satellites around Earth",
|
||||
"gui_path": "/Earth",
|
||||
"gui_path": "/Solar System/Earth",
|
||||
"identifier": "profile.toggle.satellite",
|
||||
"is_local": false,
|
||||
"name": "Toggle satellite trails",
|
||||
@@ -10,7 +10,7 @@
|
||||
},
|
||||
{
|
||||
"documentation": "Refocuses the camera on the ISS",
|
||||
"gui_path": "/Earth",
|
||||
"gui_path": "/Solar System/Earth",
|
||||
"identifier": "profile.focus.iss",
|
||||
"is_local": false,
|
||||
"name": "Focus ISS",
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
{
|
||||
"documentation": "Retargets the camera on Earth",
|
||||
"gui_path": "/Earth",
|
||||
"gui_path": "/Solar System/Earth",
|
||||
"identifier": "profile.focus.earth",
|
||||
"is_local": false,
|
||||
"name": "Focus on Earth",
|
||||
|
||||
Reference in New Issue
Block a user