ViewChoice型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What the family's view controls report: the turn and tip in degrees, the zoom (1 is the whole rocket in the picture) and the pan in pixels.
インポート
import type { ViewChoice } from "@johnmorrisdotca/uchusen-rockets";
定義
interface ViewChoice {
yaw: number;
tilt: number;
roll?: number;
zoom: number;
panX: number;
panY: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
yaw | number | |
tilt | number | |
roll (省略可) | number | undefined | Degrees about the view's forward axis. Left out, the camera stays upright. |
zoom | number | |
panX | number | |
panY | number |
例
import type { ViewChoice } from "@johnmorrisdotca/uchusen-rockets";
const choice: ViewChoice = { yaw: 20, tilt: -5, zoom: 1, panX: 0, panY: 0 };
console.log(choice);{ yaw: 20, tilt: -5, zoom: 1, panX: 0, panY: 0 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。