Files
OpenSpace/data/assets/modules/skybrowser/hover_circle.asset
Alexander Bock 0b91fd2642 Global cleanup pass over asset files
- Lua style guides
- FrameConversions
- unloadMission, Add mission identifiers
2024-08-14 10:22:20 +02:00

55 lines
1.3 KiB
Lua

local transforms = asset.require("scene/solarsystem/sun/transforms")
local imageFolder = asset.resource({
Name = "Hover Circle Image",
Type = "HttpSynchronization",
Identifier = "misc_ring_image",
Version = 1
})
local circle = {
Identifier = "hoverCircle",
Parent = transforms.SolarSystemBarycenter.Identifier,
Renderable = {
Type = "RenderablePlaneImageLocal",
Size = 3.0E15,
Origin = "Center",
Billboard = true,
Texture = imageFolder .. "ring.png"
},
GUI = {
Name = "Hover Circle",
Description = [[A circular marker that shows the position on the night sky
of the object hovered in the sky browser UI. The circle will hide/show up
dynamically, depending on the interaction with the items in the UI]],
Path = "/SkyBrowser",
Hidden = true
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(circle)
openspace.skybrowser.setHoverCircle("hoverCircle")
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(circle)
end)
asset.export(circle)
asset.meta = {
Name = "SkyBrowser Hover Circle",
Description = [[Includes a circular marker that shows the position on the night sky
of the object hovered in the sky browser UI]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}