Reference · Cube engine and views
ReplayStatustype
What a replay tells whoever is showing it.
Import it
import type { ReplayStatus } from "@johnmorrisdotca/kyuubu";
Definition
type ReplayStatus = {
position: number;
total: number;
playing: boolean;
ended: boolean;
scrambleAt: number;
scrambleTotal: number;
speed: number;
loop: boolean;
elapsedMs: number;
};
Members
| Name | Type | Description |
|---|---|---|
position | number | How many steps have been made: 0 on the scrambled cube, |
total | number | How many steps the solve has. |
playing | boolean | Whether it is running. |
ended | boolean | Whether it has reached the end. |
scrambleAt | number | How many steps of the scramble have been made: all of them ( |
scrambleTotal | number | How many steps the scramble has. |
speed | number | The speed it runs at: 1 is the solve's own pace. |
loop | boolean | Whether it begins again when it ends. |
elapsedMs | number | The time into the solve at its own pace, in milliseconds. |
Examples
import type { ReplayStatus } from "@johnmorrisdotca/kyuubu";
const value: ReplayStatus = { position: 0, total: 2, playing: false, ended: false, scrambleAt: 1, scrambleTotal: 1, speed: 1, loop: false, elapsedMs: 0 };
console.log(value.position);0What it prints (run when this page was built)