Reference · Rockets, variants, parts and the fit check
inspectAtfunction
One drone's place around a finished hull.
Import it
import { inspectAt } from "@johnmorrisdotca/uchusen-rockets";
Definition
function inspectAt(index: number, count: number, age: number, hull: HullBox, speed?: number): InspectPlace
Parameters
| Name | Type | Description |
|---|---|---|
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 (optional) | number | How fast the clock runs. 1 is the ordinary pace. |
Returns
InspectPlace
The drone, the spot on the hull, and whether it is paused.
Examples
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");outWhat it prints (run when this page was built)