DashboardItemFramerate
Inherits DashboardItem
This DashboardItem provides information about the current framerate at which the rendering updates. The FrametimeType can have different values that will show different statistical aspects of the framerate.
Deltatime: Shows the time in milliseconds it took to render the previous frame -Average Deltatime: Shows the time that it took to render in milliseconds averaged over the last 100 or so frames -Deltatime extremes: Shows the minimum and maximum values of the render time in milliseconds over the last 100 or so frames -Deltatime standard deviation: Shows the standard deviation of the render time in milliseconds over the last 100 or so frames -Deltatime coefficient of variation: Shows the normalized root-mean-square deviation of the render time in milliseconds over the last 100 or so frames -Frames per second: Shows the inverse of the delta time it took the render the last frame. -Average frames per second: Shows average number of frames that have been presented over the last 100 or so frames
Members
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
This value is the name of the font that is used. It can either refer to an internal name registered previously, or it can refer to a path that is used. |
|
Value of type ‘String’ |
Yes |
|
This value determines the size of the font that is used to render the distance. |
|
Value of type ‘Double’ |
Yes |
|
This value determines the units in which the frame time is displayed. |
|
In list { Deltatime, Average Deltatime, Deltatime extremes, Deltatime standard deviation, Deltatime coefficient of variation, Frames per second, Average frames per second } |
Yes |
Inherited members from DashboardItem
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The unique identifier for this DashboardItem. |
|
An identifier string. May not contain ‘.’, spaces, newlines, or tabs |
No |
|
Determines the type of the DashbordItem that should be created. |
|
Value of type ‘String’ |
No |
|
If this value is set to ‘true’ this dashboard item is shown in the dashboard. Otherwise it will be hidden. |
|
Value of type ‘Boolean’ |
Yes |
|
The name for the DashboardItem that is used when showing it in the user interface. |
|
Value of type ‘String’ |
Yes |
Asset Examples
Basic
This example adds a dashboard item that shows the average number of frames per second, which is the default value for the frame time type setting.
1local Item = {
2 Identifier = "DashboardItemFramerate_Example",
3 Type = "DashboardItemFramerate"
4}
5
6asset.onInitialize(function()
7 openspace.dashboard.addDashboardItem(Item)
8end)
9
10asset.onDeinitialize(function()
11 openspace.dashboard.removeDashboardItem(Item)
12end)
Delta Time
This example adds a dashboard item that shows the frame rate of the last frame in milliseconds.
1local Item = {
2 Identifier = "DashboardItemFramerate_Example_DeltaTime",
3 Type = "DashboardItemFramerate",
4 FrametimeType = "Deltatime"
5}
6
7asset.onInitialize(function()
8 openspace.dashboard.addDashboardItem(Item)
9end)
10
11asset.onDeinitialize(function()
12 openspace.dashboard.removeDashboardItem(Item)
13end)