movingGroupsOf関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The names of the groups a part has that a flight can turn.
インポート
import { movingGroupsOf } from "@johnmorrisdotca/uchusen-rockets";
定義
function movingGroupsOf(pieces: readonly Piece[]): string[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
pieces | readonly Piece[] | The pieces of a part. |
戻り値
string[]
The distinct names, in the order they come.
例
import { build } from "@johnmorrisdotca/uchusen-rockets/build";
import { movingGroupsOf } from "@johnmorrisdotca/uchusen-rockets";
const stage = build({ rocket: "falcon-9", variant: "block-5" }).parts[0];
console.log(stage ? movingGroupsOf(stage.pieces) : []);[ 'legs', 'grid-fins' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。