Skip to content

SnapshotField beta ​

Interface of @v12-engine/engine

ts
export interface SnapshotField<K extends keyof Snapshot = keyof Snapshot>

A part of the snapshot a player is sent, captured by the feature it is of: the projectiles, the items on the ground, the score. Before the entities (head) or after the players; left out of the snapshot where it gives nothing (undefined). Listed by the engine for its own, by a pack in GamePack.snapshotFields (a key of its own added to Snapshot by declaration merging)

Members ​

capture ​

ts
capture(view: SessionView): Snapshot[K] | undefined;

Reads this part of the snapshot for the seat's view; undefined leaves it out of the snapshot

ts
readonly head?: boolean;

Before the entities and the players, where the tick's own facts are (the hour, the outcome)

key ​

ts
readonly key: K;

The key of Snapshot this field fills