Reference · The <chikyu-space> element
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: the zoom that shows them, when a body painter that draws moons is set).
Import it
import type { SpacePreset } from "@johnmorrisdotca/chikyu-earth/space/element";
Definition
type SpacePreset = "earth" | "moon" | "sun" | "inner" | "solar-system" | `${Exclude<PlanetName, "Mercury" | "Venus">}-moons`;
Examples
import type { ChikyuSpace, SpacePreset } from "@johnmorrisdotca/chikyu-earth/space/element";
const zoomTo = (space: ChikyuSpace, preset: SpacePreset): number => space.zoomFor(preset);
console.log(typeof zoomTo);