Reference · Journey mode: transfers, launch windows and flip-and-burn trips
Placetype
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 it
import type { Place } from "@johnmorrisdotca/uchusen-rockets/journey";
Definition
interface Place {
phase: Phase;
index: number;
fraction: number;
missionS: number;
scale: number;
}
Members
| Name | Type | Description |
|---|---|---|
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. |
Examples
import type { Place } from "@johnmorrisdotca/uchusen-rockets/journey";
const words = (place: Place) => `${place.phase.id} ${Math.round(place.fraction * 100)} %`;
console.log(typeof words);functionWhat it prints (run when this page was built)