mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-13 00:38:33 -05:00
Update the bastille day assets to follow the new fade structure (closes #2627)
This commit is contained in:
@@ -51,7 +51,25 @@ local densityVolume = {
|
||||
local toggle_volume = {
|
||||
Identifier = "os.events.bastilleday.densityvolume.togglevolume",
|
||||
Name = "Toggle volume",
|
||||
Command = propertyHelper.invert("Scene.MAS-MHD-Density-bastille-day-2000.Renderable.Enabled"),
|
||||
Command = [[
|
||||
if openspace.getPropertyValue("Scene.MAS-MHD-Density-bastille-day-2000.Renderable.Enabled") then
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene.MAS-MHD-Density-bastille-day-2000.Renderable.Fade",
|
||||
0.0,
|
||||
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
|
||||
"Linear",
|
||||
'openspace.setPropertyValueSingle("Scene.MAS-MHD-Density-bastille-day-2000.Renderable.Enabled", false)'
|
||||
)
|
||||
else
|
||||
openspace.setPropertyValueSingle("Scene.MAS-MHD-Density-bastille-day-2000.Renderable.Enabled", true)
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene.MAS-MHD-Density-bastille-day-2000.Renderable.Fade",
|
||||
1.0,
|
||||
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
|
||||
"Linear"
|
||||
)
|
||||
end
|
||||
]],
|
||||
Documentation = "Toggle volume rendering of CME",
|
||||
GuiPath = "/Bastille-Day 2000",
|
||||
IsLocal = false
|
||||
|
||||
@@ -50,7 +50,25 @@ local fieldlines = {
|
||||
local toggle_fieldlines = {
|
||||
Identifier = "os.events.bastilleday.fieldlines.togglefieldlines",
|
||||
Name = "Toggle fieldlines",
|
||||
Command = propertyHelper.invert("Scene.MAS-MHD-Fieldlines-bastille-day-2000.Renderable.Enabled"),
|
||||
Command = [[
|
||||
if openspace.getPropertyValue("Scene.MAS-MHD-Fieldlines-bastille-day-2000.Renderable.Enabled") then
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene.MAS-MHD-Fieldlines-bastille-day-2000.Renderable.Fade",
|
||||
0.0,
|
||||
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
|
||||
"Linear",
|
||||
'openspace.setPropertyValueSingle("Scene.MAS-MHD-Fieldlines-bastille-day-2000.Renderable.Enabled", false)'
|
||||
)
|
||||
else
|
||||
openspace.setPropertyValueSingle("Scene.MAS-MHD-Fieldlines-bastille-day-2000.Renderable.Enabled", true)
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene.MAS-MHD-Fieldlines-bastille-day-2000.Renderable.Fade",
|
||||
1.0,
|
||||
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
|
||||
"Linear"
|
||||
)
|
||||
end
|
||||
]],
|
||||
Documentation = "Toggle fieldline rendering of CME",
|
||||
GuiPath = "/Bastille-Day 2000",
|
||||
IsLocal = false
|
||||
|
||||
@@ -35,7 +35,25 @@ local fluxNodes = {
|
||||
local toggle_fluxnodes = {
|
||||
Identifier = "os.events.bastilleday.fluxnodes.togglefluxnodes",
|
||||
Name = "Toggle flux nodes",
|
||||
Command = propertyHelper.invert("Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Enabled"),
|
||||
Command = [[
|
||||
if openspace.getPropertyValue("Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Enabled") then
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Fade",
|
||||
0.0,
|
||||
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
|
||||
"Linear",
|
||||
'openspace.setPropertyValueSingle("Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Enabled", false)'
|
||||
)
|
||||
else
|
||||
openspace.setPropertyValueSingle("Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Enabled", true)
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Fade",
|
||||
1.0,
|
||||
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
|
||||
"Linear"
|
||||
)
|
||||
end
|
||||
]],
|
||||
Documentation = "Toggle flux node rendering of CME",
|
||||
GuiPath = "/Bastille-Day 2000",
|
||||
IsLocal = false
|
||||
|
||||
@@ -72,7 +72,25 @@ local MeridialCutplane = {
|
||||
local toggle_equatorial = {
|
||||
Identifier = "os.events.bastilleday.fluxnodescutplane.toggleequatorial",
|
||||
Name = "Toggle equatorial cutplane",
|
||||
Command = propertyHelper.invert("Scene.EquatorialCutplane-bastille-day-2000.Renderable.Enabled"),
|
||||
Command = [[
|
||||
if openspace.getPropertyValue("Scene.EquatorialCutplane-bastille-day-2000.Renderable.Enabled") then
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene.EquatorialCutplane-bastille-day-2000.Renderable.Fade",
|
||||
0.0,
|
||||
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
|
||||
"Linear",
|
||||
'openspace.setPropertyValueSingle("Scene.EquatorialCutplane-bastille-day-2000.Renderable.Enabled", false)'
|
||||
)
|
||||
else
|
||||
openspace.setPropertyValueSingle("Scene.EquatorialCutplane-bastille-day-2000.Renderable.Enabled", true)
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene.EquatorialCutplane-bastille-day-2000.Renderable.Fade",
|
||||
1.0,
|
||||
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
|
||||
"Linear"
|
||||
)
|
||||
end
|
||||
]],
|
||||
Documentation = "Toggle equatorial cutplane of CME",
|
||||
GuiPath = "/Bastille-Day 2000",
|
||||
IsLocal = false
|
||||
@@ -80,7 +98,25 @@ local toggle_equatorial = {
|
||||
local toggle_meridial = {
|
||||
Identifier = "os.events.bastilleday.fluxnodescutplane.togglemeridial",
|
||||
Name = "Toggle meridial cutplane",
|
||||
Command = propertyHelper.invert("Scene.MeridialCutplane-bastille-day-2000.Renderable.Enabled"),
|
||||
Command = [[
|
||||
if openspace.getPropertyValue("Scene.MeridialCutplane-bastille-day-2000.Renderable.Enabled") then
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene.MeridialCutplane-bastille-day-2000.Renderable.Fade",
|
||||
0.0,
|
||||
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
|
||||
"Linear",
|
||||
'openspace.setPropertyValueSingle("Scene.MeridialCutplane-bastille-day-2000.Renderable.Enabled", false)'
|
||||
)
|
||||
else
|
||||
openspace.setPropertyValueSingle("Scene.MeridialCutplane-bastille-day-2000.Renderable.Enabled", true)
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene.MeridialCutplane-bastille-day-2000.Renderable.Fade",
|
||||
1.0,
|
||||
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
|
||||
"Linear"
|
||||
)
|
||||
end
|
||||
]],
|
||||
Documentation = "Toggle meridial cutplane of CME",
|
||||
GuiPath = "/Bastille-Day 2000",
|
||||
IsLocal = false
|
||||
|
||||
@@ -15,23 +15,37 @@ local legend = {
|
||||
CartesianPosition = { 0.677970, 0.0, -1.049180 }
|
||||
}
|
||||
|
||||
local show_legend = {
|
||||
Identifier = "os.events.bastilleday.fluxnodelegend.showlegend",
|
||||
Name = "Show the legend image",
|
||||
local toggle_legend = {
|
||||
Identifier = "os.events.bastilleday.fluxnodelegend.togglelegend",
|
||||
Name = "Toggle the legend image",
|
||||
Command = [[
|
||||
openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Opacity", 0.0);
|
||||
openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Enabled", true);
|
||||
openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Opacity", 1.0, 4);
|
||||
if openspace.getPropertyValue("ScreenSpace.LegendFluxNodes-bastille-day-2000.Enabled") then
|
||||
openspace.setPropertyValueSingle(
|
||||
"ScreenSpace.LegendFluxNodes-bastille-day-2000.Fade",
|
||||
0.0,
|
||||
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
|
||||
"Linear",
|
||||
'openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Enabled", false)'
|
||||
)
|
||||
else
|
||||
openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Enabled", true)
|
||||
openspace.setPropertyValueSingle(
|
||||
"ScreenSpace.LegendFluxNodes-bastille-day-2000.Fade",
|
||||
1.0,
|
||||
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
|
||||
"Linear"
|
||||
)
|
||||
end
|
||||
]],
|
||||
Documentation = "Show the legend image",
|
||||
Documentation = "Toggle the legend image",
|
||||
GuiPath = "/Bastille-Day 2000",
|
||||
IsLocal = false
|
||||
IsLocal = false
|
||||
}
|
||||
|
||||
local hide_legend = {
|
||||
Identifier = "os.events.bastilleday.fluxnodelegend.hidelegend",
|
||||
Name = "Hides the legend image",
|
||||
Command = [[openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Opacity", 0.0, 2)]],
|
||||
Command = [[openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Fade", 0.0, openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"), "Linear", 'openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Enabled", false)')]],
|
||||
Documentation = "Hides the legend image",
|
||||
GuiPath = "/Bastille-Day 2000",
|
||||
IsLocal = false
|
||||
@@ -41,14 +55,12 @@ asset.onInitialize(function()
|
||||
openspace.addScreenSpaceRenderable(legend)
|
||||
-- These numbers are there to put the legend on the side of the screen.
|
||||
openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Rotation", { 0.0, 0.0, 0.56652 });
|
||||
openspace.action.registerAction(show_legend)
|
||||
openspace.action.registerAction(hide_legend)
|
||||
openspace.action.registerAction(toggle_legend)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function ()
|
||||
openspace.removeScreenSpaceRenderable(legend)
|
||||
openspace.action.removeAction(show_legend)
|
||||
openspace.action.removeAction(hide_legend)
|
||||
openspace.action.removeAction(toggle_legend)
|
||||
end)
|
||||
|
||||
asset.meta = {
|
||||
|
||||
@@ -33,7 +33,25 @@ local EUVLayer = {
|
||||
local toggle_EUV_layer = {
|
||||
Identifier = "os.solarsystem.sun.toggleeuv",
|
||||
Name = "Toggle EUV layer",
|
||||
Command = propertyHelper.invert("Scene.EUV-Layer-bastille-day-2000.Renderable.Enabled"),
|
||||
Command = [[
|
||||
if openspace.getPropertyValue("Scene.EUV-Layer-bastille-day-2000.Renderable.Enabled") then
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene.EUV-Layer-bastille-day-2000.Renderable.Fade",
|
||||
0.0,
|
||||
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
|
||||
"Linear",
|
||||
'openspace.setPropertyValueSingle("Scene.EUV-Layer-bastille-day-2000.Renderable.Enabled", false)'
|
||||
)
|
||||
else
|
||||
openspace.setPropertyValueSingle("Scene.EUV-Layer-bastille-day-2000.Renderable.Enabled", true)
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene.EUV-Layer-bastille-day-2000.Renderable.Fade",
|
||||
1.0,
|
||||
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
|
||||
"Linear"
|
||||
)
|
||||
end
|
||||
]],
|
||||
Documentation = "Toggle EUV layer of sun",
|
||||
GuiPath = "/Bastille-Day 2000",
|
||||
IsLocal = false
|
||||
|
||||
Reference in New Issue
Block a user