Skip to content

AvatarPlayer

One player for AvatarRenderer.draw: a body, an avatar, an optional name tag.

body: Body

The body, in player space (PlayerFrame.body).


optional avatar?: string

An avatar id (fox, lion, robot, …; unknown ids: the default avatar).


optional id?: number

Who it is, for smoothing and interpolation (by default the place in the array, from 1).


optional key?: string | number

Who it is, when the caller has a stable identity that is not a small number (a tracker’s person id, a name): smoothing and interpolation follow it, whatever the place in the array. Takes precedence over id.


optional name?: string

A name tag above the head, in a pill of this colour (the player’s colour).


optional color?: string

The tag’s colour (CSS; the player’s colour).


optional alpha?: number

0–1 for the whole avatar and its tag (extra people are drawn faint). Below 1 the avatar is composited as one layer: faint, without its outlines and overlapping parts showing through each other.