Host · interface

DisplayInfo

A display the game could be shown on, as the platform reports it.

Explained in Display and the host.

interface DisplayInfo
import type { DisplayInfo } from '@driftengine/core';

Properties

NameTypeDescription
idreadonlystringStable for as long as the display is attached. Opaque: do not parse it.
labelreadonlystringWhat to show in a list. A platform that has no name for it repeats the size.
widthreadonlynumberLogical pixels, which is what a window is sized in.
heightreadonlynumber
scalereadonlynumberDevice pixels per logical pixel on this display.
refreshHzreadonlynumber | nullNull where the platform will not say, which includes every browser.
primaryreadonlyboolean