Files
OpenSpace/data/assets/examples/primitives.asset
2021-04-28 19:19:51 +02:00

53 lines
1000 B
Plaintext

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,
OuterRadius = 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,
OuterRadius = scale
},
GUI = {
Name = "Example Ellipse",
Path = "/Examples/Primitives"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
circle,
ellipse
})