inspectAt関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One drone's place around a finished hull.
インポート
import { inspectAt } from "@johnmorrisdotca/uchusen-rockets";
定義
function inspectAt(index: number, count: number, age: number, hull: HullBox, speed?: number): InspectPlace
引数
| 名前 | 型 | 説明 |
|---|---|---|
index | number | Which drone, from 0. |
count | number | How many are flying, from 1 to 100. |
age | number | Seconds since the flight started. |
hull | HullBox | The ship's box, in metres. |
speed (省略可) | number | How fast the clock runs. 1 is the ordinary pace. |
戻り値
InspectPlace
The drone, the spot on the hull, and whether it is paused.
例
import { inspectAt } from "@johnmorrisdotca/uchusen-rockets";
const place = inspectAt(0, 4, 1, { min: [-2, 0, -2], max: [2, 10, 2] });
console.log(place.where[0] > 2 ? "out" : "in");out出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。