Skip to content

EngineOptions

Options of createEngine: all optional.

const engine = await createEngine({ play, background: '#132040', maxPixelRatio: 1.5 })

optional play?: PlayLike | null

The SDK’s play object (connect()) or window.FabiPlay. Without it there are no hands or avatars.


optional canvas?: HTMLCanvasElement

The canvas to draw in; by default one is made to fill the page.


optional renderer?: RendererChoice

Force a renderer (‘canvas2d’, ‘webgl1’, ‘webgl2’); also ?renderer= in the address.


optional tier?: TierName

Force a tier; also ?tier= in the address (never lowered during play). Else the screen’s hint (play.device), no higher than this game’s cached tier; else the cached probe, or a new one.


optional failIfMajorPerformanceCaveat?: boolean

Refuse slow (software) WebGL; default true.


optional probe?: boolean

Probe the device when there is no cached tier (default true; false: medium).


optional maxPixelRatio?: number

Device pixel ratio cap (default 2).


optional background?: ColorLike

The stage’s colour when there is no video behind it; transparent by default (the page shows through).


optional instancing?: boolean

Engine version of instancing etc. (tests).