Networking · interface
Replicator
What a consumer packs and unpacks.
Explained in Networking and rollback.
interface Replicatorimport type { Replicator } from '@driftengine/network';In depth
encode answers -1 when the state does not fit, for the reason the wire encoders do: the caller
is a frame loop and AGENTS.md forbids throwing in one.
Methods
encode
encode(into: Uint8Array, tick: number): number| Parameter | Type | Description |
|---|---|---|
into | Uint8Array | |
tick | number |
apply
apply(from: Uint8Array, tick: number): void| Parameter | Type | Description |
|---|---|---|
from | Uint8Array | |
tick | number |