mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-04 02:29:49 -06:00
* 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
35 lines
778 B
Lua
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)
|