mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-25 05:29:41 -06:00
Better adapt to MAS
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local sceneHelper = asset.require('util/scene_helper')
|
||||
local propertyHelper = asset.require('util/property_helper')
|
||||
asset.require('util/default_dashboard')
|
||||
|
||||
|
||||
-- Specifying which other assets should be loaded in this scene
|
||||
asset.require('spice/base')
|
||||
@@ -10,23 +12,38 @@ assetHelper.requestAll(asset, 'scene/digitaluniverse')
|
||||
|
||||
-- Load default key bindings applicable to most scenes
|
||||
asset.require('util/default_keybindings')
|
||||
asset.request('customization/globebrowsing')
|
||||
-- asset.request('customization/globebrowsing')
|
||||
|
||||
|
||||
local sunAsset = asset.require('scene/solarsystem/sun/sun')
|
||||
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
|
||||
-- local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
|
||||
local masAsset = asset.require('scene/solarsystem/model/mas/mas')
|
||||
|
||||
local Keybindings = {
|
||||
{
|
||||
Key = "F7",
|
||||
Command = "openspace.time.setTime('2012 JUL 01 00:00:00');",
|
||||
Documentation = "Sets the focus of the camera on 'NewHorizons'.",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "F8",
|
||||
Command = "openspace.time.setTime('2017 JUN 01 00:00:00');",
|
||||
Documentation = "Sets the focus of the camera on 'NewHorizons'.",
|
||||
Local = false
|
||||
},
|
||||
}
|
||||
|
||||
asset.onInitialize(function ()
|
||||
-- openspace.time.setTime("2017 JUN 01 00:00:00")
|
||||
openspace.time.setTime(openspace.time.currentWallTime())
|
||||
sceneHelper.bindKeys(Keybindings)
|
||||
|
||||
openspace.setDefaultDashboard()
|
||||
openspace.setDefaultGuiSorting()
|
||||
|
||||
openspace.globebrowsing.loadWMSServersFromFile(
|
||||
openspace.absPath("${DATA}/globebrowsing_servers.lua")
|
||||
)
|
||||
-- openspace.globebrowsing.loadWMSServersFromFile(
|
||||
-- openspace.absPath("${DATA}/globebrowsing_servers.lua")
|
||||
-- )
|
||||
|
||||
openspace.addVirtualProperty(
|
||||
"BoolProperty",
|
||||
|
||||
@@ -9,23 +9,26 @@ local Mas = {
|
||||
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableTimeVaryingVolume",
|
||||
Dimensions = {699, 315, 295},
|
||||
StepSize = "0.01",
|
||||
TransferFunction = "${DATA}/mas-data/raw/basic.tf",
|
||||
Dimensions = {100, 100, 128},
|
||||
StepSize = "0.000001",
|
||||
TransferFunction = "${DATA}/mas-data/raw/basic1.tf",
|
||||
SourceDirectory = "${DATA}/mas-data/raw",
|
||||
LowerValueBound = 1,
|
||||
UpperValueBound = 1000,
|
||||
MinValue = 0.0,
|
||||
MaxValue = 56000.0,
|
||||
LowerValueBound = 0.01,
|
||||
UpperValueBound = 2.0,
|
||||
MinValue = 0.001,
|
||||
MaxValue = 55000.0,
|
||||
GridType = "Spherical",
|
||||
SecondsBefore = 24*60*60,
|
||||
SecondsAfter = 5.0,
|
||||
SecondsAfter = 24*60*60,
|
||||
Time = "2012-07-01T00:00:00.001",
|
||||
VisUnit = "rho",
|
||||
VisUnit = "amu/cm^3",
|
||||
},
|
||||
Translation = {
|
||||
Type = "StaticTranslation",
|
||||
Position = {10000.0, 10000.0, 10000.0},
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "SUN",
|
||||
Observer = "SUN"
|
||||
}
|
||||
},
|
||||
GUI = {
|
||||
Path = "/Solar System/Mas",
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
|
||||
return {{
|
||||
Type = "KameleonVolumeToRawTask",
|
||||
Input = "${DATA}/mas-data/mas_merged_step_101.cdf",
|
||||
Variable = "rho",
|
||||
Dimensions = {699, 315, 295},
|
||||
LowerDomainBound = {0, -90, 0},
|
||||
UpperDomainBound = {2.5, 90, 360},
|
||||
Time = "2017-06-01T00:00:00.001",
|
||||
RawVolumeOutput = "${DATA}/mas-data/raw/mas_merged_step_101.cdf.rawvolume",
|
||||
DictionaryOutput = "${DATA}/mas-data/raw/mas_merged_step_101.cdf.dictionary"
|
||||
}}
|
||||
return {
|
||||
{
|
||||
Type = "KameleonVolumeToRawTask",
|
||||
Input = "${DATA}/mas-data/mas_merged_step_101.cdf",
|
||||
Variable = "rho",
|
||||
Dimensions = {100, 100, 128},
|
||||
LowerDomainBound = {1, -90, 0},
|
||||
UpperDomainBound = {25, 90, 360},
|
||||
RawVolumeOutput = "${DATA}/mas-data/raw/mas_merged_step_101.cdf.rawvolume",
|
||||
DictionaryOutput = "${DATA}/mas-data/raw/mas_merged_step_101.cdf.dictionary"
|
||||
}
|
||||
}
|
||||
@@ -363,7 +363,7 @@ void RenderEngine::initialize() {
|
||||
|
||||
#ifdef GHOUL_USE_STB_IMAGE
|
||||
ghoul::io::TextureReader::ref().addReader(
|
||||
std::make_shared<ghoul::io::TextureReaderSTB>()
|
||||
std::make_unique<ghoul::io::TextureReaderSTB>()
|
||||
);
|
||||
#endif // GHOUL_USE_STB_IMAGE
|
||||
#ifdef GHOUL_USE_DEVIL
|
||||
|
||||
Reference in New Issue
Block a user