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.

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.

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) 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) setPerformancePreset( performancePreset )

Sets graphics performance to a preset.

Parameters

Name Type Description
performancePreset Performance.PerformancePreset

The graphics performance preset to 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.