1681-engine / index / aimAxis
Function: aimAxis() ​
ts
function aimAxis(aim): object;Defined in: src/input/aimAxis.ts:5
An aim turned into the eight-way axis the keyboard makes (each part -1, 0 or 1; stepMover scales a diagonal), so a step sent along it is one a key could have sent. A part counts once the aim leans past 22.5° towards it.
Parameters ​
| Parameter | Type |
|---|---|
aim | number |
Returns ​
object
dx ​
ts
dx: number;dy ​
ts
dy: number;