mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Add an example to show the current in-game time in a screenspace object (closes #3312)
This commit is contained in:
44
data/assets/examples/screenspacedate.asset
Normal file
44
data/assets/examples/screenspacedate.asset
Normal file
@@ -0,0 +1,44 @@
|
||||
local Dashboard = {
|
||||
Identifier = "ScreenSpaceTime",
|
||||
Name = "Time",
|
||||
Type = "ScreenSpaceDashboard",
|
||||
FaceCamera = false,
|
||||
Scale = 3.0,
|
||||
Items = {
|
||||
{
|
||||
Type = "DashboardItemDate",
|
||||
Identifier = "Date",
|
||||
GuiName = "Date",
|
||||
FontSize = 72,
|
||||
FormatString = "{}",
|
||||
TimeFormat = "YYYY MON DD HR:MN:SC.### ::RND"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addScreenSpaceRenderable(Dashboard)
|
||||
|
||||
openspace.setPropertyValueSingle("ScreenSpace.ScreenSpaceTime.Size", {0.000000,0.000000,640.000000,320.000000})
|
||||
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.addScreenSpaceRenderable(Dashboard)
|
||||
end)
|
||||
|
||||
asset.export(Dashboard)
|
||||
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "ScreenSpace - Date",
|
||||
Description = [[
|
||||
This asset provides a Date dashboard item that is shown on a screen space object.
|
||||
This can be place on a dome surface to show the current time to the audience.
|
||||
]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
Reference in New Issue
Block a user