Reference · Rockets, variants, parts and the fit check
approachPathfunction
Berth, parts store, the lane abreast of the slot, then the slot. The first three points are outside the hull, on the starboard side.
Import it
import { approachPath } from "@johnmorrisdotca/uchusen-rockets";
Definition
function approachPath(drone: number, count: number, slot: readonly [number, number, number], hull: HullBox): [number, number, number][]
Parameters
| Name | Type | Description |
|---|---|---|
drone | number | Which drone, from 0. |
count | number | How many drones share the lane. |
slot | readonly [number, number, number] | Where the part is placed, in metres. |
hull | HullBox | The hull the path must stay outside of. |
Returns
[number, number, number][]
Four points, the last of them the slot.
Examples
import { approachPath } from "@johnmorrisdotca/uchusen-rockets";
const hull = { min: [-10, 0, -4] as const, max: [10, 40, 4] as const };
console.log(approachPath(0, 2, [0, 20, 0], hull).length);4What it prints (run when this page was built)