Reference · Cube engine and views
ReplayOptionstype
How a replay is set up.
Import it
import type { ReplayOptions } from "@johnmorrisdotca/kyuubu";
Definition
type ReplayOptions = {
speed?: number;
loop?: boolean;
onChange?: (status: ReplayStatus) => void;
onEnd?: () => void;
clock?: ReplayClock;
};
Members
| Name | Type | Description |
|---|---|---|
speed (optional) | number | undefined | The speed it starts at: 1, the solve's own pace, when left out. |
loop (optional) | boolean | undefined | Whether it begins again when it ends. |
onChange (optional) | ((status: ReplayStatus) => void) | undefined | Called whenever anything in |
onEnd (optional) | (() => void) | undefined | Called once each time the end is reached. |
clock (optional) | ReplayClock | undefined | The clock to run by. |
Examples
import type { ReplayOptions } from "@johnmorrisdotca/kyuubu";
const value: ReplayOptions = { speed: 2, loop: false, onEnd: () => console.log("Finished") };
console.log(value.speed);2What it prints (run when this page was built)