本文へ移動

Uchusen Rockets宇宙船

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

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

目次

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

KitModule型

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

One module of the kit: its name, mass and size in metres, the collars at its ends, the ports on its side, and how to draw it. The origin is the middle of its base on the spine, Y up the spine, and the module stands from y = 0 to y = length.

インポート

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

定義

interface KitModule {
    id: string;
    name: string;
    kind: ModuleKind;
    note: string;
    mass: number;
    propellant: number;
    length: number;
    width: number;
    depth: number;
    top?: CollarClass;
    bottom?: CollarClass;
    ports: readonly Port[];
    ancestor: string;
    inside: boolean;
    slot?: string;
    livery: LiveryName;
    pieces: (options?: ModuleOptions) => Piece[];
}

メンバー

名前型説明
idstring
namestring
kindModuleKind
notestring

What it is, in a line a catalogue could print.

massnumber

Dry mass in tonnes.

propellantnumber

Propellant it holds when full, in tonnes; 0 for a module with none.

lengthnumber

Metres along the spine (Y).

widthnumber

Metres across its widest reach in X and in Z.

depthnumber
top (省略可)CollarClass | undefined

The collar on its top (the end the spine continues to) and on its bottom. A module with neither is not on a spine: it hangs from a port.

bottom (省略可)CollarClass | undefined
portsreadonly Port[]

Ports on its side.

ancestorstring

The real hardware it descends from, in a line a reader can look up.

insideboolean

Whether it has an inside to show.

slot (省略可)string | undefined

A slot name shared by modules that swap for one another: the same collars, the same size.

livery"foil" | "industrial" | "science" | "command" | "transport"
pieces(options?: ModuleOptions) => Piece[]

The pieces, in metres.

例

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

const tank = KIT["tank-cryo-12"];
console.log(tank.name, tank.mass, tank.length, tank.width);
Cryogenic fuel tank, 12 m 160 12 13.4

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

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

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