mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-26 22:19:17 -06:00
53 lines
1008 B
Lua
53 lines
1008 B
Lua
local assetHelper = asset.require("util/asset_helper")
|
|
|
|
local scale = 149597870700 -- 1 AU
|
|
|
|
local circle = {
|
|
Identifier = "ExampleCircle",
|
|
Transform = {
|
|
Scale = {
|
|
Type = "StaticScale",
|
|
Scale = scale
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableRadialGrid",
|
|
Color = { 0.6, 0.6, 0.8 },
|
|
LineWidth = 3.0,
|
|
GridSegments = { 1, 1 },
|
|
CircleSegments = 64,
|
|
Radii = { 0.0, 1.0 }
|
|
},
|
|
GUI = {
|
|
Name = "Example Circle",
|
|
Path = "/Examples/Primitives"
|
|
}
|
|
}
|
|
|
|
local ellipse = {
|
|
Identifier = "ExampleEllipse",
|
|
Transform = {
|
|
Scale = {
|
|
Type = "NonUniformStaticScale",
|
|
Scale = { 1.5, 1.0, 1.0 }
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableRadialGrid",
|
|
Color = { 0.6, 0.8, 0.6 },
|
|
LineWidth = 3.0,
|
|
GridSegments = { 1, 1 },
|
|
CircleSegments = 64,
|
|
Radii = { 0.0, scale }
|
|
},
|
|
GUI = {
|
|
Name = "Example Ellipse",
|
|
Path = "/Examples/Primitives"
|
|
}
|
|
}
|
|
|
|
assetHelper.registerSceneGraphNodesAndExport(asset, {
|
|
circle,
|
|
ellipse
|
|
})
|