BuildTime型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
How long a build took, and what it made.
インポート
import type { BuildTime } from "@johnmorrisdotca/uchusen-rockets";
定義
interface BuildTime {
level: "coarse" | "fine";
ms: number;
pieces: number;
triangles: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
level | "coarse" | "fine" | |
ms | number | Milliseconds for the pieces of the whole ship and their mesh. |
pieces | number | |
triangles | number |
例
import { SAMPLE_SHIPS, timeBuild, type BuildTime } from "@johnmorrisdotca/uchusen-rockets";
const took: BuildTime = timeBuild(SAMPLE_SHIPS.scout, "coarse");
console.log(took.level, took.ms < 1000, took.pieces);coarse true 43出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。