Skip to content

AvatarRendererOptions

Options of createAvatarRenderer.

optional failIfMajorPerformanceCaveat?: boolean

Refuse a context the browser says is much slower than usual (software rendering). Default true.

DetectOptions.failIfMajorPerformanceCaveat


optional instancing?: boolean

Turn off instancing / VAOs (tests, comparisons).

DetectOptions.instancing


optional vao?: boolean

Turn off vertex array objects (tests, comparisons).

DetectOptions.vao


optional renderer?: RendererChoice

Force one (‘webgl’: 2, else 1). ‘auto’ (default): the order above. A forced one that fails falls back too.

DetectOptions.renderer


optional units?: 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: number


optional pixelRatio?: number

Backing-store pixels per drawing unit (default: 1 with units, else devicePixelRatio, at most 2).


optional smooth?: 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).


optional local?: 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.


optional interpolate?: boolean

Bodies interpolated at the display’s rate (true, default), or drawn as given.


optional tagHeight?: number

Name tags: their height in drawing units (34 on the 1280 × 720 stage) and font family.


optional tagFont?: string

The tags’ CSS font family (default Nunito).