リファレンス · ジャーニーモード:ホーマン遷移・打ち上げ窓・フリップ&バーンの旅
Place型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Where in a trip a moment of playback is: the phase, how far through it, the mission time and how many mission seconds each screen second shows.
インポート
import type { Place } from "@johnmorrisdotca/uchusen-rockets/journey";
定義
interface Place {
phase: Phase;
index: number;
fraction: number;
missionS: number;
scale: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
phase | Phase | |
index | number | |
fraction | number | How far through the phase, 0 to 1. |
missionS | number | Mission seconds from lift-off (negative before). |
scale | number | Mission seconds shown per second on the screen in this phase. |
例
import type { Place } from "@johnmorrisdotca/uchusen-rockets/journey";
const words = (place: Place) => `${place.phase.id} ${Math.round(place.fraction * 100)} %`;
console.log(typeof words);function出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。