Viewpoint3Dtype
A viewpoint: a star (with a distance), a name starByName finds, or a point { x, y, z } in parsecs with the Sun at the origin.
Import it
import type { Viewpoint3D } from "@johnmorrisdotca/hoshi-stars/constellation-3d";
Definition
type Viewpoint3D = Star | NearbyStar | string | {
x: number;
y: number;
z: number;
};
Examples
import { constellationIn3D, type Viewpoint3D } from "@johnmorrisdotca/hoshi-stars/constellation-3d";
const from: Viewpoint3D = "Rigil Kentaurus";
console.log(constellationIn3D("Cas", { from }).viewpoint.name);Rigil KentaurusWhat it prints (run when this page was built)