mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-05 03:00:21 -06:00
* Add description and update GUI property values * Add examples with a single color * Remove old example file * Rename ellipse example and remove width * Apply suggestions from code review Co-authored-by: Ylva Selling <ylva.selling@gmail.com> * Address review comments * Also update renerable description --------- Co-authored-by: Ylva Selling <ylva.selling@gmail.com>
31 lines
748 B
Lua
31 lines
748 B
Lua
-- Basic
|
|
-- This example creates a disc with a single color and a radius of 100 meters.
|
|
--
|
|
-- This renderable requires a texture to be loaded, even for just a single color. Use the
|
|
-- utility function that exists for creating single color textures for this purpose.
|
|
local cyanTexture = openspace.createSingleColorImage(
|
|
"example_disc_color_cyan",
|
|
{ 0.0, 1.0, 1.0 }
|
|
)
|
|
|
|
local Node = {
|
|
Identifier = "RenderableDisc_Example",
|
|
Renderable = {
|
|
Type = "RenderableDisc",
|
|
Size = 100.0,
|
|
Texture = cyanTexture
|
|
},
|
|
GUI = {
|
|
Name = "RenderableDisc - Basic",
|
|
Path = "/Examples"
|
|
}
|
|
}
|
|
|
|
asset.onInitialize(function()
|
|
openspace.addSceneGraphNode(Node)
|
|
end)
|
|
|
|
asset.onDeinitialize(function()
|
|
openspace.removeSceneGraphNode(Node)
|
|
end)
|