mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-19 11:29:08 -06:00
* Updating all assets to new coding style * Cleaning up asset files * Moving default_actions and default_keybindings files * Changing procedural globes to explicitly specified globes * Move Spice loading explicitly to the initialize part and also deinitialize * Removing unused asset files * Removing asset_helper * Removing scale_model_helper asset * Removing script_scheduler_helper * Removing testing_keybindings * Remove procedural_globe
60 lines
1.1 KiB
Lua
60 lines
1.1 KiB
Lua
local AU = 149597870700 -- 1 AU
|
|
|
|
local Circle = {
|
|
Identifier = "ExampleCircle",
|
|
Transform = {
|
|
Scale = {
|
|
Type = "StaticScale",
|
|
Scale = AU
|
|
}
|
|
},
|
|
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, AU }
|
|
},
|
|
GUI = {
|
|
Name = "Example Ellipse",
|
|
Path = "/Examples/Primitives"
|
|
}
|
|
}
|
|
|
|
|
|
asset.onInitialize(function()
|
|
openspace.addSceneGraphNode(Circle)
|
|
openspace.addSceneGraphNode(Ellipse)
|
|
end)
|
|
|
|
asset.onDeinitialize(function()
|
|
openspace.removeSceneGraphNode(Ellipse)
|
|
openspace.removeSceneGraphNode(Circle)
|
|
end)
|
|
|
|
asset.export(Circle)
|
|
asset.export(Ellipse)
|