mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-02 01:30:34 -06:00
more pr comment edits
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local heliosphereTransforms = asset.require('scene/solarsystem/sun/transforms_heliosphere')
|
||||
|
||||
--local transferFunctions = asset.localResource("transferfunctions")
|
||||
--local masVelocityColorTable = transferFunctions .. "/velocity-fieldlines.txt"
|
||||
--local masDensityColorTable = transferFunctions .. "/density-fieldlines.txt"
|
||||
|
||||
local fieldlinesDirectory = asset.syncedResource({
|
||||
Name = "Bastille Day MAS Fieldlines",
|
||||
Type = "HttpSynchronization",
|
||||
|
||||
@@ -12,16 +12,19 @@ local legend = {
|
||||
Identifier = "Legendfluxnodes",
|
||||
Type = "ScreenSpaceImageLocal",
|
||||
TexturePath = TexturesPath .. "/CMR_transparent_white_text.png",
|
||||
Scale = 0.15,
|
||||
CartesianPosition = { 0.677970, 0.0, -1.049180 }
|
||||
}
|
||||
|
||||
openspace.addScreenSpaceRenderable(legend)
|
||||
-- These numbers are there to put the legend on the side of the screen.
|
||||
openspace.setPropertyValueSingle('ScreenSpace.Legendfluxnodes.CartesianPosition', { 0.677970, 0.0, -1.049180 });
|
||||
openspace.setPropertyValueSingle('ScreenSpace.Legendfluxnodes.Rotation', { 0.000000, 0.000000, 0.56652 });
|
||||
openspace.setPropertyValueSingle('ScreenSpace.Legendfluxnodes.Scale', 0.15);
|
||||
openspace.setPropertyValueSingle('ScreenSpace.Legendfluxnodes.Enabled', false);
|
||||
asset.onInitialize(function()
|
||||
openspace.addScreenSpaceRenderable(legend)
|
||||
-- These numbers are there to put the legend on the side of the screen.
|
||||
openspace.setPropertyValueSingle('ScreenSpace.Legendfluxnodes.Rotation', { 0.000000, 0.000000, 0.56652 });
|
||||
end)
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, { legend })
|
||||
asset.onDeinitialize(function ()
|
||||
openspace.removeScreenSpaceRenderable(legend.Identifier)
|
||||
end)
|
||||
|
||||
asset.meta = {
|
||||
Name = "Predictive Science Inc. Stream nodes Bastille Days",
|
||||
|
||||
@@ -18,7 +18,6 @@ asset.onInitialize(function ()
|
||||
|
||||
-- add all all elements in magnetograms as layers
|
||||
for i, imagename in ipairs(magnetograms) do
|
||||
|
||||
openspace.globebrowsing.addLayer(
|
||||
'Sun',
|
||||
'ColorLayers',
|
||||
@@ -31,13 +30,12 @@ asset.onInitialize(function ()
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function ()
|
||||
--for i, imagename in ipairs(magnetograms) do
|
||||
-- openspace.globebrowsing.removeLayer(
|
||||
-- ?
|
||||
-- )
|
||||
--end
|
||||
end)
|
||||
for i, imagename in ipairs(magnetograms) do
|
||||
openspace.globebrowsing.deleteLayer(
|
||||
'Sun', 'ColorLayers', 'magnetogram-' .. i
|
||||
)
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -297,6 +297,7 @@ void RenderablePlaneTimeVaryingImage::updateActiveTriggerTimeIndex(double curren
|
||||
_activeTriggerTimeIndex = static_cast<int>(_sourceFiles.size() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
void RenderablePlaneTimeVaryingImage::computeSequenceEndTime() {
|
||||
if (_sourceFiles.size() > 1) {
|
||||
const double lastTriggerTime = _startTimes[_sourceFiles.size() - 1];
|
||||
@@ -305,11 +306,8 @@ void RenderablePlaneTimeVaryingImage::computeSequenceEndTime() {
|
||||
(static_cast<double>(_sourceFiles.size() - 1.0));
|
||||
_sequenceEndTime = lastTriggerTime + averageStateDuration;
|
||||
}
|
||||
else {
|
||||
// If there's just one state it should never disappear!
|
||||
_sequenceEndTime = std::numeric_limits<double>::max();
|
||||
}
|
||||
}
|
||||
|
||||
void RenderablePlaneTimeVaryingImage::loadTexture() {
|
||||
if (_activeTriggerTimeIndex != -1) {
|
||||
_texture = _textureFiles[_activeTriggerTimeIndex].get();
|
||||
|
||||
@@ -60,7 +60,8 @@ private:
|
||||
void updateActiveTriggerTimeIndex(double currenttime);
|
||||
void computeSequenceEndTime();
|
||||
|
||||
double _sequenceEndTime;
|
||||
// If there's just one state it should never disappear
|
||||
double _sequenceEndTime = std::numeric_limits<double>::max();
|
||||
std::vector<std::string> _sourceFiles;
|
||||
std::vector<double> _startTimes;
|
||||
int _activeTriggerTimeIndex = 0;
|
||||
|
||||
Reference in New Issue
Block a user