ReplayOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
How a replay is set up.
インポート
import type { ReplayOptions } from "@johnmorrisdotca/kyuubu";
定義
type ReplayOptions = {
speed?: number;
loop?: boolean;
onChange?: (status: ReplayStatus) => void;
onEnd?: () => void;
clock?: ReplayClock;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
speed (省略可) | number | undefined | The speed it starts at: 1, the solve's own pace, when left out. |
loop (省略可) | boolean | undefined | Whether it begins again when it ends. |
onChange (省略可) | ((status: ReplayStatus) => void) | undefined | Called whenever anything in |
onEnd (省略可) | (() => void) | undefined | Called once each time the end is reached. |
clock (省略可) | ReplayClock | undefined | The clock to run by. |
例
import type { ReplayOptions } from "@johnmorrisdotca/kyuubu";
const value: ReplayOptions = { speed: 2, loop: false, onEnd: () => console.log("Finished") };
console.log(value.speed);2出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。