Skip to content

QualityLook beta ​

Interface of @v12-engine/client

ts
export interface QualityLook

What a game says of the quality (GameView.world.quality)

Members ​

adapt ​

ts
adapt?: boolean;

Goes to the lower preset by itself, rather than offering it. No when left out

budget ​

ts
budget?: number;

Frames a second the game means to keep: under it for half a minute, a lower preset is offered. 30 when left out; a little under the player's cap where that is lower (maxFps)

onSlow ​

ts
onSlow?: (suggested: QualityPreset, client: GameClientApi, slowness?: QualitySlowness) => boolean | void;

Told the game keeps missing its budget, with the preset that may do better and why (QualitySlowness: the heaviest pass of the card's, where it could be timed). True when it is the game's to say: the client's offer (a toast, a line in the settings) is then not shown

pick ​

ts
pick?: (device: DeviceInfo) => QualityPreset;

The preset of the first run, from the device: high when left out (pickPreset is the client's guess from the device)

pixels ​

ts
pixels?: number;

The most pixels a preset draws at its render resolution: on a screen of more (a laptop's at 2×), every preset's resolution is capped so that no more are drawn (scaleCap); a resolution the player sets by hand is not. No cap (0, PIXELS_CAP) when left out: every preset at its own resolution, the highest at the screen's own pixels. The editor's Look panel writes it to the game's quality.json

power ​

ts
power?: PowerPreference;

The GPU asked for, as the engine is made: high-performance when left out, low-power to spare a battery

presets ​

ts
presets?: Partial<Record<QualityPreset, Partial<QualityKnobs>>>;

What it changes of each preset: a game with heavy effects asks less of them on low

probe ​

ts
probe?: boolean;

Whether a first run measures the card, a two-second flight of the camera hidden behind the loading screen at the highest preset, and starts at the preset its median frame suits (Quality.probe). No when left out: a game starts at pick's preset, the highest where it says nothing

triangles ​

ts
triangles?: Partial<Record<QualityPreset, number>>;

The triangles a frame may draw at each preset, what the editor's Statistics panel measures the view of a map against: TRIANGLE_BUDGETS where left out