Skip to content

ReplayPlayer beta ​

Interface of @v12-engine/engine

ts
export interface ReplayPlayer

A replay playing (playReplay): its session, and its clock

Members ​

apart ​

ts
readonly apart?: number | null;

Of a replay of commands, the tick it came apart from the game recorded at (its hash differed: the rules changed since), or null while it has not. Never for a replay of frames

behind ​

ts
readonly behind: number;

Ticks still to run (or hand over) to come to the moment asked, by a seek or a fast speed: 0 while it keeps up

ended ​

ts
readonly ended: boolean;

Whether all of it has played

session ​

ts
session: Promise<RemoteSession>;

The game as it was, once the welcome is in

skipTo ​

ts
skipTo(tick: number): void;

Goes to a tick, ahead or back, run (or handed over) a slice a look (REPLAY_SLICE) so that the page goes on meanwhile: behind says how much is left. Back starts again in the same session (RemoteSession.resume): a replay of commands from the last checkpoint before the tick, one of frames from its start

speed ​

ts
speed: number;

How fast it plays: 1 as it was played, 0 holds it

stop ​

ts
stop(): void;

Stops playing the replay and lets go of what it holds

tick ​

ts
readonly tick: number;

The tick of the game it is at