mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-21 03:29:40 -06:00
Scale fieldlines and add scene keybindings
This commit is contained in:
committed by
Matthias Berg
parent
7a3673ae16
commit
e76746aa6c
@@ -28,7 +28,7 @@ ENLILPaths = {
|
||||
asset.require('./fieldlines/enlil')
|
||||
|
||||
MASPaths = {
|
||||
Sun = FieldLineBasePath .. "mas/"
|
||||
Sun = FieldLineBasePath .. "mas_multiple_timesteps/"
|
||||
}
|
||||
asset.require('./fieldlines/mas')
|
||||
|
||||
@@ -43,16 +43,39 @@ openspace.setPropertyValueSingle('Modules.ImGUI.Main.IsHidden', b);]],
|
||||
Documentation = "Shows or hides the entire user interface",
|
||||
Local = true
|
||||
},
|
||||
{
|
||||
Key = "F5",
|
||||
Command = "openspace.time.setTime('2000 JUL 14 08:33:37.100');",
|
||||
Documentation = "Jumps to first of the MAS-fieldline timesteps",
|
||||
Local = true
|
||||
},
|
||||
{
|
||||
Key = "F6",
|
||||
Command = "openspace.time.setTime('2012 JUL 01 00:07:00.000');",
|
||||
Documentation = "Jumps to first of the Enlil-fieldline timesteps",
|
||||
Local = true
|
||||
},
|
||||
{
|
||||
Key = "F8",
|
||||
Command = propertyHelper.invert('Scene.SunGlare.renderable.Enabled'),
|
||||
Documentation = "Toggles the Sun glare",
|
||||
Local = true
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
|
||||
local sunAsset = asset.require('scene/solarsystem/sun/sun')
|
||||
|
||||
local sunRadius = 695508000
|
||||
|
||||
|
||||
asset.onInitialize(function ()
|
||||
openspace.time.setTime("2012 JUL 01 00:00:00.000")
|
||||
|
||||
openspace.time.setTime("2000 JUL 14 08:33:37.100")
|
||||
openspace.setPropertyValue('Scene.SunGlare.renderable.Enabled', false)
|
||||
|
||||
sceneHelper.bindKeys(Keybindings)
|
||||
|
||||
openspace.setDefaultGuiSorting()
|
||||
|
||||
openspace.globebrowsing.loadWMSServersFromFile(
|
||||
@@ -64,12 +87,12 @@ asset.onInitialize(function ()
|
||||
})
|
||||
|
||||
openspace.navigation.setCameraState({
|
||||
Focus = earthAsset.Earth.Identifier,
|
||||
Position = { 0, 0, 0 },
|
||||
Rotation = { 0.758797, 0.221490, -0.605693, -0.091135 },
|
||||
Focus = sunAsset.Sun.Identifier,
|
||||
Position = { 80*sunRadius, 80*sunRadius, 0 },
|
||||
Rotation = { 0.0, 0.0, 0.7, 0.0 },
|
||||
})
|
||||
|
||||
openspace.globebrowsing.goToGeo(58.5877, 16.1924, 20000000)
|
||||
-- openspace.globebrowsing.goToGeo(58.5877, 16.1924, 20000000)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function ()
|
||||
|
||||
@@ -26,7 +26,6 @@ local MAS = {
|
||||
Parent = transforms.HNMReferenceFrame.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableFieldlinesSequence",
|
||||
-- TracingMethod = "PreTracedBinary",
|
||||
SourceFolder = MASPaths.Sun,
|
||||
InputFileType = "osfls",
|
||||
-- StartStateOffset = 309,
|
||||
@@ -35,25 +34,29 @@ local MAS = {
|
||||
masDensityColorTable,
|
||||
masVelocityColorTable,
|
||||
},
|
||||
DefaultColor = { 0.4, 0.15, 0.4, 1.0 },
|
||||
DefaultColor = { 0.8, 0.8, 0.8, 0.5 },
|
||||
ColorTableMinMax = {
|
||||
{ 0, 1000000 },
|
||||
{ 100, 2000 }
|
||||
},
|
||||
ExtraMinMaxLimits = {
|
||||
{ -1, 10000000 },
|
||||
{ 0, 5000 }
|
||||
},
|
||||
RadialDomainLimits = { 1, 5 },
|
||||
CartesianDomainLimits = {
|
||||
{ -2.5, 2.5 },
|
||||
{ -2.5, 2.5 },
|
||||
{ -2.5, 2.5}
|
||||
},
|
||||
-- ExtraMinMaxLimits = {
|
||||
-- { -1, 10000000 },
|
||||
-- { 0, 5000 }
|
||||
-- },
|
||||
-- RadialDomainLimits = { 0, 30 },
|
||||
-- CartesianDomainLimits = {
|
||||
-- { -20.5, 20.5 },
|
||||
-- { -20.5, 20.5 },
|
||||
-- { -20.5, 20.5}
|
||||
-- },
|
||||
LoadAtRuntime = true,
|
||||
ScaleToMeters = 1.0,
|
||||
SecondsBefore = 50*365*24*60*60, -- 50 years before
|
||||
SecondsAfter = 50*365*24*60*60, -- 50 years after
|
||||
SimulationModel = "mas",
|
||||
-- MaskingRanges = {
|
||||
-- {-1000, 1000},
|
||||
-- }
|
||||
},
|
||||
GUI = {
|
||||
Name = "Fieldlines MAS"
|
||||
@@ -66,7 +69,7 @@ local MAS = {
|
||||
},
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 0.04 * sunRadius
|
||||
Scale = sunRadius
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,7 +81,7 @@ local MAS = {
|
||||
-- Renderable = {
|
||||
-- Type = "RenderableFieldlinesSequence",
|
||||
-- -- TracingMethod = "PreTracedBinary",
|
||||
-- SourceFolder = "C:/Users/CCMC/data/fieldlines_json/mas/",
|
||||
-- SourceFolder = "C:/Users/CCMC/data/fieldlines_json/mas_multiple_timesteps/JSON/",
|
||||
-- InputFileType = "json",
|
||||
-- -- StartStateOffset = 309,
|
||||
-- -- MaxNumStates = 1,
|
||||
@@ -102,7 +105,7 @@ local MAS = {
|
||||
-- { -2.5, 2.5}
|
||||
-- },
|
||||
-- LoadAtRuntime = true,
|
||||
-- OutputFolder = "C:/Users/CCMC/data/fieldlines_binaries/mas/",
|
||||
-- OutputFolder = "C:/Users/CCMC/data/fieldlines_binaries/mas_multiple_timesteps/",
|
||||
-- SimulationModel = "mas",
|
||||
-- ScaleToMeters = 1.0,
|
||||
-- SecondsBefore = 50*365*24*60*60, -- 50 years before
|
||||
|
||||
Reference in New Issue
Block a user