Merge branch 'master' into thesis/2025/black-hole

This commit is contained in:
Wilhelm Björkström
2025-03-03 16:03:23 +01:00
91 changed files with 815 additions and 503 deletions
@@ -54,8 +54,12 @@ local ToggleTrails = {
if currentFade < 1 then
newFade = 1
end
openspace.setPropertyValue("Scene.*Trail.Renderable.Fade", newFade, 2)
openspace.setPropertyValue("Scene.*trail.Renderable.Fade", newFade, 2)
if (#capList > 0) then
openspace.setPropertyValue("Scene.*Trail.Renderable.Fade", newFade, 2)
end
if (#list > 0) then
openspace.setPropertyValue("Scene.*trail.Renderable.Fade", newFade, 2)
end
openspace.setPropertyValue("Scene.*TrailEarth.Renderable.Fade", newFade, 2)
end
]],
@@ -84,8 +88,12 @@ local ToggleTrailsInstant = {
if currentFade < 1 then
newFade = 1
end
openspace.setPropertyValue("Scene.*Trail.Renderable.Fade", newFade)
openspace.setPropertyValue("Scene.*trail.Renderable.Fade", newFade)
if (#capList > 0) then
openspace.setPropertyValue("Scene.*Trail.Renderable.Fade", newFade)
end
if (#list > 0) then
openspace.setPropertyValue("Scene.*trail.Renderable.Fade", newFade)
end
end
]],
Documentation = "Toggle fade instantly for all trails in the Scene",
@@ -0,0 +1,16 @@
-- Basic
-- This example adds a dashboard item to the main dashboard that shows the current camera
-- orientation.
local Item = {
Identifier = "DashboardItemCameraOrientation_Example",
Type = "DashboardItemCameraOrientation"
}
asset.onInitialize(function()
openspace.dashboard.addDashboardItem(Item)
end)
asset.onDeinitialize(function()
openspace.dashboard.removeDashboardItem(Item)
end)
@@ -0,0 +1,37 @@
-- Time offset
-- This asset creates a rotation provided by a SPICE kernel and applies it to a
-- SceneGraphNode that only displays coordinate axes. The rotation of the coordinate axes
-- are determined by SPICE, in this case pretending that the coordinate axes are rotating
-- at the same rate as Earth. In this specific example, the orientation is offset 8h back
-- compared to the actual in-game time in OpenSpace.
-- Load the default SPICE kernels, which is the planetary constants and the DE430 kernel
asset.require("spice/core")
local Node = {
Identifier = "SpiceRotation_Example_TimeOffset",
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_EARTH",
DestinationFrame = "GALACTIC",
TimeOffset = -8 * 60 * 60
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "SpiceRotation - Time Offset",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)
@@ -0,0 +1,37 @@
-- Fixed Date
-- This asset creates a time-varying translation with information from a SPICE kernel and
-- applies it to a SceneGraphNode that only displays coordinate axes. The position of the
-- coordinate axes are determined by SPICE, in this case pretending that the axes are
-- orbiting the same way the Moon does around Earth. In this specific example, the position
-- is offset 8h back compared to the actual in-game time in OpenSpace.
-- For more information about SPICE see: https://naif.jpl.nasa.gov/naif/
-- Load the default SPICE kernels, which are the planetary constants and the DE430 kernel
asset.require("spice/core")
local Node = {
Identifier = "SpiceTranslation_Example_TimeOffset",
Transform = {
Translation = {
Type = "SpiceTranslation",
Target = "MOON",
Observer = "EARTH",
TimeOffset = -8 * 60 * 60
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "SpiceTranslation - Time Offset",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)