Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / effectivePixelRatio

Function: effectivePixelRatio() ​

ts
function effectivePixelRatio(
   limits, 
   devicePixelRatio, 
   width, 
   height, 
   dynamicScale?): number;

Defined in: quality/presets.ts:97

The pixel ratio to draw at: the device's, capped by the preset, times the player's and the governor's scale. Ultra also stays inside a pixel budget.

Parameters ​

ParameterTypeDefault value
limitsPick<QualityLimits, "pixelRatioCap" | "resolutionScale" | "preset">undefined
devicePixelRationumberundefined
widthnumberundefined
heightnumberundefined
dynamicScalenumber1

Returns ​

number