Skip to content

DrawAvatarOptions

Options of drawAvatar (and, smooth and interpolate, of smoothedBody).

optional alpha?: number

0–1, for the whole avatar.


optional smooth?: number | boolean

Smoothing, per player (needs a player id: a frame, or a body with a player number): true (default: 0.5, or 0.8 when the host says the bodies are local, see Play.localPoses), a number 0–1 (how much of each new frame to take; 1 is none; it wins over the host’s hint), or false. The avatar then doesn’t jitter, and limbs the camera loses for a moment don’t blink. It advances once per new body, however often you draw.


optional interpolate?: boolean

true (default): the body for this animation frame, interpolated between the camera’s last two (needs a frame, or a player id), so the avatar moves at the display’s rate. false: the newest body as it came (smoothed).