本文へ移動

Uchusen Rockets宇宙船

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

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

目次

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

FitReport型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The answer of check: whether the parts go together, the issues, the label to call the rocket, whether it is a custom build, the variant, the parts, the size and the credits of every licensed model.

インポート

import type { FitReport } from "@johnmorrisdotca/uchusen-rockets";

定義

interface FitReport {
    ok: boolean;
    issues: readonly FitIssue[];
    label: string;
    custom: boolean;
    variant: Variant | null;
    parts: readonly SlotPart[];
    size: {
        height: number;
        diameter: number;
    } | null;
    credits: readonly (ModelCredit & {
        id: CreditId;
        usedFor: readonly string[];
    })[];
}

メンバー

名前型説明
okboolean
issuesreadonly FitIssue[]
labelstring

What to call it: a real variant's name, or a plain words label for a mix.

customboolean

True when any part is not true for the named variant: never presented as a vehicle that flew.

variantVariant | null
partsreadonly SlotPart[]

The parts, bottom up.

size{ height: number; diameter: number; } | null

Metres, as drawn: the parts' heights added, the widest diameter. Null when it does not fit.

creditsreadonly (ModelCredit & { id: CreditId; usedFor: readonly string[]; })[]

Whose work each licensed part is. Empty when only this package's code is used.

例

import { check, type FitReport } from "@johnmorrisdotca/uchusen-rockets";

const report: FitReport = check({ rocket: "falcon-9", variant: "block-5" });
console.log(report.ok, report.size);
true { height: 69.8, diameter: 5.2 }

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

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

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