Make openspace.fadeOut also disable the object at end of fade

Needed when we now start using this function in the UI
This commit is contained in:
Emma Broman
2024-12-03 08:26:26 +01:00
parent f1bfaadc35
commit 98c0787266

View File

@@ -317,8 +317,15 @@ openspace.fadeOut = function(identifier, fadeTime, endScript)
-- If node is already disabled we don't have to do anything
if isEnabled then
openspace.setPropertyValue(fadeProperty, 0.0, fadeTime, "Linear", endScript)
end
local disableScript = "openspace.setPropertyValue('" .. enabledProperty .. "', false)"
openspace.setPropertyValue(
fadeProperty,
0.0,
fadeTime,
"Linear",
disableScript .. endScript
)
end
end
openspace.toggleFade = function(renderable, fadeTime, endScript)