AvatarRendererOptions
Options of createAvatarRenderer.
Extends
Section titled “Extends”Properties
Section titled “Properties”failIfMajorPerformanceCaveat?
Section titled “failIfMajorPerformanceCaveat?”
optionalfailIfMajorPerformanceCaveat?:boolean
Refuse a context the browser says is much slower than usual (software rendering). Default true.
Inherited from
Section titled “Inherited from”DetectOptions.failIfMajorPerformanceCaveat
instancing?
Section titled “instancing?”
optionalinstancing?:boolean
Turn off instancing / VAOs (tests, comparisons).
Inherited from
Section titled “Inherited from”
optionalvao?:boolean
Turn off vertex array objects (tests, comparisons).
Inherited from
Section titled “Inherited from”renderer?
Section titled “renderer?”
optionalrenderer?:RendererChoice
Force one (‘webgl’: 2, else 1). ‘auto’ (default): the order above. A forced one that fails falls back too.
Inherited from
Section titled “Inherited from”units?
Section titled “units?”
optionalunits?:object
The drawing units: a fixed size (as a 2D canvas’s width and height, e.g. the TV’s 1280 × 720 stage), stretched by CSS; the backing store is that times pixelRatio (1 by default). Without it: CSS pixels, times devicePixelRatio (at most 2).
width:
number
height
Section titled “height”height:
number
pixelRatio?
Section titled “pixelRatio?”
optionalpixelRatio?:number
Backing-store pixels per drawing unit (default: 1 with units, else devicePixelRatio, at most 2).
smooth?
Section titled “smooth?”
optionalsmooth?:number|boolean
As the SDK’s drawAvatar: smoothing per player (0.5; LOCAL_SMOOTHING, 0.8, with local), a number 0–1 (wins over local), or false (bodies already smoothed by the caller).
local?
Section titled “local?”
optionallocal?:boolean
The bodies come from a camera on the same device (a phone or a tablet playing alone), not over the network: lighter smoothing by default and interpolation half an interval behind the newest body instead of one (LOCAL_SMOOTHING, LOCAL_INTERPOLATION in @fabiplay/avatars). Default false.
interpolate?
Section titled “interpolate?”
optionalinterpolate?:boolean
Bodies interpolated at the display’s rate (true, default), or drawn as given.
tagHeight?
Section titled “tagHeight?”
optionaltagHeight?:number
Name tags: their height in drawing units (34 on the 1280 × 720 stage) and font family.
tagFont?
Section titled “tagFont?”
optionaltagFont?:string
The tags’ CSS font family (default Nunito).