GuideHandle型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A guide beside a cube, on the page.
インポート
import type { GuideHandle } from "@johnmorrisdotca/kyuubu";
定義
type GuideHandle = {
readonly guide: Guide;
takeBack(): void;
makeNext(): void;
load(source: GuideSource): void;
setLocale(locale: KyuubuLanguage): void;
destroy(): void;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
guide | Guide | The guide it shows: what is next, what has been done, any detour. |
takeBack | (): void | Every detour taken back, on the cube. |
makeNext | (): void | The next movement made for the person, on the cube, after taking back any detour. |
load | (source: GuideSource): void | Another list or the method, from the cube as it is now. |
setLocale | (locale: KyuubuLanguage): void | |
destroy | (): void | Take it off the page, and the hint off the cube. The cube stays as it is. |
例
import type { GuideHandle } from "@johnmorrisdotca/kyuubu";
import { CubeView, mountGuide } from "@johnmorrisdotca/kyuubu";
const value: GuideHandle = mountGuide(document.createElement("div"), new CubeView(document.createElement("div"), { size: 3, interactive: true }), { moves: "R U" });
console.log(value.guide.next?.text);この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。