Files
OpenSpace/data/assets/examples/scale/luascale/lua.asset
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

35 lines
778 B
Lua

-- Basic
-- This asset creates a SceneGraphNode that only displays coordinate axes. The sizes of
-- coordinate axes are determined by executing a Lua file that returns the scaling
-- parameters to be used as a table.
--
-- ```{literalinclude} example.lua
-- :language: lua
-- :caption: The script file that is used in this example
-- ```
local Node = {
Identifier = "LuaScale_Example",
Transform = {
Scale = {
Type = "LuaScale",
Script = asset.resource("example.lua")
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "LuaScale - Basic",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)