Reference · The <chikyu-space> element
Ridingtype
What the camera is riding along with now: the body or satellite, how (from or follow), where it looks, and the distance kept for a satellite.
Import it
import type { Riding } from "@johnmorrisdotca/chikyu-earth/space/element";
Definition
interface Riding {
target: RideTarget;
view: "from" | "follow";
look: RideLook;
distanceKm: number;
}
Members
| Name | Type | Description |
|---|---|---|
target | RideTarget | |
view | "from" | "follow" | |
look | RideLook | |
distanceKm | number |
Examples
import type { Riding } from "@johnmorrisdotca/chikyu-earth/space/element";
const describe = (ride: Riding | null): string => (ride ? `${ride.view} ${typeof ride.target === "string" ? ride.target : ride.target.group}` : "not riding");
console.log(typeof describe);