mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 11:09:37 -06:00
55 lines
1.3 KiB
Lua
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"
|
|
}
|