Reference · Where the Sun, Moon and planets are for a date, in two scales, with the camera maths
RidePosetype
The camera ridePose works out: where it is, which way it looks, which way is up in the picture, its field of view in degrees, and how big the body looks from there (its angular radius in degrees).
Import it
import type { RidePose } from "@johnmorrisdotca/wakusei-planets/space";
Definition
interface RidePose {
position: Vec3;
forward: Vec3;
up: Vec3;
fov: number;
bodyRadiusDegrees: number;
}
Members
| Name | Type | Description |
|---|---|---|
position | Vec3 | |
forward | Vec3 | |
up | Vec3 | |
fov | number | |
bodyRadiusDegrees | number | The angular radius of the body it goes round, in degrees: 90 when the camera is on or inside it. |
Examples
import type { RidePose } from "@johnmorrisdotca/wakusei-planets/space";
const describe = (pose: RidePose): string => `looking ${pose.forward.map((n) => n.toFixed(2)).join(",")} with a ${pose.fov} degree view`;
console.log(typeof describe);functionWhat it prints (run when this page was built)