Reference · Rockets, variants, parts and the fit check
steppedPlacefunction
The place after seconds of play. rate is story seconds in one real second. With watch, the flight underway takes WATCH_FLIGHT_S real seconds, whatever rate is.
Import it
import { steppedPlace } from "@johnmorrisdotca/uchusen-rockets";
Definition
function steppedPlace(steps: readonly PlayStep[], at: number, seconds: number, rate: number, watch: boolean): number
Parameters
| Name | Type | Description |
|---|---|---|
steps | readonly PlayStep[] | The ship's build order. |
at | number | How far through the build, from 0 to 1. |
seconds | number | Real seconds just elapsed. |
rate | number | Story seconds in one real second. |
watch | boolean | Whether one flight should take |
Returns
number
The place, from 0 to 1.
Examples
import { steppedPlace } from "@johnmorrisdotca/uchusen-rockets";
const steps = [{ slot: "keel", start: 0, days: 10 }];
console.log(steppedPlace(steps, 0, 30, 1, true));1What it prints (run when this page was built)