Files
OpenSpace/data/assets/examples/nodeline.asset
T
Emma Broman 8a42657deb Feature/examples naming (#3305)
* Update name and path format of examples that follow the new structure
* Fix a broken (updated) property name in an example
* Make other examples' GUI paths more consistent
* Put them all in the Examples folder
2024-06-13 10:42:00 +02:00

44 lines
1.1 KiB
Lua

local earth = asset.require("scene/solarsystem/planets/earth/earth")
local mars = asset.require("scene/solarsystem/planets/mars/mars")
local RenderableNodeLineExample = {
Identifier = "RenderableNodeLineExample",
Renderable = {
Type = "RenderableNodeLine",
StartNode = earth.Earth.Identifier,
EndNode = mars.Mars.Identifier,
Color = { 0.5, 0.5, 0.5 },
LineWidth = 2
},
GUI = {
Name = "RenderableNodeLine - Basic",
Path = "/Examples",
Description = [[Draws a line between two nodes in the scene.]]
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(RenderableNodeLineExample)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(RenderableNodeLineExample)
end)
asset.export(RenderableNodeLineExample)
asset.meta = {
Name = "RenderableNodeLine Example asset",
Version = "1.0",
Description = [[Example of a RenderableNodeLine, that can be used to draw an line
between two scene graph nodes.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}