Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts
ThePerformance
API provides control and information on graphics performance settings.Properties
Name | Type | Summary |
---|---|---|
performancePreset | Performance.PerformancePreset |
The current graphics performance preset. |
refreshRateProfile | Performance.RefreshRateProfile |
The current refresh rate profile. |
Methods
Name | Return Value | Summary |
---|---|---|
getActiveRefreshRate
|
number |
Gets the current target refresh rate, in Hz, per the current refresh rate profile and refresh rate regime if in desktop mode; a higher rate if in VR mode. |
getCustomRefreshRate
|
int |
Gets the value for a specific RefreshRateRegime. |
getPerformancePreset
|
Performance.PerformancePreset |
Gets the current graphics performance preset in use. |
getPerformancePresetNames
|
Array.<string> |
Gets the names of the graphics performance presets. |
getRefreshRateProfile
|
Performance.RefreshRateProfile |
Gets the current refresh rate profile in use. |
getRefreshRateProfileNames
|
Array.<string> |
Gets the names of the refresh rate profiles. |
getRefreshRateRegime
|
RefreshRateRegime |
Gets the current refresh rate regime that's in effect. |
getUXMode
|
UXMode |
Gets the current user experience mode. |
setCustomRefreshRate
|
None |
Sets a custom refresh rate. |
setPerformancePreset
|
None |
Sets graphics performance to a preset. |
setRefreshRateProfile
|
None |
Sets the curfrent refresh rate profile. |
Signals
Name | Summary |
---|---|
settingsChanged
|
Triggered when the performance preset or refresh rate profile is changed. |
Type Definitions
PerformancePreset Type: number |
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Graphics performance presets.
|
RefreshRateProfile Type: number |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Refresh rate profile.
|
Method Details
(static) getActiveRefreshRate( ) → {number}
Returns: The current target refresh rate, in Hz. |
---|
Gets the current target refresh rate, in Hz, per the current refresh rate profile and refresh rate regime if in desktop mode; a higher rate if in VR mode. |
(static) getCustomRefreshRate( ) → {int}
Returns: - The value from the specified regime |
||||
---|---|---|---|---|
Gets the value for a specific RefreshRateRegime. Parameters
|
(static) getPerformancePreset( ) → {Performance.PerformancePreset}
Returns: The current graphics performance preset in use. |
---|
Gets the current graphics performance preset in use. |
(static) getPerformancePresetNames( ) → {Array.<string>}
Returns: The names of the graphics performance presets. The array index values correspond to Performance.PerformancePreset values. |
---|
Gets the names of the graphics performance presets. |
(static) getRefreshRateProfile( ) → {Performance.RefreshRateProfile}
Returns: The refresh rate profile. |
---|
Gets the current refresh rate profile in use. |
(static) getRefreshRateProfileNames( ) → {Array.<string>}
Returns: The names of the refresh rate profiles. The array index values correspond to Performance.RefreshRateProfile values. |
---|
Gets the names of the refresh rate profiles. |
(static) getRefreshRateRegime( ) → {RefreshRateRegime}
Returns: The current refresh rate regime. |
---|
Gets the current refresh rate regime that's in effect. |
(static) getUXMode( ) → {UXMode}
Returns: The current user experience mode. |
---|
Gets the current user experience mode. |
(static) setCustomRefreshRate( refreshRateRegime, value ) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Sets a custom refresh rate. Parameters
|
(static) setPerformancePreset( performancePreset ) | ||||||
---|---|---|---|---|---|---|
Sets graphics performance to a preset. Parameters
|
(static) setRefreshRateProfile( refreshRateProfile ) | ||||||
---|---|---|---|---|---|---|
Sets the curfrent refresh rate profile. Parameters
|
Signal Details
settingsChanged(
)
Returns: Signal |
---|
Triggered when the performance preset or refresh rate profile is changed. |