QualityStore
A game’s quality store: what the player set, Automatic’s pick, and the verbs that change them.
Extends
Section titled “Extends”QualityState
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
automatic? |
AutomaticQuality |
The level Automatic picked on this device. |
coarsePointer |
boolean |
Whether the device’s main pointer is a finger, read when the store is made. Not saved. |
detectDevice |
(hints) => void |
Reads the device for Automatic: keeps the reading it saved for the same renderer, else saves this one, then gives it a level through the game’s quality.start as it stands on this visit. |
deviceRead |
boolean |
Whether Automatic has read the device and holds its pick; the engine mounts the scene after it, so nothing draws at one level and then another. Not saved. |
dynamicResolution? |
boolean |
The dynamic resolution row; left out, the game’s default, else on where the main pointer is a finger and off elsewhere. |
dynamicResolutionBounds |
GameDynamicResolution |
Dynamic resolution’s default and bounds as the game set them. Not saved. |
dynamicScale |
number |
The share of the level’s pixel ratio the dynamic resolution scaler draws at now. Not saved. |
groups |
Partial<Record<QualityGroup, FixedQualityLevel>> |
The feature rows the player pinned, each to a level; a row left out follows level. |
level |
QualityLevel |
What the quality row holds: Automatic or a level. |
levels |
QualityLevels |
Every level’s values, the game’s overrides on the engine’s own. Not saved. |
renderScale? |
number |
The render scale row, a share of the level’s pixel ratio above 0 and at most 1; left out, the whole ratio. |
resetQuality |
() => void |
Puts every row back: Automatic, nothing pinned, the whole pixel ratio, and dynamic resolution at its default. Automatic’s pick stays. |
setDynamicResolution |
(enabled) => void |
Turns the dynamic resolution row on or off. |
setDynamicScale |
(scale) => void |
Moves the dynamic resolution scaler’s share. |
setGroupLevel |
(group, level) => void |
Pins one feature row to a level, or with undefined unpins it. |
setLevel |
(level) => void |
Picks Automatic or a level, and unpins every feature row. |
setRenderScale |
(scale) => void |
Sets the 3D resolution row, the render scale: a share above 0 and at most 1. |