本文へ移動

Uchusen Rockets宇宙船

出典つきの寸法から描いたロケットです。ページに置いて、分解して、回して見られる線画と彩色した3Dビューに加え、ロケットが本当に組み合わさるかを確かめる、型付きのデータモデルを備えています。

Uchusen は、宇宙を飛ぶ乗り物を意味する日本語「宇宙船」(うちゅうせん)から取った名前です。 名前について(英語)

目次

リファレンス · ロケット・型式・部品・適合チェック

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;
}

メンバー

名前型説明
idstring
kindPartKind
namestring
rocketstring

The rocket and the variants it is true for. Empty: it was never part of a flown or announced vehicle.

trueToreadonly string[]
heightnumber

Metres, as drawn: equal to the sourced figure wherever there is one.

diameternumber
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. ownNozzle: the model has none, so this package's own shows with it unless the part is nested in the stage below.

drawnFromstring

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' ]

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/uchusen-rockets 0.14.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。