Skip to content

five-on-it / packages/protocol/src/snapshot-v2 / changedGroups

Function: changedGroups() ​

changedGroups(rec, prev, full, due): number

Defined in: packages/protocol/src/snapshot-v2.ts:213

The groups of an entity's record that go to a client, by their bits: every group that differs from the record the client holds (prev; everything with nothing held), the poses' only on the entity's turn (due), when they go full (the client's own), or when the entity's rest differs from the pose held (restOf: it set off or came to a stop since, whatever its turn). The one rule of both encoders (the ordered deltas and the acked ones).

Parameters ​

rec ​

Uint8Array

prev ​

Uint8Array<ArrayBufferLike> | undefined

full ​

boolean

due ​

boolean

Returns ​

number