frameAt関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Everything the picture needs at a place on the timeline, for a vehicle height metres tall.
インポート
import { frameAt } from "@johnmorrisdotca/uchusen-rockets";
定義
function frameAt(flight: Flight, position: number, parts: readonly FlightPart[], height: number): FlightFrame
引数
| 名前 | 型 | 説明 |
|---|---|---|
flight | Flight | A flight. |
position | number | A place on the timeline. |
parts | readonly FlightPart[] | Each part's slot and the height of its base in the stack, in metres. |
height | number | The vehicle's height in metres. |
戻り値
FlightFrame
The frame to draw.
例
import { flightOf, frameAt } from "@johnmorrisdotca/uchusen-rockets";
const flight = flightOf("falcon-9", "block-5");
if (flight) console.log(frameAt(flight, 1, [{ slot: "first-stage", baseY: 0 }, { slot: "second-stage", baseY: 41 }], 70).burns);{ 'first-stage': 9 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。