ModuleOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What a module draws with: how much small detail, whether to open the hull, a different colour scheme, a seed for the weathering.
インポート
import type { ModuleOptions } from "@johnmorrisdotca/uchusen-rockets";
定義
interface ModuleOptions {
detail?: number;
cutaway?: boolean;
livery?: LiveryName;
hull?: HullStackName;
seed?: string;
cutYaw?: number;
level?: "coarse" | "fine";
separation?: boolean | SeparationOptions;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
detail (省略可) | number | undefined | How much small detail, 0.25 to 1: a ship of many modules lowers it so its mesh stays small. Left out: 1. |
cutaway (省略可) | boolean | undefined | Open the hull on the windward side and show the inside, for the modules that have one. |
livery (省略可) | "foil" | "industrial" | "science" | "command" | "transport" | undefined | A different colour scheme. |
hull (省略可) | HullStackName | undefined | The hull layers a cutaway shows: a role's stack from |
seed (省略可) | string | undefined | Which of several of the same module this is, so the weathering differs. |
cutYaw (省略可) | number | undefined | Where a cutaway opens, in degrees round the spine from +Z towards +X: 0 opens on +Z (the default), 90 on +X, 180 on -Z. A ship whose own axes differ turns it to face its own camera. |
level (省略可) | "coarse" | "fine" | undefined |
|
separation (省略可) | boolean | SeparationOptions | undefined | Plan a separation here: the module's base carries a separation joint (a split collar, latches, bolt caps and umbilical plates). |
例
import { KIT, type ModuleOptions } from "@johnmorrisdotca/uchusen-rockets";
const options: ModuleOptions = { detail: 0.5, cutaway: true };
console.log(KIT["tank-cryo-12"].pieces(options).length);660出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。