ScreenSpaceDate
Inherits ScreenSpaceRenderable
Members
Inherited members from ScreenSpaceRenderable
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The type of the |
|
Must name a valid ScreenSpaceRenderable |
No |
|
A fixed color that is combined with the screen space renderable to create the final color. The actual color of the screen space renderable is alpha-blended with the background color to produce the final result. |
|
Value of type ‘Color4’ |
Yes |
|
The color of the border. |
|
Value of type ‘Color3’ |
Yes |
|
If this value is enabled and a border width is set, the border will be rendered as a feathered border rather than a hard corner. |
|
Value of type ‘Boolean’ |
Yes |
|
The width of the border. |
|
Greater than: 0 |
Yes |
|
Determines the position of this screen space plane in Cartesian three-dimensional coordinates (meters). |
|
Value of type ‘Vector3 |
Yes |
|
Determines whether this sceen space object will be rendered or not. |
|
Value of type ‘Boolean’ |
Yes |
|
If enabled, the object will be rotated to face the camera position. Any local rotation is then applied after this rotation. |
|
Value of type ‘Boolean’ |
Yes |
|
Sets the gamma correction of the texture that is applied in addition to the global gamma value. |
|
Value of type ‘Double’ |
Yes |
|
The unique identifier for this screen space renderable. It has to be unique amongst all existing screen space nodes that have been added to the scene. |
|
An identifier string. May not contain ‘.’, spaces, newlines, or tabs |
Yes |
|
If set, the plane’s texture is multiplied with this color. Useful for applying a color grayscale images. |
|
Value of type ‘Color3’ |
Yes |
|
The name of the |
|
Value of type ‘String’ |
Yes |
|
The opacity of the screen space object. If 1, the object is completely opaque. If 0, the object is completely transparent. |
|
In range: ( 0, 1) |
Yes |
|
Determines the position of this screen space plane in a coordinate system based on radius (meters), azimuth (radians), and elevation (radians). |
|
Value of type ‘Vector3 |
Yes |
|
If true, this screen space renderable is going to ignore the global blackout factor from the Render Engine and will always render at full opacity. If false, it will adhere to the factor and fade out like the rest of the 3D rendering. |
|
Value of type ‘Boolean’ |
Yes |
|
An Euler rotation (x, y, z) to apply to the screen space object. |
|
Value of type ‘Vector3 |
Yes |
|
A scale factor for the plane that can be used to increase or decrease the visual size. The default size is determined separately for each screen space renderable type and may for example be affected by the size of an image being displayed. |
|
Value of type ‘Double’ |
Yes |
|
Defines either a single or multiple tags that apply to this |
|
Value of type ‘String’, or Value of type ‘Table’ |
Yes |
|
Determines whetether the z/radius values affects the size of the plane or not. |
|
Value of type ‘Boolean’ |
Yes |
|
Determines whether the location of this screen space plane will be specified using radius, azimuth and elevation (if ‘true’) or using Cartesian coordinates. The Cartesian coordinate system is useful if a regular rendering is applied, whereas the radius azimuth elevation are most useful in a planetarium environment. |
|
Value of type ‘Boolean’ |
Yes |
Asset Examples
Year Month Day
This example creates a screen space renderable that shows the current simulation time with a resolution of days.
1local Item = {
2 Type = "ScreenSpaceDate",
3 Identifier = "ScreenSpaceDate_Example_YearMonthDay",
4 Name = "ScreenSpace Date Example - Year/Month/Day",
5 TimeFormat = "YYYY MON DD"
6}
7
8
9asset.onInitialize(function()
10 openspace.addScreenSpaceRenderable(Item)
11end)
12
13asset.onDeinitialize(function()
14 openspace.removeScreenSpaceRenderable(Item)
15end)
Font Size
This example creates a screen space renderable that shows the current simulation time with a larger font. The FontSize parameter is increased to improve the fidelity of the text being rendered. The Scale parameter will make the text show up larger on the screen.
1local Item = {
2 Type = "ScreenSpaceDate",
3 Identifier = "ScreenSpaceDate_Example_FontSize",
4 Name = "ScreenSpace Date Example - Font Size",
5 Scale = 0.5,
6 FontSize = 72
7}
8
9
10asset.onInitialize(function()
11 openspace.addScreenSpaceRenderable(Item)
12end)
13
14asset.onDeinitialize(function()
15 openspace.removeScreenSpaceRenderable(Item)
16end)
Basic
This example creates a screen space renderable that shows the current simulation time.
1local Item = {
2 Type = "ScreenSpaceDate",
3 Identifier = "ScreenSpaceDate_Example",
4 Name = "ScreenSpace Date Example - Basic"
5}
6
7
8asset.onInitialize(function()
9 openspace.addScreenSpaceRenderable(Item)
10end)
11
12asset.onDeinitialize(function()
13 openspace.removeScreenSpaceRenderable(Item)
14end)
No Decorations
This example creates a screen space renderable that shows the current simulation time without any additional text surrounding the current date.
1local Item = {
2 Type = "ScreenSpaceDate",
3 Identifier = "ScreenSpaceDate_Example_NoDecoration",
4 Name = "ScreenSpace Date Example - No Decoration",
5 FormatString = "{}"
6}
7
8
9asset.onInitialize(function()
10 openspace.addScreenSpaceRenderable(Item)
11end)
12
13asset.onDeinitialize(function()
14 openspace.removeScreenSpaceRenderable(Item)
15end)
Timezone
This example creates a screen space renderable that shows the current simulation time with a timezone of UTC-7 (=PDT)
1local Item = {
2 Type = "ScreenSpaceDate",
3 Identifier = "ScreenSpaceDate_Example_Timezone",
4 Name = "ScreenSpace Date Example - Timezone",
5 TimeFormat = "YYYY MON DD HR:MN:SC.### PDT ::UTC-7"
6}
7
8
9asset.onInitialize(function()
10 openspace.addScreenSpaceRenderable(Item)
11end)
12
13asset.onDeinitialize(function()
14 openspace.removeScreenSpaceRenderable(Item)
15end)
Font
This example creates a screen space renderable that shows the current simulation time with a non-standard font. This is using one of the fonts that is loaded by default in the openspace.cfg file.
1local Item = {
2 Type = "ScreenSpaceDate",
3 Identifier = "ScreenSpaceDate_Example_Font",
4 Name = "ScreenSpace Date Example - Font",
5 FontName = "Light"
6}
7
8
9asset.onInitialize(function()
10 openspace.addScreenSpaceRenderable(Item)
11end)
12
13asset.onDeinitialize(function()
14 openspace.removeScreenSpaceRenderable(Item)
15end)
Day of Year
This example creates a screen space renderable that shows the current simulation time with the current year and the number of days that have passed in the year.
1local Item = {
2 Type = "ScreenSpaceDate",
3 Identifier = "ScreenSpaceDate_Example_DayOfYear",
4 Name = "ScreenSpace Date Example - Day of Year",
5 TimeFormat = "YYYY DOY"
6}
7
8
9asset.onInitialize(function()
10 openspace.addScreenSpaceRenderable(Item)
11end)
12
13asset.onDeinitialize(function()
14 openspace.removeScreenSpaceRenderable(Item)
15end)