Performance

Description

Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts

The Performance 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.

ValueNameDescription
0UNKNOWNCustom settings of world detail, rendering effects, and refresh rate.
1LOWLow world detail, no rendering effects, lo refresh rate.
2MIDMedium world detail, some rendering effects, medium refresh rate.
3HIGHMaximum world detail, all rendering effects, high refresh rate.
RefreshRateProfile
Type: number

Refresh rate profile.

ValueNameDescription
0ECOLow refresh rate, which is reduced when Interface doesn't have focus or is minimized.
1INTERACTIVEMedium refresh rate, which is reduced when Interface doesn't have focus or is minimized.
2REALTIMEHigh refresh rate, even when Interface doesn't have focus or is minimized.

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

Type Description
RefreshRateRegime

The regime to get the value from

(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

Name Type Description
refreshRateRegime RefreshRateRegime

The refresh rate regime

value int

The value for the regime

(static) setPerformancePreset( performancePreset )

Sets graphics performance to a preset.

Parameters

Name Type Description
performancePreset Performance.PerformancePreset

The graphics performance preset to use.

(static) setRefreshRateProfile( refreshRateProfile )

Sets the curfrent refresh rate profile.

Parameters

Name Type Description
refreshRateProfile Performance.RefreshRateProfile

The refresh rate profile.

Signal Details

settingsChanged( )
Returns: Signal

Triggered when the performance preset or refresh rate profile is changed.