Skip to content

PlayerFrame

One player in a frame the game gets: the body, its hands as pointers, its shape, its avatar.

id: number

The player, from 1.


body: Body

The 33 landmarks, in player space (see Body; P names the indices).


leftHand: Point | null

The left hand as a pointer, in fractions of the screen (0–1): the wrist, with the space the arms reach around the shoulders stretched to the whole screen and clamped to it, so a child reaches every corner without walking. Not where the wrist is on screen: draw on the body with toScreen(wrist). null when the camera doesn’t see the wrist (or the child holds Fabi Play’s crossed arms).


rightHand: Point | null

The right hand as a pointer, as leftHand.


shape: Shape | null

The pose held right now, if any.


lane: -1 | 0 | 1

Which lane the child stands in: -1 left, 0 centre, 1 right.


optional avatar?: string

The avatar of player id (slot id − 1): the one the child picked on the phone, or the slot’s default (defaultAvatarFor). It rides on every frame, so a game never misses a change and needs no extra message. Hosts before avatars don’t send it; the SDK’s avatarOf falls back to the slot’s default then, and for ids it does not know.