Reference · Rockets, variants, parts and the fit check
rolledUpfunction
The camera's up axis after a roll about the direction it looks along. Zero roll is straight up. The direction is a unit vector from the subject towards the camera.
Import it
import { rolledUp } from "@johnmorrisdotca/uchusen-rockets";
Definition
function rolledUp(direction: Vec3, roll: number): Vec3
Parameters
| Name | Type | Description |
|---|---|---|
direction | Vec3 | Where the camera stands, as a unit vector. |
roll | number | Degrees about that direction. Positive rolls the camera's right side down. |
Returns
Vec3
The up axis.
Examples
import { rolledUp } from "@johnmorrisdotca/uchusen-rockets";
console.log(rolledUp([0, 0, 1], 0));[ 0, 1, 0 ]What it prints (run when this page was built)