Reference · The <wakusei-space> element: the Earth, Moon, Sun and planets in their places
SpacePresettype
A named distance for zoomFor: the Earth, the Moon, the Sun, the inner planets, the whole solar system, or a planet with its nearer moons (jupiter-moons).
Import it
import type { SpacePreset } from "@johnmorrisdotca/wakusei-planets/space/element";
Definition
type SpacePreset = "earth" | "moon" | "sun" | "inner" | "solar-system" | `${Exclude<SpacePlanet, "mercury" | "venus">}-moons`;
Examples
import type { SpacePreset, WakuseiSpace } from "@johnmorrisdotca/wakusei-planets/space/element";
const zoomTo = (space: WakuseiSpace, preset: SpacePreset): number => space.zoomFor(preset);
console.log(typeof zoomTo);