Skip to content

SnapshotView beta ​

Interface of @v12-engine/engine

ts
export interface SnapshotView

Who a snapshot is being made for, as a component shapes its part of it

Members ​

ally ​

ts
readonly ally: boolean;

Whether the entity's owner is the player, or an ally of theirs (an observer is everyone's)

isAlly ​

ts
readonly isAlly: (owner: PlayerId) => boolean;

Whether an owner is the player or an ally of theirs (SessionView.isAlly)

knows ​

ts
readonly knows: (entity: Entity) => boolean;

Whether the player's team can see another entity right now (SessionView.knows): what else of it the part may name

observer ​

ts
readonly observer: boolean;

Whether the snapshot is for an observer, who has no player

own ​

ts
readonly own: boolean;

Whether the entity is the player's own

player ​

ts
readonly player: PlayerId | undefined;

The player it is made for; undefined for an observer

sees ​

ts
readonly sees: (x: number, z: number) => boolean;

Whether the player's team sees a spot of the map right now (SessionView.sees)

world ​

ts
readonly world: World;

The world the snapshot is made from