CubeViewEvents型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What a cube tells the listeners on adds: a turn a person made, with the stickers after it; and the view turned, in degrees.
インポート
import type { CubeViewEvents } from "@johnmorrisdotca/kyuubu";
定義
type CubeViewEvents = {
turn: (move: CubeMove, state: string) => void;
look: (yaw: number, pitch: number) => void;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
turn | (move: CubeMove, state: string) => void | |
look | (yaw: number, pitch: number) => void |
例
import type { CubeViewEvents } from "@johnmorrisdotca/kyuubu";
const value: CubeViewEvents = { turn: (move, state) => console.log(move, state), look: (yaw, pitch) => console.log(yaw, pitch) };
console.log(Object.keys(value));[ 'turn', 'look' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。