EngineOptions
Options of createEngine: all optional.
Example
Section titled “Example”const engine = await createEngine({ play, background: '#132040', maxPixelRatio: 1.5 })Properties
Section titled “Properties”
optionalplay?:PlayLike|null
The SDK’s play object (connect()) or window.FabiPlay. Without it there are no hands or avatars.
canvas?
Section titled “canvas?”
optionalcanvas?:HTMLCanvasElement
The canvas to draw in; by default one is made to fill the page.
renderer?
Section titled “renderer?”
optionalrenderer?:RendererChoice
Force a renderer (‘canvas2d’, ‘webgl1’, ‘webgl2’); also ?renderer= in the address.
optionaltier?: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.
failIfMajorPerformanceCaveat?
Section titled “failIfMajorPerformanceCaveat?”
optionalfailIfMajorPerformanceCaveat?:boolean
Refuse slow (software) WebGL; default true.
probe?
Section titled “probe?”
optionalprobe?:boolean
Probe the device when there is no cached tier (default true; false: medium).
maxPixelRatio?
Section titled “maxPixelRatio?”
optionalmaxPixelRatio?:number
Device pixel ratio cap (default 2).
background?
Section titled “background?”
optionalbackground?:ColorLike
The stage’s colour when there is no video behind it; transparent by default (the page shows through).
instancing?
Section titled “instancing?”
optionalinstancing?:boolean
Engine version of instancing etc. (tests).