Files
OpenSpace/data/assets/examples/primitives.asset
2021-12-28 23:40:09 +01:00

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
})