ReplayPlayback beta
Interface of @v12-engine/client
export interface ReplayPlaybackA replay being played: held and let go, faster or slower, and taken to any moment of it. What the bar over a replay shows (replayScene)
Members
apart
readonly apart: Accessor<number | null>;Where the game played back came apart from the one recorded, in seconds from its start: its hash differed there (the rules changed since), and from then it is the game these rules make. Null while it has not
catchingUp
readonly catchingUp: Accessor<number | null>;How far it has come to the moment asked, 0 to 1, while there is more than half a second of the game still to run to it (a seek, a fast speed); null while it keeps up
dispose
dispose(): void;Stops following the replay: with the game that plays it
length
readonly length: number;How long the replay is, in seconds of the game
playing
readonly playing: Accessor<boolean>;Whether it is running, or held
seconds
readonly seconds: Accessor<number>;Where it is, in seconds from its start
seek
seek(seconds: number): void;Goes to a moment of it, in seconds from its start, ahead or back, in the same game: run a slice at a time, the screen going on meanwhile (catchingUp); back from the last checkpoint before it
setSpeed
setSpeed(speed: number): void;Sets the speed of the replay, one of speeds
speed
readonly speed: Accessor<number>;How fast it runs when it does
speeds
readonly speeds: readonly number[];The speeds there are to pick from (REPLAY_SPEEDS)
step
step(): void;Holds it, and goes on by one tick of the game
toggle
toggle(): void;Holds it, or lets it go on