MaterialSpec型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One material: its colour, how metal and how rough it is in a 3D view, and the fill group it takes in a drawing.
インポート
import type { MaterialSpec } from "@johnmorrisdotca/uchusen-rockets";
定義
interface MaterialSpec {
color: string;
metal: number;
rough: number;
fill: FillName;
glow?: number;
glowColor?: string;
opacity?: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
color | string | |
metal | number | |
rough | number | |
fill | FillName | The fill it takes in a drawing. |
glow (省略可) | number | undefined | How brightly it glows. Engine materials ( |
glowColor (省略可) | string | undefined | The colour of that glow; left out: its own colour. |
opacity (省略可) | number | undefined | How opaque it is in a painted 3D view, 0 to 1: glass you can see through. Left out: solid. |
例
import { MATERIALS, type MaterialSpec } from "@johnmorrisdotca/uchusen-rockets";
const steel: MaterialSpec = MATERIALS.steel;
console.log(steel.color, steel.fill);#c3c7cb hull出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。