PartRecord型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The one record every part has: its id, kind and name, the rocket and variants it is true for, its height and diameter in metres, the sourced figures, its joints, any painted model, and where its shape came from.
インポート
import type { PartRecord } from "@johnmorrisdotca/uchusen-rockets";
定義
interface PartRecord {
id: string;
kind: PartKind;
name: string;
rocket: string;
trueTo: readonly string[];
height: number;
diameter: number;
sourced: {
height: Figure;
diameter: Figure;
};
joints: {
readonly top?: Joint;
readonly bottom?: Joint;
};
strapOn?: {
x: number;
z: number;
y?: number;
};
painted: {
file: string;
credit: CreditId;
ownNozzle?: true;
also?: readonly CreditId[];
} | null;
drawnFrom: string;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
id | string | |
kind | PartKind | |
name | string | |
rocket | string | The rocket and the variants it is true for. Empty: it was never part of a flown or announced vehicle. |
trueTo | readonly string[] | |
height | number | Metres, as drawn: equal to the sourced figure wherever there is one. |
diameter | number | |
sourced | { height: Figure; diameter: Figure; } | The sourced figures, blank where no source gives one. |
joints | { readonly top?: Joint; readonly bottom?: Joint; } | |
strapOn (省略可) | { x: number; z: number; y?: number; } | undefined | It is placed rather than stacked, this far from the rocket's axis and this far up (left out: on the ground): a side booster beside the core, or a booster standing on a deck. |
painted | { file: string; credit: CreditId; ownNozzle?: true; also?: readonly CreditId[]; } | null | The painted look's mesh, when a licensed model gives one: its file under assets/models/ and whose it is. Otherwise this package's own code paints it. |
drawnFrom | string | What a reader should be told about where its shape came from. |
例
import { partEntry, type PartRecord } from "@johnmorrisdotca/uchusen-rockets";
const record: PartRecord | undefined = partEntry("starship-v3-ship")?.record;
console.log(record?.name, record?.height, record?.trueTo);Ship, Block 3 (V3) 52.1 [ 'v3' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。