Reference · Rockets, variants, parts and the fit check
directionOffunction
The unit vector from what is looked at towards the camera.
Import it
import { directionOf } from "@johnmorrisdotca/uchusen-rockets";
Definition
function directionOf({ az, el }: Angle): Vec3
Parameters
| Name | Type | Description |
|---|---|---|
angle | Angle | The angle to look from. |
Returns
Vec3
A unit vector.
Examples
import { directionOf } from "@johnmorrisdotca/uchusen-rockets";
console.log(directionOf({ az: 0, el: 0 }));[ 0, 0, 1 ]What it prints (run when this page was built)