mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-24 13:09:22 -06:00
* Add boxgrid examples * Add description about the box grid renderable for the docs page * change phrasing in example assets slightly * Apply suggestions from code review Co-authored-by: Ylva Selling <ylva.selling@gmail.com> * Remove labels support for `RenderableBoxGrid` --------- Co-authored-by: Ylva Selling <ylva.selling@gmail.com>
32 lines
694 B
Lua
32 lines
694 B
Lua
-- Basic
|
|
-- This example adds a box grid, which is a 3D box rendered using grid lines, to the
|
|
-- scene.
|
|
--
|
|
-- Per default, the box will be given a size of 1x1x1 meters, and here it is scaled up by a
|
|
-- factor of 100. It will hence have a size of 100x100x100 meters.
|
|
|
|
local Node = {
|
|
Identifier = "RenderableBoxGrid_Example",
|
|
Transform = {
|
|
Scale = {
|
|
Type = "StaticScale",
|
|
Scale = 100
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableBoxGrid"
|
|
},
|
|
GUI = {
|
|
Name = "RenderableBoxGrid - Basic",
|
|
Path = "/Examples"
|
|
}
|
|
}
|
|
|
|
asset.onInitialize(function()
|
|
openspace.addSceneGraphNode(Node)
|
|
end)
|
|
|
|
asset.onDeinitialize(function()
|
|
openspace.removeSceneGraphNode(Node)
|
|
end)
|