mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-03 01:59:35 -06:00
25 lines
806 B
Lua
25 lines
806 B
Lua
-- Axes
|
|
-- Creates a screenspace image that renders three Cartesian axes into the screen space
|
|
-- window. This example also modifies the original camera position to give an oblique view
|
|
-- onto the axes and increases the field of view of the camera to a wider degree. We also
|
|
-- set the background color to be fully opaque to make it easier to see the axes.
|
|
|
|
local Item = {
|
|
Type = "ScreenSpaceRenderableRenderable",
|
|
Identifier = "ScreenSpaceRenderableRenderable_Example_Axes",
|
|
Renderable = {
|
|
Type = "RenderableCartesianAxes"
|
|
},
|
|
BackgroundColor = { 0.0, 0.0, 0.0, 1.0 },
|
|
CameraPosition = { 1.0, 1.0, 1.0 },
|
|
CameraFov = 80.0
|
|
}
|
|
|
|
asset.onInitialize(function()
|
|
openspace.addScreenSpaceRenderable(Item)
|
|
end)
|
|
|
|
asset.onDeinitialize(function()
|
|
openspace.removeScreenSpaceRenderable(Item)
|
|
end)
|