Reference · Journey mode: transfers, launch windows and flip-and-burn trips
placeAtfunction
Which phase a moment of playback is in, and the mission time it shows. Inside a phase the two are linear; across phases the scale changes, which is how a minute of burn and a month of coast both fit on the screen.
Import it
import { placeAt } from "@johnmorrisdotca/uchusen-rockets/journey";
Definition
function placeAt(trip: Trip, playbackS: number): Place
Parameters
| Name | Type | Description |
|---|---|---|
trip | Trip | A planned trip. |
playbackS | number | Seconds since Play was pressed, at the normal speed (a faster speed multiplies the clock before calling). |
Returns
Place
The phase, how far through it, the mission time and the scale.
Examples
import { placeAt, type Trip } from "@johnmorrisdotca/uchusen-rockets/journey";
declare const trip: Trip;
console.log(placeAt(trip, 0).phase.id, placeAt(trip, 1e9).phase.id);